CN109861950A - Equipment remote debugging method, device, equipment and storage medium - Google Patents

Equipment remote debugging method, device, equipment and storage medium Download PDF

Info

Publication number
CN109861950A
CN109861950A CN201711244463.2A CN201711244463A CN109861950A CN 109861950 A CN109861950 A CN 109861950A CN 201711244463 A CN201711244463 A CN 201711244463A CN 109861950 A CN109861950 A CN 109861950A
Authority
CN
China
Prior art keywords
debugging
ssh
encapsulation
data
request data
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
CN201711244463.2A
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201711244463.2A priority Critical patent/CN109861950A/en
Publication of CN109861950A publication Critical patent/CN109861950A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the present application provides a kind of equipment remote debugging method, device, equipment and storage medium, to improve the debugging efficiency of equipment.The method includes: to establish mapping relations with debugged apparatus;It determines debugging request data, the debugging request data is packaged and are transmitted to the debugged apparatus according to Secure Shell SSH agreement;The debugging response data by the SSH protocol encapsulation is received, the debugging response data of the encapsulation is unsealed and shows.Cross-platform interaction can be achieved, to the remote control and regulation of debugged apparatus, effectively improve debugging efficiency.

Description

Equipment remote debugging method, device, equipment and storage medium
Technical field
This application involves field of computer technology, long-range more particularly to a kind of equipment remote debugging method, a kind of equipment Debugging apparatus, a kind of control equipment, a kind of debugged apparatus and a kind of storage medium.
Background technique
Internet of Things (Internet of things, IoT) is the connected internet of object object, with the rise of Internet of Things, object Networked devices are also more and more diversified.
Various software applications can be run in internet of things equipment, wherein software development initial stage, often there is one in software A little bug are needed constantly to debug and be continued to optimize.But software is needed to be deployed in and be run in IoT equipment to debug, and these IoT are set It is standby to belong to hardware components, and the developer of hardware components and software section is often different, therefore IoT equipment is usually and software Developer is in different regions, causes software developer when debugging to need to equipment position to debug, debugging efficiency Lowly.
Summary of the invention
The embodiment of the present application provides a kind of equipment remote debugging method, to improve the debugging efficiency of equipment.
Correspondingly, the embodiment of the present application also provides a kind of equipment remote testing device, a kind of control equipment, a kind of being adjusted Equipment and a kind of storage medium are tried, to guarantee the realization and application of above system.
To solve the above-mentioned problems, the embodiment of the present application discloses a kind of equipment remote debugging method, comprising: with it is debugged Equipment establishes mapping relations;It determines debugging request data, the debugging request data is sealed according to Secure Shell SSH agreement It fills and is transmitted to the debugged apparatus;The debugging response data by the SSH protocol encapsulation is received, the encapsulation is unsealed Debugging response data is simultaneously shown.
Optionally, described to establish mapping relations with debugged apparatus, comprising: debugged apparatus is selected in Debugging interface, Corresponding matching instruction is sent to the first process;First process inquires the debugged apparatus according to the matching instruction, Establish the mapping relations with the debugged apparatus.
Optionally, the determining debugging request data carry out the debugging request data according to Secure Shell SSH agreement It encapsulates and is transmitted to the debugged apparatus, comprising: debugging request data are determined in Debugging interface, by the debugging request number According to being sent to the second process;Second process is packaged the debugging request data according to SSH agreement, by the tune of encapsulation Examination request data is sent to the first process;First process forwards the debugging request of the encapsulation according to the mapping relations Data give the debugged apparatus.
Optionally, the debugging response data received through the SSH protocol encapsulation, the debugging for unsealing the encapsulation are rung It answers data and shows, comprising: the first process receives the debugging response data of the encapsulation, by the debugging response data of the encapsulation It is sent to the second process;Second process is unsealed according to debugging response data of the SSH agreement to the encapsulation, is obtained pair The debugging response data answered;The debugging response data is sent to Debugging interface by the second process, is opened up in the Debugging interface Show the debugging response data.
Optionally, the debugging request data include: SSH connection request and/or debug command, the debugging response data It include: SSH connection result and/or debugging result.
Optionally, further includes: the second process encrypts the debugging request data by the SSH protocol encapsulation;With/ Or, the debugging response data by the SSH protocol encapsulation is decrypted in the second process.
The embodiment of the present application also provides a kind of equipment remote debugging methods, comprising: receives the tune for passing through SSH protocol encapsulation Request data is tried, is unsealed according to debugging request data of the SSH agreement to the encapsulation;Execute the debugging request that deblocking obtains The respective operations of data generate debugging response data;The debugging response data is packaged and is turned according to the SSH agreement Hair.
Optionally, described to receive the debugging request data for passing through SSH protocol encapsulation, according to SSH agreement to the encapsulation Debugging request data are unsealed, comprising: third process receives the debugging request data for passing through SSH protocol encapsulation, by the envelope The debugging request data of dress are sent to the 4th process;4th process is according to SSH agreement to the debugging request number of the encapsulation According to being unsealed, corresponding debugging request data are obtained.
Optionally, the debugging request data include: SSH connection request and/or debug command, the debugging response data It include: SSH connection result and/or debugging result.
Optionally, the respective operations for executing the debugging request data that deblocking obtains generate debugging response data, packet Include: the 4th process calls SSH protocol service and generates corresponding SSH connection result according to SSH connection request.
Optionally, the respective operations for executing the debugging request data that deblocking obtains generate debugging response data, packet Include: the 4th process executes the corresponding debugging operations of debug command, generates corresponding debugging result.
Optionally, described that the debugging response data is packaged and is forwarded according to the SSH agreement, comprising: the 4th Process is packaged the debugging response data according to SSH agreement, and the debugging response data of encapsulation is transmitted to third process; The third process sends the debugging response data of the encapsulation.
Optionally, further includes: the debugging request data by the SSH protocol encapsulation are decrypted in the 4th process;With/ Or, the 4th process encrypts the debugging response data by the SSH protocol encapsulation.
The embodiment of the present application also provides a kind of equipment remote testing devices, comprising: communication module, for being set with debugged It is standby to establish mapping relations;Forward the debugging request data of encapsulation to the debugged apparatus;And it receives and is assisted by the SSH Discuss the debugging response data of encapsulation;Operation module, for determining debugging request data;And show debugging response data;Agreement Processing module, for being packaged according to Secure Shell SSH agreement to the debugging request data;And the debugging of deblocking encapsulation Response data.
Optionally, the operation module sends corresponding matching instruction for selecting debugged apparatus in Debugging interface To the first process;The communication module is set for inquiring described be debugged according to the matching instruction by first process It is standby, establish the mapping relations with the debugged apparatus.
Optionally, the operation module, for determining debugging request data in Debugging interface, by the debugging request number According to being sent to the second process;The protocol process module, for passing through the second process according to SSH agreement to the debugging request number According to being packaged, the debugging request data of encapsulation are sent to the first process;The communication module, for by described first into Journey forwards the debugging request data of the encapsulation to the debugged apparatus according to the mapping relations.
Optionally, the communication module will be described for receiving the debugging response data of the encapsulation by the first process The debugging response data of encapsulation is sent to the second process;The protocol process module, for passing through the second process according to the SSH Agreement unseals the debugging response data of the encapsulation, obtains corresponding debugging response data;Second process is by the tune Examination response data is sent to Debugging interface;The operation module, for showing the debugging number of responses in the Debugging interface According to.
Optionally, the debugging request data include: SSH connection request and/or debug command, the debugging response data It include: SSH connection result and/or debugging result.
Optionally, the protocol process module is also used to through the second process to the debugging by the SSH protocol encapsulation Request data is encrypted;And/or the debugging response data by the SSH protocol encapsulation is solved by the second process It is close.
The embodiment of the present application also provides a kind of equipment remote testing devices, comprising: proxy module passes through for receiving The debugging request data of SSH protocol encapsulation are unsealed according to debugging request data of the SSH agreement to the encapsulation;And it presses The debugging response data is packaged and is forwarded according to the SSH agreement;Protocol service module is obtained for executing deblocking The respective operations of debugging request data generate debugging response data.
Optionally, the proxy module, for receiving the debugging request number for passing through SSH protocol encapsulation by third process According to the debugging request data of the encapsulation are sent to the 4th process;The protocol service module, for by the described 4th into Journey is unsealed according to debugging request data of the SSH agreement to the encapsulation, obtains corresponding debugging request data.
Optionally, the debugging request data include: SSH connection request and/or debug command, the debugging response data It include: SSH connection result and/or debugging result.
Optionally, the protocol service module, for, according to SSH connection request, calling SSH agreement clothes by the 4th process It is engaged in and generates corresponding SSH connection result.
Optionally, the protocol service module, it is raw for executing the corresponding debugging operations of debug command by the 4th process At corresponding debugging result.
Optionally, the protocol service module, for passing through the 4th process according to SSH agreement to the debugging response data It is packaged, the debugging response data of encapsulation is transmitted to third process;The proxy module, for passing through the third process Send the debugging response data of the encapsulation.
Optionally, the proxy module is also used to through the 4th process to the debugging request by the SSH protocol encapsulation Data are decrypted;And/or the debugging response data by the SSH protocol encapsulation is encrypted by the 4th process.
The embodiment of the present application also provides a kind of control equipment, comprising: one or more processors;Refer to being stored thereon with One or more machine readable medias of order, when being executed by one or more of processors, so that the control equipment is held Equipment remote debugging method of the row as described in one or more in the embodiment of the present application.
The embodiment of the present application also provides one or more machine readable medias, are stored thereon with instruction, when by one or When multiple processors execute, so that control equipment executes the equipment remote debugging as described in one or more in the embodiment of the present application Method.
The embodiment of the present application also provides a kind of debugged apparatus, comprising: one or more processors;Be stored thereon with One or more machine readable medias of instruction, when being executed by one or more of processors, so that described be debugged sets The standby equipment remote debugging method executed as described in one or more in the embodiment of the present application.
The embodiment of the present application also provides one or more machine readable medias, are stored thereon with instruction, when by one or When multiple processors execute, so that the equipment that debugged apparatus executes as described in one or more in the embodiment of the present application is remotely adjusted Method for testing.
Compared with prior art, the embodiment of the present application includes the following advantages:
In the embodiment of the present application, can dynamically establish control equipment and debugged apparatus mapping relations, realize across The interaction of platform, then controlling equipment can be adjusted using debugged apparatus is transmitted to after SSH protocol encapsulation debugging request data Examination equipment solution, which is honored as a queen, to be executed the corresponding processing operation of debugging request data and returns after debugging response data is used SSH protocol encapsulation It returns, then controls equipment and unseal the debugging response data of the encapsulation and show, to realize the long-range tune to debugged apparatus Control, effectively improves debugging efficiency.
Detailed description of the invention
Fig. 1 is a kind of schematic diagram of remote debugging system of the embodiment of the present application;
Fig. 2 is the interaction schematic diagram of the embodiment of the present application remote device debugging;
Fig. 3 is the step flow chart that equipment is controlled in a kind of remote equipment adjustment method embodiment of the application;
Fig. 4 is the step flow chart of debugged apparatus in a kind of remote equipment adjustment method embodiment of the application;
Fig. 5 is the step flow chart that equipment is controlled in the application another kind remote equipment adjustment method embodiment;
Fig. 6 is the step flow chart of debugged apparatus in the application another kind remote equipment adjustment method embodiment;
Fig. 7 is the structural block diagram of one remote equipment debugging apparatus embodiment of the application;
Fig. 8 is the structural block diagram of another remote equipment debugging apparatus embodiment of the application;
Fig. 9 is the hardware structural diagram for the electronic equipment that one embodiment of the application provides;
Figure 10 is the hardware structural diagram for the electronic equipment that another embodiment of the application provides.
Specific embodiment
In order to make the above objects, features, and advantages of the present application more apparent, with reference to the accompanying drawing and it is specific real Applying mode, the present application will be further described in detail.
The embodiment of the present application provides a kind of equipment remote debugging method and device, can be based on safety by control equipment Shell (Secure Shell, SSH) agreement debugs debugged apparatus, without commissioning staff on debugged apparatus Operation improves debugging efficiency.Wherein, SSH agreement is by Internet engineering task force (The Internet Engineering Task Force, IETF) network group (Network Working Group) formulated, SSH agreement be establish in application layer On the basis of security protocol, be it is a kind of more reliable, aim at telnet session and other network services provide safety Agreement.
Shown in remote debugging system referring to Fig.1, which includes: control equipment 10 and debugged apparatus 20, control equipment 10 is connected with debugged apparatus 20 by internet, wherein control equipment 10 is debugging method, apparatus, for remote Journey debugs debugged apparatus, can be the various electronic equipments such as desktop computer, laptop;The debugged apparatus 20 be debugged equipment, including IoT equipment, as kitchen appliance equipment, home equipment, security device and apply health care, The IoT equipment of the various industries such as transport, food.It may include that one or more is debugged in the present embodiment, in remote debugging system Equipment, debugged apparatus 201- debugged apparatus 20n, n is positive integer as shown in figure 1.In control equipment 10 and debugged apparatus 20 In all have the processing module based on SSH agreement, to be able to carry out the corresponding encapsulation of SSH agreement, unsealing operation.
Debugged apparatus 20x can be selected from debugged apparatus 201- debugged apparatus 20n to control equipment 10, then Mapping relations dynamically are established with the debugged apparatus 20x of selection, control equipment can be established based on the mapping relations and are debugged The incidence relation of equipment, to carry out the communication of tune-up data.Control equipment 10 can determine debugging request data, the debugging request Data are the relevant data of debugging side execution debugging, and the debugging request data include: SSH connection request and/or debug command, Wherein, SSH connection request is for establishing SSH service, and debug command is for executing debugging.Then according to SSH agreement to the tune Examination request data is packaged, and the debugging request data of corresponding encapsulation is obtained, by the debugging request data forwarding of encapsulation to selection Debugged apparatus.Wherein, debug command can be shell-command, and the CPU benefit of system modules is such as checked by top order With rate, check whether network interface is normal by ifconfig, DNS (Domain Name System, domain name are checked by ping order System) whether service normal, check whether RTC (Real-Time Clock, the real-time clock) time is normal etc. by date.
It, can be based on SSH agreement to this after the debugged apparatus can receive the debugging request data by SSH protocol encapsulation The debugging request data of encapsulation carry out deblocking processing, obtain corresponding debugging request data, then execute the debugging request data Corresponding operation such as calls SSH service according to SSH connection request, for another example executes corresponding debugging operations etc. according to debug command, Debugging response data is generated based on corresponding operation, then the debugging response data can be packaged according to SSH agreement, will be sealed The debugging response data of dress is sent to control equipment.
After control equipment receives the debugging response data by the SSH protocol encapsulation, according to SSH agreement to encapsulation Debugging response data is unsealed, and obtains debugging response data accordingly, the debugging response data includes: SSH connection result And/or debugging result, it is then based on the debugging response data and shows that corresponding debugging shows information, such as connect and whether succeed, Debugging mode, debugging result etc..
Encapsulation, deblocking of the embodiment of the present application based on SSH protocol realization to tune-up data, to realize remote debugging.From And be based on SSH agreement, control equipment can Remote Selection need debugged apparatus and debugged, effectively raise debugging effect Rate.
Wherein, control equipment includes: Debugging interface, the first process and the second process.Debugging interface is that user visualizes boundary The displaying of front end page is responsible in face, as shown that online equipment list, user select debugged apparatus and various debugging responses As a result etc., which can be accomplished in several ways, such as by UI, HTML, realize Debugging interface for example, by using HTML, Then this can be constructed based on B/S (Browser/Server, browser/server) framework, be can satisfy cross-platform demand, be deployed to Originally it is substantially reduced, while can realize that dynamic updates mapping table by proprietary protocol.Wherein, B/S framework is that WEB (wide area network) is emerging The core that system function is realized is focused on server, is simplified by a kind of network structure mode after rising, this mode Exploitation, maintenance and the use of system.It can be with service end communication as long as a browser is installed in client computer.First process (SSH Dispatcher) it is a kind of server-side process, is responsible for the online facility information of maintenance, the mapping relations of user and equipment, according to reflecting It penetrates relationship and carries out message forwarding, such as the first process is the server processes based on JAVA.Second process (WebSSH) is also one Kind of server-side process is responsible for the input package by front end page into SSH agreement, and by the SSH packet parsing Cheng Ming from equipment Text is capable of providing experience identical with local shell, supports the functions such as coloring and TAB auto-complete.Such as second process be base In the server-side process of Node.js.
Debugged apparatus includes third process and the 4th process, wherein third process (SSHD Agent) be operate in by The agent process at commissioning device end is responsible for maintenance and is connect with the first process websocket of control equipment, with the 4th process Raw tcp connection, and equipment essential information can be reported to cloud, debugged apparatus is selected for user.4th process (SSHD) For the SSH protocol server increased income on linux, to be able to carry out shell-command after being connected to the SSH protocol server To be debugged.
Therefore the framework based on above-mentioned debugged apparatus and control equipment, can be performed interactive process as shown in Figure 2:
Step 202, the first process declaration equipment of the third process of debugged apparatus to control equipment is online.To characterize The debugged apparatus can operate, and be capable of providing remote adjusting functid.
Step 204, it controls selection in the Debugging interface of equipment and needs the debugged apparatus debugged, then send matching instruction To the first process.Online debugged apparatus can be shown on Debugging interface, thus what user can select to be debugged in interface Debugged apparatus generates corresponding matching instruction to the first process based on selection instruction.
Step 206, the first process inquires the debugged apparatus according to the matching instruction, establishes control equipment and the quilt The mapping relations of commissioning device.Wherein, debugged apparatus and control equipment are each provided with public network port, can based on the mapping relations The relationship of two public network ports is established, so as to just determine that the interaction for the SSH message debugged, the debugging including encapsulation are asked Seek the debugging response data of data and encapsulation.
Step 208, SSH connection request is determined in Debugging interface, and the SSH connection request is sent to the second process. After mapping relations foundation, user can operate in Debugging interface, to initiate the SSH connection request of SSH connection.
Step 210, second process is packaged the SSH connection request according to SSH agreement, by the SSH of encapsulation Connection request is sent to the first process.
Step 212, first process forwards the SSH connection request of the encapsulation to described according to the mapping relations The third process of debugged apparatus.
Step 214, third process receives the SSH connection request for passing through SSH protocol encapsulation, by the SSH connection of the encapsulation Request is sent to the 4th process.
Step 216, the 4th process is unsealed according to SSH connection request of the SSH agreement to the encapsulation, is obtained pair The SSH connection request answered.
Step 218, the 4th process calls SSH protocol service and generates corresponding SSH connection knot according to SSH connection request Fruit.
Step 220, the 4th process is packaged the SSH connection result according to SSH agreement, by the SSH connection of encapsulation As a result it is transmitted to third process.
Step 222, the third process sends first process of the SSH connection result to control equipment of the encapsulation.
Step 224, the SSH connection result of encapsulation is sent to the second process by the first process.
Step 226, the second process is unsealed according to SSH connection result of the SSH agreement to encapsulation, by SSH connection result It is sent to Debugging interface.
Step 228, Debugging interface is shown SSH connection result.
Step 230, debug command is determined in Debugging interface, and the debug command is sent to the second process.Connect in SSH After being connected into function, user can operate the corresponding Shell order of selection in Debugging interface or key in corresponding Shell order, such as cat Order, netstat order etc..Wherein, file content can be shown based on cat order, can shows that tcp/udp takes based on netstat Business state.
Step 232, second process is packaged the debug command according to SSH agreement, and the debugging of encapsulation is ordered Order is sent to the first process.
Step 234, first process forwards the debug command of the encapsulation to be adjusted to described according to the mapping relations Try the third process of equipment.
Step 236, third process receives the debug command for passing through SSH protocol encapsulation, and the debug command of the encapsulation is sent out Give the 4th process.
Step 238, the 4th process is unsealed according to debug command of the SSH agreement to the encapsulation, is corresponded to Debug command.
Step 240, the 4th process executes the corresponding debugging operations of debug command, generates corresponding debugging result.Such as it is based on Cat order determines that corresponding file content shows file content, can be inquired based on netstat and show tcp/udp service state Deng.
Step 242, the 4th process is packaged the debugging result according to SSH agreement, and the debugging result of encapsulation is turned Issue third process.
Step 244, the third process sends first process of the debugging result to control equipment of the encapsulation.
Step 246, the debugging result of encapsulation is sent to the second process by the first process.
Step 248, the second process is unsealed according to debugging result of the SSH agreement to encapsulation, and debugging result is sent to Debugging interface.
Step 250, Debugging interface is shown debugging result.
In the embodiment of the present application, controlling the 4th process in equipment in the second process and debugged apparatus can be performed SSH report The encapsulation and deblocking of text can also carry out encryption and decryption processing to SSH message in this process.That is the second process to pass through the SSH The debugging request data of protocol encapsulation are encrypted;And/or second process responded to by the debugging of the SSH protocol encapsulation Data are decrypted.The debugging request data by the SSH protocol encapsulation are decrypted in 4th process;And/or the 4th into Journey encrypts the debugging response data by the SSH protocol encapsulation.
Above-mentioned encryption and decryption can be realized by various encryption and decryption modes, such as pass through the modes such as symmetric cryptography, asymmetric encryption It realizes.By taking asymmetric encryption mode as an example, rsa encryption can be carried out according to preset public key (key) SSH message to be sent, RSA decryption is carried out by private key (secret) again after receiving SSH message, wherein corresponding card can be distributed in debugged apparatus Book, storage key corresponding with certificate includes public key and private key in control equipment.To realize by the proprietary protocol of encryption User's dynamic select can debugged apparatus, substantially improve debugging experience.
Wherein, various parameters can be carried in SSH message, such as carries type of message, service type, data in message header Length, message id etc., the service type can record the port of SSH service, the service such as port, remote desktop service of HTTP service Information.To determine Correspondent Node based on message header and realize data interaction.Above-mentioned interactive process can be realized based on various services Connection interaction, such as SSH connection, HTTP connection, remote desktop service.
In one example of the application, above-mentioned steps 204,208,226 can based on HTTP connection realize, other Debugging interfaces with Interaction between second process, the second process and the first process, the first process and third process is realized by websocket to be interacted, Based on RAW TCP interaction between third process and the 4th process.
To be based on SSH agreement rather than conventional debugger agreement, not only supports remote debugging, can also provide more complicated Shell-command is supported, the debugging demand of developer is utmostly met.Cross-platform deployment is realized based on B/S framework.
The above process does not use periodic data to report, but the mode of real-time update, it is ensured that debugging result is accurately shown To debugging side.At debugged apparatus end, the included SSHD of system is relied only on, without newly-increased gdb server, windbg server Debugging server can be supported to configure poor embedded Linux equipment, greatly reduce transplanting cost.
Referring to Fig. 3, the step process that equipment side is controlled in a kind of equipment remote debugging method embodiment of the application is shown Figure, specifically comprises the following steps:
Step 302, mapping relations are established with debugged apparatus.
Step 304, debugging request data are determined, the debugging request data are packaged and are forwarded according to SSH agreement To the debugged apparatus.
Step 306, the debugging response data by the SSH protocol encapsulation is received, the debugging response of the encapsulation is unsealed Data are simultaneously shown.
Control equipment can select the equipment debugged of needs from multiple debugged apparatus, then with the debugged apparatus of selection Mapping relations are established, to realize the mapping of port between control equipment and debugged apparatus, realize that data between the two pass It is defeated.Then remote equipment can determine that debugging request data, the debugging request data include: SSH connection request and/or debugging life It enables.Then the debugging request data are packaged according to SSH agreement, obtain the debugging request data of corresponding encapsulation, will seals Debugged apparatus of the debugging request data forwarding of dress to selection.
After control equipment receives the debugging response data by the SSH protocol encapsulation, according to SSH agreement to encapsulation Debugging response data is unsealed, and is obtained debugging response data accordingly, is then based on the debugging response data and shows accordingly Debugging shows information, such as connect whether successful, debugging mode, debugging result etc..
Referring to Fig. 4, the step of showing debugged apparatus side in a kind of equipment remote debugging method embodiment of the application stream Cheng Tu specifically comprises the following steps:
Step 402, the debugging request data for passing through SSH protocol encapsulation, the debugging according to SSH agreement to the encapsulation are received Request data is unsealed.
Step 404, the respective operations for the debugging request data that deblocking obtains are executed, debugging response data is generated.
Step 406, the debugging response data is packaged and is forwarded according to the SSH agreement.
It, can be based on SSH agreement to this after the debugged apparatus can receive the debugging request data by SSH protocol encapsulation The debugging request data of encapsulation carry out deblocking processing, obtain corresponding debugging request data, then execute the debugging request data Corresponding operation, such as calls SSH service according to SSH connection request, executes corresponding debugging operations etc. according to debug command, is based on Corresponding operation generates debugging response data, then can be packaged according to SSH agreement to the debugging response data, by encapsulation Debugging response data is sent to control equipment.
To sum up, the mapping relations that can dynamically establish control equipment and debugged apparatus, realize cross-platform interaction, so Control equipment can be using debugged apparatus be transmitted to after SSH protocol encapsulation debugging request data afterwards, and debugged apparatus solution is honored as a queen It executes the corresponding processing operation of debugging request data and by debugging response data using returning after SSH protocol encapsulation, then controls Equipment unseals the debugging response data of the encapsulation and shows, to realize to the remote control and regulation of debugged apparatus, effectively mentions High adjustment efficiency.
The above process can be realized by the interaction of control equipment and debugged apparatus in the embodiment of the present application, without third The agent equipment forwarding of side, is further reduced data interaction, improves data efficiency.And it being capable of real-time Transmission debugging request data With debugging response data, the authenticity of debugging is improved.
Referring to Fig. 5, the step of equipment side is controlled in the application another kind equipment remote debugging method embodiment stream is shown Cheng Tu specifically comprises the following steps:
Step 502, it controls selection in the Debugging interface of equipment and needs the debugged apparatus debugged, then send matching instruction To the first process.
Online debugged apparatus can be shown on Debugging interface, wherein it is storable in line list of devices in control equipment, Online debugged apparatus is shown based on the online equipment list, the debugged apparatus that then user can select in interface, Corresponding matching instruction is generated to the first process based on selection instruction.
Step 504, the first process inquires the debugged apparatus according to the matching instruction, establishes control equipment and the quilt The mapping relations of commissioning device.
First process determines required debugged apparatus according to the matching instruction, then establishes the control equipment and is debugged The mapping relations of equipment, wherein debugged apparatus and control equipment are each provided with public network port, can be established based on the mapping relations The relationship of two public network ports, so as to correctly carry out the interaction of SSH message.In the embodiment of the present application, debugging side and by The mapping relations of debugging side be it is revocable, by the displaying of online equipment list and the selection of user, reach dynamic adjustment and disappear The purpose of mapping is ceased, flexibility is higher.
Step 506, SSH connection request is determined in Debugging interface, and the SSH connection request is sent to the second process.
After control equipment and the mapping relations of the debugged apparatus are established, user can operate in Debugging interface, thus Initiate the SSH connection request of SSH connection.The SSH connection request is connect for establishing with the SSH of debugged apparatus, so that control Equipment can call corresponding SSH service to interact with control equipment.
Step 508, second process is packaged the SSH connection request according to SSH agreement, and to encapsulation SSH connection request is encrypted, and the SSH connection request of encapsulation is then sent to the first process.
Second process is packaged the SSH connection request according to SSH agreement, and according to preset Encryption Algorithm pair The SSH connection request of encapsulation is encrypted, and is encrypted when for example, by using asymmetric encryption by public key, then by the envelope The SSH connection request of dress is sent to the first process.
Step 510, first process forwards the SSH connection request of the encapsulation to described according to the mapping relations The third process of debugged apparatus.
After first process receives the SSH connection request of the encapsulation, the end of debugged apparatus can be determined according to mapping relations Mouthful, the SSH connection request of the encapsulation is then forwarded to the port, i.e., the SSH connection request of the encapsulation is transmitted to the quilt The third process of commissioning device.
Step 512, the SSH connection result of encapsulation is sent to the second process by the first process.
Debugged apparatus execute can be transmitted after corresponding processing the SSH connection result of encapsulation to control equipment first into Journey, then the SSH connection result of encapsulation is sent to the second process by the first process.
Step 514, after the SSH connection result of encapsulation is decrypted in the second process, according to SSH agreement to the SSH of encapsulation Connection result is unsealed, and SSH connection result is sent to Debugging interface.
Second process is decrypted according to SSH connection result of the SSH agreement to encapsulation, manner of decryption and cipher mode pair It answers, such as can be decrypted based on private key when using asymmetric encryption, then the SSH connection result of decryption post package is carried out Deblocking, obtains SSH connection result, then SSH connection result is sent to Debugging interface.
Step 516, Debugging interface is shown SSH connection result.
Debugging interface determines corresponding displaying information according to SSH connection result, then shows that corresponding SSH connects in interface Connect as a result, such as success, unsuccessfully as a result, and corresponding prompt information etc..It may also include the information of debugged apparatus, such as adjusted Try the parameters such as the model of equipment.
Step 518, debug command is determined in Debugging interface, and the debug command is sent to the second process.
After SSH successful connection, Debugging interface can provide the input debug command i.e. operation box of shell-command, can also mention The control etc. of selective shell-command, so that user can operate the corresponding shell-command of selection in Debugging interface or key in phase The shell-command answered, such as cat order, netstat order.Wherein, file content can be shown based on cat order, be based on Netstat can show tcp/udp service state.
Step 520, second process is packaged the debug command according to SSH agreement, and the debugging to encapsulation Order is encrypted, and the debug command of encapsulation is then sent to the first process.
Second process is packaged the debug command according to SSH agreement, and according to Encryption Algorithm to the tune of encapsulation After examination order is encrypted, the debug command of encapsulation is sent to the first process.
Step 522, first process forwards the debug command of the encapsulation to be adjusted to described according to the mapping relations Try the third process of equipment.
First process inquiry mapping relations determine the port of debugged apparatus, then forward the debug command of the encapsulation to The third process of the debugged apparatus.
Step 524, the debugging result of encapsulation is sent to the second process by the first process.
First process can receive the debugging result of encapsulation from third process, and the debugging result of encapsulation is then sent to second Process.
Step 526, after the second process is to the decryption of the debugging result of encapsulation, according to SSH agreement to the debugging result of encapsulation into Row deblocking, is sent to Debugging interface for debugging result.
Second process is decrypted according to debugging result of the decryption method to encapsulation, then according to SSH agreement to encapsulation Debugging result is unsealed, and obtains that debugging result is sent to Debugging interface accordingly.
Step 528, Debugging interface is shown debugging result.
Debugging interface is shown debugging result, and the debugging result based on cat order can show file content, is based on The debugging result of netstat can show tcp/udp service state etc..
To which equipment output is shown to front end page in real time based on websocket long connection and SSH agreement, rather than Periodic refreshing data, it can be ensured that the accuracy of entire debugging result.
Referring to Fig. 6, the step of showing debugged apparatus side in the application another kind equipment remote debugging method embodiment Flow chart specifically comprises the following steps:
Step 602, the first process declaration equipment of the third process of debugged apparatus to control equipment is online.
After debugged apparatus starting, third process can declare that equipment is online to the first process of control equipment, on sending The data such as report from a liner text, control equipment receive online message and confirm debugged apparatus in the heart, to characterize the debugged apparatus It can operate, be capable of providing remote adjusting functid.
Step 604, third process receives the SSH connection request for passing through SSH protocol encapsulation, by the SSH connection of the encapsulation Request is sent to the 4th process.
When debugging to the debugged apparatus, third process receives the SSH connection request for passing through SSH protocol encapsulation, will The SSH connection request of the encapsulation is sent to the 4th process.
Step 606, after the 4th process is to the SSH connection request decryption of encapsulation, according to SSH agreement to the encapsulation SSH connection request is unsealed, and corresponding SSH connection request is obtained.
4th process is decrypted according to SSH connection request of the decipherment algorithm to encapsulation, then according to SSH agreement pair The SSH connection request of the encapsulation is unsealed, and corresponding SSH connection request is obtained.
Step 608, the 4th process calls SSH protocol service and generates corresponding SSH connection knot according to SSH connection request Fruit.
4th process may customize the remote call service of SSH according to SSH connection request, in being invoked in linux The SSH protocol service set produces the SSH connection result of successful connection after calling successfully, accordingly generates if malloc failure malloc The SSH connection result of connection failure.
Step 610, the 4th process is packaged the SSH connection result according to SSH agreement, and connects to the SSH of encapsulation Binding fruit is encrypted, and the SSH connection result of encapsulation is then transmitted to third process.
Step 612, the third process sends first process of the SSH connection result to control equipment of the encapsulation.
Step 614, third process receives the debug command for passing through SSH protocol encapsulation, and the debug command of the encapsulation is sent out Give the 4th process.
After successful connection, third process also can receive the debug command by SSH protocol encapsulation, then by the encapsulation Debug command be sent to the 4th process.
Step 616, after the 4th process is to the debug command decryption of encapsulation, according to SSH agreement to the tune of the encapsulation Examination order is unsealed, and corresponding debug command is obtained.
Step 618, the 4th process executes the corresponding debugging operations of debug command, generates corresponding debugging result.
4th process executes the corresponding debugging operations of debug command, and specific debugging operations are determined according to debug command, such as adjusts Examination order is cat order, netstat order etc., then can be performed and accordingly checks that file content, tcp/udp service state etc. are grasped Make, regenerates corresponding debugging result.
Step 620, the 4th process is packaged the debugging result according to SSH agreement, and to the debugging result of encapsulation It is encrypted, the debugging result of encapsulation is then transmitted to third process.
Step 622, the third process sends first process of the debugging result to control equipment of the encapsulation.
To realize remote debugging of the control equipment to debugged apparatus, it is based on SSH agreement and linux, not only can be carried out Gdb debugging, moreover it is possible to obtain more multi-system information using shell, improve debugging efficiency.SSH agreement can support kinds of platform, therefore Control equipment can realize cross-platform debugging.
In some remote debugging schemes of the prior art, by the way of debugging client and debugging services end, but adjust Examination client and debugging services end are required to connect third-party pass-through proxy execution by acting on behalf of, that is, three kinds of hardware is needed to set Multilayer acts on behalf of transfer between standby, deployment trouble and can not accomplish cross-platform;And the application is in debugged apparatus and control equipment Between realize, without multi-Agent transfer and can realize cross-platform remote debugging.Above-mentioned this debugging plan also relies on tune The type (gdb server/windbg server) of server is tried, debugging function is single;And the embodiment of the present application is assisted based on SSH View, can realize various debugging by shell.And above-mentioned this debugging plan debugging side and the mapping relations for being debugged side are solid Fixed, flexibility is poor, does not support multi-user to debug in real time;And the long-range debugged apparatus of the embodiment of the present application, quilt may be selected Commissioning device dynamic establishes mapping relations, to realize debugging in real time.
Although there are also some schemes to be based on SSH protocol realization in the prior art, it is dependent on SSH reverse proxy and wants Administrator (root) permission is sought, and can retain SSHD in the configuration of most of Embedded Linux Systems and cut SSH client Fall, poor universality;The embodiment of the present application is realized based on tcp socket, is supported without administrator right, is reduced risk and is improved Versatility.And the program is that the debugging result of periodically acquisition equipment end is output to server end, there is excessive, the debugging that is delayed As a result not exclusively true problem;And the embodiment of the present application can dynamically establish mapping relations, realize debugging in real time, improve test knot The authenticity of fruit.
It should be noted that for simple description, therefore, it is stated as a series of action groups for embodiment of the method It closes, but those skilled in the art should understand that, the embodiment of the present application is not limited by the described action sequence, because according to According to the embodiment of the present application, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art also should Know, the embodiments described in the specification are all preferred embodiments, and related movement not necessarily the application is implemented Necessary to example.
On the basis of the above embodiments, the present embodiment additionally provides a kind of equipment remote testing device, is applied to control Equipment, the control equipment can remotely debug debugged apparatus.
Referring to Fig. 7, a kind of structural block diagram of equipment remote testing device embodiment of the application is shown, can specifically include Following module:
Communication module 702, for establishing mapping relations with debugged apparatus;Forward the debugging request data of encapsulation to described Debugged apparatus;And the debugging response data that reception passes through the SSH protocol encapsulation.
Operation module 704, for determining debugging request data;And show debugging response data.
Protocol process module 706, for being packaged according to Secure Shell SSH agreement to the debugging request data;With And the debugging response data of deblocking encapsulation.
In the embodiment of the present application, the communication module 702 can with above-mentioned corresponding first process, operation module 704 can with it is above-mentioned Debugging interface, protocol process module 706 can be corresponding with above-mentioned second process.
Wherein, in an alternative embodiment, the operation module is sent out for selecting debugged apparatus in Debugging interface Send corresponding matching instruction to the first process;The communication module is used for through first process according to the matching instruction The debugged apparatus is inquired, the mapping relations with the debugged apparatus are established.
The operation module sends the debugging request data for determining debugging request data in Debugging interface To the second process;The protocol process module, for being carried out according to SSH agreement to the debugging request data by the second process The debugging request data of encapsulation are sent to the first process by encapsulation;The communication module, for passing through the first process foundation The mapping relations forward the debugging request data of the encapsulation to the debugged apparatus.
The communication module, for receiving the debugging response data of the encapsulation by the first process, by the encapsulation Debugging response data is sent to the second process;The protocol process module, for passing through the second process according to the SSH agreement pair The debugging response data of the encapsulation is unsealed, and corresponding debugging response data is obtained;Second process responds the debugging Data are sent to Debugging interface;The operation module, for showing the debugging response data in the Debugging interface.
Wherein, the debugging request data include: SSH connection request and/or debug command, the debugging response data packet It includes: SSH connection result and/or debugging result.
The protocol process module is also used to through the second process to the debugging request number by the SSH protocol encapsulation According to being encrypted;And/or the debugging response data by the SSH protocol encapsulation is decrypted by the second process.
On the basis of the above embodiments, the present embodiment additionally provides a kind of equipment remote testing device, applied to being adjusted Equipment is tried, which can be debugged based on the control of remote equipment.
Referring to Fig. 8, the structural block diagram of the application another kind equipment remote testing device embodiment is shown, specifically can wrap Include following module:
Proxy module 802, for receiving the debugging request data for passing through SSH protocol encapsulation, according to SSH agreement to the envelope The debugging request data of dress are unsealed;And the debugging response data is packaged and is turned according to the SSH agreement Hair.
Protocol service module 804 generates debugging response for executing the respective operations for the debugging request data that deblocking obtains Data.
Wherein, the proxy module 802 is corresponding with above-mentioned third process, the protocol service module 804 and the above-mentioned 4th Process is corresponding.
The proxy module will be described for receiving the debugging request data for passing through SSH protocol encapsulation by third process The debugging request data of encapsulation are sent to the 4th process;The protocol service module is used for through the 4th process according to SSH Agreement unseals the debugging request data of the encapsulation, obtains corresponding debugging request data.
SSH connection request and/or debug command, the debugging response data includes: SSH connection result and/or debugging knot Fruit.
In one example, the protocol service module, for, according to SSH connection request, calling SSH association by the 4th process View services and generates corresponding SSH connection result.
In another example, the protocol service module, for executing the corresponding debugging of debug command by the 4th process Operation, generates corresponding debugging result.
The protocol service module, for being sealed according to SSH agreement to the debugging response data by the 4th process Dress, is transmitted to third process for the debugging response data of encapsulation;The proxy module, for sending institute by the third process State the debugging response data of encapsulation.
The proxy module, be also used to by the 4th process to the debugging request data by the SSH protocol encapsulation into Row decryption;And/or the debugging response data by the SSH protocol encapsulation is encrypted by the 4th process.
The proxy module is also used to send online message to the first process of control equipment, to declare that equipment is online.
To sum up, the mapping relations that can dynamically establish control equipment and debugged apparatus, realize cross-platform interaction, so Control equipment can be using debugged apparatus be transmitted to after SSH protocol encapsulation debugging request data afterwards, and debugged apparatus solution is honored as a queen It executes the corresponding processing operation of debugging request data and by debugging response data using returning after SSH protocol encapsulation, then controls Equipment unseals the debugging response data of the encapsulation and shows, to realize to the remote control and regulation of debugged apparatus, effectively mentions High adjustment efficiency.
The above process can be realized by the interaction of control equipment and debugged apparatus in the embodiment of the present application, without third The agent equipment forwarding of side, is further reduced data interaction, improves data efficiency.And it being capable of real-time Transmission debugging request data With debugging response data, the authenticity of debugging is improved.
Based on SSH agreement rather than conventional debugger agreement, not only support remote debugging, more complicated shell can be also provided Order is supported, the debugging demand of developer is utmostly met.Cross-platform deployment is realized based on B/S framework.
The above process does not use periodic data to report, but the mode of real-time update, it is ensured that debugging result is accurately shown To debugging side.At debugged apparatus end, the included SSHD of system is relied only on, without newly-increased gdb server, windbg server Debugging server can be supported to configure poor embedded Linux equipment, greatly reduce transplanting cost.
It realizes remote debugging of the control equipment to debugged apparatus, is based on SSH agreement and linux, not only can be carried out gdb tune Examination, moreover it is possible to obtain more multi-system information using shell, improve debugging efficiency.SSH agreement can support kinds of platform, therefore control Equipment can realize cross-platform debugging.
In some remote debugging schemes of the prior art, by the way of debugging client and debugging services end, but adjust Examination client and debugging services end are required to connect third-party pass-through proxy execution by acting on behalf of, that is, three kinds of hardware is needed to set Multilayer acts on behalf of transfer between standby, deployment trouble and can not accomplish cross-platform;And the application is in debugged apparatus and control equipment Between realize, without multi-Agent transfer and can realize cross-platform remote debugging.Above-mentioned this debugging plan also relies on tune The type (gdb server/windbg server) of server is tried, debugging function is single;And the embodiment of the present application is assisted based on SSH View, can realize various debugging by shell.And above-mentioned this debugging plan debugging side and the mapping relations for being debugged side are solid Fixed, flexibility is poor, does not support multi-user to debug in real time;And the long-range debugged apparatus of the embodiment of the present application, quilt may be selected Commissioning device dynamic establishes mapping relations, to realize debugging in real time.
Although there are also some schemes to be based on SSH protocol realization in the prior art, it is dependent on SSH reverse proxy and wants Administrator (root) permission is sought, and can retain SSHD in the configuration of most of Embedded Linux Systems and cut SSH client Fall, poor universality;The embodiment of the present application is realized based on tcp socket, is supported without administrator right, is reduced risk and is improved Versatility.And the program is that the debugging result of periodically acquisition equipment end is output to server end, there is excessive, the debugging that is delayed As a result not exclusively true problem;And the embodiment of the present application can dynamically establish mapping relations, realize debugging in real time, improve test knot The authenticity of fruit.
The embodiment of the present application also provides a kind of non-volatile readable storage medium, be stored in the storage medium one or Multiple modules (programs) when the one or more module is used in equipment, can make the equipment execute the application reality Apply the instruction (instructions) of various method steps in example.
The embodiment of the present application provides one or more machine readable medias, is stored thereon with instruction, when by one or more When a processor executes, so that electronic equipment executes the method as described in one or more in above-described embodiment.The application is implemented In example, the electronic equipment includes control equipment and debugged apparatus, such as internet of things equipment.
Fig. 9 is the hardware structural diagram for the electronic equipment that one embodiment of the application provides, which may include end End equipment, server etc..As shown in figure 9, the electronic equipment may include input equipment 90, processor 91, output equipment 92, deposit Reservoir 93 and at least one communication bus 94.Communication bus 94 is for realizing the communication connection between element.Memory 93 may Include high-speed RAM (Random Access Memory, random access memory), it is also possible to further include non-volatile memories NVM (Non-Volatile Memory), for example, at least a magnetic disk storage can store various programs in memory 93, be used for It completes various processing functions and realizes the method and step of the present embodiment.
Optionally, above-mentioned processor 91 can be for example central processing unit (Central Processing Unit, abbreviation CPU), application specific integrated circuit (ASIC), digital signal processor (DSP), digital signal processing appts (DSPD), programmable Logical device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are real Existing, which is coupled to above-mentioned input equipment 90 and output equipment 92 by wired or wireless connection.
Optionally, above-mentioned input equipment 90 may include a variety of input equipments, such as may include user oriented user At least one of interface, device oriented equipment interface, the programmable interface of software, camera, sensor.Optionally, the face It can be wireline interface for carrying out data transmission between equipment and equipment to the equipment interface of equipment, can also be for setting Standby hardware insertion interface (such as USB interface, serial ports etc.) carried out data transmission between equipment;Optionally, the user oriented User interface for example can be user oriented control button, for receive voice input voice-input device and user Receive the touch awareness apparatus (such as touch screen, Trackpad with touch sensing function etc.) of user's touch input;Optionally, The programmable interface of above-mentioned software for example can be the entrance for editing or modifying program for user, such as the input pin of chip Interface or input interface etc.;Optionally, above-mentioned transceiver can be rf chip with communication function, at base band Manage chip and dual-mode antenna etc..The audio input device such as microphone can receive voice data.Output equipment 92 may include The output equipments such as display, sound equipment.
In the present embodiment, the processor of the equipment includes the function for executing each module in each electronic equipment, specifically Function and technical effect are referring to above-described embodiment, and details are not described herein again.
Figure 10 is the hardware structural diagram for the electronic equipment that another embodiment of the application provides.Figure 10 is to Fig. 9 in reality A specific embodiment during now.As shown in Figure 10, the electronic equipment of the present embodiment includes processor 101 and storage Device 102.
Processor 101 executes the computer program code that memory 102 is stored, and realizes Fig. 1 to Fig. 6 in above-described embodiment Equipment remote debugging method.
Memory 102 is configured as storing various types of data to support the operation in electronic equipment.These data Example includes the instruction of any application or method for operating on an electronic device, such as message, picture, video etc.. Memory 102 may include random access memory ram, it is also possible to and it further include nonvolatile memory NVM, for example, at least one Magnetic disk storage.
Optionally, processor 101 is arranged in processing component 100.The electronic equipment can also include: communication component 103, Power supply module 104, multimedia component 105, audio component 106, input/output interface 107 and/or sensor module 108.Equipment Component for specifically being included etc. is set according to actual demand, and the present embodiment is not construed as limiting this.
The integrated operation of the usually control equipment of processing component 100.Processing component 100 may include one or more processors 101 execute instruction, to complete all or part of the steps of above-mentioned Fig. 1 to Fig. 6 method.In addition, processing component 100 may include One or more modules, convenient for the interaction between processing component 100 and other assemblies.For example, processing component 100 may include more Media module, to facilitate the interaction between multimedia component 105 and processing component 100.
Power supply module 104 provides electric power for the various assemblies of equipment.Power supply module 104 may include power-supply management system, One or more power supplys and other with for electronic equipment generate, manage, and distribute the associated component of electric power.
Multimedia component 105 includes the display screen of one output interface of offer between equipment and user.In some realities It applies in example, display screen may include liquid crystal display (LCD) and touch panel (TP).If display screen includes touch panel, show Display screen may be implemented as touch screen, to receive input signal from the user.Touch panel includes that one or more touch passes Sensor is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or sliding is dynamic The boundary of work, but also detect duration and pressure associated with the touch or slide operation.
Audio component 106 is configured as output and/or input audio signal.For example, audio component 106 includes a Mike Wind (MIC), when equipment is in operation mode, when such as speech recognition mode, microphone is configured as receiving external audio signal.Institute Received audio signal can be further stored in memory 102 or send via communication component 103.In some embodiments In, audio component 106 further includes a loudspeaker, is used for output audio signal.
Input/output interface 107 provides interface, above-mentioned peripheral interface between processing component 100 and peripheral interface module Module can be click wheel, button etc..These buttons may include, but are not limited to: volume button, start button and locking press button.
Sensor module 108 includes one or more sensors, for providing the status assessment of various aspects for equipment.Example Such as, sensor module 108 can detecte the state that opens/closes of equipment, the relative positioning of component, and user contacts with equipment Existence or non-existence.Sensor module 108 may include proximity sensor, be configured to without any physical contact It detects the presence of nearby objects, including detection user at a distance from equipment room.In some embodiments, the sensor module 108 It can also be including camera etc..
Communication component 103 is configured to facilitate the logical of wired or wireless way between electronic equipment and other electronic equipments Letter.Electronic equipment can access the wireless network based on communication standard, such as WiFi, 2G or 3G or their combination.In a reality It applies in example, may include SIM card slot in the electronic equipment, which step on equipment for being inserted into SIM card GPRS network is recorded, is communicated by internet with server foundation.
From the foregoing, it will be observed that communication component 103, audio component 106 involved in Figure 10 embodiment and input/output connect Mouth 107, sensor module 108 can be used as the implementation of the input equipment in Fig. 9 embodiment.
The embodiment of the present application provides a kind of control equipment, comprising: one or more processors;Be stored thereon with finger One or more machine readable medias of order, when being executed by one or more of processors, so that the control equipment is held Equipment remote debugging method of the row as described in one or more in the embodiment of the present application.
The embodiment of the present application provides a kind of debugged apparatus, comprising: one or more processors;Be stored thereon with One or more machine readable medias of instruction, when being executed by one or more of processors, so that described be debugged sets The standby equipment remote debugging method executed as described in one or more in the embodiment of the present application.
For device embodiment, since it is basically similar to the method embodiment, related so being described relatively simple Place illustrates referring to the part of embodiment of the method.
All the embodiments in this specification are described in a progressive manner, the highlights of each of the examples are with The difference of other embodiments, the same or similar parts between the embodiments can be referred to each other.
The embodiment of the present application is referring to according to the method for the embodiment of the present application, terminal device (system) and computer program The flowchart and/or the block diagram of product describes.It should be understood that flowchart and/or the block diagram can be realized by computer program instructions In each flow and/or block and flowchart and/or the block diagram in process and/or box combination.It can provide these Computer program instructions are set to general purpose computer, special purpose computer, Embedded Processor or other programmable data processing terminals Standby processor is to generate a machine, so that being held by the processor of computer or other programmable data processing terminal devices Capable instruction generates for realizing in one or more flows of the flowchart and/or one or more blocks of the block diagram The device of specified function.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing terminal devices In computer-readable memory operate in a specific manner, so that instruction stored in the computer readable memory generates packet The manufacture of command device is included, which realizes in one side of one or more flows of the flowchart and/or block diagram The function of being specified in frame or multiple boxes.
These computer program instructions can also be loaded into computer or other programmable data processing terminal devices, so that Series of operation steps are executed on computer or other programmable terminal equipments to generate computer implemented processing, thus The instruction executed on computer or other programmable terminal equipments is provided for realizing in one or more flows of the flowchart And/or in one or more blocks of the block diagram specify function the step of.
Although preferred embodiments of the embodiments of the present application have been described, once a person skilled in the art knows bases This creative concept, then additional changes and modifications can be made to these embodiments.So the following claims are intended to be interpreted as Including preferred embodiment and all change and modification within the scope of the embodiments of the present application.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that process, method, article or terminal device including a series of elements not only wrap Those elements are included, but also including other elements that are not explicitly listed, or further includes for this process, method, article Or the element that terminal device is intrinsic.In the absence of more restrictions, being wanted by what sentence "including a ..." limited Element, it is not excluded that there is also other identical elements in process, method, article or the terminal device for including the element.
Above to a kind of equipment remote debugging method provided herein, a kind of equipment remote testing device, a kind of control Control equipment, a kind of debugged apparatus and a kind of storage medium, are described in detail, and specific case used herein is to this Shen Principle and embodiment please is expounded, the present processes that the above embodiments are only used to help understand and its Core concept;At the same time, for those skilled in the art, according to the thought of the application, in specific embodiment and application There will be changes in range, in conclusion the contents of this specification should not be construed as limiting the present application.

Claims (30)

1. a kind of equipment remote debugging method characterized by comprising
Mapping relations are established with debugged apparatus;
It determines debugging request data, the debugging request data is packaged and are transmitted to institute according to Secure Shell SSH agreement State debugged apparatus;
The debugging response data by the SSH protocol encapsulation is received, the debugging response data of the encapsulation is unsealed and shows.
2. the method according to claim 1, wherein described establish mapping relations with debugged apparatus, comprising:
Debugged apparatus is selected in Debugging interface, sends corresponding matching instruction to the first process;
First process inquires the debugged apparatus according to the matching instruction, establishes the mapping with the debugged apparatus Relationship.
3. the method according to claim 1, wherein the determining debugging request data, foundation Secure Shell SSH Agreement is packaged the debugging request data and is transmitted to the debugged apparatus, comprising:
Debugging request data are determined in Debugging interface, and the debugging request data are sent to the second process;
Second process is packaged the debugging request data according to SSH agreement, and the debugging request data of encapsulation are sent out Give the first process;
First process forwards the debugging request data of the encapsulation to the debugged apparatus according to the mapping relations.
4. according to the method described in claim 3, it is characterized in that, described receive is rung by the debugging of the SSH protocol encapsulation Data are answered, the debugging response data of the encapsulation is unsealed and are shown, comprising:
First process receives the debugging response data of the encapsulation, by the debugging response data of the encapsulation be sent to second into Journey;
Second process is unsealed according to debugging response data of the SSH agreement to the encapsulation, is obtained corresponding debugging and is rung Answer data;
The debugging response data is sent to Debugging interface by the second process, and the debugging response is shown in the Debugging interface Data.
5. method according to claim 1 to 4, which is characterized in that the debugging request data include: that SSH connection is asked It asks and/or debug command, the debugging response data includes: SSH connection result and/or debugging result.
6. according to the method described in claim 5, it is characterized by further comprising:
Second process encrypts the debugging request data by the SSH protocol encapsulation;And/or
The debugging response data by the SSH protocol encapsulation is decrypted in second process.
7. a kind of equipment remote debugging method characterized by comprising
The debugging request data for passing through SSH protocol encapsulation are received, are carried out according to debugging request data of the SSH agreement to the encapsulation Deblocking;
The respective operations for the debugging request data that deblocking obtains are executed, debugging response data is generated;
The debugging response data is packaged and is forwarded according to the SSH agreement.
8. the method according to the description of claim 7 is characterized in that described receive the debugging request number for passing through SSH protocol encapsulation According to being unsealed according to debugging request data of the SSH agreement to the encapsulation, comprising:
Third process receives the debugging request data for passing through SSH protocol encapsulation, and the debugging request data of the encapsulation are sent to 4th process;
4th process is unsealed according to debugging request data of the SSH agreement to the encapsulation, is obtained corresponding debugging and is asked Seek data.
9. the method according to the description of claim 7 is characterized in that the debugging request data include: SSH connection request and/ Or debug command, the debugging response data includes: SSH connection result and/or debugging result.
10. according to the method described in claim 9, it is characterized in that, pair for executing the debugging request data that deblocking obtains It should operate, generate debugging response data, comprising:
4th process calls SSH protocol service and generates corresponding SSH connection result according to SSH connection request.
11. according to the method described in claim 9, it is characterized in that, pair for executing the debugging request data that deblocking obtains It should operate, generate debugging response data, comprising:
4th process executes the corresponding debugging operations of debug command, generates corresponding debugging result.
12. the method according to the description of claim 7 is characterized in that it is described according to the SSH agreement to the debugging number of responses According to being packaged and forward, comprising:
4th process is packaged the debugging response data according to SSH agreement, and the debugging response data of encapsulation is transmitted to Third process;
The third process sends the debugging response data of the encapsulation.
13. according to any method of claim 7-12, which is characterized in that further include:
The debugging request data by the SSH protocol encapsulation are decrypted in 4th process;And/or
4th process encrypts the debugging response data by the SSH protocol encapsulation.
14. a kind of equipment remote testing device characterized by comprising
Communication module, for establishing mapping relations with debugged apparatus;Forward the debugging request data of encapsulation to described debugged Equipment;And the debugging response data that reception passes through the SSH protocol encapsulation;
Operation module, for determining debugging request data;And show debugging response data;
Protocol process module, for being packaged according to Secure Shell SSH agreement to the debugging request data;And deblocking envelope The debugging response data of dress.
15. device according to claim 14, which is characterized in that
The operation module sends corresponding matching instruction to the first process for selecting debugged apparatus in Debugging interface;
The communication module is established for inquiring the debugged apparatus according to the matching instruction by first process With the mapping relations of the debugged apparatus.
16. device according to claim 14, which is characterized in that
The debugging request data are sent to for determining debugging request data in Debugging interface by the operation module Two processes;
The protocol process module will for being packaged according to SSH agreement to the debugging request data by the second process The debugging request data of encapsulation are sent to the first process;
The communication module, for, according to the mapping relations, forwarding the debugging request of the encapsulation by first process Data give the debugged apparatus.
17. device according to claim 16, which is characterized in that
The communication module, for receiving the debugging response data of the encapsulation by the first process, by the debugging of the encapsulation Response data is sent to the second process;
The protocol process module, for passing through the second process according to the SSH agreement to the debugging response data of the encapsulation It is unsealed, obtains corresponding debugging response data;The debugging response data is sent to Debugging interface by the second process;
The operation module, for showing the debugging response data in the Debugging interface.
18. any device of 4-17 according to claim 1, which is characterized in that the debugging request data include: that SSH connects Request and/or debug command are connect, the debugging response data includes: SSH connection result and/or debugging result.
19. device according to claim 18, which is characterized in that
The protocol process module, be also used to by the second process to the debugging request data by the SSH protocol encapsulation into Row encryption;And/or the debugging response data by the SSH protocol encapsulation is decrypted by the second process.
20. a kind of equipment remote testing device characterized by comprising
Proxy module, for receiving the debugging request data for passing through SSH protocol encapsulation, according to SSH agreement to the tune of the encapsulation Examination request data is unsealed;And the debugging response data is packaged and is forwarded according to the SSH agreement;
Protocol service module generates debugging response data for executing the respective operations for the debugging request data that deblocking obtains.
21. device according to claim 20, which is characterized in that
The proxy module, for receiving the debugging request data for passing through SSH protocol encapsulation by third process, by the encapsulation Debugging request data be sent to the 4th process;
The protocol service module, for by the 4th process according to SSH agreement to the debugging request data of the encapsulation It is unsealed, obtains corresponding debugging request data.
22. device according to claim 20, which is characterized in that the debugging request data include: SSH connection request And/or debug command, the debugging response data includes: SSH connection result and/or debugging result.
23. device according to claim 22, which is characterized in that
The protocol service module, for, according to SSH connection request, calling SSH protocol service by the 4th process and generating phase The SSH connection result answered.
24. device according to claim 22, which is characterized in that
The protocol service module generates corresponding adjust for executing the corresponding debugging operations of debug command by the 4th process Test result.
25. device according to claim 20, which is characterized in that
The protocol service module will for being packaged according to SSH agreement to the debugging response data by the 4th process The debugging response data of encapsulation is transmitted to third process;
The proxy module, for sending the debugging response data of the encapsulation by the third process.
26. according to any device of claim 20-25, which is characterized in that
The proxy module is also used to solve the debugging request data by the SSH protocol encapsulation by the 4th process It is close;And/or the debugging response data by the SSH protocol encapsulation is encrypted by the 4th process.
27. a kind of control equipment characterized by comprising
One or more processors;With
One or more machine readable medias of instruction are stored thereon with, when being executed by one or more of processors, are made Obtain equipment remote debugging method of the control equipment execution as described in one or more in claim 1-6.
28. one or more machine readable medias, are stored thereon with instruction, when executed by one or more processors, so that Control equipment remote debugging method of the equipment execution as described in one or more in claim 1-6.
29. a kind of debugged apparatus characterized by comprising
One or more processors;With
One or more machine readable medias of instruction are stored thereon with, when being executed by one or more of processors, are made Obtain equipment remote debugging method of the debugged apparatus execution as described in one or more in claim 7-13.
30. one or more machine readable medias, are stored thereon with instruction, when executed by one or more processors, so that Debugged apparatus executes the equipment remote debugging method as described in one or more in claim 7-13.
CN201711244463.2A 2017-11-30 2017-11-30 Equipment remote debugging method, device, equipment and storage medium Pending CN109861950A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711244463.2A CN109861950A (en) 2017-11-30 2017-11-30 Equipment remote debugging method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711244463.2A CN109861950A (en) 2017-11-30 2017-11-30 Equipment remote debugging method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN109861950A true CN109861950A (en) 2019-06-07

Family

ID=66889045

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711244463.2A Pending CN109861950A (en) 2017-11-30 2017-11-30 Equipment remote debugging method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109861950A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110806976A (en) * 2019-10-24 2020-02-18 青岛英泰软件技术有限公司 Method for remotely pushing shell and CMD (command-to-command) commands
CN112187869A (en) * 2020-09-03 2021-01-05 京东数字科技控股股份有限公司 Remote debugging system and method of IOT device, electronic device and storage medium
US20210089419A1 (en) * 2019-09-25 2021-03-25 Alibaba Group Holding Limited Debugging unit and processor
CN113204494A (en) * 2021-05-29 2021-08-03 长沙市到家悠享家政服务有限公司 Terminal remote test platform and method, electronic equipment and readable medium
CN113722236A (en) * 2021-09-18 2021-11-30 网易(杭州)网络有限公司 Game debugging method, device, equipment, storage medium and program product
WO2022247790A1 (en) * 2021-05-24 2022-12-01 深圳Tcl新技术有限公司 Data management method and apparatus, device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015168345A1 (en) * 2014-05-02 2015-11-05 Nec Laboratories America, Inc. Multi-layer virtual infrastructure embedding procedure in software-defined flexible-grid transport networks
CN105323598A (en) * 2014-07-28 2016-02-10 中兴通讯股份有限公司 Set top box management method, apparatus and system
CN105722081A (en) * 2016-02-04 2016-06-29 腾讯科技(深圳)有限公司 Intelligent device networking method and device
CN107040777A (en) * 2017-06-08 2017-08-11 深圳市创维软件有限公司 A kind of remote debugging method, set top box and server

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015168345A1 (en) * 2014-05-02 2015-11-05 Nec Laboratories America, Inc. Multi-layer virtual infrastructure embedding procedure in software-defined flexible-grid transport networks
CN105323598A (en) * 2014-07-28 2016-02-10 中兴通讯股份有限公司 Set top box management method, apparatus and system
CN105722081A (en) * 2016-02-04 2016-06-29 腾讯科技(深圳)有限公司 Intelligent device networking method and device
CN107040777A (en) * 2017-06-08 2017-08-11 深圳市创维软件有限公司 A kind of remote debugging method, set top box and server

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210089419A1 (en) * 2019-09-25 2021-03-25 Alibaba Group Holding Limited Debugging unit and processor
US11755441B2 (en) * 2019-09-25 2023-09-12 Alibaba Group Holding Limited Debugging unit and processor
CN110806976A (en) * 2019-10-24 2020-02-18 青岛英泰软件技术有限公司 Method for remotely pushing shell and CMD (command-to-command) commands
CN110806976B (en) * 2019-10-24 2022-03-22 青岛英泰软件技术有限公司 Method for remotely pushing shell and CMD (command-to-command) commands
CN112187869A (en) * 2020-09-03 2021-01-05 京东数字科技控股股份有限公司 Remote debugging system and method of IOT device, electronic device and storage medium
WO2022247790A1 (en) * 2021-05-24 2022-12-01 深圳Tcl新技术有限公司 Data management method and apparatus, device and storage medium
CN113204494A (en) * 2021-05-29 2021-08-03 长沙市到家悠享家政服务有限公司 Terminal remote test platform and method, electronic equipment and readable medium
CN113722236A (en) * 2021-09-18 2021-11-30 网易(杭州)网络有限公司 Game debugging method, device, equipment, storage medium and program product
CN113722236B (en) * 2021-09-18 2023-08-08 网易(杭州)网络有限公司 Game debugging method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109861950A (en) Equipment remote debugging method, device, equipment and storage medium
CN107612909B (en) Information interaction method, device and equipment about Internet of things equipment
CN109246053A (en) A kind of data communications method, device, equipment and storage medium
EP3633913A1 (en) Provisioning a secure connection using a pre-shared key
US9614890B2 (en) Acquiring and correlating web real-time communications (WEBRTC) interactive flow characteristics, and related methods, systems, and computer-readable media
WO2019201154A1 (en) Method and apparatus for communication between internet of things devices
CN109936547A (en) Identity identifying method, system and calculating equipment
CN109587097A (en) A kind of system, method and apparatus for realizing secure access internal network
DE102015121223A1 (en) Secure connection
CN108681662A (en) A kind of method and device of installation procedure
CN109788441A (en) A kind of information processing method, terminal and computer storage medium
CN104717218A (en) Wifi certification system and method
CN109688573A (en) Exchange method and bluetooth equipment between bluetooth equipment
CN109547567B (en) Proxy connection method and device
CN109862560A (en) A kind of bluetooth authentication method, apparatus, equipment and medium
CN108093058B (en) Demonstration state synchronization method, device and system
CN113329399A (en) Data transmission, distribution network and management method, device, system and storage medium
CN109218370A (en) Message method and device, electronic equipment
US9882957B1 (en) Client-side endpoint specification in a network service request
CN107995351A (en) Call method and device
CN104349202B (en) Video acquiring method and device
CN112700014A (en) Method, device and system for deploying federal learning application and electronic equipment
CN113301537A (en) Method, apparatus, electronic device and storage medium for establishing communication connection
US10178087B2 (en) Trusted pin management
CN107979655A (en) Access control method, access control apparatus and access device

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190607

RJ01 Rejection of invention patent application after publication