CN109145034B - Resource presentation method and device and computer terminal - Google Patents

Resource presentation method and device and computer terminal Download PDF

Info

Publication number
CN109145034B
CN109145034B CN201710453426.6A CN201710453426A CN109145034B CN 109145034 B CN109145034 B CN 109145034B CN 201710453426 A CN201710453426 A CN 201710453426A CN 109145034 B CN109145034 B CN 109145034B
Authority
CN
China
Prior art keywords
resource
query
infrastructure
resource information
query request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710453426.6A
Other languages
Chinese (zh)
Other versions
CN109145034A (en
Inventor
何贵民
徐召杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201710453426.6A priority Critical patent/CN109145034B/en
Publication of CN109145034A publication Critical patent/CN109145034A/en
Application granted granted Critical
Publication of CN109145034B publication Critical patent/CN109145034B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Abstract

The application discloses a resource presentation method and device and a computer terminal. Wherein, the method comprises the following steps: acquiring a query request, wherein the query request is used for querying resources of a building infrastructure; acquiring resource information corresponding to the query request to obtain a query result; and displaying the resource information in a file form. The method and the device solve the technical problem that the working efficiency is low because the existing resources cannot be checked by the tool in the process of constructing and maintaining the cloud platform by the existing Terraform tool.

Description

Resource presentation method and device and computer terminal
Technical Field
The application relates to the field of computers and the Internet, in particular to a resource presenting method and device and a computer terminal.
Background
With the development of computer and internet technologies, more and more enterprises are gradually starting to build and maintain their own Infrastructure by using "Infrastructure As Code". Currently, many automated building tools have appeared on the market to assist users in the deployment and management of cloud resources, such as Terraform, Ansible, Chef, and so on. The Terraform is an open-source tool for constructing, changing and merging the infrastructure, and a user can define and quickly construct the infrastructure based on codes by means of the Terraform tool.
The terrafrorm tool provides a plurality of commands to manage the infrastructure, including a command "terrform plan" to preview infrastructure resources according to a template and a command "terrafrorm apply" to build the infrastructure. Further, in order to help a user accurately obtain an existing available resource (such as an available area, a mirror image ID, an instance type, and the like) and provide parameters for building the resource, the Terraform tool provides a function data source which can be used for querying the existing resource to the user, but the data source cannot be displayed through a "Terraform plan" command, so that the user cannot know the existing resource before creating the resource, and can make an accurate selection according to the existing resource, sometimes even cannot determine whether the queried resource exists, and often occurs after running the "Terraform application" command, because the created resource is not desired by the user or the resource does not exist, the user has to modify the resource configuration or recreate the resource, and the work efficiency is affected.
Aiming at the problem of low working efficiency caused by the fact that the existing Terraform tool cannot provide and view existing resources in the process of building and maintaining the cloud platform, an effective solution is not provided at present.
Disclosure of Invention
The embodiment of the invention provides a resource presentation method, a resource presentation device and a computer terminal, which are used for at least solving the technical problem of low working efficiency caused by the fact that the existing resources cannot be viewed by the existing Terraform tool in the process of building and maintaining a cloud platform.
According to an aspect of an embodiment of the present invention, there is provided a resource presenting method, including: acquiring a query request, wherein the query request is used for querying resources of a building infrastructure; acquiring resource information corresponding to the query request to obtain a query result; and displaying the resource information in a file form.
According to another aspect of the embodiments of the present invention, there is also provided a resource presenting apparatus, including: the system comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring a query request, and the query request is used for querying resources of a building infrastructure; the second acquisition unit is used for acquiring the resource information corresponding to the query request to obtain a query result; and the output unit is used for displaying the resource information in a file form.
According to an aspect of an embodiment of the present invention, there is provided a resource presenting method, including: acquiring a query request, wherein the query request is used for querying resources of a building infrastructure; calling a data source function in an infrastructure management tool terraform to acquire resource information corresponding to the query request and obtain a query result; and calling a plan instruction in the infrastructure management tool, and displaying the resource information in a file form.
According to another aspect of the embodiments of the present invention, there is also provided a resource presenting apparatus, including: the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring a query request, and the query request is used for querying resources of the construction infrastructure; the first calling module is used for calling a data source function in an infrastructure management tool terraform, acquiring resource information corresponding to the query request and obtaining a query result; and the second calling module is used for calling a plan instruction in the infrastructure management tool and displaying the resource information in a file form.
According to another aspect of the embodiments of the present invention, there is also provided a computer terminal, including: the system comprises at least one first control and a second control, wherein the first control is used for showing a query condition selected by a user, and the query condition is used for generating a query request for querying resources for constructing an infrastructure; the second control is used for displaying the resource information corresponding to the query request; and the third control element is used for displaying the resource information in a file list form.
According to another aspect of the embodiments of the present invention, there is also provided a storage medium, where the storage medium includes a stored program, and when the program runs, the apparatus where the storage medium is located is controlled to execute the resource presenting method.
According to another aspect of the embodiments of the present invention, there is further provided a processor, wherein the processor is configured to execute a program, and the program executes the resource presenting method described above.
According to another aspect of the embodiments of the present invention, there is also provided a system, including: a processor; and a memory coupled to the processor for providing instructions to the processor for processing the following processing steps: acquiring a query request, wherein the query request is used for querying resources of a building infrastructure; acquiring resource information corresponding to the query request to obtain a query result; and displaying the resource information in a file form.
In the embodiment of the invention, the query request is obtained, wherein the query request is used for querying the resources of the building infrastructure; acquiring resource information corresponding to the query request to obtain a query result; the resource information is displayed in a file form, so that the purpose of displaying the resource detail information of one or more resources for constructing the infrastructure so as to be used for quickly selecting the needed resources is achieved, the technical effect of improving the working efficiency of a user is achieved, and the technical problem of low working efficiency caused by the fact that the existing resources cannot be checked by the existing Terraform tool in the process of constructing and maintaining the cloud platform is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention and do not constitute a limitation of the invention. In the drawings:
fig. 1 is a schematic diagram of an alternative cloud service application architecture according to an embodiment of the present invention;
FIG. 2 is a system diagram of resource presentation, according to an embodiment of the present invention;
FIG. 3 is a flow diagram of a method of resource presentation in accordance with an embodiment of the present invention;
FIG. 4 is a flowchart of a method of alternative resource presentation, according to an embodiment of the invention;
FIG. 5 is a flowchart of a method of alternative resource presentation, according to an embodiment of the invention;
FIG. 6 is a flowchart of a method of alternative resource presentation, according to an embodiment of the invention;
FIG. 7 is a flowchart of a method of alternative resource presentation, according to an embodiment of the invention;
FIG. 8 is a flowchart of a method of alternative resource presentation, according to an embodiment of the invention;
FIG. 9 is a schematic diagram of a resource rendering apparatus according to an embodiment of the present application;
FIG. 10 is a flow diagram of a method of resource presentation according to an embodiment of the present application;
FIG. 11 is a schematic diagram of a resource presentation device according to an embodiment of the application;
FIG. 12 is an interface schematic of an alternative computer terminal according to embodiments of the present application; and
fig. 13 is a block diagram of a hardware structure of a computer terminal according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
First, some terms or terms appearing in the description of the embodiments of the present application are applicable to the following explanations:
terraform, an open source tool for building, modifying, and consolidating cloud infrastructures. The user can define and quickly construct the cloud Infrastructure based on the Code by means of a Terraform tool, so that 'Infrastructure As Code' is realized.
Terraform plan, refers to a command in the Terraform tool to preview infrastructure resources according to a template, which does not change the system, indicates that the resource to be changed is exposed, and after confirmation, implements the change by executing the "Terraform apply" command.
Terrafrorm application, refers to a command in the terrafrorm tool to build the infrastructure.
The data source refers to a database or a database server used by a database application program, and in the terrafrorm tool, in order to help a user accurately obtain an existing available resource (such as an available area, a mirror image ID, an instance type and the like) and provide parameters for building an infrastructure resource, the terrafrorm tool provides the user with a function data source which can be used for inquiring the existing resource.
Example 1
According to the embodiment of the present application, an embodiment of a resource presentation system is provided, and it should be noted that the embodiment may be used in the building of various cloud platforms and the maintenance and management process of infrastructures, for example, AWS based on laaS services, digitaiosean, GCE, OpenStack, Heroku based on PaaS services, cloudfourdry, Atlas based on SaaS, DNSipmple, cloudfaree, and the like. An alternative embodiment may be used in an auxiliary build tool used to build these cloud platforms, such as a Terraform tool. The terrafrorm tool defines the infrastructure through templates, and implements full lifecycle management of resource creation, update, and destruction through instructions.
As an alternative embodiment, fig. 1 is a schematic diagram of an alternative cloud service application architecture according to an embodiment of the present application, and as shown in fig. 1, the cloud service application architecture includes: the resource presentation system provided by the present application may be used in the cloud server 101 shown in fig. 1, and an application architecture of a cloud service provided by the cloud server may be divided into three layers, which are from top to bottom: an application layer, a service layer, and an infrastructure layer; wherein, the application layer comprises the code and the configuration of the application program; the service layer comprises an operating system and system configuration; the infrastructure layer includes: operating system images, VPC, Gateway, Security group, subnet, automation port occupancy configuration (Scaling), base (jumphost), VPN, and the like. Among them, the automation management technologies of the server layer and the application layer are already common, and for example, the automation management technologies can be managed by relatively sophisticated automation configuration software such as Puppet, stable, Chef, and SaltStack. For the management of the infrastructure layer, the terrafrorm tool is currently more common.
The Terraform tool can be used for creating and managing infrastructure resources, and has the following advantages: infrastructure, i.e. code; secondly, deploying the IT infrastructure efficiently and safely; thirdly, continuously changing or iterating the infrastructure; fourthly, template file management is configured, and version control is facilitated; the grammar is simple and the readability is strong; supporting a mainstream virtual environment or cloud service; different virtual environments or cloud services adopt the same workflow; the AWS CloudFormation can be well replaced by the (b); and ninthly, simulating, creating, changing and destroying part or the whole IT infrastructure conveniently. It should be noted here that although AWS CloudFormation can implement AWS infrastructure coding, the CloudFormation template file is complex and prone to error during modification, and as service resources increase, the CloudFormation file becomes very long and is more and more difficult to read.
It should be noted here that one of the greatest advantages of the terrafrorm tool is infrastructure coding, that is, all resources related to the infrastructure layer can be written in a configuration template file, including but not limited to VPC, Gateway, Security group, subnet, automatic port occupation configuration (Scaling), base (jumphost), VPN, ec2, elastic load balance, route53, rds, ses, sns, etc.
It should be further noted that, since the terrafrorm tool supports multiple basic platforms, when different platforms are managed by using the terrafrorm tool, the terrafrorm tool can meet the changing requirements of companies and external environments, and the changes of the architecture and services of the cloud service.
The two most commonly used commands in the terrafrorm tool are the command "terrform plan" to preview infrastructure resources from a template and the command "terrafrorm apply" to build the infrastructure. In order to help a user accurately acquire an existing available resource (such as an available area, an image ID, an instance type, and the like) and provide parameters for building the resource, the Terraform tool provides a function DataSource which can be used for querying the existing resource for the user, but the DataSource cannot be displayed through a "Terraform plan" command, so that the user cannot know the existing resource before creating the resource, and can make an accurate selection according to the existing resource, sometimes even cannot determine whether the queried resource exists, and often occurs after running the "Terraform application" command, and the user has to modify or recreate the resource configuration due to the fact that the created resource is not desired by the user or the resource does not exist, and the work efficiency is affected.
At present, cloud service providers (including AWS, Azure, and the like) supported by existing terramorm tools all realize the data source function facing respective resources, but the data source function is not improved or refined, and only one data source record is output, which increases the possibility of resource creation failure due to the fact that the resource data source is empty. In addition, although some cloud service providers also implement a data source function for part of resources of their cloud platforms, the effect of previewing acquired resources before infrastructure creation still cannot be achieved, and users often do not know whether there is resource information at all in a list or how many sets of resource information.
From the above, the existing Terraform tool has the following disadvantages: firstly, after a plan command is executed, a queried available resource list cannot be displayed to a user, so that when the user refers to a certain available resource through a serial number, detailed information of the available resource is not clear, and details of the referenced resource can be seen only after an application command is executed and the resource is created; the resource list returned by executing the plan command is unordered, and the resource with the front serial number is not always the resource frequently used by the user, so that the user needs to sequentially judge and select the available resource list from beginning to end, time is wasted, and the recommendation and the sequencing for the user cannot be realized; and thirdly, when the user defines the resource template, parameters of each available resource need to be defined in a key value pair mode, if a plurality of parameters of the available resources exist, the operation is very complicated, and a fuzzy query mode is lacked.
Under the service scene, the applicant researches that before the terrafrorm application instruction is executed, the list of available resources is output in a file form through the terrafrorm plan instruction for a user to check, so that the function DataSource provided by the terrafrorm tool for inquiring the existing resources really realizes the functions of helping the user to select and check the resources, reduces the possibility of failure of creating the resources, and improves the working efficiency of the user.
Therefore, as an alternative implementation, a system for resource presentation shown in fig. 2 is proposed, which mainly includes the following two parts: (1) inquiring and acquiring the DataSource of the corresponding resource according to the parameter provided by the user, and performing matching analysis on the DataSource and the existing resource of the user to realize the sequencing of the resource DataSource, recommending the resource frequently used by the user to the front, and facilitating the user to check and quote, wherein under the condition that the user is a new user, the matching analysis can be performed according to the priority of the fuzzy query parameter or the resource parameter priority of the system default, so that the sequencing of the resource DataSource is realized, and the user can check and quote conveniently; (2) the method comprises the steps that a parameter capable of supporting fuzzy query on a plurality of fields is provided for each DataSource, a user does not need to use a fussy key value pair to define the parameter of the DataSource, only needs to separate a plurality of parameter values by using special symbols to serve as the fuzzy query parameter, after a plan command is executed, the simulation query parameter is analyzed into a reasonable key value pair to participate in the query of the DataSource, the priority of the fields in the fuzzy query parameter serves as an influence factor of a final DataSource list sequencing result, and the process of defining the DataSource by the user is greatly simplified.
As shown in fig. 2, a user firstly defines a template for which resources need to be acquired, then runs a Terraform plan command, the Terraform analyzes template parameters including fuzzy query parameters according to the data source of the corresponding function, acquires resource results meeting the user parameters after interacting with a cloud platform, filters the acquired resource results according to the resource ownership condition of the user on the platform and the configuration of the user on the platform and the priority of input parameters, sorts the filtered results to finally generate effective resource data source results, displays the results to the user in a file form, selects a group of resources most meeting the user requirements from the results, writes the result parameters into a variable file variable.
Through the scheme, the following technical effects can be realized: (1) the function of outputting the details of the DataSource is that after executing the plan command, the query result of the DataSource function is stored in a file form, and the user can check the detailed information and the corresponding serial number of the DataSource through the cat command, so that the visibility of the user to the existing resources is increased, and the complexity of selecting the resources by the user is reduced; (2) and acquiring the DataSource of the corresponding resource according to the filtering condition of the user, selecting a group of resources which are most consistent with the use habit of the user from the DataSource, and writing the attribute parameters of the resources into a variable file of Terraform, so that the trouble of selecting the resources by the user is avoided.
It should be noted here that since Terraform is written in Go language, Go language may be used to implement the present application, but the result output may support multiple file formats.
Example 2
According to the embodiment of the present application, an embodiment of a resource presenting method is provided, and the resource presenting method provided in this embodiment may be applied to a cloud service system architecture provided in embodiment 1 of the present application, including but not limited to an application scenario described in embodiment 1 of the present application. It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
At present, although an existing building tool for building and maintaining infrastructure provides a query function for querying existing resources, the resources cannot be displayed before the resources are created, and because a user cannot know which resources exist and cannot select the resources according to the existing resources, the created resources may not be expected resources, and because the resources do not exist, the user may modify the resource configuration or re-create the resources only after an error occurs, which greatly reduces the working efficiency.
In the foregoing application environment, the present application provides a resource presentation method shown in fig. 3, before creating a resource, a list of available resources is output in a form of a file for a user to view, and a purpose of creating a resource can be achieved by selecting according to the output available resource, specifically, fig. 3 is a flowchart of a resource presentation method according to an embodiment of the present application, and as shown in fig. 3, the method includes the following steps:
step S302, obtaining a query request, wherein the query request is used for querying resources of the building infrastructure.
Specifically, in the above steps, the infrastructure resources of the building infrastructure may be infrastructure resources (e.g., regions, available areas, images, instances, etc.) of various cloud platforms, the query request may be a request related to browsing or querying the cloud infrastructure resources through any of the various cloud platforms, or a request related to querying the cloud infrastructure resources in various software tools for building or managing the infrastructure of the cloud platforms, and in an optional embodiment, a request related to querying the cloud infrastructure resources in an open source tool terrafrorm for building and maintaining the cloud infrastructure of various cloud platforms may be used.
Optionally, the cloud platform includes, but is not limited to, a hundredth cloud, an Tencent cloud, and the like.
It should be noted here that, in the Terraform tool, the queried available resource list cannot be presented to the user after executing the plan command, so that when the user refers to a certain available resource by a serial number, the detailed information of the available resource is not clear, and the details of the referenced resource can only be seen after executing the application command and creating the resource. Therefore, the existing terra tools cannot achieve the effect of previewing the acquired resources before the infrastructure is created, and the user often does not know whether there is any resource information in the list and how many groups of resource information exist, so that after the "terra application" command is run, the user has to modify the resource configuration or re-create the resources due to the fact that the created resources are not expected by the user or the resources do not exist, and the work efficiency is affected.
Step S304, acquiring the resource information corresponding to the query request to obtain a query result.
Specifically, in the above step, the resource information may be detailed information of the resource currently acquired according to the query request, including but not limited to a name of the resource, whether the resource exists, whether the resource is available, and the like; after acquiring the query request for querying the resources, acquiring resource information of one or more resources corresponding to the query request. It should be noted that, if there is no resource corresponding to the current query request, the user may be prompted that the resource does not exist, and further, resource information of other related resources that replace the resource may also be prompted.
And step S306, displaying the resource information in a file form.
Specifically, in the above step, the resource information may at least include information such as name information of the resource, whether the resource exists, whether the resource is available, and the like; according to the query request, resource detail information of one or more resources is acquired, and the resource information is displayed in a file form, wherein the file form includes, but is not limited to, word, excel, txt and other formats.
It should be noted that, the solutions disclosed in steps S302 to S306 may visually present infrastructure resources of various cloud platforms, and the presented forms include, but are not limited to, the form of the file, and may also be other forms, as long as the solution related to visually presenting queried infrastructure resources after querying the infrastructure resources of the cloud platform is within the scope of protection of the present application.
In an optional embodiment, the queried resource information of the one or more resources may be displayed in a list form, and optionally, the resource information of the one or more resources may be displayed after being sorted according to a preset priority.
As an alternative embodiment, displaying the resource information in the form of a file may include:
step S3061, converting the resource information into a preset file;
step S3063, displaying the preset file.
Specifically, in the above step, the preset file may include, but is not limited to, word, excel, txt formats, and after one or more cloud infrastructure resources are queried according to a query request for querying infrastructure resources of the cloud platform, resource detail information of the cloud infrastructure resources is converted into the preset file, and then the preset file is displayed.
As can be seen from the above, in the foregoing embodiment of the present application, in the process of deploying and managing cloud resources in a cloud platform, after an inquiry request for inquiring resources of a building infrastructure is obtained, resource information of one or more resources corresponding to the inquiry request is obtained, and after the resource information of one or more resources for building an infrastructure is inquired, the resource information obtained by inquiry is displayed in the form of a file, so that a user can obtain detail information of the resources for building the infrastructure by looking up the file. It is easy to note that the query request for querying the resources of the building infrastructure described above may be a direct query request or an indirect query request (e.g., a "Terraform play" command request executed in a terrafrorm tool).
Through the scheme provided by the embodiment 2 of the application, the purpose of displaying the resource detail information of one or more resources for constructing the infrastructure so as to be used for quickly selecting the needed resources is achieved, the technical effect of improving the working efficiency of a user is achieved, and the technical problem that the working efficiency is low due to the fact that the existing resources cannot be checked by the tool in the process of constructing and maintaining the cloud platform by the aid of the existing Terraform tool is solved.
In an alternative embodiment, as shown in fig. 4, before the resource information is presented in the form of a file, the method may further include the following steps:
step S402, filtering the query result according to a first preset rule to obtain filtered resource information;
and S404, sequencing the filtered resource information according to a second preset rule.
Specifically, in the above step, the first preset rule may be a preset default rule, or may be a filtering rule input by a user in a customized manner; the second preset rule may be a preset default rule or a sorting rule input by a user in a self-defined manner.
Optionally, the first preset rule includes, but is not limited to: filtering according to the resource type and filtering according to the resource name.
Optionally, the second preset rule includes, but is not limited to: sorting is performed according to the use frequency and sorting is performed according to the use time.
It should be noted here that, taking a terra ram tool as an example, when a user has a resource, in a process of sequencing resource information of a plurality of acquired resources, as an optional implementation scheme, if the user is an old user and already has a cloud infrastructure resource, the data source of the corresponding resource can be queried and acquired according to parameters provided by the user, and the data source is subjected to matching analysis with the existing resource of the user, so that sequencing of the resource data source is realized, and the resource frequently used by the user is recommended to the front, which is convenient for the user to view and reference; as another optional implementation, if the user is a new user and there is no infrastructure resource of the user for the time being, matching analysis may be performed according to the priority of the fuzzy query parameter or the resource parameter priority of the system default, so as to order the resource datasources, and facilitate the user to view and reference.
By the embodiment, the cloud resources can be filtered and screened, the filtered and screened resource information is displayed after being sorted, the problem that a user searches sequentially is avoided, and the user experience of browsing the resource information by the user is further improved.
In an optional embodiment, in the process of showing the resource details in a file form, the filtered resources can be sorted according to the filtering condition of the user, the more the resources which accord with the habit of the user are arranged at the front position, and the work of searching line by the user is avoided.
In an alternative embodiment, as shown in fig. 5, the filtering the query result according to the first preset rule may include the following steps:
step S502, acquiring historical use records of resources;
step S504, determining the behavior characteristics of the user according to the historical usage record;
step S506, obtaining the query result conforming to the behavior characteristics.
Specifically, in the above step, the historical usage record includes usage of at least one resource obtained according to the query request, and the behavior characteristics of the user are determined according to the usage of each resource, and resource information of at least one resource conforming to the behavior characteristics is output.
Through the embodiment, the purpose that a group of resources which best meet the selection habit of the user is recommended to the user according to the past use habit of the user is achieved.
In order to avoid the tedious operation of inputting the query condition by the user, the user may determine the query request for building at least one resource of the infrastructure by clicking on the selected query condition, in an alternative embodiment, as shown in fig. 6, the obtaining the query request may include the following steps:
step S602, receiving a selection instruction of at least one query condition on an operation interface of the infrastructure management tool;
step S604, generating a query request according to the query condition selected by the selection instruction.
Specifically, in the above step, the infrastructure management tool may be an application or a Web-based service for managing cloud resources of each cloud platform. The operation interface can be an interface used for managing cloud resources on an application program or a Web-based service. Because the dependency relationship between cloud resources is complex, effective resources cannot be quickly and accurately filtered by using some simple conditions, and certain difficulty is brought to the user to construct infrastructure, the query request for querying the resources can be generated according to one or more query conditions selected by the user through the above steps S602 and S604.
Through the embodiment, the user experience is further improved.
In an alternative embodiment, the infrastructure management tool may include: a terraform tool; displaying the resource information in a file form, wherein the displaying comprises the following steps: step S3065, execute the plan command provided by the terraform tool to present the resource information.
Specifically, in the above steps, the terraform tool is an open source tool supporting various cloud platforms for building, changing and merging infrastructures; the plan command is a command used by a terraform tool for previewing infrastructure resources according to a template; after receiving the plan command in the terraform tool, the infrastructure resources are displayed in a file form, so that a user cannot know the existing resources before creating the resources, and can accurately select the existing resources.
Through the embodiment, mapping of cloud resources from code definition to infrastructure resources is realized by using the terraform basic function (database function) and the plan command, and a convenient channel is provided for a user to quickly construct a cloud platform infrastructure.
In an alternative embodiment, obtaining the resource information corresponding to the query request, as shown in fig. 7, includes:
step S702, acquiring a query parameter corresponding to the query request, wherein the query parameter is a parameter supporting fuzzy query of a plurality of parameter values;
step S704, searching for resource information corresponding to the query parameter according to the query parameter.
Specifically, in the above step, taking the function of the DataSource of the terraform tool as an example, a parameter capable of supporting fuzzy query on a plurality of fields is provided for each DataSource, a user does not need to use a cumbersome key value pair to define the parameter of the DataSource, only needs to separate a plurality of parameter values by using special symbols as the fuzzy query parameter, a plan command is then parsed into a reasonable key value pair to participate in the query of the DataSource, the priority of each field in the fuzzy query parameter is used as an influence factor of a final DataSource list sorting result, and the process of defining the DataSource by the user is greatly simplified.
In an alternative embodiment, as shown in fig. 8, after obtaining the resource information corresponding to the query request and obtaining the query result, the method may further include the following steps:
step S802, writing the resource information into the variable file for calling.
Specifically, in the above steps, after the resource detail information of one or more resources is acquired according to the query request, the resource information of each resource acquired by the query is written into the called variable file, so that the trouble of selecting resources by the user can be avoided.
Through the embodiment, the resource information (for example, each query parameter of the DataSource) of each resource obtained through query is written into the variable file, so that a user can directly construct the infrastructure without searching after obtaining the resource.
It should be noted here that, by applying the above embodiments of the present application to the terraform tool, the function of the database in the terraform tool can be completed, the available resource list is comprehensively and accurately displayed to the user before the infrastructure is built in a file manner, and a group of resources that best meets the use habit of the user is selected from the acquired resources according to the behavior of the user and recommended to the user, so that the trouble of selecting the resources by the user is avoided.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method for resource presentation according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
Example 3
According to an embodiment of the present application, there is further provided an apparatus embodiment for implementing the resource presenting method in embodiment 2, where fig. 9 is a schematic diagram of a resource presenting apparatus according to an embodiment of the present application, and as shown in fig. 9, the apparatus includes: a first acquisition unit 901, a second acquisition unit 903, and an output unit 905.
The first obtaining unit 901 is configured to obtain a query request, where the query request is used to query resources of a building infrastructure;
a second obtaining unit 903, configured to obtain resource information corresponding to the query request to obtain a query result;
the output unit 905 is configured to display the resource information in a file form.
It should be noted here that the first acquiring unit 901, the second acquiring unit 903 and the output unit 905 correspond to steps S302 to S306 in embodiment 2, and the modules are the same as the examples and application scenarios realized by the corresponding steps, but are not limited to the disclosure in embodiment 2. It should be noted that the modules described above as part of an apparatus may be implemented in a computer system such as a set of computer-executable instructions.
As can be seen from the above, in the foregoing embodiment of the present application, in the process of deploying and managing cloud resources in a cloud platform, the first obtaining unit 901 obtains an inquiry request for inquiring resources of a building infrastructure, the second obtaining unit 903 obtains resource information of one or more resources corresponding to the inquiry request, and after inquiring the resource information of one or more resources for building an infrastructure, the output unit 905 displays the inquired resource information in the form of a file, so that a user can obtain detailed information of the resources for building the infrastructure by looking up the file. It is easy to note that the query request for querying the resources of the building infrastructure described above may be a direct query request or an indirect query request (e.g., a "Terraform play" command request executed in a terrafrorm tool).
Through the scheme provided by the embodiment 3 of the application, the purpose of displaying the resource detail information of one or more resources for constructing the infrastructure so as to be used for quickly selecting the needed resources is achieved, the technical effect of improving the working efficiency of a user is achieved, and the technical problem that the working efficiency is low due to the fact that the existing resources cannot be checked by the tool in the process of constructing and maintaining the cloud platform by the aid of the existing Terraform tool is solved.
In an optional embodiment, the apparatus further comprises: the filtering unit is used for filtering the query result according to a first preset rule to obtain filtered resource information; and the sorting unit is used for sorting the filtered resource information according to a second preset rule.
It should be noted here that the filtering unit and the sorting unit correspond to steps S402 to S404 in embodiment 2, and the modules are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of embodiment 2. It should be noted that the modules described above as part of an apparatus may be implemented in a computer system such as a set of computer-executable instructions.
In an alternative embodiment, the filter unit comprises: a third obtaining unit, configured to obtain a history usage record of the resource; the determining unit is used for determining the behavior characteristics of the user according to the historical usage record; and the fourth acquisition unit is used for acquiring the query result conforming to the behavior characteristics.
It should be noted here that the third acquiring unit, the determining unit and the fourth acquiring unit correspond to steps S502 to S506 in embodiment 2, and the modules are the same as the examples and application scenarios realized by the corresponding steps, but are not limited to the disclosure of embodiment 2. It should be noted that the modules described above as part of an apparatus may be implemented in a computer system such as a set of computer-executable instructions.
In an optional embodiment, the first obtaining unit includes: the receiving unit is used for receiving a selection instruction of at least one query condition on an operation interface of the infrastructure management tool; and the generating unit is used for generating the query request according to the query condition selected by the selecting instruction.
It should be noted here that the receiving unit and the generating unit correspond to steps S602 to S604 in embodiment 2, and the modules are the same as the examples and application scenarios realized by the corresponding steps, but are not limited to the disclosure in embodiment 2. It should be noted that the modules described above as part of an apparatus may be implemented in a computer system such as a set of computer-executable instructions.
In an alternative embodiment, the infrastructure management tool comprises: a terraform tool; the output unit includes: and the execution unit is used for executing the plan command provided by the terraform tool so as to show the resource information.
It should be noted that the execution unit corresponds to step S3061 in embodiment 2, and the modules are the same as the examples and application scenarios realized by the corresponding steps, but are not limited to the disclosure of embodiment 2. It should be noted that the modules described above as part of an apparatus may be implemented in a computer system such as a set of computer-executable instructions.
In an optional embodiment, the second obtaining unit includes: a fifth obtaining unit, configured to obtain a query parameter corresponding to the query request, where the query parameter is a parameter that supports fuzzy query on multiple parameter values; and the searching unit is used for searching the resource information corresponding to the query parameter according to the query parameter.
It should be noted here that the fifth acquiring unit and the searching unit correspond to steps S702 to S704 in embodiment 2, and the modules are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of embodiment 2. It should be noted that the modules described above as part of an apparatus may be implemented in a computer system such as a set of computer-executable instructions.
In an optional embodiment, the apparatus further comprises: and the writing unit is used for writing the resource information into the variable file for calling.
It should be noted here that the writing unit corresponds to step S802 in embodiment 2, and the modules are the same as the examples and application scenarios realized by the corresponding steps, but are not limited to the disclosure of embodiment 2. It should be noted that the modules described above as part of an apparatus may be implemented in a computer system such as a set of computer-executable instructions.
Example 4
According to the embodiment of the present application, an embodiment of a resource presenting method is provided, and the resource presenting method provided in this embodiment may be applied to a cloud service system architecture provided in embodiment 1 of the present application, including but not limited to an application scenario described in embodiment 1 of the present application. It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
The present application provides a resource presenting method shown in fig. 10, which is applied to a terraform tool, and fig. 10 is a flowchart of a method for acquiring a verification code according to an embodiment of the present application, as shown in fig. 10, including the following steps:
step S102, obtaining a query request, wherein the query request is used for querying resources of infrastructure construction;
step S104, calling a data source function in an infrastructure management tool terraform, acquiring resource information corresponding to the query request, and obtaining a query result;
and step S106, calling a plan instruction in the infrastructure management tool, and displaying the resource information in a file form.
Specifically, in the above steps, the infrastructure management tool Terraform is an open source tool for building and maintaining cloud infrastructure of various cloud platforms, the query request may be a request for querying cloud infrastructure resources in an infrastructure management tool Terraform for building or managing infrastructure of a cloud platform, after receiving the request for querying cloud infrastructure resources, a data source function in the infrastructure management tool Terraform is called, and resource information of one or more resources corresponding to the query request is acquired, and after a user executes a place instruction in the infrastructure management tool Terraform, the resource detail information of the queried one or more resources is displayed in a file form, where the data source function is a function provided in the Terraform tool for querying an existing resource, so that the user can accurately acquire an existing available resource (such as an available area, mirror ID, instance type, etc.) and provide parameters for building infrastructure resources.
As can be seen from the above, in the above embodiment of the present application, the terraform is used to deploy and manage the cloud resources of the cloud platform, after an inquiry request for inquiring the resources of the infrastructure is obtained, the resource information of one or more resources corresponding to the inquiry request is obtained, the resource information of one or more resources used for constructing the infrastructure is inquired by invoking a data source function of the terraform tool, and finally, the inquired resource information is displayed in a file form by using a plan instruction, so that a user can obtain the detailed information of the resources used for constructing the infrastructure by looking up the file.
Through the scheme provided by the embodiment 4 of the application, the purpose of displaying the resource detail information of one or more resources for constructing the infrastructure so as to be used for quickly selecting the needed resources is achieved, the technical effect of improving the working efficiency of a user is achieved, and the technical problem that the working efficiency is low due to the fact that the existing resources cannot be checked by the tool in the process of constructing and maintaining the cloud platform by the aid of the existing Terraform tool is solved.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method for resource presentation according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
Example 5
According to an embodiment of the present application, there is further provided an apparatus embodiment for implementing the method for resource presentation in embodiment 4, where fig. 11 is a schematic diagram of an apparatus for resource presentation according to an embodiment of the present application, and as shown in fig. 11, the apparatus includes: an acquisition module 111, a first calling module 113, and a second calling module 115.
The obtaining module 111 is configured to obtain a query request, where the query request is used to query resources of a building infrastructure;
the first calling module 113 is configured to call a data source function in an infrastructure management tool terraform, obtain resource information corresponding to the query request, and obtain a query result;
and a second calling module 115, configured to call a plan instruction in the infrastructure management tool, and show the resource information in the form of a file.
It should be noted here that the acquiring module 111, the first invoking module 113, and the second invoking module 115 correspond to steps S102 to S106 in embodiment 4, and the modules are the same as the corresponding steps in the implementation example and application scenarios, but are not limited to the disclosure in embodiment 1. It should be noted that the modules described above as part of an apparatus may be implemented in a computer system such as a set of computer-executable instructions.
As can be seen from the above, in the above embodiments of the present application, cloud resources of a cloud platform are deployed and managed by terraform, an inquiry request for inquiring resources of a building infrastructure is acquired by the acquisition module 111, a data source function of the terraform tool is called by the first calling module 113 to inquire resource information of one or more resources used for building the infrastructure, and finally the second calling module 115 calls a plan instruction in the terraform tool to display the resource information obtained by inquiry in a form of a file, so that a user can acquire details of the resources used for building the infrastructure by looking at the file.
Through the scheme provided by the embodiment 5 of the application, the purpose of displaying the resource detail information of one or more resources for constructing the infrastructure so as to be used for quickly selecting the needed resources is achieved, the technical effect of improving the working efficiency of a user is achieved, and the technical problem that the working efficiency is low due to the fact that the existing resources cannot be checked by the tool in the process of constructing and maintaining the cloud platform by the aid of the existing Terraform tool is solved.
Example 6
According to an embodiment of the present application, an embodiment of a computer terminal is further provided, fig. 12 is an interface schematic diagram of a computer terminal according to an embodiment of the present application, and as shown in fig. 12, the computer terminal provides a human-computer interaction interface, where the human-computer interaction interface includes: at least one first control 121, a second control 123, and a third control 125.
The at least one first control 121 is configured to present a query condition for a user to select, where the query condition is used to generate a query request for querying resources used for building an infrastructure;
a second control 123, configured to display resource information corresponding to the query request;
and a third control element 125, configured to display the resource information in a file list.
Specifically, the computer terminal may be used to build and manage a server of various cloud infrastructure resources, the server is installed with an auxiliary building tool (e.g., a terrafrorm tool) for building and managing various cloud infrastructure resources, the human-computer interaction interface may be an operation interface in the auxiliary building tool, a plurality of controls (i.e., first controls 121) for showing query conditions are provided in the interface, and a user may select one or more of the first controls 121 to implement selection of the query conditions to generate a query request for querying resources for building an infrastructure; the second control 123 may be configured to present each queried resource of the building infrastructure, and the third control 125 may be configured to present all the resources in a file list, and optionally, a presentation order of the resources (for example, a file a, a file b, a file c, and a file d shown in fig. 12) in the third control 125 may be obtained by sorting according to a certain priority.
Optionally, each of the first controls 121 may further include a plurality of sub-controls, configured to select a plurality of sub-query conditions; optionally, the list displayed in the third control element 125 includes, but is not limited to, the list form shown in fig. 12, and the display manners may also be arranged in other manners, for example, the resource name of each resource is displayed in the form of a list.
As can be seen from the above, in the foregoing embodiment of the present application, in the process of deploying and managing cloud resources in a cloud platform, an inquiry request for inquiring resources of a building infrastructure may be generated by selecting one or more first controls 121, after the inquiry request for inquiring the resources of the building infrastructure is obtained, resource information of one or more resources corresponding to the inquiry request is obtained, and after the resource information of one or more resources of the building infrastructure is inquired, the resource information of each resource obtained by inquiry is respectively displayed on a second control 123, or the resource information of all resources obtained by inquiry is displayed on a third control 125 in the form of a file list, so that a user may obtain detail information of the resources for building the infrastructure by viewing the file. It is easy to note that the query request for querying the resources of the building infrastructure described above may be a direct query request or an indirect query request (e.g., a "Terraform play" command request executed in a terrafrorm tool).
Through the scheme provided by the embodiment 6 of the application, the purpose of displaying the resource detail information of one or more resources for constructing the infrastructure so as to be used for quickly selecting the needed resources is achieved, the technical effect of improving the working efficiency of a user is achieved, and the technical problem that the working efficiency is low due to the fact that the existing resources cannot be checked by the tool in the process of constructing and maintaining the cloud platform by the aid of the existing Terraform tool is solved.
Example 7
The embodiment of the application can provide a computer terminal, and the computer terminal can be any one computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal may also be replaced with a terminal device such as a mobile terminal.
Optionally, in this embodiment, the computer terminal may be located in at least one access device of a plurality of network devices of a computer network.
Fig. 13 shows a block diagram of a hardware configuration of a computer terminal. As shown in fig. 13, computer terminal 13 may include one or more (shown as 132a, 132b, … …, 132 n) processors 132 (processor 132 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 134 for storing data, and a transmission device 136 for communication functions. Besides, the method can also comprise the following steps: a display, an input/output interface (I/O interface), a Universal Serial Bus (USB) port (which may be included as one of the ports of the I/O interface), a network interface, a power source, and/or a camera. It will be understood by those skilled in the art that the structure shown in fig. 13 is only an illustration and is not intended to limit the structure of the electronic device. For example, computer terminal 13 may also include more or fewer components than shown in FIG. 13, or have a different configuration than shown in FIG. 13.
It should be noted that the one or more processors 132 and/or other data processing circuitry described above may be referred to generally herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part in software, hardware, firmware, or any combination thereof. Furthermore, the data processing circuit may be a single stand-alone processing module, or incorporated in whole or in part into any of the other elements in the computer terminal 13. As referred to in the embodiments of the application, the data processing circuit acts as a processor control (e.g. selection of a variable resistance termination path connected to the interface).
The processor 132 may invoke the memory-stored information and the application program via the transmission means to perform the following steps: obtaining at least two types of verification data, wherein the types of verification data include at least one of: text, pictures, animations, and characters; acquiring a verification code obtained by combining at least two types of verification data; and transmitting the verification code to the front-end equipment for displaying, wherein the display areas of different types of verification data are mutually overlapped.
The memory 134 may be used to store software programs and modules of application software, such as program instructions/data storage devices corresponding to the method for resource presentation in the embodiment of the present application, and the processor 132 executes various functional applications and data processing by running the software programs and modules stored in the memory 134, that is, the method for resource presentation of the application program is implemented. The memory 134 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 134 may further include memory located remotely from the processor 132, which may be connected to the computer terminal 13 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 136 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal 13. In one example, the transmission device 136 includes a Network Interface Controller (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device 136 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
The display may be, for example, a touch screen type Liquid Crystal Display (LCD) that may enable a user to interact with the user interface of the computer terminal 13.
It should be noted here that in some alternative embodiments, the computer terminal 13 shown in fig. 13 may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that fig. 13 is only one example of a specific example and is intended to illustrate the types of components that may be present in the computer terminal 13 described above.
In this embodiment, the computer terminal 13 may execute the program code of the following steps in the method for resource presentation of an application program: acquiring a query request, wherein the query request is used for querying resources of a building infrastructure; acquiring resource information corresponding to the query request to obtain a query result; and displaying the resource information in a file form.
The processor can call the information and application program stored in the memory through the transmission device to execute the following steps: acquiring a query request, wherein the query request is used for querying resources of a building infrastructure; acquiring resource information corresponding to the query request to obtain a query result; and displaying the resource information in a file form.
Optionally, the processor may further execute the program code of the following steps: filtering the query result according to a first preset rule to obtain filtered resource information; and sequencing the filtered resource information according to a second preset rule.
Optionally, the processor may further execute the program code of the following steps: acquiring a historical use record of resources; determining the behavior characteristics of the user according to the historical usage record; and acquiring a query result conforming to the behavior characteristics.
Optionally, the processor may further execute the program code of the following steps: receiving a selection instruction of at least one query condition on an operation interface of the infrastructure management tool; and generating a query request according to the query condition selected by the selection instruction.
Optionally, the processor may further execute the program code of the following steps: the infrastructure management tool comprises: a terraform tool; displaying the resource information in a file form, wherein the displaying comprises the following steps: executing the plan command provided by the terraform tool to show the resource information.
Optionally, the processor may further execute the program code of the following steps: acquiring a query parameter corresponding to the query request, wherein the query parameter is a parameter supporting fuzzy query of a plurality of parameter values; and searching the resource information corresponding to the query parameters according to the query parameters.
Optionally, the processor may further execute the program code of the following steps: and writing the resource information into a variable file for calling.
It can be understood by those skilled in the art that the structure shown in fig. 13 is only an illustration, and the computer terminal may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palmtop computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 13 is a diagram illustrating a structure of the electronic device. For example, the computer terminal 13 may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 13, or have a different configuration than shown in FIG. 13.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
Example 8
According to the embodiment of the application, a storage medium is also provided. Optionally, in this embodiment, the storage medium may be configured to store program codes executed by the method for resource presentation provided in embodiment 2.
Optionally, in this embodiment, the storage medium may be located in any one of computer terminals in a computer terminal group in a computer network, or in any one of mobile terminals in a mobile terminal group.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: acquiring a query request, wherein the query request is used for querying resources of a building infrastructure; acquiring resource information corresponding to the query request to obtain a query result; and displaying the resource information in a file form.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: acquiring a query request, wherein the query request is used for querying resources of a building infrastructure; acquiring resource information corresponding to the query request to obtain a query result; and displaying the resource information in a file form.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: filtering the query result according to a first preset rule to obtain filtered resource information; and sequencing the filtered resource information according to a second preset rule.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: acquiring a historical use record of resources; determining the behavior characteristics of the user according to the historical usage record; and acquiring a query result conforming to the behavior characteristics.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: receiving a selection instruction of at least one query condition on an operation interface of the infrastructure management tool; and generating a query request according to the query condition selected by the selection instruction.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: the infrastructure management tool comprises: a terraform tool; displaying the resource information in a file form, wherein the displaying comprises the following steps: executing the plan command provided by the terraform tool to show the resource information.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: acquiring a query parameter corresponding to the query request, wherein the query parameter is a parameter supporting fuzzy query of a plurality of parameter values; and searching the resource information corresponding to the query parameters according to the query parameters.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: and writing the resource information into a variable file for calling.
Example 9
According to an embodiment of the present application, there is also provided a system, including: a processor; and a memory coupled to the processor for providing instructions to the processor for processing the following processing steps:
acquiring a query request, wherein the query request is used for querying resources of a building infrastructure; acquiring resource information corresponding to the query request to obtain a query result; and displaying the resource information in a file form.
As can be seen from the above, in the foregoing embodiment of the present application, in the process of deploying and managing cloud resources in a cloud platform, after an inquiry request for inquiring resources of a building infrastructure is obtained, resource information of one or more resources corresponding to the inquiry request is obtained, and after the resource information of one or more resources for building an infrastructure is inquired, the resource information obtained by inquiry is displayed in the form of a file, so that a user can obtain detail information of the resources for building the infrastructure by looking up the file. It is easy to note that the query request for querying the resources of the building infrastructure described above may be a direct query request or an indirect query request (e.g., a "Terraform play" command request executed in a terrafrorm tool).
Through the scheme provided by the embodiment 9 of the application, the purpose of displaying the resource detail information of one or more resources for constructing the infrastructure so as to be used for quickly selecting the needed resources is achieved, the technical effect of improving the working efficiency of a user is achieved, and the technical problem that the working efficiency is low due to the fact that the existing resources cannot be checked by the tool in the process of constructing and maintaining the cloud platform by the aid of the existing Terraform tool is solved.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (14)

1. A method for resource presentation, comprising:
in the process of building an infrastructure by using an automatic building tool, acquiring a query request, wherein the query request is used for querying resources for building the infrastructure;
acquiring resource information corresponding to the query request to obtain a query result, wherein the resource information at least comprises a resource name, whether the resource exists or not and whether the resource is available or not;
and displaying the resource information in a file form.
2. The method of claim 1, wherein before presenting the resource information in the form of a file, the method further comprises:
filtering the query result according to a first preset rule to obtain filtered resource information;
and sequencing the filtered resource information according to a second preset rule.
3. The method of claim 1, wherein filtering the query result according to a first preset rule comprises:
acquiring a historical use record of the resource;
determining the behavior characteristics of the user according to the historical usage record;
and acquiring a query result conforming to the behavior characteristics.
4. The method of claim 1, wherein obtaining a query request comprises:
receiving a selection instruction of at least one query condition on an operation interface of the infrastructure management tool;
and generating the query request according to the query condition selected by the selection instruction.
5. The method of claim 4,
the infrastructure management tool comprises: a terraform tool;
displaying the resource information in a file form, including: executing a plan command provided by the terraform tool to show the resource information.
6. The method of claim 5, wherein obtaining resource information corresponding to the query request comprises:
acquiring a query parameter corresponding to the query request, wherein the query parameter is a parameter supporting fuzzy query of a plurality of parameter values;
and searching the resource information corresponding to the query parameter according to the query parameter.
7. The method of claim 1, wherein after obtaining the resource information corresponding to the query request and obtaining the query result, the method further comprises:
and writing the resource information into a variable file for calling.
8. A resource rendering apparatus, comprising:
the system comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring a query request in the process of building the infrastructure by using an automatic building tool, and the query request is used for querying resources for building the infrastructure;
a second obtaining unit, configured to obtain resource information corresponding to the query request, and obtain a query result, where the resource information at least includes a name of a resource, whether the resource exists, and whether the resource is available;
and the output unit is used for displaying the resource information in a file form.
9. A method for resource presentation, comprising:
in the process of building the infrastructure by using the automatic building tool, acquiring a query request, wherein the query request is used for querying resources of the building infrastructure;
calling a data source function in an infrastructure management tool terraform, acquiring resource information corresponding to the query request, and obtaining a query result, wherein the resource information at least comprises a resource name, whether the resource exists or not, and whether the resource is available or not;
and calling a plan instruction in the infrastructure management tool, and displaying the resource information in a file form.
10. A resource rendering apparatus, comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a query request in the process of building the infrastructure by using an automatic building tool, and the query request is used for querying resources for building the infrastructure;
the first calling module is used for calling a data source function in an infrastructure management tool terraform, acquiring resource information corresponding to the query request and obtaining a query result, wherein the resource information at least comprises a resource name, whether the resource exists or not and whether the resource is available or not;
and the second calling module is used for calling a plan instruction in the infrastructure management tool and displaying the resource information in a file form.
11. A computer terminal for providing a human-computer interaction interface, the human-computer interaction interface comprising:
the system comprises at least one first control and a second control, wherein the first control is used for showing a query condition selected by a user in the process of building the infrastructure by utilizing an automatic building tool, and the query condition is used for generating a query request for querying resources for building the infrastructure;
the second control is used for displaying resource information corresponding to the query request, wherein the resource information at least comprises the name of the resource, whether the resource exists or not and whether the resource is available or not;
and the third control element is used for displaying the resource information in a file list form.
12. A storage medium, characterized in that the storage medium comprises a stored program, wherein when the program runs, a device in which the storage medium is located is controlled to execute the resource presenting method according to any one of claims 1 to 7.
13. A processor, configured to run a program, wherein the program when running performs the resource presentation method of any one of claims 1 to 7.
14. A computer system, comprising:
a processor; and
a memory coupled to the processor for providing instructions to the processor for processing the following processing steps: in the process of building an infrastructure by using an automatic building tool, acquiring a query request, wherein the query request is used for querying resources for building the infrastructure; acquiring resource information corresponding to the query request to obtain a query result, wherein the resource information at least comprises a resource name, whether the resource exists or not and whether the resource is available or not; and displaying the resource information in a file form.
CN201710453426.6A 2017-06-15 2017-06-15 Resource presentation method and device and computer terminal Active CN109145034B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710453426.6A CN109145034B (en) 2017-06-15 2017-06-15 Resource presentation method and device and computer terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710453426.6A CN109145034B (en) 2017-06-15 2017-06-15 Resource presentation method and device and computer terminal

Publications (2)

Publication Number Publication Date
CN109145034A CN109145034A (en) 2019-01-04
CN109145034B true CN109145034B (en) 2022-05-06

Family

ID=64830153

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710453426.6A Active CN109145034B (en) 2017-06-15 2017-06-15 Resource presentation method and device and computer terminal

Country Status (1)

Country Link
CN (1) CN109145034B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110096258A (en) * 2019-04-30 2019-08-06 山东浪潮云信息技术有限公司 A method of the OpenStack infrastructure architecture management based on Terraform
CN112115165A (en) * 2019-06-21 2020-12-22 北京京东振世信息技术有限公司 Data processing method and device
CN110750333A (en) * 2019-10-25 2020-02-04 浪潮云信息技术有限公司 Full life cycle management method for cloud service factory platform
CN110764864A (en) * 2019-10-25 2020-02-07 北京浪潮数据技术有限公司 Terraform-based visual resource arrangement method
CN112860780A (en) * 2021-03-30 2021-05-28 中国工商银行股份有限公司 Data export method and device and terminal equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103688251A (en) * 2011-05-09 2014-03-26 梅塔克劳德公司 Composite public cloud, method and system
CN103733194A (en) * 2011-01-27 2014-04-16 康姆普特奈科斯特有限公司 Dynamically organizing cloud computing resources to facilitate discovery
CN105208050A (en) * 2014-06-10 2015-12-30 江苏真云计算科技有限公司 Data access method based on cloud computing environment
CN106465387A (en) * 2014-06-02 2017-02-22 高通股份有限公司 Discovery of multi-hop capabilities and routing on a per link basis
CN106462461A (en) * 2014-05-06 2017-02-22 瑞典爱立信有限公司 System, device and methods for billing user for their consumption of mobile broadband services and virtualized cloud resources

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5224851B2 (en) * 2008-02-27 2013-07-03 インターナショナル・ビジネス・マシーンズ・コーポレーション Search engine, search system, search method and program
US9117225B2 (en) * 2011-09-16 2015-08-25 Visa International Service Association Apparatuses, methods and systems for transforming user infrastructure requests inputs to infrastructure design product and infrastructure allocation outputs
US20130111027A1 (en) * 2011-10-31 2013-05-02 Dejan S. Milojicic Accessing physical resources in a cloud computing environment
US20140344266A1 (en) * 2013-05-17 2014-11-20 Broadcom Corporation Device information used to tailor search results
CN104429121B (en) * 2013-05-29 2018-12-14 华为技术有限公司 The method and platform commenced business in the cloud system of base station
CN106612318A (en) * 2016-04-29 2017-05-03 四川用联信息技术有限公司 Cloud resource searching method in cloud computing
CN106202409A (en) * 2016-07-11 2016-12-07 深圳市创凯智能股份有限公司 Resource search method, Apparatus and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103733194A (en) * 2011-01-27 2014-04-16 康姆普特奈科斯特有限公司 Dynamically organizing cloud computing resources to facilitate discovery
CN103688251A (en) * 2011-05-09 2014-03-26 梅塔克劳德公司 Composite public cloud, method and system
CN106462461A (en) * 2014-05-06 2017-02-22 瑞典爱立信有限公司 System, device and methods for billing user for their consumption of mobile broadband services and virtualized cloud resources
CN106465387A (en) * 2014-06-02 2017-02-22 高通股份有限公司 Discovery of multi-hop capabilities and routing on a per link basis
CN105208050A (en) * 2014-06-10 2015-12-30 江苏真云计算科技有限公司 Data access method based on cloud computing environment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
支持多维查找的资源共享设计;李钊伟等;《计算机应用研究》;20130715(第07期);第242-245页 *

Also Published As

Publication number Publication date
CN109145034A (en) 2019-01-04

Similar Documents

Publication Publication Date Title
CN109145034B (en) Resource presentation method and device and computer terminal
US11132114B2 (en) Method and apparatus for generating customized visualization component
CN105354025A (en) Service model configuration system and method based on mobile application
CN111198973A (en) Service visualization processing method and device based on domain model
CN111708557B (en) Method, device and storage medium for updating configuration file
CN109636301A (en) Workflow configuration method, system, terminal and the readable storage medium storing program for executing of financial business
CN104217169A (en) Encryption recommendation method and device and terminal
CN105718517A (en) Webpage display control method and system, and application server
CN113312083B (en) Application generation method, device and equipment
CN110738038A (en) Contract text generation method, device, equipment and computer readable storage medium
CN110941428A (en) Website creation method and device
CN104156240A (en) Client skin template changing method and device, client and electronic device
CN108874808A (en) A kind of page elements interlock method, device and server
CN110941634A (en) Data processing method and device, storage medium and electronic device
CN106610856B (en) Page control setting method and device
CN111026047B (en) Software configuration method and device
CN112486952A (en) Flow creation method, system, storage medium and electronic device
CN112559576A (en) Data display method, system, device, storage medium and electronic equipment
CN106528066B (en) Business process operation method and device
CN109213782B (en) Search interface configuration and display method and device and communication equipment
CN112947954A (en) Interface updating method and device and storage medium
CN114070741B (en) Topology graph generation method, system, equipment and storage medium
CN112511321B (en) Method and device for configuring 5G core network
CN110611817B (en) Image compression based on text image content
CN113127791A (en) Operation page configuration method, system, device and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant