A method and apparatus for remote server management
By using a front-end and back-end separated architecture to manage remote servers, the problems of compatibility and sensitive information leakage in traditional management software are solved, enabling flexible management and secure display across platforms.
Patent Information
- Application Number
- CN202111553133.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-17
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2041-12-17
AI Technical Summary
Traditional remote server management software has poor compatibility, cannot maintain consistency across platforms, and is prone to leakage of sensitive information.
It adopts a front-end and back-end separation architecture, establishes a session connection between the front-end and the target remote server, receives and encodes the login data stream, reduces the interaction of sensitive information, supports multiple character set encoding for display, and achieves flexible management.
It effectively prevents the leakage of sensitive server information, solves cross-platform and software dependency issues, and improves management flexibility and security.
Smart Images

Figure CN114238928B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of resource scheduling, and in particular to a remote server management method and device. BACKGROUND
[0002] In the traditional test environment management, multiple software such as SecureCRT, putty, filezilla, etc. is needed to complete the management of the remote server, but the compatibility and cross-platform of the multiple software cannot be consistent. In addition, sensitive information such as server password needs to be entered in advance in the software during the management, which is easy to cause the leakage of the server sensitive information. SUMMARY
[0003] Therefore, the embodiments of the present application provide a remote server management method and device, which can effectively avoid the leakage of the server sensitive information and realize the display of multiple character set encodings. The target remote server is managed by using a front-back separation type architecture, the limitations such as cross-platform and software dependency are solved, and the flexible management of the target remote server is realized.
[0004] To achieve the above object, according to a first aspect of the embodiments of the present application, a remote server management method is provided, comprising:
[0005] In response to receiving a login request sent by the front end, a session connection between the front end and the target remote server is established; the login request indicates login information and the target remote server;
[0006] Login data corresponding to the login information returned by the target remote server is received;
[0007] The login data is converted into a data stream, the data stream is encoded according to the encoding configuration of the front end, and the encoded data stream is sent to the front end, so that the front end displays the encoded data stream.
[0008] Optionally, the establishment of the session connection between the front end and the target remote server comprises:
[0009] The login request is verified, and a socket connection is established with the front end after the verification is passed;
[0010] The target remote server is matched according to the login request, and a remote connection is established with the target remote server.
[0011] Optionally, the login request further includes an authorization code for the target remote server, and the verification of the login request comprises: verification of the login information and / or the authorization code.
[0012] Optionally, the login information comprises a login account, and the verifying the login information comprises:
[0013] verifying whether the login account has a permission to log in the target remote server, and if yes, determining that the verification is passed; otherwise, determining that the verification is failed.
[0014] Optionally, after the encoding processing of the data stream according to the encoding configuration of the foreground and sending the data stream after the encoding processing to the foreground, the method further comprises:
[0015] receiving an encoding change message sent by the foreground;
[0016] determining a changed encoding configuration of the foreground according to the encoding change message;
[0017] encoding processing the data stream according to the changed encoding configuration of the foreground to generate an encoding changed data stream;
[0018] sending the encoding changed data stream to the foreground to enable the foreground to display the encoding changed data stream.
[0019] Optionally, after sending the data stream after the encoding processing to the foreground, the method further comprises:
[0020] receiving a file transmission instruction for the target remote server sent by the foreground, the file transmission instruction indicating a to-be-transmitted file and a remote path;
[0021] based on the file transmission instruction, sending a file transmission request to the target remote server to enable the target remote server to transmit the to-be-transmitted file to a position specified by the remote path.
[0022] Optionally, before receiving the login request sent by the foreground, the method comprises: receiving a selection instruction of the target remote server from a remote server list by the foreground to determine the target remote server.
[0023] Optionally, the method further comprises: receiving a change request for the remote server list sent by the foreground, and changing the remote server list based on the change request.
[0024] Optionally, before sending the data stream after the encoding processing to the foreground, the method comprises:
[0025] in response to receiving the row and column values of the changed display window sent by the foreground, adjusting the row and column values in the data stream after the encoding processing according to the row and column values of the changed display window, wherein the row and column values of the changed display window are obtained by the foreground by listening to an event indicating a change of the row and column values of the display window.
[0026] Optionally, after sending the data stream processed by encoding to the foreground, the method further comprises: disconnecting the session connection with the foreground and the remote server when no operation instruction for the target remote server sent by the foreground is received within a preset time.
[0027] A second aspect of the embodiment of the application provides a remote server management method, comprising:
[0028] sending a login request to the background to establish a session connection with the target remote server through the background; the login request indicating login information and the target remote server;
[0029] receiving a data stream processed by encoding returned by the background corresponding to the login information;
[0030] The data stream processed by encoding is obtained by: the background receiving login data returned by the target remote server corresponding to the login information, the background converting the login data into a data stream, and the background processing the data stream by encoding according to an encoding configuration to obtain the data stream processed by encoding.
[0031] displaying the data stream processed by encoding.
[0032] Optionally, sending a login request to the background to establish a session connection with the target remote server through the background comprises:
[0033] sending the login request to the background to enable the background to verify the login request and establish a socket connection with the background after verification;
[0034] and enabling the background to match the target remote server according to the login request to enable the background to establish a remote connection with the target remote server.
[0035] Optionally, the login request further comprises an authorization code for the target remote server to enable the background to verify the login request, comprising: enabling the background to verify the login information and / or the authorization code.
[0036] Optionally, the login information comprises a login account to enable the background to verify the login information, comprising: enabling the background to verify whether the login account has the permission to log in the target remote server, and if yes, the verification is passed; otherwise, the verification is failed.
[0037] Optionally, after receiving the data stream processed by encoding returned by the background corresponding to the login information, the method further comprises:
[0038] sending a coding change message to the background, so that the background determines a changed coding configuration of the foreground according to the coding change message;
[0039] and so that the background encodes the data stream data according to the changed coding configuration of the foreground, and then generates a coding-changed data stream;
[0040] receiving the coding-changed data stream sent by the background, and displaying the coding-changed data stream.
[0041] Optionally, after displaying the coding-processed data stream, the method further comprises:
[0042] sending a file transmission instruction for the target remote server to the background, the file transmission instruction indicating a to-be-transmitted file and a remote path;
[0043] so that the background sends a file transmission request to the target remote server based on the file transmission instruction, and so that the target remote server transmits the to-be-transmitted file to a location specified by the remote path.
[0044] Optionally, before sending the login request to the background, the method comprises: sending a selection instruction for the target remote server from a remote server list to the background, so as to determine the target remote server.
[0045] Optionally, the method further comprises:
[0046] sending a change request for the remote server list to the background, so that the background changes the remote server list based on the change request.
[0047] Optionally, before receiving the coding-processed data stream corresponding to the login information returned by the background, the method comprises:
[0048] listening to an event indicating a change in the row and column values of the display window; sending the changed row and column values of the display window to the background, so that the background adjusts the row and column values in the coding-processed data stream according to the changed row and column values of the display window.
[0049] Optionally, after displaying the coding-processed data stream, the method further comprises: when no operation instruction for the target remote server is sent to the background within a preset time, disconnecting the session connection between the background and the target remote server.
[0050] A third aspect of the embodiment of the application provides a device for remote server management, comprising:
[0051] The connection module establishes a session connection between the foreground and the target remote server in response to receiving a login request sent by the foreground, the login request indicating login information and the target remote server;
[0052] The first receiving module receives login data corresponding to the login information returned by the target remote server;
[0053] The first sending module converts the login data into a data stream, encodes the data stream according to the encoding configuration of the foreground, and sends the encoded data stream to the foreground, so that the foreground displays the encoded data stream.
[0054] Optionally, the first receiving module is further configured to:
[0055] verify the login request and establish a socket connection with the foreground after verification;
[0056] According to the login request, the target remote server is matched, and a remote connection is established with the target remote server.
[0057] Optionally, the login request further includes an authorization code for the target remote server, and the first receiving module is further configured to verify the login information and / or the authorization code.
[0058] Optionally, the login information includes a login account, and the first receiving module is further configured to:
[0059] Verify whether the login account has the permission to log in to the target remote server, if yes, determine that the verification is passed; otherwise, the verification is not passed.
[0060] Optionally, the first sending module is further configured to, after encoding the data stream according to the encoding configuration of the foreground and sending the encoded data stream to the foreground,
[0061] Receive the encoding change message sent by the foreground;
[0062] According to the encoding change message, determine the changed encoding configuration of the foreground;
[0063] Encode the data stream according to the changed encoding configuration of the foreground to generate an encoded data stream;
[0064] Send the encoded data stream to the foreground, so that the foreground displays the encoded data stream.
[0065] Optionally, the apparatus further comprises a first file transmission module configured to: after sending the encoded data stream to the foreground,
[0066] receive the file transmission instruction for the target remote server sent by the foreground, the file transmission instruction indicating a to-be-transmitted file and a remote path;
[0067] based on the file transmission instruction, send a file transmission request to the target remote server, so that the target remote server transmits the to-be-transmitted file to a location specified by the remote path.
[0068] Optionally, the apparatus comprises a first determination module configured to: before receiving the login request sent by the foreground, receive a selection instruction of the target remote server from a remote server list by the foreground, and determine the target remote server.
[0069] Optionally, the apparatus further comprises a first change module configured to: receive a change request for the remote server list sent by the foreground, and change the remote server list based on the change request.
[0070] Optionally, the first sending module is further configured to: before sending the encoded data stream to the foreground,
[0071] in response to receiving the changed row and column values of the display window sent by the foreground, adjusting the row and column values in the encoded data stream according to the changed row and column values of the display window, wherein the changed row and column values of the display window are obtained by the foreground by listening to an event indicating a change in the row and column values of the display window.
[0072] Optionally, the apparatus further comprises a first listening module configured to: after the first sending module sends the encoded data stream to the foreground, when no operation instruction for the target remote server sent by the foreground is received within a preset time, disconnecting the session connection with the foreground and the remote server.
[0073] A fourth aspect of the embodiment of the application provides an apparatus for remote server management, comprising:
[0074] a second sending module configured to send a login request to a background to establish a session connection with the background and a target remote server; the login request indicating login information and the target remote server;
[0075] a second receiving module configured to receive the encoded data stream corresponding to the login information returned by the background;
[0076] a display module configured to display the encoded data stream.
[0077] Optionally, the second sending module is further configured to:
[0078] send a login request to the background, so that the background checks the login request and establishes a socket connection with the background after the login request is verified;
[0079] and so that the background matches the target remote server according to the login request, so that the background establishes a remote connection with the target remote server.
[0080] Optionally, the login request further includes an authorization code for the target remote server, and the second sending module is further configured to:
[0081] Optionally, the login information includes a login account, and the second sending module is further configured to: make the background check whether the login account has the permission to log in to the target remote server, and if yes, the verification is passed; otherwise, the verification is failed.
[0082] Optionally, the second receiving module is further configured to, after receiving the encoded data stream corresponding to the login information returned by the background,
[0083] send an encoding change message to the background, so that the background determines the changed encoding configuration of the foreground according to the encoding change message;
[0084] and so that the background encodes the data stream data according to the changed encoding configuration of the foreground, and then generates an encoding-changed data stream;
[0085] receive the encoding-changed data stream sent by the background, and display the encoding-changed data stream.
[0086] Optionally, the apparatus further includes a second file transmission module configured to, after displaying the encoded data stream,
[0087] sending a file transmission instruction for the target remote server to the background, the file transmission instruction indicating a to-be-transmitted file and a remote path;
[0088] so that the background sends a file transmission request to the target remote server based on the file transmission instruction, and the target remote server transmits the to-be-transmitted file to a location specified by the remote path.
[0089] Optionally, the apparatus further comprises a second determination module configured to: before sending the login request to the background, send a selection instruction for the target remote server from a remote server list to the background, so as to determine the target remote server.
[0090] Optionally, the apparatus further comprises a second change module configured to: send a change request for the remote server list to the background, so that the background changes the remote server list based on the change request.
[0091] Optionally, the second sending module is further configured to: before receiving the encoded processed data stream corresponding to the login information returned by the background, listen to an event indicating a change of row and column values of a display window; send the changed row and column values of the display window to the background, so that the background adjusts the row and column values in the encoded processed data stream according to the changed row and column values of the display window.
[0092] Optionally, the apparatus further comprises a second listening module configured to: after the display module displays the encoded processed data stream, when no operation instruction for the target remote server is sent to the background within a preset time, disconnect a session connection between the target remote server and the background through the background.
[0093] According to another aspect of the embodiments of the present application, an electronic device is provided, comprising:
[0094] one or more processors;
[0095] a storage device configured to store one or more programs,
[0096] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for remote server management provided by the first aspect or the second aspect of the embodiments of the present application.
[0097] According to still another aspect of the embodiments of the present application, a computer readable medium is provided, which stores a computer program, and the program is executed by a processor to implement the method for remote server management provided by the first aspect or the second aspect of the embodiments of the present application.
[0098] According to still another aspect of the embodiments of the present application, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method for remote server management according to the first or second aspect of the embodiments of the present application.
[0099] An embodiment of the above-mentioned application has the following advantages or beneficial effects: in the embodiments of the present application, when a login request sent by a foreground is received, a session connection between the foreground and a target remote server is established; then login data corresponding to the login information returned by the target remote server is received; and the login data is converted into a data stream, the data stream is encoded according to the encoding configuration of the foreground, and the encoded data stream is sent to the foreground, so that the foreground displays the encoded data stream. This method establishes a session connection with the foreground and the target remote server in the form of a data stream, which can effectively avoid the leakage of sensitive information; and the data stream can be encoded according to the encoding configuration of the foreground to realize the display of various character set encodings; the target remote server is managed by using a foreground and background separation architecture, which solves the limitations of cross-platform and software dependency.
[0100] Further effects of the above-mentioned non-conventional optional mode will be described in the following in combination with the specific embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0101] The accompanying drawings are used to better understand the present application and do not constitute an improper limitation on the present application. Among them:
[0102] Figure 1 is a schematic diagram of the main flow of a method for remote server management according to an embodiment of the present application;
[0103] Figure 2 is a flowchart of a method for remote server management according to an embodiment of the present application;
[0104] Figure 3 is a schematic diagram of the main flow of another method for remote server management according to an embodiment of the present application;
[0105] Figure 4 is a schematic diagram of the main modules of a device for remote server management according to an embodiment of the present application;
[0106] Figure 5 is a schematic diagram of the main modules of another device for remote server management according to an embodiment of the present application;
[0107] Figure 6 is an exemplary system architecture diagram to which the embodiments of the present application can be applied;
[0108] Figure 7is a structural schematic diagram of a computer system of a terminal device or a server suitable for implementing an embodiment of the present application. DETAILED DESCRIPTION
[0109] Exemplary embodiments of the present application are described below with reference to the accompanying drawings, which include various details of the embodiments of the present application to assist in understanding them. These should be considered as merely exemplary. Thus, those of ordinary skill in the art will recognize various changes and modifications of the embodiments described herein, which do not depart from the scope and spirit of the application. Also, descriptions of known functions and constructions are omitted in the following description for clarity and conciseness.
[0110] Figure 1 is a schematic diagram of the main flow of a remote server management method according to an embodiment of the present application, as shown in Figure 1 The remote server management method comprises the following steps:
[0111] Step S101: In response to receiving a login request sent by a foreground, a session connection between the foreground and a target remote server is established; the login request indicates login information and the target remote server;
[0112] Step S102: Login data corresponding to the login information returned by the target remote server is received;
[0113] Step S103: The login data is converted into a data stream, the data stream is encoded according to an encoding configuration of the foreground, and the encoded data stream is sent to the foreground to enable the foreground to display the encoded data stream.
[0114] In the embodiment of the present application, in step S101, a login request sent by a foreground is received, the login request indicates login information and a target remote server, and the login information comprises at least one of a login account, a login password, etc.
[0115] In the embodiment of the present application, the foreground can be a browser terminal, such as a web browser terminal, and the background can be a server corresponding to the foreground.
[0116] Optionally, before receiving the login request sent by the foreground, a selection instruction of the target remote server from a remote server list by the foreground is received to determine the remote server. That is, a user configures a query condition according to a demand, obtains a remote server list according to the query condition, then selects one or more remote servers from the remote server list, and sends the selection instruction to the background, so that the background takes the one or more remote servers selected by the foreground as the target remote server.
[0117] Optionally, the session connection between the foreground and the target remote server is established by: checking the login request, and establishing a socket connection with the foreground after the check is passed; and matching the target remote server according to the login request, and establishing a remote connection with the target remote server. The foreground establishes a socket connection, i.e. a websocket connection, with the background, so that the foreground and the background establish a long connection, data is sent and received through the socket connection, and a customized interface can be made according to the message content. The remote connection can be an ssh connection, or an rdp connection, an rsh connection, etc. The background establishes an ssh connection with the target remote server, data is sent and received through the ssh connection, so that the background can access the target remote server through the ssh protocol, the connection is persistent, and thus the session connection between the foreground and the target remote server is established.
[0118] Optionally, after the socket connection with the foreground is established, a timing heartbeat detection is performed, i.e. the connection state of the background and the foreground is detected in a timing manner, and the validity of the session is detected.
[0119] In an embodiment, the target remote server is matched according to the login request, and a remote ssh connection is established with the target remote server, including: using the Open-ssh technology, and obtaining the ssh connection with the target remote server according to the login request.
[0120] The ssh is a security protocol created on the basis of an application layer and a transport layer, provides a secure transmission and use environment for a shell of a computer, is a traditional network service program, the ssh connection is a connection based on the ssh protocol, the rdp connection is a connection based on the rdp protocol, and the rsh connection is a connection based on the rsh protocol.
[0121] In the embodiment of the application, the login request is checked, including checking login information. The login information includes a login account, the login account can be checked, and it is judged whether the login account has the permission to log in to the target remote server, if yes, the check is passed. Before the login information is checked, a list of login accounts having the permission to log in to the target remote server is configured in advance, if the login account included in the login information is in the list of login accounts, the corresponding target remote server can be logged in. For example, a list of normal accounts and a list of administrator accounts can be configured in advance, so that the login permission of the login account to the target remote server is judged, the permission isolation of the management server of different users in a test environment is realized, and the management permission of the server of different users is limited.
[0122] The target remote server can exist target servers that need to be authorized, and the authorization code needs to be checked for the target remote servers that need to be authorized, and the target remote servers that do not need to be authorized do not need to be checked for the authorization code. Optionally, the login request further includes the authorization code for the target remote server, and the login request is checked, including checking the authorization code, such as the authorization code for the target remote server in the login request being the same as the configured authorization code for the target remote server, and the checking is passed. By making the user log in to the target remote server through the authorization code and checking the authorization code, the access strategy is configured, the management permission of the user for different servers can be limited, the management flexibility is high, the work efficiency can be improved, and the management ability of the system service is improved.
[0123] Optionally, when the login information and / or the authorization code in the login request are checked and the checking is passed, the login information and / or the authorization code and the stored login authentication information, server password and other information of the target remote server are sent to the target remote server to match the target remote server, and the remote connection with the target remote server is realized. The foreground does not need to input the login authentication information, server password and other sensitive information of the target remote server, and the login management is performed by the background, so that the user has the permission to manage the target remote server in the current session process without knowing the server password, so that when the user performs remote server management on a public device, the leakage of sensitive server information is avoided, and the security risk is reduced. The user obtains the operation session control right of the user with the permission without mastering the sensitive information.
[0124] When the session connection with the foreground and the remote server is established, the login data corresponding to the login information returned by the target remote server is received, and the login data is returned to the foreground. When the login data is returned to the foreground, the login data is converted or encapsulated into a data stream (stream), so that the session is exchanged in the form of the data stream, the number of sensitive information interactions is reduced, and the leakage of sensitive information can be effectively avoided. Then, the encoding configuration of the foreground is obtained through the socket connection, the data stream is encoded according to the encoding configuration of the foreground, the encoded data stream is sent to the foreground, and the foreground is displayed.
[0125] In the embodiment of the application, after the data stream is encoded according to the encoding configuration of the foreground and the encoded data stream is sent to the foreground, the method further includes: receiving an encoding change message sent by the foreground; determining the changed encoding configuration of the foreground according to the encoding change message; encoding the data stream according to the changed encoding configuration of the foreground to generate an encoded data stream; and sending the encoded data stream to the foreground to display the encoded data stream.
[0126] In the embodiment of the present application, the data stream is encoded according to the changed encoding configuration of the foreground to obtain an encoded data stream, so that the foreground can be normally displayed, and the encoding configuration of the character set of the login data returned by the target remote server is changed at the browser end. The encoding is character set encoding, the encoding processing is converting the data stream into the character set encoding in the encoding configuration of the foreground, the character set encoding can be utf-8 encoding, gbk, gb2312 and other Chinese character set encoding, and can also be extended to multi-language character set encoding.
[0127] In the embodiment of the present application, before the data stream after encoding processing is sent to the foreground, it comprises: in response to receiving the changed row and column values of the display window sent by the foreground, adjusting the row and column values in the data stream after encoding processing according to the changed row and column values of the display window, wherein the changed row and column values of the display window are obtained by the foreground by listening to the event indicating the change of the row and column values of the display window.
[0128] The foreground listens to the event of the change of the row and column values of the display window, for example, when the user changes the size of the browser display window, the resize event is triggered, the foreground listens to and captures the resize event in real time, then parses the row and column values of the display window from the resize event, that is, the number of rows and columns of the display window, then the foreground sends the changed row and column values of the display window to the background, and the background obtains the changed row and column values of the display window through the socket connection before sending the data stream after encoding processing to the foreground, then adjusts the row and column values in the data stream after encoding processing, so that the adjusted data stream after encoding processing adapts to the size of the display window of the foreground, and realizes self-adaptive adjustment.
[0129] In one embodiment, the foreground displays the data stream after encoding processing, comprising: the foreground displays the data stream after encoding processing received by the socket connection to the browser according to xterm.js, and the row and column values of the display are self-adaptively adjusted.
[0130] In the embodiment of the present application, when the background establishes a session connection with the foreground and the remote server, i.e. in the case that the session connection is valid, the foreground can perform file transmission with the target remote server, including file uploading, file downloading, etc. Specifically, a file transmission instruction sent by the foreground to the target remote server is received, the file transmission instruction indicating a to-be-transmitted file and a remote path; based on the file transmission instruction, a file transmission request is sent to the target remote server, so that the target remote server transmits the to-be-transmitted file to a position specified by the remote path. That is, when file transmission is performed, the user selects a to-be-transmitted file and a remote path, the foreground sends the to-be-transmitted file to the background, the background receives the to-be-transmitted file and sends a file transmission request to the target remote server, and the file is transmitted to the position specified by the remote path, so that the file list information and the permission information of the file can be viewed. Optionally, the file transmission request can be an sftp request, where sftp is a secure file transfer protocol, a secure method for transmitting files over a network.
[0131] In the embodiment of the present application, the method further includes receiving a change request for the remote server list sent by the foreground, and changing the remote server list based on the change request. Optionally, the change request for the remote server list can be a change of remote server information in the remote server list, or a change of the number of remote servers in the remote server list, where the change can be one or more of adding, modifying, and deleting. Optionally, the change can be for one or more pieces of remote server information. When adding remote server information, the foreground directly imports a file (such as an excel format file) of the added remote server information, the user judges whether there is information that needs to be modified in the file, if there is, the file can be modified on the page, if not, it is sent to the background, thereby realizing batch management of remote server information. When a piece of remote server information in the remote server list needs to be deleted, the piece of information is selected and deleted from the list; when a piece of remote server information needs to be added, the user fills in the remote server information; if a piece of information needs to be modified, the piece of information is directly selected and modified, the change request sent by the foreground is received, and the changed remote server list is obtained.
[0132] The method of the embodiment of the present application changes the remote server list by receiving a change request for the remote server list sent by the foreground, so that the remote server information can be maintained by the foreground in single piece or in batch.
[0133] In the embodiment of the present application, after the data stream processed by encoding is sent to the foreground, in the case of session connection, if no operation instruction for the target remote server sent by the foreground is received within the preset time, the session connection with the foreground and the remote server is disconnected. For example, if the user does not respond for a long time, the system considers that the session is invalid and disconnects the session connection.
[0134] As shown in Figure 2 a flowchart of a method for remote server management according to an embodiment of the present application, the method comprises:
[0135] Step S201: receiving a login request sent by the foreground, requesting to establish a socket connection, the login request indicating login information, an authorization code and a target remote server;
[0136] Step S202: judging whether the login information and the authorization code pass the verification; if yes, executing step S203, if not, ending the flow;
[0137] Step S203: establishing a socket connection with the foreground;
[0138] Step S204: obtaining an ssh connection to the target remote server by means of Open-ssh technology according to the login request, so as to establish a session connection between the foreground and the target remote server;
[0139] Step S205: receiving login data returned by the target remote server and converting the login data into a data stream;
[0140] Step S206: processing the data stream by encoding according to the encoding configuration of the foreground, obtaining a data stream processed by encoding, and sending the data stream to the foreground;
[0141] Step S207: judging whether an encoding change message sent by the foreground is received; if yes, executing step S208; if not, executing step S211;
[0142] Step S208: determining the encoding configuration changed by the foreground according to the encoding change message;
[0143] Step S209: processing the data stream by encoding according to the changed encoding configuration, generating a data stream changed by encoding;
[0144] Step S210: sending the data stream changed by encoding to the foreground;
[0145] Step S211: the foreground displays the data stream;
[0146] Step S212: judging whether an operation instruction for the target remote server sent by the foreground is received within the preset time; if yes, executing step S213; if not, ending the flow;
[0147] Step S213: receiving the data result returned by the target remote server in response to the operation instruction, converting the data result into a data stream, and returning to step S206.
[0148] The method for remote server management provided by the embodiment of the present application, after the background receives the login request sent by the foreground, the login information and / or the authorization code in the login request are checked, after the checking succeeds, the target remote server in the login request is matched, so that the background establishes a session connection between the foreground and the target remote server, the background receives the login data returned by the target remote server based on the login information, the background converts the login data into a data stream, and returns the data stream to the foreground after encoding processing, and the foreground is displayed. The method of the embodiment of the present application realizes the management of the target remote server through the architecture of the separation of the foreground and the background, solves the limitations of cross-platform and software dependency, and the architecture of the separation of the foreground and the background has scalability; through the exchange of the session in the form of the data stream, the number of interactions of sensitive information can be reduced, and the leakage of sensitive information of the remote server can be effectively prevented; the foreground can change the encoding configuration, supports the setting of multiple character set encodings, the background can encode the data stream according to the changed encoding configuration, so that the foreground can be normally displayed; in addition, the method can change the remote server information in batches, and can automatically identify the operations of adding and modifying, so that the maintenance of the remote server information is more simple and efficient; the method can limit the management authority of the user to the remote server by configuring the role or the authorization code of the user, improve the work efficiency, and improve the management ability of the system service; the method supports the file transmission with the remote server, including uploading or downloading to any remote path, does not limit the file size, and does not block the interaction between the user and the remote server; the method can make the data returned by the remote server adaptive to the display window, and improve the user experience.
[0149] As shown in Figure 3 Another aspect of the present application provides another method for remote server management, applied to a client, the method comprising the following steps:
[0150] Step S301: sending a login request to a background to establish a session connection between the foreground and a target remote server through the background; the login request indicates login information and the target remote server;
[0151] Step S302: receiving the encoded data stream corresponding to the login information returned by the background;
[0152] The encoded data stream is obtained in the following way: the background receives the login data corresponding to the login information returned by the target remote server, the background converts the login data into a data stream, the background encodes the data stream according to the encoding configuration, and obtains the encoded data stream.
[0153] Step S303: display the data stream after encoding processing.
[0154] In the embodiment of the present application, the login request is sent to the background to establish a session connection between the background and the target remote server, comprising: sending the login request to the background to verify the login request, and establishing a socket connection with the background after verification; and making the background match the target remote server according to the login request, so that the background establishes a remote connection with the target remote server.
[0155] In the embodiment of the present application, the login request also contains an authorization code for the target remote server, so that the background verifies the login request, comprising: making the background verify the login information and / or the authorization code.
[0156] In the embodiment of the present application, the login information includes a login account, so that the background verifies the login information, comprising: making the background verify whether the login account has the permission to log in the target remote server, if yes, the verification is passed; otherwise, the verification is not passed.
[0157] In the embodiment of the present application, after receiving the data stream after encoding processing corresponding to the login information returned by the background, it further comprises: sending an encoding change message to the background to make the background determine the changed encoding configuration of the foreground according to the encoding change message; and making the background encode the data stream data according to the changed encoding configuration of the foreground, and then generating an encoding changed data stream; receiving the encoding changed data stream sent by the background, and displaying the encoding changed data stream.
[0158] In the embodiment of the present application, the foreground such as the browser end can set the encoding configuration, i.e. set the character set encoding, so that the background encodes the data stream according to the character set encoding set by the foreground, and normally displays the data stream after encoding processing received from the background. Optionally, the character set encoding can be utf-8 encoding, or gbk, gb2312 and other Chinese character set encoding, or extended multi-language character set encoding.
[0159] In the embodiment of the present application, after displaying the data stream after encoding processing, it further comprises: sending a file transmission instruction to the target remote server to the background, the file transmission instruction indicating a to-be-transmitted file and a remote path; so that the background sends a file transmission request to the target remote server based on the file transmission instruction, and makes the target remote server transmit the to-be-transmitted file to the position specified by the remote path. Wherein, the file transmission includes file uploading and downloading to any remote path, without limiting the size of the to-be-transmitted file, so as to realize the non-blocking interaction between the user and the remote server.
[0160] In the embodiment of the present application, before sending the login request to the background, the method further comprises: sending a selection instruction of the target remote server from the remote server list to the background to determine the target remote server.
[0161] In the embodiment of the present application, the method further comprises: sending a change request for the remote server list to the background to make the background change the remote server list based on the change request. When it is necessary to change the number of remote servers or the remote server information in the remote server list, the change request can be sent by the foreground to achieve the change, so that the remote server information can be maintained in batches or in a single piece at the foreground such as the browser end, thereby overcoming the defect of low efficiency caused by manually entering a large amount of remote server information in the prior art.
[0162] In the embodiment of the present application, before receiving the encoded processed data stream corresponding to the login information returned by the background, the method further comprises: listening to an event indicating a change of the row and column values of the display window; and sending the changed row and column values of the display window to the background to make the background adjust the row and column values in the encoded processed data stream according to the changed row and column values of the display window. For example, the resize event indicating the change of the row and column values of the display window is captured in real time, the changed row and column values of the display window are obtained according to the event, and then sent to the background to make the background adjust the row and column values in the encoded processed data stream, thereby realizing the self-adaptation of the display window.
[0163] In the embodiment of the present application, after displaying the encoded processed data stream, the method further comprises: when no operation instruction for the target remote server is sent to the background within a preset time to disconnect the session connection between the target remote server and the background. When the user does not respond within a timeout period, for example, the user does not trigger the keyboard for a long time, the system considers that the session can be discarded, disconnects the connection with the target remote server, including disconnecting the connection with the background, and makes the background disconnect the connection with the target remote server.
[0164] Another aspect of the embodiment of the present application provides a device 400 for remote server management, comprising:
[0165] The connection module 401 establishes a session connection between the foreground and the target remote server in response to receiving the login request sent by the foreground; the login request indicates the login information and the target remote server;
[0166] The first receiving module 402 receives the login data corresponding to the login information returned by the target remote server;
[0167] The first sending module 403 converts the login data into a data stream, encodes the data stream according to the encoding configuration of the foreground, and sends the encoded processed data stream to the foreground to make the foreground display the encoded processed data stream.
[0168] In the embodiment of the present application, the first receiving module 402 is further configured to: check the login request, and establish a socket connection with the foreground after the check is passed; and match the target remote server according to the login request, and establish a remote connection with the target remote server.
[0169] In the embodiment of the present application, the login request further includes an authorization code for the target remote server, and the first receiving module 402 is further configured to: check the login information and / or the authorization code.
[0170] In the embodiment of the present application, the login information includes a login account, and the first receiving module 402 is further configured to: check whether the login account has the permission to log in the target remote server, and determine that the check is passed if yes, or determine that the check is not passed if no.
[0171] In the embodiment of the present application, the first sending module 403 is further configured to: receive an encoding change message sent by the foreground after encoding processing is performed on the data stream according to the encoding configuration of the foreground, and determine a changed encoding configuration of the foreground according to the encoding change message; perform encoding processing on the data stream according to the changed encoding configuration of the foreground, to generate an encoding-changed data stream; and send the encoding-changed data stream to the foreground, so that the foreground displays the encoding-changed data stream.
[0172] In the embodiment of the present application, the apparatus further includes a first file transmission module configured to: receive a file transmission instruction for the target remote server sent by the foreground after the encoding-processed data stream is sent to the foreground, the file transmission instruction indicating a to-be-transmitted file and a remote path; and send a file transmission request to the target remote server based on the file transmission instruction, so that the target remote server transmits the to-be-transmitted file to a position specified by the remote path.
[0173] In the embodiment of the present application, the apparatus includes a first determining module configured to: receive a selection instruction for the target remote server from a remote server list sent by the foreground before receiving a login request sent by the foreground, and determine the target remote server.
[0174] In the embodiment of the present application, the apparatus further includes a first changing module configured to: receive a change request for the remote server list sent by the foreground, and change the remote server list based on the change request.
[0175] In the embodiment of the present application, the first sending module 403 is further configured to: before sending the data stream processed by encoding to the foreground, in response to receiving the changed row and column values of the display window sent by the foreground, adjusting the row and column values in the data stream processed by encoding according to the changed row and column values of the display window, wherein the changed row and column values of the display window are obtained by the foreground by monitoring the event indicating the change of the row and column values of the display window.
[0176] In the embodiment of the present application, the device further comprises a first monitoring module configured to: after the first sending module sends the data stream processed by encoding to the foreground, when no operation instruction for the target remote server sent by the foreground is received within a preset time, disconnecting the session connection with the foreground and the remote server.
[0177] Another aspect of the embodiment of the present application provides a device 500 for remote server management, comprising:
[0178] A second sending module 501 is configured to send a login request to the background to establish a session connection with the background and the target remote server; the login request indicates login information and the target remote server.
[0179] A second receiving module 502 is configured to receive the data stream processed by encoding corresponding to the login information returned by the background; wherein the data stream processed by encoding is obtained by: the background receiving login data corresponding to the login information returned by the target remote server, the background converting the login data into a data stream, the background encoding the data stream according to the encoding configuration of the foreground to obtain the data stream processed by encoding.
[0180] A display module 503 is configured to display the data stream processed by encoding.
[0181] In the embodiment of the present application, the second sending module 501 is further configured to: send the login request to the background to enable the background to verify the login request and establish a socket connection with the background after the verification is passed; and enable the background to match the target remote server according to the login request to enable the background to establish a remote connection with the target remote server.
[0182] In the embodiment of the present application, the login request further comprises an authorization code for the target remote server, and the second sending module 501 is further configured to: enable the background to verify the login information and / or the authorization code.
[0183] In the embodiment of the present application, the login information comprises a login account, and the second sending module 501 is further configured to: enable the background to verify whether the login account has the permission to log in the target remote server, and if yes, the verification is passed; otherwise, the verification is not passed.
[0184] In the embodiment of the present application, the second receiving module 502 is further configured to: after receiving the encoded data stream corresponding to the login information returned by the background, send an encoding change message to the background, so that the background determines the changed encoding configuration of the foreground according to the encoding change message; and causes the background to encode the data stream according to the changed encoding configuration of the foreground, and then generates an encoded data stream; and receive the encoded data stream sent by the background, and display the encoded data stream.
[0185] In the embodiment of the present application, the device further comprises a second file transmission module configured to: after displaying the encoded data stream, send a file transmission instruction for the target remote server to the background, the file transmission instruction indicating a to-be-transmitted file and a remote path; so that the background sends a file transmission request to the target remote server based on the file transmission instruction, and causes the target remote server to transmit the to-be-transmitted file to the position specified by the remote path.
[0186] In the embodiment of the present application, the device further comprises a second determining module configured to: before sending the login request to the background, send a selection instruction for the target remote server from the remote server list to the background, so as to determine the target remote server.
[0187] In the embodiment of the present application, the device further comprises a second changing module configured to: send a change request for the remote server list to the background, so that the background changes the remote server list based on the change request.
[0188] In the embodiment of the present application, the second sending module 501 is further configured to: before receiving the encoded data stream corresponding to the login information returned by the background, listen to an event indicating a change in the row and column values of the display window; send the changed row and column values of the display window to the background, so that the background adjusts the row and column values in the encoded data stream according to the changed row and column values of the display window.
[0189] In the embodiment of the present application, the device further comprises a second listening module configured to: after the display module displays the encoded data stream, when no operation instruction for the target remote server is sent to the background within a preset time, disconnect the session connection between the target remote server and the background through the background.
[0190] Another aspect of the embodiment of the present application provides an electronic device, comprising: one or more processors; a storage device configured to store one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the method of remote server management provided by the first aspect or the second aspect of the embodiment of the present application.
[0191] Another aspect of the present invention provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the remote server management method provided in the first or second aspect of the present invention.
[0192] This invention provides a computer program product, including a computer program that, when executed by a processor, implements the remote server management method provided by the first or second aspect of this invention.
[0193] Figure 6 An exemplary system architecture 600 is shown, in which the remote server management method or apparatus of embodiments of the present invention can be applied.
[0194] like Figure 6 As shown, system architecture 600 may include terminal devices 601, 602, and 603, a network 604, a server 605, and remote servers 606, 607, and 608. Network 604 serves as the medium for providing communication links between terminal devices 601, 602, and 603 and server 605, as well as between server 605 and remote servers 606, 607, and 608. Network 604 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0195] Users can use terminal devices 601, 602, and 603 to interact with server 605 via network 604 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 601, 602, and 603, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0196] Terminal devices 601, 602, and 603 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0197] Server 605 can be a server providing various services, such as a backend management server supporting shopping websites browsed by users using terminal devices 601, 602, and 603 (for example only). The backend management server can analyze and process received data such as product information query requests, and feed back the processing results (e.g., target push information, product information—for example only) to the terminal devices. Server 605 can receive login requests from terminal devices 601, 602, and 603 targeting remote servers 606, 607, and 608, verify the login information in the login requests, receive login data returned by remote servers 606, 607, and 608, analyze and process it, and then feed it back to terminal devices 601, 602, and 603.
[0198] The remote servers 606, 607, 608 can be remote servers providing various services, such as receiving login information sent by the terminal devices 601, 602, 603 through the server 605, and performing analysis and other processing on the login information and other data, and returning the processing results, such as login data, to the server 605.
[0199] It should be noted that the method for remote server management provided by the embodiments of the present application can be performed by the terminal devices 601, 602, 603, or can be performed by the server 605, and accordingly, the apparatus for remote server management can be arranged in the terminal devices 601, 602, 603, or can be arranged in the server 605.
[0200] It should be understood that, Figure 6 the number of terminal devices, networks, and servers in the above-mentioned system is merely illustrative. Any number of terminal devices, networks, and servers can be provided according to implementation needs.
[0201] Reference is made to Figure 7 , which shows a structural schematic diagram of a computer system 700 suitable for implementing the terminal device of the embodiments of the present application. Figure 7 The terminal device shown is merely an example, and should not impose any limitation on the functions and use range of the embodiments of the present application.
[0202] As shown in Figure 7 , the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 702 or loaded from a storage portion 708 into a random access memory (RAM) 703. Various programs and data required for the operation of the system 700 are also stored in the RAM 703. The CPU 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0203] The following components are connected to the I / O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output portion 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), and the like, and a speaker, and the like; a storage portion 708 including a hard disk, and the like; and a communication portion 709 including a network interface card such as a LAN card, a modem, and the like. The communication portion 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like, is mounted on the drive 710 as needed, so that a computer program read therefrom is installed in the storage portion 708 as needed.
[0204] In particular, the processes described above with reference to the flow charts can be implemented as a computer software program in accordance with the embodiments disclosed herein. For example, embodiments disclosed herein include a computer program product which includes a computer program tangibly embodied on a computer readable medium, the computer program containing program code for executing the methods illustrated by the flow charts. In such embodiments, the computer program can be downloaded and installed from a network via the communication portion 709 and / or installed from the removable media 711. When the computer program is executed by the central processing unit (CPU) 701, the above-described functions defined in the system of the present application are performed.
[0205] Note that the computer readable medium shown in the present application can be a computer readable signal medium or a computer readable storage medium or any combination thereof. The computer readable storage medium may, for example, be but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination thereof. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present application, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus or device. In the present application, the computer readable signal medium can include a data signal carried in a baseband or as a part of a carrier wave, in which a computer readable program code is carried. Such a propagated data signal can take many forms, including but not limited to an electromagnetic signal, an optical signal or any suitable combination thereof. The computer readable signal medium can also be any computer readable medium that can send, propagate or transfer a program for use by or in connection with an instruction execution system, apparatus or device. The program code contained on the computer readable medium can be transmitted using any suitable medium, including but not limited to wireless, wire line, optical fiber cable, RF, etc., or any suitable combination thereof.
[0206] The computer program product of the present application can be a computer program embodied on a computer readable medium. The computer program product can be stored in the memory 130 and executed by the processor 120 as a computer implemented process. The computer readable medium can be a storage device such as a floppy disk, a hard disk, a CD-ROM, a DVD, a RAM, a ROM, a PROM, an EPROM, an EEPROM or a FLASH memory. The computer readable medium can also be a transmissible carrier wave. The computer program product can also be a distributed computer program product embodied on a storage medium or a transmissible carrier wave with potentially different portions stored on different media or transmitted over different carrier waves.
[0207] The modules described in the embodiments of the present application can be implemented by software, or by hardware, or by a combination of software and hardware. The modules described can be located in a single processor, or can be located in different processors. For example, the modules can be described as a processor including a connection module, a first receiving module and a first sending module. In some cases, the names of the modules do not constitute a limitation on the modules themselves. For example, the first receiving module can also be described as "receiving login data corresponding to the login information returned by the target remote server".
[0208] As another aspect, the present application also provides a computer readable medium, which can be included in the device described in the above embodiments, or can exist separately without being assembled into the device. The computer readable medium carries one or more programs, which, when executed by the device, cause the device to include: establishing a session connection between the foreground and the target remote server in response to receiving a login request sent by the foreground; the login request indicating login information and the target remote server; receiving login data corresponding to the login information returned by the target remote server; converting the login data into a data stream, encoding the data stream according to the encoding configuration of the foreground, and sending the encoded data stream to the foreground to enable the foreground to display the encoded data stream.
[0209] According to the technical scheme of the embodiment of the present application, the method for remote server management provided by the embodiment of the present application, after the background receives the login request sent by the foreground, the login information and / or the authorization code in the login request are checked, after the checking succeeds, the target remote server is matched according to the login request, so that the background establishes the session connection between the foreground and the target remote server, the background receives the login data returned by the target remote server based on the login information, the background converts the login data into a data stream and returns the login data to the foreground after encoding processing, and the foreground is displayed. The method of the embodiment of the present application realizes the management of the target remote server through the architecture of separating the foreground from the background, solves the limitations of cross-platform and software dependency, and the architecture of separating the foreground from the background has scalability; through exchanging the session in the form of a data stream, the number of interactions of sensitive information can be reduced, and the leakage of sensitive information of the remote server can be effectively prevented; the foreground can change the encoding configuration, supports the setting of multiple character set encodings, the background can encode the data stream according to the changed encoding configuration, so that the data stream can be normally displayed on the foreground; in addition, the method can change the remote server information in batches, and can automatically identify the operations of adding and modifying, so that the maintenance of the remote server information is more simple and efficient; the method can limit the management authority of the user to the remote server by configuring the role or the authorization code of the user, improves the work efficiency, and improves the management ability of the system service; the method supports the file transmission with the remote server, including uploading or downloading to any remote path, without limiting the file size and without blocking the interaction between the user and the remote server; the method can make the data returned by the remote server adaptive to the display window, and improves the user experience.
[0210] The above detailed description does not constitute a limitation on the protection scope of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made depending on design requirements and other factors. Any modification, equivalent replacement and improvement within the spirit and principle of the present application should be included in the protection scope of the present application.
Claims
1. A method for remote server management, characterized in that, include: In response to receiving a login request from the front end, a session connection is established between the front end and the target remote server; The login request specifies the login information and the target remote server. Receive login data corresponding to the login information returned by the target remote server; The login data is converted into a data stream, the data stream is encoded according to the encoding configuration of the front end, and the encoded data stream is sent to the front end so that the front end can display the encoded data stream. The encoding is a character set encoding, and the encoding processing is to convert the data stream to the character set encoding configured in the front end; Establishing a session connection between the front end and the target remote server includes: verifying the login information, and after successful verification, establishing a socket connection with the front end, and sending the login information and the stored login authentication information and server password information of the target remote server to the target remote server to match the target remote server and realize the remote connection with the target remote server. The method further includes: before receiving a login request sent by the front end, receiving a selection instruction from the front end for the target remote server from a list of remote servers, determining the target remote server, wherein the list of remote servers is obtained by querying according to user-configured query conditions; and before verifying the login information, pre-configuring a list of ordinary accounts and a list of administrator accounts with permission to log in to the target remote server. The login information includes a login account; the login information is verified, including: verifying whether the login account is in the list of ordinary accounts or the list of administrator accounts; if so, the verification is successful; otherwise, the verification fails.
2. The method according to claim 1, characterized in that, The login request also includes an authorization code for the target remote server, and the method further includes: verifying the login information and confirming that the verification is successful before establishing a socket connection with the front end.
3. The method according to claim 1, characterized in that, After encoding the data stream according to the encoding configuration of the front-end and sending the encoded data stream to the front-end, the method further includes: Receive the encoding change message sent by the front end; The modified encoding configuration of the front end is determined based on the encoding change message; The data stream is encoded according to the changed encoding configuration of the front end to generate a data stream with modified encoding; The data stream with the changed encoding is sent to the front end so that the front end can display the data stream with the changed encoding.
4. The method according to claim 1, characterized in that, After sending the encoded data stream to the front end, the process also includes: Receive a file transfer instruction sent by the foreground for the target remote server, wherein the file transfer instruction indicates the file to be transferred and the remote path; Based on the file transfer instruction, a file transfer request is sent to the target remote server so that the target remote server transfers the file to be transferred to the location specified by the remote path.
5. The method according to claim 1, characterized in that, The method further includes: receiving a change request for the remote server list sent by the front end, and changing the remote server list based on the change request.
6. The method according to claim 1, characterized in that, Before sending the encoded data stream to the front end, the process includes: In response to receiving the changed row and column values of the display window sent by the front end, the row and column values in the encoded data stream are adjusted according to the changed row and column values of the display window, wherein the changed row and column values of the display window are obtained by the front end by listening to events indicating changes in the row and column values of the display window.
7. The method according to claim 1, characterized in that, After sending the encoded data stream to the front end, the method further includes: disconnecting the session connection with the front end and the remote server if no operation instruction for the target remote server is received from the front end within a preset time.
8. A method for remote server management, characterized in that, include: Send a selection instruction to the backend for the target remote server from the list of remote servers to determine the target remote server. The list of remote servers is obtained by querying according to the query conditions configured by the user. Send a login request to the backend to establish a session connection with the target remote server through the backend; The login request specifies the login information and the target remote server. Receive the encoded data stream returned by the backend that corresponds to the login information; The encoded data stream is obtained in the following way: the backend receives login data corresponding to the login information returned by the target remote server, the backend converts the login data into a data stream, and the backend encodes the data stream according to the encoding configuration to obtain the encoded data stream; the encoding is a character set encoding, and the encoding processing is to convert the data stream into the character set encoding in the encoding configuration of the frontend; The data stream after the encoding process is displayed; Sending a login request to the backend to establish a session connection with the target remote server through the backend includes: sending a login request to the backend so that the backend can verify the login information, and after the verification is successful, establishing a socket connection with the backend so that the backend can send the login information and the stored login authentication information and server password information of the target remote server to the target remote server to match the target remote server and realize the remote connection between the backend and the target remote server. The login information includes a login account, which the backend verifies, including: verifying whether the login account is in the list of ordinary accounts or the list of administrator accounts; if so, the verification passes; otherwise, the verification fails; the backend pre-configures a list of ordinary accounts and a list of administrator accounts with permissions to log in to the target remote server.
9. The method according to claim 8, characterized in that, The login request also includes an authorization code for the target remote server. The method further includes: before establishing a socket connection with the backend, having the backend verify the authorization code in the login request and confirm that the verification is successful.
10. The method according to claim 8, characterized in that, After receiving the encoded data stream corresponding to the login information returned by the backend, the method further includes: Send an encoding change message to the backend so that the backend can determine the changed encoding configuration of the frontend based on the encoding change message; This enables the backend to encode the data stream data according to the changed encoding configuration of the frontend, and then generate a data stream with the changed encoding. Receive the data stream of the encoding change sent by the backend, and display the data stream of the encoding change.
11. The method according to claim 8, characterized in that, After displaying the encoded data stream, the method further includes: Send a file transfer instruction to the background for the target remote server, the file transfer instruction indicating the file to be transferred and the remote path; This enables the background system to send a file transfer request to the target remote server based on the file transfer instruction, and causes the target remote server to transfer the file to be transferred to the location specified by the remote path.
12. The method according to claim 8, characterized in that, The method further includes: A change request for the remote server list is sent to the backend, so that the backend changes the remote server list based on the change request.
13. The method according to claim 8, characterized in that, Before receiving the encoded data stream corresponding to the login information returned by the backend, the process includes: Listen for events indicating changes in the row and column values of the display window; send the changed row and column values of the display window to the backend so that the backend adjusts the row and column values in the encoded data stream according to the changed row and column values of the display window.
14. The method according to claim 8, characterized in that, After displaying the encoded data stream, the method further includes: if no operation instruction for the target remote server is sent to the backend within a preset time, the session connection with the target remote server is disconnected through the backend.
15. A device for remote server management, characterized in that, include: The connection module, in response to receiving a login request sent by the front end, establishes a session connection between the front end and the target remote server; The login request specifies the login information and the target remote server. The first receiving module receives login data corresponding to the login information returned by the target remote server; The first sending module converts the login data into a data stream, encodes the data stream according to the encoding configuration of the front end, and sends the encoded data stream to the front end so that the front end can display the encoded data stream; the encoding is a character set encoding, and the encoding processing is to convert the data stream into the character set encoding in the encoding configuration of the front end; The first receiving module is further configured to: verify the login information, and after the verification is successful, establish a socket connection with the front end, and send the login information and the stored login authentication information and server password information of the target remote server to the target remote server to match the target remote server and realize the remote connection with the target remote server. The device includes a first determining module, configured to: receive a selection instruction from the front end of the remote server list for the target remote server before receiving a login request sent by the front end, and determine the target remote server; the device is further configured to: pre-configure a list of ordinary accounts and a list of administrator accounts with permission to log in to the target remote server before verifying the login information; The login information includes a login account. The first receiving module is further configured to: verify whether the login account is in the list of ordinary accounts or the list of administrator accounts; if so, verify the verification is successful; otherwise, verify the verification fails.
16. The apparatus according to claim 15, characterized in that, The login request also includes an authorization code for the target remote server. The first receiving module is further configured to: verify the authorization code and confirm that the verification is successful before establishing a socket connection with the front end.
17. The apparatus according to claim 15, characterized in that, The first sending module is further configured to: after encoding the data stream according to the encoding configuration of the front end, and sending the encoded data stream to the front end, Receive the encoding change message sent by the front end; The modified encoding configuration of the front end is determined based on the encoding change message; The data stream is encoded according to the changed encoding configuration of the front end to generate a data stream with modified encoding; The data stream with the changed encoding is sent to the front end so that the front end can display the data stream with the changed encoding.
18. The apparatus according to claim 15, characterized in that, The device further includes a first file transfer module, configured to: after sending the encoded data stream to the foreground... Receive a file transfer instruction sent by the foreground for the target remote server, wherein the file transfer instruction indicates the file to be transferred and the remote path; Based on the file transfer instruction, a file transfer request is sent to the target remote server so that the target remote server transfers the file to be transferred to the location specified by the remote path.
19. The apparatus according to claim 15, characterized in that, The device further includes a first modification module, configured to: receive a modification request for the remote server list sent by the front end, and modify the remote server list based on the modification request.
20. The apparatus according to claim 15, characterized in that, The first sending module is further configured to: send the encoded data stream to the front end before... In response to receiving the changed row and column values of the display window sent by the front end, the row and column values in the encoded data stream are adjusted according to the changed row and column values of the display window, wherein the changed row and column values of the display window are obtained by the front end by listening to events indicating changes in the row and column values of the display window.
21. The apparatus according to claim 15, characterized in that, The device further includes a first monitoring module, configured to: disconnect the session connection with the front end and the remote server if no operation instruction for the target remote server is received from the front end within a preset time after the first sending module sends the encoded data stream to the front end.
22. A device for remote server management, characterized in that, include: The second determining module is used to: send a selection instruction to the background for a target remote server from the list of remote servers, so as to determine the target remote server, wherein the list of remote servers is obtained by querying according to the query conditions configured by the user; The second sending module sends a login request to the backend to establish a session connection between the backend and the target remote server. The login request specifies the login information and the target remote server. The second receiving module receives the encoded data stream corresponding to the login information returned by the backend; wherein, the encoded data stream is obtained in the following manner: the backend receives login data corresponding to the login information returned by the target remote server, the backend converts the login data into a data stream, and the backend encodes the data stream according to the encoding configuration of the frontend to obtain the encoded data stream; the encoding is a character set encoding, and the encoding processing is to convert the data stream into the character set encoding in the encoding configuration of the frontend; The display module shows the data stream after the encoding process; The second sending module is further configured to: send a login request to the backend so that the backend can verify the login information, and after the verification is successful, establish a socket connection with the backend so that the backend can send the login information and the stored login authentication information and server password information of the target remote server to the target remote server to match the target remote server and realize the remote connection between the backend and the target remote server. The login information includes a login account. The second sending module is further configured to: enable the backend to verify whether the login account is in the list of ordinary accounts or the list of administrator accounts; if so, the verification passes; otherwise, the verification fails; the backend is pre-configured with a list of ordinary accounts and a list of administrator accounts that have the permission to log in to the target remote server.
23. The apparatus according to claim 22, characterized in that, The login request also includes an authorization code for the target remote server. The second sending module is further configured to: before establishing a socket connection with the backend, enable the backend to verify the login information and / or authorization code, and confirm that the verification is successful.
24. The apparatus according to claim 22, characterized in that, The second receiving module is further configured to: after receiving the encoded data stream corresponding to the login information returned by the backend, Send an encoding change message to the backend so that the backend can determine the changed encoding configuration of the frontend based on the encoding change message; This enables the backend to encode the data stream data according to the changed encoding configuration of the frontend, and then generate a data stream with the changed encoding. Receive the data stream of the encoding change sent by the backend, and display the data stream of the encoding change.
25. The apparatus according to claim 22, characterized in that, The device further includes a second file transfer module, configured to: after displaying the encoded data stream... Send a file transfer instruction to the background for the target remote server, the file transfer instruction indicating the file to be transferred and the remote path; This enables the background system to send a file transfer request to the target remote server based on the file transfer instruction, and causes the target remote server to transfer the file to be transferred to the location specified by the remote path.
26. The apparatus according to claim 22, characterized in that, The device further includes a second modification module, configured to: send a modification request to the backend for the remote server list, so that the backend modifies the remote server list based on the modification request.
27. The apparatus according to claim 22, characterized in that, The second sending module is further configured to: before receiving the encoded data stream corresponding to the login information returned by the backend, listen for events indicating changes in the row and column values of the display window; and send the changed row and column values of the display window to the backend so that the backend adjusts the row and column values in the encoded data stream according to the changed row and column values of the display window.
28. The apparatus according to claim 22, characterized in that, The device further includes a second monitoring module, configured to: disconnect the session connection with the target remote server through the backend if no operation instruction for the target remote server is sent to the backend within a preset time after the display module displays the encoded data stream.
29. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7 or 8-14.
30. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7 or 8-14.
31. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-7 or 8-14.
Citation Information
Patent Citations
Identity authentication method for client software
CN105306211A
Login management cloud system and method thereof
TW201426323A