Multicast management method and system, electronic equipment and storage medium

By configuring and monitoring two multicast sources in the multicast system, seamless switching of multicast streams is achieved, and service interruption caused by failure of a single multicast source is solved, and the stability and reliability of multicast stream transmission is improved.

CN119135461APending Publication Date: 2024-12-13GALAXY INTERNET TELEVISION (ZHEJIANG) CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411556842.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-04
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

In the multicast system, when a hardware or software failure occurs in a single multicast source, the multicast service will be unavailable, resulting in business interruption and affecting business stability.

Method used

By configuring and monitoring two multicast sources, one multicast source is set to a high priority node and the other multicast source is set to a low priority node, monitoring the operating status and switching multicast streaming when a failure occurs, ensuring that the service continues Stablize.

Benefits of technology

The continuous stability and reliability of multicast streaming services are achieved, and the risk of service interruption caused by failure of a single multicast source is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119135461A_ABST
    Figure CN119135461A_ABST
Patent Text Reader

Abstract

The invention provides a multicast management method and system, electronic equipment and a storage medium, and relates to the technical field of multicast streaming media. The multicast management method is applied to a first multicast source and a second multicast source, the first multicast source and the second multicast source both send multicast streams, and the method comprises the following steps: obtaining configuration information, the configuration information comprises information for setting the first multicast source as a high-priority node and information for setting the second multicast source as a low-priority node; setting a multicast network port corresponding to the first multicast source to be in an activated state and setting a multicast network port corresponding to the second multicast source to be in a closed state according to the configuration information; and monitoring the operation states of the first multicast source and the second multicast source. Configuration and monitoring are carried out under the condition that both the two multicast sources send the multicast streams, when one multicast source breaks down, the multicast source can be seamlessly switched to the other multicast source, and continuous stability and reliability of multicast stream transmission service are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field, and in particular to a multicast management method, system, electronic device and storage medium. Background Art

[0002] In the multicast system, each multicast source strictly follows the principle of "one multicast source, one address" and is bound to a unique multicast address. If multiple multicast sources send multicast streams to the same address, it will cause resource confusion between different multicast sources.

[0003] However, when a single multicast source sends multicast to a specified multicast address, if any hardware or software failure occurs in the multicast source, the playback service of the single multicast source will be unavailable, resulting in multicast service interruption, which will have an immeasurable impact on the service. Summary of the invention

[0004] The present invention provides a multicast management method, system, electronic device and storage medium, which are used to solve the defect of the service interruption risk caused by the unavailability of a single multicast source playback service in the prior art. By configuring and monitoring when two multicast sources both send multicast streams, when a multicast source fails, it can be seamlessly switched to another multicast source, thereby improving the continuous stability and reliability of the multicast stream transmission service.

[0005] The present invention provides a multicast management method, which is applied to a first multicast source and a second multicast source, wherein both the first multicast source and the second multicast source send multicast streams, and comprises the following steps: Acquire configuration information, where the configuration information includes information that sets the first multicast source as a high-priority node and information that sets the second multicast source as a low-priority node; According to the configuration information, the multicast network port corresponding to the first multicast source is set to be in an activated state and the multicast network port corresponding to the second multicast source is set to be in a closed state, so that the multicast network port corresponding to the first multicast source sends a multicast stream to the shared multicast environment; The running states of the first multicast source and the second multicast source are monitored, so that when the first multicast source fails, the multicast network port corresponding to the second multicast source is switched to send the multicast stream to the shared multicast environment.

[0006] According to a multicast management method provided by the present invention, the operating status includes at least one of a system operating status, a multicast network port status and a multicast outgoing status, the system operating status is used to indicate the working status of the system of the first multicast source and the second multicast source, the multicast network port status is used to indicate the working status of the multicast network ports corresponding to the first multicast source and the second multicast source, and the multicast outgoing status is used to indicate the outgoing status of the multicast stream sent by the first multicast source and the second multicast source.

[0007] According to a multicast management method provided by the present invention, the operating state includes a system operating state and a multicast network port state, the first multicast source and the second multicast source constitute a virtual routing group, and the operating state of the first multicast source and the second multicast source is monitored, including: When it is monitored that the first multicast source is running normally, periodically sending a heartbeat message to the second multicast source through the virtual routing group; When a multicast system of the first multicast source fails or a multicast network port corresponding to the first multicast source is monitored to fail, stop sending the heartbeat message to the second multicast source and set the first multicast source as a low priority node; When it is monitored that the second multicast source has not received the heartbeat message, the second multicast source is set as a high priority node, the multicast network port corresponding to the second multicast source is set to be activated, and the multicast network port corresponding to the first multicast source is set to be closed.

[0008] According to a multicast management method provided by the present invention, the operating state includes a multicast streaming state, and the monitoring of the operating states of the first multicast source and the second multicast source includes: Sending the multicast stream monitoring data corresponding to the first multicast source and the second multicast source to a service sentinel service, so that the service sentinel service stores the multicast stream monitoring data, wherein the multicast stream monitoring data is determined according to the multicast streams sent by the first multicast source and the second multicast source; Controlling the second multicast source to periodically obtain the multicast stream monitoring data; When the multicast stream monitoring data indicates that an outbound flow state of the multicast stream sent by the first multicast source fails, and an outbound flow state of the multicast stream sent by the second multicast source is normal, the second multicast source is set as a high priority node, and the multicast network port corresponding to the second multicast source is set to be in an activated state, and the multicast network port corresponding to the first multicast source is set to be in a closed state.

[0009] According to a multicast management method provided by the present invention, the multicast stream monitoring data includes first outgoing stream data and second outgoing stream data. Before sending the multicast stream monitoring data corresponding to the first multicast source and the second multicast source to the service sentinel service, the method further includes: Acquire first outgoing flow data through a first multicast flow monitoring service, and send the first outgoing flow data to the service sentinel service, wherein the first outgoing flow data is obtained by monitoring the outgoing flow of a multicast streaming program corresponding to the first multicast source; The second outgoing flow data is acquired through the second multicast flow monitoring service, and the second outgoing flow data is sent to the service sentinel service, wherein the second outgoing flow data is acquired by monitoring the outgoing flow of the multicast streaming program corresponding to the second multicast source.

[0010] According to a multicast management method provided by the present invention, the second multicast source is set as a high priority node, and the multicast network port corresponding to the second multicast source is set to be in an activated state, and the multicast network port corresponding to the first multicast source is set to be in a closed state, including: Setting the second multicast source as a high priority node and calling a notification program; The notification program calls a multicast network port control program, so that the multicast network port control program sets the multicast network port corresponding to the first multicast source to be in an activated state and sets the multicast network port corresponding to the second multicast source to be in a closed state.

[0011] The present invention also provides a multicast management system, which is applied to a first multicast source and a second multicast source, wherein both the first multicast source and the second multicast source send multicast streams, and includes the following modules: A configuration acquisition module, used to acquire configuration information, wherein the configuration information includes information that the first multicast source is set as a high-priority node and information that the second multicast source is set as a low-priority node; a network port setting module, configured to set the multicast network port corresponding to the first multicast source to be in an activated state and to set the multicast network port corresponding to the second multicast source to be in a closed state according to the configuration information, so that the multicast network port corresponding to the first multicast source sends a multicast stream to a shared multicast environment; The status monitoring module is used to monitor the running status of the first multicast source and the second multicast source, so that when the first multicast source fails, the multicast network port corresponding to the second multicast source is switched to send the multicast stream to the shared multicast environment.

[0012] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the multicast management methods described above when executing the computer program.

[0013] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the multicast management method described in any one of the above is implemented.

[0014] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the multicast management methods described above.

[0015] The multicast management method, system, electronic device and storage medium provided by the present invention perform configuration and monitoring when two multicast sources both send multicast streams, and can seamlessly switch to another multicast source when a multicast source fails, thereby improving the continuous stability and reliability of the multicast stream transmission service. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 It is a flow chart of the multicast management method provided by the present invention.

[0018] Figure 2 This is one of the flow charts of the method for monitoring the operating status provided by the present invention.

[0019] Figure 3 This is the second flow chart of the method for monitoring the operating status provided by the present invention.

[0020] Figure 4 It is a schematic diagram of the overall process of a multicast management method provided by the present invention.

[0021] Figure 5 It is a structural diagram of the multicast management system provided by the present invention.

[0022] Figure 6 It is a schematic diagram of the physical structure of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0024] In the multicast system, the video stream exists in the form of a specific multicast address, for example: udp: / / 239.39.3.150:14053. This address represents a multimedia transmission channel dedicated to this channel, which is used to carry the synchronous transmission of real-time video streams from the multicast source to the receivers of the private network. Through this address, the multicast source uses the efficient UDP protocol to efficiently push video information to many receivers under the same multicast address in a point-to-multipoint manner at one time, which greatly saves network bandwidth resources, realizes low-latency, high-availability multicast services for large-scale concurrent viewing, and provides powerful and robust technical support for large-scale online broadcast activities.

[0025] In the multicast system, each multicast source strictly follows the principle of "one multicast source, one address" and is bound to a unique multicast address. If multiple multicast sources send multicast streams to the same address, it will cause resource confusion between different multicast sources. However, when a single multicast source sends multicast to a specified multicast address, if any hardware or software failure occurs in the multicast source, the playback service of the single multicast source will be unavailable, resulting in multicast service interruption, which will have an immeasurable impact on the service.

[0026] In view of this, an embodiment of the present invention provides a multicast management method, which is applied to a first multicast source and a second multicast source, by obtaining configuration information, the configuration information includes information that the first multicast source is set as a high-priority node and information that the second multicast source is set as a low-priority node; according to the configuration information, the multicast network port corresponding to the first multicast source is set to be in an activated state and the multicast network port corresponding to the second multicast source is set to be in a closed state, so that the multicast network port corresponding to the first multicast source sends a multicast stream to a shared multicast environment; the running status of the first multicast source and the second multicast source is monitored, so that in the event of a failure of the first multicast source, the multicast network port corresponding to the second multicast source is switched to send the multicast stream to the shared multicast environment. This method can improve the continuous stability and reliability of multicast stream transmission services.

[0027] The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0028] Figure 1It is a flowchart of the multicast management method provided by the present invention. The multicast management method can be applied to a multicast system, the multicast system includes a first multicast source and a second multicast source, the first multicast source and the second multicast source both send multicast streams, the first multicast source and the second multicast source can be electronic devices, and the electronic devices can be various types of devices with information processing capabilities during implementation. For example, the electronic device can include a personal computer, a laptop computer, a PDA or a server, etc.; the electronic device can also be a mobile terminal, for example, the mobile terminal can include a mobile phone, a car computer, a tablet computer or a projector, etc. Figure 1 As shown, the method may include the following steps 101 to 103: Step 101: Acquire configuration information, where the configuration information includes information for setting the first multicast source as a high-priority node and information for setting the second multicast source as a low-priority node.

[0029] It should be noted that the method for obtaining the configuration may be configuration information input by a user, transmitted by other devices, or pre-stored information. The present invention does not limit the method for obtaining the configuration information. The first multicast source and the second multicast source are set with different priorities, and when performing multicast, a high-priority node may be used for multicasting first, thereby avoiding conflicts between multicast sources and waste of resources.

[0030] Exemplarily, the first multicast source may be installed with a main service, which is responsible for managing the multicast service of the first multicast source. The main service may be a program based on the exchange mechanism software Keepalived. The first multicast server is given a carefully customized initial state through the main service, aiming to always dominate under normal circumstances, including setting the first multicast source as a high-priority node backup. It is understandable that the main service is set as a backup node with a higher priority node (backup), which means that when there is no abnormality in the service, it naturally becomes the master node in the virtual routing group, undertakes the core routing task, and ensures the efficient guidance and transmission of the data flow. The second multicast source may be installed with a backup service, which is responsible for managing the multicast service of the second multicast source. The backup service may be a program based on Keepalived, and the backup service is initialized according to its auxiliary role, aiming to be ready to take over the responsibilities of the main service at any time and respond quickly to failures when necessary. Including setting the second multicast source as a low-priority node backup. It is understandable that the backup service is given a lower priority, which clearly defines its role as a backup node. During the normal operation of the main service, the backup service is on standby, ready to take over when the main service fails.

[0031] Step 102: according to the configuration information, the multicast network port corresponding to the first multicast source is set to be activated and the multicast network port corresponding to the second multicast source is set to be closed, so that the multicast network port corresponding to the first multicast source sends a multicast stream to the shared multicast environment.

[0032] It should be noted that there are many ways to set the multicast network port corresponding to the first multicast source to be in an activated state and the multicast network port corresponding to the second multicast source to be in a closed state according to the configuration information, for example, it can be executed by a control program or by calling other programs. The present invention does not limit the way to set the multicast network port corresponding to the first multicast source to be in an activated state and the multicast network port corresponding to the second multicast source to be in a closed state according to the configuration information. Among them, when the multicast network port corresponding to the first multicast source is in an activated state and the multicast network port corresponding to the second multicast source is set to be in a closed state, the multicast network port corresponding to the first multicast source can send a multicast stream to the shared multicast environment.

[0033] Step 103: Monitor the running status of the first multicast source and the second multicast source, so that when the first multicast source fails, switch to the multicast network port corresponding to the second multicast source to send the multicast stream to the shared multicast environment.

[0034] It should be noted that there are many ways to monitor the operating status of the first multicast source and the second multicast source, for example, the operating status can be obtained by monitoring the operating status through a monitoring program, or the operating status can be obtained by analyzing the operating status through a data analysis program, etc. The present invention does not limit the way to monitor the operating status of the first multicast source and the second multicast source.

[0035] In addition, when the operating status indicates that the first multicast source has failed, there are many ways to switch to the multicast network port corresponding to the second multicast source to send the multicast stream to the shared multicast environment, such as controlling the switching by a control program, etc. The present invention does not limit the way to switch to the multicast network port corresponding to the second multicast source to send the multicast stream to the shared multicast environment.

[0036] Exemplarily, the multicast network port control program may be used to set the multicast network port corresponding to the first multicast source to be closed, and to set the multicast network port corresponding to the second multicast source to be activated.

[0037] The method provided by the present invention builds a high-availability service for the outflow of the main and backup multicast sources, and at the same time sets the corresponding functions according to the agreement. The main multicast source is a high-priority node backup node, and the backup outflow service is a low-priority node backup node. A set of high-availability management methods suitable for dual multicast source systems is constructed. Under normal circumstances, the first multicast source provides multicast services. When the first main multicast source encounters hardware failures, software anomalies, etc., the multicast service can be seamlessly switched to the backup multicast source to maintain the continuous operation of the system. Among them, both the main and backup servers run the multicast sending program to send multicast streams, and use multicast technology to efficiently transmit information to the shared shared multicast environment. Among them, the multicast network port of the main server (the first multicast source) is in an activated state, and continues to send data stably to the shared multicast environment; while the backup server (the second multicast source) strategically closes its multicast network port to avoid conflicts with the main server or waste of resources.

[0038] In some embodiments, to ensure that the multicast services of the two servers are always in good operating condition, the system synchronously deploys and enables a set of strict monitoring programs to monitor the operating status and multicast service performance of the primary and backup servers in real time, ensure the overall robustness and stability of the high-availability system, and avoid unnecessary switching under abnormal conditions.

[0039] In an embodiment of the present invention, the operating status includes at least one of a system operating status, a multicast network port status, and a multicast outbound flow status. The system operating status is used to indicate the working status of the system of the first multicast source and the second multicast source. The multicast network port status is used to indicate the working status of the multicast network port corresponding to the first multicast source and the second multicast source. The multicast outbound flow status is used to indicate the outbound flow status of the multicast stream sent by the first multicast source and the second multicast source.

[0040] It can be understood that by monitoring at least one of the multicast system status, multicast network port status and multicast outflow status of the multicast of the first multicast source and the second multicast source, the accurate operating status corresponding to the multicast of the first multicast source and the second multicast source can be obtained, thereby improving the accuracy of status monitoring.

[0041] In some embodiments, the multicast system status and the multicast network port status may be monitored simultaneously, and whether to perform multicast network port switching may be determined according to the system operation status and the multicast network port status.

[0042] Figure 2 FIG. 1 is one of the flow charts of the method for monitoring the operating status provided by the present invention. Figure 2 As shown, the running state includes the system running state and the multicast network port state, the first multicast source and the second multicast source constitute a virtual routing group, and the monitoring of the running state of the first multicast source and the second multicast source may include: Step 201: When it is monitored that the first multicast source is running normally, a heartbeat message is periodically sent to the second multicast source through the virtual routing group; Step 202: When a multicast system of the first multicast source fails or a multicast network port corresponding to the first multicast source is monitored to fail, stop sending the heartbeat message to the second multicast source and set the first multicast source as a low priority node; Step 203: When it is monitored that the second multicast source has not received the heartbeat message, the second multicast source is set as a high priority node, the multicast network port corresponding to the second multicast source is set to be activated, and the multicast network port corresponding to the first multicast source is set to be closed.

[0043] It should be noted that the method in which the first multicast source sends a heartbeat message to the second multicast source when operating normally, stops sending heartbeat messages when the first multicast source operates normally, and the second multicast source determines whether to switch the multicast network port based on whether the heartbeat message is received can ensure the continuity and low interruption time of the multicast service.

[0044] The heartbeat message may be a heartbeat message based on Virtual Router Redundancy Protocol (VRRP).

[0045] Furthermore, setting the second multicast source as a high priority node, setting the multicast network port corresponding to the second multicast source in an activated state, and setting the multicast network port corresponding to the first multicast source in a closed state may include: setting the second multicast source as a high priority node, and calling a notification program; calling a multicast network port control program through the notification program, so that the multicast network port control program sets the multicast network port corresponding to the first multicast source in a closed state and sets the multicast network port corresponding to the second multicast source in an activated state.

[0046] It should be noted that a virtual routing group can be composed of a pair of active and standby services, both of which can work together to build a robust and efficient virtualized routing environment based on Keepalived technology. The active and standby services follow their own specific configuration principles at the beginning of the design to achieve accurate role positioning, fault detection and smooth switching, ensuring the continuous and stable operation of network services.

[0047] In addition, the present invention can use a multicast network port control program to realize the opening and closing and the opening and closing switching of the corresponding multicast network ports of the first multicast source and the second multicast source. The multicast network port control program can log in to a specific switch and manipulate the opening and closing of the corresponding multicast network port. When encountering a fault situation, it can quickly close the multicast network port of the faulty device and synchronously activate the multicast network port of the multicast source that has been promoted to the host role, thereby ensuring that the multicast service can continue seamlessly after the failover, providing users with uninterrupted high-quality services.

[0048] It is understandable that the second multicast source in the present invention operates in preemptive mode. Once the current master node is detected to have a fault, the preemption process will be started immediately, and the method of actively promoting to a new master node can ensure the continuity and low interruption time of the routing service. In addition, the first multicast source operates in non-preemptive mode, that is, after encountering a fault that causes the role to be downgraded to a backup machine, it will not actively try to reacquire the master identity unless the root cause of the fault is clearly identified and resolved. This strategy helps to prevent network jitter and resource waste caused by repeated switching for unknown reasons, and ensures that the system remains stable before the problem is completely resolved.

[0049] In addition, the first multicast source is configured to monitor the status of the multicast network port. Once a multicast network port failure is detected, the primary service will quickly trigger the service switching mechanism to ensure that when key network components fail, the routing service can be seamlessly migrated to the backup machine to maintain the connectivity and availability of the overall system. The second multicast source is configured not to track the multicast network port. In other words, considering that the multicast network port is usually closed under normal circumstances, the backup service deliberately does not track the status of such a network port to avoid misjudgment that affects the normal performance of its backup role.

[0050] In some embodiments, the multicast streaming status may be monitored, and whether to perform multicast network port switching may be determined according to the multicast streaming status.

[0051] Figure 3 FIG. 2 is a flow chart of the method for monitoring the operating status provided by the present invention. Figure 3 As shown, the running state includes a multicast streaming state, and the monitoring of the running states of the first multicast source and the second multicast source may include: Step 301: sending multicast stream monitoring data corresponding to the first multicast source and the second multicast source to a service sentinel service, so that the service sentinel service stores the multicast stream monitoring data, wherein the multicast stream monitoring data is determined according to the multicast streams sent by the first multicast source and the second multicast source; Step 302: Control the second multicast source to periodically obtain the multicast stream monitoring data; Step 303: When the multicast stream monitoring data indicates that the outgoing state of the multicast stream sent by the first multicast source fails, and the outgoing state of the multicast stream sent by the second multicast source is normal, the second multicast source is set as a high priority node, and the multicast network port corresponding to the second multicast source is set to be activated, and the multicast network port corresponding to the first multicast source is set to be closed.

[0052] It should be noted that the business sentinel service can be a third-party service independent of the master-standby multicast streaming system. The business sentinel service receives and analyzes the real-time multicast stream monitoring data reported by the first multicast source and the second multicast source. Combined with the operating status of the first multicast source and the second multicast source, it can timely increase the priority of the second multicast source, triggering it to preempt the master role and smoothly switch to the main multicast source, so as to dynamically optimize the system resource configuration and ensure service performance and stability.

[0053] Furthermore, the multicast stream monitoring data includes first outgoing stream data and second outgoing stream data. Before sending the multicast stream monitoring data corresponding to the first multicast source and the second multicast source to the business sentinel service, the method may also include: obtaining first outgoing stream data through the first multicast stream monitoring service, and sending the first outgoing stream data to the business sentinel service, wherein the first outgoing stream data is obtained by monitoring the outgoing stream status of the multicast streaming program corresponding to the first multicast source; obtaining second outgoing stream data through the second multicast stream monitoring service, and sending the second outgoing stream data to the business sentinel service, wherein the second outgoing stream data is obtained by monitoring the outgoing stream status of the multicast streaming program corresponding to the second multicast source.

[0054] It should be noted that the first multicast source and the second multicast source can output multicast streams through the multicast streaming program. Among them, the multicast streaming program can convert traditional unicast format video streams into efficient and reliable multicast formats to meet the needs of large-scale concurrent access. In particular, for the common HLS (HTTP Live Streaming) unicast stream, the program can accurately convert it into a multicast TS (Transport Stream) stream, which significantly improves the distribution efficiency and scalability of streaming media services. The core working mechanism of the multicast streaming program is to parse and utilize the PCR (Program Clock Reference), DTS (Decoding Time Stamp) or PTS (Presentation Time Stamp) timestamps in the original video stream to ensure that the video content is pushed to the multicast network on time and in an orderly manner at a precise time point and at a predetermined frequency.

[0055] In addition, the first multicast source and the second multicast source can monitor the multicast stream through the multicast stream monitoring service (the first multicast stream monitoring service and the second multicast stream monitoring service). The multicast stream monitoring service monitors the outgoing stream status of the "multicast streaming program" to timely discover and handle any abnormal situation.

[0056] The first multicast stream monitoring service and the second multicast stream monitoring service monitor the outgoing stream service status of the first multicast source and the second multicast source respectively, and report to the service sentinel service. The second multicast source decides whether to update the current node priority according to the service sentinel service result.

[0057] Exemplarily, the running state of the main service corresponding to the first multicast source in the present invention is independent of the monitoring program (multicast stream monitoring service and business sentinel service), and even if the monitoring program finds a problem, it will not trigger meaningless service switching. This is intended to prevent invalid switching due to misjudgment when both the first multicast source and the second multicast source may fail, and further enhance the robustness of the system. The backup service corresponding to the second multicast source is closely dependent on the status information provided by the monitoring program. Once the monitoring program detects a master node failure, the backup service will respond immediately and promote itself to a master node according to the preset process, filling the gap left by the failure of the main service in time to ensure the uninterrupted operation of the network service.

[0058] In summary, the first multicast source and the second multicast source provided by the present invention can be set through the primary and backup services Keepalived through a fine initial state, which not only realizes the clarity of role division, but also ensures rapid response and smooth switching in the face of various fault scenarios, and jointly builds a highly reliable and self-healing virtual routing group architecture.

[0059] The following describes an exemplary application of an embodiment of the present invention in a practical application scenario.

[0060] Figure 4 It is a schematic diagram of the overall process of a multicast management method provided by the present invention. The virtual routing group can be composed of a pair of master and backup services, both of which are based on Keepalived technology to collaboratively build a robust and efficient virtualized routing environment. The master service (Keepalived-master) and the backup service (Keepalived-backup) follow their own specific configuration principles at the beginning of the design to achieve accurate role positioning, fault detection and smooth switching, and ensure the continuous and stable operation of network services.

[0061] The primary service is given a carefully customized initial state, designed to always dominate under normal circumstances and avoid unnecessary switching under abnormal conditions: the primary service is set as a backup node with a higher priority node, which means that when there is no abnormality in the service, it naturally becomes the master node in the virtual routing group, taking on the core routing task and ensuring the efficient guidance and transmission of data flows. The backup service is initialized according to its auxiliary role, designed to be ready to take over the responsibilities of the primary service at any time and respond quickly to failures when necessary: ​​the backup service is given a lower priority, clearly defining its role as a backup node. During the normal operation of the primary service, the backup service is on standby, ready to take over the work when the primary service fails.

[0062] like Figure 4 As shown, a multicast source high availability method based on a virtual routing redundancy protocol and a system automatic degradation scenario proposed in an embodiment of the present invention are introduced as follows: Scenario 1: The main multicast source server system fails.

[0063] (1) The main multicast source server system fails, and the main service stops sending VRRP heartbeat packets.

[0064] (2) Since the backup multicast source server cannot receive the heartbeat message from the master, the backup service adjusts itself to the master node and calls the notify_master script to notify the master node.

[0065] (3) The notify_master script of the notification node calls the multicast network port interface control program to complete the switchover between the primary and standby network ports, that is, close the network port of the primary node and open the network port of the standby node.

[0066] Scenario 2: The network port of the primary multicast source server fails.

[0067] (1) When the network interface of the primary multicast source server fails, the interface monitoring script track_interface is triggered and enters the FAULT state. The primary service stops sending VRRP heartbeat packets.

[0068] (2) Because the backup multicast source server cannot receive the heartbeat message from the master, the backup service adjusts itself to the master and calls the notify_master script to notify the master node.

[0069] (3) The notify_master script of the master node is notified to call the multicast network port interface control program to complete the switchover between the primary and standby network ports, that is, to close the network port of the master node and open the network port of the standby node.

[0070] Scenario 3: The outgoing streaming program of the primary multicast source service is abnormal.

[0071] (1) The monitoring services on the primary and backup multicast streaming servers periodically report the status of their respective streaming programs.

[0072] (2) The Business Sentinel Service updates and stores the active and standby service status records based on the active and standby status.

[0073] (3) The backup outflow service regularly detects the availability of the primary and backup services through the business sentinel service under the monitoring script track_script event. When the primary service is unavailable but the backup service is available, the backup service increases its priority to be higher than the primary outflow service.

[0074] (4) After the priority is raised, the backup service preempts the VIP, triggering the call of the notify_master script to notify the master node.

[0075] (5) Notify the master node script notify_master to execute the multicast network port control program to complete the multicast network port switching between the master and standby nodes, that is, close the master node network port and open the standby node network port.

[0076] In the above-mentioned embodiment, the multicast management method based on the Virtual Router Redundancy Protocol (VRRP) application effectively avoids the risk of service interruption caused by the failure of a single multicast source server, and ensures the continuous stability and reliability of the multicast streaming transmission service.

[0077] The advantages of the solution adopted in this embodiment include: 1. A high-availability cluster of multicast source outflow service is realized, which solves the business risk caused by the failure of a single multicast source outflow service. 2. The backup multicast source outflow service is always in the multicast sending state, avoiding the initialization delay and unpredictable abnormality caused by restarting the multicast streaming program when a failure occurs. 3. The multicast network port control program realizes the closing and switching of the primary and backup outflow service multicast network ports, providing basic support for the high-availability solution.

[0078] Based on the foregoing embodiments, an embodiment of the present invention provides a multicast management system, wherein each module included in the system and each unit included in each module can be implemented by a processor; of course, they can also be implemented by a specific logic circuit; during the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA), etc.

[0079] The multicast management system provided by the present invention is described below. The multicast management system described below and the multicast management method described above can be referenced to each other.

[0080] Figure 5 Schematic diagram of the structure of the multicast management system provided by the present invention. Figure 5As shown, the system 500 includes a configuration acquisition module 501, a network port setting module 502 and a status monitoring module 503, wherein: The configuration acquisition module 501 is used to acquire configuration information, wherein the configuration information includes information for setting the first multicast source as a high priority node and information for setting the second multicast source as a low priority node; The network port setting module 502 is used to set the multicast network port corresponding to the first multicast source to be in an activated state and set the multicast network port corresponding to the second multicast source to be in a closed state according to the configuration information, so that the multicast network port corresponding to the first multicast source sends a multicast stream to the shared multicast environment; The status monitoring module 503 is used to monitor the running status of the first multicast source and the second multicast source, so that when the first multicast source fails, the multicast network port corresponding to the second multicast source is switched to send the multicast stream to the shared multicast environment.

[0081] In some embodiments, the operating status includes at least one of a system operating status, a multicast network port status, and a multicast outflow status. The system operating status is used to indicate the working status of the system of the first multicast source and the second multicast source. The multicast network port status is used to indicate the working status of the multicast network ports corresponding to the first multicast source and the second multicast source. The multicast outflow status is used to indicate the outflow status of the multicast stream sent by the first multicast source and the second multicast source.

[0082] In some embodiments, the operating state includes the system operating state and the multicast network port state, the first multicast source and the second multicast source constitute a virtual routing group, and the state monitoring module 503 includes a heartbeat sending unit, a system monitoring unit and a first switching unit, wherein: The heartbeat sending unit is used to send a heartbeat message to the second multicast source through the virtual routing group at regular intervals when monitoring that the first multicast source is running normally; The system monitoring unit is configured to stop sending the heartbeat message to the second multicast source and set the first multicast source as a low-priority node when a multicast system of the first multicast source fails or a multicast network port corresponding to the first multicast source is monitored to fail; The first switching unit is used to set the second multicast source as a high priority node, set the multicast network port corresponding to the second multicast source to an activated state, and set the multicast network port corresponding to the first multicast source to a closed state when monitoring that the second multicast source has not received the heartbeat message.

[0083] In some embodiments, the running state includes a multicast streaming state, and the state monitoring module 503 includes a data sending unit, a data acquiring unit and a second switching unit. The data sending unit is used to send the multicast stream monitoring data corresponding to the first multicast source and the second multicast source to the service sentinel service, so that the service sentinel service stores the multicast stream monitoring data, wherein the multicast stream monitoring data is determined according to the multicast streams sent by the first multicast source and the second multicast source; The data acquisition unit is used to control the second multicast source to periodically acquire the multicast stream monitoring data; The second switching unit is used to set the second multicast source as a high priority node, set the multicast network port corresponding to the second multicast source to an activated state, and set the multicast network port corresponding to the first multicast source to a closed state when the multicast stream monitoring data indicates that the outflow state of the multicast stream sent by the first multicast source fails and the outflow state of the multicast stream sent by the second multicast source is normal.

[0084] In some embodiments, the multicast stream monitoring data includes first outgoing stream data and second outgoing stream data, and the system further includes a data acquisition module, the data acquisition module being used to acquire the first outgoing stream data through a first multicast stream monitoring service, and send the first outgoing stream data to the business sentinel service, wherein the first outgoing stream data is obtained by monitoring the outgoing stream status of the multicast streaming program corresponding to the first multicast source; and acquire the second outgoing stream data through a second multicast stream monitoring service, and send the second outgoing stream data to the business sentinel service, wherein the second outgoing stream data is obtained by monitoring the outgoing stream status of the multicast streaming program corresponding to the second multicast source.

[0085] In some embodiments, the network port setting module 502 includes an information acquisition unit and an information execution unit, wherein: The information acquisition unit is used to set the second multicast source as a high priority node and call a notification program; The information execution unit is used to call the multicast network port control program through the notification program, so that the multicast network port control program sets the multicast network port corresponding to the first multicast source to an activated state and sets the multicast network port corresponding to the second multicast source to a closed state.

[0086] In the embodiments of the present invention, the continuity, stability and reliability of the multicast streaming transmission service can be improved.

[0087] Figure 6 Schematic diagram of the physical structure of the electronic device provided by the present invention. Figure 6As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 complete mutual communication through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the multicast management method, which includes: obtaining configuration information, the configuration information including information of setting the first multicast source as a high priority node and information of setting the second multicast source as a low priority node; setting the multicast network port corresponding to the first multicast source to be in an activated state and setting the multicast network port corresponding to the second multicast source to be in a closed state according to the configuration information, so that the multicast network port corresponding to the first multicast source sends the multicast stream to the shared multicast environment; monitoring the running status of the first multicast source and the second multicast source, so that when the first multicast source fails, switching to the multicast network port corresponding to the second multicast source to send the multicast stream to the shared multicast environment.

[0088] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0089] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the multicast management method provided by the above methods, which method includes: obtaining configuration information, the configuration information including information setting the first multicast source as a high-priority node and information setting the second multicast source as a low-priority node; setting the multicast network port corresponding to the first multicast source to an activated state and setting the multicast network port corresponding to the second multicast source to a closed state according to the configuration information, so that the multicast network port corresponding to the first multicast source sends a multicast stream to a shared multicast environment; monitoring the running status of the first multicast source and the second multicast source, so that when a failure occurs in the first multicast source, switching to the multicast network port corresponding to the second multicast source to send the multicast stream to the shared multicast environment.

[0090] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

[0091] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the multicast management method provided by the above-mentioned methods, the method comprising: obtaining configuration information, the configuration information comprising information setting the first multicast source as a high-priority node and information setting the second multicast source as a low-priority node; setting the multicast network port corresponding to the first multicast source to an activated state and the multicast network port corresponding to the second multicast source to a closed state according to the configuration information, so that the multicast network port corresponding to the first multicast source sends a multicast stream to a shared multicast environment; monitoring the operating status of the first multicast source and the second multicast source, so that in the event of a failure of the first multicast source, switching to the multicast network port corresponding to the second multicast source to send the multicast stream to the shared multicast environment.

[0092] The above-mentioned computer-readable storage medium can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM) or flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0093] Computer-readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0094] The program code embodied on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.

[0095] Computer program code for performing the operations of the present specification may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0096] The system embodiment described above is merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.

[0097] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0098] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A multicast management method, characterized in that: Applied to a first multicast source and a second multicast source, both of which send multicast streams, the method includes: Acquire configuration information, where the configuration information includes information that sets the first multicast source as a high-priority node and information that sets the second multicast source as a low-priority node; According to the configuration information, the multicast network port corresponding to the first multicast source is set to be in an activated state and the multicast network port corresponding to the second multicast source is set to be in a closed state, so that the multicast network port corresponding to the first multicast source sends a multicast stream to the shared multicast environment; The running states of the first multicast source and the second multicast source are monitored, so that when the first multicast source fails, the multicast network port corresponding to the second multicast source is switched to send the multicast stream to the shared multicast environment.

2. The multicast management method according to claim 1, characterized in that: The running status includes at least one of a system running status, a multicast network port status, and a multicast outgoing status. The system running status is used to indicate the working status of the system of the first multicast source and the second multicast source. The multicast network port status is used to indicate the working status of the multicast network ports corresponding to the first multicast source and the second multicast source. The multicast outgoing status is used to indicate the outgoing status of the multicast stream sent by the first multicast source and the second multicast source.

3. The multicast management method according to claim 2, characterized in that: The running state includes a system running state and a multicast network port state, the first multicast source and the second multicast source constitute a virtual routing group, and the monitoring of the running state of the first multicast source and the second multicast source includes: When it is monitored that the first multicast source is running normally, periodically sending a heartbeat message to the second multicast source through the virtual routing group; When a multicast system of the first multicast source fails or a multicast network port corresponding to the first multicast source is monitored to fail, stop sending the heartbeat message to the second multicast source and set the first multicast source as a low priority node; When it is monitored that the second multicast source has not received the heartbeat message, the second multicast source is set as a high priority node, the multicast network port corresponding to the second multicast source is set to be activated, and the multicast network port corresponding to the first multicast source is set to be closed.

4. The multicast management method according to claim 2, characterized in that: The running state includes a multicast streaming state, and the monitoring of the running states of the first multicast source and the second multicast source includes: Sending the multicast stream monitoring data corresponding to the first multicast source and the second multicast source to a service sentinel service, so that the service sentinel service stores the multicast stream monitoring data, wherein the multicast stream monitoring data is determined according to the multicast streams sent by the first multicast source and the second multicast source; Controlling the second multicast source to periodically obtain the multicast stream monitoring data; When the multicast stream monitoring data indicates that an outbound flow state of the multicast stream sent by the first multicast source fails, and an outbound flow state of the multicast stream sent by the second multicast source is normal, the second multicast source is set as a high priority node, and the multicast network port corresponding to the second multicast source is set to be in an activated state, and the multicast network port corresponding to the first multicast source is set to be in a closed state.

5. The multicast management method according to claim 4, characterized in that: The multicast stream monitoring data includes first outgoing stream data and second outgoing stream data. Before sending the multicast stream monitoring data corresponding to the first multicast source and the second multicast source to the service sentinel service, the method further includes: Acquire first outgoing flow data through a first multicast flow monitoring service, and send the first outgoing flow data to the service sentinel service, wherein the first outgoing flow data is obtained by monitoring the outgoing flow of a multicast streaming program corresponding to the first multicast source; The second outgoing flow data is acquired through the second multicast flow monitoring service, and the second outgoing flow data is sent to the service sentinel service, wherein the second outgoing flow data is acquired by monitoring the outgoing flow of the multicast streaming program corresponding to the second multicast source.

6. The multicast management method according to claim 3 or 4, characterized in that: The step of setting the second multicast source as a high priority node, setting the multicast network port corresponding to the second multicast source to be in an activated state, and setting the multicast network port corresponding to the first multicast source to be in a closed state includes: Setting the second multicast source as a high priority node and calling a notification program; The notification program calls a multicast network port control program, so that the multicast network port control program sets the multicast network port corresponding to the first multicast source to be in an activated state and sets the multicast network port corresponding to the second multicast source to be in a closed state.

7. A multicast management system, characterized in that: Applied to a first multicast source and a second multicast source, both the first multicast source and the second multicast source send multicast streams, the system includes: A configuration acquisition module, used to acquire configuration information, wherein the configuration information includes information that the first multicast source is set as a high-priority node and information that the second multicast source is set as a low-priority node; a network port setting module, configured to set the multicast network port corresponding to the first multicast source to be in an activated state and to set the multicast network port corresponding to the second multicast source to be in a closed state according to the configuration information, so that the multicast network port corresponding to the first multicast source sends a multicast stream to a shared multicast environment; The status monitoring module is used to monitor the running status of the first multicast source and the second multicast source, so that when the first multicast source fails, the multicast network port corresponding to the second multicast source is switched to send the multicast stream to the shared multicast environment.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the multicast management method according to any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the multicast management method according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the multicast management method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Managing multicasting in a network

    CA2293030A1

  • Master / slave switching system and method for multicast source

    CN101192964A

  • Method and router for increasing multicast reliability

    CN101202705A

  • Multicast access equipment and method

    CN101345641A

  • Method, system and apparatus for protecting multicast business fault

    CN101436945A