CN117880254A - Reconnection method for real-time communication - Google Patents
Reconnection method for real-time communication Download PDFInfo
- Publication number
- CN117880254A CN117880254A CN202311681098.7A CN202311681098A CN117880254A CN 117880254 A CN117880254 A CN 117880254A CN 202311681098 A CN202311681098 A CN 202311681098A CN 117880254 A CN117880254 A CN 117880254A
- Authority
- CN
- China
- Prior art keywords
- information
- network
- detection module
- network state
- state
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 34
- 238000004891 communication Methods 0.000 title claims abstract description 16
- 238000001514 detection method Methods 0.000 claims abstract description 90
- 230000011664 signaling Effects 0.000 claims abstract description 59
- 230000002159 abnormal effect Effects 0.000 claims abstract description 53
- 238000012544 monitoring process Methods 0.000 claims abstract description 30
- 230000005856 abnormality Effects 0.000 claims abstract description 24
- 230000007246 mechanism Effects 0.000 claims description 4
- 230000015654 memory Effects 0.000 description 15
- 238000010586 diagram Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 6
- 238000004590 computer program Methods 0.000 description 4
- 230000005291 magnetic effect Effects 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000001960 triggered effect Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000003213 activating effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 238000004321 preservation Methods 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
- 230000003936 working memory Effects 0.000 description 1
Landscapes
- Computer And Data Communications (AREA)
Abstract
The application provides a reconnection method for real-time communication, which is used for acquiring user operation state information according to user operation states and storing the user operation state information in a local cache; monitoring network state through the network detection module, the server detection module, the signaling detection module, the P2P media detection module and the DC channel detection module, acquiring network state abnormality information when the network state is abnormal, and recovering normal network state according to the network state abnormality information and the reconnection priority list; and acquiring user operation state information from the local cache, and recovering the user operation state according to the user operation state information. According to the scheme, the network state is monitored through each detection module, different network abnormal conditions are processed respectively, and after the network state is recovered to be normal, the original operation of the user is recovered through the saved user operation state, so that the reconnection efficiency is improved, the user experience is also improved, and the problems of lower connection efficiency and poor user experience caused by connection reestablishment in the prior art are solved.
Description
Technical Field
The application relates to the technical field of communication, in particular to a reconnection method for real-time communication.
Background
In the existing real-time communication system, when a client is disconnected from a server due to interruption of a communication network or other reasons, the server is generally used for storing user login information and then integrally reconnecting with the server, and the originally unaffected service also needs to reestablish connection, so that reconnection efficiency is reduced, and network resources are consumed. If the server fails or is unavailable, the client cannot recover the login information of the user from the original server and further cannot resume the reconnection of the server for use, so that a series of operations performed by the user during the use of the server cannot resume the original operation state due to the replacement of the server or the lack of preservation by the original server, and thus, even if the user is reconnected to the server, the operation needs to be performed again, and the user experience is poor due to the inefficient operation, so that the problems of low connection efficiency and poor user experience caused by connection reestablishment after the connection is interrupted are not solved in the prior art.
Disclosure of Invention
An objective of the present application is to provide a reconnection method for real-time communication, which is used for solving the problems of low connection efficiency and poor user experience caused by connection reestablishment.
The application provides a reconnection method for real-time communication, which comprises the following steps:
acquiring user operation state information according to the user operation state, and storing the user state information in a local cache;
monitoring a network state through at least one detection module among a network detection module, a server detection module, a signaling detection module, a P2P media detection module and a DC channel detection module, acquiring network state abnormality information when the network state is abnormal, and recovering a normal network state according to the network state abnormality information and a reconnection priority list;
and acquiring user operation state information from the local cache, and recovering the user operation state according to the user operation state information.
Further, after obtaining the user operation state information according to the user operation state and storing the user operation state information in the local cache, the method further comprises:
and acquiring the user operation state information again according to the current user operation state every first time interval, and replacing the user operation state information acquired in the previous time.
Further, monitoring a network state through a network detection module, and when the network state is abnormal, acquiring abnormal information of the network state, including:
and acquiring network connection information through the network detection module, and taking the network connection information as the network state abnormal information when confirming that the network connection information comprises the offlip event information.
Further, monitoring a network state through a server detection module, and when the network state is abnormal, acquiring abnormal information of the network state, including:
and sending a first request to a target server by the server detection module through a heartbeat detection mechanism, acquiring first information corresponding to the first request, and taking the first information as the network state abnormal information if the first information is confirmed to accord with a first preset characteristic.
Further, restoring the normal network state includes:
and reconnecting the target server, if the connection failure is confirmed, recording and updating the connection failure times, then reconnecting the target server, and if the connection failure times are confirmed to exceed a first preset threshold value, acquiring a server list, and connecting other servers through the server list.
Further, monitoring a network state through a signaling detection module, and when the network state is abnormal, acquiring abnormal information of the network state, including:
and sending a second request to the first signaling server through a signaling detection module, acquiring second information corresponding to the second request, and taking the second information as the network state abnormal information if the second information is confirmed to accord with a second preset characteristic.
Further, restoring the normal network state includes:
and reconnecting the first signaling server, if the connection failure is confirmed, recording and updating the connection failure times, reconnecting the first signaling server, and if the connection failure times are confirmed to exceed a second preset threshold, acquiring a signaling server list, and connecting other signaling servers through the signaling server list.
Further, monitoring a network state through a P2P media detection module, and when the network state is abnormal, acquiring abnormal information of the network state includes:
and acquiring connection state information of ICE in the WebRTC by checking a value of peerconnection.iceconnection State, and taking the connection state information of ICE as the network state abnormality information if the connection state information of ICE is confirmed to comprise unconnected and/or failed.
Further, monitoring a network state through a DC channel detection module, and when the network state is abnormal, acquiring abnormal information of the network state, including:
monitoring a datachannel to acquire first trigger event information, and if the first trigger event information is confirmed to comprise onclose event information and/or onerror event information, taking the first trigger event information as the network state abnormal information.
Further, restoring the normal network state according to the network state abnormality information and the reconnection priority list, including:
and generating a service reconnection queue according to the reconnection priority list and the network state abnormality information, and recovering the normal network state according to the service reconnection queue.
Compared with the prior art, the application provides a reconnection method for real-time communication, which is used for acquiring user operation state information according to a user operation state and storing the user operation state information in a local cache; monitoring a network state through at least one detection module among a network detection module, a server detection module, a signaling detection module, a P2P media detection module and a DC channel detection module, acquiring network state abnormality information when the network state is abnormal, and recovering a normal network state according to the network state abnormality information and a reconnection priority list; and acquiring user operation state information from the local cache, and recovering the user operation state according to the user operation state information. According to the scheme, the network state is monitored through each detection module, different network abnormal conditions are processed respectively, and after the network state is recovered to be normal, the original operation of the user is recovered through the saved user operation state, so that the reconnection efficiency is improved, the user experience is also improved, and the problems of lower connection efficiency and poor user experience caused by connection reestablishment in the prior art are solved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the following drawings, in which:
FIG. 1 is a schematic diagram of one embodiment of a method described herein;
FIG. 2 is a schematic diagram of one embodiment of a three-layer structure for implementing the method described herein;
FIG. 3 is a schematic diagram of one embodiment of each detection module of the method described herein;
FIG. 4 is a schematic diagram illustrating one embodiment of a target server reconnection method described herein;
FIG. 5 is a schematic diagram of one embodiment of a method for manually activating each detection module in the present application.
The same or similar reference numbers in the drawings refer to the same or similar parts.
Detailed Description
In one typical configuration of the present application, the terminal, the device of the service network, and the trusted party each include one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer readable media, as defined herein, does not include non-transitory computer readable media (transmission media), such as modulated data signals and carrier waves.
The application provides a reconnection method for real-time communication, which comprises the following steps:
step S101: acquiring user operation state information according to the user operation state, and storing the user state information in a local cache;
step S102: monitoring a network state through at least one detection module among a network detection module, a server detection module, a signaling detection module, a P2P media detection module and a DC channel detection module, acquiring network state abnormality information when the network state is abnormal, and recovering a normal network state according to the network state abnormality information and a reconnection priority list;
step S103: and acquiring user operation state information from the local cache, and recovering the user operation state according to the user operation state information.
The above-described method of the present application is further described below in conjunction with fig. 1.
Step S101: and acquiring user operation state information according to the user operation state, and storing the user state information in a local cache.
The user operation state may be a current state of a user operation, for example, an application is running, an application is closed, a video is being watched using an application or a social software is being used for online chat, which are all current operation states of the user, i.e., user operation states. The user operation state information is obtained according to the user operation state, and aims to timely recover to the user operation state after the network is disconnected and reconnected, for example, when the user is watching a video, the network can directly recover to the progress of watching the video of the user before the network is disconnected and reconnected without logging in an account again for verification.
The user operation state information may include basic information of the user, such as a name, a nickname, an AppID, a UID, etc., or may include a token, an operation step of an application, a communication state of the whole system before network interruption, a communication message of each application, or whether the user opens a microphone, opens a camera, has a shared screen, shares a file, etc., so that after reconnecting to recover the network, the whole system can be recovered to a state environment before network interruption in time. User state operation information may be stored in a local cache to facilitate quick recall upon recovery.
In some embodiments of the present application, after user operation state information is obtained according to a user operation state and the user operation state information is stored in a local cache, the user operation state information is obtained again according to a current user operation state every first time interval, and the user operation state information obtained in the previous time is replaced.
In normal use of the device, the current operation state is changed along with the operation of an operator, after each first time interval, the user operation state information is re-acquired according to the current user operation state, so that the user operation state information is updated after each time interval, the time can be the first time interval, the first time interval can be preset according to the actual requirement of a user, and after the new user operation state information is acquired, the user operation state information acquired at the previous time is replaced in the local cache, so that the user operation state information is updated.
Step S102: monitoring a network state through at least one detection module among a network detection module, a server detection module, a signaling detection module, a P2P media detection module and a DC channel detection module, acquiring network state abnormality information when the network state is abnormal, and recovering a normal network state according to the network state abnormality information and a reconnection priority list.
Each detection module is used for monitoring network states from multiple angles, more carefully identifying various network faults and carrying out more targeted processing on the network faults, and each detection module can be set by a user according to the needs.
The network detection module is used for monitoring the connection state and acquiring information about whether the network connection is disconnected or not. The server detection module is used for monitoring whether a current target server is in an available state, wherein the target server can be a server used for realizing the requirement of a user, such as a video database server when the user searches a certain video, and a storage server for storing a certain file to be checked by the user. The signaling detection module is used for monitoring a server specially providing signaling service to judge whether the https signaling channel is normal or not. The P2P media detection module is used for monitoring whether the audio/video media channel is normal or not. The DC channel detection module is used for monitoring whether the DC information transmission channels are communicated. At least one detection module is adopted to monitor the network state, when the network state is abnormal, the network state abnormal information sent by the detection module corresponding to the problem is obtained, the network state abnormal information can be further provided with the information of one detection module or a plurality of detection modules, after the network state abnormal information is received, the reconnection operation can be carried out according to a preset reconnection priority list so as to recover to the normal network state, the reconnection priority list can be preset by a user according to the actual requirement,
for example, the problem fed back by the network detection module may be first processed for reconnection, and then the problem fed back by the signaling detection module may be processed for reconnection.
In some embodiments of the present application, the network detection module monitors a network state, when the network state is abnormal, network state abnormal information is obtained, that is, network connection information is obtained through the network detection module, and when it is confirmed that the network connection information includes offline event information, the network connection information is used as the network state abnormal information.
The network detection module can be disconnected by monitoring an online event and an offline event, namely the current network connection state can be captured in real time, corresponding operation is executed according to the change, the network is normally indicated by the monitored online event and is not processed, and the network disconnection is indicated by the monitored offline event and can be used as abnormal information of the network state.
In some embodiments of the present application, the server detection module monitors a network state, and when the network state is abnormal, obtains abnormal network state information, that is, the server detection module sends a first request to a target server by using a heartbeat detection mechanism, obtains first information corresponding to the first request, and if it is confirmed that the first information accords with a first preset feature, uses the first information as the abnormal network state information.
The monitoring of the target server can be the monitoring by adopting a heartbeat detection mechanism, and can be that
The setInterval function is used to send a first request to a heartbeat endpoint of the target server, the first request can be a GET request, when a status code returned by the target server is between 200 and 299, the target server is indicated to be normal and can continue to be used, otherwise, the target server is used as the network status abnormal information to carry out subsequent processing, the first preset feature can be feature information which is set by a user and indicates that the target server cannot work normally, for example, according to the first request, the condition that a non-target server returns to the status codes of 200 to 299 is set as the first preset feature, when the first request is sent, the condition that the target server returns to the status codes of 200 to 299 can not be received is regarded as the target server to be unavailable, and the first information can be used as the network status abnormal information.
In some embodiments of the present application, the restoration of the normal network state may be reconnecting the target server, if it is confirmed that the connection fails, after recording and updating the number of times of connection failure, reconnecting the target server, if it is confirmed that the number of times of connection failure exceeds a first preset threshold, acquiring a server list, and connecting other servers through the server list.
When the target server needs to be reconnected, the original target server is reconnected, multiple attempts can be made, if the connection is not successful after a certain number of connection times, the target server may not work, then the connection of other servers needs to be tried, the first preset threshold value can be preset by a user according to actual conditions, when the number of connection failures of the target server exceeds the first preset threshold value, a server list is obtained, the server list contains other servers which can provide the same functions of the target server for the user, so that the other servers can be connected through the server list, the connection of each server can be in such a way, and when the number of connection failures exceeds the first preset threshold value, the other servers are obtained through the server list until the connection is successful.
In some embodiments of the present application, the signaling detection module monitors a network state, and when the network state is abnormal, obtains abnormal network state information, or sends a second request to the first signaling server through the signaling detection module, obtains second information corresponding to the second request, and if it is confirmed that the second information meets a second preset feature, uses the second information as the abnormal network state information.
The first signaling server may be a server that originally provides a signaling service, the signaling detection module may send a second request to the first signaling server through a Fetch API, where the second request may be a HEAD request, the second information may be feedback information according to the second request, may be information fed back by the first signaling server, or may be other information that the first signaling server does not respond or has an error, and the second preset feature may be a feature that indicates that the first signaling server cannot work normally, for example, all feedback of status codes between 200 and 299, which are not fed back by the first signaling server, are set to be second preset features according to the second request, and then after sending the second request, the status codes between 200 and 299, which cannot be returned by the first signaling server, are regarded as unavailable by the first signaling server, and the information may be second information, which may be used as network status anomaly information.
In some embodiments of the present application, the restoration of the normal network state may be reconnecting a first signaling server, if a connection failure is confirmed, recording and updating the number of connection failures and reconnecting the first signaling server, if the number of connection failures is confirmed to exceed a second preset threshold, acquiring a signaling server list, and connecting other signaling servers through the signaling server list.
When the first signaling server needs to be reconnected, the first signaling server can be reconnected for multiple times, if the connection is not successful after a certain number of times of connection, the first signaling server may not work, then the connection is required to be attempted to other signaling servers, the second preset threshold may be preset by a user according to actual conditions, when the number of times of connection failure to the first signaling server exceeds the second preset threshold, a signaling server list is obtained, the signaling server list contains other signaling servers which can provide the user with the same function as the first signaling server, so that the other signaling servers can be connected through the signaling server list, and when the number of times of connection failure exceeds the second preset threshold, the other signaling servers can be obtained through the signaling server list, until the connection is successful, then the signaling server address of the successful connection can be replaced by the address of the original first signaling server.
In some embodiments of the present application, the P2P media detection module monitors a network state, and when the network state is abnormal, obtains abnormal network state information, which may be that connection state information of an ICE in WebRTC is obtained by checking a value of a peerconnection.
The P2P media detection module may be implemented by listening for ICE connection status of WebRTC connection and triggering an onectonnectionstatechange event. ICE (Interactive Connectivity Establishment) is the protocol used by WebRTC to establish and maintain network connections. An onicceonnection statechange event may be triggered when ICE connection status changes. The state of the P2P media connection may be determined by detecting the value of peerconnection. When the connection state information of the ICE is connected, the ICE indicates that the connection is normal; when the connection state information of the ICE is disconnected or failed, the connection is disconnected, the original PC instance can be destroyed and the PC instance can be re-created to establish connection when the connection is disconnected, and the connection state information of the ICE can be used as network state abnormality information.
In some embodiments of the present application, the DC channel detection module monitors a network state, and when the network state is abnormal, acquires network state abnormal information, which may be monitoring a datachannel to acquire first trigger event information, and if it is confirmed that the first trigger event information includes onclose event information and/or onerror event information, takes the first trigger event information as the network state abnormal information.
The DC channel detection module acquires first trigger event information through monitoring a datachannel, wherein the first trigger event information can be onopen event information, onclose event information and onerror event information. The onclose event information is triggered if the DC channel is closed, the onerror event information is triggered if the DC channel connection is wrong, and reconnection is needed when the DC channel is closed and wrong, so that the onclose event information and the onerror event information can be used as abnormal information of network state. If the DC channel connection is disconnected, the original DC instance can be destroyed, and a new DC instance can be re-created to establish connection.
In some embodiments of the present application, the restoration of the normal network state according to the network state anomaly information and the reconnection priority list may be that a service reconnection queue is generated according to the reconnection priority list and the network state anomaly information, and the restoration of the normal network state is performed according to the service reconnection queue.
Before reconnection is started, the network anomaly information can be rearranged according to the reconnection priority list to form a service reconnection queue, and reconnection is sequentially carried out through the sequence of the service reconnection queue.
Step S103: and acquiring user operation state information from the local cache, and recovering the user operation state according to the user operation state information.
And after the network state is recovered, acquiring the stored user operation state information from the local cache, and recovering to the user operation state before network interruption according to the information.
Fig. 2 is a schematic diagram of one embodiment of the method described herein, which is further described below in conjunction with fig. 2.
The system of the method can be realized through a three-layer structure and can be respectively divided into an interface layer, a control layer and a communication layer. The interface layer can be used for displaying network and service states or reconnection states and progress, so that a user can know the execution progress conveniently, and the interface layer can inform the user after reconnection starts or is completed, and the user is prompted to continue normal use. The control layer may be the execution of various detection modules, the construction of service reconnection queues from a reconnection priority list, etc. The communication layer may execute the reconnection task according to the service reconnection queue sent by the control layer to restore the network connection. FIG. 3 is a diagram of various detection modules that may be adjusted according to the needs of a user.
Fig. 4 is a schematic diagram of one embodiment of the method described herein, which is further described below in conjunction with fig. 2.
Step S201: acquiring network state abnormality information of the target server;
step S202: reconnecting the target server;
step S203: judging whether the reconnection failure times exceeds a first preset threshold value;
step S204: obtaining a server list and connecting other servers;
step S205: changing the cache address of the server;
step S206: the network state is restored.
In some embodiments of the present application, if each detection module cannot be successfully started or successfully completed, a manual control manner may be further adopted to reconnect, so that a corresponding prompt may be made to a user at an interface layer, and a manual one-key reconnection button is provided to facilitate the user to manually operate the detection module when the whole detection module cannot be automatically started, and the reconnection is completed through the operation of the user, which is further described below in connection with fig. 5.
Step S301: starting each detection module to detect;
step S302: prompting a user to perform manual operation at the interface layer;
step S303: receiving a user starting operation;
step S304: monitoring the network state;
step S305: acquiring user operation state information;
step S306: reconnection is executed, and the normal network state is recovered;
step S307: and recovering the user operation state according to the user operation state information.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the spirit or scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to cover such modifications and variations.
It should be noted that the present invention may be implemented in software and/or a combination of software and hardware, e.g., using Application Specific Integrated Circuits (ASIC), a general purpose computer or any other similar hardware device. In one embodiment, the software program of the present invention may be executed by a processor to perform the steps or functions described above. Likewise, the software programs of the present invention (including associated data structures) may be stored on a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. In addition, some steps or functions of the present invention may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or functions.
Furthermore, portions of the present invention may be implemented as a computer program product, such as computer program instructions, which when executed by a computer, may invoke or provide methods and/or techniques in accordance with the present invention by way of operation of the computer. Program instructions for invoking the inventive methods may be stored in fixed or removable recording media and/or transmitted via a data stream in a broadcast or other signal bearing medium and/or stored within a working memory of a computer device operating according to the program instructions. An embodiment according to the invention comprises an apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the apparatus to operate a method and/or a solution according to the embodiments of the invention as described above.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. A plurality of units or means recited in the apparatus claims can also be implemented by means of one unit or means in software or hardware. The terms first, second, etc. are used to denote a name, but not any particular order.
Claims (10)
1. A method for reconnecting a real-time communication, the method comprising:
acquiring user operation state information according to the user operation state, and storing the user state information in a local cache;
monitoring a network state through at least one detection module among a network detection module, a server detection module, a signaling detection module, a P2P media detection module and a DC channel detection module, acquiring network state abnormality information when the network state is abnormal, and recovering a normal network state according to the network state abnormality information and a reconnection priority list;
and acquiring user operation state information from the local cache, and recovering the user operation state according to the user operation state information.
2. The method of claim 1, wherein after obtaining user operation status information according to the user operation status and storing the user operation status information in the local cache, further comprising:
and acquiring the user operation state information again according to the current user operation state every first time interval, and replacing the user operation state information acquired in the previous time.
3. The method of claim 1, wherein monitoring the network status by the network detection module, and when the network status is abnormal, obtaining network status abnormality information, comprises:
and acquiring network connection information through the network detection module, and taking the network connection information as the network state abnormal information when confirming that the network connection information comprises the offlip event information.
4. The method of claim 1, wherein monitoring, by the server detection module, the network state, and when the network state is abnormal, obtaining network state abnormality information, comprises:
and sending a first request to a target server by the server detection module through a heartbeat detection mechanism, acquiring first information corresponding to the first request, and taking the first information as the network state abnormal information if the first information is confirmed to accord with a first preset characteristic.
5. The method of claim 4, wherein restoring normal network conditions comprises:
and reconnecting the target server, if the connection failure is confirmed, recording and updating the connection failure times, then reconnecting the target server, and if the connection failure times are confirmed to exceed a first preset threshold value, acquiring a server list, and connecting other servers through the server list.
6. The method of claim 1, wherein monitoring the network state by the signaling detection module, and when the network state is abnormal, obtaining the network state abnormality information, comprises:
and sending a second request to the first signaling server through a signaling detection module, acquiring second information corresponding to the second request, and taking the second information as the network state abnormal information if the second information is confirmed to accord with a second preset characteristic.
7. The method of claim 6, wherein restoring normal network conditions comprises:
and reconnecting the first signaling server, if the connection failure is confirmed, recording and updating the connection failure times, reconnecting the first signaling server, and if the connection failure times are confirmed to exceed a second preset threshold, acquiring a signaling server list, and connecting other signaling servers through the signaling server list.
8. The method of claim 1, wherein monitoring the network state through the P2P media detection module, and when the network state is abnormal, obtaining network state abnormality information comprises:
and acquiring connection state information of ICE in the WebRTC by checking a value of peerconnection.iceconnection State, and taking the connection state information of ICE as the network state abnormality information if the connection state information of ICE is confirmed to comprise unconnected and/or failed.
9. The method of claim 1, wherein monitoring the network state through the DC-channel detection module, and when the network state is abnormal, obtaining network state abnormality information, comprises:
monitoring a datachannel to acquire first trigger event information, and if the first trigger event information is confirmed to comprise onclose event information and/or onerror event information, taking the first trigger event information as the network state abnormal information.
10. The method of claim 1, wherein restoring normal network state based on the network state anomaly information and reconnection priority list comprises:
and generating a service reconnection queue according to the reconnection priority list and the network state abnormality information, and recovering the normal network state according to the service reconnection queue.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311681098.7A CN117880254A (en) | 2023-12-08 | 2023-12-08 | Reconnection method for real-time communication |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311681098.7A CN117880254A (en) | 2023-12-08 | 2023-12-08 | Reconnection method for real-time communication |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117880254A true CN117880254A (en) | 2024-04-12 |
Family
ID=90576330
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311681098.7A Pending CN117880254A (en) | 2023-12-08 | 2023-12-08 | Reconnection method for real-time communication |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117880254A (en) |
-
2023
- 2023-12-08 CN CN202311681098.7A patent/CN117880254A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3386150B1 (en) | Terminal failure processing method, device and system | |
CN105978721B (en) | The methods, devices and systems of monitoring service operating status in a kind of group system | |
WO2022001751A1 (en) | Virtual cloud desktop monitoring method, client and server, and storage medium | |
CN104065526B (en) | A kind of method and apparatus of server failure alarm | |
US20140359340A1 (en) | Subscriptions that indicate the presence of application servers | |
US11930292B2 (en) | Device state monitoring method and apparatus | |
US8775617B2 (en) | Method for optimizing network performance after a temporary loss of connection | |
CN111083176B (en) | Cloud self-adaptive online method and device for monitoring camera | |
JP2005301436A (en) | Cluster system and failure recovery method for it | |
US11799920B1 (en) | Uninterrupted VR experience during customer and virtual agent interaction | |
CN109474579B (en) | Network reconnection method and device | |
CN117880254A (en) | Reconnection method for real-time communication | |
CN114257632B (en) | Method and device for reconnecting broken wire, electronic equipment and readable storage medium | |
CN112565661A (en) | Video conference communication method and device and computer readable storage medium | |
CN104346233A (en) | Fault recovery method and device for computer system | |
JP4863984B2 (en) | Monitoring processing program, method and apparatus | |
JP2015057685A (en) | Monitoring system | |
CN109901970B (en) | Method and device for monitoring video network terminal | |
JP2014078115A (en) | Communication device | |
CN113938406B (en) | Ethernet communication abnormity monitoring and processing method and system based on SOMEIP protocol | |
CN113568719B (en) | Service fault processing method and device, electronic equipment and storage medium | |
US9411868B2 (en) | Passive real-time order state replication and recovery | |
JPWO2011114834A1 (en) | Network device and network device | |
CN111385519B (en) | Method, device, terminal and multipoint control unit for realizing video conference recovery | |
CN108184141B (en) | Processing method of monitoring video task and server |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |