Audio playback method, system, device and medium based on network broadcasting

By adopting a single-channel streaming method and a multi-machine deployment mechanism in the network broadcast system, the problems of poor synchronization and high resource consumption of audio playback terminals in the region are solved, and a high-availability and resource-saving audio playback system is achieved.

CN117675778BActive Publication Date: 2024-09-06GUANGZHOU BAOLUN ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311678951.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-07
Publication Date
2024-09-06
Estimated Expiration
2043-12-07

AI Technical Summary

Technical Problem

In the existing network broadcasting system, the problem of asynchronous playback of different power amplifier output terminals in the area is limited. The configuration support of the main and backup servers is limited. When the number of servers is increased, management and maintenance are heavy and the consumption of network resources is increased.

Method used

Use a single-channel push streaming method for audio playback, by determining one of at least two candidate push servers as the target push server, and determining one of at least two candidate forwarding servers as the target forwarding server to ensure that all audio playback terminals are simultaneously Receive one audio stream, support multi-machine server deployment, and reduce network resource consumption.

Benefits of technology

It achieves high availability of network radio audio playback, solves the problem of out-of-sync playback of multiple audio playback terminals in the same area, supports balanced deployment of servers, and reduces network resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117675778B
    Figure CN117675778B
Patent Text Reader

Abstract

The embodiment of the present invention discloses an audio playback method, system, device and medium based on network broadcasting. The method includes: when receiving an audio playback request, determining one from at least two candidate streaming servers as a target streaming server, and determining one from at least two candidate forwarding servers as a target forwarding server; sending the audio information to be played to the target forwarding server through the target streaming server; sending the audio information to be played to the target audio playback terminal through the target forwarding server according to the audio playback terminal information; and playing the audio through the target audio playback terminal according to the audio information to be played. This technical solution adopts a single-channel streaming method to achieve high availability of network broadcast audio playback, and can effectively solve the problem of asynchronous playback of multiple audio playback terminals in the same area, support multi-machine deployment of servers to achieve server balance, and effectively reduce network resource consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of audio playback, and in particular to an audio playback method, system, device and medium based on network broadcasting. Background Art

[0002] One of the key functions of the network broadcasting system is the scheduled playback of audio on the server side. In the related art, a dual-channel streaming method is used for audio playback, wherein the server side includes a streaming server and a streaming media forwarding server deployed with a master and a backup dual-machine. After the master and backup dual-machine streaming server pushes the audio stream, the power amplifier output terminal will receive two audio streams at the same time (such as Figure 1 and select and use one of the audio streams for broadcast.

[0003] However, the above scheme has the following shortcomings: 1. The playback of different amplifier output terminals in the area is not synchronized. Due to the slight difference in the startup time of the primary and backup streaming servers, different amplifier output terminals in the same area play different audio streams, making the playback of different amplifier output terminals in the area asynchronous. 2. The primary and backup server configuration only supports dual-machine primary and backup. If the server load is too high, in order to increase the number of servers, the corresponding number of audio streams must be increased, which will bring heavy management and maintenance work. 3. Increased network resource consumption. Only one of the two-channel audio streams is actually used, while the other will increase unnecessary network traffic, thereby consuming more network resources. Summary of the invention

[0004] The present invention provides an audio playback method, system, device and medium based on network broadcasting, which adopts a single-channel streaming method for audio playback, realizes high availability of network broadcast audio playback, and can effectively solve the problem of asynchronous playback of multiple audio playback terminals in the same area, support multi-machine deployment of servers to achieve server balance, and effectively reduce network resource consumption.

[0005] According to one aspect of the present invention, there is provided an audio playback method based on network broadcasting, the method comprising:

[0006] When an audio playback request is received, one is determined from at least two candidate streaming servers as a target streaming server, and one is determined from at least two candidate forwarding servers as a target forwarding server; wherein the audio playback request includes audio information to be played and audio playback terminal information;

[0007] Sending the audio information to be played to the target forwarding server through the target streaming server;

[0008] Sending the to-be-played audio information to the target audio playing terminal according to the audio playing terminal information by the target forwarding server;

[0009] The target audio playing terminal performs audio playing according to the audio information to be played.

[0010] According to another aspect of the present invention, there is provided an audio playback system based on network broadcasting, comprising:

[0011] A target server determination module, configured to, when receiving an audio playback request, determine one of at least two candidate streaming servers as a target streaming server, and determine one of at least two candidate forwarding servers as a target forwarding server; wherein the audio playback request includes audio information to be played and audio playback terminal information;

[0012] A first audio information sending module, used for sending the audio information to be played to the target forwarding server through the target streaming server;

[0013] A second audio information sending module, configured to send the to-be-played audio information to a target audio playing terminal through the target forwarding server according to the audio playing terminal information;

[0014] The audio playing module is used to play the audio according to the audio information to be played through the target audio playing terminal.

[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0016] at least one processor; and

[0017] a memory communicatively connected to the at least one processor; wherein,

[0018] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the audio playback method based on network broadcasting described in any embodiment of the present invention.

[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the audio playback method based on network broadcasting described in any embodiment of the present invention when executed.

[0020] The technical solution of the embodiment of the present invention, when receiving an audio playback request, determines one from at least two candidate streaming servers as the target streaming server, and determines one from at least two candidate forwarding servers as the target forwarding server; wherein the audio playback request includes audio information to be played and audio playback terminal information; the audio information to be played is sent to the target forwarding server through the target streaming server; the audio information to be played is sent to the target audio playback terminal through the target forwarding server according to the audio playback terminal information; the audio is played by the target audio playback terminal according to the audio information to be played. This technical solution adopts a single-channel streaming method for audio playback, which can ensure that all audio playback terminals receive one audio stream at the same time, realizes high availability of network broadcast audio playback, and can effectively solve the problem of asynchronous playback of multiple audio playback terminals in the same area, can support multi-machine deployment of servers to achieve server balance, and can effectively reduce network resource consumption.

[0021] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0023] Figure 1 It is a schematic diagram of a network broadcast audio playback method provided in the prior art;

[0024] Figure 2 is a flow chart of an audio playback method based on network broadcasting provided according to Embodiment 1 of the present invention;

[0025] Figure 3 is a flow chart of an audio playback method based on network broadcasting provided according to Embodiment 2 of the present invention;

[0026] Figure 4 is a schematic diagram of an audio playback method based on network broadcasting provided according to Embodiment 2 of the present invention;

[0027] Figure 5 is a structural diagram of an audio playback system based on network broadcasting provided according to Embodiment 3 of the present invention;

[0028] Figure 6It is a structural schematic diagram of an electronic device for implementing an audio playing method based on network broadcasting according to an embodiment of the present invention. DETAILED DESCRIPTION

[0029] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only 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 should fall within the scope of protection of the present invention.

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

[0031] Embodiment 1

[0032] Figure 2 This is a flowchart of an audio playback method based on network broadcasting provided in the first embodiment of the present invention. This embodiment is applicable to the case of single-channel streaming of network broadcasting audio. The method can be executed by an audio playback system based on network broadcasting. The audio playback system based on network broadcasting can be implemented in the form of hardware and / or software. The audio playback system based on network broadcasting can be configured in an electronic device with data processing capabilities. Figure 2 As shown, the method includes:

[0033] S110, when an audio playback request is received, one is determined from at least two candidate streaming servers as a target streaming server, and one is determined from at least two candidate forwarding servers as a target forwarding server.

[0034] Among them, the audio playback request may refer to an operation instruction requesting audio playback, and the audio playback request may be initiated by the client to the audio playback system based on network broadcast, or may be triggered by the audio playback system based on network broadcast. Specifically, the audio playback request includes the audio information to be played and the audio playback terminal information. Among them, the audio information to be played includes audio stream data, and may specifically include the name of the audio file to be played and its file format (such as MP3). The audio playback terminal information can be used to characterize the target terminal that needs to play audio. Among them, the audio playback terminal information needs to be able to uniquely characterize the audio playback terminal, such as the audio playback terminal name or the audio playback terminal identifier.

[0035] Among them, the streaming server can be used to transmit the audio information to be played in the audio playback request to the forwarding server, the forwarding server can be used to transmit the audio information to be played in the audio playback request to the audio playback terminal, and the audio playback terminal can be used to play the audio information to be played. It should be noted that at least two candidate streaming servers and at least two candidate forwarding servers are pre-deployed in the audio playback system based on network broadcasting, and each streaming server and each candidate forwarding server can receive the audio playback request at the same time. In this solution, it is necessary to ensure that there is only one streaming server to perform the streaming operation, and at the same time ensure that there is only one forwarding server to perform the forwarding operation. This requirement can be met by using Redis's distributed lock.

[0036] In this embodiment, when the audio playback system based on network broadcasting receives an audio playback request, it is necessary to determine an available streaming server from at least two candidate streaming servers as the target streaming server, and determine an available forwarding server from at least two candidate forwarding servers as the target forwarding server. The target streaming server and the target forwarding server can be selected by random selection or based on a predetermined server priority, which is not limited in this embodiment, as long as the target streaming server and the target forwarding server are both in an available state.

[0037] S120: Send the audio information to be played to the target forwarding server through the target streaming server.

[0038] In this embodiment, after the target streaming server and the target forwarding server are determined, the audio information to be played can be sent to the target forwarding server via the target streaming server.

[0039] S130: sending the audio information to be played to the target audio playing terminal according to the audio playing terminal information through the target forwarding server.

[0040] In this embodiment, when the target forwarding server receives the audio information to be played sent by the target streaming server, it can determine which audio playback terminals have audio playback requirements based on the audio playback terminal information, and send the audio information to be played to the target audio playback terminals with audio playback requirements. The number of target audio playback terminals can be one or more, which can be pre-set according to actual needs, and this embodiment does not limit this.

[0041] S140: Play audio according to the audio information to be played through the target audio playing terminal.

[0042] In this embodiment, when the target audio playing terminal receives the audio information to be played sent by the target forwarding server, it can perform synchronous audio playing according to the audio information to be played.

[0043] The technical solution of the embodiment of the present invention, when receiving an audio playback request, determines one from at least two candidate streaming servers as the target streaming server, and determines one from at least two candidate forwarding servers as the target forwarding server; wherein the audio playback request includes audio information to be played and audio playback terminal information; the audio information to be played is sent to the target forwarding server through the target streaming server; the audio information to be played is sent to the target audio playback terminal through the target forwarding server according to the audio playback terminal information; the audio is played by the target audio playback terminal according to the audio information to be played. This technical solution adopts a single-channel streaming method for audio playback, which can ensure that all audio playback terminals receive one audio stream at the same time, realizes high availability of network broadcast audio playback, and can effectively solve the problem of asynchronous playback of multiple audio playback terminals in the same area, can support multi-machine deployment of servers to achieve server balance, and can effectively reduce network resource consumption.

[0044] In this embodiment, optionally, the method further includes: sending second heartbeat information to at least two candidate streaming servers respectively through at least two candidate forwarding servers; wherein the second heartbeat information is used to indicate that the candidate forwarding server is in an available state.

[0045] In this embodiment, before the target streaming server is used to push the stream, the second heartbeat information can be sent to each candidate streaming server through each candidate forwarding server. Among them, the second heartbeat information can be used to indicate that the candidate forwarding server is in an available state, such as the second heartbeat information can include the name or identifier of the candidate forwarding server. In addition, the second heartbeat information can use UDP or TCP protocol to achieve communication.

[0046] Specifically, if the candidate streaming server can receive the second heartbeat information sent by a candidate forwarding server within the second preset time length, it can indicate that the candidate forwarding server is currently in an available state; if the candidate streaming server does not receive the second heartbeat information sent by a candidate forwarding server within the second preset time length, it can indicate that the candidate forwarding server is currently in an unavailable state. Among them, the second preset time length can be pre-set according to actual needs, and this is not specifically limited in this embodiment. Exemplarily, the second preset time length can be controlled at the millisecond level (for example, within 150ms). For example, the second preset time length can be set to the time interval of 6 audio samples.

[0047] Through such a setting, this solution can quickly and accurately determine which candidate forwarding servers are currently in an available state based on the reception of the second heartbeat information by the candidate streaming server.

[0048] In this embodiment, optionally, one is determined from at least two candidate forwarding servers as the target forwarding server, including: if the target streaming server receives a second heartbeat message within a second preset time period, the candidate forwarding server that sends the second heartbeat message is used as a reference forwarding server; and one is determined from the reference forwarding servers as the target forwarding server.

[0049] In this embodiment, if the target streaming server receives the second heartbeat information within the second preset time period, it indicates that there is a candidate forwarding server that is currently available. At this time, all candidate forwarding servers that send the second heartbeat information can be used as reference forwarding servers, and one can be determined from the reference forwarding servers as the target forwarding server, thereby ensuring the availability of the target forwarding server.

[0050] In this embodiment, optionally, the method also includes: if the target streaming server does not receive the second heartbeat information of the target forwarding server within the second preset time period, determining that the target forwarding server has failed; based on the second heartbeat information received by the target streaming server within the second preset time period, determining one from other candidate forwarding servers except the target forwarding server as the updated target forwarding server.

[0051] In this embodiment, if the target streaming server does not receive the second heartbeat information of the target forwarding server within the second preset time length, it can be determined that the target forwarding server fails, and at this time, it is necessary to re-determine an available forwarding server from other candidate forwarding servers as the target forwarding server. Specifically, it can be determined which candidate forwarding servers are currently in an available state based on the second heartbeat information received by the target streaming server within the second preset time length, and one of the candidate forwarding servers currently in an available state is determined as the updated target forwarding server. Thus, when the target forwarding server fails, other available candidate forwarding servers can be replaced in time as new target forwarding servers to ensure the availability of the updated target forwarding server.

[0052] Embodiment 2

[0053] Figure 3 This is a flow chart of an audio playback method based on network broadcasting provided in Embodiment 2 of the present invention. This embodiment is optimized based on the above embodiment.

[0054] like Figure 3 As shown, the method of this embodiment specifically includes the following steps:

[0055] S210: When an audio playback request is received, one is determined from at least two candidate streaming servers as a target streaming server, and one is determined from at least two candidate forwarding servers as a target forwarding server.

[0056] The audio playback request includes the audio information to be played and the audio playback terminal information.

[0057] S220: Determine a first backup streaming server as the target streaming server from other candidate streaming servers other than the target streaming server.

[0058] In this embodiment, in order to prevent the target streaming server from failing and affecting the normal streaming operation, after determining the target streaming server, an available streaming server can be determined from other candidate streaming servers other than the target streaming server by random determination or priority-based determination as the first backup streaming server for the target streaming server.

[0059] S230: Sending first heartbeat information to the first standby streaming server through the target streaming server; wherein the first heartbeat information is used to describe the playing progress of the audio information to be played.

[0060] In this embodiment, after determining the first standby streaming server of the target streaming server, the first heartbeat information can be sent to the first standby streaming server through the target streaming server. Among them, the first heartbeat information can be used to describe the playback progress of the audio information to be played. Exemplarily, the first heartbeat information may include the name of the audio file to be played and its file format, the current playback duration of the audio to be played, and the current playback frame number. In addition, the first heartbeat information can use UDP or TCP protocol to achieve communication.

[0061] S240: If the first standby streaming server does not receive the first heartbeat information within the first preset time period, it is determined that a failure occurs in the target streaming server.

[0062] In this embodiment, the first standby streaming server can be used to determine whether the target streaming server fails by receiving the first heartbeat information. Specifically, if the first standby streaming server does not receive the first heartbeat information within the first preset duration, it can be determined that the target streaming server fails. At this time, the system will send a message to the target streaming server to notify it to end the streaming action, so as to avoid pushing two audio streams at the same time when the first standby streaming server is started later. Among them, the first preset duration can be pre-set according to actual needs, and this is not specifically limited in this embodiment. Exemplarily, the first preset duration can be controlled at the millisecond level (such as within 150ms). Among them, the first preset duration and the second preset duration can be set to the same value, for example, both are set to the time interval of 6 audio samples.

[0063] S250: Send the audio information to be played to the target forwarding server through the first standby streaming server.

[0064] In this embodiment, when it is determined that the target streaming server fails, the first standby streaming server can start the playback task with the historical playback progress point in the first heartbeat information received last time, update the audio information to be played according to the historical playback progress point, and send the updated audio information to be played to the target forwarding server. In this way, it can be ensured that the audio playback system based on network broadcasting can perform streaming operations normally, realize an ultra-low latency fault switching mechanism, maintain the continuity and high availability of audio playback, improve the fault tolerance of the system server, and reduce the failure risk of audio playback services, so as to provide users with a more stable and high-quality audio experience.

[0065] Further, if the first standby streaming server does not receive the second heartbeat information of the target forwarding server within the second preset duration, it can be determined that the target forwarding server fails. At this time, an available forwarding server can be determined from other candidate forwarding servers except the target forwarding server as the updated target forwarding server.

[0066] S260: Send the audio information to be played to the target audio playing terminal according to the audio playing terminal information through the target forwarding server.

[0067] S270: Play audio according to the audio information to be played through the target audio playing terminal.

[0068] The technical solution of the embodiment of the present invention is to determine a first backup streaming server as the target streaming server from other candidate streaming servers other than the target streaming server; send a first heartbeat message to the first backup streaming server through the target streaming server; wherein the first heartbeat message is used to describe the playback progress of the audio information to be played; if the first backup streaming server does not receive the first heartbeat message within a first preset time period, it is determined that the target streaming server has a fault; and send the audio information to be played to the target forwarding server through the first backup streaming server. This technical solution adopts a single-channel streaming method for audio playback, which can ensure that all audio playback terminals receive one audio stream at the same time, achieving high availability of network broadcast audio playback, and effectively solving the problem of asynchronous playback of multiple audio playback terminals in the same area. It can support multi-machine deployment of servers to achieve server balance and effectively reduce network resource consumption. When it is determined that a failure occurs in the target streaming server, the first backup streaming server can be promptly enabled to send the audio information to be played to the target forwarding server, thereby ensuring that the system can perform streaming operations normally and realizing an ultra-low latency fault switching mechanism, thereby maintaining the continuity and high availability of audio playback, improving the fault tolerance of the system server, and reducing the failure risk of audio playback services, so as to provide users with a more stable and high-quality audio experience.

[0069] In this embodiment, optionally, after determining that the target streaming server fails, the method further includes: determining a second backup streaming server as the first backup streaming server from other candidate streaming servers other than the target streaming server and the first backup streaming server; and sending a first heartbeat message to the second backup streaming server through the first backup streaming server.

[0070] In this embodiment, in order to prevent the first backup streaming server from failing and affecting the normal streaming operation, after determining that the target streaming server has failed, an available streaming server can be determined from other candidate streaming servers other than the target streaming server and the first backup streaming server as the second backup streaming server of the first backup streaming server, and the first heartbeat information can be sent to the second backup streaming server through the first backup streaming server. Further, if the second backup streaming server determines that the first backup streaming server has failed, the second backup streaming server can be immediately enabled for streaming operation.

[0071] Through such a setting, this solution determines the second backup streaming server of the first backup streaming server, and sends the first heartbeat information to the second backup streaming server through the first backup streaming server. When it is determined that the first backup streaming server fails, the second backup streaming server can be enabled in time to perform streaming operations, which can effectively avoid the normal streaming operations being affected by the failure of the first backup streaming server.

[0072] Figure 4 Schematic diagram of an audio playback method based on network broadcasting provided by Embodiment 2 of the present invention. Figure 4 As shown, 3 candidate streaming servers and 3 candidate forwarding servers are deployed in the system, and the number of target audio playback terminals is 2. Among them, streaming server 1 is the target streaming server, streaming server 2 is the first backup streaming server of streaming server 1, and forwarding server 2 is the target forwarding server.

[0073] Specifically, 3 candidate forwarding servers send second heartbeat information to 3 candidate push stream servers respectively to inform each candidate forwarding server that each candidate forwarding server is currently in an available state. When the system receives an audio playback request, the audio information to be played is sent to forwarding server 2 by push stream server 1, and the audio information to be played is sent to 2 target audio playback terminals by forwarding server 2 according to the audio playback terminal information, and then synchronized audio playback is performed by 2 target audio playback terminals according to the audio information to be played. In the process of push stream server 1 pushing stream, the first heartbeat information will be sent to push stream server 2 to inform the current audio playback progress of push stream server 1 to push stream server 2. If push stream server 2 does not receive the first heartbeat information sent by push stream server 1 within the first preset duration, it can be determined that push stream server 1 fails. At this time, the audio information to be played is sent to forwarding server 2 by push stream server 2, and push stream server 3 is determined as the second standby push stream server of push stream server 2, and the first heartbeat information is sent to push stream server 3 by push stream server 2.

[0074] During the streaming process, if the candidate streaming server currently performing the streaming operation does not receive the second heartbeat information of forwarding server 2 within the second preset time period, it can be determined that forwarding server 2 has failed. At this time, one can be determined from forwarding server 1 and forwarding server 3 as the updated target forwarding server, thereby ensuring the high availability of the target forwarding server.

[0075] Embodiment 3

[0076] Figure 5This is a schematic diagram of the structure of an audio playback system based on network broadcasting provided in the third embodiment of the present invention. The system can execute the audio playback method based on network broadcasting provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. Figure 5 As shown, the system includes:

[0077] The target server determination module 310 is used to determine one of at least two candidate streaming servers as the target streaming server and one of at least two candidate forwarding servers as the target forwarding server when receiving an audio playback request; wherein the audio playback request includes the audio information to be played and the audio playback terminal information;

[0078] A first audio information sending module 320, configured to send the to-be-played audio information to the target forwarding server via the target streaming server;

[0079] The second audio information sending module 330 is used to send the audio information to be played to the target audio playing terminal through the target forwarding server according to the audio playing terminal information;

[0080] The audio playing module 340 is used to play the audio according to the audio information to be played through the target audio playing terminal.

[0081] Optionally, the system further includes:

[0082] A first backup streaming server determination module is used to determine, after determining one of at least two candidate streaming servers as a target streaming server, determine a first backup streaming server from other candidate streaming servers other than the target streaming server as the target streaming server;

[0083] The first heartbeat information sending module is used to send the first heartbeat information to the first standby streaming server through the target streaming server; wherein the first heartbeat information is used to describe the playing progress of the audio information to be played.

[0084] Optionally, the system further includes:

[0085] A first fault judgment module, configured to determine that a fault occurs on the target streaming server if the first standby streaming server does not receive the first heartbeat information within a first preset time period;

[0086] The third audio information sending module is used to send the audio information to be played to the target forwarding server through the first standby streaming server.

[0087] Optionally, the system further includes:

[0088] A second standby streaming server determining module, configured to determine, after determining that the target streaming server fails, a second standby streaming server from other candidate streaming servers other than the target streaming server and the first standby streaming server as the first standby streaming server;

[0089] The second heartbeat information sending module is used to send the first heartbeat information to the second standby streaming server through the first standby streaming server.

[0090] Optionally, the system further includes:

[0091] The third heartbeat information sending module is used to send second heartbeat information to the at least two candidate streaming servers respectively through the at least two candidate forwarding servers; wherein the second heartbeat information is used to indicate that the candidate forwarding server is in an available state.

[0092] Optionally, the target server determination module 310 is used to:

[0093] If the target streaming server receives the second heartbeat information within a second preset time period, the candidate forwarding server that sends the second heartbeat information is used as a reference forwarding server;

[0094] One of the reference forwarding servers is determined as a target forwarding server.

[0095] Optionally, the system further includes:

[0096] A second fault judgment module is used to determine that the target forwarding server fails if the target streaming server does not receive the second heartbeat information of the target forwarding server within a second preset time period;

[0097] The target forwarding server updating module is used to determine one of the candidate forwarding servers other than the target forwarding server as an updated target forwarding server according to the second heartbeat information received by the target streaming server within a second preset time period.

[0098] An audio playback system based on network broadcasting provided by an embodiment of the present invention can execute an audio playback method based on network broadcasting provided by any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.

[0099] Embodiment 4

[0100] Figure 6A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0101] like Figure 6 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0102] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0103] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as an audio playback method based on network broadcasting.

[0104] In some embodiments, the audio playback method based on network broadcasting can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the audio playback method based on network broadcasting described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the audio playback method based on network broadcasting in any other appropriate manner (for example, by means of firmware).

[0105] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0106] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0107] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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 foregoing.

[0108] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0109] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0110] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0111] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0112] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. An audio playback method based on network broadcasting, characterized in that: The method comprises: When an audio playback request is received, one is determined from at least two candidate streaming servers as a target streaming server, and one is determined from at least two candidate forwarding servers as a target forwarding server; wherein the audio playback request includes audio information to be played and audio playback terminal information; Sending the audio information to be played to the target forwarding server through the target streaming server; Sending the audio information to be played to the target audio playing terminal according to the audio playing terminal information through the target forwarding server; Playing audio according to the audio information to be played by the target audio playing terminal; The method further comprises: Second heartbeat information is sent to the at least two candidate streaming servers respectively through the at least two candidate forwarding servers; wherein the second heartbeat information is used to indicate that the candidate forwarding server is in an available state.

2. The method according to claim 1, characterized in that After one of the at least two candidate streaming servers is determined as a target streaming server, the method further includes: Determine a first backup streaming server for the target streaming server from other candidate streaming servers other than the target streaming server; A first heartbeat message is sent to the first backup streaming server through the target streaming server; wherein the first heartbeat message is used to describe the playback progress of the audio information to be played.

3. The method according to claim 2, characterized in that The method further comprises: If the first backup streaming server does not receive the first heartbeat information within a first preset time period, it is determined that the target streaming server fails; The audio information to be played is sent to the target forwarding server through the first standby streaming server.

4. The method according to claim 3, characterized in that After determining that the target streaming server fails, the method further includes: Determine a second backup streaming server as the first backup streaming server from other candidate streaming servers other than the target streaming server and the first backup streaming server; The first heartbeat information is sent to the second backup streaming server through the first backup streaming server.

5. The method according to claim 1, wherein Determining one of at least two candidate forwarding servers as a target forwarding server includes: If the target streaming server receives the second heartbeat information within a second preset time period, the candidate forwarding server that sends the second heartbeat information is used as a reference forwarding server; One of the reference forwarding servers is determined as a target forwarding server.

6. The method according to claim 1, wherein The method further comprises: If the target streaming server does not receive the second heartbeat information of the target forwarding server within the second preset time period, it is determined that the target forwarding server has a fault; According to the second heartbeat information received by the target streaming server within the second preset time period, one of the candidate forwarding servers other than the target forwarding server is determined as the updated target forwarding server.

7. An audio playback system based on network broadcasting, characterized in that: The system comprises: a target server determination module configured to, upon receiving an audio playback request, determine one of at least two candidate streaming servers as a target streaming server and one of at least two candidate forwarding servers as a target forwarding server; wherein the audio playback request includes information about the audio to be played and information about the audio playback terminal; A first audio information sending module is used to send the audio information to be played to the target forwarding server through the target streaming server; A second audio information sending module is used to send the audio information to be played to the target audio playing terminal through the target forwarding server according to the audio playing terminal information; An audio playback module, configured to play audio according to the audio information to be played via the target audio playback terminal; The system further comprises: The third heartbeat information sending module is configured to send second heartbeat information to the at least two candidate streaming servers respectively through the at least two candidate forwarding servers; wherein the second heartbeat information is used to indicate that the candidate forwarding server is in an available state.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the audio playback method based on network broadcasting according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the audio playback method based on network broadcasting according to any one of claims 1 to 6 when executed.