Supercharge Your Innovation With Domain-Expert AI Agents!

Command line input realization method and system

An implementation method and technology for implementing a system, applied in the field of command line parsing, can solve problems such as unrealistic, large workload, and inability to expand, and achieve the effects of simple implementation, reduced workload, and reduced number of registrations

Active Publication Date: 2018-10-12
FENGHUO COMM SCI & TECH CO LTD
View PDF13 Cites 9 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

There are too many combinations, it is obviously unrealistic to list all combinations, and the workload is huge, which brings certain difficulties to registration and later implementation, and cannot be expanded

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Command line input realization method and system
  • Command line input realization method and system
  • Command line input realization method and system

Examples

Experimental program
Comparison scheme
Effect test

no. 1 example

[0078] The realization method of command line input of the present invention comprises steps:

[0079] S101. Define the enumeration according to all optional keywords that need to be supported by the custom command line. The form of defining the custom command line is: the keywords and parameters that must be input are placed in front, and the optional keywords and parameters are placed before all must be input After the , the optional keywords are in no particular order. Except for the keywords and parameters that must be entered, all optional keywords and parameters are replaced by the string PS.

[0080] S102. Define a data structure cmd_param_t to associate each optional keyword, corresponding help information and corresponding parameter range information. If there is no parameter, the range can be represented by empty. The help information includes Chinese and English, which is common information on the command line, and is used to give user operation prompts.

[0081] ...

no. 2 example

[0087] In this embodiment, the form, data structure, array and parsing command of the custom command line are defined according to the first embodiment. On the basis of the first embodiment, when the user-defined parsing function is analyzing the user-defined command line being input, it is judged whether the currently input optional keyword matches the optional keyword stored in the array, and if it matches, further judges whether the current Whether there is a logical conflict between the input optional keyword and the already input optional keyword, if there is no logical conflict, and the parameter that the user continues to input belongs to the corresponding parameter range in the array, then the current optional keyword and the corresponding If the parameter is legal, the current optional keyword is processed. If there is the next keyword, continue processing; if not, the function of custom command line can be executed.

[0088] Among them, if the previously input option...

no. 3 example

[0090] In this embodiment, on the basis of the first embodiment and the second embodiment, when the user-defined parsing function judges whether the currently input optional keyword matches the optional keyword stored in the array, an associative method can be used, Auto-completion of optional keywords for the current section of the input.

[0091] If the currently input optional keyword is partly the same as an optional keyword stored in the array, it indicates that it matches, and the optional keyword currently input is supplemented directly according to the optional keyword stored in the array. And extract the optional keyword to replace the character string PS used in the registration of the corresponding optional keyword, and obtain the help information corresponding to the keyword and the corresponding parameter range.

[0092] For example, if the currently input optional keyword is trac, and an optional keyword stored in the array is traceroute, then the two are partly ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a command line input realization method and system and relates to the technical field of command line analysis. The method comprises the steps of defining a self-defined command line, wherein selectable keywords and parameters are placed behind required input and are replaced by a character string; defining a self-defined analysis function for analyzing the self-defined command line, and binding the self-defined analysis function with the self-defined command line registered with a command tree; and judging whether the selectable keywords and parameters are legal or notthrough utilization of the self-defined analysis function, and moreover, automatically supplementing part of input selectable keywords according to a self-defined command line prototype on the command tree. According to the method and the system, the random combination input of the selectable keywords and the parameters is supported, the number and sequence problem of the selectable keywords andthe parameters do not need to be taken into consideration, the registration and realization of the command line are facilitated, the workload is reduced, and the command line can be expanded subsequently.

Description

technical field [0001] The invention relates to the technical field of command line analysis, in particular to a method and system for realizing command line input. Background technique [0002] Various existing products for data communication, such as switches, routers, firewalls, modems, PON (Passive Optical Network, passive optical network), GTN (General Transport Network, general transport network), PTN (Packet Transport Network, packet transmission network), etc., will provide a management method called command line, that is, the user enters a specific command line (expressed as a string of strings), which is parsed by the command line kernel analysis program in the device to obtain the user's operation intention , and then execute and feedback the result to the user. A simple example, such as the ping command in the windows operating system, is a command line. A common practice in the industry is to store all command line prototypes in the form of a command tree. Af...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F9/30
CPCG06F9/30003G06F9/30094
Inventor 陶阳
Owner FENGHUO COMM SCI & TECH CO LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More