Rolling display method, device and equipment based on LED display screen and medium
By storing only one scanning direction of font data in the LED display and using shift and splicing technology to generate scrolling data, the problems of high storage space and CPU load are solved, and an efficient scrolling display effect is achieved.
Patent Information
- Application Number
- CN202310462320.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-25
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2043-04-25
AI Technical Summary
Existing scrolling display technology for LED screens has the problems of large storage space occupation and high CPU load. Especially when realizing left-right or up-down scrolling display, the existing technology needs to store font data in two scanning directions or perform multiple rotation operations, resulting in wasted storage space and increased CPU load.
A scanning direction font data is adopted to obtain the first sub-data and the second sub-data by reading the font data of the first preset bit, and then shift processing and splicing are performed to generate target scrolling data, which is directly displayed on the LED display screen, reducing storage requirements and optimizing CPU computing power.
It effectively saves storage space, reduces CPU computing power, improves the real-time performance of scrolling display, and achieves smooth scrolling effect.
Smart Images

Figure CN118840967B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of display, in particular to a scrolling display method and device based on LED display screen, equipment and medium. BACKGROUND
[0002] In the present time when LED dot matrix screen is widely used, many LED screens have many cool display effects, which can display various Chinese characters, letters, numbers, pictures and the like. As known, the display mode of LED screen can be static display, scrolling display and the like.
[0003] The existing scrolling display technology includes two kinds. The first kind is that the font library data in the row scanning direction and the font library data in the column scanning direction are both stored, when up-down scrolling display is needed, the font library data in the row scanning direction is read to display; when left-right scrolling is needed, the font library data in the column scanning direction is read to display. The second kind is that only the font library data in one scanning direction is stored, for example, the font library data in the row scanning direction is stored, when up-down scrolling is needed, the font library data in the row scanning direction is directly read to display; when left-right scrolling is needed, the read font library data needs to be rotated twice, and the left-right scrolling is changed to up-down scrolling in the middle of the two rotations to realize the final left-right scrolling display effect.
[0004] The first kind of scrolling display mode needs to store the font library data in the row scanning direction and the font library data in the column scanning direction, so a large amount of storage space is needed; the second kind of scrolling display mode needs the CPU to rotate twice, so the CPU load is increased, and the real-time performance of the display effect is poor. SUMMARY
[0005] The present application aims to at least solve one of the technical problems in the related art. To this end, the present application provides a scrolling display method, device, equipment and medium based on LED display screen to save storage space and realize scrolling effect with small CPU operation amount, and improve the real-time performance of scrolling display.
[0006] The present application provides a scrolling display method based on LED display screen, comprising:
[0007] reading font library data according to a first preset bit number to obtain first sub-data and second sub-data, wherein the byte start position of the second sub-data is located after the byte start position of the first sub-data; performing shift processing on the first sub-data to obtain first shift data, and performing shift processing on the second sub-data to obtain second shift data; splicing part of the data in the first shift data and part of the data in the second shift data to obtain target scrolling data; displaying the target scrolling data in the LED display screen.
[0008] In some implementable manners, the byte start position of the second sub-data is located at a position after the byte start position of the first sub-data by a second preset bit number; the shifting processing of the first sub-data to obtain first shifted data and the shifting processing of the second sub-data to obtain second shifted data comprises: shifting the first sub-data in a rolling direction by a first preset shift number to obtain the first shifted data, and shifting the second sub-data in the reverse direction of the rolling direction by a second preset shift number to obtain the second shifted data, wherein the second preset shift number is obtained according to the second preset bit number and the first preset shift number; and the splicing of part of the data in the first shifted data and part of the data in the second shifted data to obtain target rolling data comprises: splicing the first second preset bit number of data in the first shifted data and the first second preset bit number of data in the second shifted data to obtain the target rolling data, and the sum of the second preset bit number and the third preset bit number is the first preset bit number.
[0009] In some implementable manners, the byte start position of the second sub-data is located at a position after the byte start position of the first sub-data by a second preset bit number, and the second preset bit number is 1 / 2 of the first preset bit number; the shifting processing of the first sub-data to obtain first shifted data and the shifting processing of the second sub-data to obtain second shifted data comprises: shifting the first sub-data in a rolling direction by a first preset shift number to obtain the first shifted data, and shifting the second sub-data in the reverse direction of the rolling direction by a second preset shift number to obtain the second shifted data, wherein the second preset shift number is obtained according to the second preset bit number and the first preset shift number; and the splicing of part of the data in the first shifted data and part of the data in the second shifted data to obtain target rolling data comprises: splicing the first second preset bit number of data in the first shifted data and the second second preset bit number of data in the second shifted data to obtain the target rolling data.
[0010] In some implementable manners, the method further comprises: obtaining a rolling display motion speed of the LED display screen; and determining the first preset shift number according to the rolling display motion speed.
[0011] In some implementable manners, the first preset bit number is the longest operation bit number supported by a central processing unit (CPU).
[0012] In some implementable manners, the splicing of part of the data in the first shifted data and part of the data in the second shifted data to obtain target rolling data comprises: splicing part of the data in the second shifted data after part of the data in the first shifted data by using an OR operation to obtain the target rolling data.
[0013] The application further provides a LED display screen-based scrolling display device, comprising: a reading module, configured to read font library data according to a first preset bit number to obtain first sub-data and second sub-data, wherein a byte start position of the second sub-data is located after a byte start position of the first sub-data; a shifting module, configured to perform shifting processing on the first sub-data to obtain first shifted data and perform shifting processing on the second sub-data to obtain second shifted data; a splicing module, configured to splice part of the first shifted data and part of the second shifted data to obtain target scrolling data; and a display module, configured to display the target scrolling data in the LED display screen.
[0014] The application further provides an LED display device, comprising a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor implements the LED display screen-based scrolling display method according to any one of the above when executing the program.
[0015] The application further provides a non-transitory computer readable storage medium, which stores a computer program, wherein the computer program is executed by a processor to implement the LED display screen-based scrolling display method according to any one of the above.
[0016] The application further provides a computer program product, comprising a computer program, wherein the computer program is executed by a processor to implement the LED display screen-based scrolling display method according to any one of the above.
[0017] The LED display screen-based scrolling display method, device, equipment and medium provided by the application only need to store font library data of one scanning direction, read the font library data according to a first preset bit number to obtain first sub-data and second sub-data, then perform shifting processing on the first sub-data to obtain first shifted data and perform shifting processing on the second sub-data to obtain second shifted data, then splice part of the first shifted data and part of the second shifted data to obtain target scrolling data, and finally display the target scrolling data in the LED display screen, so that CPU shifting operation is directly applied to the scrolling display technology, which not only saves storage space, but also realizes the scrolling effect with small CPU operation amount and improves the real-time performance of the scrolling display. BRIEF DESCRIPTION OF DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the present application or prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort.
[0019] Figure 1 is a schematic diagram of the scroll operation effect of the related scroll display technology;
[0020] Figure 2 is one of the flowcharts of the scroll display method of the embodiments of the present application;
[0021] Figure 3 is another of the flowcharts of the scroll display method of the embodiments of the present application;
[0022] Fig. 4(a) is a schematic diagram of the font data of one specific embodiment of the present application;
[0023] Fig. 4(b) is a schematic diagram of the first shift data of one specific embodiment of the present application;
[0024] Fig. 4(c) is a schematic diagram of the second shift data of one specific embodiment of the present application;
[0025] Fig. 4(d) is a schematic diagram of the target scroll data of one specific embodiment of the present application;
[0026] Figure 5 is one of the flowcharts of the scroll display method of the embodiments of the present application;
[0027] Fig. 6(a) is a schematic diagram of the font data of another specific embodiment of the present application;
[0028] Fig. 6(b) is a schematic diagram of the first shift data of another specific embodiment of the present application;
[0029] Fig. 6(c) is a schematic diagram of the second shift data of another specific embodiment of the present application;
[0030] Fig. 6(d) is a schematic diagram of the target scroll data of another specific embodiment of the present application;
[0031] Figure 7 is one of the flowcharts of the scroll display method of the embodiments of the present application;
[0032] Figure 8 is a block diagram of the scroll display device of the embodiments of the present application;
[0033] Figure 9 is a schematic diagram of the structure of the LED display device provided by the present application. DETAILED DESCRIPTION
[0034] In order to make the objects, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be described clearly and completely below in conjunction with the drawings in the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0035] Firstly, it needs to be explained that the display principle of the LED dot matrix screen is that the dot matrix font library data is stored, and when the display action is performed, the dot matrix font library data is read by the CPU and the screen is lighted according to the font library data.
[0036] The font library data is that each Chinese character is divided into x*y points (bits), and a Chinese character dot matrix is obtained, and the outline of the Chinese character is represented by the virtual and real of each point, and the same applies to English. Specifically, one point in the Chinese character dot matrix can be used as a pixel point, and each 8 pixel points in the Chinese character dot matrix occupies a byte from left to right, and the pixel points less than 8 need to be padded, and thus a Chinese character dot matrix can be stored in the fixed storage medium in the form of bytes.
[0037] As an example, the font library data is a 16*16 Chinese character dot matrix, and the font library data has a total of 256 pixel points, i.e. 32 (256 / 8=32) bytes, and the number of bytes of the font library data is equivalent to the space required for storing it in the fixed storage medium. When a Chinese character needs to be displayed, only 32 bytes of the font library data need to be read from the fixed storage medium at one time, and every two bytes are displayed as a row on the LED display screen, and the Chinese character can be displayed.
[0038] Secondly, the LED display screen is composed of a plurality of LED lamp beads, and the display is realized through a specific circuit structure. The common specifications of the LED display screen are 32*64, 64*64, etc. One LED lamp bead in the LED display screen corresponds to one pixel point, and therefore, one point (bit) in the font library data can correspond to one LED lamp bead of the LED display screen.
[0039] For LED displays of different sizes (width * height), they can be abstractly represented by arrays occupying corresponding bytes in memory. For example, if the size of the LED display is 16*16, the LED display can be abstractly represented as an array occupying 32 bytes in memory. Similarly, for font data of different sizes, they can also be abstractly represented by arrays occupying corresponding bytes in memory. For example, if the font data is a 16*16 Chinese character dot matrix, the font data can be abstractly represented as an array occupying 32 bytes in memory. Therefore, the font data display of the LED display can be realized through the correspondence between the LED display array and the font data array.
[0040] As we all know, LED screens can display in various modes, including static and scrolling. For conventional static display modes, the LED display's CPU simply illuminates the LEDs on the display based on the correspondence between the LED display array and the font data array (i.e., a two-dimensional array). However, for scrolling display modes, the CPU's processing becomes more complex.
[0041] At present, the existing scrolling display technologies include the following two types. The first is to store the font data in the row scanning direction and the font data in the column scanning direction in a fixed storage medium. When the LED display needs to present an up and down scrolling display effect, the font data in the row scanning direction can be directly read, and the first few rows or the last few rows of the two-dimensional array can be removed to achieve the up and down scrolling display effect. When the LED display needs to present a left and right scrolling display effect, the font data in the column scanning direction can be directly read, and the first few columns or the last few columns of the two-dimensional array can be removed to achieve the left and right scrolling display effect. Using this method to achieve scrolling display requires twice the fixed storage medium space. When the font to be displayed is large, the occupancy rate of the fixed storage space will be higher, and the effect of the oblique scrolling scene cannot be achieved.
[0042] The second method is to store only one type of font data in a fixed storage medium. As an example, the font data in the row scanning direction can be stored in a fixed storage medium. When the LED display needs to present an up and down scrolling display effect, the font data in the row scanning direction can be directly read for display to achieve an up and down scrolling display effect. When the LED display needs to present a left and right scrolling display effect, the font data needs to be rotated twice. Figure 1As shown, when it is needed to make the LED display screen present a left scrolling display effect, after reading the font library data in the row scanning direction, it is needed to firstly rotate the two-dimensional array in the font library data to the left; then move the two-dimensional array upward; finally rotate the two-dimensional array to the right, to realize the final left scrolling display effect. As can be seen, although the second mode occupies a smaller storage medium space, the CPU needs to rotate the two-dimensional array twice by bit, thereby a large CPU load will be brought, and the real-time performance of the display effect will be poorer.
[0043] Therefore, the embodiment of the present application proposes a scrolling display method, device, equipment and medium based on an LED display screen, to save storage space, and realize a scrolling effect with a smaller CPU operation amount, and improve the real-time performance of the scrolling display.
[0044] Figure 2 is one of the flowcharts of the scrolling display method of the embodiment of the present application. As shown, Figure 2 the scrolling display method can include the following steps:
[0045] Step 210: read the font library data according to a first preset bit number, to obtain first sub-data and second sub-data, wherein the byte start position of the second sub-data is located after the byte start position of the first sub-data.
[0046] It should be noted that the first preset bit number can be the operation bit number that the CPU of the LED display screen can support, in the embodiment, the first preset bit number is recorded as n. For example, the operation bit number that the CPU can support includes 16 bit (bit) operation bit number and 32 bit operation bit number, and the first preset bit number can be 16 bit, that is, the CPU can read 16 bit data in the font library data at a time.
[0047] Specifically, only one copy of the font library data needs to be stored in the fixed storage medium in the embodiment of the present application, and the font library data can be the font library data in the row scanning direction, or the font library data in the column scanning direction, which is not limited here. The CPU of the LED display screen can firstly read the font library data from the fixed storage medium to the memory, for subsequent operation. After the CPU reads the font library data to the memory, the first sub-data is read from the memory in the unit of the first preset bit number n, and the first sub-data is n bit data. After obtaining the first sub-data, the second sub-data is read from the memory in the unit of the first preset bit number n again, and the second sub-data is also n bit data. Thus, the byte start position of the second sub-data will be located after the byte start position of the first sub-data.
[0048] As an example, if the first preset bit number is 16 bits, the CPU can read 16-bit data, i.e., first sub-data, from the first bit of the font library data. After obtaining the first sub-data, the CPU can skip 8-bit data length and read 16-bit data again as second sub-data.
[0049] Step 220: performing shift processing on the first sub-data to obtain first shift data, and performing shift processing on the second sub-data to obtain second shift data.
[0050] Specifically, after obtaining the first sub-data and the second sub-data, the first sub-data can be stored in a variable var1, and the second sub-data can be stored in a variable var2. The CPU can first perform shift operation on the first sub-data var1 to obtain first shift data, and then perform shift operation on the second sub-data var2 to obtain second shift data.
[0051] It should be noted that the shift operation needs to consider the scrolling direction of the scrolling display and the number of bits to be shifted. For example, if the scrolling direction of the scrolling display is left, the CPU can only perform left shift operation on the first sub-data var1. However, for the second sub-data var2, the CPU can perform left shift operation on the second sub-data var2, or right shift operation on the second sub-data var2. In addition, the number of bits of the above shift operation needs to be less than the first preset bit number n.
[0052] Step 230: splicing part of the first shift data and part of the second shift data to obtain target scrolling data.
[0053] Specifically, after obtaining the first shift data and the second shift data, part of the first shift data can be selected as subsequent data to be spliced, and part of the second shift data can be selected as subsequent data to be spliced. After splicing the selected part of the first shift data and the selected part of the second shift data, the target scrolling data can be obtained. It should be noted that the selected part of the first shift data and the selected part of the second shift data are complementary in content, and the sum of the bit number of the selected part of the first shift data and the bit number of the selected part of the second shift data should be the first preset bit number n.
[0054] As an example, if the first preset bit number is 32 bits, the bit number of the first shift data and the bit number of the second shift data are both 32 bits. If the first 16 bits of the first shift data are selected as data to be spliced, 16 bits of the second shift data need to be selected as data to be spliced. If the first 8 bits of the first shift data are selected as data to be spliced, 24 bits of the second shift data need to be selected as data to be spliced.
[0055] Step 240: displaying the target scrolling data in the LED display screen.
[0056] Specifically, after obtaining the target scrolling data, the CPU controls the brightness of the LED display screen lamp beads according to the target scrolling data, so as to achieve the effect of scrolling display.
[0057] It should be noted that the operation process described in the embodiment of the present application is the operation process of one row of data in the font library data, and if the final scrolling display effect is to be achieved, the same operation needs to be performed on each row of data in the font library data.
[0058] The embodiment of the present application provides two specific implementation manners of the scrolling display method based on the LED display screen, and the two specific implementation manners will be introduced respectively.
[0059] Figure 3 is the flowchart of the second scrolling display method of the embodiment of the present application. As shown in Figure 3 , in some embodiments, the scrolling display method can specifically include the following steps:
[0060] Step 310: reading the font library data according to the first preset bit number to obtain first sub-data and second sub-data, wherein the byte start position of the second sub-data is located at the position of the second preset bit number after the byte start position of the first sub-data.
[0061] Step 320: shifting the first sub-data along the scrolling direction by the first preset shift quantity to obtain first shift data, and shifting the second sub-data along the scrolling direction by the first preset shift quantity to obtain second shift data.
[0062] Step 330: splicing the first preset bit number of data in front of the first shift data and the third preset bit number of data in front of the second shift data to obtain target scrolling data.
[0063] Step 340: displaying the target scrolling data in the LED display screen.
[0064] It should be noted that the sum of the second preset bit number and the third preset bit number is the first preset bit number. As an example, if the first preset bit number is 32bit, the second preset bit number can be 16bit, and correspondingly, the third preset bit number is 16bit. As another example, if the first preset bit number is 32bit, the second preset bit number can be 8bit, and correspondingly, the third preset bit number is 24bit.
[0065] Specifically, the CPU reads the font data from the memory in the first preset bit number n as a unit to obtain the first sub-data, and stores the first sub-data into a variable var1. After obtaining the first sub-data, the CPU skips a data length of the second preset bit number, and reads the font data from the memory in the first preset bit number n as a unit to obtain the second sub-data, and stores the second sub-data into a variable var2.
[0066] After obtaining the first sub-data var1 and the second sub-data var2, the CPU can shift the first sub-data var1 in the rolling direction by a first preset shift number to obtain first shift data. The CPU shifts the second sub-data in the rolling direction by the first preset shift number to obtain second shift data. It should be noted that the first preset shift number is less than the first preset bit number, and in the embodiment, the first preset shift number can be denoted as m.
[0067] The shift operation of the CPU can be specifically: if the data is left shifted, the low bits of the data bits are filled with 0, and the high bits of the data bits are discarded; if the data is right shifted, the high bits of the data bits are filled with 0, and the low bits of the data bits are discarded. As an example, if the first sub-data is 1001 0110, the first preset shift number is 3 bits, and the rolling direction is left, then the first shift data obtained by left shifting the first sub-data is 1011 0000. As another example, if the first sub-data is 1001 0110, the first preset shift number is 3 bits, and the rolling direction is right, then the first shift data obtained by right shifting the first sub-data is 0001 0010.
[0068] After obtaining the first shift data and the second shift data, the first shift data of the first preset bit number can be selected as the to-be-spliced data; the first shift data of the second preset bit number can be selected as the to-be-spliced data; and finally the first shift data of the first preset bit number and the second shift data of the second preset bit number are spliced to obtain target rolling data. The data bit number of the target rolling data is the same as the first preset bit number.
[0069] After obtaining the target rolling data, the CPU controls the brightness of the LED display screen lamp beads according to the target rolling data to achieve the rolling display effect.
[0070] The steps 310 to 340 are further explained below by taking the font data in the row scanning direction as an example to achieve the left rolling display effect. Figures 4(a)-4(d) is a schematic diagram of the rolling display effect of an embodiment of the present application.
[0071] Referring to FIG. 4(a) is a schematic diagram of a character library data stored in the memory in the present example, each Chinese character in the character library data is a 16*16 dot matrix. In the present example, the width of the LED display screen can only display two complete Chinese characters of FIG. 4(a), therefore, the LED display screen can only use a scrolling display to display the complete character library data.
[0072] In the present example, the CPU can support 32bit of operation bits, then the first preset bit number n is 32bit, and the second preset bit number can be 0.5n (i.e. 16bit). Further, the CPU reads the character library data from the memory once in 32bit units, obtains 32bit of first sub-data, and stores the first sub-data into a variable var1. The CPU skips 16bit of data, reads the character library data from the memory again once, obtains 32bit of second sub-data, and stores the second sub-data into a variable var2.
[0073] After obtaining the first sub-data and the second sub-data, the CPU performs a shift operation on the first sub-data and the second sub-data. In the present example, the first preset shift number m is 8bit. Specifically, the CPU can first shift the first sub-data to the left by 8bit to obtain first shifted data, and FIG. 4(b) is the effect of shifting the first sub-data to the left by 8bit. After obtaining the first shifted data, the CPU shifts the second sub-data to the left by 8bit to obtain second shifted data, and FIG. 4(c) is the effect of shifting the second sub-data to the left by 8bit.
[0074] As can be seen from FIG. 4(b) and FIG. 4(c), after the shift, the first sub-data and the second sub-data will have data loss. The lost part of the first shifted data is the same as the left half of the second shifted data.
[0075] After obtaining the first shifted data and the second shifted data, the CPU can select the first 0.5n data in the first shifted data as the to-be-spliced data; select the first 0.5n data in the second shifted data as the to-be-spliced data; and finally splice the first 0.5n data in the second shifted data after the first 0.5n data in the first shifted data, to obtain target scrolling data (32bit). FIG. 4(d) is a schematic diagram of the character library of the target scrolling data obtained after splicing.
[0076] Figure 5 is a flowchart of a third scrolling display method according to an embodiment of the present application. As shown in Figure 5 some embodiments, the scrolling display method can further include the following steps:
[0077] Step 510: reading the font library data according to the first preset bit number to obtain first sub-data and second sub-data, wherein a byte start position of the second sub-data is located at a position of the second preset bit number after a byte start position of the first sub-data, and the second preset bit number is 1 / 2 of the first preset bit number.
[0078] Step 520: shifting the first sub-data by the first preset shift number in the scrolling direction to obtain first shifted data, and shifting the second sub-data by the second preset shift number in the opposite direction of the scrolling direction to obtain second shifted data.
[0079] Step 530: splicing data of the first preset bit number in front of the first shifted data and data of the first preset bit number in back of the second shifted data to obtain target scrolling data.
[0080] Step 540: displaying the target scrolling data in the LED display screen.
[0081] It should be noted that the second preset shift number is obtained according to the second preset bit number and the first preset shift number. As an example, the second preset bit number is 0.5n, and the first preset shift number is m, and then the second preset shift number is 0.5n-m.
[0082] Specifically, the CPU reads the font library data from the memory in the first preset bit number n to obtain the first sub-data, and stores the first sub-data into a variable var1. After obtaining the first sub-data, the CPU skips a data length of 0.5n, and reads the font library data from the memory in the first preset bit number n to obtain the second sub-data, and stores the second sub-data into a variable var2.
[0083] After obtaining the first sub-data var1 and the second sub-data var2, the CPU can shift the first sub-data var1 by the first preset shift number in the scrolling direction to obtain the first shifted data. The CPU shifts the second sub-data by the first preset shift number in the opposite direction of the scrolling direction to obtain the second shifted data. In this embodiment, the first preset shift number can be denoted as m. In addition, the specific implementation process of the shift operation of the CPU can refer to the shift operation of the CPU in the foregoing embodiment.
[0084] After obtaining the first shifted data and the second shifted data, data of the first preset bit number (i.e. 0.5n) in front of the first shifted data can be selected as the to-be-spliced data; data of the first preset bit number (i.e. 0.5n) in back of the second shifted data can be selected as the to-be-spliced data; and finally the data of the first preset bit number in front of the first shifted data and the data of the first preset bit number in back of the second shifted data are spliced to obtain the target scrolling data. The data bit number of the target scrolling data is the same as the first preset bit number.
[0085] After the target scrolling data is obtained, the CPU controls the brightness of the LED display screen lamp beads according to the target scrolling data, so as to achieve the effect of scrolling display.
[0086] The steps 510 to 540 are further explained below by taking the implementation of the left scrolling display effect of the font data in the row scanning direction as an example. Figures 6(a)-6(d) is a schematic diagram of the scrolling display effect of another embodiment of the present application.
[0087] Referring to FIG. 6(a), FIG. 6(a) is a schematic diagram of a font data stored in the memory in the present example, wherein each Chinese character in the font data is a 16*16 dot matrix. Similarly, in the present example, the width of the LED display screen can only display two complete Chinese characters of FIG. 6(a), and therefore, the LED display screen can only display the complete font data in the form of scrolling display.
[0088] In the present example, the operation bit number that can be supported by the CPU is 32bit, the first preset bit number n is 32bit, and the second preset bit number can be 0.5n (i.e. 16bit). Further, the CPU reads the font data from the memory once in the unit of 32bit, obtains the first sub-data of 32bit, and stores the first sub-data into the variable var1. The CPU skips the 16bit data, reads the font data from the memory once again, obtains the second sub-data of 32bit, and stores the second sub-data into the variable var2.
[0089] After the first sub-data and the second sub-data are obtained, the CPU performs a shift operation on the first sub-data and the second sub-data. In the present example, the first preset shift number m is 8bit. Specifically, the CPU can first shift the first sub-data to the left by 8bit to obtain the first shifted data, and FIG. 6(b) is the effect of shifting the first sub-data to the left by 8bit. After the first shifted data is obtained, the CPU shifts the second sub-data to the right by 8bit to obtain the second shifted data, and FIG. 6(c) is the effect of shifting the second sub-data to the right by 8bit.
[0090] After the first shifted data and the second shifted data are obtained, the CPU can select the front 0.5n (i.e. 16bit) data of the first shifted data as the to-be-spliced data, select the rear 0.5n (i.e. 16bit) data of the second shifted data as the to-be-spliced data, and finally splice the rear 0.5n data of the second shifted data after the front 0.5n data of the first shifted data, so as to obtain the target scrolling data (32bit). FIG. 6(d) is a schematic diagram of the font of the target scrolling data obtained after splicing.
[0091] Figure 7 is a fourth flowchart of the scrolling display method of the embodiment of the present application, as shown in FIG. 5D. Figure 7As shown, in some embodiments, the scrolling display method can further include the following steps:
[0092] Step 710: obtaining a scrolling display motion speed of the LED display screen.
[0093] Step 720: determining a first preset shift number according to the scrolling display motion speed.
[0094] In actual application, the scrolling display motion speed of the LED display screen can be set by a worker in advance. The worker can set the scrolling display speed through the control software of the LED display screen. For details, refer to the existing adjustment mode of the scrolling display motion speed of the LED display screen, which will not be described here. After the worker sets the scrolling display motion speed, the control software of the LED display screen sends the scrolling display motion speed to the CPU, and the CPU determines the first preset shift number according to the scrolling display motion speed.
[0095] In this embodiment, a corresponding table of the scrolling display motion speed and the first preset shift number can be set in advance. The corresponding table includes the corresponding relationship between the scrolling display motion speed and the first preset shift number. It should be noted that the scrolling display motion speed and the first preset shift number can be in one-to-one correspondence, or in one-to-many correspondence. For example, one first preset shift number can correspond to multiple scrolling display motion speeds.
[0096] When the CPU obtains the scrolling display motion speed, the CPU calls the above-mentioned corresponding table and matches the corresponding first preset shift number in the corresponding table according to the scrolling display motion speed.
[0097] In some embodiments, the first preset bit number is the longest operation bit number supported by the central processing unit CPU. As an example, if the operation bit number supported by the CPU includes 16-bit operation bit number and 32-bit operation bit number, the 32-bit operation bit number is selected as the first preset bit number, that is, the CPU can read 32-bit data in the font library data at a time. The first preset bit number uses the longest operation bit number supported by the central processing unit CPU, which can effectively reduce the number of shift operations of the CPU, and further speed up the operation speed of the CPU.
[0098] In some embodiments, the first shift data and the second shift data are spliced to obtain the target scrolling data, including: using the or operation to splice the part of the second shift data after the part of the first shift data to obtain the target scrolling data.
[0099] Specifically, when splicing part of the first shifted data and part of the second shifted data, a logical AND operation can be used to mask some bits, or a logical OR operation can be used to splice some bits.
[0100] As an example, if the first preset bit number is 16 bits and the second preset bit number is 8 bits, the first shifted data is 1010010000000000 and the second shifted data is 0011011000000000. A logical AND operation can be used to select the first 8 bits of the first shifted data as the data to be spliced, and the first 8 bits of the second shifted data as the data to be spliced. A logical OR operation can be used to splice the first 8 bits of the first shifted data and the first 8 bits of the second shifted data, and the target scrolling data obtained is 101001000110110, thereby realizing the splicing process of the embodiment.
[0101] The LED display screen-based scrolling display method of the embodiment only needs to store a font library data of one scanning direction in the fixed storage medium. For example, when the font library data of the line scanning direction needs to be presented in an up-down scrolling display, the font library data of the line scanning direction can be directly read to realize the up-down scrolling display; when the font library data needs to be presented in a left-right scrolling display, the shifting and splicing method provided by the embodiment is used to realize the left-right scrolling display, thereby reducing the space of the font library data in the fixed storage medium. Secondly, the embodiment overcomes the problem that the CPU shifting operation loses data and cannot meet the screen display by using the splicing operation, and the embodiment can directly use the CPU shifting operation in the scrolling display technology, thereby solving the problem of realizing the translation scrolling display effect. Finally, the longest operation bit number supported by the CPU is used to read the font library data, the number of CPU shifting operations is reduced, the operation speed of the CPU is accelerated, the scrolling effect is realized with a small CPU operation amount, and the real-time performance of the scrolling display is improved.
[0102] Figure 8 is a block diagram of the scrolling display device of the embodiment.
[0103] As shown in Figure 8 , the device 800 includes a reading module 810 for reading font library data according to a first preset bit number to obtain first and second sub-data, a shifting module 820 for shifting the first sub-data to obtain first shifted data and shifting the second sub-data to obtain second shifted data, a splicing module 830 for splicing part of the first shifted data and part of the second shifted data to obtain target scrolling data, and a display module 840 for displaying the target scrolling data in an LED display screen.
[0104] The byte starting position of the second sub-data is located after the byte starting position of the first sub-data.
[0105] Therefore, only the font data of one scanning direction needs to be stored, and the font data is read by the reading module 810 according to the first preset bit number to obtain the first sub-data and the second sub-data; the shift module 820 then shifts the first sub-data to obtain the first shift data, and shifts the second sub-data to obtain the second shift data; the splicing module 830 then splices part of the data in the first shift data and part of the data in the second shift data to obtain the target scrolling data, and finally the display module 840 displays the target scrolling data on the LED display screen, thereby directly applying the CPU shift operation to the scrolling display technology, which not only saves storage space, but also can achieve the scrolling effect with a smaller CPU calculation amount, thereby improving the real-time performance of the scrolling display.
[0106] It should be noted that for details not disclosed in the scrolling display device of this embodiment, please refer to the details disclosed in the embodiment of the scrolling display method based on the LED display screen in the embodiment of this specification, and no further details will be given here.
[0107] Figure 9 An example of a physical structure diagram of an LED display device is shown below. Figure 9 As shown, the LED display device may include: a processor 910, a communication interface 920, a memory 930, and a communication bus 940, wherein the processor 910, the communication interface 920, and the memory 930 communicate with each other via the communication bus 940. The processor 910 may call logic instructions in the memory 930 to execute a scrolling display method based on an LED display screen, the method comprising: reading character library data according to a first preset bit number to obtain first sub-data and second sub-data, wherein the byte starting position of the second sub-data is located after the byte starting position of the first sub-data; shifting the first sub-data to obtain first shifted data, and shifting the second sub-data to obtain second shifted data; splicing part of the first shifted data with part of the second shifted data to obtain target scrolling data; and displaying the target scrolling data on the LED display screen.
[0108] In addition, the logic instructions in the memory 930 described above can be implemented in the form of software functional units and sold or used as independent products, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that contribute to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes several instructions for making a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0109] In another aspect, the present application also provides a computer program product, which comprises a computer program, the computer program can be stored on a non-transitory computer readable storage medium, and the computer program can be executed by a processor to enable a computer to execute the LED display screen-based scrolling display method provided by the above-mentioned methods. The method comprises: reading font library data according to a first preset number of bits to obtain first sub-data and second sub-data, wherein the byte start position of the second sub-data is located after the byte start position of the first sub-data; performing shift processing on the first sub-data to obtain first shift data, and performing shift processing on the second sub-data to obtain second shift data; splicing part of the first shift data and part of the second shift data to obtain target scrolling data; and displaying the target scrolling data in the LED display screen.
[0110] In another aspect, the present application also provides a computer program product, which comprises a computer program, the computer program can be stored on a non-transitory computer readable storage medium, and the computer program can be executed by a processor to enable a computer to execute the LED display screen-based scrolling display method provided by the above-mentioned methods. The method comprises: reading font library data according to a first preset number of bits to obtain first sub-data and second sub-data, wherein the byte start position of the second sub-data is located after the byte start position of the first sub-data; performing shift processing on the first sub-data to obtain first shift data, and performing shift processing on the second sub-data to obtain second shift data; splicing part of the first shift data and part of the second shift data to obtain target scrolling data; and displaying the target scrolling data in the LED display screen.
[0111] The device embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed to multiple network units. Part or all of the modules can be selected to achieve the purposes of the embodiments according to actual needs. Those skilled in the art can understand and implement without creative labor.
[0112] Through the description of the above embodiments, those skilled in the art can clearly understand that the embodiments can be realized by means of software and the necessary general hardware platform, and of course can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.
[0113] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement to part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A scrolling display method based on an LED display screen, characterized in that: include: Reading the character library data according to the first preset number of bits to obtain the first sub-data and the second sub-data, wherein the byte starting position of the second sub-data is located after the byte starting position of the first sub-data; Shifting the first sub-data to obtain first shifted data, and shifting the second sub-data to obtain second shifted data; splicing part of the first shifted data and part of the second shifted data to obtain target scrolling data; the number of data bits of the target scrolling data is the same as the first preset number of bits; Displaying the target scrolling data on an LED display screen; The step of shifting the first sub-data to obtain first shifted data includes: The first sub-data is shifted along the scrolling direction by a first preset shift amount to obtain the first shifted data; the first preset shift amount is smaller than the first preset number of bits.
2. The scrolling display method based on the LED display screen according to claim 1, characterized in that: The byte starting position of the second sub-data is located at a position of a second preset number of bits after the byte starting position of the first sub-data; The step of performing shift processing on the second sub-data to obtain second shifted data includes: shifting the second sub-data along the scrolling direction by the first preset shift amount to obtain the second shifted data; The step of splicing part of the first shifted data and part of the second shifted data to obtain target scrolling data includes: The target scroll data is obtained by concatenating the data of the second preset number of bits before the first shift data and the data of the third preset number of bits before the second shift data, and the sum of the second preset number of bits and the third preset number of bits is the first preset number of bits.
3. The scrolling display method based on the LED display screen according to claim 1, characterized in that: The byte starting position of the second sub-data is located at a position of a second preset number of bits after the byte starting position of the first sub-data, and the second preset number of bits is 1 / 2 of the first preset number of bits; The step of performing shift processing on the second sub-data to obtain second shifted data includes: shifting the second sub-data by a second preset shift amount in a direction opposite to the scrolling direction to obtain the second shifted data, wherein the second preset shift amount is obtained according to the second preset bit number and the first preset shift amount; The step of splicing part of the first shifted data and part of the second shifted data to obtain target scrolling data includes: The target scrolling data is obtained by splicing the data of the first second preset number of bits of the first shifted data and the data of the second second preset number of bits of the second shifted data.
4. The scrolling display method based on an LED display screen according to claim 2 or 3, characterized in that: The method further comprises: Obtaining the scrolling display motion speed of the LED display screen; The first preset shift amount is determined according to the scroll display movement speed.
5. The scrolling display method based on an LED display screen according to any one of claims 1 to 3, characterized in that: The first preset number of bits is the longest number of operation bits supported by the central processing unit (CPU).
6. The scrolling display method based on an LED display screen according to any one of claims 1 to 3, characterized in that: The step of splicing part of the first shifted data and part of the second shifted data to obtain target scrolling data includes: Part of the data in the second shifted data is spliced after the part of the data in the first shifted data by using an AND or OR operation to obtain the target scrolling data.
7. A scrolling display device based on an LED display screen, characterized in that: include: A reading module, configured to read the character library data according to a first preset number of bits to obtain first sub-data and second sub-data, wherein the byte starting position of the second sub-data is located after the byte starting position of the first sub-data; a shift module, configured to perform a shift process on the first sub-data to obtain first shifted data, and perform a shift process on the second sub-data to obtain second shifted data; a splicing module, configured to splice part of the data in the first shifted data and part of the data in the second shifted data to obtain target scrolling data; the number of data bits of the target scrolling data is the same as the first preset number of bits; A display module, used for displaying the target scrolling data on an LED display screen; The shift module is specifically configured to shift the first sub-data along the scrolling direction by a first preset shift amount to obtain the first shifted data; the first preset shift amount is smaller than the first preset number of bits.
8. An LED display device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the scrolling display method based on the LED display screen as described in any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the scrolling display method based on an LED display screen as described in any one of claims 1 to 6 is implemented.
10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the scrolling display method based on an LED display screen as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Character display method and device and electronic equipment
CN111276110A
Picture display method and device
CN111338588A