CN113973128A - Method, system, device and storage medium for remote debugging of equipment - Google Patents

Method, system, device and storage medium for remote debugging of equipment Download PDF

Info

Publication number
CN113973128A
CN113973128A CN202111085599.XA CN202111085599A CN113973128A CN 113973128 A CN113973128 A CN 113973128A CN 202111085599 A CN202111085599 A CN 202111085599A CN 113973128 A CN113973128 A CN 113973128A
Authority
CN
China
Prior art keywords
equipment
debugging
mapping
server
cloud
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.)
Granted
Application number
CN202111085599.XA
Other languages
Chinese (zh)
Other versions
CN113973128B (en
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.)
Hangzhou Shendu Technology Co ltd
Original Assignee
Hangzhou Shendu Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Shendu Technology Co ltd filed Critical Hangzhou Shendu Technology Co ltd
Priority to CN202111085599.XA priority Critical patent/CN113973128B/en
Publication of CN113973128A publication Critical patent/CN113973128A/en
Application granted granted Critical
Publication of CN113973128B publication Critical patent/CN113973128B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • H04L67/125Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to a method, a system, a device and a storage medium for remote debugging of equipment, wherein the method comprises the following steps: establishing a control channel through an equipment end to be connected to a server end, reading local configuration information and uploading the local configuration information to the server end, wherein the configuration information comprises information of preset equipment, and a port of the preset equipment is a port needing to be mapped to an external network; the server side establishes a first mapping relation between the equipment side and the server side according to the configuration information; under the condition that the debugging end is connected with the server end, the server end establishes a data channel between the equipment end and the server end according to the first mapping relation and establishes a second mapping relation between the data channel and the debugging end; the debugging end carries out remote debugging to the equipment of predetermineeing through second mapping relation and data channel in predetermineeing the debugging time, through this application, has solved the problem that the operation is numerous and diverse and have the potential safety hazard among the current equipment remote debugging, has realized that equipment initiative external connection opens remote debugging, and has guaranteed the long controllability of remote debugging.

Description

Method, system, device and storage medium for remote debugging of equipment
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method, a system, an apparatus, and a storage medium for remote debugging of a device.
Background
For debugging of hardware equipment, the conventional method is that each piece of equipment is debugged after being installed for the first time, and later, if a problem occurs, the field needs to be debugged independently, the field independent debugging mode has no larger problem under the condition that the quantity of the equipment is not large, the quantity of the equipment can be increased suddenly along with the continuous application of intelligent equipment in daily life, and the maintenance cost is increased along with the rise of ships.
Therefore, remote debugging of equipment occurs, and a currently commonly used method for remotely debugging equipment is to set an external network mapping on a router of the equipment, map a port of the equipment to an external network, and actively monitor a port of the connected equipment through a service end of the external network, so that the equipment can be accessed through an external network ip and a mapping port of the router.
At present, no effective solution is provided aiming at the problems of complicated remote debugging operation and potential safety hazard of equipment in the related technology.
Disclosure of Invention
The embodiment of the application provides a method, a system, a device and a storage medium for remote debugging of equipment, so as to at least solve the problems of complicated remote debugging operation and potential safety hazard of the equipment in the related technology.
In a first aspect, an embodiment of the present application provides a method for remotely debugging a device, where an execution main body of the method includes a device side, a server side and a debugging side, where the device side includes a device control program and a device mapping program, and the server side includes a cloud access service and a cloud mapping service, and the method includes:
the equipment end creates a control channel to be connected to the server end, reads local configuration information and uploads the configuration information to the server end, wherein the configuration information comprises information of preset equipment, and a port of the preset equipment is a port needing to be mapped to an external network;
the server side establishes a first mapping relation between the equipment side and the server side according to the configuration information;
under the condition that the debugging end is connected with the server end, the server end creates a data channel between the equipment end and the server end according to the first mapping relation;
the server side establishes a second mapping relation between the data channel and the debugging side;
and the debugging end carries out remote debugging on the preset equipment through the second mapping relation and the data channel within preset debugging time.
In some embodiments, before the device creates a control channel to connect to the server, the method includes:
an interface program for starting and closing remote debugging is deployed in the server;
the server side sends a parameter for controlling debugging duration to the equipment control program in the equipment side through the cloud access service;
and the equipment end writes the parameters into configuration information through the equipment control program and starts the equipment mapping program in the equipment end.
In some embodiments, the establishing, by the server, a first mapping relationship between the device side and the server side according to the configuration information includes:
and the server side opens a monitoring port at the server side through the cloud mapping service according to the configuration information, and establishes a first mapping relation between the monitoring port and the port of the preset equipment.
In some embodiments, when a debug end is connected to the server end, the creating, by the server end according to the first mapping relationship, a data channel between the device end and the server end includes:
under the condition that a debugging end is connected with a monitoring port of the server end, the server end obtains a port of the preset equipment through the cloud mapping service according to the first mapping relation, and starts proxy service to the preset equipment;
and the equipment side establishes a port of the preset equipment and a data channel of the service side through the equipment mapping program according to the proxy service and a preset connection mode.
In some embodiments, before the device creates a control channel to connect to the server, the method includes:
setting a domain name for the server side, and setting a sub-domain name of the domain name for equipment in the equipment side;
and the server side establishes a cloud mapping table according to the ID of the equipment in the equipment side and the sub domain name through the cloud mapping service.
In some of these embodiments, after launching the device mapping program, the method includes:
under the condition that a debugging stopping command sent by the server side is received, the equipment side closes the equipment mapping program through the equipment control program; or when the debugging time length specified by the parameters is over, the equipment end automatically quits running through the equipment mapping program.
In some embodiments, after establishing the cloud mapping table, the method includes:
the debugging end sends a request for domain name access to the server end;
the server side establishes a data channel between the equipment side and the server side through the cloud mapping service, and inquires whether a sub domain name in the request exists in the cloud mapping table or not;
if the device exists, obtaining the ID of the corresponding device according to the cloud mapping table, and performing remote debugging on the corresponding device based on domain name connection;
and if the data does not exist, returning the nonexistence information to the debugging end.
In a second aspect, an embodiment of the present application provides a system for remote debugging of a device, where the system includes a device side, a server side and a debugging side, where the device side includes a device control program and a device mapping program, and the server side includes a cloud access service and a cloud mapping service;
the device control program is connected with the cloud access service and used for controlling the device mapping program, wherein the control comprises starting, stopping and configuring;
the device mapping program is actively connected with the cloud mapping service and used for mapping the port of the device to an external network;
the cloud access service is used for sending a control command to the equipment terminal, wherein the control command comprises starting and stopping of an equipment mapping program;
the cloud mapping service is connected with the equipment mapping program and used for mapping the port of the equipment to an external network;
the debugging end accesses the equipment end through the cloud mapping service;
the method comprises the following steps of realizing remote debugging of equipment:
the equipment end creates a control channel to be connected to the server end, reads local configuration information and uploads the configuration information to the server end, wherein the configuration information comprises information of preset equipment, and a port of the preset equipment is a port needing to be mapped to an external network;
the server side establishes a first mapping relation between the equipment side and the server side according to the configuration information;
under the condition that the debugging end is connected with the server end, the server end creates a data channel between the equipment end and the server end according to the first mapping relation;
the server side establishes a second mapping relation between the data channel and the debugging side;
and the debugging end carries out remote debugging on the preset equipment through the second mapping relation and the data channel within preset debugging time.
In a third aspect, an embodiment of the present application provides an electronic apparatus, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the method for remotely debugging the device according to the first aspect is implemented.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements the method for remote debugging of a device as described in the first aspect above.
Compared with the related art, the method, the system, the device and the storage medium for remote debugging of the equipment provided by the embodiment of the application are connected to the server side through the equipment side creation control channel, and read the local configuration information to upload the configuration information to the server side, wherein the configuration information comprises the information of the preset equipment, and the port of the preset equipment is a port which needs to be mapped to an external network; the server side establishes a first mapping relation between the equipment side and the server side according to the configuration information; under the condition that the debugging end is connected with the server end, the server end establishes a data channel between the equipment end and the server end according to the first mapping relation and establishes a second mapping relation between the data channel and the debugging end; the debugging end carries out remote debugging on the preset equipment through the second mapping relation and the data channel within the preset debugging time, the problems of complex operation and potential safety hazard in the remote debugging of the existing equipment are solved, the equipment is actively connected to the outside and the remote debugging is started, and the controllability of the remote debugging time is ensured.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a flowchart of steps of a method for remote commissioning of a device according to an embodiment of the present application;
FIG. 2 is a schematic flow chart diagram of a method for remote debugging of a device based on domain name access;
FIG. 3 is a block diagram of a device remote debugging system according to an embodiment of the present application;
FIG. 4 is a timing diagram illustrating remote debugging of a device according to the system of the present embodiment;
fig. 5 is an internal structural diagram of an electronic device according to an embodiment of the present application.
Description of the drawings: 31. an equipment end; 32. a server side; 33. debugging end; 34. an equipment control program; 35. a device mapping program; 36. accessing a service by a cloud; 37. and cloud mapping service.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments provided in the present application without any inventive step are within the scope of protection of the present application.
It is obvious that the drawings in the following description are only examples or embodiments of the present application, and that it is also possible for a person skilled in the art to apply the present application to other similar contexts on the basis of these drawings without inventive effort. Moreover, it should be appreciated that in the development of any such actual implementation, as in any engineering or design project, numerous implementation-specific decisions must be made to achieve the developers' specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of ordinary skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms referred to herein shall have the ordinary meaning as understood by those of ordinary skill in the art to which this application belongs. Reference to "a," "an," "the," and similar words throughout this application are not to be construed as limiting in number, and may refer to the singular or the plural. The present application is directed to the use of the terms "including," "comprising," "having," and any variations thereof, which are intended to cover non-exclusive inclusions; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to the listed steps or elements, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. Reference to "connected," "coupled," and the like in this application is not intended to be limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" as referred to herein means two or more. "and/or" describes an association relationship of associated objects, meaning that three relationships may exist, for example, "A and/or B" may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. Reference herein to the terms "first," "second," "third," and the like, are merely to distinguish similar objects and do not denote a particular ordering for the objects.
Example 1
An execution main body of the method comprises an equipment end, a server end and a debugging end, wherein the equipment end comprises an equipment control program and an equipment mapping program, the server end comprises a cloud access service and a cloud mapping service, fig. 1 is a flow chart of steps of the equipment remote debugging method according to the embodiment of the application, and as shown in fig. 1, the method comprises the following steps:
step S102, an equipment end creates a control channel to be connected to a server end, reads local configuration information and uploads the configuration information to the server end, wherein the configuration information comprises information of preset equipment, and a port of the preset equipment is a port needing to be mapped to an external network;
specifically, the device mapping program (device side) is actively connected to the cloud mapping service (server side), and the created connection is used as a control channel; then, the device mapping program reads local configuration information, checks which device ports need to be mapped to the extranet, and uploads the configuration information (including the proxy name of each port) to the cloud mapping service.
Step S104, the server establishes a first mapping relation between the equipment side and the server side according to the configuration information;
specifically, after the cloud mapping service (server) receives the configuration information, a first mapping relationship between the device side and the server is established according to the port and the type of the device.
Step S106, under the condition that the debugging end is connected with the service end, the service end establishes a data channel between the equipment end and the service end according to the first mapping relation;
specifically, if the debugging end is connected with a cloud mapping service (server), the cloud mapping service finds the corresponding device and the port of the corresponding device according to the first mapping relation, and creates a data channel between the device end and the server according to the port information.
Step S108, the server side establishes a second mapping relation between the data channel and the debugging side;
step S110, the debugging end remotely debugs the preset device through the second mapping relationship and the data channel within the preset debugging time.
Specifically, after the debugging end sends debugging data to the cloud mapping service (the server end) in preset debugging time, the cloud mapping service forwards the received debugging data to the device mapping program (the device end) through the data channel, and the device mapping program forwards the received data to the preset device;
the preset device generates response data after receiving the debugging data, the device mapping program reports the response data to the cloud mapping service through the data channel, the cloud mapping service sends the data to the debugging end according to the current channel after receiving the response data, and the preset debugging time refers to the running time of the device mapping program and can be manually controlled.
It should be noted that the existing device debugging method generally includes ssh debugging, ets debugging and web page debugging, where ssh debugging requires device login, debugging content includes replacing files, checking printout, checking configuration, and the like; the ets debugging needs to connect the equipment, check whether the data in the equipment is normally transmitted and received or not, and also check whether the equipment can be controlled or not; and debugging the webpage needing to log in the equipment and configuring and checking the configuration of the equipment. Therefore, the device remote debugging method in this embodiment includes, but is not limited to, using the three debugging methods to perform remote debugging on the preset device.
Through the steps S102 to S110 in the embodiment of the application, the problems of time consumption, labor consumption, cost and the like of offline field independent debugging are solved, the problems of complex operation and potential safety hazard in remote debugging are solved, the device is actively connected and started to carry out remote debugging, and the controllability of the remote debugging time is ensured
In some embodiments, in step S102, before the creating, by the device side, a control channel to connect to the server side, the method further includes:
an interface program for starting and closing remote debugging is deployed in the server;
the server side sends the parameter for controlling the debugging time length to an equipment control program in the equipment side through the cloud access service;
and the equipment side writes the parameters into the configuration information through the equipment control program and starts an equipment mapping program in the equipment side.
Specifically, an interface program for starting and closing remote debugging is added at a server side to realize dynamic control of the remote debugging, the interface program is provided with a port for starting the remote debugging, a type and a name, the cloud access service issues a parameter for controlling debugging duration to an equipment control program, the equipment control program writes configuration into a configuration file, and an equipment mapping program is started.
In some embodiments, in step S104, the step of establishing, by the server, the first mapping relationship between the device side and the server side according to the configuration information includes:
the server side opens the monitoring port at the server side through the cloud mapping service according to the configuration information, and a first mapping relation between the monitoring port and a port of the preset device is established.
Specifically, after receiving the configuration information reported by the device, the cloud mapping service opens a random monitoring port at the cloud according to the port and the type of the preset device, and maps the opened monitoring port, the port of the preset device, and the name of the corresponding service to generate a first mapping relationship.
In some embodiments, in step S106, when the debug side is connected to the server side, the creating, by the server side according to the first mapping relationship, a data channel between the device side and the server side includes:
under the condition that the debugging end is connected with the monitoring port of the server end, the server end obtains the port of the preset equipment according to the first mapping relation through the cloud mapping service, and starts proxy service to the preset equipment;
and the equipment side establishes a port of the preset equipment and a data channel of the service side through the equipment mapping program according to the proxy service and the preset connection mode.
Specifically, if the debugging end is connected with a monitoring port of the cloud mapping service, the cloud mapping service determines the ports of the preset device and the preset device according to the first mapping relation, then starts the proxy service to the preset device, and the device mapping program searches the ports and the connection modes (such as tcp/udp/http) of the preset device according to the name of the proxy service, connects the ports (such as 127.0.0.1) of the preset device, and simultaneously connects the service end, so as to establish a data channel between the preset device and the service end.
In some embodiments, in step S102, before the creating, by the device side, a control channel to connect to the server side, the method further includes:
setting a domain name for a server side, and setting a sub-domain name of the domain name for equipment in an equipment side;
and the server side establishes a cloud mapping table according to the ID and the sub domain name of the equipment in the equipment side through the cloud mapping service.
Specifically, if the http service in the device needs to be mapped to the extranet, the mapping is preferably performed in a domain name manner, so that a domain name xxx.com needs to be set for a machine of the cloud mapping service, and meanwhile, a sub-domain name xxx.com of the device also needs to be mapped to the machine;
the cloud mapping service may establish a cloud mapping table according to the ID and sub-domain name of each device.
In some embodiments, after the device mapping procedure is started, the method further includes:
under the condition of receiving a debugging stopping command sent by a server, the equipment end closes the equipment mapping program through the equipment control program; or the equipment end automatically quits running through the equipment mapping program under the condition that the debugging time length specified by the parameters is finished.
In some embodiments, fig. 2 is a schematic flowchart of a remote device debugging method based on domain name access, and as shown in fig. 2, after the cloud mapping table is established, the method further includes:
the debugging end sends a request for domain name access to the server end;
the server side establishes a data channel between the equipment side and the server side through the cloud mapping service, and inquires whether a sub domain name in the request exists in a cloud mapping table or not;
if the device exists, obtaining the ID of the corresponding device according to the cloud mapping table, and performing remote debugging on the corresponding device based on domain name connection;
and if the data does not exist, returning the nonexistence information to the debugging end.
Specifically, the debugging end sends a request for domain name access to the server end, the cloud mapping service creates a data channel to the device mapping program and inquires whether a sub-domain name in the request exists in a cloud mapping table or not,
if the device exists, obtaining the ID (such as ID1 corresponding to ID1.xxx. com) of the corresponding device according to the cloud mapping table, and performing remote debugging on the corresponding device based on domain name connection;
if not, the absence information is returned to the debug end (e.g., 404).
It should be noted that the steps illustrated in the above-described flow diagrams or in the flow diagrams of the figures may be performed in a computer system, such as a set of computer-executable instructions, and that, although a logical order is illustrated in the flow diagrams, in some cases, the steps illustrated or described may be performed in an order different than here.
Example 2
An embodiment of the present application provides a system for remote debugging of a device, where fig. 3 is a block diagram of a structure of the system for remote debugging of a device according to an embodiment of the present application, and as shown in fig. 3, the system includes a device end 31, a server end 32, and a debugging end 33, where the device end 31 includes a device control program 34 and a device mapping program 35, and the server end 32 includes a cloud access service 36 and a cloud mapping service 37;
the device control program is connected with the cloud access service and used for controlling the device mapping program, wherein the control comprises starting, stopping and configuration;
the device mapping program is actively connected with the cloud mapping service and used for mapping the port of the device to the external network;
the cloud access service is used for sending a control command to the equipment end, and the control command comprises the starting and stopping of an equipment mapping program;
the cloud mapping service is connected with the equipment mapping program and used for mapping the port of the equipment to an external network;
and the debugging end accesses the equipment end through the cloud mapping service.
Fig. 4 is a timing diagram for implementing remote debugging of a device based on the system in this embodiment, and as shown in fig. 4, implementing remote debugging of a device by the system includes the following steps:
1. and establishing a control channel.
The device side establishes a control channel to be connected to the server side.
2. Reporting the agent information and returning successfully.
The method comprises the steps that a device side reads local configuration information and uploads the configuration information to a server side, wherein the configuration information comprises information of preset devices, and ports of the preset devices are ports needing to be mapped to an external network;
and the server establishes a first mapping relation between the equipment side and the server side according to the configuration information.
3. And connecting the server.
And the debugging end is connected with the service end.
4. Requesting to open the agent, connecting the device port and establishing the data channel.
The server side establishes a data channel between the equipment side and the server side according to the first mapping relation;
5. device remote commissioning (data transfer).
The server side establishes a second mapping relation between the data channel and the debugging side;
and the debugging end carries out remote debugging on the preset equipment through the second mapping relation and the data channel within the preset debugging time.
Through the system provided in the embodiment of the application, the problems of time consumption, labor consumption, cost and the like of offline field independent debugging are solved, the problems of complicated operation and potential safety hazard in remote debugging are solved, the active external connection of equipment is realized, the remote debugging is started, and the long controllability of the remote debugging is ensured
The programs may be functional modules or program modules, and may be implemented by software or hardware. For implementation by hardware, the above programs may be located in the same processor; or can be respectively positioned in different processors in any combination;
each of the services may be a functional module or a program module, and may be implemented by software or hardware. For implementation by hardware, the above services may be located in the same processor; or may be located in different processors, respectively, in any combination.
Example 3
The present embodiment also provides an electronic device comprising a memory having a computer program stored therein and a processor configured to execute the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, the device end maps the port to the outer net actively; establishing a data channel with a server;
s2, establishing a data channel between the equipment side and the server side;
and S3, the debugging end carries out remote debugging on the equipment through the data channel.
It should be noted that, for specific examples in this embodiment, reference may be made to examples described in the foregoing embodiments and optional implementations, and details of this embodiment are not described herein again.
In addition, in combination with the method for remote debugging of the device in the foregoing embodiments, the embodiments of the present application may provide a storage medium to implement. The storage medium having stored thereon a computer program; the computer program, when executed by a processor, implements a method for remote debugging of a device as in any of the above embodiments.
Example 4
In one embodiment, a computer device is provided, which may be a terminal. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of remote commissioning of a device. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
In one embodiment, fig. 5 is a schematic diagram of an internal structure of an electronic device according to an embodiment of the present application, and as shown in fig. 5, an electronic device is provided, where the electronic device may be a server, and the internal structure diagram may be as shown in fig. 5. The electronic device comprises a processor, a network interface, an internal memory and a non-volatile memory connected by an internal bus, wherein the non-volatile memory stores an operating system, a computer program and a database. The processor is used for providing calculation and control capability, the network interface is used for communicating with an external terminal through network connection, the internal memory is used for providing an environment for an operating system and running of a computer program, the computer program is executed by the processor to realize a method for remote debugging of equipment, and the database is used for storing data.
Those skilled in the art will appreciate that the configuration shown in fig. 5 is a block diagram of only a portion of the configuration associated with the present application, and does not constitute a limitation on the electronic device to which the present application is applied, and a particular electronic device may include more or less components than those shown in the drawings, or may combine certain components, or have a different arrangement of components.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It should be understood by those skilled in the art that various features of the above-described embodiments can be combined in any combination, and for the sake of brevity, all possible combinations of features in the above-described embodiments are not described in detail, but rather, all combinations of features which are not inconsistent with each other should be construed as being within the scope of the present disclosure.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. The method for remotely debugging the equipment is characterized in that an execution main body of the method comprises an equipment end, a server end and a debugging end, wherein the equipment end comprises an equipment control program and an equipment mapping program, the server end comprises a cloud end access service and a cloud end mapping service, and the method comprises the following steps:
the equipment end creates a control channel to be connected to the server end, reads local configuration information and uploads the configuration information to the server end, wherein the configuration information comprises information of preset equipment, and a port of the preset equipment is a port needing to be mapped to an external network;
the server side establishes a first mapping relation between the equipment side and the server side according to the configuration information;
under the condition that the debugging end is connected with the server end, the server end creates a data channel between the equipment end and the server end according to the first mapping relation;
the server side establishes a second mapping relation between the data channel and the debugging side;
and the debugging end carries out remote debugging on the preset equipment through the second mapping relation and the data channel within preset debugging time.
2. The method according to claim 1, wherein before the device side creates a control channel to connect to the server side, the method comprises:
an interface program for starting and closing remote debugging is deployed in the server;
the server side sends a parameter for controlling debugging duration to the equipment control program in the equipment side through the cloud access service;
and the equipment end writes the parameters into configuration information through the equipment control program and starts the equipment mapping program in the equipment end.
3. The method of claim 1, wherein the server side establishing the first mapping relationship between the device side and the server side according to the configuration information comprises:
and the server side opens a monitoring port at the server side through the cloud mapping service according to the configuration information, and establishes a first mapping relation between the monitoring port and the port of the preset equipment.
4. The method according to claim 1, wherein, in a case that a debug side is connected to the server side, the server side creating a data channel between the device side and the server side according to the first mapping relationship includes:
under the condition that a debugging end is connected with a monitoring port of the server end, the server end obtains a port of the preset equipment through the cloud mapping service according to the first mapping relation, and starts proxy service to the preset equipment;
and the equipment side establishes a port of the preset equipment and a data channel of the service side through the equipment mapping program according to the proxy service and a preset connection mode.
5. The method according to claim 1, wherein before the device side creates a control channel to connect to the server side, the method comprises:
setting a domain name for the server side, and setting a sub-domain name of the domain name for equipment in the equipment side;
and the server side establishes a cloud mapping table according to the ID of the equipment in the equipment side and the sub domain name through the cloud mapping service.
6. The method of claim 2, wherein after the device mapping program is initiated, the method comprises:
under the condition that a debugging stopping command sent by the server side is received, the equipment side closes the equipment mapping program through the equipment control program; or when the debugging time length specified by the parameters is over, the equipment end automatically quits running through the equipment mapping program.
7. The method of claim 5, wherein after establishing the cloud mapping table, the method comprises:
the debugging end sends a request for domain name access to the server end;
the server side establishes a data channel between the equipment side and the server side through the cloud mapping service, and inquires whether a sub domain name in the request exists in the cloud mapping table or not;
if the device exists, obtaining the ID of the corresponding device according to the cloud mapping table, and performing remote debugging on the corresponding device based on domain name connection;
and if the data does not exist, returning the nonexistence information to the debugging end.
8. The system for remotely debugging equipment is characterized by comprising an equipment end, a server end and a debugging end, wherein the equipment end comprises an equipment control program and an equipment mapping program, and the server end comprises a cloud access service and a cloud mapping service;
the device control program is connected with the cloud access service and used for controlling the device mapping program, wherein the control comprises starting, stopping and configuring;
the device mapping program is actively connected with the cloud mapping service and used for mapping the port of the device to an external network;
the cloud access service is used for sending a control command to the equipment terminal, wherein the control command comprises starting and stopping of an equipment mapping program;
the cloud mapping service is connected with the equipment mapping program and used for mapping the port of the equipment to an external network;
the debugging end accesses the equipment end through the cloud mapping service;
the method comprises the following steps of realizing remote debugging of equipment:
the equipment end creates a control channel to be connected to the server end, reads local configuration information and uploads the configuration information to the server end, wherein the configuration information comprises information of preset equipment, and a port of the preset equipment is a port needing to be mapped to an external network;
the server side establishes a first mapping relation between the equipment side and the server side according to the configuration information;
under the condition that the debugging end is connected with the server end, the server end creates a data channel between the equipment end and the server end according to the first mapping relation;
the server side establishes a second mapping relation between the data channel and the debugging side;
and the debugging end carries out remote debugging on the preset equipment through the second mapping relation and the data channel within preset debugging time.
9. An electronic apparatus comprising a memory and a processor, wherein the memory has stored therein a computer program, and the processor is configured to execute the computer program to perform the method of remote commissioning of a device of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out a method of remote commissioning of a device according to any one of claims 1 to 7.
CN202111085599.XA 2021-09-16 2021-09-16 Method, system, device and storage medium for remote debugging of equipment Active CN113973128B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111085599.XA CN113973128B (en) 2021-09-16 2021-09-16 Method, system, device and storage medium for remote debugging of equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111085599.XA CN113973128B (en) 2021-09-16 2021-09-16 Method, system, device and storage medium for remote debugging of equipment

Publications (2)

Publication Number Publication Date
CN113973128A true CN113973128A (en) 2022-01-25
CN113973128B CN113973128B (en) 2024-06-28

Family

ID=79586615

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111085599.XA Active CN113973128B (en) 2021-09-16 2021-09-16 Method, system, device and storage medium for remote debugging of equipment

Country Status (1)

Country Link
CN (1) CN113973128B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114745418A (en) * 2022-04-14 2022-07-12 北京字节跳动网络技术有限公司 Task access method, device, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102761625A (en) * 2011-04-26 2012-10-31 中国移动通信集团广东有限公司 Method and system for registering domain name for video monitoring terminal
CN104917791A (en) * 2014-03-12 2015-09-16 海尔集团公司 Method and apparatus for transmitting control instructions
CN108965256A (en) * 2018-06-15 2018-12-07 四川斐讯全智信息技术有限公司 A kind of system and method remotely managing embedded device based on SSH reverse tunnel
US20190036877A1 (en) * 2015-12-30 2019-01-31 Go Daddy Operating Company, LLC Registrant defined limitations on a control panel for a registered tertiary domain
CN110177136A (en) * 2019-05-21 2019-08-27 山东云缦智能科技有限公司 It is a kind of to manage adjustment method using Webshell reverse proxy service remote
US20200252426A1 (en) * 2019-02-01 2020-08-06 Samsung Electronics Co., Ltd. Electronic device and control method thereof
CN112671907A (en) * 2020-12-24 2021-04-16 深圳市潮流网络技术有限公司 Terminal device debugging method and device, terminal device and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102761625A (en) * 2011-04-26 2012-10-31 中国移动通信集团广东有限公司 Method and system for registering domain name for video monitoring terminal
CN104917791A (en) * 2014-03-12 2015-09-16 海尔集团公司 Method and apparatus for transmitting control instructions
US20190036877A1 (en) * 2015-12-30 2019-01-31 Go Daddy Operating Company, LLC Registrant defined limitations on a control panel for a registered tertiary domain
CN108965256A (en) * 2018-06-15 2018-12-07 四川斐讯全智信息技术有限公司 A kind of system and method remotely managing embedded device based on SSH reverse tunnel
US20200252426A1 (en) * 2019-02-01 2020-08-06 Samsung Electronics Co., Ltd. Electronic device and control method thereof
CN110177136A (en) * 2019-05-21 2019-08-27 山东云缦智能科技有限公司 It is a kind of to manage adjustment method using Webshell reverse proxy service remote
CN112671907A (en) * 2020-12-24 2021-04-16 深圳市潮流网络技术有限公司 Terminal device debugging method and device, terminal device and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
IEEE COMPUTER SOCIETY: ""IEEE Standard Computer Dictionary: A Compilation of IEEE Standard Computer Glossaries"", 《IEEE STD 610》, 18 January 1991 (1991-01-18) *
关松青: ""工业以太网中IEEE 1588时钟同步技术研究"", 《中国优秀硕士学位论文全文数据库》, 15 April 2011 (2011-04-15) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114745418A (en) * 2022-04-14 2022-07-12 北京字节跳动网络技术有限公司 Task access method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN113973128B (en) 2024-06-28

Similar Documents

Publication Publication Date Title
US8056125B2 (en) Recording medium storing control program and communication system
CN104767775B (en) Web application information push method and system
CN110138586A (en) Block chain node administration method, electronic device, system and readable storage medium storing program for executing
CN106844137A (en) The monitoring method and device of server
CN107181779B (en) Method, device and system for processing access request
WO2016029792A1 (en) Hardware device debugging method, device and system
CN112671907B (en) Terminal equipment debugging method and device, terminal equipment and storage medium
CN107623698B (en) Method and device for remotely debugging network equipment
CN104539682A (en) Debug method, device, mobile terminal, server and system for mobile webpage
CN112350861B (en) Log acquisition method, device, computer equipment and storage medium
CN111343236A (en) Method, device and communication system for communication between server and client
CN111245831B (en) FTP data transmission method and device, and information interaction system of server and client
CN113973128A (en) Method, system, device and storage medium for remote debugging of equipment
CN110661673B (en) Heartbeat detection method and device
CA3153431A1 (en) Http redirect status code capture method and apparatus, and computer device
CN112822061A (en) Method and system for exposing service to outside by edge node
CN111224811B (en) SNMP request monitoring system, method, device and computer readable storage medium
CN113141393B (en) Dynamic edge gateway log collection and management method, system, device and medium
CN111787105A (en) File transmission method and device, computer equipment and storage medium
DE602004007316T2 (en) Computer for managing the sharing of data between application programs
CN111600883A (en) Vehicle diagnosis method and system, electronic equipment and storage medium
KR101432326B1 (en) Host posing network device and method thereof
CN110784414A (en) Data interaction method and device and electronic equipment
CN107239353A (en) Inter-process communication methods and system
CN106254156B (en) Equipment access method and 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
GR01 Patent grant