Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
In order to make those skilled in the art better understand the technical solutions provided by the embodiments of the present application, a brief description is first given below of a system architecture to which the embodiments of the present application are applicable.
Referring to fig. 1, a schematic diagram of a structure of a character overlay system according to an embodiment of the present disclosure is shown in fig. 1, where the character overlay system may include a control host and a plurality of output devices; wherein:
the control host may be configured to acquire the character string display parameters, and control, according to the acquired character string display parameters, some of the output devices and all of the output devices to output dot matrix data corresponding to the character string, so as to implement character superposition.
The output devices in the system for superimposing the video character by taking the video character superimposing scene as an example character can be respectively used for outputting the dot matrix data corresponding to the character string to the corresponding screen in the screen wall.
The control host can determine the position information (position information of a character window in the screen wall) displayed by the character string in the screen wall according to the character string display parameters to determine a screen needing character display in the screen wall, and determine the output device needing to output the dot matrix data corresponding to the character string according to the corresponding relation between the screen and the output device, and further, the control host can send the dot matrix data corresponding to the character string to the determined output device needing dot matrix data output corresponding to the character string, and control the output device to output the dot matrix data corresponding to the character string, so as to realize character superposition at the specified position of the screen wall.
For convenience of description and understanding, a screen wall video character superposition scene is taken as an example for description, but it should be appreciated that the character superposition scheme provided by the embodiment of the present application is not limited to the screen wall video character superposition scene.
In order to make the aforementioned objects, features and advantages of the embodiments of the present application more comprehensible, embodiments of the present application are described in detail below with reference to the accompanying drawings.
Referring to fig. 2, a schematic flow chart of a character superimposing method according to an embodiment of the present application is shown, where the character superimposing method may be applied to a control host, and as shown in fig. 2, the character superimposing method may include the following steps:
step S200, obtaining character string display parameters, wherein the character string display parameters comprise character strings and display position information.
In the embodiment of the application, the character string display parameters can be transmitted to the control host through the client.
For example, the control host may be logged in by a client running on a PC (Personal Computer), and the character string display parameter may be passed to the control host.
The character string display parameter may include, but is not limited to, a character string, display position information, and the like.
Alternatively, the display position information may include a position parameter (coordinates of the character window in the screen wall, such as a position of any vertex or center point of the character window in the screen wall), a width parameter (width and height of the character window), and a position of the character window in the screen wall may be determined by the position parameter and the width parameter.
It should be appreciated that, in the embodiment of the present application, the determining the position of the character window in the screen wall through the position parameter and the width and height parameter is only a specific example of determining the position of the character window in the screen wall, and is not limited to the protection scope of the present application.
Step S210, determining target output equipment for outputting character strings according to the display position information; wherein the target output device comprises at least one output device.
In the embodiment of the application, after the control host acquires the character string display parameters, the control host may determine the position of the character window in the screen wall according to the display position information, determine a screen on which characters need to be displayed according to the position of the character window in the screen wall, and further determine an output device (referred to as a target output device herein) on which characters need to be output.
Step S220, sending the dot matrix data corresponding to the character string to a target output device, so that the target output device outputs the dot matrix data corresponding to the character string.
In the embodiment of the application, after the control host determines the target output device for outputting the character string, the dot matrix data corresponding to the character string can be sent to the target output device, and the dot matrix data corresponding to the character string is output by the target output device, so that character superposition is realized.
It can be seen that, in the method flow shown in fig. 2, the control host controls the output of the character strings of the multiple output devices, when character superimposition is required, the control host acquires the character string display parameters, determines the target output device for outputting the character strings according to the display position information in the acquired character string display parameters, and sends the dot matrix data corresponding to the character strings to the target output device, and the target output device outputs the dot matrix data corresponding to the character strings, so that the character display of the multiple output devices is realized, the flexibility of character superimposition is improved, and the application scenario of character superimposition is expanded.
In one embodiment of the present application, the determining a target output device for outputting a character string according to the display position information may include:
determining the position of the character window in the screen wall according to the display position information;
determining a target screen for displaying the character window according to the position of the character window in the screen wall and the screen distribution of the screen wall;
and determining the output device corresponding to the target screen as the target output device.
In this embodiment, after the control host acquires the character string display parameter, the position of the serial port in the screen wall may be determined according to the display position information in the character string display parameter.
For example, the display position information may include coordinates of an upper left corner of the character window (coordinates in a screen wall coordinate system, such as coordinates with the upper left corner of the screen wall as a center origin, a horizontal direction to the right as an x-axis positive direction, and a vertical direction to the down as a y-axis positive direction) and a width and a height of the character window, and after the control host acquires the display position information, the position of the character window in the screen wall may be determined according to the coordinates of the upper left corner of the character window and the width and the height of the character window.
In this embodiment, after the control host determines the position of the character window in the screen wall, a screen (referred to herein as a target screen) for displaying the character window may be determined according to the position of the character window in the screen wall and the screen distribution of the screen wall.
In this embodiment, after the control host determines the target screen, the output device corresponding to the target screen may be determined as the target output device according to the correspondence between the output device and the screen.
Further, in this embodiment, after the control host determines the position of the character window in the screen wall, the block information of the character window, that is, the block information of the character window in each screen of each screen wall, may also be determined according to the position of the character window in the screen wall and the screen distribution of the screen wall.
For example, the tile information may include display coordinates and tile coordinates, where the display coordinates may be display positions of the tiles of the character window in the corresponding screen; the block coordinates may be division coordinates of the character window, such as horizontal division coordinates or/and vertical switching coordinates.
Taking the scene shown in fig. 3 as an example, assuming that the screen wall includes screens 1-4 (the screen distribution is shown in fig. 3), and the position of the character window in the screen wall is shown in fig. 3, the block coordinates of the block information may include division coordinates in the horizontal direction and the vertical direction, such as the ordinate of the horizontal direction dotted line and the abscissa of the vertical direction dotted line; the display coordinates of the tile information may include the display position of each tile in the corresponding screen, such as the display position of tile 1 in screen 1 (e.g., the top left corner coordinate and width and height), the display position of tile 2 in screen 2 …, and the display position of tile 4 in screen 4.
Accordingly, in an example, the sending the dot matrix data corresponding to the character string to the target output device may include:
sending the dot matrix data corresponding to the character string and the corresponding display parameters to target output equipment so that the target output equipment outputs the dot matrix data corresponding to the character string according to the display parameters; wherein the display parameter includes blocking information.
In this example, after the control host determines the blocking information of the character window, the dot matrix data corresponding to the character string and the corresponding display parameters may be sent to the target output device.
Taking the scenario shown in fig. 3 as an example, the control host may send the blocking information of the block 1 to the target output device corresponding to the screen 1, send the blocking information of the block 2 to the target output device … corresponding to the screen 2, and send the blocking information of the block 4 to the target output device corresponding to the screen 4.
In this example, after the target output device receives the dot matrix data corresponding to the character string sent by the control host and the corresponding display parameters, the dot matrix data corresponding to the character string may be divided according to the display parameters, and the corresponding block portion may be displayed at a designated position on the corresponding screen.
Still taking the scenario shown in fig. 3 as an example, after the target output device corresponding to the screen 1 receives the display parameter corresponding to the dot matrix data corresponding to the character string sent by the control host, the dot matrix data corresponding to the character string may be divided according to the block information, and a corresponding block portion (i.e., a block at the upper left corner after the dot matrix data corresponding to the character string is divided according to the division coordinates shown in fig. 3 (i.e., block 1)) is displayed at a specified position of the screen 1 (such as the position of block 1 shown in fig. 3).
It should be appreciated that, in the embodiment of the present application, the display parameter may include, in addition to the above-mentioned block information, other parameter information for displaying the character, which may include but is not limited to one or more of parameters such as mode information, foreground information, background information, moving mode, font size, moving speed, and moving direction, and a specific implementation thereof will be described below with reference to an example, and details of the embodiment of the present application are not repeated herein.
It should be noted that, in this embodiment of the application, the display parameters (display parameters other than the blocking information) sent by the control host to the target output device may be included in the character display parameters acquired by the control host, or may be pre-configured in the control host; or, part of the character display parameters acquired by the control host computer is included, and the other part of the character display parameters is configured in the control host computer in advance. For example, the parameter information is configured in advance in the control host (the value configured in advance is referred to as a default value), and the parameter information included in the character string display parameter acquired by the control host is used; for parameter information not included in the character string display parameter acquired by the control host, a default value may be used, and specific implementation thereof is not described herein.
Further, in the embodiment of the present application, it is considered that when character string output needs to be performed by a plurality of output devices, output synchronicity of the plurality of output devices needs to be ensured to ensure a character display effect.
Accordingly, in one embodiment of the present application, when the target output device includes a plurality of output devices, after the sending the dot matrix data corresponding to the character string to the target output device, the sending may include:
sending a display opening command to the target output equipment so that the target output equipment receiving the display opening command enters a locked state;
and when the target output devices are detected to be in the locked state, sending a display command to the target output devices so that the target output devices output the dot matrix data corresponding to the character strings.
In this embodiment, in order to ensure that each target output device synchronously outputs a character string, after the control host sends the dot matrix data corresponding to the character string to the target output device, the control host needs to control each target output device to synchronously output the corresponding dot matrix data.
Specifically, after the control host sends the dot matrix data corresponding to the character string to the target output device, a display start command may be sent to the target output device.
When the target output device receives the display opening command, the output display preparation processing can be carried out, and when the processing is completed, the target output device enters a locking state and waits for the display command of the control host.
After the main control host sends the display opening command to the target output devices, whether each target output device enters a locking state or not can be detected.
When the control host detects that the target output devices are all in the locked state, the control host may send a display command to the target output devices.
In one example, the target output device includes a plurality of output devices that join the same multicast group;
accordingly, the sending of the display command to the target output device may include:
and sending a display command to the multicast group in a multicast mode.
In this example, a plurality of output devices included in the target output device may join the target output devices into the same multicast group, and then the control host may send the display command to the multicast group in a multicast manner after detecting that each target output device enters the locked state, so that each target output device receives the display command synchronously.
In this embodiment, when each target output device receives a display command, it may output dot matrix data corresponding to the character string according to the display parameter.
In order to enable those skilled in the art to better understand the technical solutions provided in the embodiments of the present application, the following describes the technical solutions provided in the embodiments of the present application with reference to specific application scenarios.
Referring to fig. 4, an architecture schematic diagram of a specific application scenario provided in the embodiment of the present application is shown in fig. 4, where the application scenario may include a control host and a plurality of output devices, where different output devices correspond to different screens in a screen wall.
It should be noted that, in this embodiment, one output device corresponds to one screen as an example, but the present invention is not limited to this in practical application, for example, one output device may include a plurality of output ports, and one output port corresponds to one screen.
In this embodiment, the output device may include a DSP (Digital Signal Processing) module and an FPGA (Field-Programmable Gate Array) module; the output device can process the received data through the DSP module and output the data through the FPGA module.
Based on the application scenario shown in fig. 4, the implementation flow of the character superimposition scheme provided in the embodiment of the present application is as follows:
1. and the control host acquires the character string display parameters.
In this embodiment, the character string display parameter may be passed to the control host through the client; wherein, the character string display parameter may include, but is not limited to, the following parameters:
character string: the content and number of characters of the character string to be displayed.
A display mode: the mode of character display may include transparent, translucent, or fully overlaid.
Position parameters: coordinates of the character window in the screen wall (coordinates of any vertex or center point).
Width and height parameters: width and height of the character window.
Foreground and background: the foreground color (i.e., character color) and the background color (i.e., background color) of the character window.
Moving mode: the character moving mode may include normal or smooth, etc.
Font size: the amplification was 1, 2 and 4 times the initial value.
Moving speed: the character moving speed may include speed 1 or speed 2.
Moving direction: the character moving direction may include left to right, right to left, and the like.
It should be noted that, in this embodiment, only the movement of the character from left to right or from right to left is taken as an example for description, and the same principle for realizing the movement of the character in the vertical direction can be obtained, and details are not described in this embodiment of the application.
2. Control host computer for converting character string into dot matrix data
Referring to fig. 5, in this embodiment, when the control host obtains the character string display parameter, the character string may be converted into the dot matrix data according to the following process:
and step S500, determining the font size of each character in the character string according to the height of the window.
Step S510, converting each character in the character string into a dot matrix according to the maximum value of the font size of each character in the character string.
In this embodiment, after the control host determines the font size of each character in the character string according to the height of the window, the reference value for performing the lattice conversion may be determined according to the maximum value of the font size of each character in the character string.
In this embodiment, after the control host determines the reference value for performing the lattice conversion, each character in the character string may be converted from a national standard code to a Unicode code, and after each character is converted into a lattice, the lattice is stored in the applied cache area for storing lattice data.
And S520, splicing the dot matrixes corresponding to the characters into complete dot matrix data according to the actual positions of the characters.
In this embodiment, after the control host completes the lattice conversion of each character, the lattices corresponding to each character may be spliced into complete lattice data according to the actual position of the character.
3. Character display process
Referring to fig. 6, in this embodiment, the control host may implement the character display according to the following process:
and step S600, aligning the coordinates of the character window.
Step S610, initializing character window parameters.
In this embodiment, it is considered that the DSP module usually has specific requirements for the coordinates of the processed character window, for example, the width of the character window is required to be an integer multiple of 16 (pixel), and the height is required to be an integer multiple of 4 (pixel).
Therefore, in order to realize character display, the control host needs to align the coordinates of the character window to ensure that the coordinates of the DSP module sent to the output device meet the requirements, and initialize the parameters of the character window.
The initialized character window parameters may include, but are not limited to, an initialized font type (song style, regular style, and bold style), a font size, a font color, a background transparency, a character string moving speed, a moving smoothness, and the like.
Step S620, determining target output equipment for outputting the characters and the block information of the character windows according to the positions of the character windows in the screen wall and the screen distribution of the screen wall.
In this embodiment, the control host may determine a target output device for outputting the characters and the blocking information of the character window according to the position of the character window in the screen wall (which may be determined according to the position parameter and the width and height parameter) and the screen distribution of the screen wall.
The blocking information may include a display coordinate and a blocking coordinate, where the display coordinate may be a display position of each block of the character window in the corresponding screen; the block coordinates may be division coordinates of a character window of the character window, such as horizontal division coordinates or/and vertical switching coordinates.
In this embodiment, steps S600 to S620 may be executed before converting the character string into the dot matrix data, may be executed after converting the character string into the dot matrix data, and may also be executed concurrently with converting the character string into the dot matrix data, which is not limited in this embodiment of the present application.
And step S630, sending the dot matrix data and the corresponding block information to a target output device.
And step S640, sending a display opening command to the target output equipment.
And step S650, detecting whether the target output devices are all in a locked state. If yes, go to step S650; otherwise, go to step S660.
And step S660, sending a display command to the target output device.
In this embodiment, since the characters in the character window move in the horizontal direction, the DSP module of the target output device may perform vertical segmentation on the dot matrix data according to the block information, while the horizontal direction remains unchanged, and then issue the segmented dot matrix data to the FPGA module, and when receiving the display command, trigger the FPGA to superimpose the characters on the screen according to the set display parameters.
In this embodiment, the sending of the display start command is to notify the output devices to prepare for output display, and since the output devices are independent, if all the output devices are to output characters at the same time and the scrolling is synchronized, a unified command must be sent by the control host to trigger the output display, so that the synchronization effect can be achieved.
In this embodiment, the control host may use a clock card to synchronize, and each target output device joins a multicast address, and then the control host writes the display command to the multicast address. Before the control host sends the opening command, it needs to detect that all target output devices are in the locked state.
For example, the output port of the target output device joins the multicast after configuration, and then enters a locked state. Each character window of each screen wall has a corresponding multicast address, and the character windows can be controlled to be displayed on a plurality of output ports simultaneously by writing corresponding register values.
In this embodiment, a data flow diagram in the character superimposition process may be as shown in fig. 7.
It should be noted that, in the embodiment of the present application, since the character generation and control parameters are all operated on the control host, the modification capability is strong, the character can be edited at will, the usability is increased, and the position of the window and the speed of the character scrolling can be controlled, so that the character display is diversified.
In the embodiment of the application, the control host controls the character string output of the output devices, when character superposition is needed, the control host acquires the character string display parameters, determines the target output device for character string output according to the display position information in the acquired character string display parameters, and sends the dot matrix data corresponding to the character string to the target output device, and the target output device outputs the dot matrix data corresponding to the character string, so that the character display of the output devices is realized, the character superposition flexibility is improved, and the application scene of character superposition is expanded.
The methods provided herein are described above. The following describes the apparatus provided in the present application:
as shown in fig. 8, a schematic diagram of an apparatus for a character superimposing apparatus according to an embodiment of the present application is provided, where the character superimposing apparatus may be applied to the control host in the foregoing method embodiment, and as shown in fig. 8, the character superimposing apparatus may include:
an obtainingunit 810, configured to obtain a character string display parameter; the character string display parameters comprise character strings and display position information;
a determiningunit 820 for determining a target output device for character string output according to the display position information; wherein the target output device comprises at least one output device;
a sendingunit 830, configured to send the dot matrix data corresponding to the character string to the target output device, so that the target output device outputs the dot matrix data corresponding to the character string.
In an optional implementation manner, the determiningunit 820 is specifically configured to determine a position of a character window in a screen wall according to the display position information; determining a target screen for displaying the character window according to the position of the character window in a screen wall and the screen distribution of the screen wall; and determining the output equipment corresponding to the target screen as the target output equipment.
In an optional implementation manner, the determiningunit 820 is further configured to determine the blocking information of the character window according to the position of the character window in the screen wall and the screen distribution of the screen wall;
the sendingunit 830 is specifically configured to send the dot matrix data corresponding to the character string and the corresponding display parameter to the target output device, so that the target output device outputs the dot matrix data corresponding to the character string according to the display parameter; wherein the display parameter includes the blocking information.
In an optional embodiment, the display parameters further include one or more of:
display mode, foreground information, background information, movement mode, font size, movement speed, and movement direction.
In an alternative embodiment, the display position information includes a character window height;
the determiningunit 820 is further configured to determine a font size of each character in the character string according to the height of the character window;
as shown in fig. 9, the apparatus further includes:
a convertingunit 840, configured to convert each character in the character string into a dot matrix according to a maximum value of a font size of each character in the character string;
and thesplicing unit 850 is used for splicing the dot matrixes corresponding to the characters into complete dot matrix data according to the actual positions of the characters.
In an optional implementation manner, the sendingunit 830 is further configured to send an open display command to the target output device, so that the target output device that receives the open display command enters a locked state;
as shown in fig. 10, the apparatus further includes:
adetection unit 860 for detecting whether the target output device is in a locked state;
the sendingunit 830 is further configured to send a display command to the target output device when the detecting unit detects that the target output devices are all in the locked state, so that the target output device outputs the dot matrix data corresponding to the character string.
In an alternative embodiment, the plurality of output devices join the same multicast group;
the sendingunit 830 is specifically configured to send the display command to the multicast group in a multicast manner.
Fig. 11 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present disclosure. The electronic device may include aprocessor 1101, acommunication interface 1102, amemory 1103, and a communication bus 1104. Theprocessor 1101, thecommunication interface 1102 and thememory 1103 communicate with each other via a communication bus 1104. Wherein, thememory 1103 stores a computer program; theprocessor 1101 may execute the character superimposition method described above by executing a program stored on thememory 1103.
Thememory 1103 referred to herein may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like. For example,memory 1102 may be: RAM (random access memory), volatile memory, non-volatile memory, flash memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, dvd, etc.), or similar storage medium, or a combination thereof.
The present embodiment also provides a machine-readable storage medium, such as thememory 1103 in fig. 11, storing a computer program, which can be executed by theprocessor 1101 in the electronic device shown in fig. 11 to implement the character superimposing method described above.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.