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

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

Info

Publication number
CN115242771B
CN115242771B CN202211133639.8A CN202211133639A CN115242771B CN 115242771 B CN115242771 B CN 115242771B CN 202211133639 A CN202211133639 A CN 202211133639A CN 115242771 B CN115242771 B CN 115242771B
Authority
CN
China
Prior art keywords
debugging
debugged
equipment
socket
auxiliary
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.)
Active
Application number
CN202211133639.8A
Other languages
Chinese (zh)
Other versions
CN115242771A (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.)
Wuhan Haiwei Technology Co ltd
Original Assignee
Wuhan Haiwei 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 Wuhan Haiwei Technology Co ltd filed Critical Wuhan Haiwei Technology Co ltd
Priority to CN202211133639.8A priority Critical patent/CN115242771B/en
Publication of CN115242771A publication Critical patent/CN115242771A/en
Application granted granted Critical
Publication of CN115242771B publication Critical patent/CN115242771B/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/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention relates to the technical field of debugging, and discloses a device debugging method, a device, equipment and a storage medium, wherein the method comprises the following steps: acquiring a network address of equipment to be debugged, and creating a socket client in the equipment to be debugged; creating a socket server according to the network address; based on the socket client and the socket server, establishing socket long connection with the equipment to be debugged; and sending a debugging instruction to the equipment to be debugged through the socket long connection so that the equipment to be debugged carries out debugging operation according to the debugging instruction. The socket long connection is established based on a network protocol and is used as a debugging operation bridge between the equipment to be debugged and the auxiliary debugging equipment. Compared with the prior art, the method of the invention carries out debugging operation by connecting the USB interface between the equipment to be debugged and the auxiliary debugging equipment, eliminates the limitation of debugging operation depending on the USB interface in the prior art, and can carry out debugging operation on the equipment to be debugged without the USB interface.

Description

Equipment debugging method, device, equipment and storage medium
Technical Field
The present invention relates to the field of debugging technologies, and in particular, to a method, an apparatus, a device, and a storage medium for debugging a device.
Background
With the rapid development of the electronic industry, the types of user terminal devices are more and more abundant, and the hardware difference between different user terminal devices is larger and larger. Currently, the main method adopted by a user during actual debugging operation is to connect a user terminal device to be debugged and an auxiliary debugging device by using a USB connection and then perform a debugging process, which requires that both the user terminal device and the auxiliary debugging device have USB interfaces. However, not all the user terminal devices and the auxiliary debugging devices can be debugged by using the USB debugging method. For example: some devices are not reserved with USB interfaces in design, so that the devices cannot perform debugging operation. Therefore, there is a need in the industry for a method for debugging a device without using a USB interface.
The above is only for the purpose of assisting understanding of the technical solution of the present invention, and does not represent an admission that the above is the prior art.
Disclosure of Invention
The invention mainly aims to provide a device debugging method, a device, equipment and a storage medium, and aims to solve the technical problem that the prior art cannot debug equipment without a USB interface.
In order to achieve the above object, the present invention provides a device debugging method applied to an auxiliary debugging device, the method including the following steps:
acquiring a network address of a device to be debugged, wherein a socket client is created in the device to be debugged;
creating a socket server according to the network address;
establishing a socket long connection with the equipment to be debugged based on the socket client and the socket server;
and sending a debugging instruction to the equipment to be debugged through the socket long connection so as to enable the equipment to be debugged to carry out debugging operation according to the debugging instruction.
Optionally, the obtaining a network address of a device to be debugged includes:
when the device to be debugged is searched, adding a WIFI P2P group created by the device to be debugged;
and acquiring the network address of the equipment to be debugged from the WIFI P2P group.
Optionally, the creating, based on the socket client and the socket server, a socket long connection with the device to be debugged includes:
monitoring whether the equipment to be debugged sends a connection request;
and when monitoring a connection request of the equipment to be debugged, establishing a socket long connection with the equipment to be debugged based on the socket client and the socket server.
Optionally, after creating a socket long connection with the device to be debugged based on the socket client and the socket server, the method further includes:
detecting a software version of software to be debugged in the equipment to be debugged, wherein the software to be debugged is used for debugging the equipment to be debugged;
and when the software version does not belong to the latest software version, transmitting the latest debugging software apk to the equipment to be debugged so as to enable the equipment to be debugged to install the latest debugging software apk.
Optionally, the sending a debugging instruction to the device to be debugged through the socket long connection, so that the device to be debugged performs debugging operation according to the debugging instruction, includes:
and sending a debugging instruction to the equipment to be debugged through the socket long connection so that the equipment to be debugged feeds back the running state information and the running log information of the equipment to be debugged in a data stream form according to the debugging instruction.
Optionally, after sending a debugging instruction to the device to be debugged through the socket long connection, so that the device to be debugged feeds back the running state information and the log information of the device to be debugged according to the debugging instruction, the method further includes:
generating a resource file based on the running state information and the log information, wherein the resource file comprises a picture resource or a dynamic effect resource;
and sending the resource file to the equipment to be debugged so as to enable the equipment to be debugged to display the content in the resource file.
In addition, in order to achieve the above object, the present invention provides a device debugging method applied to a device to be debugged, including the following steps:
creating a socket client through preset debugging software;
sending a current network address to auxiliary debugging equipment so that the auxiliary debugging equipment creates a socket server according to the current network address;
establishing a socket long connection with the auxiliary debugging equipment based on the socket client and the socket server;
and receiving a debugging instruction sent by the auxiliary debugging equipment through the socket long connection, and carrying out debugging operation according to the debugging instruction.
In addition, to achieve the above object, the present invention further provides an apparatus debugging device, including:
the network address module is used for acquiring a network address of equipment to be debugged, and a socket client is established in the equipment to be debugged;
the port creating module is used for creating a socket server according to the network address;
the connection establishing module is used for establishing socket long connection with the equipment to be debugged based on the socket client and the socket server;
and the equipment debugging module is used for sending a debugging instruction to the equipment to be debugged through the socket long connection so as to enable the equipment to be debugged to carry out debugging operation according to the debugging instruction.
In addition, to achieve the above object, the present invention further provides an apparatus debugging apparatus, including: a memory, a processor and a device debugging program stored on the memory and executable on the processor, the device debugging program being configured to implement the steps of the device debugging method as described above.
In addition, to achieve the above object, the present invention further provides a storage medium, where a device debugging program is stored, and the device debugging program, when executed by a processor, implements the steps of the device debugging method as described above.
According to the method, the network address of the equipment to be debugged is obtained, the socket client is created in the equipment to be debugged, the socket server is created according to the network address, the socket long connection with the equipment to be debugged is created based on the socket client and the socket server, and finally the debugging instruction is sent to the equipment to be debugged through the socket long connection, so that the equipment to be debugged is debugged according to the debugging instruction. The socket long connection is established based on a network protocol and is used as a debugging operation bridge between the equipment to be debugged and the auxiliary debugging equipment. Compared with the prior art, the method for debugging the device to be debugged has the advantages that the debugging operation is performed by connecting the USB interface between the device to be debugged and the auxiliary debugging device, the method for debugging the device to be debugged adopts a wireless debugging technical means, the limitation that the debugging operation is performed by depending on the USB interface in the prior art is eliminated, and therefore the debugging operation can be performed on the device to be debugged without the USB interface.
Drawings
Fig. 1 is a schematic structural diagram of a device debugging apparatus in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a first embodiment of a device debugging method according to the present invention;
fig. 3 is a schematic diagram of a process of establishing a WIFI P2P connection by the device debugging method of the present invention;
FIG. 4 is a schematic diagram of a process of establishing a socket long connection according to the device debugging method of the present invention;
FIG. 5 is a flowchart illustrating a second embodiment of a device debugging method according to the present invention;
FIG. 6 is a flowchart illustrating a third embodiment of a device debugging method according to the present invention;
fig. 7 is a block diagram of a first embodiment of the device debugging apparatus according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a device debugging apparatus in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the device commissioning device may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a Wireless interface (e.g., a Wireless-Fidelity (Wi-Fi) interface). The Memory 1005 may be a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration shown in fig. 1 does not constitute a limitation of the device commissioning apparatus, and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a storage medium, may include therein an operating system, a network communication module, a user interface module, and a device debugging program.
In the device commissioning apparatus shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the device debugging apparatus of the present invention may be disposed in the device debugging apparatus, and the device debugging apparatus invokes the device debugging program stored in the memory 1005 through the processor 1001 and executes the device debugging method provided in the embodiment of the present invention.
An embodiment of the present invention provides an apparatus debugging method, which is applied to auxiliary debugging apparatuses, and referring to fig. 2, fig. 2 is a flowchart illustrating a first embodiment of the apparatus debugging method according to the present invention.
In this embodiment, the device debugging method includes the following steps:
step S10: the method comprises the steps of obtaining a network address of a device to be debugged, wherein a socket client is established in the device to be debugged.
It should be noted that the execution main body of the method of this embodiment may be a computing service device with functions of data processing, network communication, device debugging, program installation, and running, such as a mobile phone, a tablet computer, a personal computer, and the like, or may be other electronic devices capable of implementing the same or similar functions, which is not limited in this embodiment. The embodiments of the device debugging method of the present invention will be described herein by taking an auxiliary debugging device as an example.
It should be noted that the network address refers to a logical address of the network node of the device to be debugged in the internet, a local area network, or another network, and may be an IPV4 address, an IPV6 address, or another network address capable of addressing the network node of the device to be debugged.
It can be understood that the device to be debugged (also referred to as a debugging device) may be a computing service device with data processing, network communication, device debugging, program installation, and running functions, such as a mobile phone, a tablet computer, a personal computer, and the like, and may also be other electronic devices capable of implementing the same or similar functions, which is not limited in this embodiment.
It should be understood that the socket client is an output port of the device to be debugged for performing debugging operations on the auxiliary debugging device, and may be created by debugging software installed in the device to be debugged.
Further, in order to conveniently and quickly acquire the network address of the device to be debugged, step S10 in this embodiment may include:
step S101: and when the device to be debugged is searched, adding the WIFI P2P group created by the device to be debugged.
Referring to fig. 3, fig. 3 is a schematic diagram of a process of establishing a WIFI P2P connection by the device debugging method of the present invention.
It can be understood that the WIFI P2P group may be a network group created based on the WI-FI Direct standard, which means that devices in a wireless network may be connected to each other without a wireless router.
In specific implementation, after the WIFI switch is turned on, the auxiliary debugging equipment searches for equipment within a range in real time, and when the equipment to be debugged is searched, the auxiliary debugging equipment is added into the WIFI P2P group of the equipment to be debugged.
Step S102: and acquiring the network address of the equipment to be debugged from the WIFI P2P group.
It can be understood that, when the auxiliary debugging device joins the WIFI P2P group created by the device to be debugged, the device to be debugged exposes its own network address, and the auxiliary debugging device obtains the network address of the device to be debugged.
Step S20: and creating a socket server according to the network address.
It can be understood that the auxiliary debugging device may enter the debugging software, and bind the network address by calling the bind instruction, thereby creating the socket server.
Step S30: and establishing a socket long connection with the equipment to be debugged based on the socket client and the socket server.
Referring to fig. 4, fig. 4 is a schematic diagram of a process of establishing a socket long connection by the device debugging method of the present invention.
It should be understood that, when the socket client establishes a connection with the socket server, it is equivalent to that the device to be debugged establishes a connection with the auxiliary debugging device.
Further, in order to ensure that the socket long connection is successfully established between the device to be debugged and the debugging device, step S30 in this embodiment may include:
step S301: and monitoring whether the equipment to be debugged sends a connection request.
It can be understood that, before the socket long connection is established, the auxiliary debugging device may send a monitoring instruction through the socket server, where the monitoring instruction is used to monitor the device to be debugged in a preset time and a preset range to see whether the device to be debugged sends a connection request. Considering that the auxiliary debugging device may monitor uninterruptedly due to user misoperation, device failure or other abnormal reasons in the process of actually establishing the socket, the preset time may be defined by the user. When the connection request of any equipment to be debugged is not monitored within the preset time, the monitoring operation of the equipment to be debugged is automatically closed, so that the energy loss caused by uninterrupted monitoring under the abnormal condition of the equipment to be debugged is reduced. The preset range refers to a maximum range within which the auxiliary debugging device can monitor the connection request of the device to be debugged, and depends on the internal configuration of the auxiliary debugging device, which is not described herein any more.
Step S302: and when monitoring a connection request of the equipment to be debugged, establishing a socket long connection with the equipment to be debugged based on the socket client and the socket server.
It should be noted that the socket long connection is a communication connection mode created based on a TCP network protocol. Through socket long connection, a plurality of data packets can be continuously sent, wherein the data packets refer to debugging data needing to be transmitted between the auxiliary debugging equipment and the equipment to be debugged. During the connection period of the auxiliary debugging equipment and the equipment to be debugged, if no data packet is sent, a heartbeat packet needs to be sent by two sides to maintain the connection, wherein the heartbeat packet refers to that a command word of the self state is sent to the other side between the socket client and the socket server at regular time and is sent according to a certain time interval, and the time interval can be defined by a user.
It can be understood that the device to be debugged sends a connection request to the socket server through the socket client, and after the socket server monitors the connection request and agrees, a socket long connection with the device to be debugged is established.
Step S40: and sending a debugging instruction to the equipment to be debugged through the socket long connection so as to enable the equipment to be debugged to carry out debugging operation according to the debugging instruction.
In the embodiment, a network address of the device to be debugged is acquired, a socket client is created in the device to be debugged, a socket server is created according to the network address, a socket long connection with the device to be debugged is created based on the socket client and the socket server, and finally a debugging instruction is sent to the device to be debugged through the socket long connection, so that the device to be debugged performs debugging operation according to the debugging instruction. In the embodiment, the socket long connection is created based on a network protocol, and is used as a debugging operation bridge between the device to be debugged and the auxiliary debugging device. Compared with the prior art, the method carries out debugging operation by connecting the USB interface between the equipment to be debugged and the auxiliary debugging equipment, and the method adopts the technical means of wireless debugging to debug the equipment to be debugged, thereby eliminating the limitation that debugging operation is carried out by relying on the USB interface in the prior art, and further carrying out debugging operation on the equipment to be debugged without the USB interface.
Referring to fig. 5, fig. 5 is a flowchart illustrating a device debugging method according to a second embodiment of the present invention.
Based on the first embodiment, in this embodiment, in order to obtain the running state information and the running log information of the device to be debugged, so as to complete the debugging operation of the device to be debugged, the step S40 may include:
step S401: and sending a debugging instruction to the equipment to be debugged through the socket long connection so that the equipment to be debugged feeds back the running state information and the running log information of the equipment to be debugged in a data stream mode according to the debugging instruction.
It should be noted that the data stream is an ordered data sequence having a start point and an end point, and includes an input stream and an output stream, where the input stream can only read and cannot write, and the output stream can only write and cannot read. In general, the device to be debugged reads data using the input stream and the output stream writes data.
It is understood that the above-mentioned operation log information may include a record set of other behaviors, such as sending behavior, receiving behavior, parsing behavior, etc., of the device to be debugged, which includes historical log information and real-time log information. And the running log information is recorded through a text file and stored in a memory of the device to be debugged.
In a specific implementation, when the auxiliary debugging equipment sends a debugging instruction to obtain running state information, the equipment to be debugged analyzes the debugging instruction, captures the running state information on the equipment, such as data of CPU, memory occupation and the like, stores the data in a text file of the equipment, and sends the running state information file to the auxiliary debugging equipment in a data stream form for analysis by developers; when the auxiliary debugging equipment sends a debugging instruction to obtain the running log information of the equipment, the equipment to be debugged analyzes the debugging instruction, executes a script for capturing the running log information, stores the running log information into the equipment, and simultaneously sends the running log information file to the auxiliary debugging equipment in a data stream mode for analysis by developers.
Further, in order to observe the resource file content corresponding to the debugging operation on the device to be debugged, after step S401 in this embodiment, the method may further include:
step S402: and generating a resource file based on the running state information and the log information, wherein the resource file comprises picture resources or dynamic effect resources.
It should be noted that the resource file refers to a file from which a required resource can be read, where the required resource may be a picture resource, an audio resource, a video resource, a text resource, and the like. The resource files are of many types, and the suffix names of the files are not limited.
Step S403: and sending the resource file to the equipment to be debugged so as to enable the equipment to be debugged to display the content in the resource file.
It should be understood that before the auxiliary device sends the resource file to the device to be debugged, the resource file needs to be encrypted, and the encryption mode may be a public key encryption mode, a private key encryption mode, or another encryption mode capable of encrypting the resource file, which is not limited in this embodiment.
In specific implementation, the auxiliary debugging device sends the picture resource or the dynamic resource to be displayed to the device to be debugged, the device to be debugged receives the resource file and then transfers the resource file to a target path, and the program is run to display the resource file.
Further, in order to enable the device to be detected to receive the latest version of the debugging software, after step S40 in this embodiment, the method further includes:
step S31: and detecting the software version of the software to be debugged in the equipment to be debugged, wherein the software to be debugged is used for debugging the equipment to be debugged.
It can be understood that when the socket long connection is established between the auxiliary debugging device and the device to be debugged, the auxiliary debugging device sends a detection instruction to the device to be debugged, so as to detect the software version of the software to be debugged in the device to be debugged.
Step S32: and when the software version does not belong to the latest software version, transmitting the latest debugging software apk to the equipment to be debugged so as to enable the equipment to be debugged to install the latest debugging software apk.
It should be noted that the latest debugging software apk refers to the latest application package of the debugging software, and is used for providing the latest debugging software for the auxiliary debugging device and the device to be debugged.
It should be understood that the latest debugging software apk may be obtained by connecting the auxiliary debugging device to the computer through the USB interface, or may be obtained by downloading the auxiliary debugging software apk from the network, which is not limited in this embodiment.
In this embodiment, a socket long connection is used to send a debugging instruction to a device to be debugged, a resource file is generated based on the running state information and the log information, and finally the resource file is sent to the device to be debugged, so that the device to be debugged displays the content in the resource file. In the embodiment, the device to be debugged sends the running state information and the running log information to the auxiliary debugging device in a data stream mode, so that a developer can perform debugging analysis. Compared with the mode that the USB is used for manually connecting the equipment to be debugged and the auxiliary debugging equipment in the prior art, the method improves the convenience in the debugging process.
Based on the foregoing embodiment of the device debugging method of the present invention, an embodiment of the present invention further provides a device debugging method, which is applied to a device to be debugged, and referring to fig. 6, fig. 6 is a flowchart illustrating a third embodiment of the device debugging method of the present invention.
In this embodiment, the device debugging method includes the following steps:
step S100: and creating a socket client through preset debugging software.
Optionally, the step S100 may include:
step S1001: a WiFi P2P group is created.
Step S1002: and sending the network address to auxiliary debugging equipment through the WiFi P2P group.
Step S200: and sending the current network address to auxiliary debugging equipment so that the auxiliary debugging equipment creates a socket server according to the current network address.
Step S300: and establishing a socket long connection between the socket client and the socket server, based on the socket client and the socket server.
Optionally, the step S300 may include:
step S3001: and sending a connection request to the auxiliary debugging equipment.
Step S3002: and when the auxiliary debugging equipment receives and agrees with a connection request, creating a socket long connection between the auxiliary debugging equipment and the equipment to be debugged based on the socket client and the socket server.
Optionally, after the step S300, the method may further include:
step S301: and detecting the software version of the software to be debugged through the auxiliary debugging equipment.
Step S302: and when the software version does not belong to the latest software version, receiving the latest debugging software apk sent by the auxiliary debugging equipment, and installing the latest debugging software apk.
Step S400: and receiving a debugging instruction sent by the auxiliary debugging equipment through the socket long connection, and carrying out debugging operation according to the debugging instruction.
Optionally, the step S400 may include:
step S4001: and receiving a debugging instruction of the auxiliary debugging equipment through the socket long connection, and sending the running state information and the running log information to the auxiliary debugging equipment in a data stream form according to the debugging instruction.
Optionally, after the step S4001, the method may further include:
step S4002: and sending a resource file production instruction to the auxiliary debugging equipment so that the auxiliary debugging equipment generates a resource file according to the running state information and the log information, wherein the resource file comprises picture resources or dynamic resources.
Step S4003: and receiving the resource file and displaying the content in the resource file.
In this embodiment, a socket client is created through preset debugging software, and a current network address is sent to an auxiliary debugging device, so that the auxiliary debugging device creates a socket server according to the current network address, and based on the socket client and the socket server, a socket long connection with the auxiliary debugging device is created, and finally, a debugging instruction sent by the auxiliary debugging device is received through the socket long connection, and debugging operation is performed according to the debugging instruction. In the embodiment, the socket long connection is created based on a network protocol, and is used as a debugging operation bridge between the device to be debugged and the auxiliary debugging device. Compared with the prior art, the method carries out debugging operation by connecting the USB interface between the equipment to be debugged and the auxiliary debugging equipment, and the method of the embodiment adopts the technical means of wireless debugging to debug the equipment to be debugged, thereby eliminating the limitation of debugging operation depending on the USB interface in the prior art, and further carrying out debugging operation on the equipment to be debugged without the USB interface.
In addition, an embodiment of the present invention further provides a storage medium, where the storage medium stores a device debugging program, and the device debugging program, when executed by a processor, implements the steps of the device debugging method described above.
Referring to fig. 7, fig. 7 is a block diagram of a first embodiment of the device debugging apparatus of the present invention.
As shown in fig. 7, the device debugging apparatus provided in the embodiment of the present invention includes:
a network address module 701, configured to obtain a network address of a device to be debugged, where a socket client is created in the device to be debugged;
a port creating module 702, configured to create a socket server according to the network address;
a connection establishing module 703, configured to establish a socket long connection with the device to be debugged based on the socket client and the socket server;
and the device debugging module 704 is configured to send a debugging instruction to the device to be debugged through the socket long connection, so that the device to be debugged performs debugging operation according to the debugging instruction.
In this embodiment, a socket client is created in the device to be debugged by obtaining a network address of the device to be debugged, a socket server is created according to the network address, then, a socket long connection between the device to be debugged and the socket server is created based on the socket client and the socket server, and finally, a debugging instruction is sent to the device to be debugged through the socket long connection, so that the device to be debugged performs debugging operation according to the debugging instruction. In the embodiment, the socket long connection is created based on a network protocol, and is used as a debugging operation bridge between the device to be debugged and the auxiliary debugging device. Compared with the prior art, the method carries out debugging operation by connecting the USB interface between the equipment to be debugged and the auxiliary debugging equipment, and the method of the embodiment adopts the technical means of wireless debugging to debug the equipment to be debugged, thereby eliminating the limitation of debugging operation depending on the USB interface in the prior art, and further carrying out debugging operation on the equipment to be debugged without the USB interface.
Other embodiments or specific implementation manners of the device debugging apparatus of the present invention may refer to the above method embodiments, and are not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of other like elements in a process, method, article, or system comprising the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., a rom/ram, a magnetic disk, an optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (6)

1. A device debugging method is applied to auxiliary debugging devices, and comprises the following steps:
acquiring a network address of a device to be debugged, wherein a socket client is created in the device to be debugged;
creating a socket server according to the network address;
establishing a socket long connection with the equipment to be debugged based on the socket client and the socket server;
when data sent by the equipment to be debugged is not received within a preset time, sending a heartbeat packet to the equipment to be debugged to maintain the socket long connection with the equipment to be debugged, wherein the heartbeat packet is a command word containing a self state;
sending a debugging instruction to the equipment to be debugged through the socket long connection so that the equipment to be debugged carries out debugging operation according to the debugging instruction;
detecting a software version of debugging software in the equipment to be debugged, wherein the debugging software is used for debugging the equipment to be debugged;
when the software version does not belong to the latest software version, the latest debugging software apk is sent to the equipment to be debugged, so that the equipment to be debugged is provided with the latest debugging software apk;
the acquiring the network address of the device to be debugged includes:
when the device to be debugged is searched, adding a WIFI P2P group created by the device to be debugged;
acquiring a network address of the device to be debugged from the WIFI P2P group;
sending a debugging instruction to the equipment to be debugged through the socket long connection so as to enable the equipment to be debugged to carry out debugging operation according to the debugging instruction, and the method comprises the following steps:
sending a debugging instruction to the equipment to be debugged through the socket long connection so that the equipment to be debugged feeds back running state information and running log information of the equipment to be debugged in a data stream mode according to the debugging instruction, wherein the data stream comprises an input stream and an output stream, and the equipment to be debugged reads data through the input stream and writes data through the output stream;
generating a resource file based on the running state information and the log information, wherein the resource file comprises a picture resource or a dynamic effect resource;
and encrypting the resource file by a private key and then sending the encrypted resource file to the equipment to be debugged so as to enable the equipment to be debugged to display the content in the resource file.
2. The device debugging method of claim 1, wherein the creating of the socket long connection with the device to be debugged based on the socket client and the socket server comprises:
monitoring whether the equipment to be debugged sends a connection request;
when a connection request of the equipment to be debugged is monitored, a socket long connection between the equipment to be debugged and the socket client is established based on the socket client and the socket server.
3. A device debugging method is applied to a device to be debugged, and comprises the following steps:
creating a socket client through preset debugging software;
sending a current network address to auxiliary debugging equipment so that the auxiliary debugging equipment creates a socket server according to the current network address;
establishing a socket long connection with the auxiliary debugging equipment based on the socket client and the socket server;
when data sent by the auxiliary debugging equipment is not received within preset time, sending a heartbeat packet to the auxiliary debugging equipment to maintain the socket long connection with the auxiliary debugging equipment, wherein the heartbeat packet is a command word containing a self state;
receiving a debugging instruction sent by the auxiliary debugging equipment through the socket long connection, and carrying out debugging operation according to the debugging instruction;
detecting the software version of the software to be debugged through auxiliary debugging equipment;
when the software version does not belong to the latest software version, receiving the latest debugging software apk sent by the auxiliary debugging equipment, and installing the latest debugging software apk;
the debugging device receives a debugging instruction sent by the auxiliary debugging device through the socket long connection, and carries out debugging operation according to the debugging instruction, wherein the debugging operation comprises the following steps of;
receiving a debugging instruction of the auxiliary debugging equipment through the socket long connection, and sending running state information and running log information to the auxiliary debugging equipment in a data stream form according to the debugging instruction;
sending a resource file production instruction to the auxiliary debugging equipment so that the auxiliary debugging equipment generates a resource file according to the running state information and the log information, wherein the resource file comprises picture resources or dynamic effect resources;
and receiving the resource file and displaying the content in the resource file.
4. An apparatus commissioning device, comprising:
the network address module is used for acquiring a network address of equipment to be debugged, and a socket client is established in the equipment to be debugged;
the port creating module is used for creating a socket server according to the network address;
the connection establishing module is used for establishing socket long connection with the equipment to be debugged based on the socket client and the socket server;
the device debugging module is used for sending a debugging instruction to the device to be debugged through the socket long connection so as to enable the device to be debugged to carry out debugging operation according to the debugging instruction;
the software detection module is used for detecting the software version of debugging software in the equipment to be debugged, and the debugging software is used for debugging the equipment to be debugged;
the software updating module is used for sending the latest debugging software apk to the equipment to be debugged when the software version does not belong to the latest software version so as to enable the equipment to be debugged to install the latest debugging software apk;
wherein the network address module is further configured to:
when the device to be debugged is searched, adding a WIFI P2P group created by the device to be debugged;
acquiring a network address of the device to be debugged from the WIFI P2P group;
the connection establishing module is further configured to:
when data sent by the equipment to be debugged is not received within preset time, sending a heartbeat packet to the equipment to be debugged to maintain the socket long connection with the equipment to be debugged, wherein the heartbeat packet is a command word containing a self state;
the device debugging module is further configured to:
sending a debugging instruction to the equipment to be debugged through the socket long connection so that the equipment to be debugged feeds back running state information and running log information of the equipment to be debugged in a data stream form according to the debugging instruction, wherein the data stream comprises an input stream and an output stream, and the equipment to be debugged reads data through the input stream and writes data through the output stream;
generating a resource file based on the running state information and the log information, wherein the resource file comprises a picture resource or a dynamic effect resource;
and encrypting the resource file by a private key and then sending the encrypted resource file to the equipment to be debugged so as to enable the equipment to be debugged to display the content in the resource file.
5. A device commissioning device, said device comprising: a memory, a processor, and a device debug program stored on the memory and executable on the processor, the device debug program configured to implement the steps of the device debugging method of any of claims 1 to 2 or 3.
6. A storage medium having stored thereon a device commissioning program which, when executed by a processor, implements the steps of the device commissioning method of any one of claims 1 to 2 or 3.
CN202211133639.8A 2022-09-19 2022-09-19 Equipment debugging method, device, equipment and storage medium Active CN115242771B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211133639.8A CN115242771B (en) 2022-09-19 2022-09-19 Equipment debugging method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211133639.8A CN115242771B (en) 2022-09-19 2022-09-19 Equipment debugging method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115242771A CN115242771A (en) 2022-10-25
CN115242771B true CN115242771B (en) 2023-01-31

Family

ID=83681321

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211133639.8A Active CN115242771B (en) 2022-09-19 2022-09-19 Equipment debugging method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115242771B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103916663A (en) * 2014-03-25 2014-07-09 烽火通信科技股份有限公司 Method for realizing remote debugging of IPTV set top box
CN104468260A (en) * 2014-11-13 2015-03-25 百度在线网络技术(北京)有限公司 Recognition method, device and system for mobile terminal device
CN109977013A (en) * 2019-03-19 2019-07-05 深圳市腾讯信息技术有限公司 A kind of Debugging message acquisition methods, system and device
CN113641582A (en) * 2021-08-11 2021-11-12 上海哔哩哔哩科技有限公司 Mixed-mode mobile application debugging method and system
CN113722205A (en) * 2020-05-26 2021-11-30 华为技术有限公司 Application debugging method, device, equipment and medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112036857B (en) * 2019-06-04 2024-04-19 珠海格力电器股份有限公司 Multi-split household charging debugging method, household charging system and multi-split air conditioner
US11256561B1 (en) * 2021-03-04 2022-02-22 Smart Information Flow Technologies, LLC Computer program crash handling

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103916663A (en) * 2014-03-25 2014-07-09 烽火通信科技股份有限公司 Method for realizing remote debugging of IPTV set top box
CN104468260A (en) * 2014-11-13 2015-03-25 百度在线网络技术(北京)有限公司 Recognition method, device and system for mobile terminal device
CN109977013A (en) * 2019-03-19 2019-07-05 深圳市腾讯信息技术有限公司 A kind of Debugging message acquisition methods, system and device
CN113722205A (en) * 2020-05-26 2021-11-30 华为技术有限公司 Application debugging method, device, equipment and medium
WO2021239157A1 (en) * 2020-05-26 2021-12-02 华为技术有限公司 Application debugging method and apparatus, and device and medium
CN113641582A (en) * 2021-08-11 2021-11-12 上海哔哩哔哩科技有限公司 Mixed-mode mobile application debugging method and system

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
基于Android平台的无线WiFi控制方法;王雷等;《微型电脑应用》;20120720(第07期);正文第1节 *
基于Android的超市冷链设备数据监测系统设计;余梦等;《自动化与仪表》;20180115(第01期);全文 *
基于Socket的无线数据传输的驱动程序设计与实现;徐鹏;《电脑知识与技术》;20180215(第05期);全文 *
基于Windows Mobile的蓝牙GPS数据采集方法的改进;张增华等;《微计算机信息》;20070715(第20期);全文 *

Also Published As

Publication number Publication date
CN115242771A (en) 2022-10-25

Similar Documents

Publication Publication Date Title
CN107463499B (en) ADB remote connection method, device, equipment and storage medium
US9251039B2 (en) Remote debugging as a service
US9542302B2 (en) System and method for remote debugging of an application in an image forming apparatus over a network
CN106484611B (en) Fuzzy test method and device based on automatic protocol adaptation
CN108664395B (en) Application program testing method, device, equipment and storage medium
US9990214B2 (en) Dynamic agent delivery
US10084637B2 (en) Automatic task tracking
US10404568B2 (en) Agent manager for distributed transaction monitoring system
CN112019609B (en) Equipment monitoring method, device, equipment and computer medium based on Internet of things
CN114490383A (en) Remote debugging system, remote debugging method, computing device and readable medium
CN112994982A (en) Packet capture control method, device and system of cloud-real machine and storage medium
CN111866083A (en) Equipment debugging system and method, equipment to be debugged, remote debugging equipment and transfer server
CN115242771B (en) Equipment debugging method, device, equipment and storage medium
CN109787963A (en) Business handling method, apparatus, computer equipment and storage medium
CN112685301A (en) Fuzzy test method and device
CN110190980B (en) System and method for supporting plug-in access to different blockchain alliance chain networks
CN109388917B (en) Hardware equipment authentication method, device, equipment and storage medium
JP4636775B2 (en) Network monitoring system
CN108279855B (en) Method for reading and writing storage device
CN116132344A (en) Container service debugging method and device based on K8s cluster and electronic equipment
CN113391931B (en) Remote control method and device based on Bluetooth, computer equipment and storage medium
US20170220796A1 (en) Isolation of Untrusted Code in Operating System Without Isolation Capability
US20210120037A1 (en) Monitoring apparatus, monitoring method, and program
CN109271310B (en) Development testing method and device for network function of mobile application program
JP2009225089A (en) Communication device and method of capturing packet

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
GR01 Patent grant
CP03 Change of name, title or address

Address after: Room 572, 18th Floor, Building B4, Phase I, Longshan Innovation Park, Wuhan Future Science and Technology City, No. 999 Gaoxin Avenue, Donghu New Technology Development Zone, Wuhan City, Hubei Province, 430000

Patentee after: Wuhan Haiwei Technology Co.,Ltd.

Country or region after: China

Address before: 430000 room 1588-2, 15 / F, B3 building, zone II, National Geospatial Information Industry base, No. 3, wudayuan 4th Road, East Lake New Technology Development Zone, Wuhan, Hubei

Patentee before: WUHAN HAIWEI TECHNOLOGY Co.,Ltd.

Country or region before: China

CP03 Change of name, title or address