Remote debugging information acquisition method, device, server, client and medium
By generating different request identifiers on the server and utilizing third-party services, the privacy and security of remote debugging equipment information collection is solved, and the ability of multiple technical support personnel to debug equipment simultaneously is realized, which improves debugging efficiency and security. sex.
Patent Information
- Application Number
- CN202411162334.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-08-21
AI Technical Summary
The prior art is difficult to realize the information collection of remote debugging equipment, especially when the equipment is not in the same local area network, resulting in high operating costs and privacy and security issues.
By generating different request identifiers on the server, obtaining remote debugging connection information, and establishing an authorization relationship with the equipment to be debugged using third-party services, multiple technical support personnel can debug a device at the same time, avoiding directly obtaining the device administrator account and password, and ensuring the device Privacy and security.
The ability of multiple technical support personnel to debug a device at the same time is realized, reducing operational costs, improving debugging efficiency and security, and ensuring the privacy and security of the device.
Smart Images

Figure CN118672809B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, server, client and medium for obtaining remote debugging information. Background Art
[0002] After customers purchase equipment, they may encounter problems during use. The equipment supplier's technical support personnel need to assist customers in debugging the equipment and solving the problems.
[0003] In order to debug the device, the technical support personnel need to rely on some information. For the convenience of expression, the above information that the technical support personnel need to rely on is called debugging information. Therefore, a method for obtaining debugging information is needed to obtain information to assist the technical support personnel in debugging the customer's device. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a method, device, server, client and medium for obtaining remote debugging information, so as to obtain information to assist technical support personnel in debugging customer equipment.
[0005] The specific technical solutions are as follows:
[0006] According to one aspect of an embodiment of the present application, a method for obtaining remote debugging information is provided, which is applied to a server, and the method includes:
[0007] In response to remote debugging requests from multiple first clients for the device to be debugged, generating a different request identifier for each remote debugging request;
[0008] Based on the request identifier of each remote debugging request, request the target end for the remote debugging connection information corresponding to each remote debugging request, wherein the remote debugging connection information includes: a connection address and a connection identifier, and the connection identifiers in different remote debugging connection information are different, and the target end is: the device to be debugged or a third-party service;
[0009] Obtaining remote debugging connection information fed back by the target end;
[0010] Feedback the request identifier of the sent remote debugging request and the corresponding remote debugging connection information to each first client, so that each first client establishes a remote debugging connection with the device to be debugged based on the received information, and then obtains log data as debugging information from the device to be debugged based on the established remote debugging connection.
[0011] In a possible implementation manner, the method further includes:
[0012] Receiving a debugging status query request sent by the first client based on the device identification;
[0013] Based on the device identification carried in the debugging status query request, obtaining the debugging status of the device to be debugged;
[0014] Feedback the debugging status to the first client.
[0015] In a possible implementation manner, obtaining the debugging status of the device to be debugged based on the device identifier carried in the debugging status query request includes:
[0016] Based on the device identification carried in the debugging status query request, query the target authorized debugging duration of the device to be debugged from the recorded authorized debugging duration;
[0017] If the target authorized debugging duration is found, determine whether the authorized duration of the device to be debugged reaches the target authorized debugging duration;
[0018] If not reached, determining that the debugging state of the device to be debugged indicates that the device to be debugged has been authorized for remote debugging; and / or,
[0019] If it has been reached, determining that the debugging state of the device to be debugged indicates that the device to be debugged is not authorized for remote debugging; and / or,
[0020] If the target authorized debugging duration is not found, it is determined that the debugging state of the device to be debugged indicates that the device to be debugged is not authorized for remote debugging.
[0021] In a possible implementation manner, the method further includes:
[0022] Receiving a device identification and a target authorized debugging duration for the device to be debugged sent by a second client;
[0023] The target authorized debugging duration is stored according to the device identification.
[0024] In a possible implementation, when the target end is the third-party service, the remote debugging connection information is: information sent to the server when the third-party service determines that it has established an authorization relationship with the server and has established an authorization relationship with the device to be debugged.
[0025] According to another aspect of an embodiment of the present application, a method for obtaining remote debugging information is provided, which is applied to a first client, and the method includes:
[0026] Send a remote debugging request for the device to be debugged to the server;
[0027] Receive the request identifier and remote debugging connection information of the remote debugging request fed back by the server, wherein the remote debugging connection information includes: a connection address and a connection identifier, and the remote debugging connection information is provided by the target end to the server, and the target end is: the device to be debugged or a third-party service;
[0028] Establishing a debugging connection with the device to be debugged based on the request identifier and the remote debugging connection information;
[0029] Log data as debugging information is obtained from the device to be debugged based on the established connection.
[0030] In a possible implementation manner, if the target end is the third-party service, the connection address is an address for connecting to the third-party service;
[0031] The step of establishing a debugging connection with the device to be debugged based on the request identifier and the remote debugging connection information includes:
[0032] Based on the request identifier and the remote debugging connection information, request to establish a first connection with the target end;
[0033] After the first connection is successfully established, a remote debugging interface is displayed;
[0034] Based on the remote login information input by the user in the remote debugging interface, a request is made to establish a second connection with the target end, so that the target end establishes a third connection with the device to be debugged after successfully establishing the second connection.
[0035] In a possible implementation manner, obtaining log data as debugging information from the device to be debugged based on the established connection includes:
[0036] Sending a debugging information obtaining request to the target end based on the second connection, so that the target end sends the debugging information obtaining request to the device to be debugged based on the third connection;
[0037] Receive debugging information fed back by the target end, wherein the debugging information is: a log fed back to the target end through the third connection after the device to be debugged obtains the log based on the debugging information obtaining request.
[0038] In a possible implementation manner, the method further includes:
[0039] Generate debugging instructions based on the debugging information;
[0040] The debugging instruction is sent to the target end through the second connection, so that the target end instructs the device to be debugged to execute the debugging instruction through the third connection.
[0041] In a possible implementation manner, before sending the remote debugging request for the device to be debugged to the server, the method further includes:
[0042] Get the device ID of the device to be debugged;
[0043] Based on the device identification, sending a debugging status query request to the server;
[0044] Receiving the debugging status of the device to be debugged fed back by the server;
[0045] If the debugging state indicates that the device to be debugged has been authorized for remote debugging, the step of sending a remote debugging request for the device to be debugged to the server is performed.
[0046] According to another aspect of an embodiment of the present application, a remote debugging information obtaining device is provided, which is applied to a server, and the device includes:
[0047] A first generating module, configured to generate a different request identifier for each remote debugging request in response to remote debugging requests from multiple first clients for the device to be debugged;
[0048] A request module, configured to request remote debugging connection information corresponding to each remote debugging request from a target end based on a request identifier of each remote debugging request, wherein the remote debugging connection information includes: a connection address and a connection identifier, and the connection identifiers in different remote debugging connection information are different, and the target end is: the device to be debugged or a third-party service;
[0049] A first obtaining module is used to obtain the remote debugging connection information fed back by the target end;
[0050] The first feedback module is used to feed back the request identifier of the sent remote debugging request and the corresponding remote debugging connection information to each first client, so that each first client establishes a remote debugging connection with the device to be debugged based on the received information, and then obtains log data as debugging information from the device to be debugged based on the established remote debugging connection.
[0051] In a possible implementation, the device also includes: a first receiving module, used to receive a debugging status query request sent by the first client based on a device identifier; a second obtaining module, used to obtain the debugging status of the device to be debugged based on the device identifier carried in the debugging status query request; and a second feedback module, used to feedback the debugging status to the first client.
[0052] In a possible implementation manner, the second obtaining module is specifically used to: based on the device identification carried in the debugging status query request, query the target authorized debugging duration of the device to be debugged from the recorded authorized debugging duration; if the target authorized debugging duration is queried, determine whether the authorized duration of the device to be debugged reaches the target authorized debugging duration; if not reached, determine that the debugging status of the device to be debugged represents that the device to be debugged is authorized for remote debugging; and / or, if reached, determine that the debugging status of the device to be debugged represents that the device to be debugged is not authorized for remote debugging; and / or, if the target authorized debugging duration is not queried, determine that the debugging status of the device to be debugged represents that the device to be debugged is not authorized for remote debugging.
[0053] In a possible implementation, the apparatus further includes: a second receiving module, configured to receive a device identification and a target authorized debugging duration for the device to be debugged sent by a second client; and a storage module, configured to store the target authorized debugging duration according to the device identification.
[0054] In a possible implementation, when the target end is the third-party service, the remote debugging connection information is: information sent to the server when the third-party service determines that it has established an authorization relationship with the server and has established an authorization relationship with the device to be debugged.
[0055] According to another aspect of an embodiment of the present application, a remote debugging information obtaining device is provided, which is applied to a first client, and the device includes:
[0056] A first sending module, used for sending a remote debugging request for a device to be debugged to a server;
[0057] A third receiving module is used to receive the request identifier and remote debugging connection information of the remote debugging request fed back by the server, wherein the remote debugging connection information includes: a connection address and a connection identifier, and the remote debugging connection information is provided by the target end to the server, and the target end is: the device to be debugged or a third-party service;
[0058] An establishing module, used for establishing a debugging connection with the device to be debugged based on the request identifier and the remote debugging connection information;
[0059] The third obtaining module is used to obtain log data as debugging information from the device to be debugged based on the established connection.
[0060] In one possible implementation, if the target end is the third-party service, the connection address is the address for connecting to the third-party service; the establishment module is specifically used to: request to establish a first connection with the target end based on the request identifier and the remote debugging connection information; after successfully establishing the first connection, display a remote debugging interface; based on the remote login information entered by the user in the remote debugging interface, request to establish a second connection with the target end, so that the target end establishes a third connection with the device to be debugged after successfully establishing the second connection.
[0061] In a possible implementation, the establishment module is specifically used to: send a debugging information acquisition request to the target end based on the second connection, so that the target end sends the debugging information acquisition request to the device to be debugged based on the third connection; receive debugging information fed back by the target end, wherein the debugging information is: the log that the device to be debugged feeds back to the target end through the third connection after obtaining the log based on the debugging information acquisition request.
[0062] In a possible implementation, the apparatus further includes: a second generating module, configured to generate a debugging instruction based on the debugging information; and a second sending module, configured to send the debugging instruction to the target end via the second connection, so that the target end instructs the device to be debugged to execute the debugging instruction via the third connection.
[0063] In a possible implementation, the device further includes: an acquisition module, used to acquire a device identification of the device to be debugged; a third sending module, used to send a debugging status query request to a server based on the device identification; a fourth receiving module, used to receive the debugging status of the device to be debugged fed back by the server; if the debugging status indicates that the device to be debugged has been authorized for remote debugging, executing the step of sending a remote debugging request for the device to be debugged to the server.
[0064] According to another aspect of an embodiment of the present application, a server is provided, including:
[0065] Memory, used to store computer programs;
[0066] The processor is used to implement any of the above-mentioned methods for obtaining remote debugging information applied to the server when executing the program stored in the memory.
[0067] According to another aspect of an embodiment of the present application, a client is provided, including:
[0068] Memory, used to store computer programs;
[0069] The processor is used to implement any of the above-mentioned methods for obtaining remote debugging information applied to the first client when executing the program stored in the memory.
[0070] According to another aspect of an embodiment of the present application, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any of the above-mentioned methods for obtaining remote debugging information is implemented.
[0071] An embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute any of the above-mentioned methods for obtaining remote debugging information.
[0072] Beneficial effects of the embodiments of the present application:
[0073] In the technical solution provided in the embodiment of the present application, the server generates different request identifiers for remote debugging requests sent by different first clients, and the connection identifiers in different remote debugging connection information obtained based on the request identifiers are also different. Therefore, different first clients can be distinguished, thereby enabling multiple first clients, that is, multiple technical support personnel to debug a device at the same time, and each first client can accurately obtain information to assist the technical support personnel in debugging the customer's device.
[0074] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0076] Figure 1 A flowchart of a method for obtaining remote debugging information applied to a server provided in an embodiment of the present application;
[0077] Figure 2 A first signaling interaction diagram of the remote debugging information obtaining method provided in an embodiment of the present application;
[0078] Figure 3 A second signaling interaction diagram of the remote debugging information obtaining method provided in an embodiment of the present application;
[0079] Figure 4 A flowchart of a debugging status query method provided in an embodiment of the present application;
[0080] Figure 5 A signaling interaction diagram of the debugging status query method provided in an embodiment of the present application;
[0081] Figure 6 A detailed flow chart of step S402 provided in an embodiment of the present application;
[0082] Figure 7 A signaling interaction diagram of a method for obtaining target authorization debugging duration provided in an embodiment of the present application;
[0083] Figure 8 A first flow chart of a method for obtaining remote debugging information applied to a first client provided in an embodiment of the present application;
[0084] Fig. 9 A detailed flow chart of step S803 provided in an embodiment of the present application;
[0085] Fig.10 A second flow chart of a method for obtaining remote debugging information applied to a first client provided in an embodiment of the present application;
[0086] Fig.11 A third signaling interaction diagram of the remote debugging information obtaining method provided in an embodiment of the present application;
[0087] Fig.12 A schematic diagram of a structure of a remote debugging information obtaining device applied to a server provided in an embodiment of the present application;
[0088] Fig.13 A schematic diagram of a structure of a remote debugging information obtaining device applied to a first client provided in an embodiment of the present application;
[0089] Fig.14 A schematic diagram of the structure of the server provided in the embodiment of the present application;
[0090] Fig.15 A schematic diagram of the structure of a client provided in an embodiment of the present application. DETAILED DESCRIPTION
[0091] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.
[0092] After customers purchase equipment, they may encounter problems during use. The equipment supplier's technical support personnel need to assist customers in debugging the equipment and solving the problems.
[0093] In order to debug the device, the technical support personnel need to rely on some information. For the convenience of expression, the above information that the technical support personnel need to rely on is called debugging information. Therefore, a method for obtaining debugging information is needed to obtain information to assist the technical support personnel in debugging the customer's device.
[0094] Currently, except for some customer devices that support remote collection of debugging information, the only way to collect information from most customer devices is to connect directly to the customer device through the SSH (Secure Shell) tool. The SSH tool can only be used to connect to customer devices within the same local area network as the customer device, which means that technical support personnel need to go to the customer's home to debug the device for the customer, increasing operating costs. In addition, connecting to the customer device on site and collecting logs for the customer device requires the administrator account and password of the customer device, which poses a privacy and security issue.
[0095] In order to solve the above problems, the present application embodiment provides a method for obtaining remote debugging information, such as Figure 1 As shown, applied to the server, the method includes the following steps S101-S104.
[0096] Step S101 : in response to remote debugging requests from multiple first clients for a device to be debugged, generating a different request identifier for each remote debugging request.
[0097] The first client is a client corresponding to the server deployed on the device of the device supplier. The device to be debugged may be a client device that has problems during use. The request identifier is an identifier of the remote debugging request, and different remote debugging requests have different request identifiers. The request identifier can uniquely identify a remote debugging request.
[0098] After learning that a problem has occurred with a customer's device, the technical support staff of the equipment supplier needs to debug the customer's device. The technical support staff can use the first client on the equipment supplier's device to send a remote debugging request for the device to be debugged to the server. The equipment supplier can have multiple technical support staff, and the multiple technical support staff can start remote debugging on their respective first clients, and each first client can send a remote debugging request to the device to be debugged at the same time. The server can receive multiple remote debugging requests from each first client.
[0099] The server may use a random algorithm to generate a different request identifier for each remote debugging request. For example, the server may use a UUID (Universally Unique Identifier) algorithm to generate a different request identifier for each remote debugging request.
[0100] Step S102: based on the request identifier of each remote debugging request, request the target end for remote debugging connection information corresponding to each remote debugging request.
[0101] The remote debugging connection information includes: a connection address and a connection identifier. The connection identifiers in different remote debugging connection information are different. The target end is: a device to be debugged or a third-party service.
[0102] The connection address may be an address stored in the target end for establishing a remote debugging connection. After obtaining the connection address, the first client may access the address and then establish a remote debugging connection with the target end based on the address. The connection identifier is used to identify the remote debugging connection between the first client and the target end. Different first clients send different request identifiers for remote debugging requests, and the connection identifiers generated by the target end based on the remote debugging request are also different. One connection identifier can uniquely identify a remote debugging connection. The third-party service may be a third-party cloud service authorized by the customer.
[0103] The server can add a request identifier to each remote debugging request and send the remote debugging request carrying the request identifier to the target.
[0104] In one possible implementation, when the target end is a third-party service, the third-party service will establish authorization relationships with the server and the device to be debugged respectively. In this way, when the server requests remote debugging connection information, it requests remote debugging connection information from the third-party service. After receiving the request, the third-party service does not directly feedback the remote debugging connection information requested by the server to the server, but first determines whether an authorization relationship has been established with the server and whether an authorization relationship has been established with the device to be debugged. If the third-party service determines that an authorization relationship has been established with the server and an authorization relationship has been established with the device to be debugged, the third-party service can consider that the server and the device to be debugged are both highly credible ends. Only then will the third-party service send remote debugging connection information to the server.
[0105] From the above, it can be seen that, on the one hand, in terms of privacy and security, from the above process, the server can obtain the remote debugging connection information and then obtain the debugging information of the device to be debugged without obtaining the administrator account and password of the device to be debugged. In this way, the administrator account and password of the device to be debugged do not need to be exposed to the server, ensuring the privacy and security of the device to be debugged. All control rights of the device to be debugged will not be given to the server, and the device to be debugged has all its own control rights.
[0106] On the other hand, in terms of efficiency and cost, when the third-party service establishes an authorization relationship with the server and the device to be debugged, the server obtains the remote debugging connection information through the third-party service, and then obtains the debugging information of the device to be debugged, so there is no need for the operation and maintenance personnel to go to the site where the device to be debugged is located to obtain the debugging information and complete the debugging. This can greatly save the cost of obtaining debugging information and debugging the device, and can improve efficiency and simplify the device debugging process. In addition, the administrator account and password of the device to be debugged do not need to be exposed to the operation and maintenance personnel. From this perspective, it also ensures the privacy and security of the device to be debugged, and ensures that the device to be debugged has all its own control rights.
[0107] On the other hand, in terms of device security, since the third-party service believes that the server and the device to be debugged are both highly trustworthy, it sends remote debugging connection information to the server, and then the server obtains the debugging information. In this way, the third-party service does not provide remote debugging connection information to the server at will, which not only improves the security of the device to be debugged, but also effectively ensures that the server does not receive information at will, thereby improving the security of the server.
[0108] The authorization relationship between the third-party service and the server can be established when the third-party service and the server establish a communication connection. Similarly, the authorization relationship between the third-party service and the device to be debugged can be established when the device to be debugged requests access to the third-party service.
[0109] Step S103, obtaining remote debugging connection information fed back by the target end.
[0110] After the target receives the remote debugging request carrying the request identifier sent by the server, a different connection identifier can be generated for each received remote debugging request using a random algorithm. The random algorithm can be a UUID algorithm. In an example, the target receives 8 remote debugging requests from the server at the same time, and the target can generate 8 different connection identifiers using a random algorithm.
[0111] After the target end generates multiple connection identifiers, it can send the generated multiple connection identifiers and remote debugging connection information such as the pre-stored connection address to the server end, and the server end can receive the remote debugging connection information sent by the target end.
[0112] Step S104, feeding back the request identifier of the sent remote debugging request and the corresponding remote debugging connection information to each first client, so that each first client establishes a remote debugging connection with the device to be debugged based on the received information, and then obtains log data as debugging information from the device to be debugged based on the established remote debugging connection.
[0113] After receiving the remote debugging connection information such as the connection identifier and the connection address fed back by the target, the server can assign a connection identifier to each first client, and send the connection identifier, the connection address and the request identifier of the remote debugging request sent by the first client to the first client. For example, client 1 sends a remote debugging request A to the server, and the server generates a request identifier for the remote debugging request A as request identifier A; client 2 sends a remote debugging request B to the server, and the server generates a request identifier for the remote debugging request B as request identifier B; the target receives the remote debugging request A and the request identifier A it carries, and the remote debugging request B and the request identifier B it carries; the target generates two connection identifiers, namely connection identifier 1 and connection identifier 2, and feeds back connection identifier 1, connection identifier 2 and the connection address to the server; the server receives the connection identifier 1, connection identifier 2 and the connection address fed back by the target, and can assign connection identifier 1 to client 2 from which the remote debugging request B comes, assign connection identifier 2 to client 1 from which the remote debugging request A comes, and feed back the connection address, request identifier A and connection identifier 2 to client 1, and feed back the connection address, request identifier B and connection identifier 1 to client 2.
[0114] After receiving the connection identifier, connection address, and request identifier, the first client can establish a connection with the target end based on the information. If the target end is a device to be debugged, the first client establishes a remote debugging connection with the device to be debugged based on the connection identifier, connection address, and request identifier; if the target end is a third-party service, the first client can request the third-party service to establish a remote debugging connection with the device to be debugged after establishing a connection with the third-party service, and then the first client can establish a remote debugging connection with the device to be debugged.
[0115] In order to more clearly illustrate the scheme described in the above steps S101-S104, the present embodiment also provides the following Figure 2 and Figure 3 Signaling interaction diagram for the two examples shown.
[0116] Figure 2In the embodiment shown in , the target end is a device to be debugged. A plurality of first clients (only one first client is shown in the figure) send remote debugging requests for the device to be debugged to the server; the server receives the remote debugging requests sent by each first client, and generates a different nonceID (request identifier) for each remote debugging request, corresponding to the above step S101; the server requests the remote debugging connection information corresponding to each remote debugging request from the device to be debugged based on the request identifier of each remote debugging request, corresponding to the above step S102; the device to be debugged feeds back remote debugging connection information such as a ws (websocket, network socket) connection address and a wsID (connection identifier) to the server; the server obtains the remote debugging connection information fed back by the device to be debugged and feeds back remote debugging connection information such as a ws connection address, wsID and the request identifier nonceID to each first client, corresponding to the above steps S103-S104; the first client establishes a ws debugging connection, i.e., a remote debugging connection, with the device to be debugged based on the received ws connection address, wsID, nonceID and device identifier; and the first client can obtain log data as debugging information from the device to be debugged based on the established ws debugging connection.
[0117] Figure 3 In the embodiment shown, the target end is a third-party service. After executing step S101, the server requests the remote debugging connection information corresponding to each remote debugging request from the third-party service based on the request identifier of each remote debugging request, corresponding to the above step S102; the third-party service feeds back the remote debugging connection information such as the ws connection address and wsID to the server; the server obtains the remote debugging connection information fed back by the third-party service and feeds back the remote debugging connection information such as the ws connection address, wsID and the request identifier nonceID to each first client, corresponding to the above steps S103-S104; the first client establishes a ws debugging connection, i.e., a remote debugging connection, with the third-party service based on the received ws connection address, wsID and nonceID; after the first client establishes the ws debugging connection with the third-party service, based on the ws debugging connection, it establishes an SSH debugging connection with the third-party service, and requests the third-party service to establish an SSH debugging connection with the device to be debugged; and then the first client can obtain log data as debugging information from the device to be debugged based on the established SSH debugging connection.
[0118] In the technical solution provided in the embodiment of the present application, the server generates different request identifiers for remote debugging requests sent by different first clients, and the connection identifiers in different remote debugging connection information obtained based on the request identifiers are also different. Therefore, different first clients can be distinguished, thereby enabling multiple first clients, that is, multiple technical support personnel to debug a device at the same time, and each first client can accurately obtain information to assist the technical support personnel in debugging the customer's device.
[0119] In a possible implementation, before the server receives the remote debugging request sent by the first client in step S101, that is, before the first client sends the remote debugging request to the server, the first client may also query the server for the debugging status of the device to be debugged. Figure 4 As shown, an embodiment of the present application also provides a debugging status query method, which is applied to a server. The method may include the following steps S401-S403.
[0120] Step S401: receiving a debugging status query request sent by a first client based on a device identification.
[0121] The device identifier may be the name, number or serial number of the device to be debugged. Before sending a remote debugging request to the server, the first client may query the server for the debugging status of the device to be debugged. The first client may send a debugging status query request to the server based on the device identifier of the device to be debugged, and the server receives the debugging status query request sent by the first client.
[0122] Step S402: obtaining the debugging status of the device to be debugged based on the device identification carried in the debugging status query request.
[0123] The server can store the device identification and debugging status information of each client device. The server matches the stored device identification with the device identification of the device to be debugged, and then queries the debugging status information of the device to be debugged, and obtains the debugging status of the device to be debugged based on the queried debugging status information. The debugging status can be that the device to be debugged has been authorized for remote debugging, or that the device to be debugged has not been authorized for remote debugging.
[0124] Step S403: Feedback the debugging status to the first client.
[0125] After the server obtains the debugging status of the device to be debugged, it can send debugging status information to the first client to feedback the debugging status of the device to be debugged.
[0126] In order to more clearly illustrate the solution described in the above steps S401-S403, the present application embodiment also provides the following Figure 5 A signaling interaction diagram of an example is shown.
[0127] Figure 5 In the process, the technical support personnel inputs the device identification in the first client to query whether the debugging status of the device to be debugged is authorized for remote debugging; the first client sends a debugging status query request to the server according to the device identification input by the technical support personnel; the server receives the debugging status query request sent by the first client, corresponding to the above step S401; the server then obtains the debugging status of the device to be debugged based on the device identification carried in the debugging status query request, corresponding to the above step S402; and then the server feeds back the debugging status to the first client, corresponding to the above step S403. Based on the received debugging status, the first client prompts the technical support personnel that the device is not authorized for debugging when the debugging status indicates that the device to be debugged is not authorized for remote debugging, and then the technical support personnel can contact the customer to enable authorization. When the debugging status indicates that the device to be debugged is authorized for remote debugging, the first client can also prompt the technical support personnel, and then the technical support personnel can enable remote debugging, that is, use the first client to send a remote debugging request to the server.
[0128] The subsequent process can be the same as above Figure 2 and Figure 3 The same is not repeated here. Figure 5 The target end in the example can be a device to be debugged or a third-party service. When the target end is a device to be debugged, the subsequent steps of the first client sending a remote debugging request to the server can be the same as Figure 2 Similarly, when the target end is a third-party service, the subsequent steps of the first client sending a remote debugging request to the server can be the same as Figure 3 same.
[0129] Above Figure 4 and Figure 5 In the provided technical solution, before establishing a remote debugging connection, the first client first queries the authorization status of the device to be debugged, and then establishes the remote debugging connection when the device to be debugged has authorized remote debugging, thereby improving the security of the remote debugging connection.
[0130] In the above debugging status query method, the server can obtain the debugging status of the device to be debugged in the following way. The flowchart of this method is as follows Figure 6 As shown, the above step S402 may include the following steps S601-S604.
[0131] Step S601, based on the device identification carried in the debugging status query request, query the target authorized debugging time of the device to be debugged from the recorded authorized debugging time; and when the target authorized debugging time is queried, execute step S602; when the target authorized debugging time is not queried, execute step S604.
[0132] The server can record the device identification of each client device and the authorized debugging duration of the client device. The server can match the device identification carried in the debugging status query request with the recorded device identification. When the device identification corresponding to the device identification carried in the debugging status query request is matched, the authorized debugging duration corresponding to the device identification is used as the target authorized debugging duration, and step S602 is executed; when the device identification corresponding to the device identification carried in the debugging status query request is not matched, that is, when the target authorized debugging duration is not queried, step S604 is executed.
[0133] Step S602, determine whether the authorized duration of the device to be debugged reaches the target authorized debugging duration; if not, execute step S603; if reached, execute step S604.
[0134] The authorized duration is the time between the start time of remote debugging authorization of the device to be debugged and the time when the authorized duration of the device to be debugged is currently determined. The server can time the authorized duration of the device to be debugged. In one possible implementation, the server can use multiple timers to time the authorized duration of each device to be debugged respectively. The server obtains the duration recorded in the timer corresponding to the device to be debugged, and determines whether the authorized duration of the device to be debugged reaches the target authorized debugging duration based on the duration recorded in the timer.
[0135] For example, the authorized debugging duration of client device 1 is 2 hours, and the start time of authorized remote debugging of client device 1 is 13:00. The server starts counting down the authorized duration of client device 1 from 2 hours at 13:00. The server determines whether the authorized duration of the device to be debugged has reached the target authorized debugging duration at 13:50. At this time, the time recorded in the counter is 1 hour and 10 minutes, indicating that the authorized duration has not reached the target authorized debugging duration. For another example, the authorized debugging duration of client device 2 is 1 hour, and the start time of authorized remote debugging of client device 2 is 15:00. The server starts counting up the authorized duration of client device 1 from 0 at 15:00. The server determines whether the authorized duration of the device to be debugged has reached the target authorized debugging duration at 16:05. At this time, the time recorded in the counter is 1 hour, indicating that the authorized duration has reached the target authorized debugging duration.
[0136] Step S603: determining that the debugging state of the device to be debugged indicates that the device to be debugged has been authorized for remote debugging.
[0137] The debugging status can be represented by a number or text. In an example, the debugging status is represented by a number 0 or 1, where 0 indicates that the device to be debugged is not authorized for remote debugging, and 1 indicates that the device to be debugged is authorized for remote debugging. If the authorized duration does not reach the target authorized debugging duration, it means that the device to be debugged is still in the authorized remote debugging state. The server can determine the debugging status of the device to be debugged based on the number or text.
[0138] Step S604: determining that the debugging state of the device to be debugged indicates that the device to be debugged is not authorized for remote debugging.
[0139] The authorized duration has reached the target authorized debugging duration, indicating that the device to be debugged is no longer in the authorized debugging state. The server can determine the debugging state of the device to be debugged based on the number or text, indicating that remote debugging is not authorized.
[0140] Above Figure 6 In the provided technical solution, the server can store the authorized debugging status of the device to be debugged in advance, and can query the authorized debugging status of the device to be debugged more quickly, thereby improving the efficiency of remote debugging connection.
[0141] In a possible implementation, the target authorized debugging duration in the above step S601 can be obtained in the following manner: receiving a device identification and a target authorized debugging duration for the device to be debugged sent by the second client; and storing the target authorized debugging duration according to the device identification.
[0142] The second client may be a client deployed on a client device corresponding to the server, and the client device and the device to be debugged may be the same device or different devices.
[0143] The technical support staff can contact the customer to authorize the remote debugging permission of the device to be debugged. The customer uses the second client to send the device identification and target authorized debugging time of the device to be debugged to the server to authorize the remote debugging permission of the device to be debugged. The server receives the device identification and target authorized debugging time of the device to be debugged sent by the customer, and can store the target authorized debugging time according to the device identification.
[0144] In order to more clearly illustrate the above method of obtaining the target authorization debugging time, the embodiment of the present application also provides the following Figure 7 A signaling interaction diagram of an example is shown.
[0145] Figure 7In the process, the technical support staff can contact the customer to authorize the remote debugging permission of the device to be debugged; the customer selects the device to be debugged on the second client and enters the target authorized debugging time, and the second client sends the target authorized debugging time entered by the customer and the device ID of the device to be debugged to the server; the server receives the device ID and target authorized debugging time for the device to be debugged sent by the second client, stores the target authorized debugging time according to the device ID, and then feeds back the authorization result to the second client. In addition, after storing the target authorized debugging time, the server can also deliver a delay task according to the target authorized debugging time, and close the debugging connection of the device to be debugged after the authorization expires.
[0146] By obtaining the target authorized debugging time in the above manner, when the device to be debugged requires remote debugging, the customer can be contacted to authorize remote debugging permissions. When the device to be debugged does not require remote debugging, the remote debugging device of the device to be debugged can remain closed, further improving the security of the remote debugging connection.
[0147] Corresponding to the above-mentioned method for obtaining remote debugging information applied to the server, the embodiment of the present application also provides a method for obtaining remote debugging information applied to the first client, such as Figure 8 As shown, the method includes the following steps S801-S804.
[0148] Step S801: Send a remote debugging request for the device to be debugged to the server.
[0149] For related content, please refer to the second paragraph of the description of step S101, which will not be repeated here.
[0150] Step S802: Receive a request identifier and remote debugging connection information of a remote debugging request fed back by the server.
[0151] The remote debugging connection information includes: a connection address and a connection identifier. The remote debugging connection information is provided by the target end to the server end. The target end is: a device to be debugged or a third-party service.
[0152] Step S803: establishing a debugging connection with the device to be debugged based on the request identifier and the remote debugging connection information.
[0153] For related content, please refer to the second paragraph of the description of step S104, which will not be repeated here.
[0154] Step S804: obtaining log data as debugging information from the device to be debugged based on the established connection.
[0155] In the technical solution provided in the embodiment of the present application, the server generates different request identifiers for remote debugging requests sent by different first clients, and the connection identifiers in different remote debugging connection information obtained based on the request identifiers are also different. Therefore, different first clients can be distinguished, thereby enabling multiple first clients, that is, multiple technical support personnel to debug a device at the same time, and each first client can accurately obtain information to assist the technical support personnel in debugging the customer's device.
[0156] In a possible implementation, the target end may be a third-party service, and the corresponding connection address may be an address for connecting to the third-party service. In this case, the first client may establish a debugging connection with the device to be debugged in the following manner. The flowchart of this method is shown in FIG. Fig. 9 That is, the above step S803 may include the following steps S901-S903.
[0157] Step S901: Request to establish a first connection with a target end based on a request identifier and remote debugging connection information.
[0158] The first connection may be a ws debugging connection. The first client accesses the connection address included in the remote debugging connection information, and requests the third-party service to establish a ws debugging connection in combination with the request identifier and the connection identifier included in the remote debugging connection information.
[0159] Step S902: After the first connection is successfully established, a remote debugging interface is displayed.
[0160] After the first connection is successfully established, the first client can receive feedback that the third-party service connection is successfully established, and the first client can generate a remote debugging window in the browser and display a remote debugging interface. The remote debugging window can be an SSH window. By generating an SSH window through a browser for remote debugging, compatibility issues can be avoided, and there is no restriction on the system deployed on the first client, and currently available browsers can all be used for debugging.
[0161] Step S903: based on the remote login information input by the user in the remote debugging interface, request to establish a second connection with the target end, so that the target end establishes a third connection with the device to be debugged after successfully establishing the second connection.
[0162] The user may be a technical support staff of the equipment supplier; the second connection and the third connection may be SSH debugging connections; the remote login information may be an SSH user name and password. The first client may use an encryption algorithm to encrypt the SSH password entered by the user. For example, the first client may use an AES (Advanced Encryption Standard) algorithm to encrypt the SSH password entered by the user.
[0163] The first client can send the encrypted SSH username and password to the third-party service through the ws debugging connection, and request to establish an SSH debugging connection with the third-party service. The third-party service decrypts the received SSH password, and matches the received SSH username and the decrypted SSH password with the stored SSH username and password. If the match is successful, it means that the SSH password is correct, and the SSH debugging connection between the first client and the third-party service can be successfully established, that is, the second connection. After that, the third-party service establishes an SSH debugging connection with the device to be debugged, that is, the third connection.
[0164] The remote login information may be input by the user before sending a remote debugging request for the device to be debugged to the server, or may be input by the user when querying the authorization status of the device to be debugged. This is not limited here, and the first client can obtain the remote login information.
[0165] Above Fig. 9 In the technical solution provided, the first client first establishes a second connection with a third-party service trusted by the customer, and then obtains debugging information through a third connection between the third-party service and the device to be debugged, without directly connecting to the device to be debugged, thereby further improving the security of the remote debugging connection.
[0166] In a possible implementation, the first client may obtain debugging information in the following manner, that is, the above step S804 may include the following steps: sending a debugging information acquisition request to the target end based on the second connection, so that the target end sends a debugging information acquisition request to the device to be debugged based on the third connection; receiving debugging information fed back by the target end.
[0167] The debugging information is: a log fed back to the target end through the third connection after the device to be debugged obtains the log based on the debugging information obtaining request.
[0168] In a possible implementation, after the first client obtains the debugging information, the first client may also send a debugging instruction to the device to be debugged to debug the device to be debugged, which may specifically include the following steps: generating a debugging instruction based on the debugging information; sending the debugging instruction to the target end through the second connection, so that the target end instructs the device to be debugged to execute the debugging instruction through the third connection.
[0169] In this way, technical support personnel can directly debug the device to be debugged through the first client, thereby improving the operation and maintenance efficiency of providing after-sales service for customer equipment.
[0170] In a possible implementation manner, before sending a remote debugging request for the device to be debugged to the server in the above step S801, the first client may also query the debugging status of the device to be debugged. Based on this, the embodiment of the present application further provides the following Fig.10 A remote debugging information obtaining method is shown, and the method may include the following steps S1001-S1007.
[0171] Step S1001, obtaining the device identification of the device to be debugged.
[0172] The first client can directly obtain the device identification input by the technical support personnel, or it can display multiple devices to be debugged to the technical support personnel on the interface. The technical support personnel selects a device as the device to be debugged on the interface for debugging, and the first client obtains the stored device identification based on the device to be debugged selected by the technical support personnel.
[0173] Step S1002: Send a debugging status query request to the server based on the device identification.
[0174] For related content, please refer to the description of step S401, which will not be repeated here.
[0175] Step S1003: receiving the debugging status of the device to be debugged fed back by the server.
[0176] Step S1004: If the debugging state indicates that the device to be debugged has been authorized for remote debugging, a remote debugging request for the device to be debugged is sent to the server.
[0177] Step S1005: receiving a request identifier and remote debugging connection information of the remote debugging request fed back by the server.
[0178] Step S1006: establishing a debugging connection with the device to be debugged based on the request identifier and the remote debugging connection information.
[0179] Step S1007: obtaining log data as debugging information from the device to be debugged based on the established connection.
[0180] The above steps S1005-S1007 are the same as steps S802-S804 and will not be repeated here.
[0181] In this way, before establishing the remote debugging connection, the first client first queries the authorization status of the device to be debugged, and then establishes the remote debugging connection when the device to be debugged has authorized remote debugging, thereby improving the security of the remote debugging connection.
[0182] In order to more clearly illustrate the remote debugging information obtaining method provided in the embodiment of the present application, the embodiment of the present application also provides the following Fig.11 The signaling interaction diagram shown.
[0183] Fig.11In the process, the technical support personnel inputs the device identification in the first client; the first client sends a debugging status query request to the server based on the device identification; the server feeds back the debugging status of the device to be debugged to the first client; the first client receives the debugging status of the device to be debugged fed back by the server.
[0184] If the debugging status is unauthorized remote debugging, the first client outputs a prompt message to prompt the technical support personnel that the device to be debugged is not authorized for remote debugging; if the debugging status is authorized debugging, the first client sends a remote debugging request for the device to be debugged to the server, requesting to obtain remote debugging connection information.
[0185] The server receives the remote debugging request sent by the first client, and can notify the third-party service and then notify the device to be debugged to start remote debugging of the device, and generate different nonceIDs (request identifiers) for the remote debugging requests; then based on the request identifiers of each remote debugging request, request the third-party service for the remote debugging connection information corresponding to each remote debugging request; the third-party service feeds back the remote debugging connection information including the connection address and wsID (connection identifier) to the server; the server sends the request identifier and the received remote debugging connection information to the first client.
[0186] The first client establishes a ws debugging connection with the third-party service based on the request identifier and the remote debugging connection information, i.e., the first connection. After successfully establishing the ws debugging connection, the first client displays the remote debugging interface, and then requests to establish an SSH debugging connection with the third-party service based on the remote login information such as the SSH login username and password entered by the user in the remote debugging interface, i.e., the second connection. After the third-party service successfully establishes an SSH debugging connection with the server, it then establishes an SSH debugging connection with the device to be debugged, i.e., the third connection.
[0187] After the above connection is established, the first client can obtain the debugging information fed back by the device to be debugged based on the second connection and the third connection. The technical support personnel can also send debugging instructions to the device to be debugged through the first client based on the obtained debugging information, the second connection and the third connection, and obtain the debugging output fed back by the device to be debugged.
[0188] After debugging is completed, the technical support staff can send a command to close remote debugging to the server through the first client, and the server will forward the command to close remote debugging to the third-party service, and then forward it to the device to be debugged, ending the remote debugging. At the same time, the third-party service disconnects the ws debugging connection with the first client.
[0189] By applying the technical solution provided in the embodiment of the present application, online remote debugging can be realized, which improves the efficiency of remote operation and maintenance by technical support personnel and other operation and maintenance personnel, simplifies the remote debugging process, and saves operation and maintenance costs. It also ensures that all control rights of the customer's device are in the hands of the customer, and does not require information such as the customer's device IP address, administrator account, and administrator password, thus avoiding privacy issues and protecting the customer's privacy security.
[0190] Corresponding to the above-mentioned remote debugging information obtaining method, the embodiment of the present application also provides a remote debugging information obtaining device, which is applied to the server, such as Fig.12 As shown, the device comprises:
[0191] A first generating module 1201 is used to generate a different request identifier for each remote debugging request in response to remote debugging requests from multiple first clients for the device to be debugged;
[0192] The request module 1202 is used to request the remote debugging connection information corresponding to each remote debugging request from the target end based on the request identifier of each remote debugging request, wherein the remote debugging connection information includes: a connection address and a connection identifier, and the connection identifiers in different remote debugging connection information are different. The target end is: a device to be debugged or a third-party service;
[0193] The first obtaining module 1203 is used to obtain the remote debugging connection information fed back by the target end;
[0194] The first feedback module 1204 is used to feed back the request identifier of the sent remote debugging request and the corresponding remote debugging connection information to each first client, so that each first client establishes a remote debugging connection with the device to be debugged based on the received information, and then obtains log data as debugging information from the device to be debugged based on the established remote debugging connection.
[0195] In the technical solution provided in the embodiment of the present application, the server generates different request identifiers for remote debugging requests sent by different first clients, and the connection identifiers in different remote debugging connection information obtained based on the request identifiers are also different. Therefore, different first clients can be distinguished, thereby enabling multiple first clients, that is, multiple technical support personnel to debug a device at the same time, and each first client can accurately obtain information to assist the technical support personnel in debugging the customer's device.
[0196] In a possible implementation, the remote debugging information obtaining device further includes: a first receiving module, used to receive a debugging status query request sent by the first client based on a device identifier; a second obtaining module, used to obtain the debugging status of the device to be debugged based on the device identifier carried in the debugging status query request; and a second feedback module, used to feedback the debugging status to the first client.
[0197] In one possible implementation, the second acquisition module is specifically used to: based on the device identification carried in the debugging status query request, query the target authorized debugging time of the device to be debugged from the recorded authorized debugging time; if the target authorized debugging time is queried, determine whether the authorized time of the device to be debugged reaches the target authorized debugging time; if not reached, determine that the debugging status of the device to be debugged indicates that the device to be debugged is authorized for remote debugging; and / or, if reached, determine that the debugging status of the device to be debugged indicates that the device to be debugged is not authorized for remote debugging; and / or, if the target authorized debugging time is not queried, determine that the debugging status of the device to be debugged indicates that the device to be debugged is not authorized for remote debugging.
[0198] In a possible implementation, the remote debugging information obtaining device further includes: a second receiving module for receiving a device identification and a target authorized debugging duration for the device to be debugged sent by the second client; and a storage module for storing the target authorized debugging duration according to the device identification.
[0199] In a possible implementation, when the target end is a third-party service, the remote debugging connection information is information sent to the server end when the third-party service determines that an authorization relationship has been established with the server end and an authorization relationship has been established with the device to be debugged.
[0200] Corresponding to the above-mentioned remote debugging information obtaining method, the embodiment of the present application further provides a remote debugging information obtaining device, which is applied to a first client, such as Fig.13 As shown, the device comprises:
[0201] The first sending module 1301 is used to send a remote debugging request for a device to be debugged to a server;
[0202] The third receiving module 1302 is used to receive the request identifier and remote debugging connection information of the remote debugging request fed back by the server, wherein the remote debugging connection information includes: a connection address and a connection identifier, and the remote debugging connection information is provided by the target end to the server, and the target end is: a device to be debugged or a third-party service;
[0203] Establishing module 1303, used for establishing a debugging connection with the device to be debugged based on the request identifier and the remote debugging connection information;
[0204] The third obtaining module 1304 is used to obtain log data as debugging information from the device to be debugged based on the established connection.
[0205] In the technical solution provided in the embodiment of the present application, the server generates different request identifiers for remote debugging requests sent by different first clients, and the connection identifiers in different remote debugging connection information obtained based on the request identifiers are also different. Therefore, different first clients can be distinguished, thereby enabling multiple first clients, that is, multiple technical support personnel to debug a device at the same time, and each first client can accurately obtain information to assist the technical support personnel in debugging the customer's device.
[0206] In one possible implementation, if the target end is a third-party service, the connection address is the address for connecting to the third-party service; a module 1303 is established, which is specifically used to: based on the request identifier and the remote debugging connection information, request to establish a first connection with the target end; after the first connection is successfully established, display the remote debugging interface; based on the remote login information entered by the user in the remote debugging interface, request to establish a second connection with the target end, so that the target end establishes a third connection with the device to be debugged after successfully establishing the second connection.
[0207] In one possible implementation, a module 1303 is established, which is specifically used to: send a debugging information acquisition request to the target end based on the second connection, so that the target end sends a debugging information acquisition request to the device to be debugged based on the third connection; receive debugging information fed back by the target end, wherein the debugging information is: the log that the device to be debugged obtains based on the debugging information acquisition request and then feeds back to the target end through the third connection.
[0208] In a possible implementation, the remote debugging information obtaining device further includes: a second generating module, configured to generate debugging instructions based on the debugging information; and a second sending module, configured to send the debugging instructions to the target end via the second connection, so that the target end instructs the device to be debugged to execute the debugging instructions via the third connection.
[0209] In a possible implementation manner, the remote debugging information obtaining device further includes: an acquisition module, used to obtain a device identification of the device to be debugged; a third sending module, used to send a debugging status query request to the server based on the device identification; a fourth receiving module, used to receive the debugging status of the device to be debugged fed back by the server; if the debugging status indicates that the device to be debugged has been authorized for remote debugging, executing the step of sending a remote debugging request for the device to be debugged to the server.
[0210] The present application also provides a server, such as Fig.14 As shown, including:
[0211] Memory 1401, used for storing computer programs;
[0212] The processor 1402 is used to implement any of the steps of the above-mentioned remote debugging information obtaining method applied to the server when executing the program stored in the memory 1401.
[0213] The present application embodiment also provides a client, such as the first client described above, Fig.15 As shown, the client includes:
[0214] Memory 1501, used for storing computer programs;
[0215] The processor 1502 is configured to implement any of the steps of the remote debugging information obtaining method applied to the first client when executing the program stored in the memory 1501 .
[0216] The above-mentioned server or client may also include a communication bus and / or a communication interface, and the processor, the communication interface, and the memory communicate with each other via the communication bus.
[0217] The communication bus mentioned in the above server or client can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0218] The communication interface is used for communication between the above electronic device and other devices.
[0219] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0220] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0221] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned remote debugging information obtaining methods are implemented.
[0222] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the steps of any of the methods for obtaining remote debugging information in the above embodiments.
[0223] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a solid-state hard disk (SSD), etc.
[0224] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0225] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, server, client, storage medium and computer program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0226] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.
Claims
1. A method for obtaining remote debugging information, characterized in that: Applied to the server, the method includes: Receiving a debugging status query request sent by the first client based on the device identification; Obtaining the debugging status of the device to be debugged based on the device identification carried in the debugging status query request; Feedback the debugging status to the first client; In response to remote debugging requests of multiple first clients for the device to be debugged, generating a different request identifier for each remote debugging request, wherein the request identifier uniquely identifies each remote debugging request; Based on the request identifier of each remote debugging request, request the target end for the remote debugging connection information corresponding to each remote debugging request, wherein the remote debugging connection information includes: a connection address and a connection identifier, and the connection identifiers in different remote debugging connection information are different, and the target end is: the device to be debugged or a third-party service; Obtaining remote debugging connection information fed back by the target end; Feedback the request identifier of the sent remote debugging request and the corresponding remote debugging connection information to each first client, so that each first client establishes a remote debugging connection with the device to be debugged based on the received information, and then obtains log data as debugging information from the device to be debugged based on the established remote debugging connection.
2. The method according to claim 1, characterized in that: The obtaining the debugging status of the device to be debugged based on the device identification carried in the debugging status query request includes: Based on the device identification carried in the debugging status query request, query the target authorized debugging duration of the device to be debugged from the recorded authorized debugging duration; If the target authorized debugging duration is found, determine whether the authorized duration of the device to be debugged reaches the target authorized debugging duration; If not reached, determining that the debugging state of the device to be debugged indicates that the device to be debugged has been authorized for remote debugging; and / or, If it has been reached, determining that the debugging state of the device to be debugged indicates that the device to be debugged is not authorized for remote debugging; and / or, If the target authorized debugging duration is not found, it is determined that the debugging state of the device to be debugged indicates that the device to be debugged is not authorized for remote debugging.
3. The method according to claim 2, characterized in that The method further comprises: Receiving a device identification and a target authorized debugging duration for the device to be debugged sent by a second client; The target authorized debugging duration is stored according to the device identification.
4. The method according to any one of claims 1 to 3, characterized in that In the case where the target end is the third-party service, The remote debugging connection information is information sent to the server when the third-party service determines that an authorization relationship has been established with the server and an authorization relationship has been established with the device to be debugged.
5. A method for obtaining remote debugging information, characterized in that: Applied to a first client, the method includes: Get the device ID of the device to be debugged; Based on the device identification, sending a debugging status query request to the server; Receiving the debugging status of the device to be debugged fed back by the server; If the debugging status indicates that the device to be debugged has been authorized for remote debugging, sending a remote debugging request for the device to be debugged to the server; Receive the request identifier and remote debugging connection information of the remote debugging request fed back by the server, wherein the remote debugging connection information includes: a connection address and a connection identifier, the remote debugging connection information is provided by the target end to the server, the target end is: the device to be debugged or a third-party service, and the request identifier uniquely identifies the remote debugging request; Establishing a debugging connection with the device to be debugged based on the request identifier and the remote debugging connection information; Log data as debugging information is obtained from the device to be debugged based on the established connection.
6. The method according to claim 5, characterized in that If the target end is the third-party service, the connection address is the address for connecting to the third-party service; The step of establishing a debugging connection with the device to be debugged based on the request identifier and the remote debugging connection information includes: Based on the request identifier and the remote debugging connection information, request to establish a first connection with the target end; After the first connection is successfully established, a remote debugging interface is displayed; Based on the remote login information input by the user in the remote debugging interface, a request is made to establish a second connection with the target end, so that the target end establishes a third connection with the device to be debugged after successfully establishing the second connection.
7. The method according to claim 6, characterized in that The obtaining log data as debugging information from the device to be debugged based on the established connection includes: Sending a debugging information obtaining request to the target end based on the second connection, so that the target end sends the debugging information obtaining request to the device to be debugged based on the third connection; Receive debugging information fed back by the target end, wherein the debugging information is: a log fed back to the target end through the third connection after the device to be debugged obtains the log based on the debugging information obtaining request.
8. The method according to claim 6, characterized in that The method further comprises: Generate debugging instructions based on the debugging information; The debugging instruction is sent to the target end through the second connection, so that the target end instructs the device to be debugged to execute the debugging instruction through the third connection.
9. A remote debugging information acquisition device, characterized in that: Applied to the server, the device comprises: A first receiving module, configured to receive a debugging status query request sent by a first client based on a device identifier; A second obtaining module, configured to obtain a debugging status of a device to be debugged based on the device identifier carried in the debugging status query request; A second feedback module, configured to feed back the debugging status to the first client; A first generating module, configured to generate a different request identifier for each remote debugging request in response to remote debugging requests from multiple first clients for the device to be debugged, wherein the request identifier uniquely identifies each remote debugging request; A request module, configured to request remote debugging connection information corresponding to each remote debugging request from a target end based on a request identifier of each remote debugging request, wherein the remote debugging connection information includes: a connection address and a connection identifier, and the connection identifiers in different remote debugging connection information are different, and the target end is: the device to be debugged or a third-party service; A first obtaining module is used to obtain the remote debugging connection information fed back by the target end; The first feedback module is used to feed back the request identifier of the sent remote debugging request and the corresponding remote debugging connection information to each first client, so that each first client establishes a remote debugging connection with the device to be debugged based on the received information, and then obtains log data as debugging information from the device to be debugged based on the established remote debugging connection.
10. The device according to claim 9, characterized in that The second obtaining module is specifically used to: query the target authorized debugging duration of the device to be debugged from the recorded authorized debugging duration based on the device identification carried in the debugging status query request; If the target authorized debugging duration is found, determine whether the authorized duration of the device to be debugged reaches the target authorized debugging duration; If not reached, determining that the debugging state of the device to be debugged indicates that the device to be debugged has been authorized for remote debugging; and / or, if it has been reached, determining that the debugging state of the device to be debugged indicates that the device to be debugged is not authorized for remote debugging; and / or, if the target authorized debugging duration is not found, determining that the debugging state of the device to be debugged indicates that the device to be debugged is not authorized for remote debugging; and / or The device further comprises: a second receiving module, configured to receive a device identification and a target authorized debugging duration for the device to be debugged, sent by a second client; a storage module, configured to store the target authorized debugging duration according to the device identification; and / or When the target end is the third-party service, the remote debugging connection information is information sent to the server end when the third-party service determines that an authorization relationship has been established with the server end and an authorization relationship has been established with the device to be debugged.
11. A remote debugging information acquisition device, characterized in that: Applied to a first client, the device comprises: An acquisition module is used to obtain the device identification of the device to be debugged; A third sending module, used to send a debugging status query request to the server based on the device identifier; A fourth receiving module, configured to receive the debugging status of the device to be debugged fed back by the server; A first sending module, configured to send a remote debugging request for the device to be debugged to the server if the debugging state indicates that the device to be debugged has been authorized for remote debugging; A third receiving module is used to receive the request identifier and remote debugging connection information of the remote debugging request fed back by the server, wherein the remote debugging connection information includes: a connection address and a connection identifier, the remote debugging connection information is provided by the target end to the server, the target end is: the device to be debugged or a third-party service, and the request identifier uniquely identifies the remote debugging request; An establishing module, used for establishing a debugging connection with the device to be debugged based on the request identifier and the remote debugging connection information; The third obtaining module is used to obtain log data as debugging information from the device to be debugged based on the established connection.
12. The device according to claim 11, characterized in that If the target end is the third-party service, the connection address is the address for connecting to the third-party service; the establishment module is specifically used to: request to establish a first connection with the target end based on the request identifier and the remote debugging connection information; After the first connection is successfully established, a remote debugging interface is displayed; Based on the remote login information input by the user in the remote debugging interface, requesting to establish a second connection with the target end, so that the target end establishes a third connection with the device to be debugged after successfully establishing the second connection; and / or The establishing module is specifically used to: send a debugging information obtaining request to the target end based on the second connection, so that the target end sends the debugging information obtaining request to the device to be debugged based on the third connection; receiving debugging information fed back by the target end, wherein the debugging information is: a log fed back to the target end through the third connection after the device to be debugged obtains the log based on the debugging information obtaining request; and / or The apparatus further includes: a second generating module, configured to generate a debugging instruction based on the debugging information; and a second sending module, configured to send the debugging instruction to the target end through the second connection, so that the target end instructs the device to be debugged to execute the debugging instruction through the third connection.
13. A server, characterized in that: include: Memory, used to store computer programs; A processor, for implementing the steps of the method described in any one of claims 1 to 4 when executing a program stored in a memory.
14. A client, characterized in that: include: Memory, used to store computer programs; A processor, for implementing the steps of the method described in any one of claims 5 to 8 when executing a program stored in a memory.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 4 or 5 to 8 are implemented.
