CN1411238A - Method of realizing communication equipment output reorientation - Google Patents
Method of realizing communication equipment output reorientation Download PDFInfo
- Publication number
- CN1411238A CN1411238A CN 02122030 CN02122030A CN1411238A CN 1411238 A CN1411238 A CN 1411238A CN 02122030 CN02122030 CN 02122030 CN 02122030 A CN02122030 A CN 02122030A CN 1411238 A CN1411238 A CN 1411238A
- Authority
- CN
- China
- Prior art keywords
- output
- redirection
- command
- data
- communication device
- 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.)
- Pending
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明公开了一种通信设备输出重定向的实现方法,该方法通过在通信设备的数据输出命令中增加重定向关键字和重定向文件名参数,当用户通过网络向通信设备发出的数据输出命令中带有合法的输出重定向参数时,通信设备的命令处理模块将输出的数据内容存入命令中提供的重定向文件名标识的文件中;采用上述方案,可以保证通信设备输出数据的完整性、实时性和灵活性,解决了对设备分析、维护时实时数据的保存问题,另外,由于利用输出重定向将输出的数据存成文件的形式,有利于通信设备支持本地和远程用户数据共享。
The invention discloses a method for realizing output redirection of a communication device. In the method, by adding redirection keywords and redirection file name parameters in the data output command of the communication device, when the user sends the data output command to the communication device through the network When there is a legal output redirection parameter in the command, the command processing module of the communication device will store the output data content in the file identified by the redirection file name provided in the command; the above scheme can ensure the integrity of the output data of the communication device , real-time and flexibility, which solves the problem of saving real-time data during equipment analysis and maintenance. In addition, because the output redirection is used to save the output data in the form of files, it is beneficial for communication equipment to support local and remote user data sharing.
Description
技术领域technical field
本发明涉及通信设备中的数据输出方法。The present invention relates to a data output method in a communication device.
背景技术Background technique
目前通讯设备在输出自己内部的数据时,例如路由器、交换机等通讯设备在显示自身工作状态和列举现有配置参数时,通常根据用户提供的数据输出命令,将需要输出的数据在设备终端上全部显示出来以供查询,当输出的数据较多时需要直接翻屏查阅,这样只能在终端上对数据进行观察,难以对结果进行分析。另外,在对通讯设备的网上问题进行定位和解决时,由于设备的状态是随时变化的,因此在不同的时刻输出的数据是不同的,特别是在多个用户执行同样的操作时,不同情况下不同的用户得到的结果也可能不同,而最有价值的输出数据可能仅仅是某一个用户得到的某一次结果。另外在输出到用户终端的数据内容较多时,要翻动多屏才能看到后面的内容,而如果用户终端的缓存有限则可能使翻过去的内容丢失。因此,通信设备现有的数据输出方式单一,由于网络情况复杂多变,不同用户不同时间执行数据输出命令得到的结果可能不一样,无法实现信息同步和资源共享,更难以实现对设备的数据定位和跟踪分析。可见通信设备目前提供的数据输出方式不能满足用户的需要。At present, when communication equipment outputs its own internal data, such as routers, switches and other communication equipment, when displaying their own working status and listing existing configuration parameters, they usually output all the data to be output on the equipment terminal according to the data output command provided by the user. It is displayed for query. When there is a lot of output data, you need to turn the screen directly to check it. In this way, you can only observe the data on the terminal, and it is difficult to analyze the results. In addition, when locating and solving online problems of communication equipment, since the status of the equipment changes at any time, the data output at different times is different, especially when multiple users perform the same operation, different situations The results obtained by different users may also be different, and the most valuable output data may only be a certain result obtained by a certain user. In addition, when there is a lot of data content output to the user terminal, it is necessary to turn over multiple screens to see the content behind, and if the buffer memory of the user terminal is limited, the turned over content may be lost. Therefore, the existing data output method of communication equipment is single. Due to the complex and changeable network conditions, the results obtained by different users executing data output commands at different times may be different. It is impossible to realize information synchronization and resource sharing, and it is even more difficult to realize data positioning of equipment. and tracking analysis. It can be seen that the data output methods currently provided by communication devices cannot meet the needs of users.
发明内容Contents of the invention
本发明的目的在于提供一种具有灵活数据输出方式的通信设备中输出重定向的实现方法,使用该方法有利于实现通信设备的信息共享,且有利于对通信设备进行分析维护。The purpose of the present invention is to provide a method for implementing output redirection in a communication device with a flexible data output mode. Using this method is beneficial to realize information sharing of the communication device and facilitate analysis and maintenance of the communication device.
为达到上述目的,本发明提供的通信设备输出重定向的实现方法,包括;In order to achieve the above purpose, the implementation method of communication device output redirection provided by the present invention includes;
a.在通信设备的数据输出命令中增加重定向关键字和重定向文件名参数;a. Add redirect keywords and redirect file name parameters in the data output command of the communication device;
b.当用户通过网络向通信设备发出的数据输出命令中带有合法的输出重定向参数时,通信设备的命令处理模块将输出的数据内容存入命令中提供的重定向文件名标识的文件中。b. When the data output command sent by the user to the communication device through the network has a legal output redirection parameter, the command processing module of the communication device will store the output data content in the file identified by the redirection file name provided in the command .
所述步骤b还包括:Said step b also includes:
通信设备的命令解析模块对用户通过网络发出的数据输出命令进行合法性验证。The command parsing module of the communication device verifies the legality of the data output command sent by the user through the network.
通信设备的命令处理模块对用户通过网络发出的数据输出命令进行是否具有合法的输出重定向参数的判断。The command processing module of the communication device judges whether the data output command sent by the user through the network has legal output redirection parameters.
在将输出的数据写入输出重定向文件前,命令处理模块还要检查存储重定向文件设备的合法性。Before writing the output data into the output redirection file, the command processing module also checks the legitimacy of the device storing the redirection file.
由于本发明在通信设备的数据输出命令中增加了数据输出重定向参数,保证了输出数据的完整性、实时性和灵活性;在输出的数据内容较多时,也不会造成数据的丢失,同时,利用本发明提供的方法可以将输出到终端上的数据内容全部存入文件,不但保证了数据输出的形式统一、内容完整,还将设备处于当时环境的数据保持下来,解决了对设备分析、维护时实时数据的保存问题,另外,由于利用输出重定向将输出的数据存成文件的形式,有利于通信设备支持本地和远程用户数据共享。Since the present invention adds a data output redirection parameter in the data output command of the communication device, the integrity, real-time and flexibility of the output data are guaranteed; when the output data content is large, the loss of data will not be caused, and at the same time , using the method provided by the present invention can store all the data content output to the terminal into a file, which not only ensures the uniform form and complete content of the data output, but also keeps the data of the device in the current environment, which solves the problem of device analysis, The preservation of real-time data during maintenance, in addition, due to the use of output redirection to save the output data in the form of files, it is beneficial for communication equipment to support local and remote user data sharing.
附图说明Description of drawings
图1是本发明所述方法的实施例流程图。Fig. 1 is a flowchart of an embodiment of the method of the present invention.
具体实施方式Detailed ways
下面结合附图对本发明作进一步详细的描述。The present invention will be described in further detail below in conjunction with the accompanying drawings.
图1是本发明所述方法的实施例流程图。按照图1实施本发明,首先要在通信设备的数据输出命令中增加重定向关键字和重定向文件名参数。也就是说,要在通信设备的数据输出命令中,如show命令中,增加一些与数据输出重定向有关的参数,具体包括:重定向关键字、重定向的文件名称。对于数据输出命令来说,重定向关键字是可选的,用于指定本次命令的执行结果是否需要重定向到文件。如果命令中有此关键字表示此命令的执行结果需要重定向到文件中去,如果命令中没有此关键字则表示本次输出不需要重定向,执行常规操作,例如命令执行的结果将直接输出到终端上,如果命令中明确说明要利用重定向功能来实现结果的输出,那么show的结果将改变输出方向,不再传到本地或远程的终端上了,而是作为文件存储在通讯设备上了,因此,增加的数据输出重定向参数具有可选参数的特征。Fig. 1 is a flowchart of an embodiment of the method of the present invention. To implement the present invention according to Fig. 1, firstly, the redirection keyword and the redirection file name parameter should be added in the data output command of the communication device. That is to say, in the data output command of the communication device, such as the show command, some parameters related to data output redirection should be added, specifically including: redirection keyword and redirected file name. For the data output command, the redirect keyword is optional, and is used to specify whether the execution result of this command needs to be redirected to a file. If there is this keyword in the command, it means that the execution result of the command needs to be redirected to the file. If there is no such keyword in the command, it means that the output does not need to be redirected this time, and the normal operation is performed. For example, the result of the command execution will be output directly. On the terminal, if the command clearly states that the redirection function is used to realize the output of the result, then the result of show will change the output direction and will no longer be transmitted to the local or remote terminal, but will be stored as a file on the communication device Therefore, the added data output redirection parameter has the characteristics of an optional parameter.
基于上述内容,当在数据输出命令中指定了重定向参数,就会将输出的数据存储的目标设备(硬盘符或FLASH)上重定向文件名标识的文件中。Based on the above content, when the redirection parameter is specified in the data output command, the output data will be stored in the file identified by the redirected file name on the target device (hard disk letter or FLASH).
具体说,按照图1实施本发明,当用户在步骤1通过网络登录到指定的通信设备输入数据输出命令后,通信设备的命令解析模块在步骤2对用户通过网络发出的数据输出命令进行解析和合法性验证,如果验证未通过,进行步骤8执行失败处理操作,然后结束本次数据输出命令处理;如果验证通过,则将用户输入的命令字符转交设备的命令处理模块,由命令处理模块在步骤3对用户通过网络发出的数据输出命令进行是否具有输出重定向参数进行判断,如果没有输出重定向参数,则进行步骤4执行常规的数据输出操作,例如将数据输出到设备终端,然后结束本次数据输出命令处理;如果在步骤3判断得知用户输入的命令中有输出重定向参数,则由命令处理模块继续在步骤5对用户通过网络发出的数据输出命令进行是否具有合法的输出重定向参数进行判断,如果重定向参数不合法,进行步骤8执行失败处理操作,然后结束本次数据输出命令处理;否则命令处理模块在步骤7将输出的数据写入输出重定向文件前,在步骤6检查存储重定向文件设备的合法性,如果检查未通过,进行步骤8执行失败处理操作,然后结束本次数据输出命令处理;如果检查通过,则通信设备的命令处理模块在步骤7将输出的数据内容通过创建文件和数据写入后关闭文件的过程存入命令中提供的重定向文件名标识的文件中。Specifically, implement the present invention according to Fig. 1, after the user logs in to the specified communication equipment input data output command through the network in step 1, the command analysis module of the communication equipment analyzes and summarizes the data output command sent by the user through the network in step 2 Legitimacy verification, if the verification fails, proceed to step 8 to execute the failure processing operation, and then end the data output command processing; if the verification is passed, the command character input by the user is transferred to the command processing module of the device, and the command processing module is executed in step 8. 3. Determine whether the data output command sent by the user through the network has an output redirection parameter. If there is no output redirection parameter, proceed to step 4 to perform a conventional data output operation, such as outputting data to the device terminal, and then end this session Data output command processing; If judge in step 3 that there is an output redirection parameter in the command input by the user, then the command processing module continues to carry out whether the data output command sent by the user through the network has a legal output redirection parameter in step 5 Make a judgment, if the redirection parameter is illegal, proceed to step 8 to execute the failure processing operation, and then end the data output command processing; otherwise, the command processing module checks in step 6 before writing the output data to the output redirection file in step 7 Store the legitimacy of the redirected file device, if the check fails, proceed to step 8 to execute the failure processing operation, and then end the data output command processing; if the check is passed, the command processing module of the communication device will output the data content in step 7 Go through the process of creating the file and closing the file after writing data into the file identified by the redirected filename provided in the command.
在步骤7具体的执行过程中,命令处理模块还要检测通信设备的存储器是否有足够的空间用来存储文件,如果空间不够将强制结束命令的执行返回错误。最后检测是否存在同名的文件名或路径名,检测通过后在指定的硬件设备上以指定的文件名创建新的文件,之后将输出的内容写入文件中去。输出结束后关闭文件,过程结束。如果在文件的创建、写入、关闭等环节出现了错误,那么将强制结束命令的执行返回错误,并删除残留的文件,防止空间浪费。In the specific execution process of step 7, the command processing module also needs to detect whether the memory of the communication device has enough space to store the file, and if there is not enough space, it will forcefully end the execution of the command and return an error. Finally, check whether there is a file name or path name with the same name. After passing the test, create a new file with the specified file name on the specified hardware device, and then write the output content into the file. The file is closed when the output is complete, and the process ends. If an error occurs during file creation, writing, closing, etc., the execution of the command will be forcibly terminated and an error will be returned, and the remaining files will be deleted to prevent space waste.
在命令执行成功后,可以任意操作这个文件,例如可以在本地通过串口或通过局域网和广域网登录到通讯设备上浏览此文件。也可以利用通讯设备对文件传输协议(FTP协议)等的支持实现本地和远程的文件上传和下载,将文件共享。After the command is executed successfully, this file can be manipulated arbitrarily, for example, you can log in to the communication device locally through the serial port or through the LAN and WAN to browse the file. It is also possible to use the support of the communication device for the file transfer protocol (FTP protocol) to realize local and remote file upload and download, and to share the file.
最后还需说明,重定向文件名称必须与重定向关键字两个参数一同指定才有输出重定向的意义。Finally, it should be noted that the redirection file name must be specified together with the two parameters of the redirection keyword to have the meaning of output redirection.
Claims (5)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 02122030 CN1411238A (en) | 2002-05-31 | 2002-05-31 | Method of realizing communication equipment output reorientation |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 02122030 CN1411238A (en) | 2002-05-31 | 2002-05-31 | Method of realizing communication equipment output reorientation |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN1411238A true CN1411238A (en) | 2003-04-16 |
Family
ID=4745021
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN 02122030 Pending CN1411238A (en) | 2002-05-31 | 2002-05-31 | Method of realizing communication equipment output reorientation |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN1411238A (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN100465937C (en) * | 2003-10-24 | 2009-03-04 | 微软公司 | Method and system for handling file operations in the form of transactions through the network |
| CN100469054C (en) * | 2006-09-26 | 2009-03-11 | 北京大学 | Method and device for redirecting network communication connections |
| CN101193044B (en) * | 2006-11-21 | 2010-05-12 | 北京大学 | Redirection method and device for real time monitoring network activities |
| CN107908576A (en) * | 2017-12-08 | 2018-04-13 | 上海市共进通信技术有限公司 | The method for realizing re-direction applications program standard output control |
| CN111881466A (en) * | 2020-08-06 | 2020-11-03 | 成都卫士通信息产业股份有限公司 | File output method and device, electronic equipment and storage medium |
-
2002
- 2002-05-31 CN CN 02122030 patent/CN1411238A/en active Pending
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN100465937C (en) * | 2003-10-24 | 2009-03-04 | 微软公司 | Method and system for handling file operations in the form of transactions through the network |
| CN100469054C (en) * | 2006-09-26 | 2009-03-11 | 北京大学 | Method and device for redirecting network communication connections |
| CN101193044B (en) * | 2006-11-21 | 2010-05-12 | 北京大学 | Redirection method and device for real time monitoring network activities |
| CN107908576A (en) * | 2017-12-08 | 2018-04-13 | 上海市共进通信技术有限公司 | The method for realizing re-direction applications program standard output control |
| CN111881466A (en) * | 2020-08-06 | 2020-11-03 | 成都卫士通信息产业股份有限公司 | File output method and device, electronic equipment and storage medium |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8539336B2 (en) | System for linking to documents with associated annotations | |
| US11057502B2 (en) | Cloud assisted behavioral automated testing | |
| CN100544292C (en) | A method for automatic testing of broadband access server | |
| CN111475757A (en) | Page update method and device | |
| US7698106B2 (en) | System and method for benchmarking correlated stream processing systems | |
| CN114328172B (en) | A service testing method, device, computer equipment and storage medium | |
| CN109492181A (en) | Method for page jump, device, computer equipment and storage medium | |
| TW201351264A (en) | System and method for storing distributed documents | |
| US9158657B2 (en) | Architecture for remote access to content state | |
| CN1411238A (en) | Method of realizing communication equipment output reorientation | |
| CN110610089A (en) | User behavior simulation method and device and computer equipment | |
| CN109710303A (en) | Multi-version parallel development method and system for voice interactive products | |
| CN101272293A (en) | A network testing method and device | |
| US7650392B1 (en) | Dynamic content processing in a reverse proxy service | |
| CN100423500C (en) | Networked interactive teaching experiment method based on attack and defense and video multicast technology | |
| CN108845956A (en) | The method and apparatus of Application testing | |
| CN109783756A (en) | A kind of creation method of website, server and computer readable storage medium | |
| US8250122B2 (en) | Systems and methods for simultaneous file transfer and copy actions | |
| CN111901325B (en) | Service extension method, device, electronic device and storage medium of honeypot node | |
| CN117149622A (en) | Test method and device based on vehicle-mounted SOA and electronic equipment | |
| CN115062254A (en) | Method, storage medium and device for implementing mock data based on Google browser | |
| CN115470102A (en) | Auxiliary acquisition and networked management system for test data of electronic measuring instrument in manual operation mode | |
| CN120196092B (en) | Static credibility verification function test method and related device for credibility controller | |
| JP5668492B2 (en) | Data processing apparatus, computer program, and data processing method | |
| CN109522187A (en) | Status information rapid extracting method and device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C12 | Rejection of a patent application after its publication | ||
| RJ01 | Rejection of invention patent application after publication |