EP-3877847-B1 - AUTOMATED COMMAND ASSISTANCE FOR A CLOUD SERVICE
Inventors
- MOGHADDAM, Roshanak Zilouchian
- SUNDARESAN, NEELAKANTAN
- SHAVER, JASON
Dates
- Publication Date
- 20260506
- Application Date
- 20191030
Claims (11)
- A computer-implemented method, comprising: providing a plurality of templates representing commands to manage a resource of a cloud service, a template including a plurality of fields associated with syntax of a group command, the group command being associated with multiple sub-commands, the plurality of fields comprising a field identifying search indices of the multiple sub-commands associated with the group command; setting a weight to each of the search indices; receiving, from a client device, a query for syntax of a first group command from a command line interface associated with the cloud service; utilizing (504) a weighted full-text search on the plurality of templates to determine at least one relevant template to the first group command, wherein the weighted full-text search determines the at least one relevant template based on a relevance score generated based on the weights set to the search indices; generating (508) at least one example of the syntax of the first group command based on the at least one relevant template, and returning (510) the generated at least one example back to the client device.
- The method of claim 1, wherein the command line interface operates under a browser of the client device.
- The method of claim 1, further comprising: generating a relevance score for each of the one or more search indices of a template; and ranking the scored templates based on the relevance score.
- The method of claim 1, further comprising: monitoring commands used on the cloud service; and determining a set of one or more frequently-used group commands.
- The method of claim 4, further comprising: generating the plurality of templates for the one or more frequently-used group commands from user documentation and/or script code.
- The method of claim 1, further comprising: obtaining a default value for a parameter of the at least one example from historical usage patterns of the group command or user documentation.
- The method of claim 1, further comprising: obtaining a personalized value for a parameter of the at least one example from a current resource setting of the cloud service.
- The method of claim 1, wherein each template represents a different syntax usage pattern with a unique combination of subcommands and/or parameters and/or parameter values of a group command.
- The method of claim 1, wherein the one or more weights are specified in a configuration file.
- The method of claim 1, wherein one of the plurality of fields contains a URL link to additional information about the respective command.
- A system, comprising: at least one processor and a memory; wherein the at least one processor is configured to perform a method according to one of claims 1 to 10.
Description
BACKGROUND A command line interface is a user interface in which a user enters commands in the form of a string of text characters. The command line interface is a text-based interface in which the commands are manually typed. The command line interface accepts commands in a designated input field which are then executed by a command line interpreter. This type of user interface is advantageous over a graphical user interface (GUI) where a user uses a mouse or fingers to click images of icons to access files or programs and/or to execute various operations. The command line interface is faster and more efficient than a GUI since it is composable, that is several tasks can be specified in a single text string thereby eliminating numerous interactions with the GUI. The use of a command line interface requires a user to be familiar with the commands supported by the command line interface and the correct syntax of the commands. The availability of good reference documentation for the commands may be limited. This is often a problem where there are a large number of commands with various sub-commands and parameters which may be used in numerous ways. US 2017/0270091 A1 relates to a system and method for processing command line interface (CLI) commands of a CLI-based application, which include a help-like function to expose usage information of the CLI commands, use a database of CLI usage information to search for at least partial match to user query without user input to call the help- like function of CLI commands. As a result, at least one candidate CLI command from the CLI commands that corresponds to the at least partial match is selected and presented on a user interface for user selection to execute a CLI command. US 2018/0006885 A1 describes an approach for processing command line templates for database queries. A method pertaining to such approach may include retrieving a set of command line templates based upon command line information received from a plurality of respective clients in a computing environment. The method further may include receiving a command line query from a first client among the plurality of respective clients and searching the set of command line templates based upon contents of the command line query. The method further may include transmitting to the first client at least one command line recommendation based upon the search. In an embodiment, retrieving the set of command line templates according to the method may include receiving from a centralized server at least one update with respect to the set of command line templates. SUM MARY It is the object of the present invention to provide an improved command assistance for a client device. This object is solved by the subject matter of the independent claims which define the present invention. Preferred embodiments of the present invention are defined by the dependent claims. A command assistance tool is provided for a browser-enabled command line interface of a cloud service. The command assistance tool learns the syntax of a command from usage patterns found in telemetric data, scripts and user documentation and forms templates based on the usage patterns. There may be several templates for a command where each template represents a different usage pattern with a unique combination of subcommands and/or parameters and/or parameter values. The templates are used to generate examples that respond to a user query for assistance in using a particular command. A weighted elastic search is used to search for templates having a close similarity to fields in the template with the target command at issue. The templates are then used to format examples of the usage of a command which is sent back to the user. These and other features and advantages will be apparent from a reading of the following detailed description and a review of the associated drawings. It is to be understood that both the foregoing general description and the following detailed description are explanatory only and are not restrictive of aspects as claimed. BRIEF DESCRIPTION OF DRAWINGS Fig. 1 illustrates an exemplary system for an automated command assistance of a cloud shell.Figs. 2A - 2C are schematic diagrams illustrating exemplary command interactions in the cloud shell.Figs. 3A - 3B illustrate exemplary templates representing a command usage pattern formatted as a JSON object.Fig. 4 is a flow diagram illustrating an exemplary method used to generate the templates.Fig. 5 is a flow diagram illustrating an exemplary method used to generate examples from one or more templates associated with a requested command.Fig. 6 is a block diagram illustrating an exemplary operating environment. DETAILED DESCRIPTION Overview The subject matter disclosed herein pertains to a command assistance tool for a browser-enabled command line interface of a cloud service. The command assistance tool provides examples illustrating the correct syntax for a command used to manage resour