Disconnection reconnection method and device between front-end application and rear-end server

Through front-end applications, the connection status of the back-end server is obtained in real time and reconnected actively or passively, the problem of user manual reconnection when the network is disconnected is solved, the interactive experience and efficiency is improved, automatic reconnection is achieved, and user satisfaction is improved.

CN119011654APending Publication Date: 2024-11-22WEBANK (CHINA)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411157563.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-22
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

During human-computer interaction, users need to manually reconnect when the network connection is disconnected, resulting in a decline in user experience and the existing technology cannot restore the connection in time, affecting the interaction efficiency.

Method used

The front-end application obtains the connection status with the back-end server in real time, and actively initiates the reconnection operation. If it fails, passive reconnection will be performed after the user wakes up the conversation robot, and adjusts the reconnection strategy when the network state changes to avoid manual operation by users.

Benefits of technology

It realizes automatic reconnection without manual operation after network connection is interrupted, which improves user experience and reconnection efficiency, and improves system stability and user satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119011654A_ABST
    Figure CN119011654A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a disconnection reconnection method and device between a front-end application and a back-end server, and relates to the field of finance science and technology, and the method comprises the steps: obtaining a real-time connection state between the front-end application and the back-end server through the front-end application; the back-end server is provided with a dialogue robot interacting with the front-end application; if the real-time connection state is disconnection, the front-end application initiates an active reconnection operation to the rear-end server; and if the active reconnection operation fails, the front-end application initiates a passive reconnection operation to the back-end server after receiving an awakening operation of the user on the dialogue robot. Whether the front-end application is connected with the rear-end server or not can be known in time by obtaining the connection state of the front-end application and the rear-end server in real time, and the problem that the connection cannot be obtained in time due to connection interruption is avoided; after the connection is interrupted, the connection is actively initiated through the front-end application, manual connection of a user is not needed, and the use experience of the user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of financial technology (Fintech), and in particular to a method and device for reconnecting a front-end application with a back-end server. Background Art

[0002] With the rapid development of artificial intelligence technology, more and more conversational robots are bound to applications to achieve human-computer interaction, thereby completing designated tasks, such as obtaining information. However, the premise of achieving human-computer interaction is that the network environment in which the human and the machine are located is relatively good. If there is no stable and good network environment, users will often encounter network disconnection during use, resulting in a decrease in the user experience during the human-computer interaction process.

[0003] When the network connection is disconnected, the user is usually required to manually reconnect. The user performs operations again according to the client prompts, but manual reconnection by the user will degrade the user experience. Summary of the invention

[0004] The embodiments of the present application provide a method and device for reconnecting a front-end application with a back-end server, which are used to improve user satisfaction.

[0005] In a first aspect, an embodiment of the present application provides a disconnection reconnection method between a front-end application and a back-end server, comprising:

[0006] The front-end application obtains the real-time connection status with the back-end server; the back-end server is provided with a conversation robot that interacts with the front-end application;

[0007] If the real-time connection state is disconnected, the front-end application initiates an active reconnection operation to the back-end server;

[0008] If the active reconnection operation fails, the front-end application initiates a passive reconnection operation to the back-end server after receiving the user's wake-up operation on the conversational robot.

[0009] In the embodiment of the present application, by obtaining the connection status of the front-end application and the back-end server in real time, it is possible to timely understand whether the front-end application is connected to the back-end server, avoiding the problem of not being able to obtain the information in time due to connection interruption; after the connection is interrupted, the front-end application actively initiates the connection, without the need for the user to manually connect, thereby improving the user experience; if the active connection fails, the user can wake up the conversational robot and try to connect again, thereby improving the efficiency of reconnection. This solution can achieve the network status of reconnection after interruption without the need for the user to manually connect, thereby improving user satisfaction.

[0010] Optionally, the front-end application obtains the real-time connection status with the back-end server, including:

[0011] The front-end application determines the real-time connection status with the back-end server through a timed detection operation; or,

[0012] The front-end application determines the real-time connection status with the back-end server by monitoring the network connection status of the device where the front-end application is located; or,

[0013] The front-end application determines the real-time connection status with the back-end server by monitoring the communication protocol status between the front-end application and the back-end server.

[0014] In the embodiment of the present application, three different methods are used to realize real-time acquisition of the connection status, thereby improving the accuracy of acquiring the connection status. By acquiring the connection status in real time, the problem of poor user experience caused by failure to obtain the connection status in time due to interruption of the connection status is avoided.

[0015] Optionally, the front-end application determines the real-time connection status with the back-end server by monitoring the network connection status of the device where the front-end application is located, including:

[0016] The front-end application monitors the network connection status of the device where the front-end application is located;

[0017] The front-end application determines the real-time connection status with the back-end server according to the network delay and / or bandwidth change in the network connection status.

[0018] In an embodiment of the present application, by monitoring the network connection status of the device where the front-end application is located, the network connection status between the front-end application and the back-end server can be obtained more accurately; through the network delay and bandwidth changes in the network connection status, the network status of the front-end application device can be determined, and thus the real-time connection status with the back-end server can be determined, thereby improving the accuracy of the real-time connection status.

[0019] Optionally, the front-end application initiates an active reconnection operation to the back-end server, including:

[0020] The front-end application initiates a first connection request to the back-end server;

[0021] When the first connection request fails to connect, after a reconnection interval is met, the first connection request is re-initiated until a preset number of reconnection times is met; the reconnection interval is determined according to a network connection state or a reconnection success situation.

[0022] In the embodiment of the present application, the front-end application initiates a first connection request to the back-end server, and the user does not need to manually reconnect, thereby improving user satisfaction; by setting the reconnection interval, it is possible to promptly obtain whether the reconnection is successful, and if unsuccessful, the problem of server failure due to a high frequency of initiating reconnections is avoided; by setting the number of reconnections, it is avoided that the user experience is reduced due to failure after multiple retries, resulting in too long a reconnection time.

[0023] Optionally, the front-end application initiates an active reconnection operation to the back-end server, and / or the front-end application initiates a passive reconnection operation to the back-end server, including:

[0024] When the primary server corresponding to the backend server is abnormal, the front-end application initiates an active reconnection operation and / or a passive reconnection operation to the backup server corresponding to the backend server; and / or

[0025] The front-end application adjusts the data transmission flow of the device according to the network connection status and / or data transmission status of the device where the front-end application is located, and then initiates an active reconnection operation and / or a passive reconnection operation.

[0026] In the embodiment of the present application, the success rate of reconnection can be improved by using the main and backup servers, avoiding the problem of reconnection failure caused by failure of the main server during reconnection; by adjusting the data transmission flow of the device, the success rate of reconnection can be improved, avoiding the problem of reconnection failure caused by data transmission.

[0027] Optionally, it also includes:

[0028] If the real-time connection state is connected, the session identifier between the front-end application and the back-end server is monitored, and if the session identifier is updated, an active reconnection operation is initiated using the updated session identifier.

[0029] In the embodiment of the present application, by monitoring the session identifier, the problem of not being able to obtain the session identifier in time is avoided, and by using the updated session identifier, the validity of the session is improved.

[0030] Optionally, it also includes:

[0031] The front-end application sends user prompt information; the user prompt information is used to prompt the network connection status and / or reconnection status.

[0032] In the embodiment of the present application, by sending user prompt information, the user can obtain the network connection status or reconnection status in time, thereby improving the user satisfaction.

[0033] In a second aspect, an embodiment of the present application provides a disconnection reconnection device between a front-end application and a back-end server, comprising:

[0034] An acquisition module is used for the front-end application to acquire the real-time connection status between the front-end application and the back-end server; the back-end server is provided with a conversation robot that interacts with the front-end application;

[0035] A reconnection module, configured to cause the front-end application to initiate an active reconnection operation to the back-end server if the real-time connection state is disconnected;

[0036] The reconnection module is also used for initiating a passive reconnection operation to the backend server after the front-end application receives a wake-up operation of the conversation robot from the user if the active reconnection operation fails.

[0037] Optionally, the acquisition module is specifically used for:

[0038] The front-end application determines the real-time connection status with the back-end server through a timed detection operation; or,

[0039] The front-end application determines the real-time connection status with the back-end server by monitoring the network connection status of the device where the front-end application is located; or,

[0040] The front-end application determines the real-time connection status with the back-end server by monitoring the communication protocol status between the front-end application and the back-end server.

[0041] Optionally, the acquisition module is specifically used for:

[0042] The front-end application monitors the network connection status of the device where the front-end application is located;

[0043] The front-end application determines the real-time connection status with the back-end server according to the network delay and / or bandwidth change in the network connection status.

[0044] Optionally, the reconnection module is specifically used to:

[0045] The front-end application initiates a first connection request to the back-end server;

[0046] When the first connection request fails to connect, after a reconnection interval is met, the first connection request is re-initiated until a preset number of reconnection times is met; the reconnection interval is determined according to a network connection state or a reconnection success situation.

[0047] Optionally, the reconnection module is specifically used to:

[0048] When the primary server corresponding to the backend server is abnormal, the front-end application initiates an active reconnection operation and / or a passive reconnection operation to the backup server corresponding to the backend server; and / or

[0049] The front-end application adjusts the data transmission flow of the device according to the network connection status and / or data transmission status of the device where the front-end application is located, and then initiates an active reconnection operation and / or a passive reconnection operation.

[0050] Optionally, the reconnection module is further used for:

[0051] If the real-time connection state is connected, the session identifier between the front-end application and the back-end server is monitored, and if the session identifier is updated, an active reconnection operation is initiated using the updated session identifier.

[0052] Optionally, the reconnection module is further used for:

[0053] The front-end application sends user prompt information; the user prompt information is used to prompt the network connection status and / or reconnection status.

[0054] In a third aspect, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above-mentioned methods when executing the program.

[0055] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program executable by a computer device, wherein when the program is run on the computer device, the computer device executes the steps of any of the above-described methods.

[0056] In a fifth aspect, the present application provides a computer program product, which, when executed on a computer, enables the computer to execute the methods of the various embodiments of the first aspect described above. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0058] Figure 1 A system architecture diagram provided for an embodiment of the present application;

[0059] Figure 2 A schematic diagram of a disconnection reconnection method between a front-end application and a back-end server provided in an embodiment of the present application Figure 1 ;

[0060] Figure 3A flowchart of an active reconnection method between a front-end application and a back-end server provided in an embodiment of the present application;

[0061] Figure 4 A schematic diagram of a disconnection reconnection method between a front-end application and a back-end server provided in an embodiment of the present application Figure 2 ;

[0062] Figure 5 A schematic diagram of the structure of a disconnection reconnection device between a front-end application and a back-end server provided in an embodiment of the present application;

[0063] Figure 6 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0064] In order to make the purpose, technical solution and beneficial effects of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0065] To facilitate understanding of this solution, the application scenario of this solution is introduced below.

[0066] With the continuous development of artificial intelligence technology, artificial intelligence is becoming more and more common in life. At present, commonly used conversational robots have become common devices in life. Users control the front-end application of the conversational robot pre-installed on the mobile terminal to enable it to complete the corresponding task. The front-end application and the conversational robot are connected through the network. Before the user controls the conversational robot through the front-end application, the front-end application and the conversational robot need to be in a good and stable network environment. If the network environment fails, the user will often experience interaction interruptions during the interaction with the conversational robot. Generally, the following two methods are used to solve the interaction interruption: 1) The front-end application prompts the user that the network connection has been disconnected, waiting for the user to actively perform routine connection operations such as network status check, killing the process and restarting the application; 2) Freeze all the user's operations and current status to prevent the user from performing new operations, and at the same time, the back-end server tries to re-establish the network connection until the network is restored. However, the above method will bring a bad user experience to the user. In this regard, the embodiment of the present application provides a disconnection reconnection method between the front-end application and the back-end server, and the specific implementation steps are as follows:

[0067] First, the present application obtains the network connection status between the front-end application and the back-end server in real time through a variety of methods. If the network connection status is found to be disconnected, the front-end application actively initiates an active reconnection operation to the back-end server, and when the active reconnection fails, the active reconnection operation can still be initiated after the reconnection interval. If the active reconnection operation meets the preset number of reconnections, it is adjusted to a passive reconnection. Passive reconnection requires the user to wake up the conversation robot of the back-end server, and then the front-end application initiates a passive reconnection operation to the back-end server. During the reconnection process, when the main server is abnormal, a reconnection is initiated to the backup server, and / or, according to the network connection status and / or data transmission status of the device where the front-end application is located, the data transmission flow of the device is adjusted, and then a reconnection is initiated.

[0068] See also Figure 1 , is a system architecture diagram provided in an embodiment of the present application, the system architecture includes a terminal device 101, a server 102 and a dialogue robot 103.

[0069] The terminal device 101 is pre-installed with a front-end application, wherein the front-end application may be a client application, a web application, a small program application, etc. The terminal device 101 may be a smart phone, a desktop notebook, a computer, etc., but is not limited thereto.

[0070] The backend server 102 is a backend server for the frontend application. The server 102 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It may also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The terminal device 101 is connected to the backend server 102 via a wired or wireless network.

[0071] The dialogue robot 103 is set on the back-end server 102. The dialogue robot 103 interacts with the user through dialogue. The front-end application of the dialogue robot 103 is pre-installed on the terminal device 101, so that the dialogue robot 103 can be controlled through the terminal device 101.

[0072] See also Figure 2 , is a flow chart of a disconnection reconnection method between a front-end application and a back-end server provided in an embodiment of the present application, comprising the following steps:

[0073] Step 201: The front-end application obtains the real-time connection status with the back-end server; the back-end server is provided with a conversation robot that interacts with the front-end application.

[0074] Specifically, a conversation robot generally has a corresponding front-end application, and the device where the front-end application is located can control the conversation robot through the front-end application. On the front-end application, multiple modules will be set, and each module corresponds to a corresponding function. For example, the interface of the front-end application will display functional modules such as network settings, family member settings, sound settings, etc. By setting each functional module, the conversation robot has different attributes. The front-end application can be a dedicated application corresponding to the conversation robot. It can be deployed on mobile terminals such as mobile phones and tablets. When interacting with the conversation robot, the conversation robot can be controlled through the dedicated application; the front-end application can also be a service loaded into other applications. The conversation robot can also be controlled through other applications. Using other applications does not require additional download of dedicated applications, saving the memory of the mobile terminal. The embodiment of the present application does not specifically limit the above two front-end applications.

[0075] The backend server is the server where the conversational robot is located, and is responsible for responding to service requests, ensuring service functions, etc. According to different setting requests of the front-end application, the backend server modifies the corresponding parameters to realize different properties of the conversational robot.

[0076] A conversational robot is a computer program that can communicate with users through dialogue or text, and can simulate human conversation. Conversational robots are used for practical purposes. For example, conversational robots set up in the home are used to complete basic operations in life, such as performing tasks (turning on the air conditioner, etc.), providing news information, reporting weather and other life services; conversational robots set up in business halls are used to provide customer service, such as providing current business progress, obtaining business processing progress, etc.

[0077] Since the conversational robot interacts with the front-end application through the back-end server where it is located, the front-end application needs to obtain the network connection status with the back-end server in real time to ensure good interaction between the user and the conversational robot.

[0078] Step 202: If the real-time connection status is disconnected, the front-end application initiates an active reconnection operation to the back-end server.

[0079] Specifically, there can be multiple real-time connection states, such as disconnected and connected. In the connected state, it can be divided into: strong signal strength, weak signal strength, unstable network connection state, etc. In the disconnected state, it can be divided into no signal source, no network, etc. If the real-time connection state is detected as disconnected, the front-end application initiates an active reconnection operation to the back-end server.

[0080] Step 203: If the active reconnection operation fails, the front-end application initiates a passive reconnection operation to the back-end server after receiving the user's wake-up operation on the dialogue robot.

[0081] Specifically, when the active reconnection operation initiated by the front-end application fails, the user needs to wake up the conversation robot, and then the front-end application initiates a passive reconnection operation to the back-end server after receiving the operation of waking up the conversation robot. Active reconnection does not require waking up the conversation robot.

[0082] In some embodiments, the front-end application obtains the real-time connection status between the front-end application and the back-end server, including: the front-end application determines the real-time connection status between the front-end application and the back-end server through a timed detection operation; or, the front-end application determines the real-time connection status between the front-end application and the back-end server by monitoring the network connection status of the device where the front-end application is located; or, the front-end application determines the real-time connection status between the front-end application and the back-end server by monitoring the communication protocol status between the front-end application and the back-end server.

[0083] Specifically, the front-end application obtains the real-time connection status with the back-end server in the following ways:

[0084] 1. The front-end application determines the real-time connection status with the back-end server through a timed detection operation. The timed detection operation means that the front-end application sends a detection request to the back-end server at a fixed time, and determines whether the back-end server has packet loss and other problems according to the message replied by the back-end server, thereby determining the connection status between the front-end application and the back-end server.

[0085] Ping (Packet Internet Groper) is a computer network management application. This program is usually used to confirm whether a host on the Internet is reachable. Ping is a service command that works at the application layer in the TCP / IP network architecture. Its principle is to send an ICMP (Internet Control Message Protocol) Echo Request message to a specific destination host, and based on the returned ICMP Echo Reply message, test whether the destination is reachable and obtain relevant status information such as the packet loss rate and average round-trip time of the connection. Ping can be used to determine whether the front-end application can successfully exchange (send and receive) data packets with the back-end server, and then based on the returned information, it can be inferred whether the operation is normal and whether the network is unobstructed.

[0086] 2. The front-end application monitors the network connection status of the device where it is located to determine the real-time connection status between the front-end application and the back-end server.

[0087] 3. Determine the real-time connection status with the back-end server by monitoring the communication protocol status between the front-end application and the back-end server. The communication protocol status can also reflect the communication between the two. For example, monitor the real-time connection status by monitoring the change of the WebSocket connection status. WebSocket is a protocol for full-duplex communication on a single TCP connection. WebSocket makes data exchange between the client and the server easier, allowing the server to actively push data to the client. In the WebSocket API, the browser and the server only need to complete a handshake, and a persistent connection can be directly created between the two, and two-way data transmission can be carried out. Therefore, by monitoring whether the connection status of the WebSocket changes, the real-time connection status can be determined.

[0088] In some embodiments, the front-end application determines the real-time connection status with the back-end server by monitoring the network connection status of the device where the front-end application is located, including:

[0089] The front-end application monitors the network connection status of the device where the front-end application is located;

[0090] The front-end application determines the real-time connection status with the back-end server according to the network delay and / or bandwidth changes in the network connection status.

[0091] Specifically, the network connection status, as shown in TCP, includes the following: 1. CLOSED: Indicates that the TCP connection is in a closed state, that is, no connection is established. 2. LISTEN: Indicates that TCP is listening for a connection request from a remote node. 3. SYN_SENT: Indicates that the TCP connection has been started and is waiting for confirmation information from the remote node. 4. SYN_RECEIVED: Indicates that TCP is waiting for confirmation information from the local node to confirm the synchronization sequence number. 5. ESTABLISHED: Indicates that the TCP connection has been established and both nodes can transmit data or other information. 6. FIN_WAIT_1, FIN_WAIT_2, CLOSE_WAIT, CLOSING, LAST_ACK, TIME_WAIT: These states are all intermediate states in the state transition process when the TCP connection is closed. Monitor the network connection status of the device where the front-end application is located, network delay, such as the possible network delay phenomenon in SYN_SENT; or bandwidth changes, such as the possible bandwidth changes in ESTABLISHED. Determine the real-time connection status of the front-end application and the back-end server based on network delay and / or bandwidth changes.

[0092] In some embodiments, the front-end application initiates an active reconnection operation to the back-end server, such as Figure 3 As shown, the following steps are included:

[0093] Step 301: The front-end application initiates a first connection request to the back-end server.

[0094] Specifically, the first connection request is a request initiated by the front-end application to the back-end server for requesting to reconnect to the network. In the active reconnection operation, the front-end application initiates the first connection request to the back-end server.

[0095] Step 302: When the first connection request fails, after a reconnection interval is met, the first connection request is re-initiated until a preset number of reconnection times is met; the reconnection interval is determined according to the network connection status or the reconnection success situation.

[0096] Specifically, the first connection request is sent at least once. If there are multiple first connection requests, the interval between each first connection request should meet the reconnection interval, which is determined by the network connection status or the reconnection success. The number of first connection requests must also meet the preset reconnection number.

[0097] For example, if there is an interruption between the front-end application and the back-end server, the front-end application initiates the first first connection request to the back-end server. If the front-end application and the back-end server re-establish the connection after the first connection request is sent, there is no need to send the first connection request to the back-end server again. If the front-end application and the back-end server still do not establish a connection within 10 seconds after the first first connection request is sent, the front-end application continues to initiate the second first connection request, the third first connection request, and so on. The Nth first connection request, until the front-end application and the back-end server re-establish the connection.

[0098] In order to avoid the interval between the first first connection request and the second first connection request being too short, the embodiment of the present application controls the problem of too frequent sending of the first connection request by setting a reconnection interval. The reconnection interval can be set to 5s, 10s or other time, which is not limited in the embodiment of the present application. The embodiment of the present application also further limits the number of times the first connection request is sent, such as setting it to 3 times, 5 times, etc.

[0099] In some embodiments, the front-end application initiates an active reconnection operation to the back-end server, and / or the front-end application initiates a passive reconnection operation to the back-end server, including: when the main server corresponding to the back-end server is abnormal, the front-end application initiates an active reconnection operation and / or a passive reconnection operation to the backup server corresponding to the back-end server; and / or the front-end application adjusts the data transmission flow of the device according to the network connection status and / or data transmission status of the device where the front-end application is located, and then initiates an active reconnection operation and / or a passive reconnection operation.

[0100] Specifically, when the front-end application initiates an active reconnection to the back-end server, and / or the front-end application initiates a passive reconnection operation to the back-end server, if the front-end application detects that an abnormality occurs in the main server corresponding to the back-end server, the backup server corresponding to the main server initiates an active reconnection and / or passive reconnection operation when the reconnection is established. For important services, two servers are used to back up each other and perform the same task. When one server fails, the other server assumes the service task, thereby automatically ensuring that the system can continue to provide services without manual intervention. The primary and backup servers solve the problem of uninterrupted service when the primary server fails. Under normal circumstances, the primary server is in working condition and the backup server is in monitoring condition. When the primary server fails, the backup server is switched to complete the work of the primary server and continue to run.

[0101] If the network connection status and / or data transmission status of the device where the front-end application is located is abnormal, the data transmission flow of the device is adjusted, and an active reconnection operation and / or a passive reconnection operation are initiated. The network connection status and data transmission status of the device where the front-end application is located play an important role in establishing a connection between the front-end application and the back-end server. The device where the front-end application is located can be a mobile terminal, tablet computer or desktop computer. If the network status of the device itself is not good, it will affect the network connection status between the front-end application and the back-end server; if the data transmission status of the device is slow, it will not be able to establish a good network connection status with the back-end server.

[0102] In some embodiments, if the real-time connection state is connected, the session identifier between the front-end application and the back-end server is monitored, and if the session identifier is updated, an active reconnection operation is initiated using the updated session identifier.

[0103] Specifically, after the session identifier is updated, in order to ensure the validity of the session, it is necessary to disconnect the front-end application from the back-end server, and then use the new session identifier to re-initiate a connection request. TOKEN means token (temporary) in computer identity authentication and means tag in lexical analysis. It is generally used as an invitation or login system. In the embodiment of the present application, TOKEN is used as the session identifier, and the front-end application monitors the TOKEN status in real time. Once a TOKEN update is detected, the front-end application is disconnected from the back-end server, and then a reconnection is initiated based on the latest TOKEN.

[0104] In some embodiments, the front-end application sends user prompt information; the user prompt information is used to prompt the network connection status and / or reconnection status.

[0105] Specifically, during the process of establishing a reconnection between the front-end application and the back-end server, the front-end application will send user prompt information to the user, and the user prompt information includes the current network connection status and reconnection status. For example, the current network connection status is displayed as "Connecting...", "Connection failed", "Connection successful", etc., and the reconnection status is "First reconnection", "Reconnection successful", "Reconnection failed", etc. The user prompt information can be used to show the progress of the current reconnection and provide preset prompt information, so that the user can understand the reconnection status at any time without interfering with the reconnection operation.

[0106] In some embodiments, each time a reconnection is initiated, the front-end application also checks and updates the encryption status of the reconnection to ensure the security of data transmission and prevent data leakage and unauthorized access.

[0107] To facilitate understanding of this solution, the following takes the conversational robot Xiao A as an example. The corresponding front-end application is application A, and the server is server A. Assume that the preset number of reconnections is 2. The implementation process of this solution is described in detail, such as Figure 4 As shown, the following steps are included:

[0108] Step 401, application A periodically sends a ping request to server A;

[0109] Step 402: Determine the connection status between application A and server A according to the reply to the ping request; if the connection status is disconnected, execute step 403; if the connection status is connected, execute step 406;

[0110] Step 403: Application A initiates a first connection request to server A. If the connection is successful, execute step 406; if the connection fails, execute step 404;

[0111] Step 404: Send the first connection request again after 10 seconds from the last first connection request; if the connection is successful, execute step 406; if the connection fails, execute step 405;

[0112] Step 405: Application A receives the operation of waking up Little A;

[0113] Step 406: Application A initiates a connection with server A to determine whether the main server is operating normally. If it is normal, execute step 408; if it is abnormal, execute step 407;

[0114] Step 407: Establish a connection with application A through the standby server.

[0115] Step 408: Establish a connection with application A through the main server.

[0116] Based on the same technical concept, the embodiment of the present application provides a disconnection reconnection device between a front-end application and a back-end server, such as Figure 5 As shown, the device 500 includes:

[0117] Acquisition module 501, used for the front-end application to acquire the real-time connection status between the front-end application and the back-end server; the back-end server is provided with a conversation robot that interacts with the front-end application;

[0118] A reconnection module 502, configured to cause the front-end application to initiate an active reconnection operation to the back-end server if the real-time connection state is disconnected;

[0119] The reconnection module 502 is also used for initiating a passive reconnection operation to the backend server after the front-end application receives a wake-up operation of the conversation robot from the user if the active reconnection operation fails.

[0120] Optionally, the acquisition module 501 is specifically used for:

[0121] The front-end application determines the real-time connection status with the back-end server through a timed detection operation; or,

[0122] The front-end application determines the real-time connection status with the back-end server by monitoring the network connection status of the device where the front-end application is located; or,

[0123] The front-end application determines the real-time connection status with the back-end server by monitoring the communication protocol status between the front-end application and the back-end server.

[0124] Optionally, the acquisition module 501 is specifically used for:

[0125] The front-end application monitors the network connection status of the device where the front-end application is located;

[0126] The front-end application determines the real-time connection status with the back-end server according to the network delay and / or bandwidth change in the network connection status.

[0127] Optionally, the reconnection module 502 is specifically configured to:

[0128] The front-end application initiates a first connection request to the back-end server;

[0129] When the first connection request fails to connect, after a reconnection interval is met, the first connection request is re-initiated until a preset number of reconnection times is met; the reconnection interval is determined according to a network connection state or a reconnection success situation.

[0130] Optionally, the reconnection module 502 is specifically configured to:

[0131] When the primary server corresponding to the backend server is abnormal, the front-end application initiates an active reconnection operation and / or a passive reconnection operation to the backup server corresponding to the backend server; and / or

[0132] The front-end application adjusts the data transmission flow of the device according to the network connection status and / or data transmission status of the device where the front-end application is located, and then initiates an active reconnection operation and / or a passive reconnection operation.

[0133] Optionally, the reconnection module 502 is further configured to:

[0134] If the real-time connection state is connected, the session identifier between the front-end application and the back-end server is monitored, and if the session identifier is updated, an active reconnection operation is initiated using the updated session identifier.

[0135] Optionally, the reconnection module 502 is further configured to:

[0136] The front-end application sends user prompt information; the user prompt information is used to prompt the network connection status and / or reconnection status.

[0137] Based on the same technical concept, the embodiment of the present application provides a computer device, which may be a terminal or a server, such as Figure 6 As shown, it includes at least one processor 601 and a memory 602 connected to the at least one processor. The specific connection medium between the processor 601 and the memory 602 is not limited in the embodiment of the present application. Figure 6 For example, the processor 601 and the memory 602 are connected via a bus. The bus can be divided into an address bus, a data bus, a control bus, and the like.

[0138] In the embodiment of the present application, the memory 602 stores instructions that can be executed by at least one processor 601. The at least one processor 601 can execute the steps included in the above-mentioned cosmic ray removal method by executing the instructions stored in the memory 602.

[0139] The processor 601 is the control center of the computer device, and can use various interfaces and lines to connect various parts of the computer device, by running or executing instructions stored in the memory 602 and calling data stored in the memory 602. Optionally, the processor 601 may include one or more processing units, and the processor 601 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 601. In some embodiments, the processor 601 and the memory 602 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on independent chips.

[0140] Processor 601 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware processor for execution, or can be executed by a combination of hardware and software modules in the processor.

[0141] The memory 602 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 602 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 702 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 702 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.

[0142] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program executable by a computer device. When the program runs on the computer device, the computer device executes the steps of the above-mentioned cosmic ray removal method.

[0143] Based on the same inventive concept, an embodiment of the present application provides a computer program product, characterized in that the computer program product includes a computer program stored on a computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer device, the computer device executes the steps of the above-mentioned cosmic ray removal method.

[0144] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0145] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0146] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0147] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0148] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A disconnection reconnection method between a front-end application and a back-end server, characterized in that: include: The front-end application obtains the real-time connection status with the back-end server; The backend server is provided with a conversational robot that interacts with the frontend application; If the real-time connection state is disconnected, the front-end application initiates an active reconnection operation to the back-end server; If the active reconnection operation fails, the front-end application initiates a passive reconnection operation to the back-end server after receiving the user's wake-up operation on the conversational robot.

2. The method according to claim 1, characterized in that The front-end application obtains the real-time connection status with the back-end server, including: The front-end application determines the real-time connection status with the back-end server through a timed detection operation; or, The front-end application determines the real-time connection status with the back-end server by monitoring the network connection status of the device where the front-end application is located; or, The front-end application determines the real-time connection status with the back-end server by monitoring the communication protocol status between the front-end application and the back-end server.

3. The method according to claim 2, characterized in that The front-end application determines the real-time connection status with the back-end server by monitoring the network connection status of the device where the front-end application is located, including: The front-end application monitors the network connection status of the device where the front-end application is located; The front-end application determines the real-time connection status with the back-end server according to the network delay and / or bandwidth change in the network connection status.

4. The method according to claim 1, characterized in that The front-end application initiates an active reconnection operation to the back-end server, including: The front-end application initiates a first connection request to the back-end server; When the first connection request fails to connect, after a reconnection interval is met, the first connection request is re-initiated until a preset number of reconnection times is met; the reconnection interval is determined according to a network connection state or a reconnection success situation.

5. The method according to claim 1, characterized in that The front-end application initiates an active reconnection operation to the back-end server, and / or the front-end application initiates a passive reconnection operation to the back-end server, including: When the primary server corresponding to the backend server is abnormal, the front-end application initiates an active reconnection operation and / or a passive reconnection operation to the backup server corresponding to the backend server; and / or The front-end application adjusts the data transmission flow of the device according to the network connection status and / or data transmission status of the device where the front-end application is located, and then initiates an active reconnection operation and / or a passive reconnection operation.

6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: If the real-time connection state is connected, the session identifier between the front-end application and the back-end server is monitored, and if the session identifier is updated, an active reconnection operation is initiated using the updated session identifier.

7. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: The front-end application sends user prompt information; the user prompt information is used to prompt the network connection status and / or reconnection status.

8. A disconnection reconnection device between a front-end application and a back-end server, characterized in that: include: The acquisition module is used by the front-end application to obtain the real-time connection status between the front-end application and the back-end server; The backend server is provided with a conversational robot that interacts with the frontend application; A reconnection module, configured to cause the front-end application to initiate an active reconnection operation to the back-end server if the real-time connection state is disconnected; The reconnection module is also used for initiating a passive reconnection operation to the backend server after the front-end application receives a wake-up operation of the conversation robot from the user if the active reconnection operation fails.

9. A computer device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the steps of the method according to any one of claims 1 to 7 are implemented when the processor executes the program.

10. A computer-readable storage medium, characterized in that: It stores a computer program executable by a computer device, and when the program is run on the computer device, the computer device executes the steps of any method described in claims 1 to 7.