CN112187869A - Remote debugging system and method of IOT device, electronic device and storage medium - Google Patents

Remote debugging system and method of IOT device, electronic device and storage medium Download PDF

Info

Publication number
CN112187869A
CN112187869A CN202010917295.4A CN202010917295A CN112187869A CN 112187869 A CN112187869 A CN 112187869A CN 202010917295 A CN202010917295 A CN 202010917295A CN 112187869 A CN112187869 A CN 112187869A
Authority
CN
China
Prior art keywords
iot
browser client
debugging
communication link
instruction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010917295.4A
Other languages
Chinese (zh)
Inventor
董鑫
侯锦
解婷婷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
JD Digital Technology Holdings Co Ltd
Original Assignee
JD Digital Technology Holdings Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by JD Digital Technology Holdings Co Ltd filed Critical JD Digital Technology Holdings Co Ltd
Priority to CN202010917295.4A priority Critical patent/CN112187869A/en
Publication of CN112187869A publication Critical patent/CN112187869A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention provides a remote debugging system, a remote debugging method, electronic equipment and a storage medium of IOT equipment, wherein the system comprises the following components: the system comprises a browser client, an IOT server, an agent and IOT equipment, wherein the agent is located locally at the IOT server; the method comprises the steps that a browser client determines a debugging request aiming at IOT equipment and sends the debugging request to an IOT server; the IOT server side establishes a communication link for the IOT equipment and the browser client side on the proxy side according to the debugging request; the IOT server side sends the link identification of the communication link to the IOT equipment and the browser client side; the browser client accesses a communication link of the agent end according to the link identification, and the IOT equipment accesses the communication link of the agent end according to the link identification; the browser client receives the debugging instruction and sends the debugging instruction to the IOT equipment through a communication link of the proxy end; the IOT device receives the debugging instruction, converts the debugging instruction into a target instruction, and executes the target instruction.

Description

Remote debugging system and method of IOT device, electronic device and storage medium
Technical Field
The present invention relates to the field of device debugging technologies, and in particular, to a remote debugging system and method for an IOT device, an electronic device, and a storage medium.
Background
With the development of the Internet of Things technology, the application of IOT (Internet of Things) devices is becoming more extensive, and among them, a Linux platform based on an android system or based on a simplified android system is widely applied to various IOT devices as a mainstream IOT device operating system, and how to timely and effectively debug the IOT devices becomes the first thing in the operation process of the IOT devices.
In the related art, a first connection is established between a remote debugging client and a first proxy server in an external network, a second connection is established between the first proxy server and a second proxy server in an internal network, a third connection is established between the second proxy server and an ADB (Android Debug Bridge) server, and a fourth connection is established between the ADB server and an IOT device, as shown in fig. 1, so that remote debugging of the IOT device can be realized through the first connection, the second connection, the third connection, and the fourth connection.
At present, in the process of remotely debugging the IOT equipment, a remote debugging client needs to communicate with the IOT equipment through a first connection, a second connection, a third connection and a fourth connection, so that the network complexity is high, debugging instructions need to perform multi-layer proxy transfer among the equipment, the communication quality is not easy to guarantee, and the debugging efficiency is low.
Disclosure of Invention
Embodiments of the present invention provide a remote debugging system and method for an IOT device, an electronic device, and a storage medium, so as to achieve the beneficial effects of reducing network responsibility, reducing proxy transfer of debugging instructions, ensuring communication quality, and improving debugging efficiency. The specific technical scheme is as follows:
in a first aspect of the embodiments of the present invention, a remote debugging system of an IOT device is provided, where the system includes: the system comprises a browser client, an IOT server, an agent and IOT equipment, wherein the agent is located locally at the IOT server;
the browser client determines a debugging request aiming at the IOT equipment and sends the debugging request to the IOT server;
the IOT server side establishes a communication link for the IOT equipment and the browser client side on the agent side according to the debugging request;
the IOT server side sends the link identification of the communication link to the IOT equipment and the browser client side;
the browser client accesses the communication link of the agent end according to the link identification, and the IOT equipment accesses the communication link of the agent end according to the link identification;
the browser client receives a debugging instruction and sends the debugging instruction to the IOT equipment through the communication link of the agent end;
and the IOT equipment receives the debugging instruction, converts the debugging instruction into a target instruction and executes the target instruction.
In an optional embodiment, the system further comprises:
the IOT server generates a key for the IOT equipment and the browser client according to the debugging request, and sends the key to the IOT equipment and the browser client;
the sending the debug instruction to the IOT device through the communication link of the agent side includes:
the browser client encrypts the debugging instruction by using the secret key, and sends the encrypted debugging instruction to the IOT equipment through the communication link of the agent end;
the converting the debugging instruction into the target instruction comprises:
and the IOT equipment decrypts the encrypted debugging instruction by using the key and transmits the debugging instruction into an instruction translator to be converted into a target instruction.
In an optional embodiment, the system further comprises:
the IOT equipment encrypts an execution result by using the secret key, and sends the encrypted execution result to the browser client through the communication link of the proxy end;
and the browser client receives the encrypted execution result, decrypts the encrypted execution result by using the secret key, and displays the execution result.
In an optional implementation manner, before the sending the debugging instruction to the IOT device through the communication link of the agent side, the system further includes:
the browser client judges whether the debugging instruction contains a file identifier or not;
and if the debugging instruction does not contain the file identification, the browser client executes the step of sending the debugging instruction to the IOT equipment through the communication link of the proxy end.
In an optional embodiment, the system further comprises:
if the debugging instruction comprises a file identifier, the browser client stores a file corresponding to the file identifier to a file storage system of the IOT server;
the browser client sends a first URL generated by storing the file and the debugging instruction to the IOT equipment through the communication link of the proxy end;
and the IOT equipment receives the debugging instruction and the first URL, acquires the file according to the first URL, stores the file to the local, converts the debugging instruction into a target instruction and executes the target instruction.
In an optional embodiment, the system further comprises:
the IOT equipment acquires a local directory structure after accessing the communication link of the agent end and sends the local directory structure to the browser client through the communication link of the agent end;
the browser client receives the directory structure, generates a visual tree directory according to the target structure and displays the visual tree directory at the target position of a debugging window;
when it is monitored that a preset operation of a target object aiming at a target directory node in the visual tree directory is triggered, the browser client adjusts a path to a path corresponding to the target directory node;
the browser client receives a debugging instruction, and the method comprises the following steps:
and after the path is adjusted to the path corresponding to the target directory node, the browser client receives a debugging instruction input by the target object.
In an optional embodiment, the system further comprises:
when it is monitored that the target object drags a local file of the browser client to a target directory node in the visual tree directory, the browser client stores the local file to a file storage system of the IOT server;
the browser client sends a second URL generated by storing the local file to the IOT equipment through the communication link of the proxy end;
and the IOT equipment receives the second URL, acquires the local file according to the second URL and stores the local file.
In an optional embodiment, the system further comprises:
when it is monitored that the target object triggers a downloading operation of an opposite terminal file under a target directory node in the visual tree directory, the browser client sends an opposite terminal identification of the opposite terminal file to the IOT equipment through the communication link of the agent terminal;
the IOT equipment receives the opposite terminal identification and stores the opposite terminal file corresponding to the opposite terminal identification to a file storage system of the IOT server;
the IOT equipment sends a third URL generated by storing the opposite-end file to the browser client through the communication link of the agent end;
and the browser client determines a storage directory of the opposite-end file, acquires the opposite-end file according to the third URL, and stores the opposite-end file in the storage directory.
In an optional implementation manner, the accessing, by the browser client, the communication link of the agent end according to the link identifier includes:
after receiving the link identification, the browser client establishes connection with the agent end and accesses the communication link of the agent end according to the link identification;
the IOT device accesses the communication link of the agent end according to the link identification, and the method comprises the following steps:
after receiving the link identifier, the IOT device establishes connection with the agent terminal and accesses the communication link of the agent terminal according to the link identifier;
the sending the debug instruction to the IOT device through the communication link of the agent side includes:
the browser client sends the debugging instruction to the agent end;
and the agent end determines the communication link accessed by the browser client end and sends the debugging instruction to the IOT equipment accessed to the communication link.
In a second aspect of the embodiments of the present invention, there is also provided a remote debugging method for an IOT device, which is applied to a browser client, where the method includes:
determining a debugging request aiming at the IOT equipment, sending the debugging request to an IOT server, so that the IOT server creates a communication link for the IOT equipment and the browser client on an agent side according to the debugging request, and sends a link identification of the communication link to the IOT equipment and the browser client, wherein the agent side is located locally at the IOT server;
accessing the communication link of the agent end according to the link identification, wherein the IOT equipment accesses the communication link of the agent end according to the link identification;
and receiving a debugging instruction, sending the debugging instruction to the IOT equipment through the communication link of the agent end, so that the IOT equipment receives the debugging instruction, converts the debugging instruction into a target instruction and executes the target instruction.
In a third aspect of the embodiments of the present invention, there is further provided a remote debugging apparatus for IOT devices, which is applied to a browser client, where the apparatus includes:
the request sending module is used for determining a debugging request aiming at the IOT equipment, sending the debugging request to an IOT server, enabling the IOT server to establish a communication link for the IOT equipment and the browser client on an agent side according to the debugging request, and sending a link identification of the communication link to the IOT equipment and the browser client, wherein the agent side is located locally at the IOT server;
a link access module, configured to access the communication link of the agent end according to the link identifier, where the IOT device accesses the communication link of the agent end according to the link identifier;
and the instruction sending module is used for receiving a debugging instruction, sending the debugging instruction to the IOT equipment through the communication link of the agent end so that the IOT equipment receives the debugging instruction, converts the debugging instruction into a target instruction and executes the target instruction.
In a fourth aspect of the embodiments of the present invention, there is also provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the remote debugging method of the IOT equipment when executing the program stored in the memory.
In a fifth aspect of the embodiment of the present invention, a storage medium is further provided, where instructions are stored in the storage medium, and when the storage medium runs on a computer, the storage medium causes the computer to execute the remote debugging method for an IOT device described above.
In a sixth aspect of the embodiments of the present invention, there is also provided a computer program product containing instructions, which when run on a computer, causes the computer to execute the remote debugging method for an IOT device described above.
According to the technical scheme provided by the embodiment of the invention, a browser client determines a debugging request aiming at an IOT device, the browser client sends the debugging request to an IOT server, the IOT server creates a communication link for the IOT device and the browser client on an agent terminal according to the debugging request, the IOT server sends a link identifier of the communication link to the IOT device and the browser client, the IOT device and the browser client are respectively accessed into the communication link according to the link identifier, the browser client receives a debugging instruction, the browser client sends the debugging instruction to the IOT device through the communication link of the agent terminal, the IOT device receives the debugging instruction, and the IOT device converts the debugging instruction into a target instruction and executes the target instruction. Therefore, the communication link of the agent end is used for transmitting the debugging instruction, the network responsibility can be reduced, the agent transfer of the debugging instruction is reduced, the communication quality is ensured, and the debugging efficiency is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic structural diagram of a remote debugging system of an IOT device in an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a remote debugging system of another IOT device shown in the embodiment of the present invention;
fig. 3 is an interaction flow diagram of a remote debugging method for an IOT device shown in the embodiment of the present invention;
fig. 4 is an interaction flow diagram of another remote debugging method for an IOT device in the embodiment of the present invention;
FIG. 5 is a schematic diagram of a debugging window of a browser client shown in an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a remote debugging apparatus of an IOT device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device shown in the embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
As shown in fig. 2, an architecture diagram of a remote debugging system of an IOT device according to an embodiment of the present invention is provided, where the remote debugging system of the IOT device includes a browser client, an IOT server, a proxy, and the IOT device, where the proxy is located locally at the IOT server.
The proxy terminal may be a WebSocket (a protocol for performing full duplex communication on a single TCP connection), that is, a WebSocket proxy terminal, or an MQTT (message publish/subscribe protocol based on a client-server), that is, an MQTT proxy terminal, which is not limited in the embodiment of the present invention.
As shown in fig. 3, an interaction flow diagram of a remote debugging method for an IOT device according to an embodiment of the present invention is provided, where the method specifically includes the following steps:
s301, the browser client determines a debugging request aiming at the IOT equipment and sends the debugging request to the IOT server;
in the embodiment of the present invention, a target object (e.g., a debugging person) may select an IOT device at a browser client, may trigger a debugging request for the IOT device, may determine a debugging request for the IOT device, and sends the debugging request to an IOT server.
For example, a plurality of IOT devices may be exposed at a browser client, a debugger may select one of the IOT devices and trigger a debug request for the IOT device, and the embodiment of the present invention may determine a debug request for the IOT device and send the debug request to an IOT server.
S302, the IOT server side establishes a communication link for the IOT equipment and the browser client side on the agent side according to the debugging request.
For the IOT server, a debugging request sent by the browser client may be received, where the debugging request carries an identifier of the IOT device and an identifier of the browser client.
The IOT service side may determine the corresponding IOT device and the browser client according to the identifier of the IOT device and the identifier of the browser client, and further may create a communication link (or may be referred to as a "room") for the IOT device and the browser client on the proxy side according to the debugging request.
For example, the IOT service side may determine the corresponding IOT device and the browser client according to the identifier of the IOT device and the identifier of the browser client, and further may create a "room" for the IOT device and the browser client on the WebSocket agent side for the current debugging according to the debugging request.
S303, the IOT server sends the link identification of the communication link to the IOT equipment and the browser client.
After the agent creates a communication link for the IOT device and the browser client, the IOT service may send a link identification (or "identification of a room") of the created communication link to the corresponding IOT device and the browser client.
For example, after the IOT server creates a "room" for the IOT device and the browser client on the WebSocket agent, the "number of room" for local debugging may be sent to the corresponding IOT device and the browser client.
S304, the browser client accesses the communication link of the agent end according to the link identification, and the IOT equipment accesses the communication link of the agent end according to the link identification.
For the browser client, after receiving the link identifier sent by the IOT server, the communication link of the proxy may be accessed according to the link identifier. Specifically, after receiving the link identifier sent by the IOT server, the browser client may establish a connection with the agent, so as to access the communication link of the agent according to the link identifier.
For the IOT device, after receiving the link identifier sent by the IOT server, the communication link of the agent may be accessed according to the link identifier. Specifically, after receiving the link identifier sent by the IOT server, the IOT device may establish a connection with the agent, so as to access the communication link of the agent according to the link identifier.
S305, the browser client receives a debugging instruction, and sends the debugging instruction to the IOT equipment through the communication link of the agent end.
After the steps are carried out, the browser client and the IOT device can communicate through a communication link of the agent side. The target object can input a debugging instruction in a debugging window of the browser client, and the browser client can receive the debugging instruction input by the target object and send the debugging instruction to the IOT equipment through a communication link of the agent end.
The browser client can send the debugging instruction to the proxy end, and the proxy end determines a communication link accessed by the browser client, so that the debugging instruction can be sent to the IOT equipment also accessed to the communication link.
S306, the IOT equipment receives the debugging instruction, converts the debugging instruction into a target instruction and executes the target instruction.
For the IOT device, a debug instruction sent by the agent may be received, where the debug instruction is an ADB debug instruction, and the debug instruction needs to be converted into a target instruction, and the target instruction is executed. The debug instruction may be transferred to An (ADB) instruction translator for escape, converted to a SHELL instruction, and executed.
Through the above description of the technical solution provided by the embodiment of the present invention, a browser client determines a debugging request for an IOT device, the browser client sends the debugging request to an IOT server, the IOT server creates a communication link for the IOT device and the browser client on an agent according to the debugging request, the IOT server sends a link identifier of the communication link to the IOT device and the browser client, the IOT device and the browser client respectively access the communication link according to the link identifier, the browser client receives a debugging instruction, the browser client sends the debugging instruction to the IOT device through the communication link of the agent, the IOT device receives the debugging instruction, and the IOT device converts the debugging instruction into a target instruction and executes the target instruction. Therefore, the communication link of the agent end is used for transmitting the debugging instruction, the network responsibility can be reduced, the agent transfer of the debugging instruction is reduced, the communication quality is ensured, and the debugging efficiency is improved.
As shown in fig. 4, an interaction flow diagram of another remote debugging method for IOT devices provided in the embodiment of the present invention is specifically shown, where the method specifically includes the following steps:
s401, the browser client determines a debugging request aiming at the IOT equipment and sends the debugging request to the IOT server.
In the embodiment of the present invention, this step is similar to the step S301, and the details of the embodiment of the present invention are not repeated herein.
S402, the IOT server side creates a communication link for the IOT equipment and the browser client side on the agent side according to the debugging request.
In the embodiment of the present invention, this step is similar to the step S302, and the details of the embodiment of the present invention are not repeated herein.
S403, the IOT server generates a key for the IOT device and the browser client according to the debugging request.
In the embodiment of the present invention, in order to ensure the security of remote debugging, for the IOT service end, a key may be generated for the IOT device and the browser client based on the debugging request.
The IOT service may randomly generate the key, or may generate the key in other manners. The key is a temporary key used for the debugging.
S404, the IOT server side sends the link identification of the communication link and the key to the IOT device and the browser client side.
For the IOT service, the link identification (or "identification of the room") of the created communication link and the generated key may be sent to the corresponding IOT device and the browser client.
For example, for the IOT service, the "number of room" (11) and key (123456) for local debugging may be sent to the corresponding IOT device and browser client.
S405, the browser client accesses the communication link of the agent end according to the link identification, and the IOT equipment accesses the communication link of the agent end according to the link identification.
In the embodiment of the present invention, this step is similar to the step S304, and the details of the embodiment of the present invention are not repeated herein.
S406, the browser client receives a debugging instruction, encrypts the debugging instruction by using the secret key, and sends the encrypted debugging instruction to the IOT equipment through the communication link of the agent end.
The browser client can receive the debugging instruction input by the target object, encrypt the debugging instruction by using the key, and send the encrypted debugging instruction to the IOT equipment through the communication link of the proxy end. Therefore, the debugging instruction is transmitted in a ciphertext mode, and the debugging safety can be determined.
The browser client can send the encrypted debugging instruction to the proxy end, and the proxy end determines a communication link accessed by the browser client, so that the encrypted debugging instruction can be sent to the IOT equipment also accessed to the communication link.
S407, the IOT device receives the debugging instruction, decrypts the encrypted debugging instruction by using the key, transmits the debugging instruction into an instruction translator to be converted into a target instruction, and executes the target instruction.
For the IOT device, the encrypted debug instruction sent by the agent may be received, the encrypted debug instruction is encrypted by using the key, so that the debug instruction may be obtained, the debug instruction is transferred to An (ADB) instruction translator to be escaped, and converted into a SHELL instruction, and the SHELL instruction is executed.
For the execution result of the debugging instruction, the IOT device may encrypt the execution result using the key, and send the encrypted execution result to the browser client through the communication link of the proxy.
The IOT equipment sends the encrypted execution result to the agent end, and the agent end determines a communication link accessed by the IOT equipment, so that the encrypted execution result can be sent to a browser client side also accessed to the communication link.
For the browser client, the encrypted execution result sent by the agent can be received, and the encrypted execution result is decrypted by using the secret key, so that the execution result can be obtained, and further the execution result can be displayed for the target object to check the execution result.
In addition, because the embodiment of the invention belongs to remote debugging IOT equipment and cannot directly copy files to the IOT equipment, before the browser client sends the debugging instruction to the IOT equipment through the communication link of the proxy end, whether the debugging instruction contains a file identifier or not is judged, and if the debugging instruction does not contain the file identifier, the debugging instruction can be sent to the IOT equipment through the communication link of the proxy end.
If the debugging instruction contains the file identifier, the browser client stores the file corresponding to the file identifier to a file storage system of the IOT server, wherein a Uniform Resource Locator (URL) related to the file is generated in the process of storing the file by the file storage system of the IOT server, so that the file can be conveniently acquired subsequently.
The browser client sends a first URL and a debugging instruction generated by storing the file to the IOT equipment through a communication link of the proxy end, the IOT equipment receives the first URL and the debugging instruction, can acquire the file according to the first URL and store the file to the local, and converts the debugging instruction into a target instruction, so that the target instruction can be executed.
For example, for a debug instruction "addnstalljd.apk", which includes a file identifier "jd.apk", a browser client may store a file corresponding to the file identifier "jd.apk" in a file storage system of an IOT server, the browser client sends a first URL generated by storing the file and a debug instruction to a proxy, the proxy determines a communication link accessed by the browser client, the proxy sends the first URL and the debug instruction to an IOT device also accessed to the communication link, the IOT device receives the first URL and the debug instruction sent by the proxy, and the IOT device obtains the file according to the first URL and stores the file locally, converts the debug instruction into a SHELL instruction, and executes the SHELL instruction.
In addition, in the process that the current target object remotely debugs the IOT device at the browser client, if a certain directory of the IOT device is to be accessed, a 'cd' needs to be executed to manually access the directory, which is troublesome, and the current working path is displayed more vividly and not intuitive.
To this end, an embodiment of the present invention provides a visual tree directory, and in particular, after an IOT device accesses a communication link of an agent, the IOT device may obtain a local directory structure, where the local directory structure may be a directory structure of a directory where a target object is currently located, and may be sent to a browser client through the communication link of the agent, and the browser client receives the directory structure, generates a visual tree directory according to the directory structure, and displays the visual tree directory at a target position of a debugging window of the browser client.
For example, after the IOT device accesses the communication link of the agent, the IOT device may obtain the directory structure of the directory where the user is currently located, and send the directory structure to the agent, where the agent determines the communication link accessed by the IOT device, and sends the target mechanism to the browser client that is also accessed to the communication link, and the browser client receives the directory structure, and generates a visual tree-shaped directory based on the directory structure, and displays the visual tree-shaped directory on the left side of the debugging window of the browser client, as shown in fig. 5.
When it is monitored that a target object triggers a preset operation for a target directory node in a visual tree-shaped directory, the browser client adjusts a path to a path corresponding to the target directory node, as shown in fig. 5, meanwhile, the IOT device can acquire a directory structure in the target directory node, and sends the directory structure to the browser client through a communication link of the proxy end, and the browser client refreshes the presented visual tree-shaped directory in real time accordingly. The preset operation may be a click operation, a selection operation, or the like, which is not limited in the embodiment of the present invention.
After the path is adjusted to the path corresponding to the target directory node, the target object may input a debugging instruction at the cursor, and the browser client may receive the debugging instruction input by the target object at this time, and perform remote debugging on the IOT device accordingly.
In addition, the visual tree directory in the embodiment of the invention also provides a file uploading and downloading function.
When it is monitored that a target object drags a local file of a browser client to a target directory node in a visual tree directory, it can be determined that the selected local file needs to be transmitted to the IOT device, at the moment, the browser client stores the local file in a file storage system of an IOT server, the browser client sends a second URL generated by storing the local file to a proxy end, the proxy end determines a communication link accessed by the browser client, the proxy end sends the second URL to the IOT device which is also accessed to the communication link, and the IOT device can receive the second URL, acquire the local file according to the second URL and store the local file.
When the downloading operation of a target object aiming at an opposite-end file under a target directory node in a visual tree directory is triggered, a browser client sends an opposite-end identifier of the opposite-end file to an agent end, the agent end determines a communication link accessed by the browser client, the agent end sends the opposite-end identifier to IOT equipment which is also accessed to the communication link, the IOT equipment can receive the opposite-end identifier, the IOT equipment searches for the corresponding opposite-end file, the opposite-end file is an IOT equipment local file, the IOT equipment stores the opposite-end file to a file storage system of an IOT server end, the IOT equipment sends a third URL generated by storing the opposite-end file to the agent end, the agent end determines the communication link accessed by the IOT equipment, the agent end sends the third URL to the browser client which is also accessed to the communication link, the browser client can receive the third URL and initiate an opposite-end file downloading event, and prompting the user to select a directory in which the file is to be stored, determining a storage directory of the opposite-end file selected by the user by the browser client, acquiring the opposite-end file according to the third URL by the browser client, and storing the opposite-end file in the storage directory selected by the user.
Corresponding to the foregoing method embodiment, an embodiment of the present invention further provides a remote debugging apparatus for IOT devices, as shown in fig. 6, where the apparatus is applied to a browser client, and the apparatus may include: a request sending module 610, a link access module 620 and an instruction sending module 630.
A request sending module 610, configured to determine a debugging request for an IOT device, and send the debugging request to an IOT server, so that the IOT server creates a communication link for the IOT device and the browser client on a proxy according to the debugging request, and sends a link identifier of the communication link to the IOT device and the browser client, where the proxy is located locally at the IOT server;
a link access module 620, configured to access the communication link of the agent end according to the link identifier, where the IOT device accesses the communication link of the agent end according to the link identifier;
the instruction sending module 630 is configured to receive a debug instruction, send the debug instruction to the IOT device through the communication link of the agent end, so that the IOT device receives the debug instruction, converts the debug instruction into a target instruction, and executes the target instruction.
The embodiment of the present invention further provides an electronic device, as shown in fig. 7, which includes a processor 71, a communication interface 72, a memory 73 and a communication bus 74, where the processor 71, the communication interface 72, and the memory 73 complete mutual communication through the communication bus 74,
a memory 73 for storing a computer program;
the processor 71, when executing the program stored in the memory 73, implements the following steps:
determining a debugging request aiming at the IOT equipment, sending the debugging request to an IOT server, so that the IOT server creates a communication link for the IOT equipment and the browser client on an agent side according to the debugging request, and sends a link identification of the communication link to the IOT equipment and the browser client, wherein the agent side is located locally at the IOT server; accessing the communication link of the agent end according to the link identification, wherein the IOT equipment accesses the communication link of the agent end according to the link identification; and receiving a debugging instruction, sending the debugging instruction to the IOT equipment through the communication link of the agent end, so that the IOT equipment receives the debugging instruction, converts the debugging instruction into a target instruction and executes the target instruction.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In another embodiment of the present invention, a storage medium is further provided, where instructions are stored, and when the instructions are executed on a computer, the instructions cause the computer to execute the remote debugging method for the IOT device in any one of the above embodiments.
In yet another embodiment, a computer program product containing instructions is provided, which when run on a computer, causes the computer to perform the method for remote debugging of an IOT device described in any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a storage medium or transmitted from one storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The storage medium may be any available medium that can be accessed by a computer or a data storage device including one or more available media integrated servers, data centers, and the like. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, 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.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (12)

1. A remote debugging system for an IOT device, the system comprising: the system comprises a browser client, an IOT server, an agent and IOT equipment, wherein the agent is located locally at the IOT server;
the browser client determines a debugging request aiming at the IOT equipment and sends the debugging request to the IOT server;
the IOT server side establishes a communication link for the IOT equipment and the browser client side on the agent side according to the debugging request;
the IOT server side sends the link identification of the communication link to the IOT equipment and the browser client side;
the browser client accesses the communication link of the agent end according to the link identification, and the IOT equipment accesses the communication link of the agent end according to the link identification;
the browser client receives a debugging instruction and sends the debugging instruction to the IOT equipment through the communication link of the agent end;
and the IOT equipment receives the debugging instruction, converts the debugging instruction into a target instruction and executes the target instruction.
2. The system of claim 1, further comprising:
the IOT server generates a key for the IOT equipment and the browser client according to the debugging request, and sends the key to the IOT equipment and the browser client;
the sending the debug instruction to the IOT device through the communication link of the agent side includes:
the browser client encrypts the debugging instruction by using the secret key, and sends the encrypted debugging instruction to the IOT equipment through the communication link of the agent end;
the converting the debugging instruction into the target instruction comprises:
and the IOT equipment decrypts the encrypted debugging instruction by using the key and transmits the debugging instruction into an instruction translator to be converted into a target instruction.
3. The system of claim 2, further comprising:
the IOT equipment encrypts an execution result by using the secret key, and sends the encrypted execution result to the browser client through the communication link of the proxy end;
and the browser client receives the encrypted execution result, decrypts the encrypted execution result by using the secret key, and displays the execution result.
4. The system according to claim 1, wherein before the debugging instructions are sent to the IOT device through the communication link of the agent side, the system further comprises:
the browser client judges whether the debugging instruction contains a file identifier or not;
and if the debugging instruction does not contain the file identification, the browser client executes the step of sending the debugging instruction to the IOT equipment through the communication link of the proxy end.
5. The system of claim 4, further comprising:
if the debugging instruction comprises a file identifier, the browser client stores a file corresponding to the file identifier to a file storage system of the IOT server;
the browser client sends a first URL generated by storing the file and the debugging instruction to the IOT equipment through the communication link of the proxy end;
and the IOT equipment receives the debugging instruction and the first URL, acquires the file according to the first URL, stores the file to the local, converts the debugging instruction into a target instruction and executes the target instruction.
6. The system of claim 1, further comprising:
the IOT equipment acquires a local directory structure after accessing the communication link of the agent end and sends the local directory structure to the browser client through the communication link of the agent end;
the browser client receives the directory structure, generates a visual tree directory according to the target structure and displays the visual tree directory at the target position of a debugging window;
when it is monitored that a preset operation of a target object aiming at a target directory node in the visual tree directory is triggered, the browser client adjusts a path to a path corresponding to the target directory node;
the browser client receives a debugging instruction, and the method comprises the following steps:
and after the path is adjusted to the path corresponding to the target directory node, the browser client receives a debugging instruction input by the target object.
7. The system of claim 6, further comprising:
when it is monitored that the target object drags a local file of the browser client to a target directory node in the visual tree directory, the browser client stores the local file to a file storage system of the IOT server;
the browser client sends a second URL generated by storing the local file to the IOT equipment through the communication link of the proxy end;
and the IOT equipment receives the second URL, acquires the local file according to the second URL and stores the local file.
8. The system of claim 6, further comprising:
when it is monitored that the target object triggers a downloading operation of an opposite terminal file under a target directory node in the visual tree directory, the browser client sends an opposite terminal identification of the opposite terminal file to the IOT equipment through the communication link of the agent terminal;
the IOT equipment receives the opposite terminal identification and stores the opposite terminal file corresponding to the opposite terminal identification to a file storage system of the IOT server;
the IOT equipment sends a third URL generated by storing the opposite-end file to the browser client through the communication link of the agent end;
and the browser client determines a storage directory of the opposite-end file, acquires the opposite-end file according to the third URL, and stores the opposite-end file in the storage directory.
9. The system of claim 1, wherein the browser client accessing the communication link of the agent according to the link identifier comprises:
after receiving the link identification, the browser client establishes connection with the agent end and accesses the communication link of the agent end according to the link identification;
the IOT device accesses the communication link of the agent end according to the link identification, and the method comprises the following steps:
after receiving the link identifier, the IOT device establishes connection with the agent terminal and accesses the communication link of the agent terminal according to the link identifier;
the sending the debug instruction to the IOT device through the communication link of the agent side includes:
the browser client sends the debugging instruction to the agent end;
and the agent end determines the communication link accessed by the browser client end and sends the debugging instruction to the IOT equipment accessed to the communication link.
10. A remote debugging method of an IOT device is applied to a browser client, and comprises the following steps:
determining a debugging request aiming at the IOT equipment, sending the debugging request to an IOT server, so that the IOT server creates a communication link for the IOT equipment and the browser client on an agent side according to the debugging request, and sends a link identification of the communication link to the IOT equipment and the browser client, wherein the agent side is located locally at the IOT server;
accessing the communication link of the agent end according to the link identification, wherein the IOT equipment accesses the communication link of the agent end according to the link identification;
and receiving a debugging instruction, sending the debugging instruction to the IOT equipment through the communication link of the agent end, so that the IOT equipment receives the debugging instruction, converts the debugging instruction into a target instruction and executes the target instruction.
11. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps as claimed in claim 10 when executing a program stored in the memory.
12. A storage medium on which a computer program is stored which, when being executed by a processor, carries out the method as claimed in claim 10.
CN202010917295.4A 2020-09-03 2020-09-03 Remote debugging system and method of IOT device, electronic device and storage medium Pending CN112187869A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010917295.4A CN112187869A (en) 2020-09-03 2020-09-03 Remote debugging system and method of IOT device, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010917295.4A CN112187869A (en) 2020-09-03 2020-09-03 Remote debugging system and method of IOT device, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN112187869A true CN112187869A (en) 2021-01-05

Family

ID=73924099

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010917295.4A Pending CN112187869A (en) 2020-09-03 2020-09-03 Remote debugging system and method of IOT device, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN112187869A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114168400A (en) * 2022-02-14 2022-03-11 武汉慧联无限科技有限公司 Method and device for debugging equipment, processing equipment and computer storage medium
CN115208791A (en) * 2022-09-16 2022-10-18 江苏橙智云信息技术有限公司 Method for testing functions of Internet of things equipment

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050050159A1 (en) * 2003-09-03 2005-03-03 Zeev Suraski Remote debugging of web applications
CN104539682A (en) * 2014-12-19 2015-04-22 乐视网信息技术(北京)股份有限公司 Debug method, device, mobile terminal, server and system for mobile webpage
CN107277107A (en) * 2017-05-15 2017-10-20 深信服科技股份有限公司 Using adjustment method, apparatus and system
CN107463499A (en) * 2017-08-08 2017-12-12 百度在线网络技术(北京)有限公司 The long-range connection methods of ADB, device, equipment and storage medium
CN107707598A (en) * 2017-05-25 2018-02-16 语祯物联科技(上海)有限公司 The method and Internet of Things communication equipment of a kind of remote control Internet of Things communication equipment
CN108965312A (en) * 2018-07-30 2018-12-07 深圳高新兴物联科技有限公司 Remote invocation method, device, system and storage medium
CN109002366A (en) * 2018-07-26 2018-12-14 广东蔚海数问大数据科技有限公司 A kind of remote debugging method and device of mobile terminal webpage
CN109117361A (en) * 2018-06-21 2019-01-01 腾讯科技(深圳)有限公司 A kind of remote debugging method of small routine, relevant device and system
CN109861950A (en) * 2017-11-30 2019-06-07 阿里巴巴集团控股有限公司 Equipment remote debugging method, device, equipment and storage medium
CN110413329A (en) * 2019-07-29 2019-11-05 北京安云世纪科技有限公司 IOT equipment remote debugging method, apparatus and system
CN110650202A (en) * 2019-09-26 2020-01-03 支付宝(杭州)信息技术有限公司 Communication interaction method and device and electronic equipment
CN111031005A (en) * 2019-11-22 2020-04-17 上海景域文化传播股份有限公司 Js-based reverse proxy server and reverse proxy method
CN111416867A (en) * 2020-03-25 2020-07-14 上海商米科技集团股份有限公司 Method for processing messages between different devices, server and computer storage medium

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050050159A1 (en) * 2003-09-03 2005-03-03 Zeev Suraski Remote debugging of web applications
CN104539682A (en) * 2014-12-19 2015-04-22 乐视网信息技术(北京)股份有限公司 Debug method, device, mobile terminal, server and system for mobile webpage
CN107277107A (en) * 2017-05-15 2017-10-20 深信服科技股份有限公司 Using adjustment method, apparatus and system
CN107707598A (en) * 2017-05-25 2018-02-16 语祯物联科技(上海)有限公司 The method and Internet of Things communication equipment of a kind of remote control Internet of Things communication equipment
CN107463499A (en) * 2017-08-08 2017-12-12 百度在线网络技术(北京)有限公司 The long-range connection methods of ADB, device, equipment and storage medium
CN109861950A (en) * 2017-11-30 2019-06-07 阿里巴巴集团控股有限公司 Equipment remote debugging method, device, equipment and storage medium
CN109117361A (en) * 2018-06-21 2019-01-01 腾讯科技(深圳)有限公司 A kind of remote debugging method of small routine, relevant device and system
CN109002366A (en) * 2018-07-26 2018-12-14 广东蔚海数问大数据科技有限公司 A kind of remote debugging method and device of mobile terminal webpage
CN108965312A (en) * 2018-07-30 2018-12-07 深圳高新兴物联科技有限公司 Remote invocation method, device, system and storage medium
CN110413329A (en) * 2019-07-29 2019-11-05 北京安云世纪科技有限公司 IOT equipment remote debugging method, apparatus and system
CN110650202A (en) * 2019-09-26 2020-01-03 支付宝(杭州)信息技术有限公司 Communication interaction method and device and electronic equipment
CN111031005A (en) * 2019-11-22 2020-04-17 上海景域文化传播股份有限公司 Js-based reverse proxy server and reverse proxy method
CN111416867A (en) * 2020-03-25 2020-07-14 上海商米科技集团股份有限公司 Method for processing messages between different devices, server and computer storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
李德堂,吕沁,唐文涛,朱铭锴: "现代测试技术", pages: 181 - 182 *
马勇等: "基于云服务器的变电站启动调试全景监控系统", 《电测与仪表》, no. 22 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114168400A (en) * 2022-02-14 2022-03-11 武汉慧联无限科技有限公司 Method and device for debugging equipment, processing equipment and computer storage medium
CN115208791A (en) * 2022-09-16 2022-10-18 江苏橙智云信息技术有限公司 Method for testing functions of Internet of things equipment

Similar Documents

Publication Publication Date Title
KR102120567B1 (en) Monitoring of isolated applications in containers
CN111159614B (en) Webpage resource acquisition method and device
EP3424178A1 (en) Deterministic reproduction of client/server computer state or output sent to one or more client computers
CN108718347B (en) Domain name resolution method, system, device and storage medium
CN107135249B (en) Data downloading method and device
CN104536890A (en) Testing system, method and device
CN111711533B (en) Fault diagnosis method, fault diagnosis device, electronic device and storage medium
CN112187869A (en) Remote debugging system and method of IOT device, electronic device and storage medium
WO2018233379A1 (en) Method and device for obtaining data plaintext, electronic terminal, and readable storage medium
CN108600377B (en) Method, device, terminal and storage medium for suspending file downloading
CN110413329A (en) IOT equipment remote debugging method, apparatus and system
US10775751B2 (en) Automatic generation of regular expression based on log line data
WO2023144272A1 (en) Deriving proxy stability without network inspection
CN108600378B (en) File downloading method, device, terminal and storage medium
CN114416169A (en) Data processing method, medium, device and computing equipment based on micro front end
CN106708717B (en) A kind of exploitation adjustment method and device
CN112565277A (en) Data transmission method, system and electronic equipment
US20170223136A1 (en) Any Web Page Reporting and Capture
CN114915565A (en) Method and system for debugging network
US10216926B2 (en) Isolation of untrusted code in operating system without isolation capability
CN111767178B (en) Physical machine performance test method and device
CN114666322A (en) Breakpoint resume method and device and electronic equipment
CN114116448A (en) Pressure testing method and device of application program, storage medium and computer equipment
KR101251099B1 (en) Method for monitoring a process of remote access and system for monitoring a process of remote access
CN109271310B (en) Development testing method and device for network function of mobile application program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: Jingdong Digital Technology Holding Co.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210105