Disclosure of Invention
The invention aims to provide a flower type splicing playing method, which aims to solve the problem that in the prior art, a controller is used for processing and displaying a signal source, and a special control terminal is required to be configured for processing the signal source, so that the cost of flower type splicing playing is high.
In a first aspect, an embodiment of the present invention provides a flower type splicing playing method, where a playing terminal includes a slave synchronization terminal and a master synchronization terminal, and the method includes:
receiving synchronous playing data information sent by a master synchronous terminal from a slave synchronous terminal, wherein the synchronous playing data information comprises a playing content ID;
the playing terminal analyzes the synchronous playing data information and acquires corresponding local resource data to be played according to the playing content ID;
and the playing terminal synchronously plays the local resource data according to the preset layout data of the display picture.
With reference to the first aspect, in a first possible implementation manner of the first aspect, the receiving, by the slave synchronization terminal, the synchronized playing data information sent by the master synchronization terminal includes:
establishing connection between a plurality of slave synchronous terminals and a master synchronous terminal;
and receiving the playing content ID sent by the master synchronization terminal from the slave synchronization terminal according to the corresponding relation between the position and the identifier of the slave synchronization terminal.
With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the multiple slave synchronization terminals and the master synchronization terminal are located in a same local area network, and the step of establishing a connection between the multiple slave synchronization terminals and the master synchronization terminal specifically includes:
the connection between the plurality of slave synchronization terminals and the master synchronization terminal is established through a socket, wherein the socket comprises the multicast address of the slave synchronization terminal or the master synchronization terminal.
With reference to the first possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the step of the playback terminal performing synchronous playback on the local resource data according to preset layout data of a display screen includes:
zooming the played picture of the local resource data according to the zooming information;
and shifting the zoomed picture to the opposite direction by coordinate offset, and rotating the shifted picture to the rotation angle of the display screen.
With reference to the first aspect, in a fourth possible implementation manner of the first aspect, before the step of performing synchronous playing on the local resource data by the playing terminal according to preset layout data of a display screen, the method includes:
the playing terminal analyzes the synchronous playing data information and judges whether the content needing to be played currently comprises synchronous playing identification information or not;
if the content to be played currently does not include the synchronous playing identification information, the local resource data corresponding to the playing content ID is played normally;
and if the content needing to be played currently comprises synchronous playing identification information, the playing terminal synchronously plays the local resource data according to preset layout data of a display picture.
In a second aspect, an embodiment of the present invention provides a flower type splicing playing device, where a playing terminal includes a slave synchronization terminal and a master synchronization terminal, and the device includes:
the system comprises a playlist acquisition unit, a synchronization terminal and a synchronization processing unit, wherein the playlist acquisition unit is used for receiving synchronous playing data information sent by a master synchronization terminal from the synchronization terminal, and the synchronous playing data information comprises a playing content ID;
the analysis unit is used for analyzing the synchronous playing data information by the playing terminal and acquiring corresponding local resource data to be played according to the playing content ID;
and the playing unit is used for the playing terminal to synchronously play the local resource data according to the preset layout data of the display picture.
With reference to the second aspect, in a first possible implementation manner of the second aspect, the playlist acquiring unit includes:
the connection establishing subunit is used for establishing the connection between the plurality of slave synchronous terminals and the master synchronous terminal;
and the data sending subunit is used for receiving the playing content ID sent by the master synchronization terminal from the slave synchronization terminal according to the corresponding relation between the position and the identifier of the slave synchronization terminal.
With reference to the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, the multiple slave synchronization terminals and the master synchronization terminal are located in a same local area network, and the connection establishing subunit is specifically configured to:
the connection between the plurality of slave synchronization terminals and the master synchronization terminal is established through a socket, wherein the socket comprises the multicast address of the slave synchronization terminal or the master synchronization terminal.
With reference to the first possible implementation manner of the second aspect, in a third possible implementation manner of the second aspect, the playing unit includes:
the zooming subunit is used for zooming the played picture of the local resource data according to the zooming information;
and the display data determining unit is used for shifting the zoomed picture to the opposite direction by the coordinate offset and rotating the shifted picture to the rotation angle of the display screen.
In a third aspect, an embodiment of the present invention provides a fancy splicing playing system, where the fancy splicing playing system includes a master synchronization terminal and a plurality of slave synchronization terminals connected to the master synchronization terminal, where:
the main synchronous terminal is used for sending synchronous playing data information to a plurality of slave synchronous terminals, the playing terminals analyze the synchronous playing data information, corresponding local resource data needing to be played are obtained according to playing content IDs in the synchronous playing data information, and the local resource data are synchronously played according to layout data of display pictures in the synchronous playing data information;
the slave synchronous terminal is used for receiving synchronous playing data information sent by the master synchronous terminal and the slave synchronous terminal, the playing terminal analyzes the synchronous playing data information, corresponding local resource data needing to be played is obtained according to playing content IDs in the synchronous playing data information, and the local resource data are synchronously played according to layout data of display pictures in the synchronous playing data information.
In the invention, synchronous playing data information is sent to the slave synchronous terminal through the master synchronous terminal in the playing terminal, the playing terminal searches local resources to be played according to the playing content ID in the synchronous playing data information, and the local resource data are synchronously played according to the layout data of the display pictures in the synchronous playing data information, so that fancy splicing playing can be finished by the synchronous playing data information in the playing terminal, an additional controller is not needed, and the playing cost is saved.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the invention aims to provide a flower type splicing playing method to solve the problem that the flower type splicing playing in the prior art is high in cost. In the existing fancy splicing playing technology, a special controller is needed to process a signal source, and the controller processes the signal source according to the splicing effect needed and then sends the processed image data to a corresponding display screen. The playing cost is high because a special controller is needed to process the image. The present invention will be described in detail with reference to the accompanying drawings.
Fig. 1 shows an implementation process of a fancy splicing playing method provided by an embodiment of the present invention, in the embodiment of the present invention, the playing terminal includes a slave synchronization terminal and a master synchronization terminal, and the method is detailed as follows:
in step S101, the slave synchronization terminal receives the synchronized playing data information sent by the master synchronization terminal, where the synchronized playing data information includes a playing content ID.
Specifically, the playing terminal in the embodiment of the present invention is a display screen for playing a fancy splicing effect. The playing terminal can be an intelligent television, and also can be other display screens with intelligent processing capacity, such as an independent spliced screen which is frequently used during spliced playing.
In the embodiment of the present invention, the master synchronization terminal and the slave synchronization terminal store the same video data, and the ID information of the video data is the same. Of course, when some of the terminals do not have the video data, the data transmitted by other terminals can be received in a synchronous manner.
In the embodiment of the present invention, the master synchronization terminal may be any one of the display terminals, and the slave synchronization terminals may be one or more of the display terminals, and are flexibly set according to the requirements of splicing and playing. The names of the master synchronization terminal and the slave synchronization terminal are determined according to the sending mode of the synchronous playing data information, namely, the synchronous playing data information is set to be sent to the slave synchronization terminal by the master synchronization terminal.
In the embodiment of the invention, the master synchronization terminal and the slave synchronization terminals establish communication connection, so that the master synchronization terminal sends the synchronous playing data information to each slave synchronization playing terminal.
The connection can be established in a wired or wireless manner. Preferably, as shown in fig. 2, when the WIFI communication modules are all disposed in the playback terminals, the master synchronization terminal and the slave synchronization terminals are connected to the same local area network through a router or a switch, so as to implement fast and effective data exchange. For example, the video resource can be rapidly distributed to each playing terminal through the local area network, and the synchronized playing data information is distributed from the master synchronizing terminal to each slave synchronizing terminal during playing control.
In the embodiment of the present invention, the communication between the master synchronization terminal and the slave synchronization terminal may be implemented in a socket manner, that is, the socket includes a multicast address of the master synchronization terminal or the slave synchronization terminal, the communication between the master synchronization terminal and the slave synchronization terminal is completed in a socket manner, and the synchronized playing data information may be quickly and effectively distributed to each playing terminal.
As an optional implementation manner, the synchronized playing data information may be a communication protocol agreed and commonly followed by the master synchronization terminal and the slave synchronization terminals, and is used to implement interaction of the synchronized playing data information, for example, the synchronized playing data information may be sent to all the slave synchronization terminals in the local area network in a broadcast or multicast manner through a UDP network protocol.
It can be understood that, in the embodiment of the present invention, layout data is stored in each of the playback terminals, and the layout data may also be stored in each of the playback terminals in advance according to a construction requirement, or may be sent to each of the playback terminals by a server, or of course, may also be sent to each of the slave synchronous playback terminals by a master playback terminal.
For example, as an example of a specific implementation of playing data synchronously in the embodiment of the present invention, the specific implementation may be: SE, status 1, unit 167 — 1, vi 567, pi1 586, pi2 583, ti 10
Wherein: SE is a protocol header, representing the beginning of the protocol;
status represents the synchronization state, 1 starts synchronization, 0 is not synchronous;
the unit may be a corresponding unit number ID in the playlist, multiple unit numbers may be set in the playback terminal through the stored playlist, multiple pieces of playback resource information may be set in different unit numbers, and 167_1 is the corresponding unit number ID;
vi means video task, and 567 means corresponding db _ ID, i.e. play content ID, for uniquely identifying the resource of the play terminal; ti is the time of the current video play in ms.
In order to enable the playing terminal to quickly find the resource to be played synchronously according to the received playing content ID, a playing list is arranged in the playing terminal, and the playing list stores multi-resource content of the playing terminal, such as video, images, background music, subtitles and the like. The playlist may be stored in each of the plurality of broadcast terminals, or the master synchronization terminal may update the playlist to each of the plurality of slave synchronization terminals.
The layout data refers to position data corresponding to a construction set position of the play terminal, and may include coordinate offset, a rotation angle, and zoom information of a display screen of the play terminal.
The layout data can enable each playing terminal to correspond to different layout data according to the construction requirements of the playing terminals. Fig. 3 is a schematic layout diagram of one of the flower mosaic displays. The rectangular frame a represents a size of the source picture to be played synchronously after zooming, wherein a zooming ratio of the rectangular frame a can be adjusted according to a fancy splicing style, for example, in the fancy splicing style, the outward vertex of the vertices located in the upper, lower, left, and right directions, for example, the upward vertex is located, or the downward vertex is located, the corresponding zooming ratio of the picture to be played synchronously needs to be increased. The size of each part in the zoomed source picture corresponds to the size of the display picture of the playing terminal.
As shown in the rectangular box B, C, D, E, F in fig. 3, in order to implement the fancy splicing of the playing terminals, any one of the playing terminals may be selected as the master synchronization terminal, and the other remaining playing terminals may be selected as the slave synchronization playing terminals, or of course, a separate master synchronization terminal may be additionally provided.
After scaling and adjusting the source images played synchronously, the playing terminals in the fancy splicing mode can all include image data to be played, and position data in the playing terminals need to be calculated for uniquely determining the image data information played in the playing terminals, specifically, coordinate offset and rotation angle of the playing terminals.
In an alternative embodiment, as shown in fig. 3, the coordinate offset of the play terminal is determined according to the coordinate of the upper left solution of the play terminal (other points, such as the coordinate of the center point and the coordinate of the upper right corner, may also be selected in the actual operation), for example, the lower left corner of the scaled source picture is set as the origin of coordinates, and then the coordinate corresponding to the upper left corner of each play terminal, that is, the coordinate offset of each play terminal, may be calculated according to the construction data.
The rotation angle is the angle change of the rotation angle of the playing terminal relative to the horizontal position after the construction setting.
Since the layout data of different playback terminals are different, different layout data need to be associated with the terminals. In the embodiment of the present invention, the layout data may be set to correspond to an identifier of the playback terminal, where the identifier of the playback terminal may be an equipment identifier number, or may be a socket formed by a port number and a multicast address.
In step S102, the playing terminal parses the synchronized playing data information, and obtains corresponding local resource data to be played according to the playing content ID.
Specifically, the parsing of the synchronous playing data information by the playing terminal includes parsing the synchronous playing data information by the master synchronous terminal and the slave synchronous terminal, that is, a playing content ID needs to be parsed according to the synchronous playing data information, or may further include layout data of a display frame of the playing terminal.
After the playing content ID is obtained, the corresponding playing resource needs to be found in combination with the corresponding relationship between the playing content ID and the playing resource stored in the play list of the playing terminal.
The resource information including videos, pictures, sounds and texts in the playing terminal is listed as a sample of one playing list in the embodiment of the invention and stored in an XM L file format.
When the playlist or the synchronous state data includes the synchronous state, the synchronous playing data information needs to be analyzed, and whether the content needing to be played currently includes synchronous playing identification information is judged;
if the content to be played currently does not include the synchronous playing identification information, the local resource data corresponding to the playing content ID is played normally;
and if the content needing to be played currently comprises synchronous playing identification information, the playing terminal synchronously plays the local resource data according to preset layout data of a display picture.
In step S103, the playing terminal synchronously plays the local resource data according to the preset layout data of the display screen.
The layout data of the display picture of the playing terminal can be sent to the slave synchronous terminal through the master synchronous terminal, and can also be stored in the playing terminal through a U disk or other data transfer modes. The master synchronization terminal updates the layout data to the slave synchronization terminal by synchronizing the play data information.
The playing terminals can obtain the playing picture content corresponding to each playing terminal according to the preset layout data of the display picture, including the scaling, the coordinate offset and the rotation angle. The method specifically comprises the following steps:
s1, zooming the played local resource data picture according to the zooming information;
and S2, shifting the zoomed picture by the coordinate offset amount in the opposite direction, and rotating the shifted picture to the rotation angle of the display screen.
And obtaining the size of the source picture when realizing fancy splicing playing according to the zooming information, wherein the size comprises the length and width dimensions of the source picture. The length and width of the source picture can be scaled according to the proportion of the source picture, and the proportion of the picture can be adjusted according to needs. For example, when the five splicing screens shown in fig. 3 are used for fancy splicing playing, the source screen needs to be enlarged by 10 times for playing, and then the screen of the local resource data in the playing terminal is enlarged by ten times.
The coordinate offset may be set to establish coordinates of the zoomed source picture, and the origin of coordinates is generally set to a vertex position of the zoomed picture, such as an upper left corner. In general, the position of the origin of coordinates relative to the position of the screen is a fixed value, and may be flexibly adjusted according to the needs. And taking the coordinate value of a certain point in the display screen of the preset playing terminal as the coordinate offset of the playing terminal. As shown in fig. 3, the upper left corner of the cast terminal is used as the coordinate offset of the cast terminal. Thereby determining the position of the cast terminal.
In the determined coordinate offset, the frame may be offset according to the coordinate offset, for example, the origin (0,0) is used as a reference point, and the coordinates of the display screen a are (a, b), so that the coordinate offset is performed on the display screen a, that is, the scaled frame is offset to the (-a, -b) position of the coordinates.
And according to the rotation angle of the display screen, rotating the shifted or zoomed picture by a corresponding angle, and then playing the rotated picture content.
It can be understood that, in the embodiment of the present invention, the scaling, the rotation, and the offset may be performed in any order, for example, the screen rotation may be performed, then the offset of the screen is performed, and finally the screen scaling is completed. It should be noted that the offset of the picture before and after zooming also changes accordingly.
Fig. 4 shows a schematic structural diagram of the fancy splicing playing apparatus provided by the embodiment of the present invention, which is detailed as follows:
in the fancy splicing playing device of the embodiment of the invention, the playing terminal comprises a slave synchronous terminal and a master synchronous terminal, and the device comprises:
a playlist obtaining unit 401, configured to receive, from a synchronization terminal, synchronous playing data information sent by a master synchronization terminal, where the synchronous playing data information includes a playing content ID;
an analyzing unit 402, configured to analyze the synchronous playing data information, and obtain corresponding local resource data to be played according to the playing content ID;
a playing unit 403, configured to perform synchronous playing on the local resource data according to preset layout data of a display screen.
Preferably, the playlist acquiring unit includes:
the connection establishing subunit is used for establishing the connection between the plurality of slave synchronous terminals and the master synchronous terminal;
and the data sending subunit is used for receiving the playing content ID sent by the master synchronization terminal from the slave synchronization terminal according to the corresponding relation between the position and the identifier of the slave synchronization terminal.
Preferably, the plurality of slave synchronization terminals and the master synchronization terminal are located in the same local area network, and the connection establishing subunit is specifically configured to:
the connection between the plurality of slave synchronization terminals and the master synchronization terminal is established through a socket, wherein the socket comprises the multicast address of the slave synchronization terminal or the master synchronization terminal.
Preferably, the play unit includes:
the zooming subunit is used for zooming the played picture of the local resource data according to the zooming information;
and the display data determining unit is used for shifting the zoomed picture to the opposite direction by the coordinate offset and rotating the shifted picture to the rotation angle of the display screen.
As shown in fig. 2, a flower-type splicing playing system provided in an embodiment of the present invention includes a master synchronization terminal and a plurality of slave synchronization terminals connected to the master synchronization terminal, where:
the main synchronous terminal is used for sending synchronous playing data information to a plurality of slave synchronous terminals, the playing terminals analyze the synchronous playing data information, corresponding local resource data needing to be played are obtained according to playing content IDs in the synchronous playing data information, and the local resource data are synchronously played according to layout data of display pictures in the synchronous playing data information;
the slave synchronous terminal is used for receiving synchronous playing data information sent by the master synchronous terminal and the slave synchronous terminal, the playing terminal analyzes the synchronous playing data information, corresponding local resource data needing to be played is obtained according to playing content IDs in the synchronous playing data information, and the local resource data are synchronously played according to layout data of display pictures in the synchronous playing data information.
The fancy splicing playing device and the fancy splicing playing system in the embodiment of the invention correspond to the fancy splicing playing method in fig. 1-3, and repeated description is omitted here.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.