CN103457761A - Cross-platform command line configuration interface implementation method - Google Patents

Cross-platform command line configuration interface implementation method Download PDF

Info

Publication number
CN103457761A
CN103457761A CN2013103008890A CN201310300889A CN103457761A CN 103457761 A CN103457761 A CN 103457761A CN 2013103008890 A CN2013103008890 A CN 2013103008890A CN 201310300889 A CN201310300889 A CN 201310300889A CN 103457761 A CN103457761 A CN 103457761A
Authority
CN
China
Prior art keywords
order
command
order line
command line
task process
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
Application number
CN2013103008890A
Other languages
Chinese (zh)
Other versions
CN103457761B (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.)
State Grid Corp of China SGCC
China Electric Power Research Institute Co Ltd CEPRI
State Grid Jibei Electric Power Co Ltd
State Grid Liaoning Electric Power Co Ltd
State Grid Shanghai Electric Power Co Ltd
Smart Grid Research Institute of SGCC
Original Assignee
State Grid Corp of China SGCC
China Electric Power Research Institute Co Ltd CEPRI
State Grid Jibei Electric Power Co Ltd
State Grid Liaoning Electric Power Co Ltd
State Grid Shanghai Electric Power Co 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 State Grid Corp of China SGCC, China Electric Power Research Institute Co Ltd CEPRI, State Grid Jibei Electric Power Co Ltd, State Grid Liaoning Electric Power Co Ltd, State Grid Shanghai Electric Power Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN201310300889.0A priority Critical patent/CN103457761B/en
Publication of CN103457761A publication Critical patent/CN103457761A/en
Application granted granted Critical
Publication of CN103457761B publication Critical patent/CN103457761B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a cross-platform command line configuration interface implementation method. The cross-platform command line configuration interface implementation method comprises the following steps: 1 constructing a command line sub-agency in each managed task process, 2 constructing a command line agency server on a main processor, 3 building a communication channel between the command line proxy server and the command line sub-agency, and 4 analyzing a command line. A command line configuration interface implemented through the method supports cross-platform operation and can be applied to the situation that the managed task process is dispersed on different processors and different operation platforms. In the cross-platform command line configuration interface implementation method, the process of registering command nodes is formed by using a script program to automatically conduct analysis in the compiling stage, the development efficiency is improved, and the registering time in operation is shortened. According to the cross-platform command line configuration interface implementation method, united command line configuration channels are provided for a user, meanwhile, relative independence of the managed task process is kept, and the system robust performance is improved.

Description

A kind of implementation method of cross-platform order line configuration interface
Technical field
The invention belongs to communication technical field, be specifically related to a kind of implementation method of supporting the order line configuration interface of cross-platform operation in communication equipment that is applied in.
Background technology
The order line configuration interface is a kind of way to manage that the commercialization network communication equipment generally provides.It is realized the administering and maintaining of system with the keyboard input command, and the response of receiving system.Compare the graphical network managing mode based on SNMP, Web, the script function that it provides is applied in while needing to carry out many repetitive operation can save a large amount of time.In addition, when network breaks down, when network managing mode can't have access to managed device, local keeper can also be diagnosed and troubleshooting by serial ports utility command row.Therefore, relatively graphical network managing mode, the order line configuration interface provides more complete management function.
Usually Subscriber Interface Module SIM and order line resolver are embedded into by the pipe task process when current order line configuration interface is realized simultaneously, have increased the degree of coupling of command line interface and task process, simplified whole call flow.But while having a plurality of task process to be managed in system, adopt this mode to provide a unified collocation channel for the user, development process also seems loaded down with trivial details, is not easy to safeguard and debugging simultaneously simultaneously.Especially be applied in distributed environment, managed task process to be dispersed on different processors, when operation platform also is not quite similar, this inferior position is particularly evident.Therefore be necessary to design a kind of order line configuration interface of supporting multitask process, cross-platform operation.
Summary of the invention
In order to overcome above-mentioned the deficiencies in the prior art, the invention provides a kind of implementation method of cross-platform order line configuration interface, provide order line configuration interface unified, that be easy to debugging and safeguard to be supported in multitask process and distributed environment to the user.
In order to realize the foregoing invention purpose, the present invention takes following technical scheme:
A kind of implementation method of cross-platform order line configuration interface, is characterized in that, the method comprises the following steps:
(5) managed in task process and built the order line sub agent in each;
(6) build the order line acting server on primary processor;
(7) set up the communication port of described order line acting server and described order line sub agent;
(8) resolve command row.
Preferably, described order line sub agent is for defining by the order subtree of pipe task process; Described step (1) comprises the steps:
(1-3) defined required command node by the pipe task process;
(1-4) command node is pressed to Function Classification, be divided to different command modes, form by the order subtree of pipe task process;
Described command node comprises: command string, power function, Permission Levels and help information; Described help information is for the function of interpreted command.
Preferably, described order line acting server is for integrating each by the order subtree of pipe task process, to form complete system command tree; Described step (2) comprising: use perl script to analyze command node definition statement and the command mode division statements in each order line sub agent source program, effective order is wherein carried out to unified definition in the order line acting server, the row mode of going forward side by side is integrated, to form described system command tree.
Preferably, described communication port is for receiving configuration order and the return command execution result of the distribution of order line server; This communication port comprises: UNIX territory socket and web socket.
Preferably, described step (4) comprises the following steps:
(4-1) the order line acting server receives the configuration order from the user, and it is resolved in advance, mates the affiliated order line sub agent of this order;
(4-2) order that the order line acting server will complete coupling is sent to corresponding sub agent process by described communication port;
(4-3) the order line sub agent is resolved fully to the order of receiving, comprising: keyword match, character escape and parameter validity checking, and call the power function of this task process after successfully resolved and carry out this order;
(4-4) the order line sub agent is by the capable acting server of command execution results return command.
Adopt specific message format while preferably, in described step (4-2), order being sent to the sub agent process; This message comprises: the command key value drawn in message-length, command string, pre-resolving, the functional mode under order and the Permission Levels of order.
Preferably, the command execution results that the order line sub agent returns to the order line acting server in described step (4-4) comprises: indicate the command execution success or not Boolean, show the character string of Query Result or error message to the user.
Compared with prior art, beneficial effect of the present invention is:
1. the order line configuration interface that the present invention realizes is supported cross-platform operation, can be applied in the situation that is dispersed in different processor, different operation platforms by the pipe task process.
In the present invention the order line sub agent to the process of order line server registration command node by the compilation phase, using the shell script automatic analysis to generate, improved development efficiency, the hour of log-on while having reduced operation.
3. the present invention, when the capable collocation channel of unity of command is provided for the user, has kept being managed the relatively independent of task process, and when wherein operation troubles appears in certain task process, the collocation channel of other task process is still unimpeded, has improved system robustness.
The accompanying drawing explanation
Fig. 1 is overview flow chart of the present invention;
Fig. 2 is system command tree Organization Chart in the present invention.
Embodiment
Below in conjunction with accompanying drawing, the present invention is described in further detail.
As shown in Figure 1, the present invention includes following steps:
Step 1: build the order line sub agent in each is managed task process, for defining by the order subtree of pipe task process.
Step 2: build the order line acting server on primary processor, for integrating each by the order subtree of pipe task process, form the system command tree, as shown in Figure 2.
Step 3: set up the communication port of order line acting server and order line sub agent, for receiving configuration order and the return command execution result of the distribution of order line server.
Step 4: order line is resolved, and for the configuration order to user's input, according to specific syntax rule, is analyzed and checks, for the order of correct format, calls corresponding power function, and error message is returned in the order of mistake.
In step 1, define required command node, comprising command string, power function, Permission Levels and help information.And command node is pressed to Function Classification, and be divided to different command modes, form by the order subtree of pipe task process.
In step 2, use perl script to analyze command node definition statement and the command mode division statements in each order line sub agent source program, effective order is wherein carried out to unified definition in the order line acting server, and the row mode of going forward side by side is integrated, and forms complete system command tree.
In step 3, communication port can be selected any one interprocess communication mode, comprise that UNIX territory socket is to support the order line acting server and to be managed the situation of task process on same processor, and web socket is to support the order line acting server and to be distributed in the situation on different processor, different operation platforms by the pipe task process.
In step 4, at first, the order line acting server is resolved in advance to receiving user's configuration order of coming, the order line sub agent under the coupling order; And the order that will complete coupling is sent to corresponding sub agent process by the communication port built.Adopt specific message format during transmission, comprising message-length, command string and the command key value analyzed, order subordinate pattern and command authority rank in pre-resolving.
Then, the order line sub agent is resolved fully to the order of receiving, comprises keyword match, character escape and parameter validity checking, call the power function fill order of this task process after successfully resolved, finally by the capable acting server of command execution results return command.Wherein result not only comprises the Boolean that indicates the command execution success or not, also can comprise character string, to the user, shows Query Result or error message.
Finally should be noted that: above embodiment is only in order to illustrate that technical scheme of the present invention is not intended to limit, although with reference to above-described embodiment, the present invention is had been described in detail, those of ordinary skill in the field are to be understood that: still can modify or be equal to replacement the specific embodiment of the present invention, and do not break away from any modification of spirit and scope of the invention or be equal to replacement, it all should be encompassed in the middle of claim scope of the present invention.

Claims (7)

1. the implementation method of a cross-platform order line configuration interface, is characterized in that, the method comprises the following steps:
(1) managed in task process and built the order line sub agent in each;
(2) build the order line acting server on primary processor;
(3) set up the communication port of described order line acting server and described order line sub agent;
(4) resolve command row.
2. the method for claim 1, is characterized in that, described order line sub agent is for defining by the order subtree of pipe task process; Described step (1) comprises the steps:
(1-1) defined required command node by the pipe task process;
(1-2) command node is pressed to Function Classification, be divided to different command modes, form by the order subtree of pipe task process;
Described command node comprises: command string, power function, Permission Levels and help information; Described help information is for the function of interpreted command.
3. the method for claim 1 is characterized in that: described order line acting server is for integrating each by the order subtree of pipe task process, to form complete system command tree; Described step (2) comprising: use perl script to analyze command node definition statement and the command mode division statements in each order line sub agent source program, effective order is wherein carried out to unified definition in the order line acting server, the row mode of going forward side by side is integrated, to form described system command tree.
4. the method for claim 1, is characterized in that: configuration order and return command execution result that described communication port is distributed for receiving the order line server; This communication port comprises: UNIX territory socket and web socket.
5. the method for claim 1, it is characterized in that: described step (4) comprises the following steps:
(4-1) the order line acting server receives the configuration order from the user, and it is resolved in advance, mates the affiliated order line sub agent of this order;
(4-2) order that the order line acting server will complete coupling is sent to corresponding sub agent process by described communication port;
(4-3) the order line sub agent is resolved fully to the order of receiving, comprising: keyword match, character escape and parameter validity checking, and call the power function of this task process after successfully resolved and carry out this order;
(4-4) the order line sub agent is by the capable acting server of command execution results return command.
6. method as claimed in claim 5, is characterized in that: adopt specific message format while in described step (4-2), order being sent to the sub agent process; This message comprises: the command key value drawn in message-length, command string, pre-resolving, the functional mode under order and the Permission Levels of order.
7. method as claimed in claim 5 is characterized in that: the command execution results that in described step (4-4), the order line sub agent returns to the order line acting server comprises: indicate the command execution success or not Boolean, show the character string of Query Result or error message to the user.
CN201310300889.0A 2013-07-17 2013-07-17 Cross-platform command line configuration interface implementation method Active CN103457761B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310300889.0A CN103457761B (en) 2013-07-17 2013-07-17 Cross-platform command line configuration interface implementation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310300889.0A CN103457761B (en) 2013-07-17 2013-07-17 Cross-platform command line configuration interface implementation method

Publications (2)

Publication Number Publication Date
CN103457761A true CN103457761A (en) 2013-12-18
CN103457761B CN103457761B (en) 2017-02-08

Family

ID=49739748

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310300889.0A Active CN103457761B (en) 2013-07-17 2013-07-17 Cross-platform command line configuration interface implementation method

Country Status (1)

Country Link
CN (1) CN103457761B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105099665A (en) * 2015-09-15 2015-11-25 浪潮(北京)电子信息产业有限公司 Command line interface CLI privilege management method and system
CN105204862A (en) * 2015-09-29 2015-12-30 上海斐讯数据通信技术有限公司 Method for processing CLI commands in concentrated mode
CN106227821A (en) * 2016-07-21 2016-12-14 杭州华三通信技术有限公司 A kind for the treatment of method and apparatus of order line order
CN106254335A (en) * 2016-07-29 2016-12-21 北京赛佰特科技有限公司 Cross-platform program interface call method based on Internet of Things
WO2016206381A1 (en) * 2015-06-26 2016-12-29 中兴通讯股份有限公司 File processing method and device
CN106656599A (en) * 2016-12-22 2017-05-10 浙江鹏信信息科技股份有限公司 Method and system for sending network data configuration instruction
CN107483567A (en) * 2017-08-03 2017-12-15 广州华多网络科技有限公司 A kind of method and system of distributed information log search
CN111526048A (en) * 2020-04-16 2020-08-11 深圳市风云实业有限公司 Unified management language adaptation method for multi-model switch

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112148349B (en) * 2020-07-03 2024-03-15 上海金融期货信息技术有限公司 Cross-platform instruction and system for configuring unified interface

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101009588A (en) * 2006-01-24 2007-08-01 华为技术有限公司 Method and system for configuring the distributed proxy server information
CN101110703A (en) * 2007-06-28 2008-01-23 中兴通讯股份有限公司 Made-to-order command line implementing method and system
CN101183973A (en) * 2007-12-06 2008-05-21 中兴通讯股份有限公司 Method of implementing command line configuration distribution in distributed system
CN102243583A (en) * 2011-06-09 2011-11-16 深圳市共进电子有限公司 Method for realizing parameter configuration by using command line

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101009588A (en) * 2006-01-24 2007-08-01 华为技术有限公司 Method and system for configuring the distributed proxy server information
CN101110703A (en) * 2007-06-28 2008-01-23 中兴通讯股份有限公司 Made-to-order command line implementing method and system
CN101183973A (en) * 2007-12-06 2008-05-21 中兴通讯股份有限公司 Method of implementing command line configuration distribution in distributed system
CN102243583A (en) * 2011-06-09 2011-11-16 深圳市共进电子有限公司 Method for realizing parameter configuration by using command line

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
徐旭彬: "WAG54G路由器Unnumbered IP功能和命令行配置的实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016206381A1 (en) * 2015-06-26 2016-12-29 中兴通讯股份有限公司 File processing method and device
CN105099665A (en) * 2015-09-15 2015-11-25 浪潮(北京)电子信息产业有限公司 Command line interface CLI privilege management method and system
CN105204862A (en) * 2015-09-29 2015-12-30 上海斐讯数据通信技术有限公司 Method for processing CLI commands in concentrated mode
CN106227821A (en) * 2016-07-21 2016-12-14 杭州华三通信技术有限公司 A kind for the treatment of method and apparatus of order line order
CN106227821B (en) * 2016-07-21 2019-08-06 新华三技术有限公司 A kind for the treatment of method and apparatus of order line command
CN106254335A (en) * 2016-07-29 2016-12-21 北京赛佰特科技有限公司 Cross-platform program interface call method based on Internet of Things
CN106254335B (en) * 2016-07-29 2019-03-29 北京赛佰特科技有限公司 Cross-platform program interface call method based on Internet of Things
CN106656599A (en) * 2016-12-22 2017-05-10 浙江鹏信信息科技股份有限公司 Method and system for sending network data configuration instruction
CN107483567A (en) * 2017-08-03 2017-12-15 广州华多网络科技有限公司 A kind of method and system of distributed information log search
CN107483567B (en) * 2017-08-03 2021-08-10 广州华多网络科技有限公司 Distributed log searching method and system
CN111526048A (en) * 2020-04-16 2020-08-11 深圳市风云实业有限公司 Unified management language adaptation method for multi-model switch
CN111526048B (en) * 2020-04-16 2023-04-18 深圳市风云实业有限公司 Unified management language adaptation method for multi-model switch

Also Published As

Publication number Publication date
CN103457761B (en) 2017-02-08

Similar Documents

Publication Publication Date Title
CN103457761A (en) Cross-platform command line configuration interface implementation method
US20230244454A1 (en) Software defined network controller
CN105224466A (en) A kind of integration test method based on Docker and system
CN102609281B (en) Distributed software patch update method and system
CN102037677B (en) Computer readable medium, northbound interface uniform platform and starting method thereof
WO2012034440A1 (en) Method and device for generating database upgrading script
CN104123227A (en) Method for automatically generating testing cases
CN107947981B (en) Network equipment management method and device
CN104239114A (en) Application compiling method and device
CN103927256A (en) Method for controlling multiple Android devices
CN109116828B (en) Method and device for configuring model codes in controller
CN105893055A (en) Method for triggering process engine platformization
CN105487859A (en) Template based WEB deployment method for big data components
CN103425497A (en) Network engineering script across-manufacturer conversion method and device
US20070220159A1 (en) Tool for data generation for Simple Network Management Protocol (SNMP)
CN102761443A (en) Collocation method and device of command lines
CN105897884B (en) Android phone based on XMPP protocol pushes platform
CN113360386B (en) Method and device for testing driving of switching chip, electronic equipment and storage medium
WO2016197688A1 (en) Data collection method and device
CN105955790A (en) Data processing method and apparatus
CN101572624B (en) Cross-platform cross-method SNMP extension MIB realization method
CN103677854A (en) Design method and design system of OSGI (Open Service Gateway Initiative)-WEB framework applicable to cloud computing environment
US9864740B2 (en) Methods and systems for creating and applying a template driven element adapter
CN109861846A (en) Using call relation acquisition methods, system and storage medium
KR101482668B1 (en) System and method for generating database based on SCL

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20160516

Address after: 100031 Xicheng District West Chang'an Avenue, No. 86, Beijing

Applicant after: State Grid Corporation of China

Applicant after: China Electric Power Research Institute

Applicant after: State Grid Smart Grid Institute

Applicant after: State Grid Shanghai Municipal Electric Power Company

Applicant after: State Grid Jibei Electric Power Company Limited

Applicant after: State Grid Liaoning Electric Power Co., Ltd.

Address before: 100031 Xicheng District West Chang'an Avenue, No. 86, Beijing

Applicant before: State Grid Corporation of China

Applicant before: China Electric Power Research Institute

Applicant before: State Grid Shanghai Municipal Electric Power Company

Applicant before: State Grid Jibei Electric Power Company Limited

Applicant before: State Grid Liaoning Electric Power Co., Ltd.

CB02 Change of applicant information

Address after: 100031 Xicheng District West Chang'an Avenue, No. 86, Beijing

Applicant after: State Grid Corporation of China

Applicant after: China Electric Power Research Institute

Applicant after: GLOBAL ENERGY INTERCONNECTION RESEARCH INSTITUTE

Applicant after: State Grid Shanghai Municipal Electric Power Company

Applicant after: State Grid Jibei Electric Power Company Limited

Applicant after: State Grid Liaoning Electric Power Co., Ltd.

Address before: 100031 Xicheng District West Chang'an Avenue, No. 86, Beijing

Applicant before: State Grid Corporation of China

Applicant before: China Electric Power Research Institute

Applicant before: State Grid Smart Grid Institute

Applicant before: State Grid Shanghai Municipal Electric Power Company

Applicant before: State Grid Jibei Electric Power Company Limited

Applicant before: State Grid Liaoning Electric Power Co., Ltd.

COR Change of bibliographic data
C14 Grant of patent or utility model
GR01 Patent grant