Cloud resource query method and device, electronic equipment and storage medium
By creating a unified target interface and supporting multi-dimensional query conditions in the cloud computing resource management tool, the problem of insufficient complexity and scalability of existing tools when querying multiple cloud resources is solved, and efficient, secure and intelligent are achieved cloud resource query and management.
Patent Information
- Application Number
- CN202411498473.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-02-21
AI Technical Summary
When querying multiple cloud resources, existing cloud computing resource management tools have high demand for customized development, inconsistent query methods, complex interface design, insufficient scalability, limited support for user-defined query conditions, lack of historical query condition records and resource configuration audits Features and not supporting intelligent query are significant defects.
Provide a cloud resource query method and device. By determining the interface types and data formats of multiple cloud resources, a unified target interface is created to build query conditions, support multiple query dimensions, and cover the interface types and data of multiple source resources. Format. The method includes displaying the input query conditions in the human-computer interactive interface, obtaining the query results from the cloud resources after confirmation, and displaying the results through the interface.
It significantly improves user experience and satisfaction, improves resource management and query efficiency, strengthens data security and permission control, improves the compliance and security of resource allocation, promotes digital transformation and intelligent upgrades, and enhances the enterprise's Competitiveness and market position.
Smart Images

Figure CN119493883A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud computing technology, and in particular to a cloud resource query method, device, electronic device and storage medium. Background Art
[0002] Although the advanced screening (retrieval) functions currently on the market have been applied in various information, document, commodity and database management tools, they still have significant defects in the field of cloud computing resource management.
[0003] These defects include: high demand for customized development for different cloud resource types, inconsistent query methods leading to increased learning costs and inconsistent query results, complex interface design affecting user efficiency and satisfaction, insufficient scalability making it difficult to adapt to changes, limited support for user-defined query conditions, lack of historical query condition records and resource configuration auditing functions, and no support for intelligent query. These deficiencies are mainly due to the imperfect structured design of query conditions, which limits the implementation of functions and the scalability of the system. Therefore, there is an urgent need for an advanced search technology that can uniformly query multiple cloud resources, has a simple interface, strong scalability, supports user-defined query conditions, and has resource configuration auditing and intelligent query functions to meet users' needs for efficient, flexible, and intelligent cloud computing resource management. Summary of the invention
[0004] In view of this, embodiments of the present application provide a cloud resource query method, device, electronic device and storage medium, which can improve the efficiency of cloud resource query.
[0005] The technical solution of the embodiment of the present application is implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a cloud resource query method, wherein the cloud resources include cloud resources of multiple different interface types and data formats, and the method includes:
[0007] Determine the interface types and data formats of the multiple cloud resources, and create a target interface based on the interface types and data formats of the multiple cloud resources; wherein the target interface is used to construct a query condition, the query condition includes multiple query dimensions, and the multiple query dimensions cover the interface types and data formats of the multiple source resources;
[0008] In response to the condition input request, displaying at least one query condition input in the human-computer interaction interface; wherein the at least one query condition matches the target interface;
[0009] In response to a confirmation request for a query condition, a query result is obtained from the cloud resource based on the target interface, and the query result is displayed through the human-computer interaction interface.
[0010] In a second aspect, an embodiment of the present application further provides a cloud resource query device, wherein the cloud resources include cloud resources of multiple different interface types and data formats, and the device includes:
[0011] A determination module, used to determine the interface types and data formats of multiple cloud resources, and create a target interface based on the interface types and data formats of the multiple cloud resources; wherein the target interface is used to construct a query condition, the query condition includes multiple query dimensions, and the multiple query dimensions cover the interface types and data formats of the multiple source resources;
[0012] An input module, configured to display at least one query condition input in the human-computer interaction interface in response to a condition input request; wherein the at least one query condition matches the target interface;
[0013] The query module is used to respond to a confirmation request for the query condition, obtain the query result from the cloud resource based on the target interface, and display the query result through the human-computer interaction interface.
[0014] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to execute the cloud resource query method described in any one of the first aspects.
[0015] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the cloud resource query method described in any one of the first aspects is executed.
[0016] The embodiments of the present application have the following beneficial effects:
[0017] (1) Significantly improve user experience and satisfaction: Through high customization and flexibility, users can customize resource display and query conditions according to actual needs, making information display more personalized and targeted, greatly improving user experience. The simplicity and intuitiveness of the user interface reduces cognitive load, improves operational efficiency, and enables users to complete resource management tasks more easily.
[0018] (2) Improve resource management and query efficiency: Unified query language and methods reduce learning costs, improve work efficiency, ensure consistency of queries across resource types, and enhance user trust in query results. Strong scalability and adaptability enable the system to quickly adapt to new needs and technological changes, flexibly respond to resource changes, and maintain efficient and accurate resource management.
[0019] (3) Strengthen data security and permission control: Through a fine-grained permission control mechanism, it is ensured that users can only access data within their permission scope, effectively preventing data leakage and abuse. The automated permission verification process improves the accuracy and efficiency of permission control and reduces the complexity of permission management.
[0020] (4) Improve the compliance and security of resource allocation: The comprehensiveness and automation of resource allocation auditing can comprehensively monitor the compliance, integrity and security of resource allocation, and promptly identify and resolve problems in resource allocation. Detailed audit records and practical audit reports provide strong support for problem tracking and analysis, helping management make more informed decisions.
[0021] (5) Promote digital transformation and intelligent upgrading: The innovation and convenience of intelligent query solves the difficulties of users in constructing complex query conditions through the application of natural language processing technology, and improves the convenience and accuracy of query. The efficiency and mobility of intelligent agents enable users to query and manage resources efficiently at any time and any place, improving the convenience and efficiency of mobile office.
[0022] (6) Enhance enterprise competitiveness and market position: The embodiments of the present application significantly improve the automation and intelligence level of enterprise resource management by providing a comprehensive, efficient, secure and user-friendly solution.
[0023] In summary, the embodiments of the present application have brought significant beneficial effects in the field of cloud computing resource management, which not only improves user experience and work efficiency, but also strengthens data security and authority control, promotes the digital transformation and intelligent upgrading of enterprises, and enhances the competitiveness and market position of enterprises. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0025] Figure 1 is a flowchart of steps S101-S103 provided in an embodiment of the present application;
[0026] Figure 2 This is a diagram of a query condition selection interface provided by an embodiment of the present application;
[0027] Figure 3 This is a query result interface diagram of the "Elastic Cloud Server" provided in an embodiment of the present application;
[0028] Figure 4 This is a single-field screening interface diagram provided in an embodiment of the present application;
[0029] Figure 5 This is an advanced counting interface diagram provided by an embodiment of the present application;
[0030] Figure 6 It is a flowchart of steps S201-S205 provided in an embodiment of the present application;
[0031] Figure 7 It is a flowchart of steps S301-S303 provided in an embodiment of the present application;
[0032] Figure 8 is a structural diagram of a cloud resource query device 800 provided in an embodiment of the present application;
[0033] Fig. 9 It is a schematic diagram of the composition structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0034] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0035] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0036] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0037] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0038] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0039] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0040] See also Figure 1 , Figure 1 is a flow chart of steps S101-S103 of the cloud resource query method provided in the embodiment of the present application, which will be combined with Figure 1 Steps S101-S103 are shown for explanation.
[0041] In step S101, the interface types and data formats of multiple cloud resources are determined, and a target interface is created based on the interface types and data formats of the multiple cloud resources; wherein the target interface is used to construct a query condition, the query condition includes multiple query dimensions, and the multiple query dimensions cover the interface types and data formats of the multiple source resources.
[0042] Here, we first determine the interface type and data format of the cloud resources. This step is the basis of the method. We need to clarify the interface type (such as RESTful API, SOAP, etc.) and data format (such as JSON, XML, CSV, etc.) of each cloud resource. Based on the collected information, create a unified target interface. This interface is used to construct query conditions, which will cover the interface types and data formats of all cloud resources. The design of the target interface supports the combination of multiple query dimensions, thereby meeting the diverse needs of users for cloud resource queries.
[0043] In step S102, in response to the condition input request, at least one query condition input is displayed in the human-computer interaction interface; wherein the at least one query condition matches the target interface.
[0044] Here, when the user requests to input query conditions, the system displays these conditions through a human-computer interaction interface (such as a web page, application program, etc.). The user can select or input at least one query condition as needed, and these conditions should match the target interface.
[0045] In step S103, in response to a confirmation request for the query condition, a query result is obtained from the cloud resource based on the target interface, and the query result is displayed through the human-computer interaction interface.
[0046] Here, after the user confirms the query conditions, the system retrieves data from the cloud resources based on the target interface.
[0047] The retrieval process involves parsing and converting multiple interface types and data formats to ensure the accuracy and consistency of the data. Finally, the system displays the query results through a human-computer interaction interface for users to view and analyze.
[0048] In some embodiments, the target interface includes a query interface, a counting interface, an export interface, and a packet counting interface;
[0049] The query interface is used to construct the query conditions to perform accurate searches in the cloud resources; the counting interface is used to count the number of specific cloud resources in the cloud resources; the export interface is used to export the query results into a target file in a specific format; the group counting interface is used to group and count specific attributes in the cloud resources.
[0050] Here, in the above solution, the four core interfaces - query (AdvancedSearch), count (AdvancedCount), export (AdvancedExport) and group count (AdvancedGroupCount) each play a different role and together constitute the important functions of the cloud computing resource management system. The following is a detailed explanation of the functions of these four interfaces:
[0051] 1. Query (AdvancedSearch):
[0052] The query interface allows users to construct complex query conditions to accurately find the required resources in cloud computing resources. Users can set filtering conditions including multi-dimensional information such as resource attributes, status, and ownership through a graphical interface or API interface. The interface supports multiple query methods, such as preset query conditions, fuzzy query, and filtering, to meet the query needs of different users.
[0053] 2. Count (AdvancedCount):
[0054] The counting interface is used to quickly count the number of certain resources in cloud computing resources.
[0055] It directly uses the default filter conditions as input, without the need for users to manually set filter conditions, thereby improving query efficiency. This interface returns the number of resource rows, that is, the total number of resources that meet the query conditions, without involving specific resource information. Through the counting function, users can see the integrated number of multiple resources on a single page without switching pages.
[0056] 3. Export (AdvancedExport):
[0057] The export interface allows users to export query results as Excel files for further analysis and processing. Users can select resources to export, and the system will generate an Excel file for download based on the filtered conditions. If you do not select resources, you can directly call the export interface to export according to the filtered JSON conditions. This interface provides users with a convenient data export function, which helps users better manage and use query results.
[0058] 4. Group count (AdvancedGroupCount):
[0059] The group counting interface is used to group and count certain attributes in cloud computing resources. Users can set the grouping field through this interface, and the system will group the resources that meet the query conditions and count the number of each group. The result of this interface is based on the result of the previous step of filtering, ensuring that the total number after grouping is the same as the result of the filtering. Through the group counting function, users can have a deeper understanding of the distribution of resources, which is helpful for resource management and optimization.
[0060] In summary, these four core interfaces play an important role in the cloud computing resource management system, and together constitute an efficient, convenient and secure resource management environment.
[0061] These interfaces use HTTP POST requests and JSON format for the request body to achieve efficient communication between the client and the backend. The keys and their meanings of the request content are as follows:
[0062] className: should correspond to the entity class name of the background (Java implementation), which will determine which entity type to query and resolve it to the corresponding data table or view in the background.
[0063] conditions: condition array, containing a series of filtering conditions, each condition is a Condition object. The format of the Condition object is as follows:
[0064] domainName: Specifies the attribute name to be filtered. It is case insensitive.
[0065] domainType: specifies the data type of the field. Currently, this field is used to control the type of data to be queried in the background, so as to distinguish the different results produced by different types in certain queries (for example, the judgment method of "greater than" for a string will be different from that of an integer).
[0066] searchType: defines the query condition operator, such as in, not in, between, like, etc. Currently supported operations and Chinese meanings:
[0067] 1.in among;
[0068] 2. not in;
[0069] 3.between between...;
[0070] 4.not between;
[0071] 5.Like wildcard matching, you can add wildcards manually, if not, the backend will automatically add "%" on both sides to indicate "include";
[0072] 6. not like does not match / does not contain;
[0073] 7.startWith starts with...;
[0074] 8.endWith ends with...;
[0075] 9.is null is empty;
[0076] 10.is not null is not empty;
[0077] 11.> / < / <> / >= / <= / ! = / =greater than, less than, not equal to, etc.
[0078] 12.regexp regular expression, value fills in the pattern string;
[0079] 13. instr is included, which is used to indicate whether value is included in the query data;
[0080] 14. repeat appears repeatedly, indicating that the content appears more than once in the field;
[0081] values: Provides a list of values to be used for the operation specified by searchType. For example, the between operation will use the first two values in the list, and the one after greater than, less than or equal to will use the next value. The number of values entered must not be less than the number of values required by searchType.
[0082] conditionType: defines the logical connection between conditions, and only supports and (and) and (or). The conditionType of the first condition does not need to be filled in, and the default is always and, because the query will start with `select{searchedFields}from{tableName}where1=1and`.
[0083] preConditions: Preconditions, which have the same functions as Conditions, are used to customize the prior conditions for the same resource on different pages. For example, the resources displayed on the "Team Resources" page must be resources managed by this team. The compound condition of "whether the resource is managed by the team" can be used as a prior condition to distinguish it from Conditions.
[0084] sortBy: sorting array, defines the sorting rules for the results. Field names starting with - indicate descending order, otherwise ascending order.
[0085] searchedFields: query fields, used to optimize query speed. Since the internal objects of the query are not limited to the data table, when querying the data view, querying all fields (select *) will cause all table connections to be executed. If only some fields (usually the fields displayed on the front end) are queried, the speed of the select statement query can be optimized and the number of table connections can be reduced.
[0086] FuzzySearch is used to further filter the queried data and find data rows where at least one attribute contains one (or multiple attributes contain multiple) values. This field consists of one or more (space-separated) character sequences.
[0087] The query condition samples are as follows. Taking the host instance as an example, users can construct query requests containing multiple conditions such as name, primary IP, disk capacity, etc. Through preconditions (preConditions), system administrators can limit the query scope, such as the administrator who uses the user's work number to control all resources must include the user who executes the query. Fuzzy query (fuzzySearch) allows users to perform more extensive data retrieval based on keywords. For example, in this example, for "Beijing physical machine", the filtered data rows must contain both of these items.
[0088] See the code shown in Sample 1:
[0089]
[0090]
[0091]
[0092]
[0093] For Example 1, the following is an explanation of Example 1:
[0094] className: value: "HostInstance";
[0095] Explanation: Specifies that the entity type to be queried is "host instance". The background will parse this value to determine which data table or view to query.
[0096] conditions: Explanation: This is a condition array, which contains a series of conditions for filtering resources.
[0097] Condition 1: domainName: "name";
[0098] domainType:"String";
[0099] searchType: "like";
[0100] values:["linux"];
[0101] Explanation: Filter host instances whose names contain the string "linux".
[0102] Condition 2: conditionType: "and";
[0103] domainName:"mainIp";
[0104] domainType:"String";
[0105] searchType:"=";
[0106] values:["10.10.10.10"];
[0107] Explanation: And filters the host instances whose main IP (mainIp) is equal to "10.10.10.10".
[0108] Condition 3: conditionType: "or";
[0109] domainName:"diskCapacity";
[0110] domainType: "Integer";
[0111] searchType:">";
[0112] values:
[100] ;
[0113] Explanation: Or (or) filter the host instances whose disk capacity (diskCapacity) is greater than 100.
[0114] Condition 4: domainName: "belongProduct";
[0115] searchType:"=";
[0116] domainType:"String";
[0117] values:["Panoramic call analysis system"];
[0118] conditionType: "and";
[0119] Explanation: And (and, since this is a subsequent condition, it is connected to the previous condition by and by default, but it is explicitly written here to enhance readability) filters the host instances whose belongProduct is equal to "Panorama Call Analysis System".
[0120] Condition 5: domainName: "deployEnv";
[0121] searchType: "in";
[0122] domainType:"String";
[0123] values:["0"];
[0124] conditionType: "and";
[0125] Explanation: And (and) filters the host instances whose deployment environment (deployEnv) is in the specified value "0".
[0126] fuzzySearch: value: "Beijing physical machine";
[0127] Explanation: Further filter the queried data to find data rows where at least one attribute contains one (or multiple attributes contain multiple) specified values. In this example, the filtered data rows must contain both "Beijing" and "Physical Machine".
[0128] sortBy: value: ["name", "mainIp"];
[0129] Explanation: Defines the sorting rules for the results. In this example, the results will be sorted first by name in ascending order, and if the names are the same, then by main IP in ascending order.
[0130] preConditions: Explanation: An array of preset conditions, used to customize the prior conditions of the same resource on different pages.
[0131] Condition 1: conditionType: "or";
[0132] domainName:"sysAdministrator";
[0133] searchType: "like";
[0134] values:["18200518"];
[0135] Explanation: Or (or) filter the resources of the system administrator (sysAdministrator) that contain the string "18200518".
[0136] Condition 2: conditionType: "or";
[0137] domainName:"sysAdminBackup";
[0138] searchType: "like";
[0139] values:["18200518"];
[0140] Explanation: Or (or) filter the system administrator backup (sysAdminBackup) resources containing the "18200518" string.
[0141] searchedFields: value:
[0142] ["name","mainIp","class_Name","networkArea","status",...];
[0143] Explanation: Query field array, used to optimize query speed. In this example, only the specified fields are queried to reduce the number of table connections and improve query efficiency.
[0144] In summary, this request body is intended to query host instance resources whose names contain "linux", whose primary IP is "10.10.10.10", whose disk capacity is greater than 100 or whose product is "panoramic call analysis system", whose deployment environment is "0", and which contain at least two keywords "Beijing" and "physical machine" (implemented by fuzzySearch). At the same time, these resources must meet one of the pre-conditions (system administrator or system administrator backup contains the string "18200518"). The query results will be sorted in ascending order by name and primary IP, and only the specified query fields will be returned.
[0145] See also Figure 2 and Figure 3 , Figure 2 is a diagram of a query condition selection interface provided in an embodiment of the present application, Figure 3 This is a query result interface diagram of the "Elastic Cloud Server" provided in an embodiment of the present application; Figure 2 The "Product", "Host Operation Team", and "Region" search boxes in the product are preset query conditions customized for the commonly used query types of the resource, such as the selection of "Product" and "Host Operation Team". These query conditions will be written into "preConditions". The search box of "Fuzzy Search of Visible Properties" is a fuzzy query function. The content written by the user will be passed to "fuzzySearch". It supports adding spaces, which is equivalent to querying rows with multiple contents at the same time. The "Advanced Filter" button is the entrance to "Filter" and will pop up Figure 2 At the same time, users can select "History" in the pop-up box to import previously selected condition groups, thereby increasing the efficiency of constructing high-frequency query conditions and reducing usage time costs.
[0146] Users can fill in "conditions" one by one in the "Advanced Filter" interface. The conditions shown in the figure are consistent with the parameters in Sample 1.
[0147] Figure 3 The "Export" button is the export function. If you check the resource and export it, the advanced filtering function will be used to export the condition as "primary key is among..." If you do not check it, the AdvancedExport interface will be called using the same json as AdvancedSearch for export, and the corresponding excel file will be generated by the background for the client to download.
[0148] See also Figure 4 , Figure 4 This is a single field screening interface diagram provided in an embodiment of the present application, such as Figure 4As shown in the figure, for a certain resource, a certain attribute needs to be grouped and counted (equivalent to Group By in SQL). The client will use the same request parameters to call the group counting interface AdvancedGroupCount, and control which fields to group through the groupFields parameter. Figure 3 In the example, the running status is grouped, and the result is based on the result of the advanced filter in the previous step, ensuring that the total number after grouping is the same as the result of the advanced filter.
[0149] See also Figure 5 , Figure 5 This is an advanced counting interface diagram provided by the embodiment of the present application, such as Figure 5 As shown, resources of the same type (hardware resources, server resources, etc.) are usually aggregated on the same page. Users can see the integrated number of multiple resources on a single page without switching pages. This function is implemented through the AdvancedCount function, which directly returns the number of rows of resources by directly taking the default preConditions of advanced filtering as input. Since the query quantity will not be associated with the view, it is extremely efficient and will directly return the number of rows in the data table.
[0150] Through the display and query interface of the elastic cloud server, users can use preset query conditions, fuzzy query and advanced filtering functions to quickly locate the required resources. Preset query conditions (such as belonging to products and host operation teams) are written into "preConditions", fuzzy query supports multi-keyword search, and advanced filtering allows users to set conditions in detail. The export function uses advanced filtering conditions to generate Excel files based on user selections for easy download.
[0151] In addition, the single-field filtering function is implemented through the AdvancedGroupCount interface, which counts resource attributes in groups to ensure that the results are consistent with advanced filtering. The advanced counting function directly returns the number of resource rows through the AdvancedCount interface, providing efficient resource statistics. Users can view the integrated number of multiple resources without switching pages. These functions together improve the efficiency and convenience of users in resource management and query.
[0152] In some embodiments, see Figure 6 , Figure 6 It is a flowchart of steps S201-S205 provided in an embodiment of the present application. The method also includes steps S201-S205, which will be described in combination with each step.
[0153] In step S201, audit requirements for verifying the compliance and effectiveness of resource configuration are determined.
[0154] In step S202, an audit query condition is constructed based on the audit requirement, and an audit result is queried from the cloud resource through the audit query condition.
[0155] In step S203, the audit result is analyzed and processed to obtain resource compliance information, and non-compliant cloud resources are determined based on the resource compliance information and / or risk levels are classified for the audited cloud resources.
[0156] In step S204, for the non-compliant cloud resources and / or cloud resources with a risk level higher than a preset level, the cloud resources are automatically deleted or a prompt message is sent.
[0157] In step S205, the audit records are recorded, and an audit report is generated according to the audit records.
[0158] In some embodiments, the method further comprises:
[0159] The audit requirement is saved as an audit policy and stored in a policy library; wherein the policy library includes at least one audit policy;
[0160] In response to the audit request, selecting a target audit policy from the at least one audit policy;
[0161] The execution time and execution frequency are set for the target audit policy to automatically perform the audit, or the target audit policy is manually executed.
[0162] Here, in order to ensure the rationality and effectiveness of resource configuration, the above embodiment proposes a resource configuration audit function, which realizes a comprehensive audit of resource configuration by constructing, saving, timing or manually executing queries of advanced screening conditions, and analyzing query results.
[0163] Specifically, users can build complex advanced filtering conditions through a graphical interface or API interface. These conditions can include multi-dimensional information such as resource attributes, status, and ownership. After the construction is completed, users can save these conditions as audit policies for subsequent reuse or scheduled execution. The saved audit policies can include information such as policy name, description, filtering conditions, and execution frequency.
[0164] Resource configuration audit supports two modes: scheduled execution and manual triggering. In the scheduled execution mode, the system will automatically execute the audit policy according to the preset time interval and record the audit results in the system. Manual triggering allows users to start the audit process at any time to meet immediate audit needs.
[0165] After the audit query is executed, the system will conduct in-depth analysis of the results to identify non-compliant resources, missing configurations, or excess resources. For example, the system can set a threshold, and when the number of a certain resource exceeds this threshold, it will be marked as a non-compliant resource. Similarly, if a resource does not exist, it may indicate a missing configuration. In addition, the system can classify resources into different risk levels based on their attributes and status.
[0166] Users can categorize audit policies based on organizational needs, such as by resource type, department, or project. At the same time, users can also set risk levels for each resource configuration to reflect its importance and potential risks to corporate operations.
[0167] Once the audit policy is executed and the query results are analyzed, the system can perform further actions based on preset rules. For example, if non-compliant resources are found, the system can automatically delete these resources or send an email to notify the relevant person in charge for manual processing. These actions can be defined and managed through the workflow engine to ensure the automation and efficiency of the audit process.
[0168] All audit activities, including execution time, execution results, problems found, and measures taken, will be recorded in the audit log by the system. Users can view these logs at any time to track the progress and effectiveness of audit activities. In addition, the system can also generate audit reports, providing a comprehensive view of resource allocation status, helping management make more informed decisions.
[0169] The above approach not only improves the transparency and compliance of resource management, but also significantly improves the efficiency and effectiveness of resource management through automation and intelligent means.
[0170] In some embodiments, see Figure 7 , Figure 7 It is a flowchart of steps S301-S303 provided in an embodiment of the present application. The method also includes steps S301-S303, which will be described in combination with each step.
[0171] In step S301, query information is received in response to an intelligent query request; wherein the query information is in natural language.
[0172] In step S302, the natural language is parsed, target information is extracted from the parsing result, and intelligent query conditions are constructed based on the target information.
[0173] In step S303, the cloud resources are queried based on the intelligent query conditions.
[0174] In some embodiments, when the query subject of the intelligent query is a mobile APP, the intelligent query request is sent by calling an intelligent robot; when the query subject of the intelligent query is a management system, the intelligent query request is sent by entering a query description in the management system; the query interface includes at least one preset condition, and each of the at least one preset condition is used to fill in the intelligent query condition.
[0175] In the complex environment of cloud computing resource management, users often face the challenge of constructing complex query conditions. The intelligent query function of the present invention converts the user's natural language description into a JSON format for advanced filtering through natural language processing technology, greatly simplifying the user's query process.
[0176] Specifically, the intelligent query function is built on natural language processing (NLP) technology, which can parse the user's natural language input and convert it into corresponding advanced filtering conditions. This function includes the following key components:
[0177] Natural language parsing engine: responsible for understanding the user's query description and extracting key information such as resource attributes, operators, and values.
[0178] Query condition generator: Build the corresponding advanced filtering JSON format based on the parsed key information.
[0179] Intelligent Agent: In the mobile office app, the intelligent agent directly calls the advanced filtering interface, processes the returned results, and then presents them to the user.
[0180] The construction of intelligent agents relies on large models within the enterprise, which are trained and optimized through the following resources and documents:
[0181] Prompt word library: Contains common words and phrases related to cloud computing resource management to help intelligent agents better understand user input.
[0182] Advanced Filtering Interface Description Document: Describes the parameters and usage of the advanced filtering interface in detail, providing a basis for intelligent agents to build query conditions.
[0183] Cloud resource attribute correspondence table: defines the resource types that can use intelligent query, including the type, meaning and corresponding domain name of each attribute (that is, the attribute name that can be directly resolved by the background program).
[0184] OpenAPI files: define the detailed specifications of the system API, including request methods, parameters, and response formats. Intelligent agents use these files to understand how to interact with backend services.
[0185] By analyzing these resources, the intelligent agent learns how to convert the user's natural language description into effective query conditions and call the corresponding interface.
[0186] The usage process of intelligent query is divided into two scenarios: mobile terminal and management system:
[0187] 1. Mobile office APP:
[0188] Users send query descriptions through @intelligent robot.
[0189] The intelligent agent parses the description, generates the advanced filtering JSON, and calls the advanced filtering interface.
[0190] After the interface returns the result, the intelligent agent analyzes the result and sends the final result to the user.
[0191] 2. Management system:
[0192] The user enters a query description in the management system.
[0193] The system parses the description, generates an advanced filter JSON, and returns it to the client.
[0194] The client parses the JSON and automatically fills it into the "Advanced Filter User Selection Page".
[0195] After the user confirms the filter conditions, click Filter to execute the query.
[0196] To ensure data security and compliance with permission control, the preconditions of each page are automatically populated into the JSON generated by the smart query. This ensures that users can only access data within their permission scope to prevent data leakage.
[0197] The intelligent query function solves the operational difficulties faced by users when facing complex query conditions. It can quickly build queries through natural language descriptions, significantly improving query efficiency. At the same time, the direct call and result analysis of the intelligent agent provide users with a convenient mobile experience. In addition, the automatically filled preset conditions ensure the security and compliance of the query and prevent unauthorized data access.
[0198] The above method not only improves the user experience, but also enhances the security and efficiency of cloud computing resource management through automation and intelligent means.
[0199] In summary, the embodiments of the present application have the following beneficial effects:
[0200] (1) Significantly improve user experience and satisfaction: Through high customization and flexibility, users can customize resource display and query conditions according to actual needs, making information display more personalized and targeted, greatly improving user experience. The simplicity and intuitiveness of the user interface reduces cognitive load, improves operational efficiency, and enables users to complete resource management tasks more easily.
[0201] (2) Improve resource management and query efficiency: Unified query language and methods reduce learning costs, improve work efficiency, ensure consistency of queries across resource types, and enhance user trust in query results. Strong scalability and adaptability enable the system to quickly adapt to new needs and technological changes, flexibly respond to resource changes, and maintain efficient and accurate resource management.
[0202] (3) Strengthen data security and permission control: Through a fine-grained permission control mechanism, it is ensured that users can only access data within their permission scope, effectively preventing data leakage and abuse. The automated permission verification process improves the accuracy and efficiency of permission control and reduces the complexity of permission management.
[0203] (4) Improve the compliance and security of resource allocation: The comprehensiveness and automation of resource allocation auditing can comprehensively monitor the compliance, integrity and security of resource allocation, and promptly identify and resolve problems in resource allocation. Detailed audit records and practical audit reports provide strong support for problem tracking and analysis, helping management make more informed decisions.
[0204] (5) Promote digital transformation and intelligent upgrading: The innovation and convenience of intelligent query solves the difficulties of users in constructing complex query conditions through the application of natural language processing technology, and improves the convenience and accuracy of query. The efficiency and mobility of intelligent agents enable users to query and manage resources efficiently at any time and any place, improving the convenience and efficiency of mobile office.
[0205] (6) Enhance enterprise competitiveness and market position: The embodiments of the present application significantly improve the automation and intelligence level of enterprise resource management by providing a comprehensive, efficient, secure and user-friendly solution.
[0206] In summary, the embodiments of the present application have brought significant beneficial effects in the field of cloud computing resource management, which not only improves user experience and work efficiency, but also strengthens data security and authority control, promotes the digital transformation and intelligent upgrading of enterprises, and enhances the competitiveness and market position of enterprises.
[0207] Based on the same inventive concept, the embodiment of the present application also provides a cloud resource query device corresponding to the cloud resource query method in the first embodiment. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the above-mentioned cloud resource query method, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0208] like Figure 8 As shown, Figure 8 800 is a schematic diagram of the structure of a cloud resource query device 800 provided in an embodiment of the present application. The cloud resources include cloud resources of multiple different interface types and data formats. The cloud resource query device 800 includes:
[0209] The determination module 801 is used to determine the interface types and data formats of multiple cloud resources, and create a target interface based on the interface types and data formats of the multiple cloud resources; wherein the target interface is used to construct a query condition, the query condition includes multiple query dimensions, and the multiple query dimensions cover the interface types and data formats of the multiple source resources;
[0210] An input module 802, configured to display at least one query condition input in the human-computer interaction interface in response to a condition input request; wherein the at least one query condition matches the target interface;
[0211] The query module 803 is used to respond to the confirmation request for the query condition, obtain the query result from the cloud resource based on the target interface, and display the query result through the human-computer interaction interface.
[0212] Those skilled in the art should understand that Figure 8 The implementation functions of each unit in the cloud resource query device 800 shown can be understood by referring to the relevant description of the aforementioned cloud resource query method. Figure 8 The functions of each unit in the cloud resource query device 800 shown can be implemented by a program running on a processor, or by a specific logic circuit.
[0213] In a possible implementation manner, the target interface includes a query interface, a counting interface, an export interface, and a packet counting interface;
[0214] The query interface is used to construct the query conditions to perform accurate searches in the cloud resources; the counting interface is used to count the number of specific cloud resources in the cloud resources; the export interface is used to export the query results into a target file in a specific format; the group counting interface is used to group and count specific attributes in the cloud resources.
[0215] In a possible implementation manner, the target interface includes at least one of the following request parameters:
[0216] className: entity class name;
[0217] conditions: condition array, including multiple filtering conditions, each filtering condition is a Condition object; the format of the Condition object includes:
[0218] domainName: attribute name;
[0219] domainType: specifies the data type of the field;
[0220] searchType: defines the conditional operator for the query;
[0221] values: provides a list of values for the operation specified by searchType;
[0222] conditionType: defines the logical connection between conditions;
[0223] preConditions: preconditions, which have the same function as conditions and are used to customize the prior conditions for the same resource on different pages;
[0224] sortBy: sorting array, used to define the sorting rules of the results;
[0225] searchedFields: query fields, used to improve query speed;
[0226] fuzzySearch: fuzzy search.
[0227] In a possible implementation, the query module 803 further includes:
[0228] Identify audit requirements to verify compliance and effectiveness of resource configurations;
[0229] Constructing an audit query condition based on the audit requirement, and querying the audit result from the cloud resource through the audit query condition;
[0230] Analyze and process the audit results to obtain resource compliance information, determine non-compliant cloud resources based on the resource compliance information, and / or classify risk levels for the audited cloud resources;
[0231] For the non-compliant cloud resources and / or cloud resources with a risk level higher than a preset level, the cloud resources are automatically deleted or a prompt message is sent;
[0232] Audit records are recorded, and audit reports are generated based on the audit records.
[0233] In a possible implementation, the query module 803 further includes:
[0234] The audit requirement is saved as an audit policy and stored in a policy library; wherein the policy library includes at least one audit policy;
[0235] In response to the audit request, selecting a target audit policy from the at least one audit policy;
[0236] The execution time and execution frequency are set for the target audit policy to automatically perform the audit, or the target audit policy is manually executed.
[0237] In a possible implementation, the query module 803 further includes:
[0238] In response to the intelligent query request, receiving query information; wherein the query information is a natural language;
[0239] Parsing the natural language, extracting target information from the parsing result, and constructing intelligent query conditions based on the target information;
[0240] The cloud resources are queried based on the intelligent query conditions.
[0241] In a possible implementation, when the query subject of the intelligent query is a mobile APP, the intelligent query request is sent by calling an intelligent robot; when the query subject of the intelligent query is a management system, the intelligent query request is sent by entering a query description in the management system; the query interface includes at least one preset condition, and each of the at least one preset condition is used to fill in the intelligent query condition.
[0242] The above cloud resource query device has the following beneficial effects:
[0243] (1) Significantly improve user experience and satisfaction: Through high customization and flexibility, users can customize resource display and query conditions according to actual needs, making information display more personalized and targeted, greatly improving user experience. The simplicity and intuitiveness of the user interface reduces cognitive load, improves operational efficiency, and enables users to complete resource management tasks more easily.
[0244] (2) Improve resource management and query efficiency: Unified query language and methods reduce learning costs, improve work efficiency, ensure consistency of queries across resource types, and enhance user trust in query results. Strong scalability and adaptability enable the system to quickly adapt to new needs and technological changes, flexibly respond to resource changes, and maintain efficient and accurate resource management.
[0245] (3) Strengthen data security and permission control: Through a fine-grained permission control mechanism, it is ensured that users can only access data within their permission scope, effectively preventing data leakage and abuse. The automated permission verification process improves the accuracy and efficiency of permission control and reduces the complexity of permission management.
[0246] (4) Improve the compliance and security of resource allocation: The comprehensiveness and automation of resource allocation auditing can comprehensively monitor the compliance, integrity and security of resource allocation, and promptly identify and resolve problems in resource allocation. Detailed audit records and practical audit reports provide strong support for problem tracking and analysis, helping management make more informed decisions.
[0247] (5) Promote digital transformation and intelligent upgrading: The innovation and convenience of intelligent query solves the difficulties of users in constructing complex query conditions through the application of natural language processing technology, and improves the convenience and accuracy of query. The efficiency and mobility of intelligent agents enable users to query and manage resources efficiently at any time and any place, improving the convenience and efficiency of mobile office.
[0248] (6) Enhance enterprise competitiveness and market position: The embodiments of the present application significantly improve the automation and intelligence level of enterprise resource management by providing a comprehensive, efficient, secure and user-friendly solution.
[0249] In summary, the embodiments of the present application have brought significant beneficial effects in the field of cloud computing resource management, which not only improves user experience and work efficiency, but also strengthens data security and authority control, promotes the digital transformation and intelligent upgrading of enterprises, and enhances the competitiveness and market position of enterprises.
[0250] like Fig. 9 As shown, Fig. 9 The present invention provides a schematic diagram of the structure of an electronic device 900, wherein the electronic device 900 includes:
[0251] A processor 901, a storage medium 902 and a bus 903, wherein the storage medium 902 stores machine-readable instructions executable by the processor 901. When the electronic device 900 is running, the processor 901 communicates with the storage medium 902 via the bus 903, and the processor 901 executes the machine-readable instructions to execute the steps of the cloud resource query method described in the embodiment of the present application.
[0252] In actual application, the components in the electronic device 900 are coupled together via the bus 903. It is understood that the bus 903 is used to realize the connection and communication between these components. In addition to the data bus, the bus 903 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Fig. 9 Various buses are labeled as bus 903.
[0253] The embodiment of the present application further provides a computer-readable storage medium, which stores executable instructions. When the executable instructions are executed by at least one processor 901, the cloud resource query method described in the embodiment of the present application is implemented.
[0254] In some embodiments, the storage medium can be a magnetic random access memory (FRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a magnetic surface storage, an optical disk, or a compact disc read-only memory (CDROM); it can also be various devices including one or any combination of the above memories.
[0255] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0256] As an example, executable instructions may, but do not necessarily, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, for example, in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (for example, files storing one or more modules, subroutines, or code portions).
[0257] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.
[0258] In summary, the embodiments of the present application have brought significant beneficial effects in the field of cloud computing resource management, which not only improves user experience and work efficiency, but also strengthens data security and authority control, promotes the digital transformation and intelligent upgrading of enterprises, and enhances the competitiveness and market position of enterprises.
[0259] In the several embodiments provided in the present application, it should be understood that the disclosed methods and electronic devices can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0260] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0261] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0262] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a platform server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.
[0263] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A cloud resource query method, characterized in that: The cloud resources include cloud resources of multiple different interface types and data formats, and the method includes: Determine the interface types and data formats of the multiple cloud resources, and create a target interface based on the interface types and data formats of the multiple cloud resources; wherein the target interface is used to construct a query condition, the query condition includes multiple query dimensions, and the multiple query dimensions cover the interface types and data formats of the multiple source resources; In response to the condition input request, displaying at least one query condition input in the human-computer interaction interface; wherein the at least one query condition matches the target interface; In response to a confirmation request for a query condition, a query result is obtained from the cloud resource based on the target interface, and the query result is displayed through the human-computer interaction interface.
2. The method according to claim 1, characterized in that: The target interface includes a query interface, a counting interface, an export interface and a packet counting interface; The query interface is used to construct the query conditions to perform accurate searches in the cloud resources; the counting interface is used to count the number of specific cloud resources in the cloud resources; the export interface is used to export the query results into a target file in a specific format; the group counting interface is used to group and count specific attributes in the cloud resources.
3. The method according to claim 1, characterized in that The target interface includes at least one of the following request parameters: className: entity class name; conditions: condition array, including multiple filtering conditions, each filtering condition is a Condition object; the format of the Condition object includes: domainName: attribute name; domainType: specifies the data type of the field; searchType: defines the conditional operator for the query; values: provides a list of values for the operation specified by searchType; conditionType: defines the logical connection between conditions; preConditions: preconditions, which have the same function as conditions and are used to customize the prior conditions for the same resource on different pages; sortBy: sorting array, used to define the sorting rules of the results; searchedFields: query fields, used to improve query speed; fuzzySearch: fuzzy search.
4. The method according to claim 1, characterized in that The method further comprises: Identify audit requirements to verify compliance and effectiveness of resource configurations; Constructing an audit query condition based on the audit requirement, and querying the audit result from the cloud resource through the audit query condition; Analyze and process the audit results to obtain resource compliance information, determine non-compliant cloud resources based on the resource compliance information, and / or classify risk levels for the audited cloud resources; For the non-compliant cloud resources and / or cloud resources with a risk level higher than a preset level, the cloud resources are automatically deleted or a prompt message is sent; Audit records are recorded, and audit reports are generated based on the audit records.
5. The method according to claim 4, characterized in that The method further comprises: The audit requirement is saved as an audit policy and stored in a policy library; wherein the policy library includes at least one audit policy; In response to the audit request, selecting a target audit policy from the at least one audit policy; The execution time and execution frequency are set for the target audit policy to automatically perform the audit, or the target audit policy is manually executed.
6. The method according to claim 1, characterized in that The method further comprises: In response to the intelligent query request, receiving query information; wherein the query information is a natural language; Parsing the natural language, extracting target information from the parsing result, and constructing intelligent query conditions based on the target information; The cloud resources are queried based on the intelligent query conditions.
7. The method according to claim 6, characterized in that When the query subject of the intelligent query is a mobile APP, the intelligent query request is sent by calling an intelligent robot; when the query subject of the intelligent query is a management system, the intelligent query request is sent by entering a query description in the management system; The query interface includes at least one preset condition, and each of the at least one preset condition is used to fill in the smart query condition.
8. A cloud resource query device, characterized in that: The cloud resources include cloud resources of various interface types and data formats, and the device includes: A determination module, used to determine the interface types and data formats of multiple cloud resources, and create a target interface based on the interface types and data formats of the multiple cloud resources; wherein the target interface is used to construct a query condition, the query condition includes multiple query dimensions, and the multiple query dimensions cover the interface types and data formats of the multiple source resources; An input module, configured to display at least one query condition input in the human-computer interaction interface in response to a condition input request; wherein the at least one query condition matches the target interface; The query module is used to respond to a confirmation request for the query condition, obtain the query result from the cloud resource based on the target interface, and display the query result through the human-computer interaction interface.
9. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to execute the cloud resource query method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the cloud resource query method according to any one of claims 1 to 7 is executed.