Wireless communication reconnection method, terminal equipment and storage medium

By sending a heartbeat signal when the wireless LAN is disconnected and confirming that the reconnection is successful, and sending service requests to be transmitted in a timely manner, the problem of unstable wireless LAN connection is solved, and stable control after wireless communication reconnection is realized.

CN119421268APending Publication Date: 2025-02-11SHANGHAI JIEKA ROBOT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411695576.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-22
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

In the prior art, if the client does not send a request, the request will not be resent, and the network abnormality cannot be reconnected in time, resulting in unstable wireless LAN connection, especially in industrial environments, which may cause the robot to control communication to be disconnected.

Method used

Provide a wireless communication reconnection method. When the wireless LAN connection is disconnected, it sends a heartbeat signal to the robot according to the preset time. If a response signal is received, it confirms that the reconnection is successful and the service request to be transmitted is added to the target queue. Send it after the reconnection is successful.

Benefits of technology

It realizes timely reconnection of wireless LAN, ensuring that service requests can be sent to the robot in a timely manner after the connection is restored, and ensuring the stability and timeliness of robot control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119421268A_ABST
    Figure CN119421268A_ABST
Patent Text Reader

Abstract

The invention provides a wireless communication reconnection method, terminal equipment and a storage medium, and relates to the technical field of communication. The wireless communication reconnection method comprises the following steps: if disconnection of a wireless local area network is detected, sending a first heartbeat signal to a robot according to a first preset duration; after the connection is disconnected, if the control application initiates a to-be-transmitted service request for the robot, adding the to-be-transmitted service request into a target queue; if a response signal which is sent by the robot and aims at the first heartbeat signal is received within a first preset duration, confirming that the wireless local area network is successfully reconnected; and after the wireless local area network is successfully reconnected, sending each service request in the target queue to the robot through the wireless local area network. After the wireless local area network is detected, no matter whether the client of the control application initiates the service request or not, the first heartbeat signal is sent to the robot, the communication connection of the robot is tried to be recovered, and wireless local area network reconnection can be carried out in time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a wireless communication reconnection method, a terminal device and a storage medium. Background Art

[0002] With the rapid development of wireless communication technology, its application in modern life and industrial fields is becoming more and more extensive. In the field of industrial automation, wireless communication technology is favored for its flexibility and portability. Especially when using clients to remotely control robots and other equipment, wireless connection provides great convenience. However, the stability of wireless networks is usually insufficient compared to wired networks. Especially in industrial environments, complex on-site conditions may lead to unstable connections or even disconnections. Therefore, reconnection of wireless LANs has become a hot topic of research.

[0003] In the related art, when a user encounters an unstable network when controlling a robot through a client, if the command issued by the client fails to obtain a timely response from the robot, the client usually attempts to resend the command in an attempt to restore the communication connection with the robot.

[0004] However, in the related art, if the client does not send a request, the request will not be resent, and reconnection cannot be performed in time when the network is abnormal. Summary of the invention

[0005] The purpose of this application is to provide a wireless communication reconnection method, terminal device and storage medium to address the deficiencies in the above-mentioned prior art, so as to solve the above-mentioned technical problems existing in the related technology.

[0006] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:

[0007] In a first aspect, an embodiment of the present application provides a wireless communication reconnection method, which is applied to a client of a control application, wherein the control application client is connected to a robot via a wireless local area network communication, and includes:

[0008] If it is detected that the wireless local area network is disconnected, sending a first heartbeat signal to the robot according to a first preset duration;

[0009] After the connection is disconnected, if the control application initiates a service request to be transmitted for the robot, adding the service request to be transmitted to a target queue;

[0010] If a response signal to the first heartbeat signal sent by the robot is received within the first preset time period, it is confirmed that the wireless local area network is successfully reconnected;

[0011] After the wireless local area network is successfully reconnected, each service request in the target queue is sent to the robot via the wireless local area network.

[0012] Optionally, the number of the service requests to be transmitted is multiple; and adding the service requests to be transmitted to a target queue includes:

[0013] Determining whether there is a motion control request for the robot among the multiple service requests to be transmitted;

[0014] If so, filtering the motion control request in the plurality of service requests to be transmitted to obtain a filtered service request to be transmitted;

[0015] The screened service requests to be transmitted are added to the target queue.

[0016] Optionally, the method further comprises:

[0017] If no response signal to the first heartbeat signal sent by the robot is received within the first preset time period, it is determined that the wireless local area network reconnection has temporarily failed;

[0018] Reconnection prompt information for the wireless local area network is displayed in the first pop-up window.

[0019] Optionally, after confirming that the wireless local area network reconnection has temporarily failed if no response signal to the heartbeat signal sent by the robot is received within the first preset time period, the method further includes:

[0020] Sending a second heartbeat signal to the robot according to a second preset duration;

[0021] If a response signal to the second heartbeat signal sent by the robot is received within the second preset time period, it is confirmed that the wireless local area network is successfully reconnected;

[0022] Cancel displaying the first pop-up window;

[0023] Each service request in the target queue is sent to the robot via the wireless local area network.

[0024] Optionally, the method further comprises:

[0025] Displaying a cancel reconnection control in the first pop-up window;

[0026] Within the second preset time period, in response to the selection operation of the cancel reconnection control, stopping sending the second heartbeat signal to the robot.

[0027] Optionally, the method further comprises:

[0028] If no response signal to the second heartbeat signal sent by the robot is received within the second preset time period, it is determined that the wireless local area network reconnection fails, and the robot logout operation is executed;

[0029] Stop sending the second heartbeat signal to the robot;

[0030] Clear all service requests in the target queue.

[0031] Optionally, after confirming that the wireless local area network reconnection fails and executing the robot's logout operation if no response signal to the second heartbeat signal sent by the robot is received within the second preset time, the method further includes:

[0032] Switch the first pop-up window to a second pop-up window;

[0033] The second pop-up window displays reconnection failure information for the wireless local area network and a reconnection control;

[0034] In response to a selection operation on the reconnection control, a login operation of the robot is performed according to pre-stored account information.

[0035] Optionally, sending a first heartbeat signal to the robot according to a first preset duration includes:

[0036] Within the first preset time period, sending the first heartbeat signal to the robot;

[0037] According to the error information fed back by the communication protocol corresponding to the wireless local area network, adjust the duration of the first preset duration and the frequency of sending the heartbeat signal;

[0038] The first heartbeat signal continues to be sent to the robot according to the adjusted first preset duration and the adjusted heartbeat signal sending frequency.

[0039] In a second aspect, an embodiment of the present application further provides a terminal device, comprising: a memory and a processor, wherein the memory stores a computer program executable by the processor, and when the processor executes the computer program, the wireless communication reconnection method described in any one of the first aspects above is implemented.

[0040] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is read and executed, the wireless communication reconnection method described in any one of the first aspects above is implemented.

[0041] In a fourth aspect, an embodiment of the present application further provides a wireless communication reconnection device, which is applied to a client of a control application, wherein the control application client is connected to the robot via a wireless local area network communication, and includes:

[0042] A first sending module, configured to send a first heartbeat signal to the robot according to a first preset duration if it is detected that the wireless local area network is disconnected;

[0043] A adding module, configured to add a service request to be transmitted to a target queue if the control application initiates a service request to be transmitted for the robot after the connection is disconnected;

[0044] A first confirmation module, configured to confirm that the wireless local area network reconnection is successful if a response signal to the first heartbeat signal sent by the robot is received within the first preset time period;

[0045] The second sending module is used to send each service request in the target queue to the robot through the wireless local area network after the wireless local area network is successfully reconnected.

[0046] Optionally, there are multiple business requests to be transmitted; the adding module is specifically used to determine whether there is a motion control request for the robot among the multiple business requests to be transmitted; if so, the motion control request in the multiple business requests to be transmitted is filtered to obtain filtered business requests to be transmitted; and the filtered business requests to be transmitted are added to the target queue.

[0047] Optionally, the device further comprises:

[0048] A second confirmation module is used to confirm that the wireless local area network reconnection has temporarily failed if a response signal to the first heartbeat signal sent by the robot is not received within the first preset time period;

[0049] The first display module is used to display reconnection prompt information for the wireless local area network in a first pop-up window.

[0050] Optionally, the device further comprises:

[0051] A third sending module, used for sending a second heartbeat signal to the robot according to a second preset duration;

[0052] a third confirmation module, configured to confirm that the wireless local area network reconnection is successful if a response signal to the second heartbeat signal sent by the robot is received within the second preset time period;

[0053] A display cancellation module, used to cancel the display of the first pop-up window;

[0054] The fourth sending module is used to send each service request in the target queue to the robot through the wireless local area network.

[0055] Optionally, the device further comprises:

[0056] A second display module, configured to display a cancel reconnection control in the first pop-up window;

[0057] The first stop sending module is used to stop sending the second heartbeat signal to the robot in response to the selection operation of the cancel reconnection control within the second preset time period.

[0058] Optionally, the device further comprises:

[0059] a fourth confirmation module, configured to confirm that the wireless local area network reconnection fails and execute a logout operation of the robot if no response signal to the second heartbeat signal sent by the robot is received within the second preset time period;

[0060] A second stop sending module, used for stopping sending the second heartbeat signal to the robot;

[0061] The clearing module is used to clear each service request in the target queue.

[0062] Optionally, the device further comprises:

[0063] A switching module, used to switch the first pop-up window to a second pop-up window;

[0064] A third display module, configured to display reconnection failure information for the wireless local area network and a reconnection control in the second pop-up window;

[0065] The execution module is used to respond to the selection operation of the reconnection control and execute the login operation of the robot according to the pre-stored account information.

[0066] Optionally, the first sending module is specifically used to send the first heartbeat signal to the robot within the first preset time period; adjust the duration of the first preset time period and the frequency of sending the heartbeat signal according to the error information fed back by the communication protocol corresponding to the wireless local area network; continue to send the first heartbeat signal to the robot according to the adjusted first preset time period and the adjusted frequency of sending the heartbeat signal.

[0067] The beneficial effect of the present application is as follows: the embodiment of the present application provides a wireless communication reconnection method, the method comprising: if it is detected that the connection of the wireless local area network is disconnected, a first heartbeat signal is sent to the robot according to a first preset duration; after the connection is disconnected, if the control application initiates a service request to be transmitted for the robot, the service request to be transmitted is added to the target queue; if within the first preset duration, a response signal to the first heartbeat signal sent by the robot is received, it is confirmed that the wireless local area network reconnection is successful; after the wireless local area network reconnection is successful, each service request in the target queue is sent to the robot through the wireless local area network. After the wireless local area network is detected to be disconnected, regardless of whether the client of the control application initiates a service request, a first heartbeat signal is sent to the robot to try to restore the communication connection with the robot, so that timely wireless local area network reconnection can be achieved, and for the service request initiated by the control application during the disconnection of the wireless local area network, it can be sent to the robot in a timely manner after the wireless local area network is restored and reconnected, so that the robot can be controlled in a timely manner after the wireless communication is reconnected. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0069] Figure 1 A flow chart of a wireless communication reconnection method provided in an embodiment of the present application Figure 1 ;

[0070] Figure 2 A flow chart of a wireless communication reconnection method provided in an embodiment of the present application Figure 2 ;

[0071] Figure 3 A flow chart of a wireless communication reconnection method provided in an embodiment of the present application Figure 3 ;

[0072] Figure 4 A schematic diagram of displaying a first pop-up window provided in an embodiment of the present application;

[0073] Figure 5 A flow chart of a wireless communication reconnection method provided in an embodiment of the present application Figure 4 ;

[0074] Figure 6 A flow chart of a wireless communication reconnection method provided in an embodiment of the present application Figure 5 ;

[0075] Figure 7 A flow chart of a wireless communication reconnection method provided in an embodiment of the present application Figure 6 ;

[0076] Figure 8 A flow chart of a wireless communication reconnection method provided in an embodiment of the present application Figure 7 ;

[0077] Fig. 9 A schematic diagram of displaying a second pop-up window provided in an embodiment of the present application;

[0078] Fig.10 A flow chart of a wireless communication reconnection method provided in an embodiment of the present application Figure 8 ;

[0079] Fig.11 A schematic diagram of the structure of a wireless communication reconnection device provided in an embodiment of the present application;

[0080] Fig.12 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0081] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings 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.

[0082] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0083] In the description of the present application, it should be noted that if the terms "upper", "lower", etc. appear, the orientation or position relationship indicated is based on the orientation or position relationship shown in the drawings, or is the orientation or position relationship in which the product of the application is usually placed when used. It is only for the convenience of describing the present 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, and therefore cannot be understood as a limitation on the present application.

[0084] In addition, the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0085] It should be noted that, in the absence of conflict, the features in the embodiments of the present application may be combined with each other.

[0086] The embodiment of the present application provides a wireless communication reconnection method, which is applied to a terminal device, which is installed with a client of a control application; the terminal device can be any of the following: a computer device, a laptop computer, a tablet computer, a smart phone, etc. The client of the control application is connected to the robot through a wireless local area network communication.

[0087] The following is an explanation of a wireless communication reconnection method provided in an embodiment of the present application.

[0088] Figure 1 A flow chart of a wireless communication reconnection method provided in an embodiment of the present application Figure 1 ,like Figure 1 As shown, the method may include:

[0089] S101. If it is detected that the wireless local area network is disconnected, a first heartbeat signal is sent to the robot according to a first preset duration.

[0090] In an embodiment of the present application, it is possible to detect whether the wireless local area network between the client of the control application and the robot is stable. If it is detected that the wireless local area network connection is disconnected, a first heartbeat signal is sent to the controller of the robot according to a first preset duration.

[0091] In actual applications, when the wireless LAN restores the connection, the robot's controller can receive the first heartbeat signal and send a response signal corresponding to the first heartbeat signal to the client of the control application; when the wireless LAN is still in a disconnected state, the robot's controller cannot receive the first heartbeat signal, and then cannot send a response signal corresponding to the first heartbeat signal to the client of the control application.

[0092] S102: After the connection is disconnected, if the control application initiates a service request to be transmitted for the robot, the service request to be transmitted is added to a target queue.

[0093] It should be noted that the control application will initiate some service requests to the robot's controller through the wireless LAN to control the robot accordingly. After the wireless LAN is disconnected, some service requests initiated by the client of the control application cannot be sent to the robot's controller in time. These service requests that cannot be sent in time are added to the target queue as pending service requests.

[0094] In some implementations, the service requests to be transmitted may be screened to obtain the screened service requests to be transmitted, and the screened service requests to be transmitted may be added to a target queue.

[0095] S103: If a response signal to the first heartbeat signal sent by the robot is received within the first preset time period, it is confirmed that the wireless local area network reconnection is successful.

[0096] Among them, only when the wireless LAN is restored to connection, can the robot's controller receive the first heartbeat signal and send a response signal corresponding to the first heartbeat signal to the control application through the wireless LAN. Therefore, if the control application receives a response signal to the first heartbeat signal, it can be determined that the wireless LAN is reconnected successfully.

[0097] It is worth noting that if the wireless LAN reconnection is determined to be successful within the first preset time, it means that the time required for the wireless LAN reconnection is short. During this first preset time, the wireless communication reconnection is automatically restored, and the user hardly notices any abnormality in the wireless communication.

[0098] For example, the first preset time length may be 2 seconds. Of course, the first preset time length may also be set according to actual needs, and the embodiment of the present application does not impose any specific limitation on this.

[0099] S104: After the wireless local area network is successfully reconnected, each service request in the target queue is sent to the robot via the wireless local area network.

[0100] In some implementations, after the wireless local area network is successfully reconnected, the service requests in the target queue are sent to the controller of the robot in sequence through the wireless local area network according to the order in which the service requests to be transmitted are added to the target queue.

[0101] Accordingly, the robot controller can sequentially receive each service request in the target queue and perform corresponding service operations according to each service request. This ensures that after the wireless communication is reconnected, the service request initiated by the control application can be responded to and processed in a timely manner.

[0102] In summary, the embodiment of the present application provides a wireless communication reconnection method, which includes: if it is detected that the wireless local area network is disconnected, a first heartbeat signal is sent to the robot according to a first preset duration; after the connection is disconnected, if the control application initiates a service request to be transmitted for the robot, the service request to be transmitted is added to the target queue; if within the first preset duration, a response signal to the first heartbeat signal sent by the robot is received, it is confirmed that the wireless local area network is successfully reconnected; after the wireless local area network is successfully reconnected, each service request in the target queue is sent to the robot through the wireless local area network. After the wireless local area network is detected to be disconnected, regardless of whether the client of the control application initiates a service request, a first heartbeat signal is sent to the robot to try to restore the communication connection with the robot, so that timely reconnection of the wireless local area network can be achieved. Moreover, for the service request initiated by the control application during the disconnection of the wireless local area network, it can be sent to the robot in a timely manner after the wireless local area network is restored and reconnected, so that the robot can be controlled in a timely manner after the wireless communication is reconnected.

[0103] Optionally, there are multiple service requests to be transmitted.

[0104] Figure 2 A flow chart of a wireless communication reconnection method provided in an embodiment of the present application Figure 2 ,like Figure 2 As shown, the process of adding the service request to be transmitted to the target queue in the above S102 may include:

[0105] S201, determining whether there is a robot motion control request among multiple service requests to be transmitted;

[0106] The multiple service requests to be transmitted include at least one type of service request, and the motion control request of the robot is a type of service request, which is used to control the robot to move.

[0107] S202: If yes, filter the motion control request in the multiple service requests to be transmitted to obtain filtered service requests to be transmitted.

[0108] S203: Add the screened service requests to be transmitted to a target queue.

[0109] In some embodiments, if there is a motion control request for the robot, the motion control request among multiple business requests to be transmitted is deleted to obtain filtered business requests to be transmitted, and then the filtered business requests to be transmitted are added to the target queue in sequence according to the initiation time of the filtered business requests to be transmitted.

[0110] Of course, the motion control requests in the multiple service requests to be transmitted may also be marked to ensure that the marked motion control requests are not added to the target queue.

[0111] In actual applications, the service requests in the target queue are sent to the robot only after the wireless communication is reconnected, and there is a certain delay. If the motion control request is added to the target queue, it will cause a delay in controlling the robot's movement, which will pose a safety hazard. The embodiment of the present application filters the motion control request to avoid this safety hazard.

[0112] Optionally, Figure 3 A flow chart of a wireless communication reconnection method provided in an embodiment of the present application Figure 3 ,like Figure 3 As shown, the method may also include:

[0113] S301: If no response signal to the first heartbeat signal sent by the robot is received within a first preset time period, it is determined that the wireless LAN reconnection has temporarily failed.

[0114] If the wireless local area network reconnection still cannot be restored within the first preset time, it indicates that the wireless communication connection is disconnected. At this time, the user needs to be informed of the current wireless local area network status to improve the user experience.

[0115] S302: Displaying a reconnection prompt message for the wireless local area network in a first pop-up window.

[0116] Figure 4 A schematic diagram of displaying a first pop-up window provided in an embodiment of the present application is shown as follows: Figure 4 As shown, a first pop-up window is displayed, and a reconnection prompt message for the wireless local area network is displayed in the first pop-up window. For example, the reconnection prompt message may be "Network abnormality, reconnecting, please wait patiently".

[0117] Optionally, Figure 5 A flow chart of a wireless communication reconnection method provided in an embodiment of the present application Figure 4 ,like Figure 5 As shown, in S301, if no response signal to the heartbeat signal sent by the robot is received within the first preset time, then after confirming that the wireless local area network reconnection has temporarily failed, the method may further include:

[0118] S401. Send a second heartbeat signal to the robot according to a second preset duration.

[0119] In the embodiment of the present application, sending a first heartbeat signal to the robot within a first preset time period belongs to the first stage of reconnection, and after the first stage of reconnection fails, sending a second heartbeat signal to the robot within a second preset time period belongs to the second stage of reconnection.

[0120] S402: If a response signal to the second heartbeat signal sent by the robot is received within the second preset time period, it is confirmed that the wireless local area network reconnection is successful.

[0121] It should be noted that the control application sends the second heartbeat signal to the robot controller, and after receiving the second heartbeat signal, the robot controller sends a response signal to the control application for the second heartbeat signal. The entire process requires transmission of the wireless local area network. Therefore, when the control application can receive the response signal to the second heartbeat signal, it can be said that the wireless local area network reconnection is successful.

[0122] S403: Cancel displaying the first pop-up window.

[0123] Among them, the first pop-up window can be automatically hidden.

[0124] S404: Send each service request in the target queue to the robot via the wireless local area network.

[0125] It should be noted that the process of S404 is similar to the process of S104, and will not be described in detail here.

[0126] It should be noted that after the wireless LAN connection is disconnected, the robot controller will still maintain a request receiving state for a period of time. If the robot controller does not receive a new request, it will consider the connection with the control application to be disconnected. At this stage, the response to the second heartbeat signal will determine the subsequent actions. If the robot controller is still in a waiting state and responds to the second heartbeat signal normally, it indicates that the wireless LAN connection has been restored. The control application will automatically hide the first pop-up window and resend the service request in the target queue.

[0127] Optionally, Figure 6 A flow chart of a wireless communication reconnection method provided in an embodiment of the present application Figure 5 ,like Figure 6 As shown, the method may also include:

[0128] S501. Display a cancel reconnection control in the first pop-up window.

[0129] like Figure 4 As shown, a cancel reconnection control is also displayed in the first pop-up window.

[0130] S502: within a second preset time period, in response to a selection operation for canceling the reconnection control, stop sending a second heartbeat signal to the robot.

[0131] Wherein, while stopping sending the second heartbeat signal to the controller of the robot, the service requests in the target queue can also be cleared.

[0132] In the embodiment of the present application, the selection operation for canceling the reconnection control can be a touch operation for canceling the reconnection control, of course, it can also be an operation input by an external device connected to the terminal device, or it can be an operation input by other methods, and the embodiment of the present application does not specifically limit this. Among them, the external device can be a mouse and / or a keyboard.

[0133] Optionally, Figure 7 A flow chart of a wireless communication reconnection method provided in an embodiment of the present application Figure 6 ,like Figure 7 As shown, the method may also include:

[0134] S601: If no response signal to the second heartbeat signal sent by the robot is received within a second preset time period, it is determined that the wireless LAN reconnection has failed, and the robot's logout operation is executed.

[0135] It should be noted that if the wireless LAN is still disconnected within the second preset time period, the control application cannot send the second heartbeat signal to the robot's controller. The robot's controller does not receive any signal sent by the control application within the second preset time period, and will end the receiving state and execute the logout operation.

[0136] Correspondingly, if the control application does not receive a response signal to the second heartbeat signal within the second preset time period, indicating that the reconnection cannot be restored within a long period of time, a logout operation is performed.

[0137] S602: Stop sending the second heartbeat signal to the robot.

[0138] S603: Clear all service requests in the target queue.

[0139] Optionally, Figure 8 A flow chart of a wireless communication reconnection method provided in an embodiment of the present application Figure 7 ,like Figure 8 As shown, in the above S601, if no response signal to the second heartbeat signal sent by the robot is received, it is confirmed that the wireless local area network reconnection fails, and after the process of executing the robot's logout operation, the method may further include:

[0140] S701. Switch the first pop-up window to the second pop-up window.

[0141] The first pop-up window can be canceled and the second pop-up window can be displayed. When the second pop-up window appears, it means that the second heartbeat signal is no longer sent to the robot, and automatic reconnection is no longer attempted, and the logic of automatic reconnection has been exited.

[0142] S702. The second pop-up window displays reconnection failure information for the wireless local area network and a reconnection control.

[0143] Fig. 9 A schematic diagram of displaying a second pop-up window provided in an embodiment of the present application is shown as follows: Fig. 9 As shown, the second pop-up window displays reconnection failure information and reconnection controls. For example, the reconnection failure information may be "Reconnection failed, please reconnect".

[0144] In addition, if Fig. 9 As shown, the second pop-up window may also include a cancel control. In response to a selection operation on the cancel control, the second pop-up window is hidden and displayed, and the control application is still in a logged out state. When the user wants to give up logging in, the cancel control can be selected.

[0145] S703. In response to the selection operation for the reconnection control, the robot login operation is performed according to the pre-stored account information.

[0146] In the embodiment of the present application, when the second pop-up window is displayed, the user has logged out. After the user determines that the wireless LAN is restored, the user can enter a selection operation for the reconnection control, and the control application responds to the selection operation for the reconnection control and automatically executes the robot login operation according to the pre-stored account information. Here, the user does not need to re-enter the account password.

[0147] Optionally, Fig.10 A flow chart of a wireless communication reconnection method provided in an embodiment of the present application Figure 8 ,like Fig.10 As shown, the process of sending the first heartbeat signal to the robot according to the first preset duration in the above S101 may include:

[0148] S801. Send a first heartbeat signal to the robot within a first preset time period.

[0149] Among them, within the first preset time period, the first heartbeat signal can be sent based on a preset heartbeat signal sending frequency.

[0150] S802: Adjust the duration of the first preset duration and the frequency of sending the heartbeat signal according to the error information fed back by the communication protocol corresponding to the wireless local area network.

[0151] During the process of the control application sending the first heartbeat signal to the robot, the communication protocol corresponding to the wireless local area network will send an error message to the control application, and the control application will dynamically adjust the sending strategy of the first heartbeat signal based on the error message, wherein the process of dynamically adjusting the sending strategy may include adjusting the duration of the first preset duration and the frequency of sending the heartbeat signal.

[0152] In some embodiments, the error message indicates that the protocol stack reports a timeout error, and the control application will reduce the frequency of sending the heartbeat signal and shorten the duration of the first preset duration. The error message may be "Deadline Exceeded".

[0153] In other embodiments, the error message is "Stream removed" (usually not a standard error message, it may be a custom error generated by an application or framework when processing the stream), or the error message is "Failed to connect to all addresses" (usually indicating that the client attempted to connect to a service but could not connect to all attempted addresses), then the frequency of sending heartbeat signals is increased and the duration of the first preset duration is extended.

[0154] In practical applications, the wireless local area network may be a WiFi (Wireless Fidelity, wireless network).

[0155] S803. Continue to send the first heartbeat signal to the robot according to the adjusted first preset duration and the adjusted heartbeat signal sending frequency.

[0156] Among them, continuing to send the first heartbeat signal to the robot according to the dynamically adjusted sending strategy can maximize the success rate of wireless communication reconnection.

[0157] It should be noted that the error message may be "software caused connection abort" to indicate that the user actively disconnects the wireless LAN connection, and the control application displays the second pop-up window; or the error message may be "Safe handle has been closed" to control the application to display the second pop-up window. When the second pop-up window is displayed, the heartbeat signal is stopped from being sent.

[0158] Similarly, within the second preset time period, a second heartbeat signal is sent to the robot, and the duration of the first preset time period and the frequency of sending the heartbeat signal can be adjusted according to the error information fed back by the communication protocol corresponding to the wireless local area network; the second heartbeat signal continues to be sent to the robot according to the adjusted second preset time period and the adjusted frequency of sending the heartbeat signal.

[0159] In the embodiment of the present application, since the robot's default IP (Internet Protocol) address and default password are unified, in order to ensure the security of the connection, the control application and the robot's controller will perform a robot MAC (Media Access Control Address) address check during the entire reconnection process to prevent problems during the connection process.

[0160] In summary, the embodiment of the present application provides a wireless communication reconnection method. After detecting that the wireless local area network is disconnected, regardless of whether the client of the control application initiates a service request, a first heartbeat signal is sent to the robot to try to restore the communication connection with the robot, so that timely reconnection of the wireless local area network can be achieved. Moreover, for the service request initiated by the control application during the period when the wireless local area network connection is disconnected, it can be sent to the robot in time after the wireless local area network is restored and reconnected, so that the robot can be controlled in time after the wireless communication is reconnected.

[0161] In addition, filtering the motion control requests among the multiple service requests to be transmitted can improve the security of the robot control after the wireless local area network is reconnected.

[0162] Moreover, the network status and robot feedback are monitored in real time, and the sending strategy is adjusted dynamically to maximize the success rate of connection. At the same time, the control application will provide clear feedback to the user through the interface, so that the user has a clear understanding of the current network status and operation results, so as to maintain the continuity and reliability of operation even when the network is unstable. It can minimize user intervention, improve the stability and security of the system, optimize resource consumption, and enhance user experience. It not only improves the success rate of reconnection, but also ensures adaptability and flexibility in various network environments, providing users with a seamless and safe control experience.

[0163] The following describes a wireless communication reconnection device, a terminal device, a storage medium, etc. used to execute the wireless communication reconnection method provided in this application. The specific implementation process and technical effects thereof refer to the relevant contents of the above-mentioned wireless communication reconnection method, which will not be repeated below.

[0164] Fig.11 A schematic diagram of the structure of a wireless communication reconnection device provided in an embodiment of the present application is shown in FIG. Fig.11 As shown, the device comprises:

[0165] A first sending module 101 is configured to send a first heartbeat signal to the robot according to a first preset duration if it is detected that the wireless local area network is disconnected;

[0166] A adding module 102, configured to add a service request to be transmitted to a target queue if the control application initiates a service request to be transmitted for the robot after the connection is disconnected;

[0167] A first confirmation module 103 is configured to confirm that the wireless local area network reconnection is successful if a response signal to the first heartbeat signal sent by the robot is received within the first preset time period;

[0168] The second sending module 104 is used to send each service request in the target queue to the robot through the wireless local area network after the wireless local area network is successfully reconnected.

[0169] Optionally, there are multiple business requests to be transmitted; the adding module 102 is specifically used to determine whether there is a motion control request for the robot among the multiple business requests to be transmitted; if so, the motion control request in the multiple business requests to be transmitted is filtered to obtain filtered business requests to be transmitted; and the filtered business requests to be transmitted are added to the target queue.

[0170] Optionally, the device further comprises:

[0171] A second confirmation module is used to confirm that the wireless local area network reconnection has temporarily failed if a response signal to the first heartbeat signal sent by the robot is not received within the first preset time period;

[0172] The first display module is used to display reconnection prompt information for the wireless local area network in a first pop-up window.

[0173] Optionally, the device further comprises:

[0174] A third sending module, used for sending a second heartbeat signal to the robot according to a second preset duration;

[0175] a third confirmation module, configured to confirm that the wireless local area network reconnection is successful if a response signal to the second heartbeat signal sent by the robot is received within the second preset time period;

[0176] A display cancellation module, used to cancel the display of the first pop-up window;

[0177] The fourth sending module is used to send each service request in the target queue to the robot through the wireless local area network.

[0178] Optionally, the device further comprises:

[0179] A second display module, configured to display a cancel reconnection control in the first pop-up window;

[0180] The first stop sending module is used to stop sending the second heartbeat signal to the robot in response to the selection operation of the cancel reconnection control within the second preset time period.

[0181] Optionally, the device further comprises:

[0182] a fourth confirmation module, configured to confirm that the wireless local area network reconnection fails and execute a logout operation of the robot if no response signal to the second heartbeat signal sent by the robot is received within the second preset time period;

[0183] A second stop sending module, used for stopping sending the second heartbeat signal to the robot;

[0184] The clearing module is used to clear each service request in the target queue.

[0185] Optionally, the device further comprises:

[0186] A switching module, used to switch the first pop-up window to a second pop-up window;

[0187] A third display module, configured to display reconnection failure information for the wireless local area network and a reconnection control in the second pop-up window;

[0188] The execution module is used to respond to the selection operation of the reconnection control and execute the login operation of the robot according to the pre-stored account information.

[0189] Optionally, the first sending module 101 is specifically used to send the first heartbeat signal to the robot within the first preset time period; adjust the duration of the first preset time period and the frequency of sending the heartbeat signal according to the error information fed back by the communication protocol corresponding to the wireless local area network; and continue to send the first heartbeat signal to the robot according to the adjusted first preset time period and the adjusted frequency of sending the heartbeat signal.

[0190] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0191] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital singnal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0192] Fig.12 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application is shown in FIG. Fig.12 As shown, the terminal device includes: a processor 201 and a memory 202.

[0193] The memory 202 is used to store programs, and the processor 201 calls the programs stored in the memory 202 to execute the above method embodiment. The specific implementation method and technical effect are similar and will not be repeated here.

[0194] Optionally, the present application also provides a program product, such as a computer-readable storage medium, including a program, which is used to execute the above method embodiment when executed by a processor.

[0195] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0196] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0197] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0198] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.

[0199] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A wireless communication reconnection method, characterized in that: The client of the control application is applied, and the client of the control application is connected to the robot through a wireless local area network communication, including: If it is detected that the wireless local area network is disconnected, sending a first heartbeat signal to the robot according to a first preset duration; After the connection is disconnected, if the control application initiates a service request to be transmitted for the robot, adding the service request to be transmitted to a target queue; If a response signal to the first heartbeat signal sent by the robot is received within the first preset time period, it is confirmed that the wireless local area network is successfully reconnected; After the wireless local area network is successfully reconnected, each service request in the target queue is sent to the robot via the wireless local area network.

2. The method according to claim 1, characterized in that The number of the service requests to be transmitted is multiple; and adding the service requests to be transmitted to the target queue includes: Determining whether there is a motion control request for the robot among the multiple service requests to be transmitted; If so, filtering the motion control request in the plurality of service requests to be transmitted to obtain a filtered service request to be transmitted; The screened service requests to be transmitted are added to the target queue.

3. The method according to claim 1, characterized in that The method further comprises: If no response signal to the first heartbeat signal sent by the robot is received within the first preset time period, it is determined that the wireless local area network reconnection has temporarily failed; Reconnection prompt information for the wireless local area network is displayed in the first pop-up window.

4. The method according to claim 3, characterized in that After confirming that the wireless local area network reconnection has temporarily failed if no response signal to the heartbeat signal sent by the robot is received within the first preset time period, the method further includes: Sending a second heartbeat signal to the robot according to a second preset duration; If a response signal to the second heartbeat signal sent by the robot is received within the second preset time period, it is confirmed that the wireless local area network is successfully reconnected; Cancel displaying the first pop-up window; Each service request in the target queue is sent to the robot via the wireless local area network.

5. The method according to claim 4, characterized in that The method further comprises: Displaying a cancel reconnection control in the first pop-up window; Within the second preset time period, in response to the selection operation of the cancel reconnection control, stopping sending the second heartbeat signal to the robot.

6. The method according to claim 4, characterized in that The method further comprises: If no response signal to the second heartbeat signal sent by the robot is received within the second preset time period, it is determined that the wireless local area network reconnection fails, and the robot logout operation is executed; Stop sending the second heartbeat signal to the robot; Clear all service requests in the target queue.

7. The method according to claim 6, characterized in that After confirming that the wireless local area network reconnection fails and executing the robot's logout operation if no response signal to the second heartbeat signal sent by the robot is received within the second preset time, the method further includes: Switch the first pop-up window to a second pop-up window; The second pop-up window displays reconnection failure information for the wireless local area network and a reconnection control; In response to a selection operation on the reconnection control, a login operation of the robot is performed according to pre-stored account information.

8. The method according to any one of claims 1 to 7, characterized in that: The sending a first heartbeat signal to the robot according to a first preset duration includes: Within the first preset time period, sending the first heartbeat signal to the robot; According to the error information fed back by the communication protocol corresponding to the wireless local area network, adjust the duration of the first preset duration and the frequency of sending the heartbeat signal; The first heartbeat signal continues to be sent to the robot according to the adjusted first preset duration and the adjusted heartbeat signal sending frequency.

9. A terminal device, characterized in that: include: A memory and a processor, wherein the memory stores a computer program executable by the processor, and when the processor executes the computer program, the wireless communication reconnection method according to any one of claims 1 to 8 is implemented.

10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is read and executed, the wireless communication reconnection method described in any one of claims 1 to 8 is implemented.