CN108647043A - A kind of realization method and system of order line input - Google Patents
A kind of realization method and system of order line input Download PDFInfo
- Publication number
- CN108647043A CN108647043A CN201810289981.4A CN201810289981A CN108647043A CN 108647043 A CN108647043 A CN 108647043A CN 201810289981 A CN201810289981 A CN 201810289981A CN 108647043 A CN108647043 A CN 108647043A
- Authority
- CN
- China
- Prior art keywords
- optional
- keyword
- input
- order line
- optional keyword
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30094—Condition code generation, e.g. Carry, Zero flag
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30003—Arrangements for executing specific machine instructions
Abstract
A kind of realization method and system of order line input, is related to order line analytic technique field, method includes:Define custom command row, wherein optional keyword and parameter be placed on must input below, and using character string replacement;The self-defined analytical function of an analysis custom command row is defined, and is bound with the custom command row being registered on command tree;Judge whether the optional keyword and parameter are legal by the self-defined analytical function, meanwhile, the optional keyword of part input is automatically replenished according to custom command row prototype on command tree.The present invention supports optional keyword and the input of the random combine of parameter, does not have to the number and sequencing problem that consider optional keyword and parameter, registers and realize convenient for order line, reduces workload, can subsequently extend.
Description
Technical field
The present invention relates to order line analytic technique fields, and in particular to a kind of realization method and system of order line input.
Background technology
The existing all kinds of products for data communication, such as interchanger, router, fire wall, modem, PON (Passive
Optical Network, passive optical-fiber network), GTN (General Transport Network, general transmission net), PTN
(Packet Transport Network, Packet Transport Network) etc., can all provide a kind of management means being called order line, i.e.,
User inputs specific order line (showing as a string of character strings), is parsed by the order line kernel analysis program in equipment,
Know that the operation of user is intended to, then executes and feedback result is to user.As soon as simply example, such as windows operations
Ping orders in system are exactly a kind of order line.Industry Normal practice is exactly by all order line prototypes with the shape of command tree
Formula is stored.After order line kernel analysis program receives user's input, tree root just is traversed from the tree crown of command tree, is searched
Order line is inputted with user and matches order line prototype, and after finding matched order line prototype, it is corresponding to be carried out this order line
Execute function.
As shown in Figure 1, being the schematic diagram of command tree, command tree stores command-line string with tree structure
A kind of data structure.Each bifurcated of command tree, is exactly order line node, and order line prototype is hung under each node.
It is character string that user, which inputs order line, and order line kernel analysis program is exactly to be matched according to character string, to feel
Know user view.Parameter in order line input by user is all materialization, and the ginseng for the order line registered on command tree
Number is all that Scoped is considered as long as design parameter input by user belongs to the legal range of command line parameter on command tree
Be them it is matched.But this matching rule is more stiff, must strictly observe succession and integrality.
By taking ping orders as an example:
Table 1
Table 1 is order line prototype and user's input order line matching list on command tree.By taking serial number 2 as an example, user's input
When, after having inputted the addresses keyword ping and ip, it must just force first to input keyword-w, then could input keyword-
S, and this 2 keywords and parameter must have all been inputted, it is only valid operation, it could 2 order line prototype of successful match serial number.
If user merely desires to input-w, actual match be serial number 1 on command tree order line prototype rather than serial number 2.Or
First input-s, then input-w, then actual match be serial number 3 on command tree order line prototype.If user has input
Ping 1.1.1.1-s20-w10 add parameter that is, behind keyword, and do not have the order line prototype ping of serial number 3 on command tree
(A.B.C.D)–s<1-100>–w<1-200>, then order line kernel analysis program can not be matched to order line prototype, will judge
User's input is illegal, leads to not execute this order line.This is exactly that conventional order line kernel analysis program is strictly required
Succession and integrality.
But some order lines are other than the keyword and parameter that must input, also possess many optional keywords and
Parameter, user are inputting these optional keywords and when parameter, the combination of optional keyword and parameter is arbitrary, it is random can
Speech, this results in this order line, and there are many kinds of combining forms.By taking ping orders as an example:
C:\Users\ytao>ping/
Usage:ping[-t][-a][-n count][-l size][-f][-i TTL][-v TOS]
[-r count][-s count][[-j host-list]|[-k host-list]]
[-w timeout][-R][-S srcaddr][-4][-6]target_name
Option:
Host specified-t Ping, until stopping.
Control-Break please be key in check statistical information and continuing operation-;To that stop-please keying in
Control-C。
- a is by address resolution at host name.
- n count echo the number of requests to be sent.
- l size send buffer size.
" not being segmented " mark (being only applicable to IPv4) is arranged in-f in the packet.
- i TTL life spans.
- v TOS service types (are only applicable to IPv4.The setting is not agreed with using, and in IP headers
Type of service field there is no any influence).
The routing (being only applicable to IPv4) of-r count record count hops.
- s count count the timestamp (being only applicable to IPv4) of hop.
Loose source routings (the be only applicable to IPv4) of-j host-list together with Host List.
Stringent source routings (the be only applicable to IPv4) of-k host-list together with Host List.
- w timeout wait for the time-out time (millisecond) replied every time.
- R is equally using routing header test reverse route (being only applicable to IPv6).
- S srcaddr source addresses to be used.
- 4 force to use IPv4.
- 6 force to use IPv6.
Ping orders further include 16 optional keywords other than target_name is must to specify.And these can
The band parameter (such as-n/-l/-i) that keyword has is selected, for some without parameter (such as-t/-a/-f), this results in the order line of ping
Prototype has very multiple combinations form.These combining form numbers are too many, and exhaustive all combinations are obviously unrealistic, and work
It measures huge, all brings certain difficulty for registration and the realization in later stage, and can not extend.
Invention content
In view of the deficiencies in the prior art, the purpose of the present invention is to provide a kind of implementation methods of order line input
And system, it supports the random combine input of optional keyword and parameter, does not have to the number for considering optional keyword and parameter and suitable
Sequence problem is registered and is realized convenient for order line, is reduced workload, can subsequently be extended.
To achieve the above objectives, the present invention takes a kind of implementation method of order line input, including step:
Defining optional keyword and parameter in custom command row and being placed on must input below, and use character string generation
It replaces;
Define the self-defined analytical function of an analysis definition command row, and be registered on command tree described in from
Definition command row is bound;
Judge whether the optional keyword and parameter are legal by the self-defined analytical function, meanwhile, according to order
Custom command row prototype is automatically replenished the optional keyword of part input on tree.
Based on the above technical solution, the order line of the self-defined analytical function parsing input, traverses command tree,
It searches and passes through self-defined analytical function if the order line prototype is customized with the matched order line prototype of the order line
It is parsed;If the order line prototype is not customized, parsed by original flow.
Based on the above technical solution, defining the custom command row includes:
To custom command row support in need optional keyword definition enumerate;
A data structure is defined, by each optional keyword, corresponding help information and corresponding parameter area information
It is associated between three;
An array is defined, member is the data structure;
Define the form of the custom command row, it is necessary to which the keyword and parameter of input are placed on front, all optional passes
Key word and parameter are put behind.
Based on the above technical solution, in the data structure, if optional keyword is without parameter, corresponding ginseng
Number range information is sky.
Based on the above technical solution, the self-defined analytical function parses custom command row, if current input
Optional keyword and array in the optional keyword that stores mismatch, or the optional keyword currently inputted and inputted
There are logic conflicts for optional keyword, think that input is illegal, terminate flow.
Based on the above technical solution, the self-defined analytical function parses custom command row, if current input
Optional keyword do not patrolled with the optional keyword for matching, currently inputting stored in array and the optional keyword inputted
Conflict is collected, and the parameter that user continues to input belongs to corresponding parameter area in array, then illustrates the optional key currently inputted
Word and corresponding parameter are legal.
Based on the above technical solution, the self-defined analytical function parses custom command row, if current input
Optional keyword it is as some the optional keyword part stored in array identical, match, then directly according to being stored in array
Optional keyword is supplemented, and is extracted the optional keyword and substituted the character string used when corresponding optional keyword registration,
Obtain the corresponding help information of the optional keyword and corresponding parameter area.
Based on the above technical solution, self-defined analytical function parses custom command row, if what is currently inputted can
It selects keyword identical as at least two optional keywords all parts stored in array, matches, then it is identical to provide all parts
Optional keyword is selective, substitutes the character string used when corresponding optional keyword registration with selected optional keyword, obtains
To the corresponding help information of the optional keyword and corresponding parameter area.
Based on the above technical solution, if the optional keyword has corresponding parameter area, and do not have subsequently
Input parameter, or the parameter subsequently inputted are not belonging to corresponding parameter area in comparison array, then critical parameter is illegal
State, flow terminate.
The present invention also provides a kind of realization systems of order line input, including:
Order line definition module is used for behind optional keyword and parameter in definition command row be placed on and must input,
And it is replaced using character string;
Parsing module is used to be automatically replenished the optional key of part input according to chartered custom command row
Word is additionally operable to judge whether the optional keyword of input and parameter are legal.
Based on the above technical solution, the order line definition module includes data structure and array, data structure
It will be associated between each optional keyword, corresponding help information and corresponding parameter area information three;Array at
Member is the data structure.
Based on the above technical solution, the parsing module includes:
Custom command row discrimination module, is used to traverse command tree, judges whether the order line of input is registered
Custom command row;
Keyword discrimination module is used to traverse the legitimacy that the array judges the optional keyword currently inputted;
Parameter discrimination module is used to traverse the array and judges the optional keyword subsequent input parameter currently inputted
Legitimacy.
Based on the above technical solution, the keyword discrimination module further includes association's unit, is used for part
The legal optional keyword of input is supplemented, and obtains the corresponding help information of the optional keyword and corresponding parameter model
It encloses.
Based on the above technical solution, if some the optional pass stored in the optional keyword and array that currently input
Key character segment is identical, matches, and association's unit is directly optional to what is currently inputted according to the optional keyword stored in array
Keyword is supplemented.
Based on the above technical solution, if stored in the optional keyword and array that currently input at least two can
It selects keyword all parts identical, matches, the identical optional keyword in all parts of association's unit offer is selective, with quilt
The keyword of selection substitutes the character string used when corresponding optional keyword registration.
The beneficial effects of the present invention are:
1, custom command row is defined, all optional keywords and its parameter are replaced with the character string PS of no practical significance
In generation, without exhaustive all combinations when registration, greatly reduces life without paying close attention to the sequence and permutation and combination problem of optional keyword
Enable the number-of-registration of row.When user inputs, according to user input values, it can associate automatically and match corresponding optional pass in array
Key word or parameter are replaced the character string in order line, are realized simply, securely and reliably in turn.Custom command row includes
Optional keyword is more, and the benefit of inventive method is more apparent, and advantage is bigger.
2, extremely small to the change of original order line kernel analysis program, when custom command row is registered, it is only necessary to tie up
Fixed self-defined analytical function can reduce workload for non-custom order line without binding.Even if self-defined
Self-defined analytical function realize wrong, also only influence this current order line, other order lines will not be parsed and be caused
Any influence.
3, existing order line kernel analysis program, its own is actively to include and judge each order line keyword
Between logical relation too complicated because information content is too big, processing logic cannot be realized.But the present invention is for self-defined
Logical relation between order line optional keyword judges, can be placed in self-defined analytical function and realize, to realize
Judge user's input logic legitimacy.When the logical relation between all kinds of optional keywords of custom command row changes,
Self-defined analytical function only need to be changed and kernel analysis program is unrelated, it is convenient, fast, efficient.
Description of the drawings
Fig. 1 is the schematic diagram of command tree in background technology;
Fig. 2 is first embodiment of the invention method flow diagram;
Fig. 3 is sixth embodiment of the invention system schematic;
Fig. 4 is seventh embodiment of the invention system schematic.
Reference numeral:
Order line definition module 1, data structure 11, array 12;
Parsing module 2, custom command row discrimination module 21, keyword discrimination module 22, parameter discrimination module 23, association
Unit 230.
Specific implementation mode
Invention is further described in detail with reference to the accompanying drawings and embodiments.
The implementation method of order line input of the present invention, including step:
Custom command row is defined, wherein optional keyword and parameter, which are placed on, must input below, and using character string
PS is replaced;
A self-defined analytical function for analyzing the custom command row is defined, and self-defined on command tree with being registered in
Order line is bound;
Judge whether the optional keyword and parameter are legal by the self-defined analytical function, meanwhile, according to order
Custom command row prototype is automatically replenished the optional keyword of part input on tree.
First embodiment:
The implementation method of order line input of the present invention, including step:
S101. according to custom command row support in need optional keyword definition enumerate, define custom command
Capable form is:The keyword and parameter that must be inputted be placed on front, and optional keyword and parameter are placed on and all must input
Below, optional keyword does not have to differentiation sequence.Other than the keyword and parameter that must input, all optional keywords and ginseng
Number is all made of character string PS and replaces.
S102. a data structure cmd_param_t is defined, by each optional keyword, corresponding help information and right
It is associated between the parameter area information three answered, if without parameter, range can be indicated with sky.During help information includes
English is order line routine information, for being prompted to user's operation.
S103. an array array is defined, member is the data structure cmd_param_t defined in S102, and the number
Group array sizes are equal to the optional keyword number that current custom command row is supported, that is, the number enumerated in S101.
S104. a self-defined analytical function for being used for parsing custom command row, such as ping_parse_ are defined
Func, custom command row are registered on command tree, the self-defined analytical function and be registered on command tree from
Definition command row is bound.
S105. when receiving custom command row input by user, the order line of self-defined analytical function parsing input, time
Go through command tree, find with the matched order line prototype of the order line, judge whether the order line is bundled with self-defined parsing letter
Number, if so, into S106;If it is not, into S107.
S106. illustrate that input by user is custom command row, parsed by self-defined analytical function.Specifically,
Self-defined analytical function can judge the optional keyword and ginseng of input according to corresponding custom command row prototype on command tree
Whether number is legal, can also be automatically replenished the part optional keyword of input by association, also, nothing in the judgment process
The optional keyword that method is automatically replenished is illegal.After only all keywords and parameter are all legal, just executed according to input parameter
Custom command row.
S107. illustrate that input by user is normal commands row, parsed by existing order line kernel analysis program.
Second embodiment:
In the present embodiment, according to the form, data structure, array and parsing of custom command row defined in first embodiment
Order.On the basis of first embodiment, when self-defined analytical function parses the custom command row inputted, judge to work as
Whether the optional keyword of preceding input matches with the optional keyword stored in array, if it does, further judging current defeated
It whether there is logic conflict between the optional keyword entered and the optional keyword inputted, if there is no logic conflict,
And the parameter that user continues input belongs to corresponding parameter area in array, just illustrates current optional keyword and corresponding ginseng
Number is legal, then current optional keyword is disposed, if there is next keyword, continues with;If not provided, can
To execute the function of custom command row.
Wherein, if the optional keyword stored in the optional keyword of preceding input and array mismatches, or it is current
There are logic conflicts between the optional keyword of input and the optional keyword inputted, think that user's input is illegal at this time,
Terminate whole flow process.
3rd embodiment:
In the present embodiment, on the basis of first embodiment and second embodiment, self-defined analytical function judges current defeated
When whether the optional keyword entered matches with the optional keyword stored in array, the mode of association may be used, be automatically replenished
The optional keyword of current portions input.
If the optional keyword currently inputted is identical as some the optional keyword part stored in array, if explanation
Match, then directly the optional keyword of current portions input is supplemented, and extracts according to the optional keyword stored in array
Go out the optional keyword and substitute the character string PS used when corresponding optional keyword registration, obtains the corresponding help of the keyword and believe
Breath and corresponding parameter area.
Such as:The optional keyword currently inputted is trac, and the optional keyword stored in array is
Traceroute, then the two part is identical, illustrates the two matching, directly extracts traceroute and substitutes corresponding optional keyword
The character string PS used when registration.
Fourth embodiment:
On the basis of first embodiment and second embodiment, self-defined analytical function judges the optional key currently inputted
When whether word matches with the optional keyword stored in array, the mode of association may be used, be automatically replenished current portions input
Optional keyword.The case where what is stressed in the present embodiment is another association.
If the optional keyword currently inputted is identical as at least two optional keywords all parts stored in array
Matching, then provide that the identical optional keyword in all parts is selective, and according to the optional keyword that user selects, it is optional to substitute correspondence
The character string PS that keyword uses when registering, obtains the corresponding help information of the optional keyword and corresponding parameter area.
Such as:The optional keyword currently inputted is dh, the optional keyword stored in array have dhcp,
Dhcpsnooping is matched with current input, then can list file names with dhcp and dhcpsnooping and be selected for user, if with
Family has selected dhcp, just substitutes the character string PS used when optional keyword registration with dhcp, and obtain the optional pass simultaneously
The corresponding help information of key word and corresponding parameter area.
5th embodiment:
On the basis of 3rd embodiment and fourth embodiment, if optional keyword has corresponding parameter area, but
It is that the parameter that the optional keyword is subsequently subsequently inputted without input parameter or the optional keyword is not belonging to comparison array
In the corresponding parameter area, then sentence the keyword parameter be illegal state, terminate flow.
Sixth embodiment:
The realization system of order line input of the present invention, including order line definition module 1 and parsing module 2.
Order line definition module 1 is used for the form of definition command row, it is necessary to which the keyword and parameter of input are placed on front, can
Select keyword and parameter be placed on it is all must input behind, optional keyword do not have to differentiation sequence, all optional keywords and
Parameter may be used character string PS and replace.Specifically, order line definition module 1 includes data structure 11 and array 12, data
Structure will be associated between each optional keyword, corresponding help information and corresponding parameter area information three;Array
12 member is data structure 11.
Parsing module 2 is by the self-defined analytical function of an analytic definition order line, according to chartered self-defined
Order line is automatically replenished the optional keyword of part input, is additionally operable to judge whether the optional keyword of input and parameter are legal.
All optional keywords and parameter only inputted are all legal, just execute custom command row according to input parameter.
7th embodiment:
On the basis of sixth embodiment, in the present embodiment, the realization system of order line input, including order line define mould
Block 1 and parsing module 2, order line definition module 1 include data structure 11 and array 12, and the member of array 12 is data structure
11.Parsing module 2 includes custom command row discrimination module 21, keyword discrimination module 22 and parameter discrimination module 23.
Custom command row discrimination module 21 for traversing command tree, judge input order line whether be it is registered from
Definition command row.If it is not, explanation is normal commands row, then parsed by existing order line kernel analysis program.
If so, keyword discrimination module 22 traverses array 12, the legitimacy of the optional keyword currently inputted is judged.It is only current defeated
The optional keyword entered is matched with the optional keyword stored in array 12, and the optional keyword that currently inputs and has been inputted
Optional keyword between logic conflict is not present, just illustrate that the optional keyword that currently inputs is legal.
Parameter discrimination module 23 judges the conjunction of the optional keyword subsequent input parameter currently inputted for traversing array 12
Method.When optional keyword subsequent input parameter belongs to corresponding parameter area in array 12, just illustrate current optional keyword
Corresponding parameter is legal.
Otherwise, if the optional keyword currently inputted mismatches with the optional keyword stored in array 12, is current defeated
There are logic conflict or optional keywords subsequently to input ginseng between the optional keyword entered and the optional keyword inputted
Number is not belonging to corresponding parameter area in array 12, is all illegal, respective modules directly terminate to judge.
In addition, keyword discrimination module 23 further includes association's unit 230, for the legal optional key to part input
Word is supplemented, and obtains the corresponding help information of the optional keyword and corresponding parameter area.
Wherein, if the optional keyword currently inputted is identical as some the optional keyword part stored in array 12
Match, association's unit 230 mends the optional keyword currently inputted directly according to the optional keyword stored in array 12
It fills.
If the optional keyword currently inputted is identical as at least two optional keywords all parts stored in array 12
Matching, it is selective that association's unit 230 provides the identical optional keyword in all parts, and substituting correspondence with selected keyword can
The character string used when keyword being selected to register.
The present invention is not limited to the above-described embodiments, for those skilled in the art, is not departing from
Under the premise of the principle of the invention, several improvements and modifications can also be made, these improvements and modifications are also considered as the protection of the present invention
Within the scope of.The content not being described in detail in this specification belongs to the prior art well known to professional and technical personnel in the field.
Claims (15)
1. a kind of implementation method of order line input, which is characterized in that including step:
Define custom command row, wherein optional keyword and parameter be placed on must input below, and using character string replacement;
Define the self-defined analytical function of an analysis custom command row, and be registered on command tree described in make by oneself
Adopted order line binding;
Judge whether the optional keyword and parameter are legal by the self-defined analytical function, meanwhile, according on command tree
Custom command row prototype is automatically replenished the optional keyword of part input.
2. the implementation method of order line input as described in claim 1, it is characterised in that:The self-defined analytical function parsing
The order line of input traverses command tree, lookup and the matched order line prototype of the order line, if the order line prototype is self-defined
, then it is parsed by self-defined analytical function;If the order line prototype is not customized, pass through original flow solution
Analysis.
3. the implementation method of order line input as described in claim 1, which is characterized in that define the custom command row packet
It includes:
To custom command row support in need optional keyword definition enumerate;
A data structure is defined, by each optional keyword, corresponding help information and corresponding parameter area information three
Between be associated;
An array is defined, member is the data structure;
Define the form of the custom command row, it is necessary to which the keyword and parameter of input are placed on front, all optional keywords
It puts behind with parameter.
4. the implementation method of order line input as claimed in claim 3, it is characterised in that:In the data structure, if optional
Keyword is sky without parameter, then corresponding parameter area information.
5. the implementation method of order line input as claimed in claim 3, it is characterised in that:The self-defined analytical function parsing
Custom command row, if the optional keyword stored in the optional keyword and array that currently input mismatches, or it is current defeated
There are logic conflicts for the optional keyword entered and the optional keyword inputted, think that input is illegal, terminate flow.
6. the implementation method of order line input as claimed in claim 3, it is characterised in that:The self-defined analytical function parsing
Custom command row, if the optional keyword currently inputted and the optional keyword for matching, currently inputting stored in array and
The optional keyword inputted does not have logic conflict, and the parameter that user continues to input belongs to corresponding parameter area in array,
Then illustrate that the optional keyword currently inputted and corresponding parameter are legal.
7. the implementation method of order line input as claimed in claim 6, it is characterised in that:The self-defined analytical function parsing
Custom command row, if the optional keyword currently inputted is identical as some the optional keyword part stored in array
Match, then directly supplemented according to the optional keyword stored in array, and it is optional to extract optional keyword replacement correspondence
The character string that keyword uses when registering, obtains the corresponding help information of the optional keyword and corresponding parameter area.
8. the implementation method of order line input as claimed in claim 6, it is characterised in that:Self-defined analytical function parsing is made by oneself
Adopted order line, if the optional keyword currently inputted is identical as at least two optional keywords all parts stored in array
Match, then it is selective to provide the identical optional keyword in all parts, and corresponding optional key is substituted with selected optional keyword
The character string that word uses when registering, obtains the corresponding help information of the optional keyword and corresponding parameter area.
9. the implementation method of order line input as claimed in claim 7 or 8, it is characterised in that:If the optional keyword tool
Have corresponding parameter area, and subsequently without input parameter, or the parameter subsequently inputted be not belonging to comparison array in it is corresponding
The parameter area, then critical parameter is illegal state, and flow terminates.
10. a kind of realization system of order line input, which is characterized in that including:
Order line definition module is used for behind optional keyword and parameter in definition command row be placed on and must input, and adopts
It is replaced with character string;
Parsing module is used to be automatically replenished the optional keyword of part input according to chartered custom command row, also
Whether the optional keyword and parameter for judging input are legal.
11. the realization system of order line input as claimed in claim 10, it is characterised in that:The order line definition module packet
Include data structure and array, data structure is by each optional keyword, corresponding help information and corresponding parameter area information
It is associated between three;The member of array is the data structure.
12. the realization system of order line as claimed in claim 11 input, which is characterized in that the parsing module includes:
Custom command row discrimination module, is used to traverse command tree, judges whether the order line of input is registered make by oneself
Adopted order line;
Keyword discrimination module is used to traverse the legitimacy that the array judges the optional keyword currently inputted;
Parameter discrimination module is used to traverse the array and judges the legal of the optional keyword subsequent input parameter currently inputted
Property.
13. the realization system of order line input as claimed in claim 11, it is characterised in that:The keyword discrimination module is also
Including association's unit, it is used to supplement the legal optional keyword of part input, and obtain the optional keyword pair
The help information answered and corresponding parameter area.
14. the realization system of order line input as claimed in claim 13, it is characterised in that:If the optional key currently inputted
Word is identical as some the optional keyword part stored in array, match, and association's unit in array directly according to storing
Optional keyword supplements the optional keyword currently inputted.
15. the realization system of order line input as claimed in claim 13, it is characterised in that:If the optional key currently inputted
Word is identical as at least two optional keywords all parts stored in array, matches, and association's unit provides all part phases
Same optional keyword is selective, and the character string used when corresponding optional keyword registration is substituted with selected keyword.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810289981.4A CN108647043B (en) | 2018-04-03 | 2018-04-03 | Method and system for realizing command line input |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810289981.4A CN108647043B (en) | 2018-04-03 | 2018-04-03 | Method and system for realizing command line input |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108647043A true CN108647043A (en) | 2018-10-12 |
CN108647043B CN108647043B (en) | 2021-03-16 |
Family
ID=63745573
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810289981.4A Active CN108647043B (en) | 2018-04-03 | 2018-04-03 | Method and system for realizing command line input |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108647043B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110196714A (en) * | 2019-06-04 | 2019-09-03 | 上海合桀软件技术有限公司 | A kind of conversion restoring method of original directive, storage equipment and terminal |
CN111443915A (en) * | 2020-03-30 | 2020-07-24 | 山东华辰连科通信网络有限公司 | method and system for realizing C L I command interface on single chip microcomputer |
CN112804076A (en) * | 2019-11-14 | 2021-05-14 | 大唐移动通信设备有限公司 | Instruction response method and network equipment |
CN113504958A (en) * | 2021-05-25 | 2021-10-15 | 曙光网络科技有限公司 | Command execution method based on command line interface, electronic equipment and storage medium |
CN113722009A (en) * | 2021-08-27 | 2021-11-30 | 上海矽昌微电子有限公司 | Parameter analysis method, system, terminal equipment and storage medium |
CN113922979A (en) * | 2021-08-23 | 2022-01-11 | 北京天融信网络安全技术有限公司 | Network security device configuration system, configuration method and computer device |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1490977A (en) * | 2002-10-17 | 2004-04-21 | 华为技术有限公司 | Analysis of universal route platform command lines |
CN1534460A (en) * | 2003-03-28 | 2004-10-06 | 烽火通信科技股份有限公司 | Management method possessing real time helping function in insertion type system |
CN101193109A (en) * | 2006-12-01 | 2008-06-04 | 中兴通讯股份有限公司 | A method for supporting interactive command in command line interface of communication device |
CN101944023A (en) * | 2010-09-14 | 2011-01-12 | 南京联创科技集团股份有限公司 | Implement method of universal command line interface of UNIX server software |
CN102880471A (en) * | 2012-09-24 | 2013-01-16 | 中兴通讯股份有限公司 | Command execution method based on command line and command line operating system |
CN102902547A (en) * | 2012-10-18 | 2013-01-30 | 上海师范大学 | Command construction and analysis method of command line interface |
CN103532756A (en) * | 2013-10-15 | 2014-01-22 | 上海寰创通信科技股份有限公司 | Command line system and command line operation method based on webmaster system |
US8707252B1 (en) * | 2008-09-03 | 2014-04-22 | Emc Corporation | Techniques for automatic generation of parsing code |
CN105354021A (en) * | 2015-10-08 | 2016-02-24 | 盛科网络(苏州)有限公司 | Implementation method for integrating command lines in Linux kernel |
US20170031701A1 (en) * | 2015-07-28 | 2017-02-02 | International Business Machines Corporation | Tagging virtual machine instances based on commands |
US20170116364A1 (en) * | 2015-10-26 | 2017-04-27 | Synopsys, Inc. | Automatically generated schematics and visualization |
CN106951213A (en) * | 2017-03-27 | 2017-07-14 | 杭州迪普科技股份有限公司 | A kind of command analysis method and device |
CN107426041A (en) * | 2017-09-21 | 2017-12-01 | 杭州迪普科技股份有限公司 | A kind of method and apparatus of resolve command |
-
2018
- 2018-04-03 CN CN201810289981.4A patent/CN108647043B/en active Active
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1490977A (en) * | 2002-10-17 | 2004-04-21 | 华为技术有限公司 | Analysis of universal route platform command lines |
CN1534460A (en) * | 2003-03-28 | 2004-10-06 | 烽火通信科技股份有限公司 | Management method possessing real time helping function in insertion type system |
CN101193109A (en) * | 2006-12-01 | 2008-06-04 | 中兴通讯股份有限公司 | A method for supporting interactive command in command line interface of communication device |
US8707252B1 (en) * | 2008-09-03 | 2014-04-22 | Emc Corporation | Techniques for automatic generation of parsing code |
CN101944023A (en) * | 2010-09-14 | 2011-01-12 | 南京联创科技集团股份有限公司 | Implement method of universal command line interface of UNIX server software |
CN102880471A (en) * | 2012-09-24 | 2013-01-16 | 中兴通讯股份有限公司 | Command execution method based on command line and command line operating system |
CN102902547A (en) * | 2012-10-18 | 2013-01-30 | 上海师范大学 | Command construction and analysis method of command line interface |
CN103532756A (en) * | 2013-10-15 | 2014-01-22 | 上海寰创通信科技股份有限公司 | Command line system and command line operation method based on webmaster system |
US20170031701A1 (en) * | 2015-07-28 | 2017-02-02 | International Business Machines Corporation | Tagging virtual machine instances based on commands |
CN105354021A (en) * | 2015-10-08 | 2016-02-24 | 盛科网络(苏州)有限公司 | Implementation method for integrating command lines in Linux kernel |
US20170116364A1 (en) * | 2015-10-26 | 2017-04-27 | Synopsys, Inc. | Automatically generated schematics and visualization |
CN106951213A (en) * | 2017-03-27 | 2017-07-14 | 杭州迪普科技股份有限公司 | A kind of command analysis method and device |
CN107426041A (en) * | 2017-09-21 | 2017-12-01 | 杭州迪普科技股份有限公司 | A kind of method and apparatus of resolve command |
Non-Patent Citations (3)
Title |
---|
朱新宇: "用于IPv6的RIPng路由器研究", 《中国优秀硕士学位论文全文数据库(电子期刊) 信息科技辑》 * |
航空工业部第五七四厂: "《iRMX 86 人机接口参考手册:手册号 9803202-02 第11册》", 31 December 1983 * |
解震春 等: "命令行接口管理系统的设计与实现", 《无线电工程》 * |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110196714A (en) * | 2019-06-04 | 2019-09-03 | 上海合桀软件技术有限公司 | A kind of conversion restoring method of original directive, storage equipment and terminal |
CN112804076A (en) * | 2019-11-14 | 2021-05-14 | 大唐移动通信设备有限公司 | Instruction response method and network equipment |
CN112804076B (en) * | 2019-11-14 | 2022-11-04 | 大唐移动通信设备有限公司 | Instruction response method and network equipment |
CN111443915A (en) * | 2020-03-30 | 2020-07-24 | 山东华辰连科通信网络有限公司 | method and system for realizing C L I command interface on single chip microcomputer |
CN111443915B (en) * | 2020-03-30 | 2023-05-16 | 山东华辰连科通信网络有限公司 | Method and system for realizing CLI command interface on singlechip |
CN113504958A (en) * | 2021-05-25 | 2021-10-15 | 曙光网络科技有限公司 | Command execution method based on command line interface, electronic equipment and storage medium |
CN113922979A (en) * | 2021-08-23 | 2022-01-11 | 北京天融信网络安全技术有限公司 | Network security device configuration system, configuration method and computer device |
CN113922979B (en) * | 2021-08-23 | 2023-07-04 | 北京天融信网络安全技术有限公司 | Network security equipment configuration system, configuration method and computer equipment |
CN113722009A (en) * | 2021-08-27 | 2021-11-30 | 上海矽昌微电子有限公司 | Parameter analysis method, system, terminal equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN108647043B (en) | 2021-03-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108647043A (en) | A kind of realization method and system of order line input | |
US7299282B2 (en) | State processor for pattern matching in a network monitor device | |
JP5850896B2 (en) | Method and apparatus for monitoring traffic in a network | |
EP2868045B1 (en) | A method of and network server for detecting data patterns in an input data stream | |
US6373822B1 (en) | Data network protocol conformance test system | |
CN103004158B (en) | There is the network equipment of programmable core | |
CN109802864B (en) | Chip design verification method and device and chip tester | |
US7440415B2 (en) | Virtual network addresses | |
CN103339887B (en) | For the method for optimized network prefix list search | |
CN103095475B (en) | The method for inspecting and system of multimode communication device | |
US7583673B2 (en) | Network processor for forwarding packets in an IP network | |
CN110324198A (en) | Loss treating method and packet loss processing unit | |
Leng et al. | A mechanism for reducing flow tables in software defined network | |
CN1703890B (en) | Method for protocol recognition and analysis in data networks | |
US20060062211A1 (en) | System and method for designing a customized switched metro Ethernet data network | |
CN108563629A (en) | A kind of daily record resolution rules automatic generation method and device | |
CN101741745B (en) | Method and system for identifying application traffic of peer-to-peer network | |
CN106878095A (en) | A kind of network collocating method and system based on scenario distributed emulation | |
CN101404595B (en) | Network bridge uplink port identification | |
CN115514683A (en) | Method and device for determining packet loss reason, exchange chip and storage medium | |
CN115174414A (en) | Method, system and electronic device for automatically identifying devices and device paths in session | |
CN101771697B (en) | Network data stream identification method based on pattern matching method | |
CN106817260A (en) | A kind of Cabinet administration system and method | |
CN102148729A (en) | Automatic test method for private SNMP (simple network management protocol) management instruction of passive optical network equipment | |
CN109905322A (en) | A kind of method and device of message matching information pre-processing |
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 |