Method and device for remotely operating equipment, electronic equipment and computer readable medium

By installing the first Android debugging tool on the Android platform, establishing mapping relationships and receiving user needs, connecting and operating Android devices on the node server, the problem of poor user experience in the existing technology is solved, and convenient and efficient debugging effects are achieved.

CN120378419APending Publication Date: 2025-07-25BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410101237.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-24
Publication Date
2025-07-25

Smart Images

  • Figure CN120378419A_ABST
    Figure CN120378419A_ABST
Patent Text Reader

Abstract

The invention provides a method and a device for remotely operating equipment. A specific embodiment of the method comprises the following steps: installing a first Android debugging tool; establishing a mapping relationship with a second Android debugging tool on the node server to receive debugging service information of the second Android debugging tool to the Android device; receiving equipment operation demand information of a user; and based on the equipment operation demand information, connecting and operating the Android equipment on the node server through the first Android debugging tool. According to the implementation mode, the convenience of remotely operating the Android equipment can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technologies, and particularly to a method and apparatus for remotely operating a device, an electronic device, and a computer-readable medium. Background Art

[0002] During the development of mobile applications, debugging is a crucial step. However, there are still some challenges in debugging Android devices or applications on Android devices on the Android platform.

[0003] Currently, in a cloud real device platform, generally a debugging plugin is added to an Android device or an application on an Android device, and by operating the plugin on the cloud real device platform, the current operations on the Android device or the debugging information of the application on the Android device is displayed. This method requires technical personnel to access at the code level, resulting in a poor experience effect. Summary of the Invention

[0004] Embodiments of the present disclosure provide a method and apparatus for remotely operating a device, an electronic device, and a computer-readable medium.

[0005] In a first aspect, an embodiment of the present disclosure provides a method for remotely operating a device. The method includes: installing a first Android debugging tool; establishing a mapping relationship with a second Android debugging tool on a node server to receive debugging service information of the second Android debugging tool for an Android device; receiving device operation requirement information of a user; and based on the device operation requirement information, connecting to and operating the Android device on the node server through the first Android debugging tool.

[0006] In some embodiments, the connecting to and operating the Android device on the node server through the first Android debugging tool based on the device operation requirement information includes: determining the currently mapped Android device, which is obtained by mapping the Android device connected to the node server; connecting to the currently mapped Android device in the node server by using the first Android debugging tool; and operating the currently mapped Android device by using the first Android debugging tool.

[0007] In some embodiments, the method for remotely operating a device further includes: monitoring a debugging page of a browser on the currently mapped Android device through the first Android debugging tool.

[0008] In some embodiments, the monitoring a debugging page of a browser on the currently mapped Android device through the first Android debugging tool includes: obtaining communication service information of an opened debugging page on the browser of the currently mapped Android device by using the first Android debugging tool; and mapping the communication server information to the local through a specified port by using the first Android debugging tool to obtain connection information of the debugging page.

[0009] In some embodiments, the method for remotely operating a device further includes: establishing a debugging channel and debugging a debugging page through the debugging channel.

[0010] In some embodiments, establishing the debugging channel and debugging the debugging page through the debugging channel includes: deploying a page debugging tool locally; creating a communication server corresponding to the connection information and using the communication server to listen for the connection information in real time; sending the connection information to the page debugging tool so that the page debugging tool communicates with the communication server based on the connection information; in response to successful communication connection between the page debugging tool and the communication server, creating a communication client and connecting to the communication service information through the communication client; in response to successful connection between the communication client and the communication service information, determining that the debugging channel between the communication client, the communication server, and the page debugging tool is successfully established; and receiving the debugging information of the debugging page in real time through the debugging channel.

[0011] In a second aspect, an embodiment of the present disclosure provides a device for remotely operating a device. The device includes: an installation unit configured to install a first Android debugging tool; a mapping unit configured to establish a mapping relationship with a second Android debugging tool on a node server to receive debugging service information of the second Android debugging tool for the Android device; a receiving unit configured to receive device operation requirement information of a user; and a connection unit configured to connect to and operate the Android device on the node server through the first Android debugging tool based on the device operation requirement information.

[0012] In some embodiments, the connection unit is configured to: determine the currently mapped Android device, which is obtained by mapping the Android device connected to the node server; connect to the currently mapped Android device using the first Android debugging tool; determine an operation on the currently mapped Android device based on the device operation requirement information, and execute the operation on the currently mapped Android device through the first Android debugging tool.

[0013] In some embodiments, the device further includes: a page monitoring unit configured to monitor a debugging page of a browser on the currently mapped Android device through the first Android debugging tool.

[0014] In some embodiments, the page monitoring unit is further configured to: obtain communication service information of the debugging page opened on the browser of the currently mapped Android device using the first Android debugging tool; map the communication server information to the local through a specified port using the first Android debugging tool to obtain connection information of the debugging page.

[0015] In some embodiments, the device further includes: a page debugging unit configured to establish a debugging channel and debug a debugging page through the debugging channel.

[0016] In some embodiments, the above-mentioned page debugging unit is further configured to: deploy a page debugging tool locally; create a communication server corresponding to the connection information and use the communication server to monitor the connection information in real time; send the connection information to the page debugging tool so that the page debugging tool communicates with the communication server based on the connection information; in response to the successful communication connection between the page debugging tool and the communication server, create a communication client and connect to the communication service information through the communication client; in response to the successful connection between the communication client and the communication service information, determine that the debugging channel between the communication client, the communication server, and the page debugging tool is successfully established; and receive the debugging information of the debugging page in real time through the debugging channel.

[0017] In a third aspect, an embodiment of the present disclosure provides an electronic device, which includes: one or more processors; a storage device on which one or more programs are stored; when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any one of the embodiments in the first aspect.

[0018] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable medium, on which a computer program is stored, and when the program is executed by a processor, it implements the method described in any one of the embodiments in the first aspect.

[0019] For the method and device for remotely operating a device provided by the embodiments of the present disclosure, first, install a first Android debugging tool; secondly, establish a mapping relationship with a second Android debugging tool on a node server to receive the debugging service information of the Android device by the second Android debugging tool; thirdly, receive the device operation requirement information of the user; and finally, based on the device operation requirement information, connect to and operate the Android device on the node server through the first Android debugging tool. Thus, Android debugging tools are installed on both the remote server and the node server, and the debugging service information of the Android device on the node server is mapped to the execution subject of the method for remotely operating the device. When the user has a continuous device requirement, the Android device on the node server is connected to and operated through the first Android debugging tool, which conveniently and quickly realizes the control of the Android device under the node server and improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] By reading the detailed description of the non-limiting embodiments with reference to the following drawings, other features, objects, and advantages of the present disclosure will become more apparent:

[0021] Figure 1 is an exemplary system architecture diagram to which an embodiment of the present disclosure can be applied;

[0022] Figure 2 is a flowchart of an embodiment of the method for remotely operating a device according to the present disclosure;

[0023] Figure 3 is a schematic structural diagram corresponding to the method of the remote operation device of the present disclosure;

[0024] Figure 4 is a schematic structural diagram of a debugging channel of the present disclosure;

[0025] Figure 5 is a schematic structural diagram of an embodiment of the device for remote operation of a device according to the present disclosure;

[0026] Figure 6 is a schematic structural diagram of an electronic device suitable for implementing the embodiments of the present disclosure. Detailed implementation manners

[0027] The present disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the related invention, rather than limiting the invention. Additionally, it should be noted that for the convenience of description, only parts related to the relevant invention are shown in the drawings.

[0028] It should be noted that, without conflict, the embodiments in the present disclosure and the features in the embodiments can be combined with each other. The present disclosure will be described in detail below with reference to the drawings and embodiments.

[0029] Figure 1 Illustrates an exemplary system architecture 100 to which the method of remotely operating a device according to the present disclosure can be applied.

[0030] As Figure 1 shown, the system architecture 100 may include terminal devices 101, 102, 103, a node server 104, and a remote server 105. An Android debugging tool is installed on the node server 104 to provide a medium for communication links between the terminal devices 101, 102, 103 and the remote server 105. The node server 104 can provide various connection types, usually including wireless communication links, etc.

[0031] The terminal devices 101, 102, 103 interact with the remote server 105 through the Android debugging tool installed on the node server 104 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 101, 102, 103, such as instant messaging tools, email clients, etc. The terminal devices 101, 102, 103 can be mobile terminals installed with the Android system. Optionally, the terminal devices 101, 102, 103 can be a cloud real machine installed with an installation system, and the node server 104 is connected to the terminal devices 101, 102, 103 to form a cloud real machine platform.

[0032] The terminal devices 101, 102, and 103 can be hardware or software. When the terminal devices 101, 102, and 103 are hardware, they can be user devices with communication and control functions, and the above-mentioned user devices can communicate with the remote server 105. When the terminal devices 101, 102, and 103 are software, they can be installed in the above-mentioned user devices; the terminal devices 101, 102, and 103 can be implemented as multiple software or software modules (such as software or software modules for providing distributed services), or can be implemented as a single software or software module. No specific limitation is made here.

[0033] The remote server 105 can be a server that provides various services, such as a remote server for remotely operating on the terminal devices 101, 102, and 103. The remote server can receive the device operation requirement information of the user, and based on the device operation requirement information, connect to and operate the terminal devices 101, 102, and 103 on the node server 104 through the Android debugging tool installed thereon.

[0034] It should be noted that the server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster composed of multiple servers, or can be implemented as a single server. When the server is software, it can be implemented as multiple software or software modules (such as software or software modules for providing distributed services), or can be implemented as a single software or software module. No specific limitation is made here.

[0035] It should be noted that the method for remotely operating a device provided by the embodiments of the present disclosure is generally executed by the remote server 105, and the device for remotely operating a device provided by the embodiments of the present disclosure is generally arranged in the remote server 105.

[0036] It should be understood that Figure 1 the numbers of the terminal devices, networks, and servers in

[0037] are merely illustrative. According to the implementation requirements, there can be any number of terminal devices, networks, and servers. Figure 2 As

[0038] shown in

[0039] In this embodiment, the first Android debugging tool is an Android debugging tool running on the execution entity on which the method of the remote operation device is installed. Through the first Android debugging tool, the debugging service information of the Android device can be obtained. The Android debugging tool is a tool for establishing a communication channel between a computer and an Android device. Through the Android debugging tool, commands of the computer can be sent to the Android device, or information of the Android device can be sent to the computer, realizing the intercommunication between the computer and the Android device.

[0040] Specifically, the first Android debugging tool can be the adb tool. The adb (Android Debug Bridge) tool is a command-line tool for communicating and debugging with an Android device. It is a part of the software development kit of the Android system and provides a set of commands that allow developers to perform operations such as data transfer, installation and uninstallation of applications, and execution of commands between a computer and an Android device.

[0041] In this embodiment, the debugging service information is the information generated when the Android debugging tool communicates with the node server and the debugging Android device respectively. For example, the uninstallation information sent by the Android debugging tool to the Android device, and the information of installing a new Android device sent by the Android debugging tool to the node server.

[0042] Step 202: Establish a mapping relationship with the second Android debugging tool on the node server to receive the debugging service information of the Android device by the second Android debugging tool.

[0043] In this embodiment, the node server is the server of multiple Android devices. Since there are many node servers serving Android devices, it is called a node server. The relevant services of the cloud real device platform are running on the node server, such as Figure 3 the provider part in

[0044] such as Figure 3 In the embodiment shown in Figure 3 the second Android debugging tool is an Android debugging tool installed on the node server. The second Android debugging tool can use the adb tool (such as Figure 3 the adb server in

[0045] The adb tool defines the direct communication protocol between the Android system on the computer and the Android device (such as Figure 3in the virtual box of the device).

[0046] Step 203, receive the device operation requirement information of the user.

[0047] In this embodiment, the user is the user who communicates with the execution entity on which the method of remotely operating the device runs. The user sends the device operation requirement information to the execution entity on which the method of remotely operating the device runs through the user interface. The device operation requirement information may refer to the monitoring conditions for monitoring the Android devices connected to the node server. The monitoring conditions include: the identification of the Android device to be monitored, the applications on the Android device to be monitored, and the operation instruction information for the Android device. Among them, the operation instruction information includes: uninstalling, installing, and data transferring for the Android device, and uninstalling, installing, and data transferring for the applications on the installed device;

[0048] Optionally, when debugging the opened debugging page on the Android device, the device operation requirement information may include: the page to be debugged, and the debugging instruction information for the page to be debugged.

[0049] Step 204, based on the device operation requirement information, connect to and operate the Android device on the node server through the first Android debugging tool.

[0050] In this embodiment, the device operation requirement information includes the Android device to be operated. Based on the Android device to be operated, connect to the Android device to be operated and operate the Android device through the first Android debugging tool and the debugging service information.

[0051] In this embodiment, based on the device operation requirement information, the operation of the mapping information of the Android device on the node server locally can be directly triggered, and the operation of the local mapping information can be directly synchronized to the Android device on the node server, so as to achieve the purpose of directly connecting to and operating the Android device on the node server.

[0052] When the first Android debugging tool is the adb tool, the above step 204 includes: based on the device operation requirement information, determine the Android device to be operated, the applications on the Android device, and the operations on the applications; based on the Android device to be operated and the applications, use the connection command of the adb tool to connect to the mapped Android device that matches the Android device to be operated in the debugging service information; use the operation command corresponding to the operation in the adb tool to operate the applications on the Android device. It should be noted that the mapped Android device is the Android device mapped on the side where the execution entity is located, and the mapped Android device is the same as the Android device on the node server side. When connecting to and operating the mapped Android device, the Android device on the node server can be connected to and operated accordingly.

[0053] The method for a remote operation device provided by an embodiment of the present disclosure includes: First, install a first Android debugging tool; Second, establish a mapping relationship with a second Android debugging tool on a node server to receive debugging service information of the Android device by the second Android debugging tool; Third, receive device operation requirement information of a user; Finally, based on the device operation requirement information, connect to and operate the Android device on the node server through the first Android debugging tool. Thus, Android debugging tools are installed on both the remote server and the node server, and the debugging service information of the Android device on the node server is mapped to the execution subject of the method for the remote operation device. When the user has a continuous device requirement, the Android device on the node server is connected to and operated through the first Android debugging tool, which conveniently and quickly realizes the control of the Android device under the node server and improves the user experience.

[0054] In this embodiment, the device operation requirement information output by the user may also only include operations on the Android device. The mapped Android device is operated by using the first Android debugging tool according to the device operation requirement. In some alternative implementation manners of the present disclosure, the above-mentioned connecting to and operating the Android device on the node server through the first Android debugging tool based on the device operation requirement information includes: determining the currently mapped Android device, which is obtained by mapping the Android device connected to the node server; connecting to the currently mapped Android device by using the first Android debugging tool; determining the operation on the currently mapped Android device based on the device operation requirement information, and executing the operation on the currently mapped Android device through the first Android debugging tool.

[0055] In this alternative implementation manner, the Android device currently connected to the second Android debugging tool can be determined through the established mapping relationship with the second Android debugging tool, and the Android device connected to the second Android debugging tool is the currently mapped Android device. Since the mapping relationship with the second Android debugging tool has been established previously, the debugging service information of the Android device by the second Android device can be directly received, and the debugging service information also includes the currently mapped Android device. Therefore, the currently mapped Android device can be obtained through both the debugging service information and the communication with the second Android debugging tool.

[0056] In this alternative implementation manner, the first Android debugging tool has a connection command. The currently mapped Android device is accessed through the first Android debugging tool, and a connection relationship can be directly established with the currently mapped Android device through the connection command.

[0057] In this alternative implementation manner, by determining the operation on the currently mapped Android device through the device operation requirement information, the Android device connected to the node server can be directly operated based on the user requirement, which improves the convenience of operating the Android device.

[0058] The method for connecting and operating an Android device on a node service provided by this alternative implementation first determines the currently mapped Android device, connects to the currently mapped Android device using a first Android debugging tool, and operates on the currently mapped Android device based on the operations recorded in the device operation requirement information, which can achieve the purpose of operating on the Android device locally and improve the operation convenience for users.

[0059] In some embodiments of the present disclosure, the above method for remotely operating a device further includes: monitoring the debugging page of the browser on the currently mapped Android device through the first Android debugging tool.

[0060] In this alternative implementation, the debugging page of the browser on the Android device is the page currently opened by the browser on the Android device. Through the first Android debugging tool, the process of the currently opened page in the browser can be directly obtained, and the content of the debugging page of the browser can be restored through this process to obtain the content of the debugging page of the browser.

[0061] The method for remotely operating a device provided in this embodiment monitors the debugging page of the browser on the currently mapped Android device through the first Android debugging tool, which can monitor the debugging page in the browser in real time, improve the monitoring effect of the debugging page, and improve the user experience.

[0062] Optionally, the above method for remotely operating a device further includes: monitoring the log information of the applications on the currently mapped Android device through the first Android debugging tool.

[0063] In this embodiment, the log information of the application is information recording the hardware, software, and system problems of the application in the Android device, and can also monitor the events occurring in the Android device.

[0064] In this embodiment, by accessing the intranet information related to the second Android debugging tool on the execution entity on which the method for remotely operating a device mapped to runs through the first Android debugging tool, the log information of all applications on the currently mapped Android device can be directly obtained, improving the comprehensiveness of the monitoring of the applications on the Android device.

[0065] In the traditional technology, when debugging a page on the Android platform, generally only a page debugging plugin can be added to the page, and by operating the plugin on the page, the debugging information of the current corresponding page is displayed. The traditional method requires technicians to handle it in advance with a high usage threshold; the debugging information displayed by the existing tools is not detailed, which is not convenient for quickly locating problems and has low debugging efficiency; the existing tools have inconvenient interaction and poor interaction effects.

[0066] In view of the above problems, in some alternative implementations of the present disclosure, the monitoring of the debugging page of the browser on the currently mapped Android device through the first Android debugging tool includes: using the first Android debugging tool to obtain the communication service information of the opened debugging page on the browser of the currently mapped Android device; using the first Android debugging tool to map the communication server information to the local through a specified port to obtain the connection information of the debugging page.

[0067] In this alternative implementation, the browser can be an embedded browser embedded in a native application of an Android device. Through the embedded browser in the native application, the user may not feel that they are using a browser. The embedded browser in the native application is a visual component, and as the visual part of the native application, when presenting content with the embedded browser in the native application, the content does not need to be stored locally and can be directly obtained from the server; the embedded browser in the native application can fully carry all the interactions of the native application. From a technical perspective, it is still a native application.

[0068] In this alternative implementation, when the first Android debugging tool is the adb tool, the "adb shell" command of the adb tool can be directly used to obtain the "unix domain socket" information of the existing debuggable debugging pages on the currently mapped Android device, and the "unix domain socket" information is the communication service information of the embedded browser process of the native application of the currently mapped Android device. The communication service information is a communication information that shows the communication between the debugging page in the embedded browser and other applications or devices. In this embodiment, "unix domain socket" is a method for inter-process communication (IPC) between processes on the same machine. It is a special file type based on the file system directory and can create and use sockets for communication between the client and the server.

[0069] In this alternative implementation, since the communication service information can be information in multiple time periods, when the first Android debugging tool is the adb tool, the "adb forward" command of the adb tool can be directly used to obtain the "unix domain socket" information obtained in the previous step and map the "unix domain socket" information to the local, where the local refers to the execution entity on which the method of remotely operating the device runs, that is, the remote server.

[0070] In this alternative implementation, Android is a Unix-like system, and the Unix domain socket is a communication service in the Unix-like system. Through the adb forward command, the Unix domain socket communication service of the process in the corresponding embedded browser on the mobile phone is converted into a TCP service and mapped out to obtain connection information, and the connection information can be accessed by specifying a port. Further, the connection information can be obtained through a request in a specified manner for this service.

[0071] In this alternative implementation, the connection information is information reflecting the current operation of the debug page, and is displayed in the form of a display content correspondence table. For example, the display content correspondence table includes: the correspondence between each control on the debug page and the running state in each control. Or the display content correspondence table can also include: the correspondence between the log information of the debug page and the components related to the log information.

[0072] The following combines Figure 3 to illustrate the specific process of this alternative implementation:

[0073] 1. In the remote computer room corresponding to the node server, the Android device connects to the node server through a USB data cable and uses the adb tool (the second Android debugging tool), and maps the local adb service of the current node server to the remote server (the execution entity on which the method of the remote operation device of the present disclosure runs, Figure 3 the part to the left of the vertical dotted line in).

[0074] 2. The remote server implements an API interface (such as Figure 3 interface A in), and this interface A is provided to the user. By sending device operation requirement information to this interface A, the connection information L can be obtained by calling interface A.

[0075] 3. When the interface is called, the remote server connects to the adb service mapped on the node server (such as Figure 3 adbclient in), and maps the Android device connected to the node server to the local of the remote server for operation.

[0076] 4. The remote server locally installs a local adb tool (the first Android debugging tool, such as Figure 3 adb in), and performs an "adb connect" operation on the mapped remote Android device, so that the local adb tool on the remote server can identify and operate the mapped Android device.

[0077] 5. The adb tool on the local remote server executes the "adb shell" command to obtain the "unix domain socket" information of the existing debuggable pages on the currently mapped Android device. This information is the communication service of the webview process of the current Android device. Here, webview is a component or control used to display Web (website, URL) content in an embedded manner in a mobile application. It allows developers to directly embed Web pages into the user interface of the application and interact with other parts of the application.

[0078] 6. The adb tool on the local remote server executes the "adb forward" command to map the "unix domain socket" service obtained in the previous step to the remote server using a specified port ( Figure 3 in port server).

[0079] 7. The local remote server requests the local service mapped in the previous step. This service is the Google developer debugging service supported by the webview process, and the interface is " / list / json", which will return the connection information of the debug page corresponding to the current "unix domain socket".

[0080] 8. After obtaining the connection information by the request, a websocket server corresponding to the connection information is created for listening, and the connection information is modified to become the websocket service created by the remote server and then responded back to the user side.

[0081] The method for monitoring the currently mapped Android device provided by this alternative implementation uses the first Android debugging tool to obtain the communication service information of the debug page opened on the browser of the currently mapped Android device; uses the first Android debugging tool to map the communication service information to the local using a specified port to obtain the connection information of the debug page, providing a reliable implementation for effectively monitoring the debug page of the browser on the currently mapped Android device.

[0082] In some embodiments of the present disclosure, the above method for remotely operating the device further includes: establishing a debug channel and debugging the debug page through the debug channel.

[0083] In this alternative implementation, after obtaining the connection information of the debug page, the connection information can be stored in the corresponding storage area of the execution entity on which the method for remotely operating the device runs. The user can send a request to the specified port by interacting with the execution entity to obtain the connection information.

[0084] In this optional implementation, the debugging channel is a channel for receiving connection information, and the debugging channel is also a channel for sending debugging information to the node server, that is, the debugging channel is a channel for a remote server and a node server to perform two-way data interaction. The remote server can send first debugging information to the node server through the debugging channel, and the node server can also send second debugging information to the remote server through the debugging channel, wherein the second debugging information is information obtained after debugging the debugging page in the mapped Android device based on the first debugging information.

[0085] The method for remotely operating a device provided in this embodiment establishes a debugging channel, and debugs a debugging page through the debugging channel, thereby providing a reliable implementation method for users to debug Android devices on a node server, thereby improving user experience.

[0086] Optionally, the above-mentioned method for remotely operating a device also includes: based on the port where the connection information is located, sending a request to the port, obtaining and displaying the connection information on the user terminal; receiving modification information, wherein the modification information is information obtained after the user modifies the connection information, converting the modification information into information synchronized with the Android debugging tool, and sending the converted information to the browser of the mapped Android device, so that the browser of the mapped Android device directly displays the modification information, thereby achieving the purpose of debugging the debugging page.

[0087] In some optional implementations of the present disclosure, the above-mentioned establishment of a debugging channel and debugging a debugging page through the debugging channel includes: locally deploying a page debugging tool; creating a communication server corresponding to the connection information, and using the communication server to monitor the connection information in real time; sending the connection information to the page debugging tool, so that the page debugging tool communicates with the communication server based on the connection information; in response to a successful communication connection between the page debugging tool and the communication server, creating a communication client, and connecting the communication service information through the communication client; in response to a successful connection between the communication client and the communication service information, determining that a debugging channel between the communication client, the communication server, and the page debugging tool is successfully established; and receiving debugging information of the debugging page in real time through the debugging channel.

[0088] In this optional implementation, the page debugging tool is a debugging and development tool for the browser's web page, including powerful debugging and analysis tools, providing rich functions to help developers develop, debug and optimize web pages in the browser, wherein the page debugging tool can be Devtools (a development and debugging tool built into the browser). After the debugging channel is successfully established, the user can directly obtain the connection information through the page debugging tool, modify the connection information, obtain the modified information, and send the modified information to the debugging page of the Android device of the node server through the debugging channel.

[0089] In this optional implementation, the communication server is a port running on the execution subject (remote server) on which the method of remotely operating the device is running. Figure 4 The ws server in the can directly process local data, and the communication server adopts a fixed communication method corresponding to the page debugging tool (such as Figure 4 The socket in communicates.

[0090] In this optional implementation, the communication client is a service that connects to a port on a server. Figure 4 The ws client in the debug page can directly process local data, and the communication client adopts a fixed communication method corresponding to the debug page (such as Figure 4 The socket in communicates.

[0091] In this optional implementation, when the first Android debugging tool is an adb tool, the debugging service obtained through the "adbfoward" instruction of the adb tool only supports local connection. For this purpose, it is necessary to establish a communication server and a communication client in the execution body, connect to the page debugging tool through the established communication server, and communicate with the page debugging tool through a fixed communication method; connect to the port corresponding to the connection information through the established communication client, and communicate with the port through a fixed communication method. Since the communication method on the side where the communication server is located is the same as the communication method on the side where the communication client is located, the information on both sides can be intercommunication, thereby realizing the function of the debugging channel, which allows users to conveniently and quickly debug the information in the debugging channel.

[0092] Combine the following Figure 4 The establishment process of the debugging channel disclosed in this disclosure is described in detail:

[0093] 1. First, deploy a browser development and debugging tool Devtools on the server.

[0094] 2. After obtaining the connection information, the execution subject uses the debugging connection information as a parameter to access the development and debugging tool Devtools.

[0095] 3. After Devtools obtains the connection information, it connects to the created communication server wsserver through the websocket protocol. Websocket is a protocol for implementing two-way communication in Web applications. It provides a persistent connection, allowing the server to send data to the client in real time, and the client can also send data to the server, realizing real-time and interactive communication.

[0096] 4. The remote server monitors the connection action of the current websocket service. After the connection between Devtools and the ws server is successful, the remote server creates a communication client, ws client, to connect to the original websocket service for local debugging returned by the interface port server provided by the "unix domain socket".

[0097] 5. After both the user and the remote server, and the remote server and the local websocket service of the server are connected, any debugging information in the socket channels of the two connected parties (such as the socket in a virtual box as shown) will be forwarded to another socket channel (such as the socket in another virtual box as shown) to achieve the transfer of debugging information. Figure 4 As shown in the socket in a virtual box, any debugging information in the socket channels of the two connected parties will be forwarded to another socket channel (such as the socket in another virtual box as shown) to achieve the transfer of debugging information. Figure 4 As shown in the socket in another virtual box, to achieve the transfer of debugging information.

[0098] 6. The Devtools debugging page accessed by the user side can normally display debugging information or perform debugging interactions.

[0099] The method for providing a debugging page in this alternative implementation can remotely and real - time debug the page of the cloud real - device. This solution is simple and easy to use, without the need for additional plugins and software. Users can conveniently perform real - time debugging of the page inside the cloud real - device, accurately locate problems, and improve the debugging efficiency.

[0100] Through this disclosure, the debugging work of the page of Android devices in a remote environment can be solved. In the cloud real - device platform, it is possible to effectively perform cost - free debugging of the page inside Android devices.

[0101] The method for providing a debugging page in this alternative implementation deploys a page debugging tool locally, facilitating user access; creating a communication server and a communication client can effectively dock the connection information with the information in the page debugging tool, improving the debugging effect of the user on the debugging page of the Android device on the node server and enhancing the user experience.

[0102] Further referring to Figure 5 As an implementation of the method for remotely operating a device shown in the above figures, this disclosure provides an embodiment of a device for remotely operating a device. This device embodiment corresponds to the method embodiment shown in Figure 2 and this device can be specifically applied to various electronic devices.

[0103] Such as Figure 5As shown in the figure, an embodiment of the present disclosure provides a device 500 for remotely operating a device. The device 500 includes: an installation unit 501, a mapping unit 502, a receiving unit 503, and a connection unit 504. Among them, the above-mentioned installation unit 501 can be configured to install a first Android debugging tool. The above-mentioned mapping unit 502 can be configured to establish a mapping relationship with a second Android debugging tool on a node server to receive debugging service information of the second Android debugging tool for the Android device. The above-mentioned receiving unit 503 can be configured to receive device operation requirement information of a user. The above-mentioned connection unit 504 can be configured to connect to and operate an Android device on the node server through the first Android debugging tool based on the device operation requirement information.

[0104] In this embodiment, in the device 500 for remotely operating a device, the specific processing of the installation unit 501, the mapping unit 502, the receiving unit 503, and the connection unit 504 and the technical effects brought by them can be respectively referred to Figure 2 Steps 201, 202, 203, and 204 in the corresponding embodiments.

[0105] In some embodiments, the above-mentioned connection unit 504 is configured to: determine the currently mapped Android device, which is obtained by mapping the Android device connected to the node server; connect to the currently mapped Android device using the first Android debugging tool; and operate the currently mapped Android device through the first Android debugging tool.

[0106] In some embodiments, the above-mentioned device further includes: a page monitoring unit (not shown in the figure), and the page debugging unit is configured to: monitor a debugging page of a browser on the currently mapped Android device through the first Android debugging tool.

[0107] In some embodiments, the above-mentioned page monitoring unit is further configured to: obtain communication service information of the opened debugging page on the browser of the currently mapped Android device using the first Android debugging tool; map the communication server information to the local through a specified port using the first Android debugging tool to obtain connection information of the debugging page.

[0108] In some embodiments, the above-mentioned device further includes: a page debugging unit (not shown in the figure), and the page debugging unit is configured to: establish a debugging channel and debug the debugging page through the debugging channel.

[0109] In some embodiments, the above-mentioned page debugging unit is further configured to: deploy a page debugging tool locally; create a communication server corresponding to the connection information, and use the communication server to monitor the connection information in real time; send the connection information to the page debugging tool so that the page debugging tool communicates with the communication server based on the connection information; in response to the successful communication connection between the page debugging tool and the communication server, create a communication client and connect to the communication service information through the communication client; in response to the successful connection between the communication client and the communication service information, determine that the debugging channel between the communication client, the communication server, and the page debugging tool is successfully established; receive the debugging information of the debugging page in real time through the debugging channel. The device for remotely operating a device provided by the embodiments of the present disclosure, first, the installation unit 501 installs a first Android debugging tool; secondly, the mapping unit 502 establishes a mapping relationship with a second Android debugging tool on the node server to receive the debugging service information of the second Android debugging tool for the Android device; thirdly, the receiving unit 503 receives the device operation requirement information of the user; finally, the connection unit 504 connects to and operates the Android device on the node server through the first Android debugging tool based on the device operation requirement information. Thus, Android debugging tools are installed on both the remote server and the node server, and the debugging service information of the Android device on the node server is mapped to the execution subject of the method of the remotely operating device. When the user has a device operation requirement, the Android device on the node server is connected to and operated through the first Android debugging tool, which conveniently and quickly realizes the control of the Android device under the node server and improves the user experience.

[0110] Reference is made below to Figure 6 which shows a schematic structural diagram of an electronic device 600 suitable for use in implementing the embodiments of the present disclosure.

[0111] As Figure 6 shown, the electronic device 600 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 601, which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0112] Typically, the following devices can be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 can allow the electronic device 600 to communicate with other devices wirelessly or wiredly to exchange data. Although Figure 6 the electronic device 600 with various devices is shown, it should be understood that it is not required to implement or have all the shown devices. Instead, more or fewer devices can be implemented or had. Figure 6 Each block shown in can represent one device or, as needed, multiple devices.

[0113] Specifically, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product that includes a computer program carried on a computer-readable medium, and the computer program contains program codes for performing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above functions defined in the method of the embodiment of the present disclosure are performed.

[0114] It should be noted that the computer-readable medium of the embodiments of the present disclosure can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 of the above. In the embodiments of the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or combined with an instruction execution system, apparatus, or device. In the embodiments of the present disclosure, the computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, and this computer-readable signal medium can send, propagate, or transmit a program for use by or combined with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0115] The above computer-readable medium can be included in the above server; or it can exist independently and not be assembled into the server. The above computer-readable medium carries one or more programs, and when the one or more programs are executed by the server, the server is caused to: install the first Android debugging tool; establish a mapping relationship with the second Android debugging tool on the node server to receive the debugging service information of the second Android debugging tool for the Android device; receive the device operation requirement information of the user; and based on the device operation requirement information, connect to and operate the Android device on the node server through the first Android debugging tool.

[0116] Computer program code for performing the operations of the embodiments of the present disclosure may be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0117] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a portion of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions noted in the blocks may occur in a different order than noted in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system that performs the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.

[0118] The units involved in the embodiments described in the present disclosure may be implemented in software or in hardware. The described units may also be provided in a processor. For example, it may be described as a processor including an installation unit, a mapping unit, a receiving unit, and a connection unit. Among them, the names of these units do not constitute a limitation to the unit itself in some cases. For example, the installation unit may also be described as a unit "configured to install the first installation and debugging tool".

[0119] The above description is only a preferred embodiment of the present disclosure and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above inventive concept. For example, the technical solutions formed by mutually replacing the above features with the technical features (but not limited to) disclosed in the embodiments of the present disclosure that have similar functions.

Claims

1. A method for remotely operating a device, the method comprising: Installing a first Android debugging tool; Establishing a mapping relationship with a second Android debugging tool on a node server to receive debugging service information of the second Android debugging tool for an Android device; Receiving device operation requirement information of a user; Based on the device operation requirement information, connecting to and operating the Android device on the node server through the first Android debugging tool.

2. The method according to claim 1, wherein The connecting to and operating the Android device on the node server through the first Android debugging tool based on the device operation requirement information includes: Determining the currently mapped Android device, where the currently mapped Android device is obtained by mapping the Android device connected to the node server; Using the first Android debugging tool to connect to the currently mapped Android device; Based on the device operation requirement information, determining an operation on the currently mapped Android device, and executing the operation on the currently mapped Android device through the first Android debugging tool.

3. The method according to claim 1 or 2, further comprising: Monitoring a debugging page of a browser on the currently mapped Android device through the first Android debugging tool.

4. The method according to claim 3, wherein The monitoring a debugging page of a browser on the currently mapped Android device through the first Android debugging tool includes: Using the first Android debugging tool to obtain communication service information of an opened debugging page on the browser of the currently mapped Android device; Using the first Android debugging tool to map the communication server information to the local through a specified port to obtain connection information of the debugging page.

5. The method according to claim 4, the method further comprising: Establishing a debugging channel and debugging the debugging page through the debugging channel.

6. The method according to claim 5, wherein The establishing a debugging channel and debugging the debugging page through the debugging channel includes: Deploying a page debugging tool locally; Creating a communication server corresponding to the connection information and using the communication server to continuously monitor the connection information; Sending the connection information to the page debugging tool so that the page debugging tool communicates and connects with the communication server based on the connection information; In response to successful communication connection between the page debugging tool and the communication server, creating a communication client and connecting to the communication service information through the communication client; In response to successful connection between the communication client and the communication service information, determining that the debugging channel between the communication client, the communication server, and the page debugging tool is successfully established; Receiving debugging information of the debugging page in real time through the debugging channel.

7. A device for remotely operating a device, the device comprising: An installation unit configured to install a first Android debugging tool; A mapping unit configured to establish a mapping relationship with a second Android debugging tool on a node server to receive debugging service information of the second Android debugging tool for an Android device; A receiving unit configured to receive device operation requirement information of a user; A connection unit configured to connect to and operate the Android device on the node server through the first Android debugging tool based on the device operation requirement information.

8. The apparatus according to claim 7, wherein, The connection unit is configured to: Determine the currently mapped Android device, which is obtained by mapping the Android device connected to the node server; connect to the currently mapped Android device using the first Android debugging tool; operate the currently mapped Android device through the first Android debugging tool.

9. An electronic device, comprising: One or more processors; A storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1-6.

10. A computer-readable medium having a computer program stored thereon, wherein, When the program is executed by the processor, the method according to any one of claims 1-6 is implemented.