Synchronous playing method of advertisement player

文档序号:1524367 发布日期:2020-02-11 浏览:9次 中文

阅读说明:本技术 一种广告机的同步播放方法 (Synchronous playing method of advertisement player ) 是由 谢东 陈在冬 曹堂金 于 2019-12-06 设计创作,主要内容包括:本发明公开了一种广告机的同步播放方法,包括:步骤S100:对需要同步播放的多个广告机进行无线组网;步骤S200:多个广告机采用NTP协议进行时间同步;步骤S300:每个广告机在同一时间开始播放素材,并且在前一个素材播放完成前,对下一个素材进行预加载,然后等到下一个素材的播放起始点到达时,继续播放预加载完成的素材。本发明通过将多台广告机通过无线AP建立局域网,采用时间同步协议及预加载播放模式,使各个广告机设备保持同一时刻同步播放同一素材,素材包括图片、视频,解决了广告机的同步播放,且不受场景限制,且没有引入干扰信号,保证了本地时间一致、加载时间一致,同步效果好。(The invention discloses a synchronous playing method of an advertising player, which comprises the following steps: step S100: carrying out wireless networking on a plurality of advertisement machines which need to be played synchronously; step S200: the multiple advertising machines adopt NTP protocol to carry out time synchronization; step S300: each advertisement machine starts to play the materials at the same time, preloads the next material before the previous material is played, and then continues to play the preloaded material when the playing starting point of the next material is reached. According to the invention, a plurality of advertisement machines are established into a local area network through a wireless AP, and a time synchronization protocol and a preloading play mode are adopted, so that each advertisement machine device keeps the same time to synchronously play the same material, wherein the material comprises pictures and videos, the synchronous play of the advertisement machines is solved, the problem of scene limitation is solved, no interference signal is introduced, the consistency of local time and loading time is ensured, and the synchronization effect is good.)

1. A synchronous playing method of an advertising player is characterized by comprising the following steps:

step S100: carrying out wireless networking on a plurality of advertisement machines which need to be played synchronously;

step S200: the multiple advertising machines adopt NTP protocol to carry out time synchronization;

step S300: each advertisement machine starts to play the materials at the same time, preloads the next material before the previous material is played, and then continues to play the preloaded material when the playing starting point of the next material is reached.

2. The method for synchronously playing the advertisement player according to claim 1, wherein the step S200 specifically comprises:

step S210: a client on the advertising player sends an NTP message to a server, wherein the NTP message carries a timestamp T1 when the client leaves;

step S220: when the NTP message reaches the server, the server adds a timestamp T2 of the server; when the response message of the NTP message leaves the server, the server adds a timestamp T3 of the server;

step S230: when the client receives the response message, the local time of the client is T4;

step S240: calculating the time difference between the client and the server:

T2=T1+t+d/2;

T2-T1=t+d/2;

T4=T3-t+d/2;

T3-T4=t-d/2;

where t is the time offset between the client and the server and d is the round trip time between the client and the server, which can be obtained,

d=(T4-T1)-(T3-T2);

t=((T2-T1)+(T3-T4))/2;

step S250: the plurality of advertisement machines synchronize the system clocks according to the respective time offsets t.

3. The method for synchronously playing the advertisement player according to claim 1 or 2, wherein the step S300 specifically comprises:

step S310: firstly, initializing the playing time of a first playing material from a playing list, calculating the playing starting time point of the next material according to the playing time and the playing duration of the first playing material, and similarly, obtaining the playing time points of all the materials in the current playing list;

step S320: initializing a foreground player to start playing a first material in front of an interface;

step S330: starting up to preload the next material when the playing is S seconds before the end of the current material, and pausing the playing when the material is loaded and rendered to the first frame;

step S340: when the playing starting time point of the preloaded material is reached, closing the foreground player, displaying the preloaded player and continuing to play the material;

step S350: the steps S330 to S340 are repeatedly executed until all the material is played.

Technical Field

The invention relates to the technical field of advertising machines, in particular to a synchronous playing method of an advertising machine.

Background

With the continuous development and application of advertisement machine technology, the advertisement machine gradually moves into office buildings and communities, and the acquisition of advertisement information through the advertisement machine becomes an essential part of people's life. In actual needs, a plurality of advertisement machines which require playing can realize synchronous playing. The method for realizing the synchronous playing of the multimedia advertising player in the market at present mainly comprises two types of hardware realization and software realization: 1) the hardware implementation is that the output signal of the playing box of the advertising player is divided into a plurality of display screens by hardware for display, namely a plurality of displays simultaneously display the signal output by one playing box, thereby achieving the synchronous effect, but the construction difficulty is large in certain scenes (such as office buildings) and the cost is high; 2) the software realizes the method adopted in the market at present: when one starts playing, the message is sent to other equipment immediately, the realization is simpler, but the flexibility is not good, and the mode easily introduces interference signals to cause the display effect of the display screen to be influenced. And the method for synchronously playing the advertisements by the advertisement player according to the time labels has the advantages that the synchronous playing depends on the local time of each advertisement player terminal, and the synchronous effect is not good due to the reasons of delay of received messages, inconsistent loading time, asynchronous local time and the like.

Disclosure of Invention

The invention aims to provide a synchronous playing method of an advertising player, which is used for solving the problems that the cost is high when hardware is adopted for synchronous playing of the advertising player in the prior art, and the effect is poor when software is adopted for synchronous playing.

The invention solves the problems through the following technical scheme:

a synchronous playing method of an advertising player comprises the following steps:

step S100: carrying out wireless networking on a plurality of advertisement machines which need to be played synchronously;

step S200: the multiple advertising machines adopt NTP protocol to carry out time synchronization;

step S300: each advertisement machine starts to play the materials at the same time, preloads the next material before the previous material is played, and then continues to play the preloaded material when the playing starting point of the next material is reached.

According to the invention, a plurality of advertisement machines are established into a local area network through a wireless AP, and a time synchronization protocol and a preloading play mode are adopted, so that each advertisement machine device keeps the same time to synchronously play the same material, wherein the material comprises pictures and videos, the synchronous play of the advertisement machines is solved, the problem of scene limitation is solved, no interference signal is introduced, the consistency of local time and loading time is ensured, and the synchronization effect is good.

Further, the networking performs two modules of time synchronization and pre-loading playing to assist each other to implement the synchronization method, where step S200 specifically includes:

step S210: a client on the advertising player sends an NTP message to a server, wherein the NTP message carries a timestamp T1 when the client leaves;

step S220: when the NTP message reaches the server, the server adds a timestamp T2 of the server; when the response message of the NTP message leaves the server, the server adds a timestamp T3 of the server;

step S230: when the client receives the response message, the local time of the client is T4;

step S240: calculating the time difference between the client and the server:

T2=T1+t+d/2;

T2-T1=t+d/2;

T4=T3-t+d/2;

T3-T4=t-d/2;

where t is the time offset between the client and the server and d is the round trip time between the client and the server, which can be obtained,

d=(T4-T1)-(T3-T2);

t=((T2-T1)+(T3-T4))/2;

step S250: the plurality of advertisement machines synchronize the local time according to the respective time offsets t.

NTP (Network Time Protocol) is a Protocol used to Time synchronize the various computers in a Network. Its purpose is to synchronize the computer clock to the universal coordinated time UTC, its precision can reach 0.1ms in the local area network, and its precision can reach 1-50ms in most places on the Internet. It can provide high precision time correction and can use encryption confirmation mode to prevent malicious protocol attack. NTP has multiple modes of operation: client/server mode, peer mode, broadcast mode, multicast mode. The method uses a client/server mode for time synchronization, a host is used as a server, and a slave is used as a client.

Further, the step S300 specifically includes:

step S310: firstly, initializing the playing time of a first playing material from a playing list, calculating the playing starting time point of the next material according to the playing time and the playing duration of the first playing material, and similarly, obtaining the playing time points of all the materials in the current playing list;

step S320: initializing a foreground player to start playing a first material in front of an interface;

step S330: starting up to preload the next material when the playing is S seconds before the end of the current material, and pausing the playing when the material is loaded and rendered to the first frame;

step S340: when the playing starting time point of the preloaded material is reached, closing the foreground player, displaying the preloaded player and continuing to play the material;

step S350: the steps S330 to S340 are repeatedly executed until all the material is played.

Compared with the prior art, the invention has the following advantages and beneficial effects:

according to the NTP time synchronization protocol, a host time error calculated by equipment between local area networks is within 10ms, under the condition of the same equipment and the same firmware, a playing time error between a plurality of pieces of equipment is within 100ms, and the asynchronous effect cannot be seen by naked eyes; because only the application layer software scheme is adopted, system layer codes do not need to be modified, extra hardware equipment does not need to be added, the cost is reduced, and the synchronization effect is obvious.

Drawings

FIG. 1 is a schematic time synchronized timestamp loading of the present invention;

FIG. 2 is a schematic diagram of time difference calculation of time synchronization according to the present invention;

FIG. 3 is a flow chart of preloading a playback mode according to the present invention.

Detailed Description

The present invention will be described in further detail with reference to examples, but the embodiments of the present invention are not limited thereto.

9页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种跨屏互动方法及系统、终端设备及后端服务器

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类