Network diagnosis methods, network diagnosis apparatuses, electronic device, and readable storage medium
By establishing a dual connection between the smart device and the server, using offline prompts and preset applications for diagnostic data transmission, the problem that users cannot intuitively obtain the reason for the connection disconnection is solved, and the abnormal connection status is diagnosed, which improves the user experience.
Patent Information
- Application Number
- PCT/CN2025/070237
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-02-28
- Filing Date
- 2025-01-02
- Publication Date
- 2025-09-04
AI Technical Summary
After the smart device is disconnected from the server, the user cannot intuitively obtain the reason for the disconnection, which leads to difficulty in diagnosis.
Through the dual connection method between the electronic device and the target device and the server (Bluetooth connection and SSE long connection), an offline prompt is generated when the server detects that the connection is disconnected, and the diagnostic data is transmitted and parsed through the preset application to achieve the diagnosis of abnormal connection status.
Users can intuitively view the abnormal connection status between the target device and the server through electronic devices, improving the user experience.
Smart Images

Figure CN2025070237_04092025_PF_FP_ABST
Abstract
Description
Network diagnostic method, network diagnostic device, electronic device and readable storage medium
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on February 28, 2024, with application number "202410224451.7" and invention name "Network diagnostic method, network diagnostic device, electronic device and readable storage medium", the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the technical field of Internet of Things, and in particular to a network diagnosis method, a network diagnosis device, an electronic device and a readable storage medium. Background Art
[0003] In the related art, after a smart device is disconnected from a server, a user can only operate the smart device again to re-establish a connection with the server, but cannot intuitively obtain the reason why the smart device is disconnected from the server. Summary of the Invention
[0004] This application aims to solve at least one of the technical problems existing in the prior art.
[0005] To this end, a first aspect of the present application provides a network diagnosis method.
[0006] A second aspect of the present application provides a network diagnosis method.
[0007] A third aspect of the present application provides a network diagnosis method.
[0008] A fourth aspect of the present application provides a network diagnostic device.
[0009] A fifth aspect of the present application provides a network diagnostic device.
[0010] A sixth aspect of the present application provides a network diagnostic device.
[0011] A seventh aspect of the present application provides an electronic device.
[0012] An eighth aspect of the present application provides a readable storage medium.
[0013] A ninth aspect of the present application provides a computer program product.
[0014] A first aspect of the present application provides a network diagnostic method, which is performed by an electronic device, and the network diagnostic method includes: establishing a connection with a server; wherein the target device to be diagnosed is connected to the server; upon receiving an offline prompt sent by the server, establishing a connection with the target device; wherein the electronic device is connected to the target device via a first connection method, and the electronic device is connected to the server via a second connection method, and the offline prompt is generated by the server when the target device is disconnected from the server; sending a diagnostic data request to the target device; receiving diagnostic data corresponding to the diagnostic data request sent by the target device; and determining the abnormal connection status between the target device and the server based on the diagnostic data.
[0015] The network diagnostic method provided herein can be used to diagnose an abnormal connection state between a target device and a server, wherein the target device can be a smart home device, such as a television, smart air conditioner, or smart refrigerator, and the target device is connected to a server. Furthermore, the network diagnostic method can be performed by an electronic device, which is connected to a server (i.e., the same server to which the target device is connected) via a second connection method. Upon receiving an offline notification sent by the server, the electronic device establishes a connection with the target device. Specifically, before the electronic device diagnoses the abnormal connection state of the target device, the electronic device is connected to the server via the second connection method, but not to the target device. After the diagnosis begins, the electronic device connects to the target device via the first connection method to diagnose the abnormal connection state. Specifically, when the connection between the target device and the server is disconnected, the server detects the disconnection and generates an offline notification, which is then sent to the electronic device. The electronic device then connects to the target device via the first connection method. Specifically, the electronic device connects to the target device via the first connection method. Specifically, the electronic device connects to the target device and the server via different connection methods. When an abnormality occurs in the connection between the target device and the server, the electronic device can still connect to the target device to diagnose the abnormal connection state between the target device and the server.
[0016] The first connection mode between the electronic device and the target device may be a Bluetooth connection mode, and the second connection mode between the electronic device and the server may be an SSE (Server-sent Events) long connection mode.
[0017] In addition, the electronic device can diagnose the abnormal connection status between the target device and the server through a preset application, that is, the user can operate the preset application in the electronic device to view the abnormal connection status between the target device and the server.
[0018] Furthermore, when the electronic device receives the offline prompt sent by the server, a connection is established between the electronic device and the target device, and then a diagnostic data request is sent to the target device. It is understandable that when the connection between the target device and the server is disconnected, the server detects the disconnection with the target device and generates an offline prompt, which is then sent to the electronic device. The user can manually receive the offline prompt sent by the server by operating a preset application, or automatically receive the offline prompt sent by the server when the second connection mode is the SSE long connection mode.
[0019] Then, when receiving the offline prompt, the electronic device can send a diagnostic data request to the target device. At this time, the target device and the electronic device are connected via the first connection mode, thereby ensuring that the target device can receive the diagnostic data request sent by the electronic device.
[0020] Furthermore, the electronic device receives diagnostic data corresponding to the diagnostic data request sent by the target device. At this time, since the target device and the electronic device are connected via the first connection method, even if the target device is disconnected from the server, the diagnostic data can still be sent to the electronic device.
[0021] Finally, the electronic device can analyze the received diagnostic data to determine the abnormal connection status between the target device and the server. At the same time, the user can view the abnormal connection status between the target device and the server through a preset application installed in the electronic device.
[0022] The network diagnostic method provided by the present application is that the electronic device and the server are connected via a second connection method. When the target device and the server are disconnected, the electronic device can receive an offline prompt sent by the server. Furthermore, the electronic device and the target device are connected via a first connection method, so that when the electronic device receives the offline prompt, it can transmit diagnostic data to the target device, and then diagnose the abnormal connection status between the target device and the server based on the diagnostic data, so that the user can view the abnormal connection status between the target device and the server through the electronic device, thereby improving the user experience.
[0023] According to the second aspect of the present application, a network diagnostic method is proposed, which is executed by a target device, the target device is connected to a server, the target device is connected to an electronic device via a first connection method, and the electronic device is connected to the server via a second connection method. The network diagnostic method includes: upon receiving a diagnostic data request sent by the electronic device, obtaining an abnormal connection status with the server; wherein the diagnostic data request is generated by the electronic device upon receiving an offline prompt sent by the server, and the offline prompt is generated by the server when the target device is disconnected from the server; generating diagnostic data based on the abnormal connection status; wherein the diagnostic data is used for the electronic device to parse to determine the abnormal connection status between the target device and the server; and sending the diagnostic data to the electronic device.
[0024] The network diagnostic method provided in the present application can be used to diagnose an abnormal connection state between a target device and a server, wherein the target device can be a household smart device, such as a television, a smart air conditioner, a smart refrigerator, etc. Furthermore, the network diagnostic method can be executed by the target device, the target device is connected to the electronic device via a first connection method, and the electronic device is connected to the server via a second connection method. That is, the electronic device is connected to the target device and the server respectively via different connection methods. When an abnormality occurs in the connection between the target device and the server, the electronic device can still be connected to the target device to diagnose the abnormal connection state between the target device and the server.
[0025] The first connection mode between the electronic device and the target device may be a Bluetooth connection mode, and the second connection mode between the electronic device and the server may be an SSE (Server-sent Events) long connection mode.
[0026] In addition, the electronic device can diagnose the abnormal connection status between the target device and the server through a preset application, that is, the user can operate the preset application in the electronic device to view the abnormal connection status between the target device and the server.
[0027] Furthermore, when the connection between the target device and the server is disconnected, the server detects the disconnection with the target device and generates an offline prompt, which is then sent to the electronic device. Upon receiving the offline prompt sent by the server, the electronic device sends a diagnostic data request to the target device. At this point, the target device and the electronic device are connected via the first connection method, thereby ensuring that the target device can receive the diagnostic data request sent by the electronic device.
[0028] Furthermore, upon receiving the diagnostic data request from the electronic device, the target device can generate diagnostic data based on the abnormal connection state between the current target device and the server, and send the diagnostic data to the electronic device. In this case, since the target device and the electronic device are connected via the first connection method, the diagnostic data can still be sent to the electronic device even if the target device is disconnected from the server.
[0029] Finally, the electronic device can analyze the received diagnostic data to determine the abnormal connection status between the target device and the server. At the same time, the user can view the abnormal connection status between the target device and the server through a preset application installed in the electronic device.
[0030] The network diagnostic method provided by the present application is that an electronic device is connected to a target device via a first connection method, so that when the target device is disconnected from a server, the electronic device can receive an offline prompt sent by the server. Furthermore, the electronic device is connected to the target device via a second connection method, so that when the electronic device receives an offline prompt, it can transmit diagnostic data to the target device, and then diagnose the abnormal connection status between the target device and the server based on the diagnostic data, so that the user can view the abnormal connection status between the target device and the server through the electronic device, thereby improving the user experience.
[0031] According to a third aspect of the present application, a network diagnostic method is proposed, which is executed by a server, the server is connected to an electronic device, and the server is connected to a target device. The network diagnostic method includes: when the connection with the target device is disconnected, obtaining a pre-stored media access control address of the target device; generating an offline prompt based on the media access control address; sending an offline prompt to the electronic device; wherein the offline prompt is used to prompt the electronic device that the target device is disconnected from the server, and the electronic device can send a diagnostic data request to the target device when receiving the offline prompt to diagnose the abnormal connection status between the target device and the server.
[0032] The network diagnostic method provided in the present application can be used to diagnose an abnormal connection state between a target device and a server, wherein the target device can be a household smart device, such as a television, a smart air conditioner, a smart refrigerator, etc. Furthermore, the network diagnostic method can be executed by a server, and the server is connected to the target device and the electronic device respectively, wherein the server is connected to the electronic device via a second connection method, and the electronic device is connected to the target device via a first connection method. That is, the electronic device is connected to the target device and the server respectively via different connection methods, and when an abnormality occurs in the connection between the target device and the server, the electronic device can still be connected to the target device to diagnose the abnormal connection state between the target device and the server.
[0033] The first connection mode between the electronic device and the target device may be a Bluetooth connection mode, and the second connection mode between the electronic device and the server may be an SSE (Server-sent Events) long connection mode.
[0034] In addition, the electronic device can diagnose the abnormal connection status between the target device and the server through a preset application, that is, the user can operate the preset application in the electronic device to view the abnormal connection status between the target device and the server.
[0035] Furthermore, when the connection between the target device and the server is disconnected, the server detects the disconnection with the target device and generates an offline prompt, which is then sent to the electronic device. It should be noted that when the connection between the target device and the server is disconnected, the media access control address (MAC address) of the target device can be first obtained, and then an offline prompt is generated based on the MAC address.
[0036] When the electronic device receives an offline prompt sent by the server, it can first determine the target device based on the Mac address in the offline prompt, and then send a diagnostic data request to the target device. At this time, the target device and the electronic device are connected via the first connection method, thereby ensuring that the target device can receive the diagnostic data request sent by the electronic device.
[0037] Furthermore, upon receiving the diagnostic data request from the electronic device, the target device can generate diagnostic data based on the abnormal connection state between the current target device and the server, and send the diagnostic data to the electronic device. In this case, since the target device and the electronic device are connected via the first connection method, the diagnostic data can still be sent to the electronic device even if the target device is disconnected from the server.
[0038] Finally, the electronic device can analyze the received diagnostic data to determine the abnormal connection status between the target device and the server. At the same time, the user can view the abnormal connection status between the target device and the server through a preset application installed in the electronic device.
[0039] The network diagnostic method provided by the present application is that an electronic device is connected to a target device via a first connection method, so that when the target device is disconnected from a server, the electronic device can receive an offline prompt sent by the server. Furthermore, the electronic device is connected to the target device via a second connection method, so that when the electronic device receives an offline prompt, it can transmit diagnostic data to the target device, and then diagnose the abnormal connection status between the target device and the server based on the diagnostic data, so that the user can view the abnormal connection status between the target device and the server through the electronic device, thereby improving the user experience.
[0040] According to the fourth aspect of the present application, a network diagnostic device is proposed for use in an electronic device, the network diagnostic device being used to diagnose an abnormal connection state between a target device and a server, the network diagnostic device comprising: a connecting unit for establishing a connection with the server; wherein the target device to be diagnosed is connected to the server; the connecting unit is further used to establish a connection with the target device upon receiving an offline prompt sent by the server; wherein the electronic device is connected to the target device via a first connection method, and the electronic device is connected to the server via a second connection method, and the offline prompt is generated by the server when the target device is disconnected from the server; a sending unit for sending a diagnostic data request to the target device; a receiving unit for receiving diagnostic data corresponding to the offline prompt sent by the target device; and a determining unit for determining the abnormal connection state between the target device and the server based on the diagnostic data.
[0041] The network diagnostic device provided by the present application is configured such that, during the process of diagnosing an abnormal connection status between a target device and a server, the electronic device and the target device are connected via a first connection method, so that when the target device and the server are disconnected, the electronic device can receive an offline prompt sent by the server. Furthermore, the electronic device and the target device are connected via a second connection method, so that when the electronic device receives an offline prompt, it can transmit diagnostic data to the target device, and then diagnose the abnormal connection status between the target device and the server based on the diagnostic data, so that the user can view the abnormal connection status between the target device and the server through the electronic device, thereby improving the user experience.
[0042] According to the fifth aspect of the present application, a network diagnostic device is proposed, which is used for a target device, the target device is connected to a server, the target device is connected to an electronic device via a first connection method, and the electronic device is connected to the server via a second connection method. The network diagnostic device includes: an acquisition unit, which is used to acquire an abnormal connection status between the target device and the server when a diagnostic data request is received from the electronic device; wherein the diagnostic data request is generated by the electronic device when it receives an offline prompt sent by the server, and the offline prompt is generated by the server when the target device is disconnected from the server; a generation unit, which is used to generate diagnostic data according to the abnormal connection status; wherein the diagnostic data is used for the electronic device to parse to determine the abnormal connection status between the target device and the server; and a sending unit, which is used to send the diagnostic data to the electronic device.
[0043] The network diagnostic device provided by the present application is configured such that, during the process of diagnosing an abnormal connection status between a target device and a server, the electronic device and the target device are connected via a first connection method, so that when the target device and the server are disconnected, the electronic device can receive an offline prompt sent by the server. Furthermore, the electronic device and the target device are connected via a second connection method, so that when the electronic device receives an offline prompt, it can transmit diagnostic data to the target device, and then diagnose the abnormal connection status between the target device and the server based on the diagnostic data, so that the user can view the abnormal connection status between the target device and the server through the electronic device, thereby improving the user experience.
[0044] According to the sixth aspect of the present application, a network diagnostic device is proposed, which is used for a server, wherein the server is connected to an electronic device, and the server is connected to a target device. The network diagnostic device includes: an acquisition unit, which is used to acquire a pre-stored media access control address of the target device when the connection with the target device is disconnected; a generation unit, which is used to generate an offline prompt based on the media access control address; and a sending unit, which is used to send an offline prompt to the electronic device; wherein the offline prompt is used to prompt the electronic device that the target device is disconnected from the server, and the electronic device can send a diagnostic data request to the target device when receiving the offline prompt to diagnose the abnormal connection status between the target device and the server.
[0045] The network diagnostic device provided by the present application is configured such that, during the process of diagnosing an abnormal connection status between a target device and a server, the electronic device and the target device are connected via a first connection method, so that when the target device and the server are disconnected, the electronic device can receive an offline prompt sent by the server. Furthermore, the electronic device and the target device are connected via a second connection method, so that when the electronic device receives an offline prompt, it can transmit diagnostic data to the target device, and then diagnose the abnormal connection status between the target device and the server based on the diagnostic data, so that the user can view the abnormal connection status between the target device and the server through the electronic device, thereby improving the user experience.
[0046] According to the seventh aspect of the present application, an electronic device is proposed, comprising: a processor and a memory, the memory storing programs or instructions that can be run on the processor, and the programs or instructions, when executed by the processor, implementing the steps of the network diagnostic method provided in any one of the first aspect, the second aspect and the third aspect.
[0047] The electronic device provided in this application includes a memory and a processor, and also includes a program or instruction stored in the memory. When the program or instruction is executed by the processor, it can implement the steps of the network diagnostic method of any one of the above-mentioned first aspect, second aspect and third aspect. Therefore, the electronic device has all the beneficial effects of the above-mentioned network diagnostic method, which will not be repeated here.
[0048] According to the eighth aspect of the present application, a readable storage medium is proposed, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the network diagnostic method provided in any one of the first aspect, the second aspect and the third aspect are implemented.
[0049] The readable storage medium provided in this application stores a program or instruction thereon. When the program or instruction is executed by the processor, it can implement the steps of the network diagnostic method provided in any one of the first aspect, the second aspect and the third aspect. Therefore, the readable storage medium has all the beneficial effects of the above-mentioned network diagnostic method and will not be repeated here.
[0050] According to the ninth aspect of the present application, a computer program product is proposed, comprising a computer program or instructions, which, when executed by a processor, implements the steps of the network diagnostic method provided in any one of the first, second and third aspects.
[0051] The computer program product provided in this application includes a computer program or instructions. When the computer program or instructions are executed by a processor, it can implement the steps of the network diagnostic method provided in any one of the first aspect, the second aspect and the third aspect. Therefore, the computer program product has all the beneficial effects of the above-mentioned network diagnostic method and will not be repeated here.
[0052] Additional aspects and advantages of the present application will become apparent in the following description or may be learned through practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0054] FIG1 shows a flow chart of a network diagnosis method according to an embodiment of the present application;
[0055] FIG2 shows a second flow chart of a network diagnosis method according to an embodiment of the present application;
[0056] FIG3 shows a third flow chart of a network diagnosis method according to an embodiment of the present application;
[0057] FIG4 shows one structural block diagram of a network diagnostic device according to an embodiment of the present application;
[0058] FIG5 shows a second structural block diagram of a network diagnostic device according to an embodiment of the present application;
[0059] FIG6 shows a third structural block diagram of a network diagnostic device according to an embodiment of the present application;
[0060] FIG7 shows a topological diagram of a network diagnosis process according to an embodiment of the present application;
[0061] The correspondence between the reference numerals and component names in Figures 4 to 6 is: 400 network diagnostic device, 402 connection unit, 404 sending unit, 406 receiving unit, 408 determination unit, 500 network diagnostic device, 502 acquisition unit, 504 generation unit, 506 sending unit, 600 network diagnostic device, 602 acquisition unit, 604 generation unit, 606 sending unit. DETAILED DESCRIPTION
[0062] In order to more clearly understand the above-mentioned objects, features and advantages of the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features therein can be combined with each other in the absence of conflict.
[0063] In the following description, many specific details are set forth to facilitate a full understanding of the present application. However, the present application may also be implemented in other ways different from those described herein. Therefore, the scope of protection of the present application is not limited to the specific embodiments disclosed below.
[0064] The following describes a network diagnosis method, a network diagnosis apparatus, an electronic device, and a readable storage medium according to some embodiments of the present application with reference to FIG1 to FIG7 .
[0065] As shown in FIG1 , according to one embodiment of the present application, a network diagnostic method is proposed, which is executed by an electronic device. The network diagnostic method is used to diagnose an abnormal connection status between a target device and a server. The electronic device is connected to the target device via a first connection method, and the electronic device is connected to the server via a second connection method. The network diagnostic method includes:
[0066] S102, establishing a connection with a server;
[0067] Wherein, the target device to be diagnosed is connected to the server;
[0068] S104, establishing a connection with the target device when receiving an offline prompt sent by the server;
[0069] The electronic device is connected to the target device via a first connection method, and is connected to the server via a second connection method. The offline prompt is generated by the server when the target device is disconnected from the server.
[0070] S106, sending a diagnostic data request to the target device;
[0071] S108, receiving diagnostic data corresponding to the diagnostic data request sent by the target device;
[0072] S110: Determine an abnormal connection state between the target device and the server based on the diagnostic data.
[0073] The network diagnostic method provided herein can be used to diagnose an abnormal connection state between a target device and a server, wherein the target device can be a smart home device, such as a television, smart air conditioner, or smart refrigerator, and the target device is connected to a server. Furthermore, the network diagnostic method can be performed by an electronic device, which is connected to a server (i.e., the same server to which the target device is connected) via a second connection method. Upon receiving an offline notification sent by the server, the electronic device establishes a connection with the target device. Specifically, before the electronic device diagnoses the abnormal connection state of the target device, the electronic device is connected to the server via the second connection method, but not to the target device. After the diagnosis begins, the electronic device connects to the target device via the first connection method to diagnose the abnormal connection state. Specifically, when the connection between the target device and the server is disconnected, the server detects the disconnection and generates an offline notification, which is then sent to the electronic device. The electronic device then connects to the target device via the first connection method. Specifically, the electronic device connects to the target device via the first connection method. Specifically, the electronic device connects to the target device and the server via different connection methods. When an abnormality occurs in the connection between the target device and the server, the electronic device can still connect to the target device to diagnose the abnormal connection state between the target device and the server.
[0074] The first connection mode between the electronic device and the target device may be a Bluetooth connection mode, and the second connection mode between the electronic device and the server may be an SSE (Server-sent Events) long connection mode.
[0075] In addition, the electronic device can diagnose the abnormal connection status between the target device and the server through a preset application, that is, the user can operate the preset application in the electronic device to view the abnormal connection status between the target device and the server.
[0076] Furthermore, when the electronic device receives an offline prompt sent by the server, a connection is established between the electronic device and the target device, and then a diagnostic data request is sent to the target device. It is understandable that when the connection between the target device and the server is disconnected, the server detects that the connection with the target device is disconnected, and an offline prompt can be generated, and then the offline prompt is sent to the electronic device. Among them, the user can operate the preset application to manually receive the offline prompt sent by the server. Specifically, the connection status between the target device and the server can be actively refreshed by operating the preset program of the electronic device. When the server is disconnected from the target device, the corresponding offline prompt will be received. Or when the second connection mode is the SSE long connection mode, the offline prompt sent by the server can be automatically received, that is, the connection status between the target device and the server sent by the server is received in real time at a preset time interval. When the server is disconnected from the target device, the corresponding offline prompt will be received.
[0077] Then, when receiving the offline prompt, the electronic device can send a diagnostic data request to the target device. At this time, the target device and the electronic device are connected via the first connection mode, thereby ensuring that the target device can receive the diagnostic data request sent by the electronic device.
[0078] Furthermore, the electronic device receives diagnostic data corresponding to the diagnostic data request sent by the target device. At this time, since the target device and the electronic device are connected via the first connection method, even if the target device is disconnected from the server, the diagnostic data can still be sent to the electronic device.
[0079] Finally, the electronic device can analyze the received diagnostic data to determine the abnormal connection status between the target device and the server. At the same time, the user can view the abnormal connection status between the target device and the server through a preset application installed in the electronic device.
[0080] The network diagnostic method provided by the present application is that the electronic device and the server are connected via a second connection method. When the target device and the server are disconnected, the electronic device can receive an offline prompt sent by the server. Furthermore, the electronic device and the target device are connected via a first connection method, so that when the electronic device receives the offline prompt, it can transmit diagnostic data to the target device, and then diagnose the abnormal connection status between the target device and the server based on the diagnostic data, so that the user can view the abnormal connection status between the target device and the server through the electronic device, thereby improving the user experience.
[0081] In some embodiments, optionally, based on the diagnostic data, the abnormal connection status between the target device and the server is determined, including: parsing the diagnostic data to generate a diagnostic status code; determining the abnormal connection status corresponding to the diagnostic status code in a preset diagnostic status code mapping table; wherein the diagnostic status code mapping table is used to display the mapping relationship between the diagnostic status code and the abnormal connection status.
[0082] In this embodiment, after receiving the diagnostic data sent by the target device, the electronic device may first parse the diagnostic data to generate a diagnostic status code, and then determine the abnormal connection status between the target device and the server based on the diagnostic status code.
[0083] It should be noted that the electronic device may store a diagnostic status code mapping table, so that after parsing the diagnostic status code, the electronic device can directly determine the abnormal connection state corresponding to the parsed diagnostic status code based on the diagnostic status code mapping table. The diagnostic status code and the diagnostic status code mapping table are both pre-established based on a variety of different abnormal connection states between the target device and the server, and are used to display the mapping relationship between different diagnostic status codes and different abnormal connection states.
[0084] By determining the abnormal connection status corresponding to the diagnostic status code in a preset diagnostic status code mapping table, the efficiency of determining the abnormal connection status between the target device and the server can be effectively improved.
[0085] For example, a diagnostic status code mapping table is shown in Table 1, where there can be multiple diagnostic status codes, such as status code 1, status code 2, etc., with different status codes representing different connection states between the target device and the server. For example, the connection state between the target device and the server may include: the target device connection state is normal; the electronic device's default application can directly access the device plug-in page to control the target device; the router password is incorrect, and the default application of the electronic device displays a fault message: "Please confirm whether the router WiFi name or password has been changed. If the WiFi name or password has been changed, please click the button below to reconnect the device"; the router signal is weak, and the default application of the electronic device displays a fault message: "The router is too far away. Please move the router closer to the device or add a bridged router and re-diagnose"; an unknown error; or "No routing information found"; the default application of the electronic device displays a fault message: "Please confirm that the router WiFi name has not been changed. If it has been changed, please reconnect to the network"; the router connection fails, and the default application of the electronic device displays a fault message: "Please confirm that the router has not set a Mac address blacklist. Please re-diagnose after confirmation. If the problem still cannot be solved, please try to reconnect to the network"; the device cannot connect to the cloud. When a default application on an electronic device fails, the message "Please confirm that the network is connected and re-diagnose / If the problem persists, please try reconnecting to the network" is displayed. Any of status codes 1 to 7 may include one specific status code or multiple specific status codes.
[0086] Table 1
[0087] In some embodiments, optionally, sending a diagnostic data request to a target device includes: receiving a first input; and sending a diagnostic data request to the target device in response to the first input.
[0088] In this embodiment, when the electronic device receives an offline notification sent by the server, the user can operate the electronic device to initiate diagnosis of an abnormal connection status of the target device. Specifically, the user can perform a first input on the electronic device, and the electronic device, in response to the first input, can send a diagnostic data request to the target device to diagnose the abnormal connection status of the target device.
[0089] In some embodiments, optionally, upon receiving an offline prompt sent by the server, before sending a diagnostic data request to the target device, the network diagnosis method further includes: obtaining a first media access control address in the offline prompt; and determining the target device based on the first media access control address.
[0090] In this embodiment, when the connection between the target device and the server is disconnected, the server detects the disconnection with the target device and generates an offline prompt, which is then sent to the electronic device. It should be noted that when the connection between the target device and the server is disconnected, the media access control address (MAC address) of the target device can be first obtained, and then the offline prompt is generated based on the MAC address.
[0091] Accordingly, when the electronic device receives an offline prompt sent by the server, it can first obtain the first media access control address in the offline prompt, then determine the target device based on the obtained first media access control address, and then send a diagnostic data request to the target device.
[0092] It is understandable that, generally, a user may have multiple smart home appliances at home, and all of the smart home appliances can be network-bound through electronic devices. After the multiple smart home appliances are connected to the server, the electronic device then uploads the media access control address of each smart home appliance to the server so that the server can identify the multiple smart home appliances. In other words, when a user controls multiple smart home appliances through a preset application on an electronic device, the user can directly control the multiple smart home appliances to establish a connection with the server through the preset application, and upload the media access control addresses of the multiple smart home appliances to the server through the preset application. In the process of transmitting data from the smart home appliance to the server and between the smart home appliance and the electronic device, the smart home appliance can add its own media access control address to the broadcast data packet. Both the electronic device and the server can parse through the agreed communication protocol to obtain the media access control address issued by the smart home appliance, thereby realizing the identification of the smart home appliance.
[0093] In some embodiments, optionally, determining the abnormal connection status between the target device and the server based on the diagnostic data includes: obtaining a second media access control address in the diagnostic data; and when the second media access control address corresponds to the first media access control address, determining the abnormal connection status between the target device and the server based on the diagnostic data.
[0094] In this embodiment, when the electronic device receives diagnostic data, it can also obtain the second media access control address in the diagnostic data, and then compare the second media access control address in the diagnostic data with the first media access control address in the offline prompt sent by the server to determine whether the received diagnostic data is sent by the target device, thereby ensuring that the abnormal connection status between the target device and the server can be accurately diagnosed.
[0095] In some embodiments, optionally, after determining the abnormal connection status between the target device and the server based on the diagnostic data, the network diagnosis method further includes: generating processing measures corresponding to the abnormal connection status based on the abnormal connection status; and instructing the target device to establish a connection with the server based on the processing measures.
[0096] In this embodiment, the electronic device may also generate corresponding processing measures according to the determined abnormal connection state, and further instruct the target device to re-establish a connection with the server according to the processing measures.
[0097] In some embodiments, optionally, instructing the target device to establish a connection with the server based on the processing measures includes: sending a routing self-check prompt to the target device; wherein the routing self-check prompt is used to prompt the target device to re-initiate the connection process with the server.
[0098] Specifically, a status code of 1 indicates a successful diagnosis and a normal connection to the target device. The electronic device's default application can directly access the device's plug-in page to control the target device, without generating a corrective action. A status code of 2 indicates an incorrect router password. The default application displays the message "Please confirm whether the router's WiFi name or password has been changed. If so, click the button below to reconnect the device." The corrective action is: The default application provides a user-friendly button for one-click reconnection, updating the router's WiFi name or password. A status code of 3 indicates a weak router signal. The default application displays the message "The router is too far away. Please move the router closer to the device or add a bridged router and rediagnose." The corrective action is: The default application guides the user to move the target device or router to enhance the signal. A status code of 4 indicates an unknown error. The corrective action is: The default application provides a user-friendly button for reconnecting, which initiates the device configuration process, resends the WiFi name and password, and binds the device to the home account. A status code of 5 indicates no routing information was found. The default application of the electronic device displays a malfunction message "Please confirm that the router WiFi name has not been modified. If it has been modified, please reconnect to the network." The handling measure is: The default application of the electronic device provides re-diagnosis and re-networking button operations. Status code 6 means that the connection to the router has failed. The default application of the electronic device displays a malfunction message "Please confirm that the router has not set up a Mac address blacklist, etc. After confirmation, please re-diagnose / If the problem still cannot be solved, please try to reconnect to the network." The handling measure is: The default application of the electronic device provides re-diagnosis and re-networking button operations. Status code 7 means that the device cannot connect to the cloud. The default application of the electronic device displays a malfunction message "Please confirm that the network is unobstructed and re-diagnose / If the problem still cannot be solved, please try to reconnect to the network." The handling measure is: The default application of the electronic device provides re-diagnosis and re-networking button operations.
[0099] As shown in FIG2 , according to one embodiment of the present application, a network diagnostic method is proposed, which is executed by a target device, the target device is connected to a server, the target device is connected to an electronic device via a first connection method, and the electronic device is connected to the server via a second connection method. The network diagnostic method includes:
[0100] S202, upon receiving a diagnostic data request sent by the electronic device, obtaining an abnormal connection status with the server;
[0101] The diagnostic data request is generated by the electronic device when receiving an offline prompt sent by the server, and the offline prompt is generated by the server when the target device is disconnected from the server;
[0102] S204, generating diagnostic data based on the abnormal connection state;
[0103] The diagnostic data is used for analysis by the electronic device to determine the abnormal connection status between the target device and the server;
[0104] S206: Send diagnostic data to the electronic device.
[0105] The network diagnostic method provided in the present application can be used to diagnose an abnormal connection state between a target device and a server, wherein the target device can be a household smart device, such as a television, a smart air conditioner, a smart refrigerator, etc. Furthermore, the network diagnostic method can be executed by the target device, the target device is connected to the electronic device via a first connection method, and the electronic device is connected to the server via a second connection method. That is, the electronic device is connected to the target device and the server respectively via different connection methods. When an abnormality occurs in the connection between the target device and the server, the electronic device can still be connected to the target device to diagnose the abnormal connection state between the target device and the server.
[0106] The first connection mode between the electronic device and the target device may be a Bluetooth connection mode, and the second connection mode between the electronic device and the server may be an SSE (Server-sent Events) long connection mode.
[0107] In addition, the electronic device can diagnose the abnormal connection status between the target device and the server through a preset application, that is, the user can operate the preset application in the electronic device to view the abnormal connection status between the target device and the server.
[0108] Furthermore, when the connection between the target device and the server is disconnected, the server detects the disconnection with the target device and generates an offline prompt, which is then sent to the electronic device. Upon receiving the offline prompt sent by the server, the electronic device sends a diagnostic data request to the target device. At this point, the target device and the electronic device are connected via the first connection method, thereby ensuring that the target device can receive the diagnostic data request sent by the electronic device.
[0109] Furthermore, upon receiving the diagnostic data request from the electronic device, the target device can generate diagnostic data based on the abnormal connection state between the current target device and the server, and send the diagnostic data to the electronic device. In this case, since the target device and the electronic device are connected via the first connection method, the diagnostic data can still be sent to the electronic device even if the target device is disconnected from the server.
[0110] Finally, the electronic device can analyze the received diagnostic data to determine the abnormal connection status between the target device and the server. At the same time, the user can view the abnormal connection status between the target device and the server through a preset application installed in the electronic device.
[0111] The network diagnostic method provided by the present application is that an electronic device is connected to a target device via a first connection method, so that when the target device is disconnected from a server, the electronic device can receive an offline prompt sent by the server. Furthermore, the electronic device is connected to the target device via a second connection method, so that when the electronic device receives an offline prompt, it can transmit diagnostic data to the target device, and then diagnose the abnormal connection status between the target device and the server based on the diagnostic data, so that the user can view the abnormal connection status between the target device and the server through the electronic device, thereby improving the user experience.
[0112] In some embodiments, optionally, diagnostic data is generated based on the abnormal connection status, including: obtaining a media access control address of the target device; obtaining a preset diagnostic status code mapping table; wherein the diagnostic status code mapping table is used to display a mapping relationship between the diagnostic status code and the abnormal connection status; in the diagnostic status code mapping table, determining the diagnostic status code corresponding to the abnormal connection status; and generating diagnostic data based on the media access control address and the diagnostic status code.
[0113] In this embodiment, after the target device receives the diagnostic data request sent by the electronic device, the target device can first obtain the diagnostic status code mapping table, and then directly determine the diagnostic status code corresponding to the current abnormal connection state between the target device and the server based on the diagnostic status code mapping table, as shown in Table 1. The diagnostic status code and the diagnostic status code mapping table are both pre-established based on a variety of different abnormal connection states between the target device and the server, and are used to display the mapping relationship between different diagnostic status codes and different abnormal connection states.
[0114] By determining the diagnostic status code corresponding to the abnormal connection status in the preset diagnostic status code mapping table, the efficiency of determining the diagnostic status code can be effectively improved, thereby improving the efficiency of the electronic device in determining the abnormal connection status between the target device and the server.
[0115] Furthermore, the target device can also obtain its own media access control address, and then generate diagnostic data based on the media access control address and the diagnostic status code, and send the diagnostic data to the electronic device so that the electronic device can identify the target device, and then determine the abnormal connection status between the target device and the server based on the diagnostic status code.
[0116] In some embodiments, optionally, the network diagnostic method further includes: uploading the media access control address of the target device to the server when connected to the server; wherein, when the server is disconnected from the target device, the server can generate an offline prompt based on the media access control address.
[0117] In this embodiment, when the target device is properly connected to the server, the target device can upload its own media access control address to the server. When the target device is disconnected from the server, the server can generate an offline notification based on the media access control address. Furthermore, the electronic device can identify the target device based on the media access control address in the offline notification sent by the server.
[0118] It is understandable that, usually, a user may place multiple smart home appliances at home. After connecting to the server, the multiple smart home appliances will upload their own media access control addresses to the server so that the server can identify the multiple smart home appliances. In addition, when a user controls multiple smart home appliances through a preset application on an electronic device, the user can directly control the multiple smart home appliances to establish a connection with the server through the preset application, and upload the media access control addresses of the multiple smart home appliances to the server through the preset application. In the process of data transmission between smart home appliances and servers and electronic devices, as well as in the process of data transmission between electronic devices and smart home appliances, the media access control addresses of smart home appliances can be added to the transmitted data to identify the communicating smart home appliances.
[0119] As shown in FIG3 , according to one embodiment of the present application, a network diagnostic method is proposed, which is executed by a server. The server is connected to an electronic device, and the server is connected to a target device. The network diagnostic method includes:
[0120] S302, when the connection with the target device is disconnected, obtaining a pre-stored media access control address of the target device;
[0121] S304, generating an offline prompt according to the media access control address;
[0122] S306: Send an offline prompt to the electronic device.
[0123] The offline prompt is used to prompt the electronic device that the target device is disconnected from the server. Upon receiving the offline prompt, the electronic device can send a diagnostic data request to the target device to diagnose the abnormal connection status between the target device and the server.
[0124] The network diagnostic method provided in the present application can be used to diagnose an abnormal connection state between a target device and a server, wherein the target device can be a household smart device, such as a television, a smart air conditioner, a smart refrigerator, etc. Furthermore, the network diagnostic method can be executed by a server, and the server is connected to the target device and the electronic device respectively, wherein the server is connected to the electronic device via a second connection method, and the electronic device is connected to the target device via a first connection method. That is, the electronic device is connected to the target device and the server respectively via different connection methods, and when an abnormality occurs in the connection between the target device and the server, the electronic device can still be connected to the target device to diagnose the abnormal connection state between the target device and the server.
[0125] The first connection mode between the electronic device and the target device may be a Bluetooth connection mode, and the second connection mode between the electronic device and the server may be an SSE (Server-sent Events) long connection mode.
[0126] In addition, the electronic device can diagnose the abnormal connection status between the target device and the server through a preset application, that is, the user can operate the preset application in the electronic device to view the abnormal connection status between the target device and the server.
[0127] Furthermore, when the connection between the target device and the server is disconnected, the server detects the disconnection with the target device and generates an offline prompt, which is then sent to the electronic device. It should be noted that when the connection between the target device and the server is disconnected, the media access control address (MAC address) of the target device can be first obtained, and then an offline prompt is generated based on the MAC address.
[0128] When the electronic device receives an offline prompt sent by the server, it can first determine the target device based on the Mac address in the offline prompt, and then send a diagnostic data request to the target device. At this time, the target device and the electronic device are connected via the first connection method, thereby ensuring that the target device can receive the diagnostic data request sent by the electronic device.
[0129] Furthermore, upon receiving the diagnostic data request from the electronic device, the target device can generate diagnostic data based on the abnormal connection state between the current target device and the server, and send the diagnostic data to the electronic device. In this case, since the target device and the electronic device are connected via the first connection method, the diagnostic data can still be sent to the electronic device even if the target device is disconnected from the server.
[0130] Finally, the electronic device can analyze the received diagnostic data to determine the abnormal connection status between the target device and the server. At the same time, the user can view the abnormal connection status between the target device and the server through a preset application installed in the electronic device.
[0131] The network diagnostic method provided by the present application is that an electronic device is connected to a target device via a first connection method, so that when the target device is disconnected from a server, the electronic device can receive an offline prompt sent by the server. Furthermore, the electronic device is connected to the target device via a second connection method, so that when the electronic device receives an offline prompt, it can transmit diagnostic data to the target device, and then diagnose the abnormal connection status between the target device and the server based on the diagnostic data, so that the user can view the abnormal connection status between the target device and the server through the electronic device, thereby improving the user experience.
[0132] In a specific embodiment, as shown in Figure 7, the electronic device controls the establishment of a network connection between the target device and the server through a preset application (APP), that is, the APP configures the target device to access the Internet to achieve a connection between the target device and the server. Then, the APP is connected to the server through an SSE long connection. At the same time, the target device can synchronize its own connection status to the APP through the server. That is, when the target device is disconnected from the server, the server sends the connection status of the target device to the APP. Alternatively, the APP can actively request the connection status of the target device to determine whether the target device is disconnected from the server.
[0133] Furthermore, when the APP receives an offline prompt from the server, it determines that the target device is offline and then initiates a Bluetooth scan, that is, connects to the target device via Bluetooth. The target device replies with diagnostic data via Bluetooth. The APP matches the diagnostic results based on the diagnostic status code in the diagnostic data, determines the abnormal connection status, and further generates processing measures based on the abnormal connection status to instruct the target device to re-establish a connection with the server. For example, it prompts the target device to self-check with the router, update the Wi-Fi name and password to which the target device is connected, reconnect to the network and enter the network configuration process, rebind the account, etc.
[0134] According to the fourth aspect of the present application, as shown in Figure 4, a network diagnostic device 400 is proposed for electronic equipment, and the network diagnostic device 400 includes: a connecting unit 402, which establishes a connection with a server; wherein the target device to be diagnosed is connected to the server; the connecting unit 402 is also used to establish a connection with the target device when an offline prompt sent by the server is received; wherein the electronic device is connected to the target device through a first connection method, and the electronic device is connected to the server through a second connection method, and the offline prompt is generated by the server when the target device is disconnected from the server; a sending unit 404, which is used to send a diagnostic data request to the target device; a receiving unit 406, which is used to receive diagnostic data corresponding to the offline prompt sent by the target device; and a determining unit 408, which is used to determine the abnormal connection status between the target device and the server based on the diagnostic data.
[0135] The network diagnostic device 400 provided in the present application is configured such that, during the process of diagnosing an abnormal connection state between a target device and a server, the electronic device and the target device are connected via a first connection method, so that when the target device and the server are disconnected, the electronic device can receive an offline prompt sent by the server. Furthermore, the electronic device and the target device are connected via a second connection method, so that when the electronic device receives an offline prompt, it can transmit diagnostic data to the target device, and then diagnose the abnormal connection state between the target device and the server based on the diagnostic data, so that the user can view the abnormal connection state between the target device and the server through the electronic device, thereby improving the user experience.
[0136] Furthermore, the determination unit 408 is specifically used to: parse the diagnostic data and generate a diagnostic status code; determine the abnormal connection status corresponding to the diagnostic status code in a preset diagnostic status code mapping table; wherein the diagnostic status code mapping table is used to display the mapping relationship between the diagnostic status code and the abnormal connection status.
[0137] Furthermore, the receiving unit 406 is further configured to receive a first input; and the sending unit 404 is further configured to send a diagnostic data request to the target device in response to the first input.
[0138] Furthermore, the determining unit 408 is further configured to: obtain a first media access control address in the offline prompt; and determine a target device according to the first media access control address.
[0139] Furthermore, the determining unit 408 is further configured to: obtain a second media access control address in the diagnostic data; and determine an abnormal connection state between the target device and the server based on the diagnostic data when the second media access control address corresponds to the first media access control address.
[0140] Furthermore, the network diagnosis apparatus 400 further includes a generating unit configured to generate a processing measure corresponding to the abnormal connection state according to the abnormal connection state; and instruct the target device to establish a connection with the server according to the processing measure.
[0141] Furthermore, the generator is further used to generate a route self-check prompt according to the processing measures; the sending unit is further used to send the route self-check prompt to the target device; wherein the route self-check prompt is used to prompt the target device to re-initiate the connection process with the server.
[0142] According to the fifth aspect of the present application, as shown in Figure 5, a network diagnostic device 500 is proposed, which is used for a target device, the target device is connected to a server, the target device is connected to an electronic device via a first connection method, and the electronic device is connected to the server via a second connection method. The network diagnostic device 500 includes: an acquisition unit 502, which is used to obtain an abnormal connection status between the target device and the server when a diagnostic data request is received from the electronic device; wherein the diagnostic data request is generated by the electronic device when it receives an offline prompt sent by the server, and the offline prompt is generated by the server when the target device is disconnected from the server; a generation unit 504, which is used to generate diagnostic data according to the abnormal connection status; wherein the diagnostic data is used for the electronic device to parse to determine the abnormal connection status between the target device and the server; a sending unit 506, which is used to send diagnostic data to the electronic device.
[0143] The network diagnostic device 500 provided by the present application is configured such that, during the process of diagnosing the abnormal connection status between the target device and the server, the electronic device and the target device are connected via a first connection method, so that when the target device and the server are disconnected, the electronic device can receive an offline prompt sent by the server. Furthermore, the electronic device and the target device are connected via a second connection method, so that when the electronic device receives the offline prompt, it can transmit diagnostic data to the target device, and then diagnose the abnormal connection status between the target device and the server based on the diagnostic data, so that the user can view the abnormal connection status between the target device and the server through the electronic device, thereby improving the user experience.
[0144] Furthermore, the generation unit 504 is specifically used to: obtain the media access control address of the target device; obtain a preset diagnostic status code mapping table; wherein the diagnostic status code mapping table is used to display the mapping relationship between the diagnostic status code and the abnormal connection status; in the diagnostic status code mapping table, determine the diagnostic status code corresponding to the abnormal connection status; generate diagnostic data based on the media access control address and the diagnostic status code.
[0145] Furthermore, the network diagnostic apparatus 500 further includes an uploading unit for uploading the media access control address of the target device to the server when connected to the server; wherein, when the server is disconnected from the target device, the server can generate an offline prompt based on the media access control address.
[0146] According to the sixth aspect of the present application, as shown in Figure 6, a network diagnostic device 600 is proposed, which is used for a server, the server is connected to an electronic device, and the server is connected to a target device. The network diagnostic device 600 includes: an acquisition unit 602, which is used to obtain a pre-stored media access control address of the target device when the connection with the target device is disconnected; a generation unit 604, which is used to generate an offline prompt based on the media access control address; a sending unit 606, which is used to send an offline prompt to the electronic device; wherein the offline prompt is used to prompt the electronic device that the target device is disconnected from the server, and the electronic device can send a diagnostic data request to the target device when receiving the offline prompt to diagnose the abnormal connection status between the target device and the server.
[0147] The network diagnostic device 600 provided by the present application is configured such that, during the process of diagnosing the abnormal connection status between the target device and the server, the electronic device and the target device are connected via a first connection method, so that when the target device and the server are disconnected, the electronic device can receive an offline prompt sent by the server. Furthermore, the electronic device and the target device are connected via a second connection method, so that when the electronic device receives the offline prompt, it can transmit diagnostic data to the target device, and then diagnose the abnormal connection status between the target device and the server based on the diagnostic data, so that the user can view the abnormal connection status between the target device and the server through the electronic device, thereby improving the user experience.
[0148] According to the seventh aspect of the present application, an electronic device is proposed, comprising: a processor and a memory, the memory storing programs or instructions that can be run on the processor, and implementing the steps of the network diagnostic method provided in any one of the above embodiments when the program or instructions are executed by the processor.
[0149] The electronic device provided in this application includes a memory and a processor, and also includes a program or instruction stored in the memory. When the program or instruction is executed by the processor, it can implement the steps of the network diagnostic method of any one of the above embodiments. Therefore, the electronic device has all the beneficial effects of the above-mentioned network diagnostic method, which will not be repeated here.
[0150] According to an eighth aspect of the present application, a readable storage medium is proposed, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the network diagnostic method provided in any one of the above embodiments are implemented.
[0151] The readable storage medium provided in this application stores a program or instruction thereon. When the program or instruction is executed by the processor, it can implement the steps of the network diagnostic method provided in any one of the above embodiments. Therefore, the storage medium has all the beneficial effects of the above network diagnostic method and will not be repeated here.
[0152] In the description of this application, the term "plurality" refers to two or more than two. Unless otherwise expressly defined, the orientation or positional relationship indicated by the terms "upper" and "lower" is based on the orientation or positional relationship shown in the accompanying drawings. It is only for the convenience of describing this application and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on this application. The terms "connection", "installation", "fixed", etc. should be understood in a broad sense. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to the specific circumstances.
[0153] Throughout this specification, terms such as "one embodiment," "some embodiments," and "specific embodiments" mean that the specific features, structures, materials, or characteristics described in conjunction with that embodiment or example are included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
[0154] The above are merely preferred embodiments of the present application and are not intended to limit the present application. Those skilled in the art will readily appreciate that various modifications and variations are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application shall be included within the scope of protection of the present application.
Claims
1. A network diagnostic method, performed by an electronic device, wherein: The network diagnosis method comprises: Establish a connection with the server; wherein the target device to be diagnosed is connected to the server; Upon receiving an offline prompt sent by the server, establishing a connection with the target device; The electronic device is connected to the target device via a first connection method, and is connected to the server via a second connection method, and the offline prompt is generated by the server when the target device is disconnected from the server; sending a diagnostic data request to the target device; receiving diagnostic data corresponding to the diagnostic data request sent by the target device; An abnormal connection state between the target device and the server is determined based on the diagnostic data.
2. The network diagnosis method according to claim 1, wherein: The determining, based on the diagnostic data, an abnormal connection state between the target device and the server includes: Parsing the diagnostic data to generate a diagnostic status code; Determining the abnormal connection state corresponding to the diagnostic status code in a preset diagnostic status code mapping table; The diagnostic status code mapping table is used to display the mapping relationship between the diagnostic status code and the abnormal connection status.
3. The network diagnosis method according to claim 1 or 2, wherein: The sending a diagnostic data request to the target device includes: receiving a first input; In response to the first input, a diagnostic data request is sent to the target device.
4. The network diagnosis method according to claim 1 or 2, wherein: In the case of receiving the offline prompt sent by the server, before establishing a connection with the target device, the network diagnosis method further includes: Obtaining a first media access control address in the offline prompt; The target device is determined according to the first media access control address.
5. The network diagnosis method according to claim 4, wherein: The determining, based on the diagnostic data, an abnormal connection state between the target device and the server includes: Obtaining a second media access control address in the diagnostic data; In a case where the second media access control address corresponds to the first media access control address, an abnormal connection state between the target device and the server is determined according to the diagnostic data.
6. The network diagnosis method according to claim 1 or 2, wherein: After determining the abnormal connection state between the target device and the server according to the diagnostic data, the network diagnostic method further includes: generating, according to the abnormal connection state, a treatment measure corresponding to the abnormal connection state; According to the processing measure, the target device is instructed to establish a connection with the server.
7. The network diagnosis method according to claim 6, wherein: The step of instructing the target device to establish a connection with the server according to the processing measure includes: generating a routing self-check prompt according to the processing measures; Sending a routing self-check prompt to the target device; The routing self-check prompt is used to prompt the target device to re-initiate a connection process with the server.
8. A network diagnostic method, performed by a target device, wherein: The target device is connected to a server, the target device is connected to an electronic device via a first connection mode, and the electronic device is connected to the server via a second connection mode. The network diagnosis method includes: Upon receiving a diagnostic data request sent by the electronic device, obtaining an abnormal connection status with the server; wherein the diagnostic data request is generated by the electronic device when receiving an offline prompt sent by the server, and the offline prompt is generated by the server when the target device is disconnected from the server; generating diagnostic data according to the abnormal connection state; The diagnostic data is used for analysis by the electronic device to determine an abnormal connection status between the target device and the server; The diagnostic data is sent to the electronic device.
9. The network diagnosis method according to claim 8, wherein: The generating of diagnostic data according to the abnormal connection state includes: Obtaining a media access control address of the target device; Get the preset diagnostic status code mapping table; Wherein, the diagnostic status code mapping table is used to display the mapping relationship between the diagnostic status code and the abnormal connection status; Determining the diagnostic status code corresponding to the abnormal connection status in the diagnostic status code mapping table; The diagnostic data is generated according to the media access control address and the diagnostic status code.
10. The network diagnosis method according to claim 8, wherein: The network diagnosis method further includes: When connected to the server, uploading the media access control address of the target device to the server; Wherein, when the server is disconnected from the target device, the server can generate the offline prompt according to the media access control address.
11. A network diagnostic method, executed by a server, wherein: The server is connected to the electronic device, and the server is connected to the target device. The network diagnosis method includes: When disconnected from the target device, obtaining a pre-stored media access control address of the target device; generating an offline prompt according to the media access control address; Sending the offline prompt to the electronic device; The offline prompt is used to prompt the electronic device that the target device is disconnected from the server. Upon receiving the offline prompt, the electronic device can send a diagnostic data request to the target device to diagnose the abnormal connection status between the target device and the server.
12. A network diagnostic device for electronic equipment, wherein: The network diagnostic device comprises: A connection unit, establishing a connection with a server; wherein the target device to be diagnosed is connected to the server; The connecting unit is further configured to establish a connection with the target device upon receiving an offline prompt sent by the server; The electronic device is connected to the target device via a first connection method, and is connected to the server via a second connection method, and the offline prompt is generated by the server when the target device is disconnected from the server; a sending unit, configured to send a diagnostic data request to the target device; a receiving unit, configured to receive diagnostic data corresponding to the offline prompt sent by the target device; A determining unit is configured to determine an abnormal connection state between the target device and the server based on the diagnostic data.
13. A network diagnostic apparatus for a target device, wherein: The target device is connected to the server, the target device is connected to the electronic device via a first connection mode, the electronic device is connected to the server via a second connection mode, and the network diagnostic apparatus includes: an acquiring unit, configured to acquire an abnormal connection state with a server upon receiving a diagnostic data request sent by the electronic device; wherein the diagnostic data request is generated by the electronic device when receiving an offline prompt sent by the server, and the offline prompt is generated by the server when the target device is disconnected from the server; a generating unit, configured to generate diagnostic data according to the abnormal connection state; The diagnostic data is used for analysis by the electronic device to determine an abnormal connection status between the target device and the server; A sending unit is used to send the diagnostic data to the electronic device.
14. A network diagnostic device for a server, wherein: The server is connected to the electronic device, which is connected to the target device. The network diagnostic device includes: an acquiring unit, configured to acquire a pre-stored media access control address of the target device when disconnected from the target device; A generating unit, configured to generate an offline prompt according to the media access control address; A sending unit, configured to send the offline prompt to the electronic device; The offline prompt is used to prompt the electronic device that the target device is disconnected from the server. Upon receiving the offline prompt, the electronic device can send a diagnostic data request to the target device to diagnose the abnormal connection status between the target device and the server.
15. An electronic device, wherein: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the network diagnostic method according to any one of claims 1 to 7 and / or the steps of the network diagnostic method according to any one of claims 8 to 10 and / or the steps of the network diagnostic method according to claim 11 are implemented.
16. A readable storage medium, wherein: The readable storage medium stores a program or instruction, which, when executed by a processor, implements the steps of the network diagnostic method according to any one of claims 1 to 7 and / or the steps of the network diagnostic method according to any one of claims 8 to 10 and / or the steps of the network diagnostic method according to claim 11.
17. A computer program product comprising a computer program or instructions, wherein: When the computer program or instructions are executed by a processor, the steps of the network diagnosis method according to any one of claims 1 to 7 and / or the steps of the network diagnosis method according to any one of claims 8 to 10 and / or the steps of the network diagnosis method according to claim 11 are implemented.
Citation Information
Patent Citations
Interaction method and device, autonomous mobile device, storage medium and program product
CN116367271A
WIFI connection processing method and apparatus, and related device
CN117440340A
Network diagnosis method, network diagnosis device, electronic equipment and readable storage medium
CN118055005A
Network-diagnosing method, program, and server
JP2002217976A
System for diagnosing network using IoT terminal and method thereof
KR1020180045620A
