Data processing method, apparatus, device, and medium

By generating and displaying the execution output data of the controlled node, the problem of not being able to display the execution status in real time during the interaction between the control node and the controlled node is solved, realizing interactive control and improving the user's work efficiency and control effectiveness.

CN115334133BActive Publication Date: 2026-03-31BEIJING TOPSEC NETWORK SECURITY TECH +2
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-22
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

In applications such as penetration testing, the interaction between the control node and the controlled node cannot display the execution status of the command line in real time, resulting in low user efficiency and inability to handle execution failures in a timely manner.

Method used

By generating and sending execution data to the controlled node, and receiving and displaying the execution output data of the controlled node, interactive control is achieved, enabling users to monitor the execution process and results of the command line in real time.

Benefits of technology

It improves user work efficiency, enables timely handling of execution anomalies, and enhances the effectiveness and interactivity of the control node's control over the controlled node.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115334133B_ABST
    Figure CN115334133B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure relate to a data processing method, device, equipment and medium, wherein the method is applied to a control node, comprising: in response to an execution operation on a first command line in an operation window, generating execution data; sending the execution data to a controlled node, so that the controlled node generates execution output data based on the execution data and returns the execution output data; receiving the execution output data sent by the controlled node, and displaying the execution output data corresponding to the first command line based on the operation window. Embodiments of the present disclosure can enable a user to obtain the output of the first command line in the execution process and / or the execution result of the first command line, thereby determining the execution situation of the first command line, and enabling timely processing when the execution situation is abnormal, thereby improving the work efficiency of the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a data processing method, apparatus, device, and medium. Background Technology

[0002] In applications such as penetration testing, a control node can remotely control a controlled node and determine if the control node has security vulnerabilities. Specifically, a connection is established between the control node and the controlled node. The control node sends commands to be executed to the controlled node based on this connection and receives the execution results of the commands executed by the controlled node. Based on these execution results, it can determine whether there are any security vulnerabilities in the controlled node.

[0003] In related technologies, a connection is established between the input and output interfaces of the execution process of the control node and the controlled node. A file containing the command line to be executed is input into the input interface, and the execution result of the command line is obtained through the corresponding output interface. However, in this technical solution, the user cannot know the execution status of the command to be executed, resulting in low user efficiency. Furthermore, if a fault occurs during the execution of the command, the user cannot be aware of the fault. Summary of the Invention

[0004] To solve the above-mentioned technical problems, or at least partially solve them, this disclosure provides a data processing method, apparatus, device, and medium.

[0005] This disclosure provides a data processing method applied to a control node, the method comprising:

[0006] In response to the execution operation of the first command line in the operation window, execution data is generated;

[0007] The execution data is sent to the controlled node, so that the controlled node generates execution output data based on the execution data and returns the execution output data.

[0008] The system receives the execution output data sent by the controlled node and displays the execution output data corresponding to the first command line based on the operation window.

[0009] This disclosure also provides a data processing apparatus for use in a control node, the apparatus comprising:

[0010] The generation module is used to generate execution data in response to the execution operation of the first command line in the operation window;

[0011] The first sending module is used to send the execution data to the controlled node, so that the controlled node generates execution output data based on the execution data and returns the execution output data;

[0012] The first display module is used to receive the execution output data sent by the controlled node and display the execution output data corresponding to the first command line based on the operation window.

[0013] This disclosure also provides an electronic device, the electronic device comprising: a processor; a memory for storing executable instructions of the processor; the processor being configured to read the executable instructions from the memory and execute the instructions to implement the data processing method provided in this disclosure.

[0014] This disclosure also provides a computer-readable storage medium storing a computer program for performing the data processing method provided in this disclosure.

[0015] Compared with the prior art, the technical solution provided in this disclosure has the following advantages: The data processing scheme provided in this disclosure generates execution data in response to the execution operation of the first command line in the operation window; sends the execution data to the controlled node, so that the controlled node generates execution output data based on the execution data and returns the execution output data; receives the execution output data sent by the controlled node, and displays the execution output data corresponding to the first command line in the operation window. By adopting the above technical solution, the control node can send the execution data of the first command line to the controlled node, the controlled node executes the first command line and returns the execution output data, and the control node displays the execution output. This allows the operation window of the control node to display the process output and / or result output of the controlled node executing the first command line. Users can obtain the output and / or execution result of the first command line during execution, thereby determining the execution status of the first command line. When an abnormality occurs in the execution status, timely processing can be performed, improving user work efficiency. Attached Figure Description

[0016] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0017] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 A schematic flowchart illustrating a data processing method provided in an embodiment of this disclosure;

[0019] Figure 2A flowchart illustrating another data processing method provided in an embodiment of this disclosure;

[0020] Figure 3 A flowchart illustrating yet another data processing method provided in this disclosure embodiment;

[0021] Figure 4 This is a schematic diagram illustrating the principle of window adjustment provided in an embodiment of the present disclosure;

[0022] Figure 5 This is a schematic diagram of the structure of a data processing apparatus provided in an embodiment of the present disclosure;

[0023] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0024] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0025] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.

[0026] To address the aforementioned problems, this disclosure provides a data processing method, which will be described below with reference to specific embodiments.

[0027] Figure 1 This is a flowchart illustrating a data processing method provided in an embodiment of the present disclosure. The method can be executed by a data processing device, which can be implemented using software and / or hardware, and is generally integrated into an electronic device. Figure 1 As shown, this method is applied to a control node and includes:

[0028] Step 101: In response to the execution operation of the first command line in the operation window, generate execution data.

[0029] In this embodiment, a node can be a computer device node, including a control node and a controlled node. The control node controls other nodes, and the controlled node is the node being controlled. The controlled node's operating system can be Windows. The control node can be a terminal device compatible with the Pseudo Terminal (PTY) protocol. The control node and the controlled node can transmit Pseudo Terminal control flow data via network communication. In a penetration testing application scenario, the control node can be a centralized command and control (C2) node, and the controlled node can be understood as the penetration testing target. Remote control of the penetration testing target can be achieved through the centralized control node.

[0030] In this embodiment, the user can input command lines in the operation window of the control node to control the controlled node, and obtain the execution status of the command lines by the controlled node through the control node. Specifically, in response to the execution operation of the first command line in the operation window, execution data is generated. The operation window can be understood as an interactive interface for the command line, through which the command line can be edited, executed, and the corresponding output of the executed command line can be displayed. This operation window can be a window generated by a running terminal application. In this embodiment, the control node can input corresponding commands to the executable program of the controlled node through the terminal window of the control node, thereby enabling the control node to remotely control the controlled node.

[0031] The first command line can be a command line that has been edited in the operation window but has not yet been executed. This embodiment does not limit the specific function of the first command line. The execution operation can be an operation that instructs the execution of the command line that has not yet been executed in the operation window, which can specifically include touch operation, keyboard control operation, etc. The execution data can be data that represents the execution operation. This execution data can be understood as pseudo-terminal control flow data. This execution data can be encrypted data. This embodiment does not limit the specific encryption method.

[0032] In this embodiment, the user can edit the first command line in the operation window of the control node and execute the first command line through external devices such as keyboard / mouse / touchscreen. The control node responds to the execution operation and generates corresponding execution data. For example, after the user enters the first command line in the operation window, they can press the Enter key, and the generated execution data may include the keyboard code corresponding to the Enter key.

[0033] Step 102: Send execution data to the controlled node so that the controlled node can generate execution output data based on the execution data and return the execution output data.

[0034] The execution output data can be the output data generated by the controlled node performing operations such as program calls based on the received execution data. This execution output data can be encrypted; this embodiment does not limit the specific encryption method. The execution output data can include the specific content displayed in the operation window, as well as information such as the text color, background color, whether it is bold, and whether it is italicized. The execution output data can include execution process data and / or execution result data generated by running the execution data. The execution process data can be the data generated by the controlled node during the execution of the execution data, and the execution result data can be the final result generated by the controlled node running the execution data. The execution result data can include data indicating successful execution or data indicating execution failure.

[0035] Understandably, some execution data corresponds to execution output data that is execution process data. For example, if the first command line is a command to diagnose whether the connection between devices is normal, then the corresponding execution output data is data representing the real-time connection status between devices. Similarly, some execution data corresponds to execution output data that is execution result data, that is, the execution result data generated by running the execution data represents whether the execution was successful or failed; some execution data corresponds to execution output data that includes both execution process data and execution result data, that is, running the execution data will generate corresponding execution process data according to the execution status of the execution data, and after the execution data is completed, it will also generate execution result data representing whether the execution data was successful.

[0036] In this embodiment, after generating execution data, the control node can send the execution data to the controlled node. Upon receiving the execution data, the controlled node runs the execution data, generates corresponding execution output data, and sends the execution output data back to the control node. Based on the execution data sent from the control node to the controlled node, the control node controls the controlled node; based on the execution output data sent from the controlled node to the control node, the execution node provides feedback on its operational status to the control node.

[0037] In some embodiments, sending execution data to the controlled node so that the controlled node generates execution output data based on the execution data includes: sending execution data to the controlled node so that the controlled node converts the execution data into execution interface call data through the console interface and obtains the execution output data by performing interface calls based on the execution interface call data through the execution process.

[0038] The console interface can be the Application Programming Interface (API) in the Windows operating system. This interface converts PTY control flow data into executable interface calls. The execution interface is the interface for executing specific tasks. Execution interface call data records the called execution interfaces and their order of invocation. The execution process is a command-line user interface program that receives instructions, invokes applications based on those instructions, and returns execution feedback, thus enabling basic human-computer interaction. This execution process can be understood as a shell process; if the operating system is Windows, this program can be the cmd.exe process.

[0039] In this embodiment, the control node can send execution data to the controlled node. After receiving the execution data, the controlled node converts the execution data through the console interface into execution interface call data that records the execution interface call order. Then, the execution process calls the corresponding execution interface according to the interface call order recorded in the execution interface call data, thereby realizing the function corresponding to the execution data and outputting the execution output data.

[0040] In some embodiments, before generating execution data, the method further includes: sending an execution process start instruction to the controlled node, so that the controlled node starts the execution process through the host process of the command-line program in response to the execution process start instruction; wherein the host process includes a console interface. The execution process start instruction can be an instruction that instructs the start of the execution process. The host process of the command-line program can be a terminal implementation of a Windows operating system. The host process of the command-line program can be the conhost.exe process.

[0041] In this embodiment, the control node can remotely start the execution process in the controlled node, thereby enabling the control node to control the controlled node based on the execution process. Specifically, the control node can send an execution process start command to the controlled node. After receiving the execution process start command, the controlled node parses the execution process start command to determine the execution process to be started, and then starts the execution process through the host process of the command line program in the Windows system, thereby realizing terminal allocation.

[0042] In the above scheme, the control node can start the execution process in the controlled node, which provides the basic conditions for the subsequent execution process to generate execution output data. At the same time, it avoids the control node's failure to control the controlled node due to the execution process in the controlled node not starting, thus improving the effectiveness of the control node's control over the controlled node.

[0043] Step 103: Receive the execution output data sent by the controlled node, and display the execution output data corresponding to the first command line based on the operation window.

[0044] In this embodiment, after the control node sends execution data to the controlled node, it can receive the execution output data sent by the controlled node, parse the execution output data, obtain the specific content displayed in the operation window, and information such as the font size and font of the specific content. Then, it displays the execution output data corresponding to the execution of the first command line in the operation window. If the controlled node's operating system is Windows, a connection can be established between the input / output interface of the controlled node's conhost.exe process and the communication interface of the control node. Based on this connection, a connection is established between the controlled node's conhost.exe and the operation window in the control node, allowing the user to interact with the controlled node's Shell process within the control node's operation window. It should be noted that if the controlled node's operating system is Windows, the control node can be a terminal compatible with the PTY protocol.

[0045] In some embodiments, a communication tunnel can be pre-established between the control node and the controlled node, and the transmission of data such as execution data and execution output data can be realized based on the communication tunnel. Specifically, the communication tunnel can be established between the terminal application of the control node and the shell process of the controlled node.

[0046] In some embodiments, if the execution output data is process output data, the process output data is data obtained from the controlled node according to a preset period, or the process output data is data obtained from the controlled node in response to a data update request.

[0047] In this embodiment, if the execution output data is process output data, since the process output data changes in real time depending on the execution status, it needs to be updated in the operation window of the control node. In one optional implementation, a preset period can be set as the update period for the process output data. Based on this preset period, the control node obtains the process output data from the controlled node and displays the latest process output data through the operation window. In another optional implementation, the control node can send a data update request to the controlled node. In response to the data update request, the controlled node obtains the updated process output data since the last time it was sent and sends the updated process output data back to the controlled node.

[0048] The above solution implements the updating of process output data acquired by the control node, enabling users to obtain the execution status of the running data in the currently controlled node through the control node, thereby improving the timeliness of data display in the control node.

[0049] In related technologies, the controlled node can only control the received instructions sent by the control node and return the execution results of the instructions. This control method is non-interactive control. However, in this application, the operation window of the control node can be used as a remote window of the controlled node. This operation window can display the execution result data and / or execution process data of the first command line, thereby realizing interactive control. Users can perform the same functional operations as in the window of the controlled node through the operation window of the control node.

[0050] The data processing method provided in this disclosure, applied to a control node, includes: generating execution data in response to an execution operation of a first command line in an operation window; sending the execution data to a controlled node, so that the controlled node generates execution output data based on the execution data and returns the execution output data; receiving the execution output data sent by the controlled node, and displaying the execution output data corresponding to the first command line in the operation window. By adopting the above technical solution, the control node can send execution data of the first command line to the controlled node, the controlled node executes the first command line and returns execution output data, and the control node displays the execution output. This allows the operation window of the control node to display the process output and / or result output of the controlled node executing the first command line. Users can obtain the output and / or execution result of the first command line during execution, thereby determining the execution status of the first command line. When an abnormality occurs during execution, timely processing can be performed, improving user work efficiency.

[0051] Figure 2 A flowchart illustrating another data processing method provided in this disclosure embodiment is shown below. Figure 2 As shown, in some embodiments, the data processing method further includes:

[0052] Step 201: In response to the editing operation in the operation window, obtain the editing data based on the execution result data or execution process data of the first command line. The editing data includes at least one operation instruction for the second command line and the corresponding variable.

[0053] The second command line can be a command line entered in the operation window based on the execution output data of the first command line. The edit data can be data generated by editing operations based on the second command line, and this edit data can be encrypted data; this embodiment does not limit the encryption method. The edit data can include operation instructions and corresponding variables, where the corresponding variable can be the object targeted by the editing operation, and the operation instruction can be the specific operation performed on that variable; this embodiment does not limit the operation instruction.

[0054] In some embodiments, the operation instruction includes one or more of the following: character input instruction, character deletion instruction, and shortcut key instruction. The character input instruction can be an instruction to perform character input; if the edit data includes the character input instruction and a corresponding variable, it indicates that the variable is input. The character deletion instruction can be an instruction to perform character deletion; if the edit data includes the character deletion instruction and a corresponding variable, it indicates that the variable is deleted. The shortcut key instruction can be an instruction to perform a shortcut key operation; if the edit data includes the shortcut key instruction and a corresponding variable, it indicates that the operation corresponding to the shortcut key is performed on the variable.

[0055] In this embodiment, after obtaining the execution result data or execution process data of the first command line through the operation window of the control node, the user can perform corresponding editing operations in the operation window to generate a corresponding second command line. This second command line can be understood as the command that the controlled node will execute next, determined by the user based on the execution output of the first command line.

[0056] Step 202: Send the edit data to the controlled node so that the controlled node generates the edit result data based on the edit data and sends the edit result data to the control node.

[0057] The edited data result can be the data generated by the controlled node running the edit data. This edited data result can be encrypted data, and this embodiment does not limit the encryption method. The edited data result can include the specific content displayed in the operation window, as well as information such as the font color, background color, whether it is bold, and whether it is italic.

[0058] In this embodiment, the control node sends editing data to the controlled node. Upon receiving the editing data, the controlled node executes the edit data, generates corresponding editing result data, and sends this result data back to the control node. The control node controls the execution node based on the editing data sent from the control node to the controlled node, and the execution node provides feedback on the execution status of the editing data based on the editing result data sent from the controlled node to the control node.

[0059] In some embodiments, sending editing data to the controlled node to generate editing result data based on the editing data includes: sending editing data to the controlled node so that the controlled node converts the editing data into editing interface call data through a console interface and obtains the editing result data by performing an interface call based on the editing interface call data through an execution process. The editing interface can be a specific interface implementing command-line editing. The editing interface call data can be data recording the called editing interfaces and the order in which the called editing interfaces are invoked.

[0060] In this embodiment, the control node can send editing data to the controlled node. After receiving the editing data, the controlled node converts the editing data through the console interface into editing interface call data that records the order of editing interface calls. Then, the execution process calls the corresponding editing interface according to the interface call order recorded in the editing interface call data, thereby realizing the function corresponding to the editing data and outputting the editing result data.

[0061] Step 203: Receive the editing result data sent by the control node, and display the editing result data corresponding to the second command line based on the operation window.

[0062] In this embodiment, after the control node sends editing data to the controlled node, the control node can receive the editing result data sent by the controlled node, parse the editing result data, obtain the specific content displayed in the operation window, and information such as the text color, background color, whether it is bold, and whether it is italicized. Then, the control node displays the editing result data corresponding to the executed editing data in the operation window.

[0063] In the above scheme, editing operations on the second command line are performed based on the execution result data or execution process data of the first command line. This enables the editing of the second command line, which needs to be executed by the controlled node next, based on the real-time execution status of the first command line in the controlled node. Users can obtain the execution status of the first command line and the editing status of the second command line in the controlled node through the control node, thereby improving the interactivity between the user and the control node.

[0064] Figure 3A flowchart illustrating another data processing method provided in this disclosure embodiment is shown below. Figure 3 As shown, in some embodiments, the data processing method further includes:

[0065] Step 301: Parse the preset pseudo-terminal protocol and obtain the window parameters of the operation window.

[0066] In this context, a pseudo-terminal can be a terminal that behaves similarly to a regular terminal, but it lacks corresponding hardware. This pseudo-terminal provides a terminal-like interface for other programs. The pseudo-terminal protocol can be a file that defines the relevant attributes of the pseudo-terminal. Window parameters can be parameters related to window attributes, including window height and window length.

[0067] In this embodiment, the pseudo-terminal protocol in the control node can be obtained and parsed in the control node to obtain window parameters such as window height and window length related to the operation window in the preset pseudo-terminal protocol.

[0068] Step 302: Send the window parameters of the operation window to the controlled node so that the controlled node can set the window parameters of the running window according to the window parameters of the operation window; wherein, the window parameters include window height parameters and window length parameters.

[0069] The running window can be the window displayed in the controlled node.

[0070] In this embodiment, after the control node obtains the window parameters of the operation window, it can send the window parameters of the operation window to the controlled node. After receiving the window parameters of the operation window, the controlled node sets the window parameters related to the running window in the host process (conhost.exe) of the command line program in the controlled node according to the window parameters of the operation window, so that the size of the running window of the controlled node is consistent with the size of the operation window in the control node.

[0071] Figure 4 This is a schematic diagram illustrating the principle of window adjustment provided in an embodiment of the present disclosure, such as... Figure 4 As shown, if the application scenario is a penetration testing scenario, the control node is a centralized control node, and the controlled node is the target host. The terminal application in the centralized control node establishes communication with the window control program of the target host. The centralized control node sends the window parameters of the operation window to the window control program of the target host. The window control program adjusts the window parameters related to the running window in the host process of the command line program according to the window parameters of the operation window, so as to obtain a running window with the same size as the operation window. This running window is the window interface displayed by the execution process in the controlled node.

[0072] The above solution achieves window matching between the control node and the controlled node, improving node consistency and thus enhancing the user experience when entering command lines on the control node.

[0073] The data processing method in this embodiment will be further illustrated by a specific example below.

[0074] In this embodiment, if the controlled node's operating system is Windows, the target execution process can be launched through the host process of the command-line program that comes with the system on the controlled node. This target execution process can be a shell program such as cmd.exe. This results in an independent console interface, which can be a console interface, providing pseudo-terminal support. The controlled node can use this console interface to convert the received pseudo-terminal control flow data from the control node into API calls that the target execution process in the Windows operating system can understand, and then perform command-line operations based on these API calls. Furthermore, a connection is established between the input / output of the host process of the controlled node's command-line program and the communication interface of the control node, i.e., a communication connection is established between the controlled node and the control node. The user can interact with the shell program on the controlled node through the control node, thereby achieving the purpose of remotely operating the shell program.

[0075] In a penetration testing scenario, the penetration tester uses a C2 node employing the data processing method disclosed herein to control a Windows host. When the penetration tester needs to use the shell functionality on the Windows host, they can enter the corresponding command line through the C2 node's operation window. This automatically launches conhost.exe and the required shell program on the Windows host, and connects the C2 node's terminal application with the Windows host's shell through a communication tunnel between the C2 node and the Windows host. Through this automated operation, the penetration tester obtains an interactive remote shell window based on the Windows system, and can simultaneously use a client based on the PTY protocol to control the target shell.

[0076] The above solution implements an interactive Windows remote shell, improving operational efficiency and remote operation usability in penetration testing. Furthermore, it eliminates the need for manual translation between the PTY protocol and the Windows Shell program, saving time spent on remote control. The data processing method provided in this disclosure allows for operation of the remote shell using a PTY protocol-based client, offering good convenience.

[0077] Figure 5 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this disclosure. The device can be implemented by software and / or hardware and is generally integrated into an electronic device. Figure 5 As shown, the device is applied to a control node and includes:

[0078] The generation module 501 is used to generate execution data in response to the execution operation of the first command line in the operation window;

[0079] The first sending module 502 is used to send the execution data to the controlled node, so that the controlled node generates execution output data based on the execution data and returns the execution output data;

[0080] The first display module 503 is used to receive the execution output data sent by the controlled node and display the execution output data corresponding to the first command line based on the operation window.

[0081] Optionally, the first sending module 502 is used for:

[0082] The execution data is sent to the controlled node, so that the controlled node converts the execution data into execution interface call data through the console interface and obtains the execution output data by making interface calls based on the execution interface call data through the execution process.

[0083] Optionally, the device further includes:

[0084] The startup module is used to send an execution process startup instruction to the controlled node before the execution data is generated, so that the controlled node starts the execution process through the host process of the command line program in response to the execution process startup instruction; wherein the host process includes the console interface.

[0085] Optionally, if the execution output data is process output data, the process output data is data obtained from the controlled node according to a preset period, or the process output data is data obtained from the controlled node in response to a data update request.

[0086] Optionally, the device further includes:

[0087] The acquisition module is configured to, in response to an editing operation in the operation window, acquire edit data based on the execution result data or execution process data of the first command line, wherein the edit data includes at least one operation instruction for the second command line and the corresponding variable;

[0088] The second sending module is used to send the edit data to the controlled node, so that the controlled node generates edit result data based on the edit data and sends the edit result data to the control node;

[0089] The second display module is used to receive the editing result data sent by the control node and display the editing result data corresponding to the second command line based on the operation window.

[0090] Optionally, the operation instructions include one or more of the following: character input instructions, character deletion instructions, and shortcut key instructions.

[0091] Optionally, the device further includes:

[0092] The parsing module is used to parse the preset pseudo-terminal protocol and obtain the window parameters of the operation window;

[0093] The third sending module is used to send the window parameters of the operation window to the controlled node, so that the controlled node can set the window parameters of the running window according to the window parameters of the operation window; wherein, the window parameters include window height parameters and window length parameters.

[0094] The data processing apparatus provided in this disclosure can execute the data processing method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects for executing the method.

[0095] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Figure 6 As shown, the electronic device 600 includes one or more processors 601 and memory 602.

[0096] The processor 601 may be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 600 to perform desired functions.

[0097] The memory 602 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 601 may execute the program instructions to implement the data processing method of the embodiments of this disclosure described above and / or other desired functions. Various contents such as input signals, signal components, and noise components may also be stored in the computer-readable storage medium.

[0098] In one example, the electronic device 600 may also include an input device 603 and an output device 604, which are interconnected via a bus system and / or other forms of connection mechanism (not shown).

[0099] In addition, the input device 603 may also include, for example, a keyboard, a mouse, etc.

[0100] The output device 604 can output various information to the outside, including determined distance information, direction information, etc. The output device 604 may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.

[0101] Of course, for the sake of simplicity, Figure 6 Only some of the components of the electronic device 600 relevant to this disclosure are shown, omitting components such as buses, input / output interfaces, etc. In addition, the electronic device 600 may include any other suitable components depending on the specific application.

[0102] In addition to the methods and apparatus described above, embodiments of this disclosure may also be computer program products, including computer program instructions that, when executed by a processor, cause the processor to perform the data processing methods provided in the embodiments of this disclosure.

[0103] The computer program product can be written in any combination of one or more programming languages ​​to perform the operations of the embodiments of this disclosure. The programming languages ​​include object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on a user's computing device, partially on a user's computing device, as a standalone software package, partially on a user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0104] Furthermore, embodiments of this disclosure may also be computer-readable storage media storing computer program instructions thereon, which, when executed by a processor, cause the processor to perform the data processing method provided in embodiments of this disclosure.

[0105] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0106] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0107] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data processing method, characterized by, The application is applied to a control node, which is a terminal device compatible with a pseudo terminal protocol, and comprises: sending an execution process starting instruction to a controlled node, so that the controlled node starts the execution process through a host process of a command line program in response to the execution process starting instruction; wherein the host process contains a console interface, and an operating system of the controlled node is a Windows operating system; generating execution data in response to an execution operation on a first command line in an operation window; wherein the execution data is pseudo terminal control flow data; sending the execution data to the controlled node, so that the controlled node converts the execution data into execution interface call data through the console interface, and obtains execution output data through interface call based on the execution interface call data through the execution process, and returns the execution output data; wherein the console interface is a console interface in the Windows operating system, the execution output data is process output data, and the process output data changes according to a running condition of the execution data; receiving the execution output data sent by the controlled node, and displaying the execution output data corresponding to the first command line based on the operation window.

2. The method of claim 1, wherein, The process output data is data obtained from the controlled node according to a preset period, or the process output data is data obtained from the controlled node in response to a data update request.

3. The method of claim 1, wherein, Further comprising: obtaining editing data based on execution result data or execution process data of the first command line in response to an editing operation in the operation window, wherein the editing data comprises at least one operation instruction for a second command line and corresponding variables; sending the editing data to the controlled node, so that the controlled node generates editing result data based on the editing data and sends the editing result data to the control node; receiving the editing result data sent by the control node, and displaying the editing result data corresponding to the second command line based on the operation window.

4. The method of claim 3, wherein, The operation instruction comprises one or more of a character input instruction, a character deletion instruction and a shortcut key instruction.

5. The method according to any of claims 1 to 4, characterized in that, Further comprising: analyzing a preset pseudo terminal protocol to obtain window parameters of the operation window; sending the window parameters of the operation window to the controlled node, so that the controlled node sets window parameters of a running window according to the window parameters of the operation window; wherein the window parameters comprise a window height parameter and a window length parameter.

6. A data processing apparatus, characterized by The application is applied to a control node, which is a terminal device compatible with a pseudo terminal protocol, and comprises: a starting module configured to send an execution process starting instruction to a controlled node, so that the controlled node starts the execution process through a host process of a command line program in response to the execution process starting instruction; wherein the host process contains a console interface, and an operating system of the controlled node is a Windows operating system; a generating module configured to generate execution data in response to an execution operation on a first command line in an operation window; The first sending module is configured to send the execution data to the controlled node, so that the controlled node converts the execution data into execution interface calling data through the console interface, and obtains execution output data by performing interface calling based on the execution interface calling data through the execution process, and returns the execution output data; wherein the execution output data is process output data which changes according to the running condition of the execution data; The first display module is configured to receive the execution output data sent by the controlled node, and display the execution output data corresponding to the first command line based on the operation window.

7. An electronic device, comprising: The electronic device comprises: a processor; a memory for storing executable instructions of the processor; the processor is configured to read the executable instructions from the memory and execute the instructions to implement the data processing method of any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, and the computer program is configured to execute the data processing method of any one of claims 1-5.

Citation Information

Patent Citations

  • Method and device for controlling distributed server

    CN106527840A

  • Automatic control method for console program

    CN1770095A