WO2009033424A1 - Procédé et système d'obtention d'information de commandes d'utilisateur et dispositif pour enregistrer les commandes d'utilisateur - Google Patents

Procédé et système d'obtention d'information de commandes d'utilisateur et dispositif pour enregistrer les commandes d'utilisateur Download PDF

Info

Publication number
WO2009033424A1
WO2009033424A1 PCT/CN2008/072322 CN2008072322W WO2009033424A1 WO 2009033424 A1 WO2009033424 A1 WO 2009033424A1 CN 2008072322 W CN2008072322 W CN 2008072322W WO 2009033424 A1 WO2009033424 A1 WO 2009033424A1
Authority
WO
WIPO (PCT)
Prior art keywords
command
user
intermediate file
information
user command
Prior art date
Application number
PCT/CN2008/072322
Other languages
English (en)
French (fr)
Inventor
Zhongzhou Qu
Gengzhi Rong
Zengzhan Wei
Zhao Zhang
Original Assignee
Huawei Technologies 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 Huawei Technologies Co., Ltd. filed Critical Huawei Technologies Co., Ltd.
Publication of WO2009033424A1 publication Critical patent/WO2009033424A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a method, system, and apparatus for registering user commands for acquiring user command information.
  • the command line interface is a text-based interface between the user and the operating system or application that manages and maintains the system by entering commands.
  • the command line interface is an essential management control method, which is different from the Simple Network Management Protocol (SNMP), Web-based management, etc.:
  • the command line interface passes through a common serial port ( Console )
  • the application or remote login (Telnet ) shell program uses keyboard input commands to monitor the device.
  • GUI graphical user interface
  • the command line interface registration and the actual configuration function are implemented in the device software in the system.
  • the command line interface of each module is called, and the command registered by the user is determined by certain algorithm according to certain data.
  • the structure is organized to generate a command set.
  • the command set is a collection of commands provided to the user. It contains the format, parameter form, online help information, etc. of all commands supported by the system device.
  • FIG. 1 a schematic diagram of a command set generation process provided by the prior art, a command line interface receives a user registration command, and generates a command set by a user registered command according to a certain algorithm. After the command set is generated, the system stores the command set in the system's management memory.
  • the command can be obtained through the command set in the memory.
  • FIG. 2 is a schematic diagram of the operation principle of the command line interface provided by the prior art.
  • the system device uses the parsing engine to The string instruction input by the user is translated into an internally recognizable instruction, and then the command to be used by the user is obtained in the command set according to the instruction, the callback function or the message mechanism, and returned to the user.
  • each service feature requires different levels of configuration commands. In general, thousands of commands are often required for general access devices.
  • the technical problem to be solved by the embodiments of the present invention is to provide a method, a system for acquiring user command information, and a device for registering user commands, which can shorten the command registration time, reduce the length of the code segment during system startup, and can visualize the command. deal with.
  • An embodiment of the present invention provides a method for acquiring user command information, including: receiving a user command registered by a user, and generating a command set according to the user command;
  • the intermediate file is generated by using the command set, and the intermediate file is sent to the system; the system performs command set restoration on the intermediate file to obtain user command information.
  • Another embodiment of the present invention provides a system for acquiring user command information, including: a command registration unit, configured to receive a user command registered by a user, generate a command set according to the user command, and generate an intermediate file by using the command set. ;
  • a storage unit configured to load and store the intermediate file
  • the parsing unit is configured to perform command set restoration on the intermediate file to obtain user command information.
  • Still another embodiment of the present invention provides a computer program product, the computer program product comprising computer program code, when the computer program code is executed by a computer,
  • the computer program code may cause the computer to perform any one of the methods of obtaining user command information provided by the embodiments of the present invention.
  • Still another embodiment of the present invention provides a computer readable storage medium storing computer program code, which when the computer program code is executed by a computer, can cause The computer performs any one of the steps of obtaining the user command information provided by the embodiment of the present invention.
  • the above technical solution has the following beneficial effects: ⁇ Using the command interface registration and command implementation separation method, receiving a user command registered by the user, generating the command set by the user command, and generating the intermediate file from the command set is no longer performed by the original
  • the system software entity is completed, but is completed by another software, such as a command set generation tool, so the command registration process, which takes a lot of time, is separated from the system software, and the intermediate file is loaded into the memory when the system starts.
  • the system performs command set restoration on the intermediate file to obtain command information. It can be seen that this method can shorten the command registration time and reduce the length of the code segment during system startup.
  • FIG. 1 is a schematic diagram of a command set generation process provided by the prior art
  • FIG. 2 is a schematic diagram of a principle of operation of a command line interface provided by the prior art
  • FIG. 3 is a schematic diagram of a command registration separation mechanism according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of an intermediate file according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic diagram of a system according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of an apparatus according to an embodiment of the present invention.
  • Embodiments of the present invention provide a method, a system, and a user command registration device for acquiring user command information, which are used to separate a long-time registration process from a system when a user commands a registration, and directly load the system when the system is started. An intermediate file formed externally, and then parsed to obtain user command information.
  • the present invention will be described in detail below by way of examples:
  • FIG. 3 a schematic diagram of a command registration separation mechanism provided by an embodiment of the present invention is first described:
  • the intermediate file generation tool 101 receives the user command registration, and the intermediate file generation tool 101 generates the intermediate file 102 by the received command in accordance with a certain algorithm, which is partially performed by the device 103 outside the system, for example, on a PC.
  • the intermediate file 104 is loaded into the system memory 104, and the system converts the intermediate file into a command set, which is done by the device 106 within the system.
  • FIG. 4 it is a flowchart provided by an embodiment of the present invention, including:
  • the command registration unit receives a user command registered by the user, and generates a command set according to the received command registered by the user.
  • the process of generating a command set is the same as in the prior art, and will not be described again.
  • the command registration unit generates an intermediate file by using the command set, and the specific generation process may be represented by the following process, for example:
  • the intermediate file is loaded into the memory when the system is started, and the system performs command set restoration on the intermediate file to obtain command information.
  • the parsing process is the inverse process of generating the resource file by the above command set, and can be exemplified as follows:
  • Example 1 The user can modify the attributes of each command element, or the user can add or delete other commands.
  • the command registration unit receives a user command registered by the user, and generates a command set according to the received command registered by the user.
  • the process of generating a command set is the same as in the prior art, and will not be described again.
  • the command registration unit generates an intermediate file by using the command set, and the specific generation process may be represented by the following process, for example:
  • the intermediate file check value is calculated to prevent the information from being overwritten during the information transfer, and the new intermediate file is written.
  • the user modifies the content of the intermediate file to obtain a personalized or differentiated new form intermediate file
  • the intermediate file is loaded into the memory, and the system restores the loaded intermediate file by command set to obtain the user command information.
  • the parsing process is the inverse process of generating the intermediate file by the above command set, and can be exemplified as follows:
  • the command element is a basic unit constituting a command, generally a keyword or a Parameters.
  • the command set is a set of commands provided to the user, and includes formats, parameter forms, online help information, and the like of all commands supported by the device.
  • Example 2 The user classifies the commands according to the command attributes, so that the management users of different departments have different operational capabilities.
  • the command registration unit receives the user command registered by the user, and classifies the user command according to the received user command attribute, for example, level, department, usage scenario, etc., so that different users have different operational capabilities. And generating a command set according to the received command registered by the user.
  • the process of generating a command set is the same as in the prior art and will not be described again.
  • the command registration unit generates an intermediate file by using the command set, and the specific generation process may be represented by the following process, for example:
  • the intermediate file check value is calculated to prevent the information from being overwritten during the information transfer, and the new intermediate file is written.
  • the intermediate file is loaded into the memory when the system is started, and the system performs a command set restoration on the intermediate file to obtain user command information.
  • the parsing process is an inverse of the above command set to generate an intermediate file, which can be exemplified as follows:
  • Example 3 Before the system loads the intermediate file into the memory, the intermediate file is tested offline.
  • the command registration unit receives a user command registered by the user, and generates a command set according to the received command registered by the user. The process of generating a command set is the same as in the prior art, and will not be described again.
  • the intermediate file check value is calculated to prevent the information from being overwritten during the information transfer, and the new intermediate file is written.
  • the user performs offline verification on the generated intermediate file. For example, the user inputs a command through the simulation interface, verifies whether the added or deleted operation command has been executed, and whether the execution result is correct. If the user checks the intermediate file to see if the new command is added after performing the adding operation; after the deletion operation, the user checks whether the corresponding command is deleted from the intermediate file.
  • the intermediate file is loaded into the memory, and the system performs a command set restoration on the intermediate file to obtain user command information.
  • the parsing process is an inverse of the above command set to generate an intermediate file, which can be exemplified as follows:
  • FIG. 5 is a schematic structural diagram of an intermediate file according to an embodiment of the present invention, including: an intermediate file version number 301, an intermediate file overall information 302, a command element overall information 303 of a user command, a command element 1 identifier header 304, and a command element 1 Attribute 1 to Attribute N305, Command Element 2 Identification Header 306, Command Element 2 Attribute 1 to Attribute N307, and Intermediate File Check Value 308.
  • the command element is a basic unit constituting a command, and is generally a keyword or a parameter.
  • FIG. 6 a schematic diagram of a system according to an embodiment of the present invention includes:
  • the command registration unit 401 is configured to receive a user command registered by the user, generate a command set according to the received command of the user registration, and generate an intermediate file by using the command set; for example:
  • the intermediate file check value is calculated to prevent the information from being overwritten during the information transfer, and the new intermediate file is written.
  • a storage unit 402 configured to load and store the intermediate file
  • the parsing unit 403 is configured to perform command set restoration on the intermediate file to obtain command information. This parsing process is the inverse of the command registration unit 401 converting the command set into an intermediate file.
  • the user command registration unit 401 includes:
  • the receiving unit 404 is configured to receive a user command registered by the user
  • a command set generating unit 405, configured to generate a command set according to the user command
  • the converting unit 406 is configured to generate an intermediate file by using the command set.
  • the storage unit 402 and the parsing unit 403 may be integrated on one system or device, and the command registration unit 401 and the storage unit 402 and the parsing unit 43 are located on two different functional entities, for example, a command registration unit.
  • the 401 is located on a PC or other functional entity.
  • the user's command registration process is implemented on the PC.
  • the intermediate file generated on the PC is loaded into the system memory where the storage unit 402 and the parsing unit 403 are located, the storage unit 402 and the parsing unit.
  • the system where the 403 resides performs command set restoration on the loaded intermediate file to obtain user command information.
  • FIG. 7 is a schematic diagram of a device according to an embodiment of the present invention, including:
  • the receiving unit 504 is configured to receive a user command registered by the user.
  • the command set generating unit 505 is configured to generate a command set according to the command registered by the user, and the converting unit 506 is configured to generate an intermediate file by using the command set.
  • the device exists independently, and when other systems or devices need to load intermediate files in the conversion unit 506, they can be connected to the system or device that needs to be loaded.
  • the intermediate files described in the above embodiments include: an intermediate file version number, an intermediate file overall information, command element overall information constituting a user command, all attributes of each command element, and an intermediate file check value.
  • the intermediate file may also include other content as needed.
  • the user command information described in the foregoing embodiments includes information such as a command element constituting a user command and attributes thereof, and the system can perform an operation on the user command through the user command information.
  • the system initialization time can be reduced; since there is no command registration code in the system, the code segment of the system can be reduced; Adjusting the command attributes, such as adding, deleting, and modifying, can also use external devices to classify command attributes, so that management users in different departments have different operational capabilities; therefore, it is convenient to develop value-added services; users can offline
  • the system commands are tested, and then modified and loaded into the system for application, thereby realizing the command visualization operation and avoiding possible risks.
  • the above-mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like.

Description

获取用户命令信息的方法、 系统及用户命令注册的装置 本申请要求于 2007 年 09 月 12 日提交中国专利局、 申请号为 200710149591.9、 发明名称为 "获取用户命令信息的方法、 系统及用户命令注 册的装置" 的中国专利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域
本发明涉及通信技术领域, 尤其涉及一种获取用户命令信息的方法、 系统 及用户命令注册的装置。
背景技术
命令行接口是用户与操作系统或应用程序之间的一种基于文本的接口形 式, 它通过输入命令来实现对系统的管理和维护。 在电信网络设备中, 命令行 接口是必备的管理控制方法,与简单网络管理协议(SNMP, Simple Network Management Protocol ) 、 基于 Web等管理方式所不同的是: 命令行接口通过一 个普通的串口 (console )应用程序或远程登录(Telnet )外壳 (shell)程序使用 键盘输入命令来实现对设备的监控。 尽管业界流行的基于图形用户接口(GUI, graphical user interface)的管理方式可以简洁、直观地完成对系统的配置与管理, 但是对于软件开发人员或系统管理员而言, 命令行接口对于处理重复性或非 常规问题更为有效,现阶段嵌入式网络设备中的大部分支持某种形式的命令行 接口。
现有技术中 ,命令行接口注册和实际配置功能都在系统内设备软件中实现 的, 系统在初始化的时候调用各个模块的命令行接口,把用户注册的命令釆用 某种算法按照一定的数据结构组织起来生成命令集,命令集是提供给用户使用 的命令的集合, 它包含了系统设备所能支持的所有命令的格式、 参数形式、 在 线帮助信息等。 参见图 1 , 为现有技术提供的命令集生成过程示意图, 命令行 接口接收用户注册命令,按照一定的算法将用户注册的命令生成命令集。生成 命令集后系统把命令集存储到系统的管理内存中。 当用户使用命令时, 可通过 该内存中的命令集获取命令, 具体过程参见图 2, 为现有技术提供的命令行接 口操作原理示意图, 当用户要使用一个命令时, 系统设备通过解析引擎把用户 输入的字符串指令翻译成系统内部可辨识的指令, 进而根据该指令、 以及回调 函数或者消息机制在命令集中获取用户要使用的命令, 返回给用户。 对于通讯系统来说, 由于对用户会提供各种不同形式的业务特性, 而每个 业务特性都不同程度的需要形式各异的配置命令。 一般情况下,对于一般的接 入设备往往需要提供上千条命令。这种情况下, 为了有效的管理这些系统配置 命令, 并能在用户下发命令时快速的匹配出指定的命令, 系统需要生成的命令 集结构形式相当复杂, 而命令集越复杂, 再注册新的命令就越困难, 系统就需 要更多的运算量完成命令的注册过程, 也就是说,越迟注册的命令其注册时需 要的运算量就会越多。
在对现有技术的研究和实践过程中, 发明人发现现有技术存在以下问题: 首先,对于一个系统, 生命周期的初始化阶段由于命令注册太多以及命令集生 成算法的复杂性会导致初始化时间会很长; 其次,数量众多的命令注册代码会 占用很多程序区的代码段; 系统命令注册一旦完成, 系统内命令集中命令的格 式、 数目、 属性等就固定下来, 修改起来难度大, 不利于新增特性的开发。 发明内容
本发明实施例要解决的技术问题是提供一种获取用户命令信息的方法、系 统及用户命令注册的装置, 能够缩短系统启动过程中命令注册时间、减少代码 段的长度, 并且可对命令进行可视化处理。
为解决上述技术问题, 本发明实施例提供的一种获取用户命令信息的方 法、 系统及用户命令注册的装置是通过以下技术方案实现的:
本发明一个实施例提供了一种获取用户命令信息的方法, 包括: 接收用户注册的用户命令, 根据所述用户命令生成命令集;
利用所述命令集生成中间文件, 并将所述中间文件发送给系统; 系统对所述中间文件进行命令集还原, 获得用户命令信息。
本发明另一个实施例提供了一种获取用户命令信息的系统, 包括: 命令注册单元, 用于接收用户注册的用户命令,根据所述用户命令生成命 令集, 再利用所述命令集生成中间文件;
存储单元, 用于加载并存储所述中间文件;
解析单元, 用于对中间文件进行命令集还原, 获得用户命令信息。
本发明再一个实施例还提供了一种计算机程序产品,所述计算机程序产品 包括计算机程序代码, 当所述计算机程序代码被一个计算机执行的时候, 所述 计算机程序代码可以使得所述计算机执行本发明实施例提供的获取用户命令 信息的方法中的任意一项步骤。
本发明再一个实施例还提供了一种计算机可读存储介质,所述计算机可读 存储介质存储计算机程序代码,当所述计算机程序代码被一个计算机执行的时 候,所述计算机程序代码可以使得所述计算机执行本发明实施例提供的获取用 户命令信息的方法中的任意一项步骤。
上述技术方案有如下有益效果: 釆用命令接口注册和命令实现分离方法, 将接收用户注册的用户命令,将所述用户命令生成命令集,将所述命令集生成 中间文件的过程不再由原系统软件实体来完成, 而是由另一个软件来完成,如 命令集生成工具,因此把需要花费大量时间的命令注册过程从系统软件中分离 出来, 系统启动时将所述中间文件加载到内存, 系统对所述中间文件进行命令 集还原, 获得命令信息。 由此可见, 釆用这种方式可以缩短系统启动过程中命 令注册时间、 减少代码段的长度。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施 例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地, 下面描述 中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲, 在不付 出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。
图 1为现有技术提供的命令集生成过程示意图;
图 2为现有技术提供的命令行接口操作原理示意图;
图 3为本发明实施例提供的命令注册分离机制示意图;
图 4为本发明实施例提供的方法流程图;
图 5为本发明实施例提供的中间文件结构示意图;
图 6为本发明实施例提供的系统示意图;
图 7为本发明实施例提供的装置示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是 全部的实施例。基于本发明中的实施例, 本领域普通技术人员在没有作出创造 性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。 本发明实施例提供了一种获取用户命令信息的方法、系统及用户命令注册 的装置, 用于用户命令注册时, 将耗时长的注册过程从系统中分离出来, 系统 启动时, 直接加载在系统外部形成的中间文件, 进而解析获取用户命令信息。 本发明下面列举实施例进行详细说明:
参见图 3 , 首先对本发明实施例提供的命令注册分离机制示意图进行描 述:
中间文件生成工具 101接收用户命令注册,该中间文件生成工具 101按一 定算法将接收的命令生成中间文件 102 , 这部分工作在由系统外的设备 103上 完成, 例如在 PC机上完成。 当系统启动时, 将中间文件 104加载到系统内存 104, 系统再将中间文件转换成命令集, 这部分工作由系统内的设备 106完成。
参见图 4, 为本发明实施例提供的流程图, 包括:
201 : 命令注册单元接收用户注册的用户命令, 根据接收的该用户注册的 命令生成命令集。 生成命令集的过程与现有技术中相同, 不再赘述。
202: 所述命令注册单元利用所述命令集生成中间文件, 具体的生成过程 可用如下过程来表示, 例如:
创建一个新的中间文件;
生成中间文件版本号, 写入所述新的中间文件;
获取中间文件总体信息, 写入所述新的中间文件;
获取组成用户命令的命令元素的总体信息, 写入所述新的中间文件; 对每个命令元素的所有属性进行遍历分析, 例如, 命令元素有 N个属性, 对 N个属性都进行分析, 分析结果按顺序写入所述新的中间文件, 例如, 命 令元素 1属性 1 , 命令元素 1属性 2... ...命令元素 1属性 N; 计算中间文件校 验值, 防止信息传输过程中被改写, 写入所述新的中间文件。
203: 系统启动时将所述中间文件加载到内存, 系统对所述中间文件进行 命令集还原,获得命令信息。该解析过程是上述命令集生成资源文件的逆过程, 可举例如下:
根据加载的中间文件版本号、 中间文件总体信息, 获取用户命令的命令元 素总体信息; 根据所述用户命令的命令元素总体信息,及所述中间文件校验值, 获取所 述用户命令信息。
下面对本发明实施例进行具体说明:
例一、用户可以修改每个命令元素的属性,也可以是用户自己新增或删除 其他命令。
11 : 命令注册单元接收用户注册的用户命令, 根据接收的该用户注册的命 令生成命令集。 生成命令集的过程与现有技术中相同, 不再赘述。
12: 所述命令注册单元利用所述命令集生成中间文件, 具体的生成过程可 用如下过程来表示, 例如:
创建一个新的中间文件;
生成中间文件版本号, 写入所述新的中间文件;
获取中间文件总体信息, 写入所述新的中间文件;
获取组成用户命令的命令元素的总体信息, 写入所述新的中间文件; 对每个命令元素的所有属性进行遍历分析, 按顺序写入所述新的中间文 件;
计算中间文件校验值, 防止信息传输过程中被改写, 写入所述新的中间文 件。
13: 用户对所述中间文件的内容进行修改, 获得个性化或者差异化的新形 式中间文件; 或者,
在所述中间文件中增加新的用户命令; 或者,
删除所述中间文件中的用户命令。
14: 系统启动时将中间文件加载到内存, 系统对加载的中间文件进行命令 集还原,获得用户命令信息。该解析过程是上述命令集生成中间文件的逆过程, 可举例如下:
根据加载的中间文件版本号、 中间文件总体信息, 获取用户命令的命令元 素总体信息;
根据所述用户命令的命令元素总体信息,及所述中间文件校验值, 获取所 述用户命令信息。
其中, 所述命令元素为组成命令的基本单位, 一般是一个关键字或者一个 参数。
其中, 所述命令集为提供给用户使用的命令的集合, 它包含了设备中所能 支持的所有命令的格式、 参数形式、 在线帮助信息等。
例二、用户根据命令属性对命令进行分类,从而实现不同部门的管理用户 拥有不同的操作能力。
21 : 命令注册单元接收用户注册的用户命令, 根据接收的用户命令属性, 例如, 级别、 部门、 使用场景等, 对用户命令进行分类, 使不同的用户具有不 同的操作能力。 并根据接收的该用户注册的命令生成命令集。生成命令集的过 程与现有技术中相同, 不再赘述。
22: 所述命令注册单元利用所述命令集生成中间文件, 具体的生成过程可 用如下过程来表示, 例如:
创建一个新的中间文件;
生成中间文件版本号, 写入所述新的中间文件;
获取中间文件总体信息, 写入所述新的中间文件;
获取组成用户命令的命令元素的总体信息, 写入所述新的中间文件; 对每个命令元素的所有属性进行遍历分析, 按顺序写入所述新的中间文 件;
计算中间文件校验值, 防止信息传输过程中被改写, 写入所述新的中间文 件。
23: 系统启动时将所述中间文件加载到内存, 系统对所述中间文件进行命 令集还原, 获得用户命令信息。该解析过程是上述命令集生成中间文件的逆过 程, 可举例如下:
根据加载的中间文件中的中间文件版本号、 中间文件总体信息, 获取用户 命令的命令元素总体信息;
根据所述用户命令的命令元素总体信息,及所述中间文件校验值, 获取所 述用户命令信息。
例三、 系统将中间文件加载到内存之前, 离线对该中间文件进行测试。 31 : 命令注册单元接收用户注册的用户命令,根据接收的该用户注册的命 令生成命令集。 生成命令集的过程与现有技术中相同, 不再赘述。 32: 所述命令注册单元利用所述命令集生成中间文件, 具体的生成过程可 用如下过程来表示, 例如:
创建一个新的中间文件;
生成中间文件版本号, 写入所述新的中间文件;
获取中间文件总体信息, 写入所述新的中间文件;
获取组成用户命令的命令元素的总体信息, 写入所述新的中间文件; 对每个命令元素的所有属性进行遍历分析, 按顺序写入所述新的中间文 件;
计算中间文件校验值, 防止信息传输过程中被改写, 写入所述新的中间文 件。
33: 用户对生成的中间文件进行离线验证, 例如, 用户通过模拟界面输入 命令, 验证加入或删除的操作命令是否已经执行、 及执行结果是否正确。 如执 行增加操作后用户查验中间文件中是否有该新命令增加;执行删除操作后用户 查验对应的命令是否从该中间文件中删除。
34: 系统启动时将所述中间文件加载到内存, 系统对所述中间文件进行命 令集还原, 获得用户命令信息。该解析过程是上述命令集生成中间文件的逆过 程, 可举例如下:
根据加载到中间文件中的中间文件版本号、 中间文件总体信息, 获取用户 命令的命令元素总体信息;
根据所述用户命令的命令元素总体信息,及所述中间文件校验值, 获取所 述用户命令信息。
参见图 5 , 为本发明实施例提供的中间文件的结构示意图, 包括: 中间文件版本号 301、 中间文件总体信息 302、 用户命令的命令元素总体 信息 303、 命令元素 1标识头 304、 命令元素 1属性 1至属性 N305、 命令元素 2标识头 306、 命令元素 2属性 1至属性 N307、 以及中间文件校验值 308。
其中, 所述命令元素为组成命令的基本单位, 一般是一个关键字或者一个 参数。
以上对本发明是实施例提供的方法进行了详细描述,下面对本发明实施例 提供的系统和装置进行描述。 参见图 6, 为本发明实施例提供的系统示意图, 包括:
命令注册单元 401 , 用于接收用户注册的用户命令, 根据接收的用户注册 的命令生成命令集, 再利用所述命令集生成中间文件; 例如:
创建一个新的资源文件;
生成中间文件版本号, 写入所述新的中间文件;
获取中间文件总体信息, 写入所述新的中间文件;
获取组成用户命令的命令元素的总体信息, 写入所述新的中间文件; 对每个命令元素的所有属性进行遍历分析, 按顺序写入所述新的中间文 件;
计算中间文件校验值, 防止信息传输过程中被改写, 写入所述新的中间文 件。
存储单元 402 , 用于加载并存储所述中间文件;
解析单元 403 , 用于对所述中间文件进行命令集还原, 获得命令信息。 该 解析过程为命令注册单元 401将命令集转换成中间文件的逆过程。
其中, 所述用户命令注册单元 401 , 包括:
接收单元 404 , 用于接收用户注册的用户命令;
命令集生成单元 405 , 用于根据所述用户命令生成命令集;
转换单元 406 , 用于利用所述命令集生成中间文件。
其中, 所述存储单元 402和解析单元 403可集成在一个系统或者设备上, 所述命令注册单元 401与所述存储单元 402和解析单元 43位于两个不同的功 能实体上, 例如, 命令注册单元 401位于 PC机上或者其它功能实体上。 用户 的命令注册过程在 PC机上实现, 当存储单元 402和解析单元 403所在系统启 动时, 将 PC机上生成的中间文件加载到存储单元 402和解析单元 403所在系 统内存中,存储单元 402和解析单元 403所在系统对加载的中间文件进行命令 集还原, 获得用户命令信息。
参见图 7 , 为本发明实施例提供的装置示意图, 包括:
接收单元 504 , 用于接收用户注册的用户命令;
命令集生成单元 505 , 用于根据所述用户注册的命令转生成命令集; 转换单元 506 , 用于利用所述命令集, 生成中间文件。 该装置独立存在,当其它系统或者设备需要加载转换单元 506中的中间文 件时, 可与需要加载的系统或者设备连线。
上述各实施例中所述的中间文件包括: 中间文件版本号、 中间文件总体信 息、 组成用户命令的命令元素总体信息、 每个命令元素的所有属性、 中间文件 校验值。 在实际应用中, 根据需要, 中间文件还可以包括其他的内容。
上述各实施例中所述的用户命令信息包括:组成用户命令的命令元素及其 属性等信息, 系统可通过所述用户命令信息执行对用户命令的操作。
以上实施例可以看出,由于用户命令注册过程是在系统的外部装置中进行 的, 因此, 可以使系统初始化时间减少; 由于系统中无命令注册代码, 因此可 减少系统的代码段; 利用外部装置对命令属性进行调整,如增加、删除、修改, 也可利用外部装置对命令属性进行分类,从而实现不同部门的管理用户拥有不 同的操作能力; 因此, 可方便增值业务的开发; 用户可以离线对系统命令进行 测试, 修改无误后再加载到系统中应用, 从而实现命令可视化操作, 规避可能 的分险。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤 是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可 读存储介质中。
上述提到的存储介质可以是只读存储器, 磁盘或光盘等。
以上对本发明所提供的一种获取用户命令信息的方法、系统及用户命令注 册的装置进行了详细介绍,对于本领域的一般技术人员,依据本发明实施例的 思想, 在具体实施方式及应用范围上均会有改变之处, 综上所述, 本说明书内 容不应理解为对本发明的限制。

Claims

权 利 要 求
1、 一种获取用户命令信息的方法, 其特征在于, 包括:
接收用户注册的用户命令, 根据所述用户命令生成命令集;
利用所述命令集生成中间文件, 并将所述中间文件发送给系统;
系统对所述中间文件进行命令集还原, 获得用户命令信息。
2、 根据权利要求 1所述的方法, 其特征在于, 所述中间文件, 至少包括: 中间文件版本号、中间文件总体信息、组成用户命令的命令元素总体信息、 每个命令元素的所有属性、 中间文件校验值。
3、 根据权利要求 2所述的方法, 其特征在于, 所述系统对所述中间文件 进行命令集还原, 包括:
系统根据所述中间文件版本号、 中间文件总体信息, 获取用户命令的命令 元素总体信息; 根据所述用户命令的命令元素总体信息, 及所述中间文件校验 值, 获取所述用户命令信息。
4、 根据权利要求 1所述的方法, 其特征在于, 所述将所述命令集生成中 间文件之后, 进一步包括:
用户对所述中间文件中每个命令元素的属性进行修改; 或者,
在所述中间文件中增加新的用户命令; 或者,
删除所述中间文件中的用户命令。
5、 根据权利要求 4所述的方法, 其特征在于, 系统启动时将所述中间文 件加载到内存之前, 包括:
执行增加操作后用户查验中间文件中是否有新命令增加; 或者,
执行删除操作后用户查验对应的命令是否从该中间文件中删除。
6、 根据权利要求 1所述的方法, 其特征在于, 所述接收用户注册的用户 命令之后, 进一步包括:
根据用户命令属性对用户命令进行分类,使不同的用户具有不同的操作能 力。
7、 一种计算机程序产品, 其特征在于, 所述计算机程序产品包括计算机 程序代码, 当所述计算机程序代码被一个计算机执行的时候, 所述计算机程序 代码可以使得所述计算机执行权利要求 1至 6项中任意一项的步骤。
8、 一种计算机可读存储介质, 其特征在于, 所述计算机可读存储介质存 储计算机程序代码, 当所述计算机程序代码被一个计算机执行的时候, 所述计 算机程序代码可以使得所述计算机执行权利要求 1至 6项中任意一项的步骤。
9、 一种获取用户命令信息的系统, 其特征在于, 包括:
命令注册单元, 用于接收用户注册的用户命令,根据所述用户命令生成命 令集, 再利用所述命令集生成中间文件;
存储单元, 用于加载并存储所述中间文件;
解析单元, 用于对所述中间文件进行命令集还原, 获得用户命令信息。
10、 根据权利要求 9所述的系统, 其特征在于, 所述用户命令注册单元, 包括:
接收单元, 用于接收用户注册的用户命令;
命令集生成单元, 用于根据所述用户命令生成命令集;
转换单元, 用于利用所述命令集生成中间文件。
11、 根据权利要求 9所述的系统, 其特征在于, 所述存储单元和解析单元 与所述命令注册单元位于两个不同的功能实体上。
PCT/CN2008/072322 2007-09-12 2008-09-10 Procédé et système d'obtention d'information de commandes d'utilisateur et dispositif pour enregistrer les commandes d'utilisateur WO2009033424A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CNA2007101495919A CN101136780A (zh) 2007-09-12 2007-09-12 获取用户命令信息的方法、系统及用户命令注册的装置
CN200710149591.9 2007-09-12

Publications (1)

Publication Number Publication Date
WO2009033424A1 true WO2009033424A1 (fr) 2009-03-19

Family

ID=39160638

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2008/072322 WO2009033424A1 (fr) 2007-09-12 2008-09-10 Procédé et système d'obtention d'information de commandes d'utilisateur et dispositif pour enregistrer les commandes d'utilisateur

Country Status (2)

Country Link
CN (1) CN101136780A (zh)
WO (1) WO2009033424A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101924656A (zh) * 2010-08-26 2010-12-22 北京天融信科技有限公司 一种基于动态配置的网络设备cli实现方法和装置
CN105183507A (zh) * 2015-08-24 2015-12-23 汉柏科技有限公司 一种应用程序间版本的匹配方法及系统

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101136780A (zh) * 2007-09-12 2008-03-05 华为技术有限公司 获取用户命令信息的方法、系统及用户命令注册的装置
CN101958905B (zh) * 2010-09-29 2013-06-19 山东中创软件工程股份有限公司 一种命令管理方法、装置及系统
CN103488524A (zh) * 2012-06-13 2014-01-01 北大方正集团有限公司 命令管理装置及其命令管理方法
CN104579743B (zh) * 2014-12-02 2017-12-05 大唐移动通信设备有限公司 一种电信设备远端维护的方法和系统
CN108762736B (zh) * 2018-03-21 2022-09-02 五八有限公司 项目分支的管理方法、装置、设备及计算机可读存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6243862B1 (en) * 1998-01-23 2001-06-05 Unisys Corporation Methods and apparatus for testing components of a distributed transaction processing system
US6311320B1 (en) * 1998-12-07 2001-10-30 Lsi Logic Corporation Alterable scripting tool and method
CN1336770A (zh) * 2000-09-15 2002-02-20 深圳市中兴通讯股份有限公司 路由器操作维护与配置命令的命令存储和命令解释方法
CN1419191A (zh) * 2001-10-31 2003-05-21 亚普公司 中间代码执行系统、中间代码执行方法与执行中间代码的计算机程序产品
CN1501235A (zh) * 2002-11-14 2004-06-02 深圳市中兴通讯股份有限公司上海第二 基于纯文本的命令脚本文件的人机命令实现方法
CN101136780A (zh) * 2007-09-12 2008-03-05 华为技术有限公司 获取用户命令信息的方法、系统及用户命令注册的装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6243862B1 (en) * 1998-01-23 2001-06-05 Unisys Corporation Methods and apparatus for testing components of a distributed transaction processing system
US6311320B1 (en) * 1998-12-07 2001-10-30 Lsi Logic Corporation Alterable scripting tool and method
CN1336770A (zh) * 2000-09-15 2002-02-20 深圳市中兴通讯股份有限公司 路由器操作维护与配置命令的命令存储和命令解释方法
CN1419191A (zh) * 2001-10-31 2003-05-21 亚普公司 中间代码执行系统、中间代码执行方法与执行中间代码的计算机程序产品
CN1501235A (zh) * 2002-11-14 2004-06-02 深圳市中兴通讯股份有限公司上海第二 基于纯文本的命令脚本文件的人机命令实现方法
CN101136780A (zh) * 2007-09-12 2008-03-05 华为技术有限公司 获取用户命令信息的方法、系统及用户命令注册的装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101924656A (zh) * 2010-08-26 2010-12-22 北京天融信科技有限公司 一种基于动态配置的网络设备cli实现方法和装置
CN105183507A (zh) * 2015-08-24 2015-12-23 汉柏科技有限公司 一种应用程序间版本的匹配方法及系统

Also Published As

Publication number Publication date
CN101136780A (zh) 2008-03-05

Similar Documents

Publication Publication Date Title
US9830135B2 (en) Declarative and pluggable business logic for systems management
US9424003B1 (en) Schema-less system output object parser and code generator
US10142180B2 (en) Method and system for providing unified configuration information to disparate system software components
US10656971B2 (en) Agile framework for vertical application development and delivery
WO2017054531A1 (zh) 一种基于yang模型的编译方法、及对应的接口、组件和系统
WO2009033424A1 (fr) Procédé et système d'obtention d'information de commandes d'utilisateur et dispositif pour enregistrer les commandes d'utilisateur
US9459859B2 (en) Template derivation for configuration object management
US20110113340A1 (en) Information-processing device, communication system, computer readable medium, and information-processing method
KR20060099392A (ko) 웹 서비스 환경 내에서 통신하도록 개발되지 않은 레거시애플리케이션 컴포넌트를 위한 동적인 웹 서비스를생성하는 방법 및 컴퓨터 프로그램 제품
US20080250385A1 (en) Automating the deployment of applications
TW201439792A (zh) 資料庫訪問系統及方法
US9043218B2 (en) Rule compliance using a configuration database
US20080021842A1 (en) Constructing user interfaces on top of cmdlets
CN104731943A (zh) 一种服务器和数据处理方法
US9626251B2 (en) Undo configuration transactional compensation
CN112988409B (zh) 一种接口调用方法、装置、计算机设备及存储介质
JP7291764B2 (ja) イーサリアム仮想マシンのトランザクション処理方法、装置、機器、プログラムおよび媒体
US20090049163A1 (en) Dynamically typed extensible mib for snmp agents
CN114048415A (zh) 表单生成方法及装置、电子设备和计算机可读存储介质
US20190340005A1 (en) Method and system for lifecycle management optimization
WO2023246486A1 (zh) 一种创建连接器的方法及装置
US8051191B2 (en) Ethernet extensibility
WO2021012554A1 (zh) 区块链中数据字段的更新方法、装置、介质、电子设备
WO2023143545A1 (zh) 资源处理方法、装置、电子设备及计算机可读存储介质
CN114389936A (zh) 一种跨云多集群部署运维方法、系统、处理器和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 08831131

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 08831131

Country of ref document: EP

Kind code of ref document: A1