Method and system for analyzing results of command execution based on virtual terminal

By creating a virtual terminal window in the communication network operation and maintenance, parsing and formatting command execution result data, the problems of difficulty in judging command end marks and data garbled characters are solved, and the complete restoration of command results and handling of data dependencies are realized.

CN114564279BActive Publication Date: 2026-02-24INSPUR TIANYUAN COMM INFORMATION SYST CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210058253.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-19
Publication Date
2026-02-24
Estimated Expiration
2042-01-19

AI Technical Summary

Technical Problem

Existing technologies cannot effectively determine the position of command terminators in communication network operation and maintenance, resulting in incomplete or out-of-order command results. Furthermore, ANSI and VT100 terminal control characters are mixed in the text results, causing garbled characters and making it impossible to handle data dependencies between commands.

Method used

By creating a virtual terminal window, the command execution result data is parsed and filtered in memory, control characters are removed and formatted based on ANSI and VT100 formats, valid text characters are extracted, and valid data is analyzed using regular expressions and word segmentation methods.

Benefits of technology

It achieves complete restoration of command results and handling of data dependencies, removes control character sequences, restores the original style of command results, and facilitates subsequent processing and information extraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114564279B_ABST
    Figure CN114564279B_ABST
Patent Text Reader

Abstract

The application discloses a command execution result analysis method and system based on a virtual terminal, belongs to the technical field of command batch processing, and aims to solve the technical problem of how to analyze command execution results, remove invalid characters, process data dependency between commands, and effectively extract valid data. The method comprises the following steps: after a command is sent to a target device, a virtual terminal window is created in a memory; command execution result data returned is appended to the virtual terminal window, the command execution result data comprises text characters and control characters, and the control characters comprise ANSI format and VT100 format characters; the command execution result data is analyzed and screened, the control characters are removed, the extracted text characters are reserved in the memory, the text characters are formatted based on the control characters, and final command execution result data is obtained; and the final command execution result data is analyzed, and valid command execution result information is extracted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of command batch processing technology, specifically to a method and system for analyzing command execution results based on a virtual terminal. Background Technology

[0002] In communication network operation and maintenance, batch processing operations on multiple network devices or host devices are frequently required. A common approach is to automate the execution of a batch of commands in an unattended manner. Traditional batch processing typically involves issuing commands, receiving command results and checking for command termination characters; if a termination character is present, the next command is issued, and this process is repeated until all commands have been executed. While traditional batch processing is convenient, it has several drawbacks, such as:

[0003] (1) When there is no command terminator in the execution result or the command terminator is also included in other positions in the result, it will be impossible to effectively determine the position of the terminator, resulting in incomplete command results or batch execution disorder.

[0004] (2) The execution results contain not only readable text characters, but also ANSI and VT100 terminal control characters. These control characters are mixed in with the normal text results, which not only interferes with the judgment of the command end character, but also causes a large number of garbled characters in the recorded results, which is not conducive to the analysis of command execution results.

[0005] (3) It cannot handle data dependencies between commands. Sometimes, the input parameters of the next command depend on the data in the result of the previous command.

[0006] Based on the above, the technical problems that need to be solved are how to analyze the command execution results, remove invalid characters, handle the data dependencies between commands, and effectively extract valid data. Summary of the Invention

[0007] The technical objective of this invention is to address the above-mentioned shortcomings by providing a method and system for analyzing command execution results based on virtual terminals, thereby solving the technical problems of how to analyze command execution results, remove invalid characters, handle data dependencies between commands, and effectively extract valid data.

[0008] In a first aspect, the command execution result analysis method based on a virtual terminal of the present invention includes the following steps:

[0009] After sending a command to the target device, a virtual terminal window is created in memory;

[0010] The returned command execution result data is appended to the virtual terminal window. The command execution result data includes text characters and control characters. The control characters include characters in ANSI format and VT100 format.

[0011] The command execution result data is parsed and filtered to remove control characters and retain the extracted text characters in memory. The text characters are then formatted based on the control characters to obtain the final command execution result data, which restores the original format and content of the command execution result.

[0012] Analyze the final command execution result data to extract valid command execution result information.

[0013] Preferably, a fixed-row, fixed-column two-dimensional character array is allocated in memory, which serves as a cache for storing text characters.

[0014] As a preferred approach, when parsing and filtering the command execution result data, removing control characters and retaining the extracted text characters in memory, and formatting the text characters based on the control characters, for the character stream corresponding to the command execution result data, one character is read sequentially, and for each character, the following operations are performed:

[0015] For each character, determine whether the current character is greater than 31;

[0016] If the current character is greater than 31, it indicates that the current character is a text character, and the current character is stored in memory;

[0017] If the current character is less than 31, it means that the current character is a control character;

[0018] For control characters, determine whether the current character is an ESC character, where the ESC character is the identifier of the ABSI sequence;

[0019] If the current character is an ESC character, it means that the current character is an ANSI sequence. The cached Chinese characters are formatted based on the ANSI sequence.

[0020] If the current character is not the ESC character, determine whether the current character is another control character, which includes carriage return, newline, backspace and tab characters;

[0021] If the current character is another control character, format the text characters in the cache based on the other control characters.

[0022] If the current character is not another control character, discard the current character and read the next character.

[0023] As a preferred method, when storing the current character in memory, it is determined whether the current column in the cache is the largest column. If it is, the position of the current text character in the cache is: row position incremented by 1 and column position set to 0. If the current column is not the largest column, the positions of the current row and column in the cache are updated.

[0024] Preferably, the ANSI sequence uses the ESC character as an identifier, including cursor movement instructions, screen clearing instructions, character rendering instructions, and terminal control instructions;

[0025] The formatting of Chinese characters in the cache based on ANSI sequences includes the following steps:

[0026] Read an ANSI sequence;

[0027] Determine whether the ANSI sequence is a cursor movement instruction; if so, update the current row and column position in the cache.

[0028] If it is not a cursor movement instruction, determine whether the ANSI sequence is a screen clearing and movement instruction. If it is a screen clearing and movement instruction, reset the cache content from the position corresponding to the current row and column in the cache.

[0029] If it is not a cursor movement instruction, determine whether the ANSI sequence is a terminal control instruction. If it is, correct the content in the cache based on the instruction content corresponding to the ANSI sequence.

[0030] If it is not a terminal control instruction, discard the character corresponding to the current ANSI sequence.

[0031] Alternatively, the final command execution result data can be analyzed by scanning to extract valid command execution result information, or the final command execution result data can be analyzed based on regular expressions and word segmentation methods to extract valid command execution result information.

[0032] In a second aspect, the command execution result analysis system based on a virtual terminal of the present invention is used to analyze command execution results using the command execution result analysis method based on a virtual terminal as described in any one of the first aspects, the system comprising:

[0033] A configuration module, which is used to create a virtual terminal window in memory after sending a command to the target device;

[0034] A reading module is used to append command execution result data to a virtual terminal window. The command execution result data includes text characters and control characters, and the control characters include characters in ANSI format and VT100 format.

[0035] The parsing and filtering module is used to parse and filter the command execution result data, remove control characters and retain the extracted text characters in memory, and format the text characters based on the control characters to obtain the final command execution result data. The final command execution result data restores the original format and content of the command execution result.

[0036] The information extraction module is used to analyze the final command execution result data and extract valid command execution result information.

[0037] Preferably, the configuration module is used to allocate a fixed-row, two-dimensional character array in memory, which serves as a cache for storing text characters.

[0038] Preferably, for the character stream corresponding to the command execution result data, the parsing and filtering module is used to read one character at a time, and for each character, perform the following operations:

[0039] For each character, determine whether the current character is greater than 31;

[0040] If the current character is greater than 31, it indicates that the current character is a text character, and the current character is stored in memory;

[0041] If the current character is less than 31, it means that the current character is a control character;

[0042] For control characters, determine whether the current character is an ESC character, where the ESC character is the identifier of the ABSI sequence;

[0043] If the current character is an ESC character, it means that the current character is an ANSI sequence. The cached Chinese characters are formatted based on the ANSI sequence.

[0044] If the current character is not the ESC character, determine whether the current character is another control character, which includes carriage return, newline, backspace and tab characters;

[0045] If the current character is another control character, format the text characters in the cache based on the other control characters.

[0046] If the current character is not another control character, discard the current character and read the next character;

[0047] The parsing and filtering module is used to determine whether the current column in the cache is the largest column when storing the current character in memory. If it is, the position of the current text character in the cache is: row position incremented by 1 and column position set to 0. If the current column is not the largest column, the position of the current row and column in the cache is updated.

[0048] The ANSI sequence uses the ESC character as an identifier and includes cursor movement instructions, screen clearing instructions, character rendering instructions, and terminal control instructions.

[0049] The parsing and filtering module is used to format Chinese characters in the cache based on ANSI sequences through the following steps:

[0050] Read an ANSI sequence;

[0051] Determine whether the ANSI sequence is a cursor movement instruction; if so, update the current row and column position in the cache.

[0052] If it is not a cursor movement instruction, determine whether the ANSI sequence is a screen clearing and movement instruction. If it is a screen clearing and movement instruction, reset the cache content from the position corresponding to the current row and column in the cache.

[0053] If it is not a cursor movement instruction, determine whether the ANSI sequence is a terminal control instruction. If it is, correct the content in the cache based on the instruction content corresponding to the ANSI sequence.

[0054] If it is not a terminal control instruction, discard the character corresponding to the current ANSI sequence.

[0055] Preferably, the information extraction module is configured to analyze the final command execution result data by scanning to extract valid command execution result information, and to analyze the final command execution result data based on regular expressions and word segmentation methods to extract valid command execution result information.

[0056] The command execution result analysis method and system based on virtual terminals of the present invention have the following advantages:

[0057] 1. It implemented the parsing of the character stream of command return results, removed the control character sequence, restored the original style of the results, laid the foundation for future processing, and met various needs;

[0058] 2. By using a virtual terminal to parse the control character sequence in the character stream, the execution result of the command was restored, which was consistent with the effect seen on the display screen;

[0059] 3. The complete execution results of the command are saved to the cache, where the full result of the command is reconstructed. This facilitates subsequent processing. Regular expressions can be used to precisely match the position of the command terminator, and other useful information can also be extracted. Attached Figure Description

[0060] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0061] The invention will be further described below with reference to the accompanying drawings.

[0062] Figure 1 This is a flowchart of the command execution result analysis method based on a virtual terminal in Example 1;

[0063] Figure 2 This is a schematic diagram of the CO list in the command execution result analysis method based on a virtual terminal in Example 1;

[0064] Figures 3-4 This is a schematic diagram of ANSI escape codes in the command execution result analysis method based on a virtual terminal in Example 1;

[0065] Figure 5 This is a data stream processing block diagram in the command execution result analysis method based on a virtual terminal in Example 1;

[0066] Figure 6 This is a flowchart of the ANSI sequence-based formatting process in the command execution result analysis method based on virtual terminals in Example 1. Detailed Implementation

[0067] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments are not intended to limit the present invention. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.

[0068] This invention provides a method and system for analyzing command execution results based on a virtual terminal, which solves the technical problems of how to analyze command execution results, remove invalid characters, handle data dependencies between commands, and effectively extract valid data.

[0069] Example 1:

[0070] This invention relates to a command execution result analysis method based on a virtual terminal, such as... Figure 1 As shown, the method includes the following steps:

[0071] S100. After sending the command to the target device, a virtual terminal window is created in memory.

[0072] S200. Append the returned command execution result data to the virtual terminal window. The command execution result data includes text characters and control characters. The control characters include characters in ANSI format and VT100 format.

[0073] S300: Parse and filter the command execution result data, remove control characters and retain the extracted text characters in memory, and format the text characters based on the control characters to obtain the final command execution result data. The final command execution result data restores the original format and content of the command execution result.

[0074] S400: Analyze the final command execution result data and extract valid command execution result information.

[0075] A terminal, also called a command line, is most famously represented by the VT100 series. Most terminal software available today is essentially a terminal device emulator. In computer systems, ANSI escape codes (or escape sequences) are a method of controlling the format, color, and other output options of a video text terminal using in-band signals. ANSI escape sequences are a standard of in-band signal escape sequences used to control the cursor position, color, and other options on a video text terminal. By embedding specific byte sequences in the text, mostly beginning with the ESC escape character and the "[" character, the terminal interprets these byte sequences as corresponding instructions, rather than ordinary character encoding.

[0076] In this embodiment, in order to parse ANSI escape codes, a fixed-row, two-dimensional character array needs to be allocated in memory as a buffer to store visible text characters. The original character stream of the result after command execution is received, the ANSI escape codes in the original character stream are removed, and the original format and content of the command result are restored.

[0077] In addition to escape sequences, the character stream also contains a few control C0 codes, typically BEL, BS, CR, LF, FF, TAB, VT, SO, and SI, which also need to be processed. The sequences have different lengths. All sequences begin with the ASCII character ESC (decimal 27, or hexadecimal 0x1B, or octal 033, or the escape character \e), and the second byte is a character in the range 0x40–0x5F (ASCII @A–Z[]^_).

[0078] like Figure 5 As shown, the analysis process is as follows:

[0079] For the character stream corresponding to the command execution result data, read one character at a time, and perform the following operation for each character:

[0080] (1) For each character, determine whether the current character is greater than 31;

[0081] (2) If the current character is greater than 31, it means that the current character is a text character, and the current character is stored in memory;

[0082] (3) If the current character is less than 31, it means that the current character is a control character;

[0083] (4) For control characters, determine whether the current character is an ESC character, where the ESC character is the identifier of the ABSI sequence;

[0084] (5) If the current character is an ESC character, it means that the current character is an ANSI sequence. The cached Chinese characters are formatted based on the ANSI sequence.

[0085] (6) If the current character is not the ESC character, determine whether the current character is another control character, including carriage return, newline, backspace and tab characters;

[0086] (7) If the current character is another control character, format the text characters in the cache based on the current other control character;

[0087] (8) If the current character is not another control character, discard the current character and read the next character.

[0088] In step (2), when storing the current character in memory, it is determined whether the current column in the cache is the largest column. If it is, the position of the current text character in the cache is: row position plus 1 and column position is 0. If the current column is not the largest column, the position of the current row and column in the cache is updated.

[0089] In ANSI escape sequences, those starting with ESC are called Control Sequence Introducers, abbreviated as CSI. There are many instructions starting with CSI, which can be broadly categorized into four types: cursor movement instructions, screen clearing instructions, character rendering (GraphicRendition) instructions, and terminal control instructions. When processing data in a character stream, the buffer is treated as a display screen, filling the data screen by screen to ultimately assemble the command result.

[0090] This embodiment formats the text characters in the cache based on ANSI sequences, such as... Figure 6 As shown, it includes the following steps:

[0091] (1) Read an ANSI sequence;

[0092] (2) Determine if the ANSI sequence is a cursor movement instruction. If it is, update the current row and column position in the buffer.

[0093] (3) If it is not a cursor movement instruction, determine whether the ANSI sequence is a screen clearing and movement instruction. If it is a screen clearing and movement instruction, reset the cache content from the position corresponding to the current row and column in the cache.

[0094] (4) If it is not a cursor movement instruction, determine whether the ANSI sequence is a terminal control instruction. If it is, correct the contents in the cache based on the instruction content corresponding to the ANSI sequence.

[0095] (5) If it is not a terminal control instruction, discard the character corresponding to the current ANSI sequence.

[0096] The method in this embodiment stores the command execution result data in a virtual terminal data structure in memory. It preprocesses the ANSI and VT100 data, filtering out useless control characters and retaining only the useful text content. Because all received content is cached and reconstructed in memory, it can handle both cases where the command terminator is missing and cases where the terminator appears multiple times in the result. Furthermore, it can scan the cached content and use a search algorithm to extract key content, resolving dependencies between commands.

[0097] Example 2:

[0098] This invention relates to a command execution result analysis system based on a virtual terminal, comprising a configuration module, a reading module, a parsing and filtering module, and an information extraction module. The configuration module creates a virtual terminal window in memory after sending a command to the target device. The reading module appends command execution result data to the virtual terminal window; the command execution result data includes text characters and control characters, with the control characters including ANSI and VT100 format characters. The parsing and filtering module parses and filters the command execution result data, removing control characters and retaining the extracted text characters in memory. It then formats the text characters based on the control characters to obtain the final command execution result data, which restores the original format and content of the command execution result. The information extraction module analyzes the final command execution result data and extracts valid command execution result information.

[0099] The configuration module is used to allocate a fixed-row, two-dimensional character array in memory, which serves as a cache for storing text characters.

[0100] For the character stream corresponding to the command execution result data, the parsing and filtering module reads one character at a time, and performs the following operations for each character:

[0101] (1) For each character, determine whether the current character is greater than 31;

[0102] (2) If the current character is greater than 31, it means that the current character is a text character, and the current character is stored in memory;

[0103] (3) If the current character is less than 31, it means that the current character is a control character;

[0104] (4) For control characters, determine whether the current character is an ESC character, where the ESC character is the identifier of the ABSI sequence;

[0105] (5) If the current character is an ESC character, it means that the current character is an ANSI sequence. The cached Chinese characters are formatted based on the ANSI sequence.

[0106] (6) If the current character is not the ESC character, determine whether the current character is another control character, including carriage return, newline, backspace and tab characters;

[0107] (7) If the current character is another control character, format the text characters in the cache based on the current other control character;

[0108] (8) If the current character is not another control character, discard the current character and read the next character.

[0109] This parsing and filtering module is used to determine whether the current column in the cache is the maximum column when storing the current character in memory. If it is, the position of the current text character in the cache is: row position incremented by 1 and column position set to 0. If the current column is not the maximum column, the positions of the current row and column in the cache are updated.

[0110] In the ANSI sequence, the ESC character is used as an identifier, including cursor movement instructions, screen clearing instructions, character rendering instructions, and terminal control instructions. The parsing and filtering module in this embodiment is used to format the cached text characters based on the ANSI sequence through the following steps:

[0111] (1) Read an ANSI sequence;

[0112] (2) Determine if the ANSI sequence is a cursor movement instruction. If it is, update the current row and column position in the buffer.

[0113] (3) If it is not a cursor movement instruction, determine whether the ANSI sequence is a screen clearing and movement instruction. If it is a screen clearing and movement instruction, reset the cache content from the position corresponding to the current row and column in the cache.

[0114] (4) If it is not a cursor movement instruction, determine whether the ANSI sequence is a terminal control instruction. If it is, correct the contents in the cache based on the instruction content corresponding to the ANSI sequence.

[0115] (5) If it is not a terminal control instruction, discard the character corresponding to the current ANSI sequence.

[0116] The system in this embodiment can execute the command execution result analysis method based on virtual terminal disclosed in Embodiment 1.

[0117] The present invention has been shown and described in detail above with reference to the accompanying drawings and preferred embodiments. However, the present invention is not limited to these disclosed embodiments. Based on the above embodiments, those skilled in the art will know that more embodiments of the present invention can be obtained by combining the code review methods in the different embodiments. These embodiments are also within the protection scope of the present invention.

Claims

1. A method for analyzing command execution results based on a virtual terminal, characterized in that... Includes the following steps: After sending a command to the target device, a virtual terminal window is created in memory, and a two-dimensional character array with fixed rows and columns is allocated in memory. The two-dimensional character array serves as a cache for storing text characters. The returned command execution result data is appended to the virtual terminal window. The command execution result data includes text characters and control characters. The control characters include characters in ANSI format and VT100 format. The command execution result data is parsed and filtered to remove control characters and retain the extracted text characters in memory. The text characters are then formatted based on the control characters to obtain the final command execution result data, which restores the original format and content of the command execution result. Analyze the final command execution result data and extract valid command execution result information; Specifically, when parsing and filtering the command execution result data, removing control characters and retaining the extracted text characters in memory, and formatting the text characters based on the control characters, for the character stream corresponding to the command execution result data, one character is read sequentially, and for each character, the following operations are performed: For each character, determine whether the current character is greater than 31; If the current character is greater than 31, it indicates that the current character is a text character, and the current character is stored in memory; If the current character is less than 31, it means that the current character is a control character; For control characters, determine whether the current character is an ESC character, where the ESC character is the identifier of the ANSI sequence; If the current character is an ESC character, it means that the current character is an ANSI sequence. The cached Chinese characters are formatted based on the ANSI sequence. If the current character is not the ESC character, determine whether the current character is another control character, including carriage return, newline, backspace, and tab characters; If the current character is another control character, format the text characters in the cache based on the other control characters. If the current character is not another control character, discard the current character and read the next character; When storing the current character in memory, it is determined whether the current column in the cache is the maximum column. If it is, the position of the current text character in the cache is: row position incremented by 1 and column position set to 0. If the current column is not the maximum column, the positions of the current row and column in the cache are updated. The ANSI sequence uses the ESC character as an identifier and includes cursor movement instructions, screen clearing instructions, character rendering instructions, and terminal control instructions. The formatting of Chinese characters in the cache based on ANSI sequences includes the following steps: Read an ANSI sequence; Determine whether the ANSI sequence is a cursor movement instruction; if so, update the current row and column position in the cache. If it is not a cursor movement instruction, determine whether the ANSI sequence is a screen clearing and movement instruction. If it is a screen clearing and movement instruction, reset the cache content from the position corresponding to the current row and column in the cache. If it is not a screen clearing and moving command, determine whether the ANSI sequence is a terminal control command. If it is, correct the content in the cache based on the command content corresponding to the ANSI sequence. If it is not a terminal control instruction, discard the character corresponding to the current ANSI sequence; This can be achieved by analyzing the final command execution result data through scanning to extract valid command execution result information, or by analyzing the final command execution result data based on regular expressions and word segmentation methods to extract valid command execution result information.

2. A command execution result analysis system based on a virtual terminal, characterized in that... The system is used to analyze command execution results using the command execution result analysis method based on a virtual terminal as described in claim 1, the system comprising: The configuration module is used to create a virtual terminal window in memory after sending a command to the target device, and to allocate a fixed-row, two-dimensional character array in memory, which serves as a cache for storing text characters. A reading module is used to append command execution result data to a virtual terminal window. The command execution result data includes text characters and control characters, and the control characters include characters in ANSI format and VT100 format. The parsing and filtering module is used to parse and filter the command execution result data, remove control characters and retain the extracted text characters in memory, and format the text characters based on the control characters to obtain the final command execution result data. The final command execution result data restores the original format and content of the command execution result. An information extraction module is used to analyze the final command execution result data and extract valid command execution result information; Specifically, for the character stream corresponding to the command execution result data, the parsing and filtering module is used to read one character at a time, and for each character, perform the following operations: For each character, determine whether the current character is greater than 31; If the current character is greater than 31, it indicates that the current character is a text character, and the current character is stored in memory; If the current character is less than 31, it means that the current character is a control character; For control characters, determine whether the current character is an ESC character, where the ESC character is the identifier of the ANSI sequence; If the current character is an ESC character, it means that the current character is an ANSI sequence. The cached Chinese characters are formatted based on the ANSI sequence. If the current character is not the ESC character, determine whether the current character is another control character, including carriage return, newline, backspace, and tab characters; If the current character is another control character, format the text characters in the cache based on the other control characters. If the current character is not another control character, discard the current character and read the next character; The parsing and filtering module is used to determine whether the current column in the cache is the largest column when storing the current character in memory. If it is, the position of the current text character in the cache is: row position incremented by 1 and column position set to 0. If the current column is not the largest column, the position of the current row and column in the cache is updated. The ANSI sequence uses the ESC character as an identifier and includes cursor movement instructions, screen clearing instructions, character rendering instructions, and terminal control instructions. The parsing and filtering module is used to format Chinese characters in the cache based on ANSI sequences through the following steps: Read an ANSI sequence; Determine whether the ANSI sequence is a cursor movement instruction; if so, update the current row and column position in the cache. If it is not a cursor movement instruction, determine whether the ANSI sequence is a screen clearing and movement instruction. If it is a screen clearing and movement instruction, reset the cache content from the position corresponding to the current row and column in the cache. If it is not a screen clearing and moving command, determine whether the ANSI sequence is a terminal control command. If it is, correct the content in the cache based on the command content corresponding to the ANSI sequence. If it is not a terminal control instruction, discard the character corresponding to the current ANSI sequence; The information extraction module is configured to analyze the final command execution result data through scanning to extract valid command execution result information, and to analyze the final command execution result data based on regular expressions and word segmentation methods to extract valid command execution result information.

Citation Information

Patent Citations

  • Target character string processing method and system for character command auditing

    CN111339732A