Offline detection method, server, electronic device and storage medium
Through two-way heartbeat signal interaction, the problem of server disconnection detection in large-scale video conferences is solved, timely and accurate server status monitoring is achieved, the conference is prevented from getting out of control, and the stability of conference management is improved.
Patent Information
- Application Number
- CN202210809518.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-11
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2042-07-11
AI Technical Summary
In large-scale video conferences, existing technology cannot promptly detect disconnections caused by network disconnections between servers at different venues, resulting in the conference being out of control and participating terminals unable to exit.
Through two-way heartbeat signal interaction, the first server regularly sends the first heartbeat signal, and the second server sends the second heartbeat signal after receiving it. When the heartbeat signal is not received, it determines whether to go offline based on preset conditions, ensuring two-way communication and timely detection of server status. .
It achieves timely and accurate detection of the second server, prevents the conference from getting out of control, ensures that participating terminals can exit smoothly, and improves the stability and management capabilities of the video conference.
Smart Images

Figure CN115278213B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network technology, and in particular to a disconnection detection method, a server, an electronic device and a storage medium. Background Art
[0002] With the rapid development of network technology, two-way communications such as video conferencing and video teaching have become widely popular in users' lives, work, and study.
[0003] Take video conferencing as an example. Video conferencing refers to a meeting where people in two or more locations have face-to-face conversations through communication equipment and the Internet. Depending on the number of participating locations, video conferencing can be divided into point-to-point conferencing and multi-point conferencing.
[0004] As the scale of video conferences continues to increase, large-scale video conferences usually include multiple venues. However, in the prior art, when the cascade between servers in different venues is disconnected due to network or other reasons, it is impossible to detect the server disconnection of the venue in time. Summary of the invention
[0005] In view of the above problems, embodiments of the present invention are proposed to provide a disconnection detection method, a server, an electronic device and a storage medium that overcome the above problems or at least partially solve the above problems.
[0006] In a first aspect, an embodiment of the present invention discloses a disconnection detection method, which is applied to a first server, and the method includes:
[0007] sending a first heartbeat signal to a second server at a fixed time; the first heartbeat signal is used to trigger the second server to send a second heartbeat signal to the first server when receiving the first heartbeat signal;
[0008] Receiving the second heartbeat signal sent by the second server;
[0009] When the second heartbeat signal is not received, it is determined whether the second server is offline based on a preset first offline condition.
[0010] Optionally, the first heartbeat signal is further used to instruct the second server to determine whether the second server is offline based on a preset second offline condition when the first heartbeat signal is not received.
[0011] Optionally, judging whether the second server is offline based on a preset first offline condition includes: obtaining second statistical information of the second heartbeat signal; and determining that the second server is offline if it is judged that the second statistical information satisfies the first offline condition.
[0012] Optionally, there are at least two second servers; the timing of sending the first heartbeat signal to the second server includes: timing generating a first heartbeat signal including a second server identifier, and storing the first heartbeat signal in a heartbeat pool; using a preset heartbeat thread to timingly extract the first heartbeat signal from the heartbeat pool, and distributing the first heartbeat signal to the corresponding second server according to the second server identifier.
[0013] In a second aspect, an embodiment of the present invention discloses a disconnection detection method, which is applied to a second server, and the method includes:
[0014] Receiving a first heartbeat signal periodically sent by a first server;
[0015] When receiving the first heartbeat signal, sending a second heartbeat signal to the first server;
[0016] When the first heartbeat signal is not received, it is determined whether the second server is offline based on a preset second offline condition.
[0017] Optionally, the second heartbeat signal is used to instruct the first server to determine whether the second server is offline based on a preset first offline condition when the second heartbeat signal is not received.
[0018] In a third aspect, an embodiment of the present invention discloses a server, wherein the server is a first server, and the first server includes:
[0019] A first sending module, configured to periodically send a first heartbeat signal to a second server; the first heartbeat signal is configured to trigger the second server to send a second heartbeat signal to the first server upon receiving the first heartbeat signal;
[0020] A first receiving module, used for receiving the second heartbeat signal sent by the second server;
[0021] The first judging module is used to judge whether the second server is offline based on a preset first offline condition when the first receiving module does not receive the second heartbeat signal.
[0022] Optionally, the first heartbeat signal is further used to instruct the second server to determine whether the second server is offline based on a preset second offline condition when the first heartbeat signal is not received.
[0023] Optionally, the first judgment module is specifically used to obtain second statistical information of the second heartbeat signal; and determine that the second server is offline when it is determined that the second statistical information meets the second offline condition.
[0024] Optionally, there are at least two second servers; the first sending module is specifically used to periodically generate a first heartbeat signal including a second server identifier, and store the first heartbeat signal in a heartbeat pool; use a preset heartbeat thread to periodically extract the first heartbeat signal from the heartbeat pool, and distribute the first heartbeat signal to the corresponding second server according to the second server identifier.
[0025] In a fourth aspect, an embodiment of the present invention discloses a server, wherein the server is a second server, and the second server includes:
[0026] A second receiving module is used to receive a first heartbeat signal regularly sent by the first server;
[0027] A second sending module, configured to send a second heartbeat signal to the first server when the second receiving module receives the first heartbeat signal;
[0028] The second judging module is used to judge whether the second server is offline based on a preset second offline condition when the second receiving module does not receive the first heartbeat signal.
[0029] Optionally, the second heartbeat signal is used to instruct the first server to determine whether the second server is offline based on a preset first offline condition when the second heartbeat signal is not received.
[0030] In a fifth aspect, an embodiment of the present invention discloses an electronic device, comprising: one or more processors; and one or more machine-readable media having instructions stored thereon; when the instructions are executed by the one or more processors, the processors execute any one of the above disconnection detection methods executed by the first server, or execute any one of the above disconnection detection methods executed by the second server.
[0031] In a sixth aspect, an embodiment of the present invention discloses a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above disconnection detection methods executed by the first server, or implements any of the above disconnection detection methods executed by the second server.
[0032] In an embodiment of the present invention, the first server periodically sends a first heartbeat signal to the second server; when the second server receives the first heartbeat signal, it sends a second heartbeat signal to the first server; the first server receives the second heartbeat signal sent by the second server, and when the second heartbeat signal is not received, it determines whether the second server is offline based on a preset first offline condition. It can be seen that in an embodiment of the present invention, the first server and the second server both send heartbeat signals to each other, and the heartbeat signals are sent bidirectionally. Therefore, the first server can detect whether the second server is offline based on the heartbeat signal sent by the second server, thereby being able to detect whether the second server is offline more timely and accurately. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 It is a schematic diagram of a system architecture of an embodiment of the present invention.
[0034] Figure 2 The present invention is a flowchart of a method for detecting a disconnection in accordance with an embodiment of the present invention.
[0035] Figure 3 The present invention is a flowchart of another method for detecting disconnection according to an embodiment of the present invention.
[0036] Figure 4 is a schematic diagram of another system architecture of an embodiment of the present invention.
[0037] Figure 5 The present invention is a flowchart of another method for detecting disconnection according to an embodiment of the present invention.
[0038] Figure 6 This is a structural block diagram of a first server according to an embodiment of the present invention.
[0039] Figure 7 It is a structural block diagram of a second server according to an embodiment of the present invention. DETAILED DESCRIPTION
[0040] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0041] Reference Figure 1 , which shows a schematic diagram of a system architecture of an embodiment of the present invention. Figure 1 As shown, the video conference includes a first server and a second server, and the first server and the second server can perform two-way communication. A two-way heartbeat signal is added between the first server and the second server, that is, the first server sends a heartbeat signal to the second server, and the second server also sends a heartbeat signal to the first server, so that the first server and the second server can both detect whether the second server is offline according to the heartbeat signal sent by the other party.
[0042] The offline detection method in the embodiment of the present invention is described in detail below through the following embodiments.
[0043] Reference Figure 2 , shows a flow chart of the steps of a disconnection detection method according to an embodiment of the present invention. The disconnection detection method according to the embodiment of the present invention can be applied to the first server.
[0044] like Figure 2 As shown, the offline detection method may include the following steps:
[0045] Step 201: The first server periodically sends a first heartbeat signal to the second server.
[0046] When the video conference starts, the first server, as the initiator of the heartbeat signal, sends the first heartbeat signal to the second server at a fixed time. The time interval for sending the first heartbeat signal can be set according to actual experience, and this embodiment does not limit this. For example, the time interval can be set to 3 seconds, 5 seconds, etc.
[0047] In an optional implementation, considering that the first server can conduct video conferences with at least two second servers, the frequency of sending and receiving heartbeat signals by the first server is very high. Therefore, in order to facilitate unified management of heartbeat signals and reduce the impact on other services in the first server, a separate heartbeat thread can be set in the first server, and the heartbeat thread can be used to uniformly manage heartbeat signals.
[0048] In this way, the first server can generate a first heartbeat signal at a fixed time and store the first heartbeat signal in a heartbeat pool (heartbeat map). Exemplarily, the first heartbeat signal may include but is not limited to: a first server identifier (a sender of the first heartbeat signal), a second server identifier (a destination of the first heartbeat signal), a signal type (heartbeat signal), and the like. The identifier may be information that can uniquely represent a server, such as an ID, a MAC (Media Access Control) address, and the like.
[0049] The heartbeat thread is used to periodically scan the heartbeat pool, extract the first heartbeat signal from the heartbeat pool, parse the extracted first heartbeat signal, and obtain the second server identifier contained therein. The heartbeat thread distributes the first heartbeat signal to the second server corresponding to the second server identifier according to the second server identifier.
[0050] The first heartbeat signal is used to trigger the second server to send a second heartbeat signal to the first server when the first heartbeat signal is received. Therefore, for any second server, the second server will send the second heartbeat signal to the first server only when it receives the first heartbeat signal sent by the first server, and will not send the second heartbeat signal to the first server when the first heartbeat signal sent by the first server is not received. Exemplarily, the second heartbeat signal may include, but is not limited to: a second server identifier (a sending end of the second heartbeat signal), a first server identifier (a destination end of the second heartbeat signal), a signal type (heartbeat signal), and the like.
[0051] Step 202: The first server receives a second heartbeat signal sent by the second server.
[0052] After receiving a second heartbeat signal, the first server parses the received second heartbeat signal to obtain the second server identifier contained therein, and thus can know which second server sent the second heartbeat signal.
[0053] Step 203: When the first server does not receive the second heartbeat signal, the first server determines whether the second server is offline based on a preset first offline condition.
[0054] For any second server, when the first server does not receive the second heartbeat signal sent by the second server, it can determine whether the second server is offline based on a preset first offline condition.
[0055] Exemplarily, the process of determining whether the second server is offline based on a preset first offline condition may include: obtaining second statistical information of the second heartbeat signal; and determining that the second server is offline if it is determined that the second statistical information satisfies the first offline condition.
[0056] Optionally, the process in which the first server determines whether the second server is offline can be executed by using the heartbeat thread in the first server.
[0057] In an optional implementation, the second statistical information of the second heartbeat signal may be the duration of not receiving the second heartbeat signal sent by the second server, and the duration may be the first duration from the time point of sending the first heartbeat signal sent to the second server for the last time to the current time point. The first offline condition may be that the second statistical information of the second heartbeat signal exceeds the first duration threshold.
[0058] In this case, for any second server, when the first server does not receive the second heartbeat signal sent by the second server, the first server can count the first duration from the sending time point of the first heartbeat signal sent to the second server for the last time to the current time point, if the second heartbeat signal sent by the second server is not received after the first duration exceeds the first duration threshold, the first server can determine that the second server is offline. For the above-mentioned first duration threshold, it can be set according to actual experience, and this embodiment does not limit this. For example, the first duration threshold can be set to 30 seconds, 1 minute, etc.
[0059] In another optional implementation, the second statistical information of the second heartbeat signal may be the number of consecutive times that the second heartbeat signal sent by the second server is not received. The first offline condition may be that the second statistical information of the second heartbeat signal exceeds a preset number of times.
[0060] For any second server, the first server can set a first heartbeat sequence value local_heart_seq and a second heartbeat sequence value rec_heart_seq for the second server. The first heartbeat sequence value is used to indicate the number of times the first server has sent a first heartbeat signal to the second server, and the second heartbeat sequence value is used to indicate the number of times the first server has received a second heartbeat signal sent by the second server. Each time the first server generates a first heartbeat signal corresponding to the second server, the first server adds 1 to the first heartbeat sequence value, and can add the first heartbeat sequence value to the first heartbeat signal sent to the second server. Each time the first server receives a second heartbeat signal sent by the second server, the first server adds 1 to the second heartbeat sequence value.
[0061] In this way, for any second server, when the first server does not receive the second heartbeat signal sent by the second server, it can calculate the difference between the first heartbeat sequence value and the second heartbeat sequence value, and the difference is used to indicate the number of consecutive times that the first server has not received the second heartbeat signal returned by the second server. Therefore, if the difference exceeds the preset number of times, the first server can determine that the second server is offline. The above-mentioned preset number of times can be set according to actual experience, and this embodiment does not limit this. For example, the preset number of times can be set to 4, 5, 6, and so on.
[0062] For any second server, when the first server receives the second heartbeat signal sent by the second server, the first server may continue to execute the above step 201.
[0063] In an embodiment of the present invention, the first server and the second server both send heartbeat signals to each other, and the heartbeat signals are sent bidirectionally. Therefore, the first server can detect whether the second server is offline based on the heartbeat signal sent by the second server, thereby being able to detect whether the second server is offline more timely and accurately.
[0064] Reference Figure 3 , shows a flow chart of steps of another offline detection method according to an embodiment of the present invention. The offline detection method according to the embodiment of the present invention can be applied to the second server.
[0065] like Figure 3 As shown, the offline detection method may include the following steps:
[0066] Step 301: The second server receives a first heartbeat signal regularly sent by the first server.
[0067] Step 302: When receiving the first heartbeat signal, the second server sends a second heartbeat signal to the first server.
[0068] After receiving the first heartbeat signal sent by the first server, the second server parses the first heartbeat signal to obtain the second server identifier contained therein, and after verifying that the second server identifier is the identifier of the second server itself, a second heartbeat signal can be generated and returned to the first server. Exemplarily, the second heartbeat signal may include, but is not limited to: the second server identifier (the sending end of the second heartbeat signal), the first server identifier (the destination end of the second heartbeat signal), the signal type (heartbeat signal), and the like.
[0069] In an optional implementation, considering that the second server has a high frequency of sending and receiving heartbeat signals, similar to the first server, a separate heartbeat thread can be set in the second server, and the heartbeat signal can be managed uniformly by the heartbeat thread. In this way, the second server parses the first heartbeat signal, and generates and sends the second heartbeat signal using the heartbeat thread.
[0070] Step 303: When the second server does not receive the first heartbeat signal, the second server determines whether the second server is offline based on a preset second offline condition.
[0071] When the second server does not receive the first heartbeat signal sent by the first server, the second server can determine whether the second server itself is offline based on a preset second offline condition.
[0072] Exemplarily, the process of determining whether the second server is offline based on a preset second offline condition may include: obtaining first statistical information of the first heartbeat signal; and determining that the second server is offline when it is determined that the first statistical information satisfies the second offline condition.
[0073] Optionally, the process of the second server determining whether the second server is offline may be performed by utilizing the heartbeat thread in the second server.
[0074] In an optional implementation, the first statistical information of the first heartbeat signal may be the duration of not receiving the first heartbeat signal sent by the first server, and the duration may be the second duration from the last time the first heartbeat signal sent by the first server was received to the current time point. The second offline condition may be that the second statistical information of the first heartbeat signal exceeds a second duration threshold.
[0075] In this case, when the second server does not receive the first heartbeat signal sent by the first server, the second server can count the second duration from the receiving time point of the first heartbeat signal sent by the first server to the current time point when the first heartbeat signal is received for the last time, if the next first heartbeat signal sent by the first server is not received after the second duration exceeds the second duration threshold, the second server can determine that it is offline. For the above-mentioned second duration threshold, it can be set according to actual experience, and the present embodiment does not limit this. For example, the second duration threshold can be set to 30 seconds, 1 minute, etc.
[0076] In the embodiment of the present invention, the first server and the second server both send heartbeat signals to each other, and the heartbeat signals are sent bidirectionally. Therefore, the second server can detect whether the second server is offline based on the heartbeat signal sent by the first server, thereby being able to detect whether the second server is offline more timely and accurately.
[0077] Next, the offline detection method according to the embodiment of the present invention is described from the perspective of the overall interaction between the first server and the second server.
[0078] The offline detection method of the embodiment of the present invention can be applied to a video conference, wherein the video conference can be a video conference on the Internet or a video conference on a video network.
[0079] In a large-scale video conference, there are usually multiple conference rooms, each of which is controlled by its own corresponding server, and the servers can communicate with each other through IP (Internet Protocol) cascading, and specifically can share information through Socket.
[0080] The following will take video conferencing in a visual network as an example for explanation.
[0081] Visual networking is a real-time high-speed transmission network based on Ethernet hardware, which is used to transmit high-definition video and dedicated protocols. Video conferencing in visual networking involves the following parts.
[0082] Cross-autonomous conference: Each autonomous server corresponds to a conference management server. When the terminals under multiple autonomous servers are pulled to hold a conference, a cross-autonomous conference is started. The principle is that the main conference management server of the main venue under the main autonomous server pulls the terminals of the autonomous server to hold a conference, and sends the terminal information of the branch autonomous server to the branch conference management server of the branch venue through IP cascading to pull the branch venue meeting. The venues share information through Socket to realize the cross-autonomous conference function.
[0083] Meeting management server: also known as the meeting management and scheduling system, responsible for meeting control logic processing. The system is divided into two parts: meeting management Web (front-end page) and meeting management scheduling (back-end program, also known as meeting management server). Meeting management Web is a Java program used to display the status of the current meeting, user management, appointment management and other functions; meeting management scheduling is a C++ program responsible for the control and management of the meeting, interacting with the autonomous server to control signaling, and realizing a series of meeting business operations such as starting / stopping meetings, speaker switching, and dynamically adding and deleting participants.
[0084] Autonomous server: A program that controls the core server of the visual network to perform conference operations such as organizing and controlling meetings through the visual network protocol.
[0085] Conference control software: Conference control management software based on video networking installed on the PC (Personal Computer). The operator uses the conference control software to click on a series of conference operations such as starting a meeting, stopping a meeting, switching speakers, etc. The conference control software sends the corresponding video networking instructions to the conference management dispatcher.
[0086] In a cross-autonomous conference in a visual network, if the cascade link network between the main venue and the branch venue is disconnected or for other reasons, the branch venue's branch management server will be offline, causing the branch venue's conference to lose control, resulting in the branch venue's participant terminals being unable to exit the cross-autonomous conference. In response to this situation, in an embodiment of the present invention, it is proposed that the main conference management server of the main venue and the branch venue's branch management server interact with each other in a two-way manner (the conference heartbeat signal is the heartbeat signal in the above embodiment) so as to more promptly determine whether the branch venue's branch management server is offline, and then promptly release the branch venue's participant terminals so that they can exit the cross-autonomous conference and avoid the conference from getting out of control.
[0087] In this embodiment, the main meeting management server serves as the first server, and the branch meeting management server serves as the second server.
[0088] Reference Figure 4 , shows a schematic diagram of another system architecture of an embodiment of the present invention. Figure 4 As shown, the video conference includes a main conference management server and multiple branch conference management servers, and the main conference management server and each branch conference management server can perform two-way communication. The main conference management server is connected to the main autonomous server, and each branch conference management server is connected to the branch autonomous server respectively.
[0089] A connection heartbeat signal is set between the main conference management server and each branch conference management server. The connection heartbeat signal is used to maintain the connection between the main conference management server and the branch conference management server. The video conference cannot be located based on the connection heartbeat signal. However, since there may be multiple video conferences between the main conference management server and the branch conference management server, a two-way conference heartbeat signal is also added between the main conference management server and each branch conference management server (the conference heartbeat signal is the heartbeat signal in the above embodiment). The conference heartbeat signal corresponds to the video conference, that is, a cross-autonomous video conference maintains a two-way conference heartbeat signal.
[0090] Reference Figure 5 , shows a step flow chart of another offline detection method according to an embodiment of the present invention.
[0091] like Figure 5 As shown, the offline detection method may include the following steps:
[0092] Step 501: The main conference management server sends a first conference heartbeat signal to the branch conference management server at a fixed time (the first conference heartbeat signal is the first heartbeat signal in the above embodiment).
[0093] In this embodiment, considering that there may be multiple video conferences between the main conference management server and the branch conference management server, the main conference management server can obtain the conference global identifier of the video conference being held between any branch conference management server and the main conference management server, and add the conference global identifier to the first conference heartbeat signal sent to the branch conference management server. The conference global identifier is used to uniquely identify a video conference.
[0094] Therefore, in this embodiment, the first conference heartbeat signal may include but is not limited to: the main conference management server identifier (the sending end of the first conference heartbeat signal), the branch management server identifier (the destination end of the first conference heartbeat signal), the conference global identifier, the signal type (conference heartbeat signal), etc. Among them, the main conference management server identifier can be the main conference management server autonomous prefix, the branch management server identifier can be the branch management server autonomous prefix, etc.
[0095] Step 502: The branch conference management server receives the first conference heartbeat signal regularly sent by the main conference management server.
[0096] Step 503: Check whether the branch meeting management server receives the first meeting heartbeat signal. If yes, execute step 504; if no, execute step 509.
[0097] Step 504: upon receiving the first conference heartbeat signal, the branch conference management server sends a second conference heartbeat signal to the main conference management server (the second conference heartbeat signal is the second heartbeat signal in the above embodiment).
[0098] Similar to the above-mentioned first conference heartbeat signal, in this embodiment, the second conference heartbeat signal may include but is not limited to: the branch meeting management server identifier (the sending end of the second conference heartbeat signal), the main meeting management server identifier (the destination end of the second conference heartbeat signal), the conference global identifier, the signal type (conference heartbeat signal), and the like.
[0099] Step 505: The main conference management server receives the second conference heartbeat signal sent by the branch conference management server.
[0100] Step 506: Check whether the primary conference management server receives the second conference heartbeat signal. If not, execute step 507; if not, return to step 501.
[0101] Step 507 : When the main conference management server does not receive the second conference heartbeat signal, it determines whether the branch conference management server is offline based on the preset first offline condition. If yes, execute step 508 ; if no, return to step 501 .
[0102] Step 508: In response to the branch meeting management server being offline, the main meeting management server releases the participating terminals that have joined the meeting corresponding to the conference global identifier under the branch meeting management server based on the conference global identifier.
[0103] After determining that a branch management server is offline, the main conference management server obtains the conference global identifier corresponding to the branch management server. Exemplarily, the global conference identifier can be obtained from the first conference heartbeat signal sent to the branch management server, or from the second conference heartbeat signal received from the branch management server. When the main conference management server determines that the conference corresponding to the conference global identifier is in a meeting state, it can release the branch management server and join the participating terminals of the conference corresponding to the conference global identifier. Therefore, it can be ensured that when an abnormality occurs in the cascade between the main conference management server and the branch management server, the terminals of the branch venue can smoothly exit the video conference to avoid the branch venue from getting out of control.
[0104] In an optional implementation, since the connection between the main conference management server and the branch conference management server is disconnected, the main conference management server can no longer communicate with the branch conference management server. Therefore, the main autonomous server connected to the main conference management server can communicate with the branch autonomous server connected to the branch conference management server to achieve the purpose of releasing the participating terminals that join the conference corresponding to the global identifier of the conference under the branch conference management server.
[0105] In this case, the main conference management server generates a conference stop instruction and sends the conference stop instruction to the main autonomous server to which it is connected. Exemplarily, the conference stop instruction may include but is not limited to: the above-mentioned conference global identifier, the main conference management server identifier, the branch conference management server identifier, the branch autonomous server identifier connected to the branch conference management server (the branch autonomous server identifier may be the visual network number of the branch autonomous server), etc.
[0106] After receiving the conference stop instruction, the main autonomous server sends the conference stop instruction to the visual network core server through the visual network.
[0107] The visual network core server forwards the conference stop instruction to the sub-autonomous server connected to the branch management server based on the branch management server identifier, the sub-autonomous server identifier connected to the branch management server and other information contained in the conference stop instruction.
[0108] After receiving the conference stop instruction, the sub-autonomous server releases the participating terminals that have joined the conference corresponding to the conference global identifier under the sub-conference management server based on the conference global identifier contained in the conference stop instruction.
[0109] Step 509: When the branch meeting management server does not receive the first conference heartbeat signal, the branch meeting management server determines whether the branch meeting management server is offline based on a preset second offline condition. If yes, execute step 510; if no, return to step 502.
[0110] Step 510: In response to the branch meeting management server being offline, the branch meeting management server releases the participating terminals that have joined the meeting corresponding to the conference global identifier under the branch meeting management server based on the conference global identifier.
[0111] After determining that it is offline, the branch management server obtains the corresponding conference global identifier. Exemplarily, the global conference identifier can be obtained from the first conference heartbeat signal received from the main conference management server. When the branch management server determines that the conference corresponding to the conference global identifier is in a meeting state, the branch management server can release the participating terminals of the conference corresponding to the conference global identifier under the branch management server. Therefore, it can be ensured that when an abnormality occurs in the cascade between the main conference management server and the branch management server, the terminal of the branch venue can smoothly exit the video conference to avoid the branch venue from getting out of control.
[0112] In an optional implementation, the branch meeting management server generates a conference stop instruction and sends the conference stop instruction to the branch autonomous server connected to it. Exemplarily, the conference stop instruction may include but is not limited to: the above-mentioned conference global identifier, the branch meeting management server identifier, and so on.
[0113] After receiving the conference stop instruction, the sub-autonomous server releases the participating terminals that have joined the conference corresponding to the conference global identifier under the sub-conference management server based on the conference global identifier contained in the conference stop instruction.
[0114] In an optional implementation, in a cross-autonomous conference, the main conference management server can uniformly manage the participating terminals under each branch conference management server, and can autonomously obtain the participating status of the participating terminals. For example, the main conference management server can maintain a list of participating terminals in the current cross-autonomous conference, which may include information such as the participating status of the participating terminals, and the participating status may include participating in the conference, withdrawing from the conference, etc. When a participating terminal withdraws from the conference, the main conference management server autonomously obtains the withdrawal status of the participating terminal, and then updates the participating status of the participating terminal in the list.
[0115] Therefore, when the branch management server determines that it is offline and releases the participating terminals that joined the meeting, the main meeting management server can obtain the exit status of the participating terminals released by the branch management server, and the main meeting management server can also determine that the branch management server is offline. Therefore, the main meeting management server can determine that these participating terminals exited the meeting due to the branch management server being offline, thereby accurately knowing the meeting status and facilitating the management of the meeting.
[0116] In an embodiment of the present invention, the first server and the second server both send heartbeat signals to each other, and the heartbeat signals are sent bidirectionally. Therefore, the first server and the second server can both detect whether the second server is offline based on the heartbeat signals sent by the other party, thereby being able to detect whether the second server is offline more timely and accurately.
[0117] In an embodiment of the present invention, a server is further provided, and the server serves as a first server.
[0118] Reference Figure 6 , shows a structural block diagram of a first server in an embodiment of the present invention.
[0119] like Figure 6 As shown, the first server may include the following modules:
[0120] A first sending module 601 is used to periodically send a first heartbeat signal to a second server; the first heartbeat signal is used to trigger the second server to send a second heartbeat signal to the first server when receiving the first heartbeat signal;
[0121] A first receiving module 602, configured to receive the second heartbeat signal sent by the second server;
[0122] The first judging module 603 is configured to judge whether the second server is offline based on a preset first offline condition when the first receiving module does not receive the second heartbeat signal.
[0123] Optionally, the first heartbeat signal is further used to instruct the second server to determine whether the second server is offline based on a preset second offline condition when the first heartbeat signal is not received.
[0124] Optionally, the first judgment module 603 is specifically used to obtain second statistical information of the second heartbeat signal; if it is judged that the second statistical information meets the second offline condition, determine that the second server is offline.
[0125] Optionally, there are at least two second servers; the first sending module 601 is specifically used to periodically generate a first heartbeat signal including a second server identifier, and store the first heartbeat signal in a heartbeat pool; use a preset heartbeat thread to periodically extract the first heartbeat signal from the heartbeat pool, and distribute the first heartbeat signal to the corresponding second server according to the second server identifier.
[0126] In an embodiment of the present invention, a server is further provided, and the server serves as a second server.
[0127] Reference Figure 7 , shows a structural block diagram of a second server in an embodiment of the present invention.
[0128] like Figure 7 As shown, the second server may include the following modules:
[0129] The second receiving module 701 is used to receive a first heartbeat signal regularly sent by the first server;
[0130] A second sending module 702, configured to send a second heartbeat signal to the first server when the second receiving module receives the first heartbeat signal;
[0131] The second judgment module 703 is used to judge whether the second server is offline based on a preset second offline condition when the second receiving module does not receive the first heartbeat signal.
[0132] Optionally, the second heartbeat signal is used to instruct the first server to determine whether the second server is offline based on a preset first offline condition when the second heartbeat signal is not received.
[0133] In an embodiment of the present invention, the first server and the second server both send heartbeat signals to each other, and the heartbeat signals are sent bidirectionally. Therefore, the first server and the second server can both detect whether the second server is offline based on the heartbeat signals sent by the other party, thereby being able to detect whether the second server is offline more timely and accurately.
[0134] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0135] In an embodiment of the present invention, an electronic device is further provided. The electronic device may include one or more processors, and one or more machine-readable media storing instructions thereon, the instructions being, for example, application programs. When the instructions are executed by the one or more processors, the processors execute any of the above disconnection detection methods executed by the first server, or execute any of the above disconnection detection methods executed by the second server.
[0136] In an embodiment of the present invention, a non-temporary computer-readable storage medium is further provided, on which a computer program is stored, and the program can be executed by a processor of an electronic device to implement any of the above disconnection detection methods performed by the first server, or to implement any of the above disconnection detection methods performed by the second server. For example, the non-temporary computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0137] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0138] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0139] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks 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 terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal 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.
[0140] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including 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.
[0141] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement 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.
[0142] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0143] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0144] The above is a detailed introduction to a disconnection detection method, server, electronic device and storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A disconnection detection method, characterized in that: Applied to a first server, the method includes: the first server includes a main meeting management server, and the second server includes a branch meeting management server; sending a first heartbeat signal to a second server at a fixed time; the first heartbeat signal is used to trigger the second server to send a second heartbeat signal to the first server when receiving the first heartbeat signal; the first heartbeat signal includes a conference global identifier, and the conference global identifier is used to identify an ongoing conference between the first server and the second server; Receiving the second heartbeat signal sent by the second server; When the second heartbeat signal is not received, judging whether the second server is offline based on the preset first offline condition, if the second server is offline, releasing the participating terminals that have joined the conference corresponding to the conference global identifier under the second server; the first offline condition includes that the number of consecutive times that the second heartbeat signal has not been received exceeds a preset number; There are at least two second servers; and the step of sending the first heartbeat signal to the second servers at a fixed time includes: Regularly generate a first heartbeat signal including a second server identifier, and store the first heartbeat signal in a heartbeat pool; The first heartbeat signal is extracted from the heartbeat pool periodically using a preset heartbeat thread, and the first heartbeat signal is distributed to the corresponding second server according to the second server identifier.
2. The method according to claim 1, characterized in that The first heartbeat signal is further used to instruct the second server to determine whether the second server is offline based on a preset second offline condition when the first heartbeat signal is not received.
3. The method according to claim 1, characterized in that The determining whether the second server is offline based on a preset first offline condition includes: Acquire second statistical information of the second heartbeat signal; When it is determined that the second statistical information satisfies the first offline condition, it is determined that the second server is offline.
4. A disconnection detection method, characterized in that: Applied to the second server, the method includes: the first server includes a main meeting management server, and the second server includes a branch meeting management server; Receiving a first heartbeat signal periodically sent by a first server; the first heartbeat signal includes a conference global identifier, and the conference global identifier is used to identify an ongoing conference between the first server and the second server; There are at least two second servers; the first server is used to periodically generate a first heartbeat signal including a second server identifier, and store the first heartbeat signal in a heartbeat pool; the first heartbeat signal is periodically extracted from the heartbeat pool using a preset heartbeat thread, and the first heartbeat signal is distributed to the corresponding second server according to the second server identifier; When receiving the first heartbeat signal, sending a second heartbeat signal to the first server; When the first heartbeat signal is not received, determine whether the second server is offline based on a preset second offline condition; if the second server is offline, release the participating terminals that have joined the conference corresponding to the conference global identifier under the second server; the second offline condition includes that the first heartbeat signal has not been received for more than a preset number of consecutive times.
5. The method according to claim 4, characterized in that The second heartbeat signal is used to instruct the first server to determine whether the second server is offline based on a preset first offline condition when the first server does not receive the second heartbeat signal.
6. A server, characterized in that: The server is a first server, and the first server includes: the first server includes a main meeting management server, and the second server includes a branch meeting management server; A first sending module, configured to periodically send a first heartbeat signal to a second server; the first heartbeat signal is configured to trigger the second server to send a second heartbeat signal to the first server upon receiving the first heartbeat signal; the first heartbeat signal includes a conference global identifier, and the conference global identifier is configured to identify an ongoing conference between the first server and the second server; A first receiving module, used for receiving the second heartbeat signal sent by the second server; A first judgment module is used to judge whether the second server is offline based on a preset first offline condition when the first receiving module does not receive the second heartbeat signal, and if the second server is offline, release the participating terminals that have joined the conference corresponding to the conference global identifier under the second server; the first offline condition includes that the number of consecutive times that the second heartbeat signal has not been received exceeds a preset number; There are at least two second servers; the first sending module is specifically used to periodically generate a first heartbeat signal including a second server identifier, and store the first heartbeat signal in a heartbeat pool; use a preset heartbeat thread to periodically extract the first heartbeat signal from the heartbeat pool, and distribute the first heartbeat signal to the corresponding second server according to the second server identifier.
7. A server, characterized in that: The server is a second server, and the second server includes: A second receiving module is used to receive a first heartbeat signal regularly sent by a first server; the first server includes a main meeting management server, and the second server includes a branch meeting management server; A second sending module, configured to send a second heartbeat signal to the first server when the second receiving module receives the first heartbeat signal; the first heartbeat signal includes a conference global identifier, and the conference global identifier is used to identify an ongoing conference between the first server and the second server; A second judgment module is used to judge whether the second server is offline based on a preset second offline condition when the second receiving module does not receive the first heartbeat signal. If the second server is offline, the participating terminals that have joined the conference corresponding to the conference global identifier under the second server are released; the second offline condition includes that the first heartbeat signal has not been received for a consecutive number of times exceeding a preset number; there are at least two second servers; the first server is used to periodically generate a first heartbeat signal including a second server identifier, and store the first heartbeat signal in a heartbeat pool; use a preset heartbeat thread to periodically extract the first heartbeat signal from the heartbeat pool, and distribute the first heartbeat signal to the corresponding second server according to the second server identifier;.
8. An electronic device, characterized in that: include: one or more processors; and one or more machine-readable media having instructions stored thereon; When the instruction is executed by the one or more processors, the processors execute the offline detection method according to any one of claims 1 to 3, or execute the offline detection method according to any one of claims 4 to 5.
9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the program is executed by a processor, the method for detecting disconnection according to any one of claims 1 to 3 is implemented, or the method for detecting disconnection according to any one of claims 4 to 5 is implemented.
Citation Information
Patent Citations
Log collection system and method
CN106777371A
