CN115225696A - Remote data interaction method and device - Google Patents

Remote data interaction method and device Download PDF

Info

Publication number
CN115225696A
CN115225696A CN202210815296.7A CN202210815296A CN115225696A CN 115225696 A CN115225696 A CN 115225696A CN 202210815296 A CN202210815296 A CN 202210815296A CN 115225696 A CN115225696 A CN 115225696A
Authority
CN
China
Prior art keywords
data
output
buffer queue
transmitted
ssh
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210815296.7A
Other languages
Chinese (zh)
Inventor
焦恩超
国占飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Topsec Technology Co Ltd
Beijing Topsec Network Security Technology Co Ltd
Beijing Topsec Software Co Ltd
Original Assignee
Beijing Topsec Technology Co Ltd
Beijing Topsec Network Security Technology Co Ltd
Beijing Topsec Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Topsec Technology Co Ltd, Beijing Topsec Network Security Technology Co Ltd, Beijing Topsec Software Co Ltd filed Critical Beijing Topsec Technology Co Ltd
Priority to CN202210815296.7A priority Critical patent/CN115225696A/en
Publication of CN115225696A publication Critical patent/CN115225696A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/142Managing session states for stateless protocols; Signalling session states; State transitions; Keeping-state mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application provides a remote data interaction method and device, and relates to the technical field of Internet of things. The method comprises the following steps: initiating an http connection by a Web console, and carrying out an http request; the http request comprises data to be transmitted; writing the data to be transmitted into a write buffer queue so that the write buffer queue sends the data to be transmitted to a server through an SSH input end for processing to obtain the data to be output; when the situation that data to be output is generated at an SSH output end is monitored, writing the data to be output into a read buffer queue; receiving an http response returned by the read buffer queue through http request polling by taking a preset duration as a period; the http response contains data to be output. By adopting the method, the stability of remote data interaction between the console terminal and the server side can be improved.

Description

Remote data interaction method and device
Technical Field
The application relates to the technical field of internet of things, in particular to a remote data interaction method and device, electronic equipment and a readable storage medium.
Background
WebSocket is a protocol for full duplex communication over a single TCP connection. In the WebSocket API, the browser and the server only need to complete one handshake, and persistent connection can be directly established between the browser and the server for bidirectional data transmission.
In the related technology, a World Wide Web (Web) browser and a server establish a WebSocket channel, then the server establishes an SSH channel with a host through an SSH authentication user password of the host, inputs a command and displays a command execution result through the WebSocket channel, transmits the command sent by the Web browser to the host where the server is located through the SSH channel, and returns the execution result to the Web browser after the server executes the command, so as to implement data interaction between the Web browser and the host where the server is located. However, webSocket is a communication mode with long connection, if packet loss occurs in the midway, disconnection may be caused, and when a user inputs a command again to transmit data, connection needs to be reestablished and a user name password needs to be input, so that stability of remote data interaction between a console terminal and a server is poor.
In summary, how to improve the stability of the remote data interaction between the console terminal and the server is a problem that needs to be solved urgently at present.
Disclosure of Invention
In order to solve the technical problem or at least partially solve the technical problem, the application provides a remote data interaction method, which solves the problem that the stability of remote data interaction between a console terminal and a server is poor.
In order to achieve the above object, the embodiments of the present application provide the following technical solutions:
in a first aspect, an embodiment of the present application provides a remote data interaction method, where the method includes:
initiating an http connection by a Web console, and carrying out an http request; the http request comprises data to be transmitted;
writing the data to be transmitted into a write buffer queue so that the write buffer queue sends the data to be transmitted to a server end through an SSH input end for processing, and acquiring the data to be output;
when the situation that data to be output is generated at an SSH output end is monitored, writing the data to be output into a read buffer queue;
receiving an http response returned by the read buffer queue through http request polling by taking a preset duration as a period; the http response contains data to be output.
As an optional implementation manner in this embodiment of the present application, the writing the data to be transmitted into a write buffer queue so that the write buffer queue sends the data to be transmitted to a server through an SSH input end for processing, and acquiring the data to be output includes:
monitoring whether data input is to be transmitted or not through a web console;
and if the data to be transmitted is input, writing the data to be transmitted into a write buffer queue so that the write buffer queue sends the data to be transmitted to a server side through an SSH input end for processing to obtain the data to be output.
As an optional implementation manner of the embodiment of the present application, when it is monitored that data to be output is generated at an SSH output end, writing the data to be output into a read buffer queue includes:
when the data to be transmitted is written into an SSH input end through the write buffer queue, monitoring whether the SSH output end generates the data to be output or not;
and if the SSH output end generates data to be output, writing the data to be output into a read buffer queue.
As an optional implementation manner of the embodiment of the present application, the http response returned by the read buffer queue is received through http request polling with a preset duration as a period; the http response contains data to be output, and comprises the following steps:
monitoring whether the read buffer queue has data to be output or not through http request polling by taking a preset time length as a period;
and if the read buffer queue has data to be output, receiving an http response sent by the read buffer queue.
As an optional implementation manner of this embodiment of the present application, after receiving the data to be output, the method further includes:
and displaying the data to be output through a web console.
As an optional implementation manner in this embodiment of the present application, before initiating an http connection and making an http request at a Web console, the method further includes:
and acquiring the web authority, and opening the web console.
As an optional implementation manner in this embodiment of the present application, before the write buffer queue sends the data to be transmitted to the server through the SSH input end for processing, the method further includes:
and remotely connecting a server side according to the http request, and establishing an SSH channel.
In a second aspect, an embodiment of the present application provides a remote data interaction device, including:
the sending module is used for initiating http connection by the Web console and carrying out http request; the http request comprises data to be transmitted;
the processing module is used for writing the data to be transmitted into a write buffer queue so that the write buffer queue sends the data to be transmitted to a server through an SSH input end for processing to obtain the data to be output;
the monitoring module is used for writing the data to be output into a read buffer queue when the SSH output end is monitored to generate the data to be output;
the receiving module is used for receiving an http response returned by the read buffer queue through http request polling by taking a preset duration as a period; the http response contains data to be output.
As an optional implementation manner of the embodiment of the present application, the processing module is specifically configured to:
monitoring whether data input is to be transmitted or not through a web console;
and if the data to be transmitted is input, writing the data to be transmitted into a write buffer queue so that the write buffer queue sends the data to be transmitted to a server side through an SSH input end for processing to obtain the data to be output.
As an optional implementation manner of the embodiment of the present application, the monitoring module is specifically configured to:
when the data to be transmitted is written into an SSH input end through the write buffer queue, monitoring whether the SSH output end generates the data to be output or not;
and if the SSH output end generates data to be output, writing the data to be output into a read buffer queue.
As an optional implementation manner of the embodiment of the present application, the receiving module is specifically configured to:
monitoring whether the read buffer queue has data to be output or not through http request polling by taking a preset time length as a period;
and if the read buffer queue has data to be output, receiving an http response sent by the read buffer queue.
As an optional implementation manner of the embodiment of the present application, the apparatus further includes:
and the display module is used for displaying the data to be output through the web console.
As an optional implementation manner of the embodiment of the present application, the apparatus further includes:
and the permission acquisition module is used for acquiring the web permission and opening the web console.
As an optional implementation manner of the embodiment of the present application, the apparatus further includes:
and the channel establishing module is used for remotely connecting the server according to the http request and establishing an SSH channel.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the remote data interaction method according to the first aspect or any implementation manner of the first aspect when executing the computer program.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the remote data interaction method described in the first aspect or any implementation manner of the first aspect.
The method for remote data interaction includes the steps that firstly, a Web console initiates http connection, an http request is carried out, data to be transmitted is written into a write buffer queue due to the fact that the http request comprises the data to be transmitted, the write buffer queue sends the data to be transmitted to a server side through an SSH input end to be processed, an http response containing the data to be output is obtained, when it is monitored that output data with preset duration is generated at an SSH output end, the data to be output is written into a read buffer queue, and the data to be output sent by the read buffer queue is received through http request polling. The http short connection is disconnected after data transmission is finished each time, so that data to be transmitted can be obtained from a write buffer queue of a background when data is transmitted again, the data to be transmitted is sent to a server to be processed to obtain data to be output, the read buffer queue is monitored by taking preset duration as a period, the data to be output sent by the read buffer queue is received through http request polling, and therefore remote data interaction between a Web console and the server is achieved through the http short connection, the problem that the stability of remote data interaction between the console terminal and the server is poor under the condition that packet loss occurs when a network is disconnected is avoided, and the stability of remote control data transmission is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
FIG. 1 is a flow diagram illustrating a method for remote data interaction in one embodiment;
FIG. 2 is a schematic diagram of a remote data interaction device in one embodiment;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order that the above-mentioned objects, features and advantages of the present application may be more clearly understood, the solution of the present application will be further described below. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present application may be practiced in other ways than those described herein; it is to be understood that the embodiments described in this specification are only some embodiments of the present application and not all embodiments.
Relational terms such as "first" and "second," and the like, may be used throughout the description and claims of the present application to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
In the embodiments of the present application, the words "exemplary" or "such as" are used for illustration, demonstration, or description. Any embodiment or design described herein as "exemplary" or "such as" is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present relevant concepts in a concrete fashion. Further, in the description of the embodiments of the present application, the meaning of "a plurality" means two or more unless otherwise specified.
The SSH (Secure Shell) protocol is a protocol that is specific to providing security for telnet sessions and other network services. The SSH protocol can be used for effectively preventing the information leakage problem in the remote management process. The SSH protocol may encrypt the transmitted data.
The HTTP connection means that the client and the server close the connection after making an HTTP request/response.
In one embodiment, as shown in fig. 1, there is provided a remote data interaction method, including the steps of:
and S11, initiating an http connection by the Web console, and carrying out an http request.
In particular, the Web console is a Web-based user interface that has access to all monitoring data and tasks (operations that can be performed on the monitored computer from the operations console).
Specifically, the http request may be understood as a request message from the Web console to the server. The method comprises the following steps: in the message head line, the request method for the resource, the identifier of the resource and the protocol used. In this embodiment, the http request contains data to be transmitted.
And S12, writing the data to be transmitted into a write buffer queue so that the write buffer queue sends the data to be transmitted to a server through an SSH input end for processing, and acquiring the data to be output.
And the data to be output is data obtained after the server side processes the data to be transmitted.
Optionally, an implementation manner of the step S12 (writing the to-be-transmitted data into a write buffer queue, so that the write buffer queue sends the to-be-transmitted data to a server through an SSH input end for processing, and obtains the to-be-output data) may include:
a. and monitoring whether data input is to be transmitted or not through the web console.
b. And if the data to be transmitted is input, writing the data to be transmitted into a write buffer queue so that the write buffer queue sends the data to be transmitted to a server side through an SSH input end for processing to obtain the data to be output.
Specifically, the web console is a front xterm plug-in for monitoring keyboard events, and when a keyboard click event is monitored, the monitored characters are sent to a back write buffer queue through an http request. The back end monitors whether the write buffer queue has data to be transmitted or not, if so, the data to be transmitted is read to the SSH input end, the SSH input end sends the data to be transmitted to the server end, and the server end processes the data to be transmitted to obtain the data to be output and returns the data to the SSH output end. Xterm is a terminal simulator on the X Window System, and is used to provide multiple independent SHELL inputs and outputs.
And S13, when the situation that the SSH output end generates the data to be output is monitored, writing the data to be output into a read buffer queue.
Specifically, the back end monitors whether the SSH output end has data to be output, and if the SSH output end has data to be output, the back end reads the data to be output at the SSH output end to the read buffer queue.
The data to be transmitted are temporarily stored through the write buffer queue, the data to be output are temporarily stored through the read buffer queue, and under the condition that the network fluctuates, if packet loss occurs, the data can be obtained from the write buffer queue and the read buffer queue, and the lost data packet is reprocessed.
S14, receiving an http response returned by the read buffer queue through http request polling by taking a preset duration as a period; the http response contains data to be output.
Specifically, an http request is sent to the server at preset time intervals, and when it is monitored that the read buffer queue has data to be output, an http response returned from the read buffer queue is received.
In the embodiment of the application, firstly, a Web console initiates http connection to perform an http request, the http request contains data to be transmitted, the data to be transmitted is written into a write buffer queue, so that the write buffer queue sends the data to be transmitted to a server through an SSH input end to be processed, an http response containing the data to be output is obtained, when the SSH output end is monitored to generate data with output, the data to be output is written into a read buffer queue, and the data to be output sent by the read buffer queue is received through http request polling with preset duration as a period. The http short connection is disconnected after data transmission is finished each time, so that data to be transmitted can be obtained from a background write buffer queue when data is transmitted again, the data to be transmitted is sent to the server to be processed to obtain data to be output, the read buffer queue is monitored by taking the preset duration as a period, the data to be output sent by the read buffer queue is received through http request polling, and therefore remote data interaction between the Web control console and the server is achieved through the http short connection, the problem that the stability of remote data interaction between the control console terminal and the server is poor under the condition that packet loss occurs when a network is disconnected is avoided, and the stability of remote control data transmission is improved.
As an optional implementation manner of this embodiment, step S13 (writing the data to be output into the read buffer queue when it is monitored that the SSH output end generates the data to be output) may be implemented by:
(1) And monitoring whether the SSH output end generates the data to be output or not when the data to be transmitted is written into the SSH input end through the write buffer queue.
(2) And if the SSH output end generates data to be output, writing the data to be output into a read buffer queue.
Illustratively, the back end monitors whether the write buffer queue has data to be transmitted, if the data to be transmitted is to be transmitted, the data to be transmitted is read to the SSH input end, the SSH input end sends the data to be transmitted to the server, and the server processes the data to be transmitted to obtain the data to be output, and returns the data to the SSH output end.
As an optional implementation manner of this embodiment, step S14 (receiving, by polling with a preset duration as a period, an http response returned by the read buffer queue through an http request; where the http response includes data to be output) may be implemented by:
A. and monitoring whether the read buffer queue has data to be output or not by polling through an http request with a preset duration as a period.
B. And if the read buffer queue has data to be output, receiving an http response sent by the read buffer queue.
For example, the preset time period may be 3 seconds, or may be other reasonable values, which is not specifically limited herein and may be determined according to actual situations in the application. For example, every 3 seconds, a front-end timer sends an http request to acquire data in a read buffer queue, monitors whether the data in the read buffer queue is to be output, and if the data in the read buffer queue is to be output, a web console receives the data to be output sent by the read buffer queue.
In some embodiments, after receiving the data to be output, the data to be output is displayed through a web console.
For example, the web console may also display data to be output, for example, the data to be transmitted may be a console command: netstat-a (displaying all monitoring ports), and processing the console command by the server side to obtain the data to be output, namely the states, local addresses, external addresses and used protocols of all the current monitoring ports.
In some embodiments, before the Web console initiates an http connection and makes an http request, the Web console is opened by obtaining the Web permission.
Specifically, before the Web console initiates http connection and makes an http request, a Web login password is acquired, and the Web console is opened.
In some embodiments, before the write buffer queue sends the data to be transmitted to the server through the SSH input end for processing, the server is remotely connected according to the http request, and an SSH channel is established.
Specifically, SSH (Secure Shell) is a Secure channel protocol, and is mainly used to implement remote login and remote copy functions of a character interface. The SSH protocol encrypts data transmissions of both parties of the communication, including user passwords input during user login, and is a security protocol established on the basis of an application layer and a transport layer. In this embodiment, before sending the data to be transmitted to the server for processing, an SSH channel is first established, and remote data transmission can be implemented through the SSH channel.
In some embodiments, the method can be applied to the security access gateway of the internet of things, and is mainly used for remotely managing the gateway in a command line mode. Illustratively, firstly, logging in a security access gateway page of the Internet of things, acquiring web authority, and opening a web console; then, inputting a control command or a gateway management command at a web console terminal; then, the output result of the control command returned by the server is displayed to the web console terminal; and finally, closing the web console terminal, destroying the session at the back end, and disconnecting the http connection. The control command may be ls (view all files), cd/(jump to root directory), cd dir (switch to specified path), and the like, which are only examples and are not limited specifically. In addition, the gateway management command may be a command such as tail (view dynamic log), tail-f (loop read dynamic log), -ntlp (view port number), and the like, and as such, the gateway command is merely exemplified herein and is not particularly limited. Data interaction is carried out by adopting http connection and increasing a data buffer area, retransmission of lost data can be realized under the condition of poor network conditions, the problem of connection interruption caused by packet loss is avoided, and the stability of remote control data transmission is further improved.
In the embodiment of the application, firstly, a Web console initiates http connection to perform an http request, the http request contains data to be transmitted, the data to be transmitted is written into a write buffer queue, so that the write buffer queue sends the data to be transmitted to a server through an SSH input end to be processed, an http response containing the data to be output is obtained, when the SSH output end is monitored to generate data with output, the data to be output is written into a read buffer queue, and the data to be output sent by the read buffer queue is received through http request polling with preset duration as a period. The http short connection is disconnected after data transmission is finished each time, so that data to be transmitted can be obtained from a write buffer queue of a background when data is transmitted again, the data to be transmitted is sent to a server to be processed to obtain data to be output, the read buffer queue is monitored by taking preset duration as a period, the data to be output sent by the read buffer queue is received through http request polling, and therefore remote data interaction between a Web console and the server is achieved through the http short connection, the problem that the stability of remote data interaction between the console terminal and the server is poor under the condition that packet loss occurs when a network is disconnected is avoided, and the stability of remote control data transmission is improved.
In one embodiment, as shown in fig. 2, there is provided a remote data interaction device 200, comprising:
a sending module 210, configured to initiate an http connection by a Web console, and perform an http request; the http request comprises data to be transmitted;
the processing module 220 is configured to write the data to be transmitted into a write buffer queue, so that the write buffer queue sends the data to be transmitted to a server through an SSH input end for processing, and obtains data to be output;
the monitoring module 230 is configured to, when it is monitored that the SSH output end generates data to be output, write the data to be output into a read buffer queue;
a receiving module 240, configured to receive, by taking a preset duration as a period and through http request polling, an http response returned by the read buffer queue; the http response contains data to be output.
As an optional implementation manner of the embodiment of the present application, the processing module 220 is specifically configured to:
monitoring whether data input is to be transmitted or not through a web console;
and if the data to be transmitted is input, writing the data to be transmitted into a write buffer queue so that the write buffer queue sends the data to be transmitted to a server side through an SSH input end for processing to obtain the data to be output.
As an optional implementation manner of the embodiment of the present application, the monitoring module 230 is specifically configured to:
when the data to be transmitted is written into an SSH input end through the write buffer queue, monitoring whether the SSH output end generates the data to be output or not;
and if the SSH output end generates data to be output, writing the data to be output into a read buffer queue.
As an optional implementation manner of this embodiment, the receiving module 240 is specifically configured to:
monitoring whether the read buffer queue has data to be output or not through http request polling by taking a preset time length as a period;
and if the read buffer queue has data to be output, receiving an http response sent by the read buffer queue.
As an optional implementation manner of the embodiment of the present application, the apparatus further includes:
and the display module is used for displaying the data to be output through the web console.
As an optional implementation manner of the embodiment of the present application, the apparatus further includes:
and the permission acquisition module is used for acquiring the web permission and opening the web console.
As an optional implementation manner of the embodiment of the present application, the apparatus further includes:
and the channel establishing module is used for remotely connecting a server according to the http request and establishing an SSH channel.
By applying the embodiment of the application, firstly, a Web console initiates an http connection to carry out an http request, the http request comprises data to be transmitted, the data to be transmitted is written into a write buffer queue, so that the write buffer queue sends the data to be transmitted to a server side through an SSH input end for processing, an http response comprising the data to be output is obtained, when the SSH output end is monitored to generate data with output, the data to be output is written into a read buffer queue, and the data to be output sent by the read buffer queue is received through http request polling with preset duration as a period. The http short connection is disconnected after data transmission is finished each time, so that data to be transmitted can be obtained from a write buffer queue of a background when data is transmitted again, the data to be transmitted is sent to a server to be processed to obtain data to be output, the read buffer queue is monitored by taking preset duration as a period, the data to be output sent by the read buffer queue is received through http request polling, and therefore remote data interaction between a Web console and the server is achieved through the http short connection, the problem that the stability of remote data interaction between the console terminal and the server is poor under the condition that packet loss occurs when a network is disconnected is avoided, and the stability of remote control data transmission is improved.
For specific limitations of the remote data interaction device, reference may be made to the above limitations of the remote data interaction method, which are not described herein again. The modules in the remote data interaction device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or be independent of a processor of the electronic device, and can also be stored in the processor of the electronic device in a software form, so that the processor can call and execute operations corresponding to the modules.
An embodiment of the present application further provides an electronic device, and fig. 3 is a schematic structural diagram of the electronic device provided in the embodiment of the present application. As shown in fig. 3, the electronic device provided in this embodiment includes: a memory 31 and a processor 32, the memory 31 being for storing computer programs; the processor 32 is configured to execute the steps performed by any of the embodiments of the remote data interaction method provided by the above-mentioned method embodiments when the computer program is called. The electronic equipment comprises a processor, a memory, a communication interface, a display screen and an input device which are connected through a system bus. Wherein the processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic equipment comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The computer program is executed by a processor to implement a remote data interaction method. The display screen of the electronic equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on a shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 3 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular electronic devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the remote data interaction device provided by the present application can be implemented in the form of a computer, and a computer program can be run on an electronic device as shown in fig. 3. The memory of the electronic device may store various program modules constituting the remote data interaction device of the electronic device, such as the transmitting module 210, the processing module 220, the monitoring module 230, and the receiving module 240 shown in fig. 2. The computer program constituted by the program modules makes the processor execute the steps of the remote data interaction method of the electronic equipment of the embodiments of the present application described in the present specification.
The embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the remote data interaction method provided in the foregoing method embodiment is implemented.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied in the medium.
The processor may be a Central Processing Unit (CPU), other general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer readable media include both permanent and non-permanent, removable and non-removable storage media. Storage media may implement information storage by any method or technology, and the information may be computer-readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include transitory computer readable media (transitionamedia), such as modulated data signals and carrier waves.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present disclosure, which enable those skilled in the art to understand or practice the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A remote data interaction method, comprising:
initiating an http connection by a Web console, and carrying out an http request; the http request comprises data to be transmitted;
writing the data to be transmitted into a write buffer queue so that the write buffer queue sends the data to be transmitted to a server through an SSH input end for processing to obtain the data to be output;
when the situation that data to be output is generated at an SSH output end is monitored, writing the data to be output into a read buffer queue;
receiving an http response returned by the read buffer queue through http request polling by taking a preset duration as a period; the http response contains data to be output.
2. The method of claim 1, wherein writing the data to be transmitted into a write buffer queue so that the write buffer queue sends the data to be transmitted to a server through an SSH input end for processing, and acquiring the data to be output comprises:
monitoring whether data input is to be transmitted or not through a web console;
and if the data to be transmitted is input, writing the data to be transmitted into a write buffer queue so that the write buffer queue sends the data to be transmitted to a server side through an SSH input end for processing to obtain the data to be output.
3. The method of claim 1, wherein writing the data to be output to a read buffer queue when it is monitored that the SSH output generates the data to be output comprises:
when the data to be transmitted is written into an SSH input end through the write buffer queue, monitoring whether the SSH output end generates the data to be output or not;
and if the SSH output end generates data to be output, writing the data to be output into a read buffer queue.
4. The method according to claim 1, wherein the http response returned by the read buffer queue is received through http request polling with a preset duration as a period; the http response contains data to be output, and comprises the following steps:
monitoring whether the read buffer queue has data to be output or not through http request polling by taking a preset time length as a period;
and if the read buffer queue has data to be output, receiving an http response sent by the read buffer queue.
5. The method of claim 1, wherein after receiving the data to be output, the method further comprises:
and displaying the data to be output through a web console.
6. The method of claim 1, wherein before the Web console initiates the http connection and makes the http request, the method further comprises:
and acquiring the web authority, and opening the web console.
7. The method of claim 1, wherein before the write buffer queue sends the data to be transmitted to a server via an SSH input for processing, the method further comprises:
and remotely connecting a server side according to the http request, and establishing an SSH channel.
8. A remote data interaction device, comprising:
the sending module is used for initiating http connection by the Web console and carrying out http request; the http request comprises data to be transmitted;
the processing module is used for writing the data to be transmitted into a write buffer queue so that the write buffer queue sends the data to be transmitted to a server through an SSH input end for processing to obtain the data to be output;
the monitoring module is used for writing the data to be output into the read buffer queue when the SSH output end is monitored to generate the data to be output;
the receiving module is used for receiving an http response returned by the read buffer queue through http request polling by taking a preset duration as a period; the http response contains data to be output.
9. An electronic device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the remote data interaction method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the remote data interaction method according to any one of claims 1 to 7.
CN202210815296.7A 2022-07-08 2022-07-08 Remote data interaction method and device Pending CN115225696A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210815296.7A CN115225696A (en) 2022-07-08 2022-07-08 Remote data interaction method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210815296.7A CN115225696A (en) 2022-07-08 2022-07-08 Remote data interaction method and device

Publications (1)

Publication Number Publication Date
CN115225696A true CN115225696A (en) 2022-10-21

Family

ID=83611521

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210815296.7A Pending CN115225696A (en) 2022-07-08 2022-07-08 Remote data interaction method and device

Country Status (1)

Country Link
CN (1) CN115225696A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1997000A (en) * 2005-12-31 2007-07-11 腾讯科技(深圳)有限公司 Virtual-host-based web server and method for user obtaining access data
CN102413191A (en) * 2011-12-30 2012-04-11 深圳市旗瀚软件有限公司 Web instant communication method based on browser
CN104660708A (en) * 2015-03-13 2015-05-27 黄庆宇 HTTP (Hyper Text Transfer Protocol) based mobile application message forwarding method and system
CN107623745A (en) * 2017-10-12 2018-01-23 郑州市景安网络科技股份有限公司 A kind of monitoring method, system and computer-readable recording medium
CN110121142A (en) * 2019-03-25 2019-08-13 南京理工大学 A kind of subway blind guiding system and method based on Android platform
CN110191174A (en) * 2019-05-28 2019-08-30 西门子(上海)电气传动设备有限公司 Data monitoring system, method and computer-readable medium based on http protocol
CN111212117A (en) * 2019-12-24 2020-05-29 曙光信息产业(北京)有限公司 Remote interaction method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1997000A (en) * 2005-12-31 2007-07-11 腾讯科技(深圳)有限公司 Virtual-host-based web server and method for user obtaining access data
CN102413191A (en) * 2011-12-30 2012-04-11 深圳市旗瀚软件有限公司 Web instant communication method based on browser
CN104660708A (en) * 2015-03-13 2015-05-27 黄庆宇 HTTP (Hyper Text Transfer Protocol) based mobile application message forwarding method and system
CN107623745A (en) * 2017-10-12 2018-01-23 郑州市景安网络科技股份有限公司 A kind of monitoring method, system and computer-readable recording medium
CN110121142A (en) * 2019-03-25 2019-08-13 南京理工大学 A kind of subway blind guiding system and method based on Android platform
CN110191174A (en) * 2019-05-28 2019-08-30 西门子(上海)电气传动设备有限公司 Data monitoring system, method and computer-readable medium based on http protocol
CN111212117A (en) * 2019-12-24 2020-05-29 曙光信息产业(北京)有限公司 Remote interaction method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
吴功宜: "《计算机网络技术教程》", vol. 2, 北京:北京邮电大学出版社, pages: 154 - 157 *
马巾凌等: "PHP企业级应用", 31 August 2020, 重庆大学电子音像出版社, pages: 170 - 171 *
马超等: "Android移动设备应用程序开发", vol. 1, 31 December 2016, 哈尔滨:哈尔滨工业大学出版社, pages: 229 - 157 *

Similar Documents

Publication Publication Date Title
EP3777009B1 (en) Access to content of encrypted data session
US9584515B2 (en) Enterprise system authentication and authorization via gateway
US9531714B2 (en) Enterprise authentication via third party authentication support
US10277578B2 (en) Securing network activity managed by operating systems
JP4456929B2 (en) Architecture for connecting remote clients to local client desktops
CN109768965B (en) Login method, equipment and storage medium of server
CA2598227C (en) Mapping an encrypted https network packet to a specific url name and other data without decryption outside of a secure web server
US20210168088A1 (en) Discovery and Adjustment of Path Maximum Transmission Unit
CN111428225A (en) Data interaction method and device, computer equipment and storage medium
CN108964893B (en) Key processing method, device, equipment and medium
US10936470B2 (en) Systems and methods for performance bug and grievance reports for SaaS applications
US11010486B2 (en) Secure offline streaming of content
EP3881522B1 (en) Systems and methods for push notification service for saas applications
CN114978752A (en) Weak password detection method and device, electronic equipment and computer readable storage medium
CN107948210A (en) A kind of login method, device, client, server and medium
CN115225696A (en) Remote data interaction method and device
CN113691510A (en) Cross-domain access control method, system, storage medium and equipment
CN111953742A (en) Page redirection method, terminal equipment, intermediate equipment and server
CN111970281B (en) Routing equipment remote control method and system based on verification server and electronic equipment
Sridharan Track Your Track (TYT)
CN117155904A (en) Service registration method
CN115242519A (en) Login password substitution method based on reverse proxy
CN117354205A (en) Handshake multiplexing method, device and computer readable medium
CN114500399A (en) Data transmission method, apparatus, medium and product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination