Audio publishing method, device and system based on MQTT

The audio publishing method based on the MQTT protocol solves the problems of high protocol overhead, poor network tolerance, and high power consumption in the audio publishing solution, achieving support for a large number of clients and improving network stability.

CN112351091BActive Publication Date: 2024-10-22LOOTOM TELCOVIDEO NETWORK WUXI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011195328.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-30
Publication Date
2024-10-22
Estimated Expiration
2040-10-30

AI Technical Summary

Technical Problem

In existing audio publishing solutions, HTTP and MQ protocols have problems such as high protocol overhead, poor tolerance for unstable networks, high power consumption, and the inability to effectively support massive concurrent connections.

Method used

Using the audio publishing method based on the MQTT protocol, the audio files to be broadcast are received and sent through the MQTT proxy server, and the audio files are converted and broadcast according to the set broadcast parameters. It supports massive client connections and improves the network's tolerance and capability. Power consumption efficiency.

Benefits of technology

It effectively reduces the protocol overhead of communication between services, improves the tolerance to unstable networks, reduces power consumption, and supports the connection of massive clients.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112351091B_ABST
    Figure CN112351091B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of audio communication technology, and specifically discloses an audio publishing method based on MQTT, which includes: receiving an audio file to be broadcast; setting broadcast parameters of the audio file to be broadcast; sending the audio file to be broadcast to an audio publishing terminal through an MQTT proxy server according to the broadcast parameters, so that the audio publishing terminal broadcasts the audio file to be broadcast according to the broadcast parameters. The present invention also discloses an audio publishing device and system based on MQTT. The audio publishing method based on MQTT provided by the present invention can effectively solve the problem of high overhead of communication protocols between services, and at the same time has a high tolerance to unstable networks, low power consumption, and supports connecting to a large number of clients.
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 communication, and in particular to an audio publishing method based on MQTT, an audio publishing device based on MQTT, and an audio publishing system based on MQTT. Background Art

[0002] At present, most audio publishing solutions on the market use HTTP or MQ to communicate between systems. Both of these communication methods have certain defects:

[0003] (1) Protocol overhead: Both MQ and HTTP have high protocol overhead. For HTTP, re-establishing an HTTP connection for each new request message will result in significant overhead.

[0004] (2) Tolerance for unstable networks: HTTP cannot natively recover from failures such as disconnections, requiring the client to retry encoding, which may increase idempotence issues.

[0005] (3) Low power consumption: The design of HTTP does not take power consumption into consideration, thus increasing power consumption.

[0006] (4) Millions of connected clients: On the HTTP stack, maintaining millions of concurrent connections requires a lot of work to support. Although this support can be achieved, most commercial products are optimized to handle this order of magnitude of permanent connections. At the same time, MQ (Message Queue) is not designed for a large number of concurrent clients. Summary of the invention

[0007] The present invention provides an audio publishing method based on MQTT, an audio publishing device based on MQTT and an audio publishing system based on MQTT, which solve the problem of high audio publishing overhead existing in the related art.

[0008] As a first aspect of the present invention, a method for publishing an audio message based on MQTT is provided, comprising:

[0009] Receive the audio file to be broadcasted;

[0010] Setting broadcast parameters of the audio file to be broadcast;

[0011] The audio file to be broadcast is sent to the audio publishing terminal through the MQTT proxy server according to the broadcast parameters, so that the audio publishing terminal broadcasts the audio file to be broadcast according to the broadcast parameters.

[0012] Further, the receiving of the audio file to be broadcast includes:

[0013] Receive the audio file to be broadcast uploaded by the user terminal through the MQTT proxy server;

[0014] The MQTT proxy server feeds back the response information to the user terminal.

[0015] Furthermore, the broadcast parameters include: broadcast area, broadcast level, broadcast volume and type of event to be broadcast.

[0016] Further, when the received audio file to be broadcast includes a text file, sending the audio file to be broadcast to the audio publishing terminal through the MQTT proxy server according to the broadcast parameters includes:

[0017] Convert the text file into a corresponding audio file;

[0018] The corresponding audio file is sent to the audio publishing terminal through the MQTT proxy server according to the broadcast parameters.

[0019] Furthermore, the audio publishing terminal includes: an audio server and / or an IP publishing server.

[0020] Furthermore, the MQTT-based audio publishing method further includes:

[0021] The network status of the terminal device collected by the network management collection server is obtained through the MQTT proxy server.

[0022] Furthermore, the MQTT-based audio publishing method further includes:

[0023] Obtain the audio request information to be published on each linkage platform through the MQTT proxy server.

[0024] As another aspect of the present invention, there is provided an audio publishing device based on MQTT, comprising:

[0025] A receiving module, used for receiving the audio file to be broadcast;

[0026] A setting module, used for setting broadcast parameters of the audio file to be broadcast;

[0027] The publishing module is used to send the audio file to be broadcast to the audio publishing terminal through the MQTT proxy server according to the broadcast parameters, so that the audio publishing terminal broadcasts the audio file to be broadcast according to the broadcast parameters.

[0028] As another aspect of the present invention, there is provided an audio publishing system based on MQTT, which comprises: an MQTT proxy server, an audio publishing terminal and the MQTT-based audio publishing device mentioned above, wherein the audio publishing terminal is communicatively connected with the MQTT-based audio publishing device via the MQTT proxy server.

[0029] Furthermore, the MQTT-based audio publishing system also includes: a network management collection server, a user terminal and a northbound interface terminal, and the network management collection server, user terminal and northbound interface terminal are all communicatively connected to the MQTT-based audio publishing device through an MQTT proxy server.

[0030] The MQTT-based audio publishing method provided by the present invention completes audio publishing through the MQTT protocol. This method can effectively solve the problem of high overhead of communication protocols between services, and at the same time has high tolerance to unstable networks, low power consumption, and supports connecting to massive clients. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present invention, but do not constitute a limitation of the present invention.

[0032] Figure 1 A flowchart of the MQTT-based audio publishing method provided by the present invention.

[0033] Figure 2 This is a structural block diagram of the MQTT-based audio publishing system provided by the present invention.

[0034] Figure 3 The relationship between services and open ports of the MQTT-based audio publishing system provided by the present invention.

[0035] Figure 4 This is the data push process between services (services and clients) provided by the present invention.

[0036] Figure 5 This is the data interaction process between services (services and clients) provided by the present invention. DETAILED DESCRIPTION

[0037] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

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

[0039] It should be noted that the terms "first", "second", 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 as to describe the embodiments of the present invention 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.

[0040] In this embodiment, an audio publishing method based on MQTT (Message Queue Telemetry Transport) is provided. Figure 1 is a flow chart of an audio publishing method based on MQTT according to an embodiment of the present invention, such as Figure 1 As shown, including:

[0041] S110, receiving an audio file to be broadcast;

[0042] As a specific implementation method, a directly uploaded audio file to be broadcasted may be received, and then the audio file to be broadcasted may be sent to an audio publishing terminal through an MQTT proxy server for broadcasting;

[0043] As another specific implementation manner, the receiving of the audio file to be broadcast includes:

[0044] Receive the audio file to be broadcast uploaded by the user terminal through the MQTT proxy server;

[0045] The MQTT proxy server feeds back the response information to the user terminal.

[0046] It should be understood that the user terminal may include a mobile client, a web server, or other user terminals, etc., which are not limited here.

[0047] Taking the user terminal as a mobile client as an example, if the user uploads a direct audio file through the mobile client, there is no need to process the audio file to be broadcast. After setting the broadcast parameters, it can be sent to the audio publishing terminal through the MQTT proxy server for broadcast publishing;

[0048] When the received audio file to be broadcast includes a text file, sending the audio file to be broadcast to the audio publishing terminal through the MQTT proxy server according to the broadcast parameters includes:

[0049] Convert the text file into a corresponding audio file;

[0050] The corresponding audio file is sent to the audio publishing terminal through the MQTT proxy server according to the broadcast parameters.

[0051] S120, setting broadcast parameters of the audio file to be broadcast;

[0052] In some implementations, the broadcast parameters include a broadcast area, a broadcast level, a broadcast volume, and a type of event to be broadcast.

[0053] It should be understood that when an audio file needs to be broadcast, its broadcast area needs to be determined, for example, whether it is a city-wide broadcast or a community broadcast, etc.; the broadcast level also needs to be determined, and the broadcast level is set according to the urgency of the broadcast content, etc. The broadcast volume is set, and the broadcast volume can usually be determined according to the coverage of each audio publishing terminal. It is also necessary to determine the type of event to be broadcast, that is, define a label for the content of the audio file to be broadcast, such as floods, earthquakes, etc., which are all broadcast event types.

[0054] S130. Send the audio file to be broadcast to the audio publishing terminal through the MQTT proxy server according to the broadcast parameters, so that the audio publishing terminal broadcasts the audio file to be broadcast according to the broadcast parameters.

[0055] The MQTT-based audio publishing method provided in an embodiment of the present invention completes audio publishing through the MQTT protocol. This method can effectively solve the problem of high overhead of communication protocols between services. At the same time, it has high tolerance to unstable networks, low power consumption, and supports connecting to massive clients.

[0056] It should be noted that the audio publishing terminal includes: an audio server and / or an IP publishing server.

[0057] Specifically, the MQTT-based audio publishing method further includes:

[0058] The network status of the terminal device collected by the network management collection server is obtained through the MQTT proxy server.

[0059] When the network status of the terminal device needs to be obtained, a network status acquisition instruction can be sent to the network management collection server through the MQTT proxy server. The network management collection server collects the network status of the terminal device according to the network status acquisition instruction and feeds back the collected network status through the MQTT proxy server.

[0060] Since the network management collection server performs patrol collection of the network status of the terminal device according to the set time, the network status of the terminal device fed back by the network management collection server can also be received regularly through the MQTT proxy server.

[0061] Specifically, the MQTT-based audio publishing method further includes:

[0062] Obtain the audio request information to be published on each linkage platform through the MQTT proxy server.

[0063] As another embodiment of the present invention, there is provided an audio publishing device based on MQTT, comprising:

[0064] A receiving module, used for receiving the audio file to be broadcast;

[0065] A setting module, used for setting broadcast parameters of the audio file to be broadcast;

[0066] The publishing module is used to send the audio file to be broadcast to the audio publishing terminal through the MQTT proxy server according to the broadcast parameters, so that the audio publishing terminal broadcasts the audio file to be broadcast according to the broadcast parameters.

[0067] The MQTT-based audio publishing device provided in an embodiment of the present invention completes audio publishing through the MQTT protocol. This method can effectively solve the problem of high overhead of communication protocols between services. At the same time, it has high tolerance to unstable networks, low power consumption, and supports connecting to massive clients.

[0068] As another embodiment of the present invention, there is provided an audio publishing system based on MQTT, which comprises: an MQTT proxy server, an audio publishing terminal and the MQTT-based audio publishing device mentioned above, wherein the audio publishing terminal is communicatively connected with the MQTT-based audio publishing device via the MQTT proxy server.

[0069] The MQTT-based audio publishing system provided in the embodiment of the present invention completes audio publishing through the MQTT protocol. This method can effectively solve the problem of high overhead of communication protocols between services. At the same time, it has high tolerance to unstable networks, low power consumption, and supports connecting to massive clients.

[0070] Specifically, Figures 2 to 5 As shown, the MQTT-based audio publishing device may include a core support server.

[0071] The core support service is the hub for the interaction between the services of the entire audio publishing system and between the services and the terminals. It stores the resource list and user list of the audio publishing system, and can perform resource management and user authority management. Through interaction with the network management collection service, it realizes the operation and maintenance support of the entire network. Through interaction with the audio service, the content, time and scope of audio release can be accurately controlled. Through interaction with the northbound interface, the upper platform can access information and control the scheduling of this platform. Through interaction with the mobile phone APP, it can be realized through the mobile phone APP to publish files or shout audio in real time.

[0072] Specifically, the MQTT-based audio publishing system also includes: a network management collection server, a user terminal and a northbound interface. The network management collection server, the user terminal and the northbound interface are all communicatively connected to the MQTT-based audio publishing device through an MQTT proxy server.

[0073] Specifically, the audio server is the specific implementer of audio production. It receives instructions from the core support server, converts the instructions into specific code streams (control streams) that can control the device, and converts the content (voice files, text) specified to be played by the core server into voice file streams (audio streams) that can be parsed by the terminal. For terminals accessed by TS (Transport Stream), the audio server sends these two streams to the QAM (Quadrature Amplitude Modulation, digital modulator) device, and modulates the streams onto the coaxial axis. For terminals accessed by IP (4G), the audio server sends the streams to the IP distribution server, and broadcasts them to the terminals through the IP distribution service.

[0074] Specifically, the IP distribution server is the specific implementer of IP audio publishing. There can be multiple IP distribution servers to achieve load balancing of the audio publishing system. It receives the control stream information and audio stream information sent by the audio service, and broadcasts the control stream information to all terminals under it. The terminal determines whether it needs to broadcast by analyzing the control stream, and if so, which voice to broadcast. After the analysis is completed, the terminal applies to the IP distribution service for the specified audio stream, and the IP distribution server pushes the audio stream to the terminal.

[0075] The network management collection server is responsible for collecting various parameters of terminal devices through a certain network management protocol, thereby shielding the differences between various network management protocols of the devices for the core services. The interaction with the core services uniformly adopts the MQTT protocol. At the same time, there can be multiple network management collection services, so load balancing is also achieved.

[0076] The northbound interface is used for system access of superior units or platforms. It can publish various audio information such as meteorology, water conservancy, fire risk, disasters, etc. through the dispatch of the superior platform, expanding the application scenarios of the audio publishing system.

[0077] In summary, the MQTT-based audio publishing system provided by the embodiment of the present invention, in the audio service system, the communication between services and between services and mobile phone clients is implemented using the MQTT publish / subscribe mode. The publisher publishes a message to the MQTT proxy server (the published message can be the push and update of certain data, or a request for data). After receiving the message, the proxy pushes the message to the corresponding subscriber. If the subscribed message is an update of the service data, the service updates the local data. If the subscribed message is a request, the message subscriber also publishes a topic as a response to the service that published the message. This system solves the problem of high overhead of the communication protocol between services, and at the same time has a high tolerance for unstable networks, low power consumption, and supports connecting a large number of clients.

[0078] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present invention, but the present invention is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also considered to be within the scope of protection of the present invention.

Claims

1. An audio publishing system based on MQTT, It is characterized in that include: An MQTT proxy server, an audio publishing terminal and an audio publishing device based on MQTT, wherein the audio publishing device based on MQTT is used to implement an audio publishing method based on MQTT, and the audio publishing terminal is communicatively connected with the audio publishing device based on MQTT through the MQTT proxy server; Wherein, the MQTT-based audio publishing device includes: A receiving module, used for receiving the audio file to be broadcast; A setting module, used for setting broadcast parameters of the audio file to be broadcast; A publishing module, used for sending the audio file to be broadcast to the audio publishing terminal through the MQTT proxy server according to the broadcast parameters, so that the audio publishing terminal broadcasts the audio file to be broadcast according to the broadcast parameters; The MQTT-based audio publishing system further comprises: a network management collection server, a user terminal and a northbound interface terminal, wherein the network management collection server, the user terminal and the northbound interface terminal are all connected to the MQTT-based audio publishing device through an MQTT proxy server; Wherein, the audio publishing terminal includes: an audio server and / or an IP publishing server; Among them, the MQTT-based audio publishing device also includes a core support server; the core support server is the hub for the interaction between the services of the entire audio publishing system and between the services and the terminal. It stores the resource list and user list of the audio publishing system, and can perform resource management and user authority management; through interaction with the network management collection server, the operation and maintenance support for the entire network is realized, and through interaction with the audio server, the content, time and scope of audio publishing can be accurately controlled. Through interaction with the northbound interface, the upper platform can access and schedule the information of this platform. Through interaction with the mobile phone APP, it can be realized through the mobile phone APP to publish files or real-time audio calls; The audio server is the specific implementer of audio production. It receives instructions from the core support server, converts the instructions into specific code streams that can control the device, and converts the content specified by the core support server into a voice file stream that can be parsed by the terminal. For TS-accessed terminals, the audio server sends these two streams to the QAM device and modulates the streams onto the coaxial cable. For IP-accessed terminals, the audio server sends the streams to the IP publishing server, which broadcasts to the terminal through the IP publishing server. The IP publishing server is the specific implementer of IP audio publishing. It receives the control stream information and audio stream information sent by the audio server, and broadcasts the control stream information to all terminals under it. The terminal determines whether it needs to broadcast by analyzing the control stream, and if so, which voice to broadcast. After the analysis is completed, the terminal applies to the IP publishing server for the specified audio stream, and the IP publishing server pushes the audio stream to the terminal; Among them, the network management collection server is responsible for collecting various parameters of terminal devices through a certain network management protocol, thereby shielding the differences between various network management protocols of the equipment for the core support server, and the interaction with the core support server uniformly adopts the MQTT protocol.

2. The MQTT-based audio publishing system according to claim 1, It is characterized in that The MQTT-based audio publishing method includes: Receive the audio file to be broadcasted; Setting broadcast parameters of the audio file to be broadcast; The audio file to be broadcast is sent to the audio publishing terminal through the MQTT proxy server according to the broadcast parameters, so that the audio publishing terminal broadcasts the audio file to be broadcast according to the broadcast parameters; wherein the audio publishing terminal includes: an audio server and / or an IP publishing server; the broadcast parameters include: a broadcast area, a broadcast level, a broadcast volume and a type of event to be broadcast; Wherein, when the received audio file to be broadcast includes a text file, sending the audio file to be broadcast to the audio publishing terminal through the MQTT proxy server according to the broadcast parameters includes: Convert the text file into a corresponding audio file; Send the corresponding audio file to the audio publishing terminal through the MQTT proxy server according to the broadcast parameters; Wherein, the MQTT-based audio publishing method further includes: The network status of the terminal device collected by the network management collection server is obtained through the MQTT proxy server.

3. The MQTT-based audio publishing system according to claim 2, It is characterized in that The receiving of the audio file to be broadcast comprises: Receive the audio file to be broadcast uploaded by the user terminal through the MQTT proxy server; The MQTT proxy server feeds back the response information to the user terminal.

4. The MQTT-based audio publishing system according to claim 2, It is characterized in that The MQTT-based audio publishing method also includes: Obtain the audio request information to be published on each linkage platform through the MQTT proxy server.