Disclosure of Invention
In view of this, the embodiment of the invention provides a method for offline processing of a timing broadcast task and a supported broadcast system.
The first aspect of the present invention provides a method for offline processing of a timed broadcast task, comprising the steps of:
editing a timing broadcasting task on a broadcasting host to generate a timing broadcasting file, wherein the timing broadcasting file is provided with a version number;
Each broadcasting terminal respectively judges whether the version number issued by the broadcasting host is consistent with the version number of a broadcasting file stored by the broadcasting terminal locally at a fixed time; downloading the timed broadcast file from the broadcast host when the version number issued by the broadcast host is inconsistent with the version number of the timed broadcast file stored locally by the broadcast terminal;
And when the version number issued by the broadcasting host is consistent with the version number of the timing broadcasting file locally stored by the broadcasting terminal or the broadcasting terminal finishes downloading the timing broadcasting file, each broadcasting terminal respectively executes the timing broadcasting task.
Further, the editing timing broadcasting task specifically includes the following steps:
adding a timing scheme, wherein the timing scheme comprises a plurality of timing points;
Selecting the audio pointed by each timing point, and editing the playing start time and the playing end time of the audio;
selecting a timing point type and an audio playing mode of each timing point;
Selecting target broadcast terminals of each timing point, and setting the playing volume of each target broadcast terminal for playing the audio with the timing point;
and packaging the timing scheme into a timing broadcast file and generating a version number of the timing broadcast file.
Further, the broadcasting terminal downloads the timed broadcast file from a broadcasting host, and specifically includes the following steps:
Sending a timed broadcast file downloading request to a broadcast host;
After receiving a timing broadcast file downloading response returned by a broadcast host, downloading the timing broadcast file;
analyzing the downloaded timing broadcast file, and determining a timing point required to be executed by a broadcast terminal as a target timing point;
Generating a timing point audio list file according to the audio names pointed by each target timing point, wherein the timing point audio list file records the audio pointed by the target timing point by using an audio ID;
And downloading at least one timing point audio file from the broadcasting host according to the timing point audio list file, wherein each timing point audio file corresponds to one audio ID in the timing point audio list file.
Further, the analyzing the downloaded timing broadcast file, determining a timing point to be executed by the broadcast terminal as a target timing point, specifically includes the following steps:
calling a local identifier of a broadcast terminal;
a target broadcast terminal for analyzing each timing point in the timing broadcast file;
And using the local identifier to perform matching in the target broadcast terminal of each timing point, and taking the timing point successfully matched as a target timing point.
Further, for each of the broadcast terminals, performing the timed broadcast task specifically includes the steps of:
reading a first target timing point in the timing scheme;
When the playing start time of the target timing point audio is reached, playing the audio pointed by the target timing point in an audio playing mode and a playing volume set by the target timing point until the playing end time of the target timing point audio is reached;
And reading the next target timing point in the timing scheme, and returning to the playing start time of the audio reaching the target timing point, and playing the audio pointed by the target timing point in the audio playing mode and the playing volume set by the target timing point until all the target timing points in the timing scheme are executed.
Further, before the step of the first target timing point in the read timing scheme, the method further comprises the following steps:
Judging whether the broadcasting terminal is in an offline state, and when the broadcasting terminal is not in the offline state, not executing the step of reading the first target timing point in the timing scheme.
Further, the audio playing mode specifically comprises a sequential playing mode, a cyclic playing mode and a random playing mode, and the audio pointed by the target timing point is played by the audio playing mode and the playing volume set by the target timing point specifically comprises the following steps:
When the audio playing mode is a sequential playing mode, calling the audio pointed by the target timing point one by one according to the audio IDs arranged in the target timing point to play;
When the audio playing mode is a cyclic playing mode, calling the audio pointed by the target timing point one by one according to the audio IDs arranged in the target timing point to play;
And when the audio playing mode is a random playing mode, randomly calling the audio pointed by the target timing point to play.
The second aspect of the invention discloses a broadcasting system supporting offline timing tasks, which comprises a broadcasting host and a broadcasting terminal;
The broadcasting host is loaded with a timed task editing system, and a timed broadcasting file is generated by editing timed broadcasting tasks on the broadcasting host through the timed task editing system;
the broadcasting host and the broadcasting terminal establish a data transmission channel, and the timed broadcasting file is issued to the broadcasting terminal through the data connection channel;
when the data transmission channels of the broadcasting host and the broadcasting terminal are interrupted, the broadcasting terminal can execute the timing broadcasting task according to the stored timing broadcasting file.
Further, the broadcasting terminal comprises a core control module, a power amplification module, a clock module and a storage module;
When the broadcasting host is connected with a data transmission channel of a broadcasting terminal, the core control module synchronizes the time of the clock module through the data transmission channel, downloads the timing broadcasting task and stores the timing broadcasting task in the storage module;
When the data transmission channels of the broadcasting host and the broadcasting terminal are interrupted, the core control module calls the timing broadcasting task from the storage module according to the time of the clock module, and decodes the audio of the timing broadcasting task into an analog signal to be played through the power amplification module.
Further, an electric energy storage device is arranged in the clock module, and the timing of the clock module is maintained through the electric energy storage device when the broadcasting terminal is powered down.
Embodiments of the present invention also disclose a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The computer instructions may be read from a computer-readable storage medium by a processor of a computer device, and executed by the processor, to cause the computer device to perform the foregoing method.
The embodiment of the invention has the beneficial effects that the off-line processing method of the timing broadcasting task and the supported broadcasting system of the invention generate the timing broadcasting task at the broadcasting host side and back up the timing broadcasting task at the broadcasting terminal side, and when the broadcasting terminal is in an off-line state due to the network problem between the broadcasting terminal and the broadcasting host, the local back-up timing broadcasting task can be called for timing broadcasting. The invention overcomes the defect that the prior broadcasting system can not trigger the timing broadcasting in the off-line state, and ensures the orderly operation and life of the broadcasting system user.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The timing broadcasting function of the existing digital IP broadcasting system can execute the broadcasting tasks set in advance at fixed points in a timing way under the condition that the IP broadcasting server and the IP broadcasting terminal network are kept clear. Once the network between the broadcasting host and the broadcasting terminal has problems such as switch damage, network cable failure, etc., the network terminal is in an off-line state and is not controlled by the broadcasting host, and cannot normally execute the timing broadcasting task. The inability of the timed task to perform daily work and rest management arrangements necessarily affects the user, which is very significant.
In view of the above problems, the embodiments of the present invention provide a method for offline processing of a timed broadcast task and a supported broadcast system.
The first embodiment of the present invention provides a method for offline processing of a timed broadcast task, as shown in fig. 1, including the following steps:
s1, editing a timing broadcasting task on a broadcasting host to generate a timing broadcasting file, wherein the timing broadcasting file has a version number;
S2, issuing version numbers to the broadcasting terminals through the broadcasting host, wherein each broadcasting terminal respectively judges whether the version numbers issued by the broadcasting host are consistent with the version numbers of the broadcasting files locally stored at the broadcasting terminal;
S3, when the version number issued by the broadcasting host is consistent with the version number of the timing broadcasting file locally stored by the broadcasting terminal or the broadcasting terminal finishes downloading the timing broadcasting file, each broadcasting terminal executes the timing broadcasting task respectively.
The off-line processing method for the timing broadcasting task is applied to a broadcasting system with a broadcasting host and a broadcasting terminal. Wherein the broadcast host is loaded with broadcast service software for the establishment, interaction, forwarding, control, audio stream processing forwarding, broadcast task editing, etc. of heartbeat packets for processing various broadcast instructions. The broadcasting host is connected with various broadcasting terminals with different functions through a network, and the timing broadcasting function is realized through the broadcasting terminals.
In step S1, as shown in fig. 2, the timed broadcast task is edited, specifically including the following steps:
s1-1, adding a timing scheme, wherein the timing scheme comprises a plurality of timing points. The timing scheme in the step is core control logic of the timing broadcasting task, which can be expressed as a time axis or a time sequence, and the broadcasting system user completes the setting of the timing broadcasting task by adding timing points in the timing scheme, wherein each timing point corresponds to a time node or a value in the time sequence on the time axis. The timing point has the number, associated audio ID, playing start time, playing end time, target broadcasting terminal, playing volume and other playing parameters, and the setting of the playing parameters of the timing point is completed in the timing task editing interface of the broadcasting host to generate a timing scheme.
S1-2, selecting the audio pointed by each timing point, editing the playing start time and the playing end time of the audio, and marking the audio pointed by the timing point by using an audio ID. This step is used to select the audio pointed by the timing point, i.e. the audio played by the broadcasting terminal when the timing point is performed, which may be a station announcement, music, bell, number, etc. In this embodiment, one timing point may point to a plurality of audios, and when the audio pointed by the timing point is selected, the corresponding audio ID is selected from the audio database and recorded on the timing point. In this embodiment, the playing start time of the audio represents the starting time of playing the audio, that is, the real time reaches the preset playing start time, that is, the audio pointed by the playing timing point, and the playing end time represents the time when the playing timing point points to the audio, that is, the real time reaches the preset playing end time, that is, the audio pointed by the playing timing point is stopped.
S1-3, selecting a timing point type and an audio playing mode of each timing point.
In the embodiment of the invention, the timing point type is used for indicating the triggering period of the timing point, such as one-time triggering, daily triggering, fixed day triggering every week and the like, and the audio playing mode is used for indicating the playing mode of the audio between the playing start time and the playing end time of the audio, wherein the playing mode comprises sequential playing, cyclic playing and random playing. The method comprises the steps of sequentially playing audio pointed by a timing point according to the audio ID sequence in the timing point, playing the audio pointed by the timing point in sequence on the basis of the sequential playing, and playing the audio pointed by the timing point in sequence by the audio ID of the timing point again to form a cycle after the audio pointed by the timing point is played on the basis of the sequential playing, wherein the random playing represents randomly extracting the audio pointed by the timing point played by the audio ID in the timing point.
S1-4, selecting target broadcast terminals at each timing point, setting the playing volume of the audio pointed by each target broadcast terminal playing timing point, and setting the audio pointed by the target broadcast terminal playing timing point.
Although the broadcasting host is connected to a plurality of broadcasting terminals in this embodiment, it is possible to set a timing task scheme for a specific broadcasting terminal in one timing scheme, for example, to set different timing task schemes for different school hours in a campus environment to play a school bell. Therefore, in this embodiment, the timing point needs to set the target broadcast terminal to which it points, record the local identifier of the target broadcast terminal, such as the terminal name, the physical address, etc., in the timing point, and set the playing volume of the audio to which the different broadcast terminals play the timing point, so as to adapt to the needs of the user.
S1-5, packaging the timing scheme into a timing broadcast file, and generating a version number of the timing broadcast file.
After the setting of the timing scheme is completed, the user packages the timing scheme into timing broadcast files and stores the timing broadcast files on the broadcast host, and simultaneously, each timing broadcast file is identified by a unique version number.
S2, the version numbers are issued to the broadcasting terminals through the broadcasting host, each broadcasting terminal respectively judges whether the version numbers issued by the broadcasting host are consistent with the version numbers of the timing broadcasting files locally stored by the broadcasting terminal, and when the version numbers issued by the broadcasting host are inconsistent with the version numbers of the timing broadcasting files locally stored by the broadcasting terminal, the timing broadcasting files are downloaded from the broadcasting host.
For each broadcasting terminal, the old version of timing broadcasting files may be stored, different timing points may affect each other between different timing broadcasting files, and one side of the broadcasting terminal cannot realize the perception of the timing task files of the broadcasting terminal. Therefore, when the broadcasting terminal and the broadcasting host are in a connection state, the broadcasting host can issue the version number of the latest timing broadcasting file to the broadcasting terminal, and the version number issued by the broadcasting host is compared with the version number of the timing broadcasting file locally stored by the broadcasting terminal at one side of the broadcasting terminal to judge whether the version number is consistent or not. If the version numbers are inconsistent, the broadcasting terminal needs to download the latest version of the timing broadcasting file from the broadcasting host and replace the timing broadcasting file stored locally.
As shown in fig. 3, the broadcasting terminal downloads a timed broadcast file from a broadcasting host, and specifically includes the following steps:
s2-1, sending a timed broadcast file downloading request to a broadcast host;
s2-2, after receiving a timed broadcast file downloading response returned by the broadcasting host, downloading the timed broadcast file.
In the embodiment of the invention, the broadcasting terminal is connected with the download server of the broadcasting host side through the TCP reliable connection protocol, logs in and downloads the latest timing broadcasting file.
S2-3, analyzing the downloaded timing broadcast file, and determining a timing point required to be executed by the broadcast terminal as a target timing point.
After the timed broadcast file is downloaded, the broadcast terminal analyzes the timed broadcast file to determine the timing point to be executed by the broadcast terminal, and the method specifically comprises the following steps:
S2-3-1, calling a local identification of the broadcasting terminal.
S2-3-2, analyzing the target broadcasting terminal of each timing point in the timing broadcasting file.
S2-3-3, using the local identification to match in the target broadcast terminal of each timing point, and taking the timing point of successful matching as the target timing point.
In this embodiment, each broadcast terminal is used for a unique local identifier, such as a terminal name, a physical address, and the like. After analyzing the target broadcast terminal of each timing point of the timing broadcast file, comparing the target broadcast terminal with the local identifier stored locally in the broadcast terminal, and screening out the timing point of the target broadcast terminal, which is used as the target timing point.
S2-4, generating a timing point audio list file according to the audio names pointed by each target timing point, wherein the timing point audio list file records the audio pointed by the target timing point by using the audio ID.
In this embodiment, after the target timing point is obtained by parsing, the song ID recorded at the target timing point is further extracted and the deduplication operation is performed, so as to generate the timing point audio list file. In this embodiment, all the directional audio of the target timing point is recorded in the timing point audio list file in the form of audio ID, and when the broadcasting terminal performs the timing task, all the directional audio can be found by reading the timing point audio list file.
S2-5, downloading at least one timing point audio file from the broadcasting host according to the timing point audio list file, wherein each timing point audio file corresponds to one audio ID in the timing point audio list file.
In this embodiment, the audio pointed by the target timing point is not necessarily stored on the broadcast terminal side. Therefore, in addition to the audio locally stored by the broadcasting terminal, at least one audio file of the timing point needs to be downloaded from the broadcasting host, so that all the audio of the target timing point is cached at one side of the broadcasting terminal and can be played without being connected with the broadcasting host.
In the embodiment, the timing broadcast file, the timing point audio list file and the timing point audio file are stored in a storage module of the broadcast terminal, and when the broadcast terminal executes an offline broadcast task, the corresponding file is called to analyze or play.
S3, when the version number issued by the broadcasting host is consistent with the version number of the timing broadcasting file locally stored by the broadcasting terminal or the broadcasting terminal finishes downloading the timing broadcasting file, each broadcasting terminal executes the timing broadcasting task respectively.
As shown in fig. 4, for each broadcast terminal, performing a timed broadcast task specifically includes the steps of:
s3-1, reading a first target timing point in a timing scheme;
S3-2, when the playing start time of the audio at the target timing point is reached, playing the audio pointed by the target timing point in an audio playing mode and a playing volume set by the target timing point until the playing end time of the audio at the target timing point is reached;
S3-3, reading the next target timing point in the timing scheme, returning to the playing start time of the audio reaching the target timing point, and playing the audio pointed by the target timing point in the audio playing mode set by the target timing point and the playing volume until all the target timing points in the timing scheme are executed.
In some embodiments, before the step of reading the first target timing point in the timing scheme at step S3-1, the method further comprises the steps of:
S3-0, judging whether the broadcasting terminal is in an offline state, and when the broadcasting terminal is not in the offline state, not executing the step of reading the first target timing point in the timing scheme. The step is set to avoid conflict between the timing task stored by the broadcasting terminal and the playing control of the broadcasting host, when the broadcasting host is connected with the broadcasting terminal, the broadcasting terminal does not execute any off-line broadcasting task by default, the playing control of the broadcasting terminal is completely regulated and controlled by the broadcasting host,
In step S3-3 of the embodiment of the invention, the audio playing mode comprises a sequential playing mode, a cyclic playing mode and a random playing mode, wherein the audio playing mode set by the target timing point and the audio pointed by the playing volume playing target timing point comprise the following steps:
S3-3-1, when the audio playing mode is a sequential playing mode, calling the audio pointed by the target timing point one by one according to the audio IDs arranged in the target timing point to play;
S3-3-2, when the audio playing mode is a cyclic playing mode, calling the audio pointed by the target timing point one by one according to the audio IDs arranged in the target timing point to play;
S3-3-3, when the audio playing mode is a random playing mode, randomly calling the audio pointed by the target timing point to play.
And after the broadcasting terminal reaches the playing start time of the timing point, playing the audio pointed by the target timing point according to the set audio playing mode and the playing volume until reaching the playing stop time, and then playing the timing scheme of the next timing point.
By the off-line processing method of the timing broadcasting task, the broadcasting terminal can still execute the edited timing broadcasting task on the broadcasting host according to the point in time when losing connection with the broadcasting host, and the problem that the timing task is not executed after the network is broken and the work and rest management time arrangement of a user is affected is avoided.
A second embodiment of the present invention discloses a broadcasting system supporting an offline timing task, as shown in fig. 5, including a broadcasting host and a broadcasting terminal. The broadcasting host is loaded with a timing task editing system, a timing broadcasting task is edited on the broadcasting host through the timing task editing system to generate a timing broadcasting file, the broadcasting host and a broadcasting terminal establish a data transmission channel, the timing broadcasting file is issued to the broadcasting terminal through a data connection channel, and the broadcasting terminal can execute the timing broadcasting task according to the stored timing broadcasting file when the data transmission channels of the broadcasting host and the broadcasting terminal are interrupted.
Specifically, the broadcast terminal comprises a core control module, a power amplifier module, a clock module and a storage module;
when the broadcasting host is connected with the data transmission channel of the broadcasting terminal, the core control module synchronizes the time of the clock module through the data transmission channel, downloads the timing broadcasting task and stores the timing broadcasting task in the storage module;
When the data transmission channels of the broadcasting host and the broadcasting terminal are interrupted, the core control module calls the timing broadcasting task from the storage module according to the time of the clock module, decodes the audio of the timing broadcasting task into an analog signal and plays the analog signal through the power amplification module.
Fig. 6 shows a hardware design of the broadcasting terminal of the present invention. The core control module can be an MCU chip, and is connected with the clock module, so that the current time can be displayed in real time. The core control module is connected with the storage module to store various parameters of the timing broadcast file, the audio file, the application program and the terminal, and the storage module can be NAND F L ASH external flash memory chips or external SD cards. In this embodiment, the core control module may perform TCP/IP communication with the broadcast host through the network port connection switch, and receive the control instruction issued by the broadcast host and time broadcast files. The core control module is connected with the power amplifier module through the DAC, decodes the audio file into an analog signal and sends the analog signal to the power amplifier module for sound expansion broadcasting.
In the embodiment of the invention, as shown in fig. 7, a 5V power supply supplies power to a clock chip U7 when a broadcast terminal supplies power normally, a 3.3V power supply is connected with a D1 germanium diode 2AP9 to charge a battery B1, and when the IP broadcast terminal is powered down, the 5V power supply and the 3.3V are both 0V voltages, at this time, the battery B1 supplies power to the clock chip U7 through a 3 pin of U7 to maintain the normal timing of the clock chip U7. The clock module can maintain the timing of the clock module through the electric energy storage device when the broadcasting terminal is powered down, and the triggering judgment of the timing broadcasting task is not affected.
The off-line processing method for the timed broadcast task of the first embodiment of the invention is applied to the broadcast system supporting the off-line timed task of the second embodiment. The content of the offline processing method in this embodiment is applicable to the embodiment of the broadcast system, and the functions specifically implemented by the embodiment of the broadcast system are the same as those of the embodiment of the offline processing method, and the achieved beneficial effects are the same as those of the embodiment of the offline processing method.
In some alternative embodiments, the functions/acts noted in the block diagrams may occur out of the order noted in the operational illustrations. For example, two blocks shown in succession may in fact be executed substantially concurrently or the blocks may sometimes be executed in the reverse order, depending upon the functionality/acts involved. Furthermore, the embodiments presented and described in the flowcharts of the present invention are provided by way of example in order to provide a more thorough understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed, and in which sub-operations described as part of a larger operation are performed independently.
Furthermore, while the invention is described in the context of functional modules, it should be appreciated that, unless otherwise indicated, one or more of the described functions and/or features may be integrated in a single physical device and/or software module or one or more functions and/or features may be implemented in separate physical devices or software modules. It will also be appreciated that a detailed discussion of the actual implementation of each module is not necessary to an understanding of the present invention. Rather, the actual implementation of the various functional modules in the apparatus disclosed herein will be apparent to those skilled in the art from consideration of their attributes, functions and internal relationships. Accordingly, one of ordinary skill in the art can implement the invention as set forth in the claims without undue experimentation. It is also to be understood that the specific concepts disclosed are merely illustrative and are not intended to be limiting upon the scope of the invention, which is to be defined in the appended claims and their full scope of equivalents.
It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of techniques known in the art, discrete logic circuits with logic gates for implementing logic functions on data signals, application specific integrated circuits with appropriate combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the spirit and scope of the invention as defined by the appended claims and their equivalents.
While the preferred embodiment of the present application has been described in detail, the present application is not limited to the embodiments described above, and those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present application, and these equivalent modifications or substitutions are included in the scope of the present application as defined in the appended claims.