A terminal intelligent response system and method

By utilizing a terminal intelligent response system with multi-stage intelligent detection algorithms and quick command modules, the problem of automated response in terminal interactive scenarios is solved, achieving efficient and accurate terminal operation and adapting to the automation needs of mobile devices and complex scenarios.

CN122363577APending Publication Date: 2026-07-10

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Filing Date
2026-04-03
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing technologies cannot achieve intelligent and automated responses in interactive terminal scenarios, nor can they recognize interactive prompts and option lists in terminal output, resulting in issues of device dependence and high barriers to entry.

Method used

The system employs a terminal intelligent response system, which includes a terminal data access module, an intelligent automation module, a quick command module, and a human-computer interaction module. It identifies terminal output through a multi-stage intelligent detection algorithm, provides quick buttons and a visual configuration interface, and enables the terminal to perform idle detection, automatic reply, and timed sending functions.

Benefits of technology

It achieves high-accuracy intelligent automatic response in terminal interactive scenarios, reduces the cost of manual intervention, improves operational efficiency, adapts to complex automated operation and maintenance scenarios, and supports mobile device operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122363577A_ABST
    Figure CN122363577A_ABST
Patent Text Reader

Abstract

The application provides a terminal intelligent response system and method, and relates to the technical field of intelligent terminals, and comprises the following modules: a terminal data access module, which establishes a two-way connection with a terminal and collects terminal output streams in real time; an intelligent automation module, which is used for real-time analysis and intelligent detection of terminal output; idle detection, which judges the idle state of the terminal by recording the last activity time and calculating the time difference; a quick command module, which provides quick button binding and command execution functions of a terminal operation interface; supports command templates, dynamic variable replacement and terminal escape sequences; a man-machine interaction module, which provides a visual configuration interface; the application can automatically identify dynamic option lists in terminal output through a multi-stage intelligent detection algorithm and digital option line reverse mode recognition, does not require hard-coded serial numbers, greatly improves adaptability, and thus realizes high-accuracy intelligent automatic response of a terminal interactive scene and reduces the cost of manual intervention.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart terminal technology, and in particular to a terminal smart response system and method. Background Technology

[0002] Terminal emulators are core tools for developers, operations and maintenance personnel, and network engineers to manage servers, debug devices, and develop code. With the rapid development of cloud computing and mobile internet, the way terminals are accessed is gradually evolving from traditional local desktops to web-based, mobile, and intelligent solutions.

[0003] Current mainstream open-source web terminal solutions, such as ttyd, Wetty, and GoTTY, all implement web-based access to the terminal based on the WebSocket protocol and the xterm.js rendering library, solving the basic need for remote terminal access. However, these solutions lack intelligent automated response capabilities for interactive scenarios and cannot recognize interactive prompts, option lists, and confirmation requests in the terminal output. For human-computer interaction in installation programs and maintenance scripts, manual intervention is still required, preventing unattended automated execution. Secondly, remote development tools, such as VS Code Remote and JetBrains Gateway, achieve deep integration between the local IDE and the remote server, supporting remote code development and terminal operation. However, these tools only support desktop operating systems and lack official mobile adaptation solutions, making them unusable on mobile devices such as phones and tablets. Developers cannot perform emergency development and maintenance operations without a desktop, resulting in severe device dependency. Furthermore, traditional terminal automation tools, such as Expect, Tcl scripts, and Ansible, can automate the execution of terminal commands, but they have a very high learning curve, requiring users to write complex script code and demanding high programming skills, making them difficult for ordinary maintenance and development personnel to quickly master. Summary of the Invention

[0004] The purpose of this invention is to provide a terminal intelligent response system and method to solve the technical problems existing in the prior art.

[0005] To achieve the above-mentioned objectives, the technical solution adopted by this invention is as follows:

[0006] A terminal intelligent response system and method includes the following modules: a terminal data access module, which establishes a bidirectional connection with the terminal, collects the terminal output stream in real time, and sends the terminal input commands to the terminal; an intelligent automation module, which performs real-time parsing and intelligent detection of the terminal output, realizing the terminal's idle detection, automatic reply, and timed sending functions; the idle detection determines the terminal's idle state by recording the last activity time and calculating the time difference; a quick command module, which provides quick button binding and command execution functions for the terminal operation interface; supports command templates, dynamic variable replacement, and terminal escape sequences; and a human-computer interaction module, which provides a visual configuration interface to realize full parameter configuration, storage, and management of the intelligent automation module and the quick command module; and performs user interaction, status display, and notification reminders.

[0007] Furthermore, the intelligent automation module includes the following units: an idle detection unit, which monitors the terminal's activity status in real time, identifies idle timeout scenarios, and triggers preset response actions; an automatic response unit, which uses a multi-stage intelligent detection algorithm to identify interactive prompts and option lists in the terminal output and implements automatic response based on configured matching rules; and a timed sending unit, which uses a pre-reset anti-duplicate mechanism to automatically send specified content to the terminal according to preset timed rules; all of which are executed once per cycle.

[0008] Furthermore, the idle detection unit includes the following sub-units: a timestamp recording sub-unit, which listens to terminal output events and user input events, and updates the timestamp of the terminal's last activity in real time; a time difference calculation sub-unit, which periodically calculates the difference between the current time and the timestamp of the last activity to obtain the terminal's idle duration; a threshold judgment sub-unit, which compares the idle duration with a configured idle threshold, and triggers an action execution sub-unit when the idle duration exceeds the threshold and there are no new activity events in the debounce window; and an action execution sub-unit, which executes a preset response action, including at least one of command execution, state change, system notification, session management, and custom script execution.

[0009] Furthermore, the automatic response unit includes at least a two-stage detection algorithm: a first-stage validity check subunit, which traverses the terminal output lines from back to front, performs line content preprocessing, terminal prompt detection, exclusion keyword detection, confirmation identifier detection, and reverse pattern recognition of numeric option lines, locks the valid interactive content range, and generates a mapping table of text to be matched and options; and a second-stage keyword matching subunit, which traverses the configured multi-level matching rules according to priority, performs single keyword matching, multi-keyword combination matching, and regular expression matching on the text to be matched, and triggers the corresponding response action after a successful match.

[0010] Furthermore, the timed sending unit includes the following sub-units: a timed task management sub-unit, which manages user-configured timed sending tasks, maintains an independent sending status dictionary for each timed item, and sets the sent flag of all timed items to sent by default when a new terminal session is created; a pre-reset anti-duplicate sub-unit, which configures a pre-reset mechanism for each timed item, and resets the sent flag of the timed item to not sent when the current time falls within the reset window before the sending time; when the sending time arrives, sending is triggered only when the flag is not sent, and the flag is set to sent after sending is completed, while also supporting time extension processing for cross-cycle scenarios; a timed sending execution sub-unit, which executes the sending operation of the timed items, supports sending mode configuration, command sequence sending, error handling, and execution log recording; and a time calibration sub-unit, which synchronizes system time and network time to ensure the accurate execution of timed tasks.

[0011] Furthermore, when the current time exceeds the transmission time of the current cycle, the pre-reset anti-duplicate subunit calculates the time difference. If the difference is less than one execution cycle, a reset is immediately triggered and transmission is executed. If the difference is greater than or equal to one execution cycle, all missed cycles are skipped, the next transmission time is updated to the next nearest transmission time, and no retransmission operation is performed.

[0012] Furthermore, the shortcut command module includes the following units: a key semantic mapping subunit, which establishes a mapping relationship between key types and terminal input semantics, converting button click events into input commands recognizable by the terminal, supporting key types including at least one of number keys, letter keys, arrow keys, control combination keys, symbol keys, and space keys; a command binding management subunit, which manages the binding of shortcut buttons with custom commands, supporting custom command strings, command templates and dynamic variables, terminal escape sequences, and button attribute configuration and configuration import / export; a sending mode configuration subunit, which configures an independent sending mode for each shortcut button, including a direct sending mode and an Enter key sending mode; the direct sending mode only sends the bound string, while the Enter key sending mode automatically appends a Enter key character after sending the string according to a preset delay threshold; and a command sequence execution subunit, which parses multiple command sequences, executes them sequentially according to a preset execution interval, supports configurable error handling strategies, and provides real-time feedback on the execution status.

[0013] Furthermore, the terminal data access module supports at least one of the following terminal protocols: SSH, Telnet, local Shell, Web Terminal, and serial port protocol; it also supports simultaneous management of multiple sessions, automatic reconnection, session sharing, and end-to-end data encryption.

[0014] Furthermore, the aforementioned intelligent terminal response system includes the following steps: S1: Establishing a bidirectional connection with the target terminal through the terminal data access module to collect the terminal output stream in real time; S2: Performing real-time parsing of the terminal output through the intelligent automation module, and executing idle detection, automatic reply, and timed sending operations; S3: Receiving user button click events through the quick command module, and executing corresponding command sending and sequence execution operations; S4: Adaptively adjusting the system's human-computer interaction interface and interaction logic based on the parameters of the access device through a cross-device adaptation algorithm; S5: Realizing terminal interface rendering, user interaction, status display, and notification reminders through the human-computer interaction interface.

[0015] Furthermore, the automatic response operation in step S2 employs at least a two-stage intelligent detection algorithm, including the following steps: S201: Cache the terminal output stream, segment it by line, clean up ANSI escape sequences, and maintain a circular cache queue; S202: Through the terminal output lines, perform line content preprocessing, terminal prompt detection, exclusion keyword detection, confirmation identifier detection, and reverse pattern recognition of numeric option lines to lock the effective interactive content range and generate a mapping table between the text to be matched and the options; S203: Traverse the configured multi-level matching rules according to priority order, perform single keyword matching, multi-keyword combination matching, and regular expression matching on the text to be matched, and trigger the corresponding response action after a successful match; S204: Execute the response action for a successful match, send the corresponding instruction to the terminal, and record the execution log.

[0016] Compared with the prior art, the present invention has the following beneficial effects:

[0017] (i) This invention employs a multi-stage intelligent detection algorithm. First, it uses reverse traversal to lock the effective interaction range, eliminating invalid content and interference information. Then, it performs priority multi-dimensional keyword matching, significantly improving the detection accuracy. Through reverse pattern recognition of the number option row, it can automatically identify the dynamic option list in the terminal output without hard-coding the serial number, greatly improving adaptability. It can cover almost all terminal interactive scenarios, such as automatic response of installation programs and automatic execution of operation and maintenance scripts. Thus, it achieves high-accuracy intelligent automatic response in terminal interactive scenarios, reducing the cost of manual intervention.

[0018] (ii) This invention uses a pre-reset anti-duplicate mechanism to reset the sending flag within a preset window before the sending time, ensuring that the scheduled task is executed only once in each cycle, resulting in high execution accuracy. At the same time, it supports intelligent postponement processing for cross-cycle scenarios. For scenarios such as terminal disconnection or system hibernation, it can intelligently determine whether resending is needed, avoiding terminal anomalies caused by the concentrated execution of a large number of historical tasks, improving the reliability and robustness of scheduled tasks, and meeting the needs of complex automated operation and maintenance scenarios.

[0019] (iii) This invention enables one-click execution of frequently used commands and complex command sequences through the setting of a shortcut command module and visual shortcut buttons, eliminating the need to repeatedly enter lengthy commands, reducing the error rate of manual input, improving operational efficiency, and lowering the operational threshold. Attached Figure Description

[0020] Figure 1 This is a flowchart of a terminal intelligent response system and method disclosed in this invention;

[0021] Figure 2 This is a flowchart of the idle detection unit of a terminal intelligent response system and method disclosed in this invention;

[0022] Figure 3 This is a flowchart of the automatic reply unit of a terminal intelligent response system and method disclosed in this invention;

[0023] Figure 4 This is a flowchart of the timing transmission unit of a terminal intelligent response system and method disclosed in this invention;

[0024] Figure 5 This is a schematic diagram of the human-computer interaction module of a terminal intelligent response system and method disclosed in this invention. Detailed Implementation

[0025] To make the content of this invention easier to understand, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Identical components are represented by the same reference numerals. It should be noted that the terms "front," "rear," "left," "right," "up," and "down" used in the following description refer to directions in the accompanying drawings, while the terms "inner" and "outer" refer to directions toward or away from the geometric center of a specific component, respectively.

[0026] like Figure 1-5 As shown, this embodiment provides a terminal intelligent response system and method, including the following modules:

[0027] The terminal data access module establishes a bidirectional connection with the terminal, collects the terminal output stream in real time, and sends terminal input commands to the terminal. This module supports at least one terminal protocol among SSH, Telnet, local Shell, Web Terminal, and serial port protocols. Users input terminal connection information through the human-machine interface module. After the terminal connects, a corresponding terminal connection is established based on the information, creating an independent terminal session. Each session independently maintains its connection status, output buffer queue, and configuration information. It supports simultaneous management of multiple sessions, automatic reconnection, session sharing, and more. Encryption algorithms implement end-to-end data encryption to ensure secure data transmission.

[0028] The intelligent automation module is used for real-time parsing and intelligent detection of terminal output, realizing the terminal's idle detection, automatic reply, and timed sending functions; the idle detection determines the terminal's idle status by recording the last activity time and calculating the time difference; this module includes the following units:

[0029] The idle detection unit has a built-in 100ms precision timer to monitor the terminal's activity status in real time, identify idle timeout scenarios, and trigger preset response actions. It should be noted that the timer's precision can be flexibly adjusted according to actual needs.

[0030] Specifically, the idle detection unit includes the following sub-units:

[0031] The timestamp recording sub-unit listens to terminal output events and user input events, and updates the timestamp of the terminal's last activity in real time.

[0032] The time difference calculation subunit is used to periodically calculate the difference between the current time and the last activity timestamp to obtain the terminal idle time; specifically, the timer calculates the difference between the current time and the last activity timestamp every 100ms to obtain the idle time.

[0033] The threshold judgment subunit is used to compare the idle time with the configured idle threshold. When the idle time exceeds the threshold and there are no new active events in the anti-shake window, in this embodiment, the idle threshold configured by the user is 30 minutes and the anti-shake window is 5 seconds.

[0034] The action execution subunit executes preset response actions, including at least one of command execution, state change, system notification, session management, and custom script execution. The response actions are: when the idle timeout occurs, the terminal status color is changed to red and a reminder is sent to the user through the browser system notification; when the idle time exceeds 1 hour, the exit command is automatically sent to terminate the terminal session; when the idle time exceeds 30 minutes and there are no new activity events within 5 seconds, the corresponding response action is triggered.

[0035] The automatic response unit, through a multi-stage intelligent detection algorithm, can accurately identify interactive prompts and option lists in the terminal output, and based on the configured matching rules, quickly and accurately achieve automatic response, improving the interaction efficiency and experience between the system and the user;

[0036] Specifically, in this embodiment, the automatic response unit includes at least a two-stage detection algorithm:

[0037] The first-stage validity check subunit traverses the terminal output lines either backwards or forwards, cleaning up invalid characters at the beginning and end of each line and standardizing Unicode characters. It then performs line content preprocessing, terminal prompt detection, exclusion keyword detection, confirmation flag detection, and numeric option line reverse pattern recognition. The numeric option line reverse pattern includes various different sequence patterns, such as... or In this embodiment, the reverse mode of the numeric option row is: The process involves: locking the valid interactive content range and generating a mapping table between the text to be matched and the options; specifically, firstly, checking if it matches the terminal prompt regular expression. When two prompts are matched consecutively, the traversal stops, and the end boundary of the valid range is determined; then, checking if the line content matches the exclusion keyword list (configured in this embodiment as "error", "warning", "failed"); if a match is found, the current detection is terminated; next, checking if it contains the confirmation identifier string (configured in this embodiment as "Are you sure?", "Y / N", "Please select an option"); if detected, it is marked as a range to be confirmed; finally, recognizing the numeric option lines, reversely detecting lines starting with numbers, stopping the traversal when the option line with the number 1 is reached, determining the starting boundary of the valid range, and generating the option mapping table; the reverse traversal starts from the prompt of the last line and stops when the option line with the number 1 is reached, locking the valid range, generating the option mapping table, and concatenating the content of the valid range to generate the text to be matched;

[0038] The second-stage keyword matching subunit is used to traverse the configured multi-level matching rules according to priority order, and perform single keyword matching, multi-keyword combination matching, and regular expression matching on the text to be matched. After a successful match, the corresponding response action is triggered. In this embodiment, if the text to be matched matches rule 1 successfully, the traversal of subsequent rules stops, the response action is triggered, the text is sent to the terminal, the automatic response is completed, and the execution log is recorded. The execution status is displayed in the human-computer interaction module.

[0039] The timed sending unit automatically sends specified content to the terminal according to preset timed rules through a pre-reset anti-duplicate mechanism; it executes once per cycle.

[0040] The timing transmission unit includes the following sub-units:

[0041] The scheduled task management subunit manages user-configured scheduled sending tasks, maintains an independent sending status dictionary for each scheduled item, and each scheduled task is an independent scheduled item. Each scheduled item includes task ID, task name, sending content, sending time rule, execution cycle, enabled status, error handling policy, and sending mode. When a new terminal session is created, the sent flag of all scheduled items is set to sent by default to prevent the immediate triggering of historical scheduled tasks when a new session is created, thus avoiding accidental sending.

[0042] The pre-reset anti-duplicate subunit configures a pre-reset mechanism for each timing item. When the current time falls within the reset window before the transmission time, the transmitted flag of the timing item is reset to "not transmitted," and the next transmission time is updated to the transmission time of the current period, completing the pre-reset operation. When the transmission time arrives, transmission is triggered only if the flag is "not transmitted." After transmission, the flag is set to "transmitted." It also supports time delay processing across periods, performing intelligent delay processing for scenarios where the transmission time is missed due to terminal session disconnection, system sleep, etc. The pre-reset... When the current time exceeds the transmission time of the current cycle, the anti-duplicate subunit calculates the time difference. If the difference is less than one execution cycle, it immediately triggers a reset and executes transmission. If the difference is greater than or equal to one execution cycle, it skips all missed cycles, updates the next transmission time to the next nearest transmission time, and does not perform a retransmission operation. Specifically, the set time is 6:00:00, the reset cycle is 300 seconds, it resets 300 seconds in advance, executes after 6:00:00, and sets an execution completion flag. If the set time exceeds the current time, it waits for the next 6:00:00.

[0043] The scheduled sending execution subunit performs the sending operation of scheduled items, and supports sending mode configuration, command sequence sending, error handling, and execution log recording, which makes it easy for users to review and trace back;

[0044] The time calibration subunit synchronizes system time with network time to avoid abnormal execution of scheduled tasks due to system time errors. It also supports time zone configuration to adapt to the needs of users in different time zones and ensures the accurate execution of scheduled tasks.

[0045] The quick command module provides quick button binding and command execution functions for the terminal operation interface; it supports command templates, dynamic variable replacement, and terminal escape sequences; users can complete the corresponding terminal operation by clicking the quick button without manual input, improving terminal operation efficiency, while adapting to the interaction methods of different devices and solving the problems of cumbersome and inefficient operation on mobile terminals;

[0046] The shortcut command module includes the following units:

[0047] The button semantic mapping subunit establishes a mapping relationship between button types and terminal input semantics, converting button click events into input commands recognizable by the terminal. Supported button types include at least one of number keys, letter keys, arrow keys, control combination keys, symbol keys, and the space bar. The number keys map to the terminal's numeric input semantics, corresponding to option selection and numeric parameter input; clicking them sends the corresponding numeric character to the terminal. The letter keys map to the terminal's letter input semantics, corresponding to command characters, paths, and text content input, supporting case switching. The arrow keys map to the terminal's cursor control semantics, corresponding to cursor movement (up, down, left, right) and command history navigation; clicking them sends the corresponding arrow key escape sequence to the terminal. The control combination keys map to... The control shortcut key semantics of the transmitter terminal correspond to the terminal's commonly used shortcut key operations, including combinations of modifier keys such as Ctrl, Alt, and Shift with other keys, such as Ctrl+C, Ctrl+O, and ESC. The interface will be configured with the following buttons, which, when clicked, will send a specified command or a specified command group. For example, button 1 sends "1" to the terminal and then sends a newline character, triggering the terminal to respond with a command; button Ctrl+O sends a simulated Ctrl+O command to the terminal; program 1 sends the configured command 1 to the terminal, delays for 10 minutes, and then sends the configured command 2 to the terminal. The symbol keys and space keys map the terminal's symbol input semantics, corresponding to command parameter separators, path input, and special symbol input.

[0048] The command binding management subunit enables the binding management of shortcut buttons and custom commands. It supports custom command strings, command templates and dynamic variables, and terminal escape sequences. It also supports button attribute configuration and configuration import / export. The button attribute configuration supports configuring button names, icons, sizes, colors, and sorting, and supports button group management for easy user categorization and use. This subunit supports batch import / export of shortcut button configurations, making it convenient for users to synchronize configurations across different devices and sessions.

[0049] The sending mode configuration subunit configures an independent sending mode for each shortcut button, including direct sending mode and Enter key sending mode. The direct sending mode only sends the bound string without appending a newline character, which is suitable for scenarios such as parameter input and text editing. The Enter key sending mode automatically appends a newline character after sending the string according to a preset delay threshold, triggering the execution of the command, which is suitable for scenarios where commands can be executed with one click.

[0050] The command sequence execution subunit parses multiple command sequences and executes them sequentially according to preset execution intervals. It supports configurable error handling strategies to meet the needs of different scenarios and provides real-time feedback on the execution status in the human-computer interaction module.

[0051] The human-computer interaction module, based on xterm.js, implements full-featured terminal simulation, is compatible with terminal standards such as VT100, VT220, and Xterm, supports 24-bit true color, Chinese input, and split-screen display, and displays the terminal status and rule execution status in real time. This module provides a visual configuration interface to enable full parameter configuration, storage, and management of the intelligent automation module and the shortcut command module; and performs user interaction, status display, and notification reminders.

[0052] Furthermore, a terminal intelligent response system and method includes the following steps:

[0053] S1: Establish a bidirectional connection with the target terminal through the terminal data access module and collect the terminal output stream in real time; the bidirectional connection is a full-duplex bidirectional data transmission channel built on WebSocket / native TCP protocol. The channel is divided into an uplink command channel and a downlink output channel. The uplink channel is responsible for reliably transmitting user input, automated response commands, and quick commands to the target terminal, and the downlink channel is responsible for receiving the output data stream returned by the terminal in real time.

[0054] S2: Through the intelligent automation module, the terminal output is analyzed in real time, and idle detection, automatic reply and timed sending operations are performed to realize unattended full-process control of terminal interaction;

[0055] The automatic response operation in step S2 employs at least a two-stage intelligent detection algorithm, including the following steps:

[0056] S201: Buffer terminal output stream, split it by line, clean up ANSI escape sequences, including all non-text control characters such as color control, cursor movement, font style, window size adjustment, screen clearing, etc., and retain only plain text content to avoid interference from control characters to subsequent detection and maintain a circular buffer queue.

[0057] S202: By analyzing the terminal output line, perform line content preprocessing, terminal prompt detection, keyword exclusion detection, confirmation flag detection, and reverse pattern recognition of the numeric option line to lock the valid interactive content range and generate a mapping table of text to be matched and options; this embodiment uses... Reverse convenient locking mode;

[0058] S203: Traverse the configured multi-level matching rules according to priority order, perform single keyword matching, multi-keyword combination matching, and regular expression matching on the text to be matched, and trigger the corresponding response action after a successful match.

[0059] S204: Execute the response action for a successful match, send the corresponding instruction to the terminal, record the execution log, and achieve full-process traceability;

[0060] S3: Receives user button click events through the quick command module and executes corresponding command sending and sequence execution operations;

[0061] S4: Adaptively adjust the system's human-computer interaction interface and interaction logic based on the parameters of the access device through a cross-device adaptation algorithm;

[0062] S5: Through the human-computer interaction interface, the terminal interface is rendered, users interact, status is displayed and notifications are displayed, providing users with an intuitive, easy-to-use and efficient terminal operation entry point, and building a complete user interaction loop.

[0063] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A terminal intelligent response system, characterized in that: Includes the following modules: The terminal data access module establishes a two-way connection with the terminal, collects the terminal output stream in real time, and sends the terminal input commands to the terminal. The intelligent automation module is used to perform real-time analysis and intelligent detection of terminal output, realizing the terminal's idle detection, automatic reply, and timed sending functions; the idle detection determines the terminal's idle status by recording the last activity time and calculating the time difference. The quick command module provides quick button binding and command execution functions for the terminal operation interface; it supports command templates, dynamic variable replacement, and terminal escape sequences. The human-computer interaction module provides a visual configuration interface, enabling full parameter configuration, storage, and management of the intelligent automation module and the quick command module; and providing user interaction, status display, and notification reminders.

2. The terminal intelligent response system according to claim 1, characterized in that: The intelligent automation module includes the following units: The idle detection unit monitors the terminal's activity status in real time, identifies idle timeout scenarios, and triggers preset response actions. The automatic response unit uses a multi-stage intelligent detection algorithm to identify interactive prompts and option lists in the terminal output and implements automatic responses based on configured matching rules. The timed sending unit automatically sends specified content to the terminal according to preset timed rules through a pre-set reset anti-duplicate mechanism; it executes once per cycle.

3. The terminal intelligent response system according to claim 2, characterized in that: The idle detection unit includes the following sub-units: The timestamp recording sub-unit listens to terminal output events and user input events, and updates the timestamp of the terminal's last activity in real time. The time difference calculation subunit is used to periodically calculate the difference between the current time and the timestamp of the last activity to obtain the terminal idle time. The threshold judgment subunit is used to compare the idle time with the configured idle threshold. When the idle time exceeds the threshold and there are no new active events in the debounce window, the action execution subunit is triggered. The action execution subunit executes preset response actions, including at least one of command execution, state change, system notification, session management, and custom script execution.

4. The terminal intelligent response system according to claim 2, characterized in that: The automatic response unit includes at least a two-stage detection algorithm: The first-stage validity check subunit traverses the terminal output lines from back to front, performs line content preprocessing, terminal prompt detection, exclusion keyword detection, confirmation identifier detection, and reverse pattern recognition of numeric option lines, locks the valid interactive content range, and generates a mapping table of text to be matched and options. The second-stage keyword matching subunit is used to traverse the configured multi-level matching rules in priority order, perform single keyword matching, multi-keyword combination matching, and regular expression matching on the text to be matched, and trigger the corresponding response action after a successful match.

5. The terminal intelligent response system according to claim 2, characterized in that: The timing transmission unit includes the following sub-units: The scheduled task management subunit manages user-configured scheduled sending tasks, maintains an independent sending status dictionary for each scheduled item, and sets the sent flag of all scheduled items to sent by default when a new terminal session is created. The pre-reset anti-duplicate subunit configures a pre-reset mechanism for each timing item. When the current time falls within the reset window before the sending time, the sent flag of the timing item is reset to not sent. When the sending time arrives, sending is triggered only if the flag is not sent. After sending is completed, the flag is set to sent. It also supports time delay processing in cross-cycle scenarios. The timed sending execution subunit performs the sending operation of timed items, and supports sending mode configuration, command sequence sending, error handling, and execution log recording; The time calibration subunit synchronizes system time with network time to ensure the accurate execution of scheduled tasks.

6. The terminal intelligent response system according to claim 5, characterized in that: When the current time exceeds the transmission time of the current cycle, the pre-reset anti-duplicate subunit calculates the time difference. If the difference is less than one execution cycle, it immediately triggers a reset and executes transmission. If the difference is greater than or equal to one execution cycle, it skips all missed cycles, updates the next transmission time to the next nearest transmission time, and does not perform a retransmission operation.

7. The terminal intelligent response system according to claim 1, characterized in that: The shortcut command module includes the following units: The key semantic mapping subunit establishes a mapping relationship between key types and terminal input semantics, converting button click events into input commands that the terminal can recognize. Supported key types include at least one of the following: number keys, letter keys, arrow keys, control combination keys, symbol keys, and space keys. The command binding management sub-unit enables the binding management of shortcut buttons and custom commands. It supports custom command strings, command templates and dynamic variables, terminal escape sequences, button attribute configuration, and import / export of configurations. The sending mode configuration subunit configures an independent sending mode for each shortcut button, including direct sending mode and Enter key sending mode; the direct sending mode only sends the bound string, while the Enter key sending mode automatically appends a newline character after sending the string according to a preset delay threshold; The command sequence execution subunit parses multiple command sequences and executes them sequentially according to preset execution intervals. It supports configurable error handling strategies and provides real-time feedback on execution status.

8. The terminal intelligent response system according to claim 1, characterized in that: The terminal data access module supports access via at least one of the following terminal protocols: SSH, Telnet, local Shell, Web Terminal, and serial port protocol; it also supports simultaneous management of multiple sessions, automatic reconnection, session sharing, and end-to-end data encryption.

9. A terminal intelligent response method, characterized in that, The system applied to the terminal intelligent response system according to any one of claims 1-8 includes the following steps: S1: Establish a bidirectional connection with the target terminal through the terminal data access module to collect the terminal output stream in real time; S2: Real-time analysis of terminal output is performed through the intelligent automation module, and idle detection, automatic reply, and timed sending operations are executed. S3: Receives user button click events through the quick command module and executes corresponding command sending and sequence execution operations; S4: Adaptively adjust the system's human-computer interaction interface and interaction logic based on the parameters of the access device through a cross-device adaptation algorithm; S5: Enables terminal interface rendering, user interaction, status display, and notification reminders through a human-computer interaction interface.

10. The terminal intelligent response system and method according to claim 9, characterized in that: The automatic response operation in step S2 employs at least a two-stage intelligent detection algorithm, including the following steps: S201: Buffer terminal output stream, split by line, clean up ANSI escape sequences, and maintain a circular buffer queue; S202: By processing the output line of the terminal, perform line content preprocessing, terminal prompt detection, exclusion keyword detection, confirmation mark detection, and reverse pattern recognition of the numeric option line, lock the effective interactive content range, and generate a mapping table of text to be matched and options; S203: Traverse the configured multi-level matching rules according to priority order, perform single keyword matching, multi-keyword combination matching, and regular expression matching on the text to be matched, and trigger the corresponding response action after a successful match. S204: Execute the response action for a successful match, send the corresponding instruction to the terminal, and record the execution log.