Background
With the continuous development of the internet of things technology, the frequency of office work and entertainment of users using terminals is higher and higher, and particularly, the technology of using the terminals to execute remote interaction is also gradually developed.
At present, terminal-based remote interaction is mainly realized by using VNC (virtual Network computing) software, wherein a VNC client is installed on a terminal, and a corresponding VNC server is installed on a computer where the remote interaction is located.
Content of application
In order to solve the technical problems or at least partially solve the technical problems, the application provides an interaction method and device for a remote desktop, an electronic device and a computer-readable storage medium, which can solve the problems of tedious maintenance and inconvenient interaction during remote interaction.
In a first aspect, the present application provides an interaction method for a remote desktop, where the method includes:
receiving a serial number sent by a terminal to an application interactive system, and generating a virtual number according to the serial number;
authenticating the terminal by using the virtual number;
if the authentication is passed, receiving a GUI interaction request sent by a terminal, and sending the GUI interaction request to the application interaction system;
and receiving an interaction construction message of the application interaction system responding to the GUI interaction request, establishing an interaction thread of the terminal and the application interaction system according to the interaction construction message, and executing an interaction instruction of the terminal on the application interaction system by using the interaction thread.
It can be seen that, in the present application, the VNC software provided in the background art is abandoned, the serial number sent to the application interaction system by the terminal is directly used to generate the virtual number, the authentication is executed according to the virtual number, when the authentication passes, the GUI interaction request corresponding to the terminal is generated, and the handshake operation is repeatedly executed with the application interaction system, for example, the GUI interaction request is sent to the application interaction system, the interaction setup message of the application interaction system is received, and after the handshake operation is successfully repeated, the interaction thread between the terminal and the application interaction system is established, and the interaction instruction of the terminal on the application interaction system is realized through the interaction thread. Therefore, when the remote interaction is executed, the port number and the IP address are repeatedly and manually configured without software, and the problems of complex maintenance and inconvenient interaction during the remote interaction are solved.
In a possible implementation manner of the first aspect, the authenticating the terminal by using the virtual number includes:
sending the virtual number to the terminal;
when a response request returned by the terminal in response to the virtual number is received, converting the response request into an interactive protocol registration request, and sending interactive authentication to the terminal according to the interactive protocol registration request;
and calling a pre-constructed authentication server to perform authentication on the terminal when receiving the authentication information of the interactive authentication responded by the terminal.
In a possible implementation manner of the first aspect, the invoking a pre-constructed authentication server to perform authentication on the terminal includes:
determining the user identity identification of the terminal, the identification of the service network where the terminal is located and the network type by using the authentication server;
converting the user identity identification, the identification of the service network and the network type into an authentication vector;
performing authentication on the authentication vector using an LTE authentication method.
In a possible implementation manner of the first aspect, the establishing an interaction thread of the terminal and the application interaction system includes:
and acquiring the registration information of the terminal equipment from the application interactive system by using a pre-constructed application service platform, and generating the virtual number according to the registration information.
In a possible implementation manner of the first aspect, the establishing an interaction thread of the terminal and the application interaction system includes:
extracting private network information of the terminal by using the application service platform;
obtaining public network information corresponding to the private network information;
sending a mapping configuration request to a gateway to which the terminal belongs, wherein the mapping configuration request is used for triggering the gateway to configure a mapping relation between the private network information and the public network information;
and feeding back the public network information to the application interactive system, and generating the interactive thread by using the mapping relation when the application interactive system gives the public network information feedback information.
In a possible implementation manner of the first aspect, the extracting, by using the application service platform, the private network information of the terminal includes:
logging in the terminal by using the application service platform by using a transmission protocol of the terminal;
and calling a preset script program when the terminal is successfully logged in, and inquiring to obtain the private network information.
In a possible implementation manner of the first aspect, the obtaining public network information corresponding to the private network information includes:
according to a plurality of groups of prestored public network IP and port numbers, executing one-by-one sequential query;
and when the public network IP and the port number in the idle state are obtained through query, selecting the group of public network IP and the port number as the public network information corresponding to the private network information.
In a second aspect, the present application provides an interaction apparatus for a remote desktop, where the apparatus is applied to a master browser in a plurality of browsers, and includes:
the virtual number generation module is used for receiving a serial number sent by the terminal to the application interactive system and generating a virtual number according to the serial number;
the authentication module is used for authenticating the terminal by using the virtual number;
the GUI interaction request module is used for receiving a GUI interaction request sent by a terminal and sending the GUI interaction request to the application interaction system if the authentication is passed;
and the interaction module is used for receiving an interaction construction message of the application interaction system responding to the GUI interaction request, establishing an interaction thread of the terminal and the application interaction system according to the interaction construction message, and executing an interaction instruction of the terminal on the application interaction system by using the interaction thread.
In a third aspect, the present application provides an electronic device, comprising:
at least one processor; and a memory communicatively coupled to the at least one processor;
wherein the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of interacting with a remote desktop as described in any one of the above first aspects.
In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, which when executed by a processor implements the method for interacting with a remote desktop as described in any one of the first aspects above.
It is understood that the beneficial effects of the second to fourth aspects can be seen from the description of the first aspect, and are not described herein again.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The interaction method of the remote desktop provided by the embodiment of the application is described with reference to the flowchart shown in fig. 1. The method comprises the following steps:
s1, receiving the serial number sent by the terminal to the application interactive system, and generating the virtual number according to the serial number.
In the embodiment of the invention, the terminal is generally a mobile device self-held by a user, such as a tablet, a mobile phone, a notebook computer and the like, and the application interaction system is a system and an APP and the like capable of providing remote desktop interaction for the terminal, and comprises a monitoring device, the APP installed in the desktop computer, software and the like. If a user goes on business and emergencies, the tablet is required to be utilized, programming software installed in a desktop computer placed at home is remotely accessed, so that an interactive APP installed in the tablet is started at first, the interactive APP is integrated with the remote desktop interaction method of the scheme, and the interactive APP is utilized to generate a serial number corresponding to the tablet held by the user. The Serial Number (SN) is a unique identifier of the terminal, and is used to identify the identity of the terminal.
Still further, referring to fig. 2, before the serial number sent by the receiving terminal to the application interaction system, the method includes:
s11, obtaining the network access permission information of the terminal;
s12, encrypting the network access permission information to generate the serial number.
Since the network access permission information of the terminal has uniqueness, the corresponding serial number can be generated by encrypting the network access permission information.
Further, the generating a virtual number according to the serial number includes:
and acquiring the registration information of the terminal equipment from the application interactive system by using a pre-constructed application service platform, and generating the virtual number according to the registration information.
The application service platform is a platform for providing various application services to users through the internet, such as an OTT platform and the like, and the application service platform can be used as an information transmission medium for a terminal and an application interaction system, and if the transmission medium is not available, the transmission between the terminal and the application interaction system cannot be completed.
Further, before implementing the interaction of the remote desktop, the terminal needs to be registered in the application interaction system in advance, and the registration information of the terminal needs to be backed up in the application interaction system. As the outgoing user utilizes the tablet, when the programming software installed in the home is remotely accessed, the serial number is generated in the interactive APP in the tablet, the serial number is sent to the interactive APP installed in the home computer, the interactive APP in the home starts the programming software, the registration information of the tablet is obtained, and the corresponding virtual number is generated at the same time.
And S2, authenticating the terminal by using the virtual number.
In order to improve the security of the remote desktop interaction, the terminal needs to be authenticated by a virtual number, and in detail, referring to fig. 3, the authenticating the terminal by using the virtual number includes:
s201, sending the virtual number to the terminal;
s202, when a response request returned by the terminal responding to the virtual number is received, the response request is converted into an interactive protocol registration request, and interactive authentication is sent to the terminal according to the interactive protocol registration request;
s203, when receiving the authentication information of the interactive authentication responded by the terminal, calling a pre-constructed authentication server to execute authentication on the terminal.
In one embodiment of the present invention, the interactive protocol registration request is generally in the form of TCP protocol. Preferably, the response request can be converted into the interactive protocol registration request by using the PROTOBUF, wherein the PROTOBUF is an opening source serialization framework and has the greatest characteristic that the communication data is based on binary and is much more simplified than the traditional communication data.
In another embodiment of the present invention, the interactive Protocol registration request may be constructed by a multimedia communication Protocol (Session Initiation Protocol, SIP for short), which is a part of multimedia communication and is also one of the next generation network key protocols.
Further, referring to fig. 4, the invoking a pre-constructed authentication server to perform authentication on the terminal includes:
s211, determining the user identity identification of the terminal, the identification of the service network where the terminal is located and the network type by using the authentication server;
s222, converting the user identity identification, the identification of the service network and the network type into an authentication vector;
and S223, performing authentication on the authentication vector by using an LTE authentication method.
In the embodiment of the present invention, the user identity may adopt imsi (international Mobile Subscriber identity); network types include Campus Area Networks (CAN), Metropolitan Area Networks (MAN), Wide Area Networks (WAN), etc.; the identity of the serving network is represented by the SNID.
In the embodiment of the invention, the LTE authentication is a bidirectional authentication method based on the terminal, and when any party fails in authentication, the terminal cannot access the application interactive system.
And S3, if the authentication is passed, receiving a GUI interaction request sent by the terminal, and sending the GUI interaction request to the application interaction system.
On one hand, if the authentication fails, a remote interactive access failure result is generated and returned to the user, and the user needs to perform proofreading check subsequently.
On the other hand, if the authentication is passed, a GUI interactive request comprising a user name and a password for user login is generated by using an interactive APP installed in the terminal, and the GUI interactive request is sent to the application interactive system.
S4, receiving an interaction construction message of the application interaction system responding to the GUI interaction request, establishing an interaction thread of the terminal and the application interaction system according to the interaction construction message, and executing an interaction instruction of the terminal on the application interaction system by using the interaction thread.
In detail, referring to fig. 5, the establishing an interaction thread of the terminal and the application interaction system includes:
s41, extracting the private network information of the terminal by using the application service platform;
s42, obtaining public network information corresponding to the private network information;
s43, sending a mapping configuration request to a gateway to which the terminal belongs, wherein the mapping configuration request is used for triggering the gateway to configure the mapping relationship between the private network information and the public network information;
and S44, feeding back the public network information to the application interactive system, and generating the interactive thread by using the mapping relation when the application interactive system gives the public network information feedback information.
In detail, the extracting the private network information of the terminal by using the application service platform includes:
logging in the terminal by using the application service platform by using a transmission protocol of the terminal;
and calling a preset script program when the terminal is successfully logged in, and inquiring to obtain the private network information.
The Transmission Protocol of the invention comprises a TCP (Transmission Control Protocol) Protocol or an HTTP (Hyper Text Transfer Protocol).
Further, the private Network information includes an IP and a Port number, and the public Network information is usually NAPT gateway information (Network Address Port translation), and the gateway may be disposed on an independent computer with an NAT service function, such as a monitoring device, a desktop computer, and the like where the above application interaction system is located.
The public network information comprises public network IP and port numbers, and various public network information corresponding to the private network information is acquired, wherein one embodiment of the invention comprises the following steps:
according to a plurality of groups of prestored public network IP and port numbers, executing one-by-one sequential query;
and when the public network IP and the port number in the idle state are obtained through query, selecting the group of public network IP and the port number as the public network information corresponding to the private network information.
Another embodiment of the invention comprises:
inquiring and obtaining all public network IP and port numbers in an idle state in a plurality of groups of prestored public network IP and port numbers;
and selecting a group of public network IP and port numbers with the largest bandwidth in an idle state as the public network information corresponding to the private network information.
Furthermore, the mapping relationship is also called a binding relationship, and after the private network information is bound with the public network information, information interaction can be realized, and a special interaction thread is further generated, so that an interaction instruction of the terminal on an application interaction system is responded, and a remote interaction function is completed.
It can be seen that, in the present application, the VNC software provided in the background art is abandoned, the serial number sent to the application interaction system by the terminal is directly used to generate the virtual number, the authentication is executed according to the virtual number, when the authentication passes, the GUI interaction request corresponding to the terminal is generated, and the handshake operation is repeatedly executed with the application interaction system, for example, the GUI interaction request is sent to the application interaction system, the interaction setup message of the application interaction system is received, and after the handshake operation is successfully repeated, the interaction thread between the terminal and the application interaction system is established, and the interaction instruction of the terminal on the application interaction system is realized through the interaction thread. Therefore, when the remote interaction is executed, the port number and the IP address are repeatedly and manually configured without software, and the problems of complex maintenance and inconvenient interaction during the remote interaction are solved.
Fig. 6 is a functional block diagram of an interactive device of a remote desktop according to the present application.
The interaction device 500 of the remote desktop can be installed in an electronic device. According to the implemented functions, the interaction means of the remote desktop may include a virtual number generation module 501, an authentication module 502, a GUI interaction request module 503, and an interaction module 504. A module according to the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the virtual number generation module 101 is configured to receive a serial number sent by a terminal to an application interaction system, and generate a virtual number according to the serial number;
the authentication module 102 is configured to authenticate the terminal by using the virtual number;
the GUI interaction request module 103 is configured to receive, if the authentication passes, a GUI interaction request sent by a terminal, and send the GUI interaction request to the application interaction system;
the interaction module 104 is configured to receive an interaction setup message of the application interaction system responding to the GUI interaction request, establish an interaction thread between the terminal and the application interaction system according to the interaction setup message, and execute an interaction instruction of the terminal on the application interaction system by using the interaction thread.
In detail, in the embodiment of the present application, when the modules in the interaction apparatus 500 of the remote desktop are used, the same technical means as the interaction method of the remote desktop described in fig. 1 and fig. 5 are used, and the same technical effect can be produced, and details are not described here again.
Fig. 7 is a schematic structural diagram of an electronic device implementing the interaction method of the remote desktop according to the present application.
The electronic device 6 may comprise a processor 60, a memory 61, a communication bus 62 and a communication interface 63, and may further comprise a computer program, such as an interactive program of a remote desktop, stored in the memory 61 and executable on the processor 60.
In some embodiments, the processor 60 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 60 is a Control Unit (Control Unit) of the electronic device, connects various components of the whole electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device by running or executing programs or modules (e.g., executing interactive programs of a remote desktop, etc.) stored in the memory 61 and calling data stored in the memory 61.
The memory 61 includes at least one type of readable storage medium including flash memory, removable hard disks, multimedia cards, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disks, optical disks, etc. The memory 61 may in some embodiments be an internal storage unit of the electronic device, for example a removable hard disk of the electronic device. The memory 61 may also be an external storage device of the electronic device in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device. Further, the memory 61 may also include both an internal storage unit and an external storage device of the electronic device. The memory 61 may be used not only to store application software installed in the electronic device and various types of data, such as codes of an interactive program of a remote desktop, etc., but also to temporarily store data that has been output or will be output.
The communication bus 62 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 61 and at least one processor 60 or the like.
The communication interface 63 is used for communication between the electronic device and other devices, and includes a network interface and a user interface. Optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), which are typically used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a Display (Display), an input unit such as a Keyboard (Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device and for displaying a visualized user interface.
Fig. 7 shows only an electronic device having components, and those skilled in the art will appreciate that the structure shown in fig. 7 does not constitute a limitation of the electronic device, and may include fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 60 through a power management device, so that functions of charge management, discharge management, power consumption management and the like are realized through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The interaction 62 of the remote desktop stored by the memory 61 in the electronic device 6 is a combination of computer programs that, when executed in the processor 60, enable:
receiving a serial number sent by a terminal to an application interactive system, and generating a virtual number according to the serial number;
authenticating the terminal by using the virtual number;
if the authentication is passed, receiving a GUI interaction request sent by a terminal, and sending the GUI interaction request to the application interaction system;
and receiving an interaction construction message of the application interaction system responding to the GUI interaction request, establishing an interaction thread of the terminal and the application interaction system according to the interaction construction message, and executing an interaction instruction of the terminal on the application interaction system by using the interaction thread.
Specifically, the processor 60 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the computer program, which is not described herein again.
Further, the integrated modules/units of the electronic device 6, if implemented in the form of software functional units and sold or used as separate products, may be stored in a non-volatile computer-readable storage medium. The computer readable storage medium may be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
The present application also provides a computer-readable storage medium, storing a computer program that, when executed by a processor of an electronic device, may implement:
receiving a serial number sent by a terminal to an application interactive system, and generating a virtual number according to the serial number;
authenticating the terminal by using the virtual number;
if the authentication is passed, receiving a GUI interaction request sent by a terminal, and sending the GUI interaction request to the application interaction system;
and receiving an interaction construction message of the application interaction system responding to the GUI interaction request, establishing an interaction thread of the terminal and the application interaction system according to the interaction construction message, and executing an interaction instruction of the terminal on the application interaction system by using the interaction thread.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is merely exemplary of the present application and is presented to enable those skilled in the art to understand and practice the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.