CN113986172A - Electronic equipment, screen display method and device thereof and storage medium - Google Patents
Electronic equipment, screen display method and device thereof and storage medium Download PDFInfo
- Publication number
- CN113986172A CN113986172A CN202111253154.8A CN202111253154A CN113986172A CN 113986172 A CN113986172 A CN 113986172A CN 202111253154 A CN202111253154 A CN 202111253154A CN 113986172 A CN113986172 A CN 113986172A
- Authority
- CN
- China
- Prior art keywords
- time
- displayed
- main control
- control program
- screen
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 81
- 230000006854 communication Effects 0.000 claims description 37
- 238000004891 communication Methods 0.000 claims description 35
- 230000005540 biological transmission Effects 0.000 claims description 31
- 230000008569 process Effects 0.000 abstract description 36
- 230000006870 function Effects 0.000 description 9
- 239000004973 liquid crystal related substance Substances 0.000 description 6
- 239000011229 interlayer Substances 0.000 description 5
- 230000001960 triggered effect Effects 0.000 description 4
- 230000002035 prolonged effect Effects 0.000 description 3
- 238000013461 design Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000003044 adaptive effect Effects 0.000 description 1
- 230000004075 alteration Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 125000004122 cyclic group Chemical group 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 238000000638 solvent extraction Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 239000010409 thin film Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/14—Digital output to display device ; Cooperation and interconnection of the display device with other functional units
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Control Of Indicators Other Than Cathode Ray Tubes (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
The invention discloses an electronic device, a screen display method and a screen display device thereof, and a storage medium, wherein the screen display method of the electronic device comprises the following steps: acquiring the execution time of the electronic equipment for executing the primary main control program, wherein the execution time comprises the display time for displaying the image to be displayed on a screen; when the execution time is determined to exceed a preset time threshold, dividing an image to be displayed into a plurality of sub images to be displayed; the main control program is executed for multiple times through the electronic equipment, so that the multiple sub images to be displayed are sequentially displayed on the screen. Therefore, the overlarge image to be displayed is divided, and the divided sub-images to be displayed are sequentially displayed, so that the screen flashing problem in the picture refreshing process is effectively solved, and meanwhile, the running time of the main cycle in the screen refreshing process is reduced, and the running time of the main cycle is controlled within the maximum allowable time.
Description
Technical Field
The present invention relates to the field of screen display technologies, and in particular, to an electronic device, a screen display method and apparatus thereof, and a storage medium.
Background
In the process of refreshing a screen through MCU (micro controller Unit) serial port communication, a screen flashing phenomenon of a picture with a larger size may occur in the refreshing process due to the transmission rate of a TFT (Thin Film Transistor) screen, and meanwhile, the running time of a main cycle is prolonged, so that the running time of the main cycle is increased, and other main cycle functions are caused to have problems.
Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the related art. Therefore, a first object of the present invention is to provide a screen display method for an electronic device, which divides an excessively large image to be displayed and sequentially displays the divided sub-images to be displayed, thereby effectively solving the problem of screen flashing during the refreshing process of the image, and reducing the running time of a main cycle during the refreshing process, so that the running time of the main cycle is controlled within the maximum allowable time.
A second object of the invention is to propose a computer-readable storage medium.
A third object of the invention is to propose an electronic device.
A fourth object of the present invention is to provide a screen display device of an electronic apparatus.
In order to achieve the above object, an embodiment of a first aspect of the present invention provides a screen display method for an electronic device, where the method includes: acquiring the execution time of the electronic equipment for executing the primary main control program, wherein the execution time comprises the display time for displaying the image to be displayed on a screen; when the execution time is determined to exceed a preset time threshold, dividing an image to be displayed into a plurality of sub images to be displayed; the main control program is executed for multiple times through the electronic equipment, so that the multiple sub images to be displayed are sequentially displayed on the screen.
According to the screen display method of the electronic equipment, the execution time of the electronic equipment for executing the main control program once is obtained, the execution time comprises the display time of the image to be displayed on the screen, when the execution time is determined to exceed the preset time threshold, the image to be displayed is divided into the sub images to be displayed, and the main control program is executed for multiple times through the electronic equipment so that the sub images to be displayed are sequentially displayed on the screen. Therefore, the overlarge image to be displayed is divided, and the divided sub-images to be displayed are sequentially displayed, so that the screen flashing problem in the picture refreshing process is effectively solved, and meanwhile, the running time of the main cycle in the screen refreshing process is reduced, and the running time of the main cycle is controlled within the maximum allowable time.
According to one embodiment of the invention, acquiring the execution time of the electronic equipment for executing the main control program once comprises the following steps: acquiring the size of an image to be displayed and the transmission rate of transmitting the image to be displayed to a screen; acquiring display time according to the size of the image and the transmission rate; and acquiring the execution time of the electronic equipment for executing the main control program once according to the display time and the instruction execution time of the main control program except the display time.
According to one embodiment of the invention, acquiring the execution time of the electronic equipment for executing the main control program once comprises the following steps: executing the main control program once through the electronic equipment, and acquiring the instruction execution starting time and the instruction execution ending time of the main control program; and acquiring the execution time of the electronic equipment for executing the primary control program according to the instruction execution starting time and the instruction execution ending time.
According to an embodiment of the present invention, a main control program includes a first instruction and a second instruction for setting an idle communication port of an electronic device, where the first instruction and the second instruction are located at an instruction start position and an instruction end position of the main control program, respectively, and the acquiring of an instruction execution start time and an instruction execution end time of the main control program includes: acquiring time for setting an idle communication port to a first value through a first instruction to serve as instruction execution starting time of a main control program; and acquiring the time for setting the idle communication port to be at the second value through the second instruction as the instruction execution end time of the main control program.
According to one embodiment of the invention, dividing an image to be displayed into a plurality of sub-images to be displayed comprises: acquiring the ratio of the execution time to a preset time threshold; and acquiring the number of the sub-images to be displayed according to the ratio.
According to an embodiment of the invention, the method further comprises: and when the execution time is determined not to exceed the preset time threshold, executing the main control program once through the electronic equipment to display the image to be displayed on the screen.
According to an embodiment of the invention, the method further comprises: acquiring hardware parameters of the electronic equipment; and acquiring a preset time threshold according to the hardware parameter, wherein the preset time threshold is the maximum allowable time for the electronic equipment to execute the primary main control program.
To achieve the above object, a second aspect of the present invention provides a computer-readable storage medium on which a screen display program of an electronic device is stored, the screen display program of the electronic device implementing a screen display method of the electronic device as in the first aspect when executed by a processor.
According to the computer-readable storage medium of the embodiment of the invention, by the screen display method of the electronic device, the oversized image to be displayed is divided, and the divided sub-images to be displayed are sequentially displayed, so that the problem of screen flashing in the picture refreshing process is effectively solved, and meanwhile, the running time of the main cycle in the screen refreshing process is reduced, so that the running time of the main cycle is controlled within the maximum allowable time.
To achieve the above object, a third aspect of the present invention provides an electronic device, including: the screen display method comprises the steps of storing a screen display program of the electronic device, storing the screen display program on the memory, and running the screen display program on the processor, wherein when the processor executes the screen display program, the screen display method of the electronic device is realized.
According to the electronic equipment provided by the embodiment of the invention, by the screen display method of the electronic equipment, the overlarge image to be displayed is divided, and the divided sub-images to be displayed are sequentially displayed, so that the problem of screen flashing in the picture refreshing process is effectively solved, and meanwhile, the running time of a main cycle in the screen refreshing process is reduced, so that the running time of the main cycle is controlled within the maximum allowable time.
In order to achieve the above object, a fourth aspect of the present invention provides a screen display device of an electronic device, the device comprising: the acquisition module is used for acquiring the execution time of the electronic equipment for executing the primary main control program, wherein the execution time comprises the display time for displaying the image to be displayed on a screen; the dividing module is used for dividing the image to be displayed into a plurality of sub images to be displayed when the execution time is determined to exceed a preset time threshold; and the display module is used for executing the main control program for multiple times through the electronic equipment so as to sequentially display the sub-images to be displayed on the screen.
According to the screen display device of the electronic equipment, the execution time of the electronic equipment executing the primary main control program is obtained through the obtaining module, the execution time comprises the display time of the image to be displayed on the screen, the image to be displayed is divided into the sub-images to be displayed through the dividing module when the execution time is determined to exceed the preset time threshold, and the sub-images to be displayed are sequentially displayed on the screen through the display module when the electronic equipment executes the main control program for multiple times. Therefore, the overlarge image to be displayed is divided, and the divided sub-images to be displayed are sequentially displayed, so that the screen flashing problem in the picture refreshing process is effectively solved, and meanwhile, the running time of the main cycle in the screen refreshing process is reduced, and the running time of the main cycle is controlled within the maximum allowable time.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
Fig. 1 is a flowchart of a screen display method of an electronic device according to an embodiment of the present invention;
fig. 2 is a flowchart of a screen display method of an electronic device according to another embodiment of the present invention;
fig. 3 is a schematic structural diagram of a screen display device of an electronic apparatus according to an embodiment of the invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
The TFT screen is a common liquid crystal display, and adopts a design of filling liquid crystal molecules between two interlayers, the left interlayer is set as a FET transistor, and the right interlayer electrode is set as a common electrode. In terms of light source design, a TFT screen adopts a back-transmission type illumination mode, namely an imaginary light source path is from right to left, the method is that a light tube similar to a fluorescent lamp is arranged on the back of liquid crystal, and when the light source is illuminated, the light source firstly transmits to the left through a right polarizer and conducts light by virtue of liquid crystal molecules. Because the electrodes of the left interlayer and the right interlayer are the FET electrode and the common electrode, when the FET electrode is conducted, the arrangement state of liquid crystal molecules can be changed, and the purpose of displaying is achieved through shading and light transmission. In addition, since the FET transistor has a capacitance effect and can maintain a potential state, the liquid crystal molecules that were previously transparent remain in this state until the FET electrode is next recharged to change its arrangement.
With the development of science and technology, the TFT screen has been popularized to thousands of households by virtue of its excellent performance, no matter being a household appliance or a personal computer, displaying images through the TFT screen is an indispensable function, and the screen needs to be refreshed again every time when a new image is displayed, the TFT screen is usually connected with the electronic device through MCU serial port communication, when the electronic device receives an image to be displayed, the image to be displayed needs to be firstly transmitted to the TFT screen through MCU serial port communication, and after the TFT screen receives the image data to be displayed, the newly obtained image to be displayed is displayed on the TFT screen within a certain refresh time.
However, during the screen refreshing process of the TFT screen through the MCU serial port communication, due to the transmission rate, a screen flashing phenomenon may occur in the refreshing process of a large-sized picture, and meanwhile, the running time of the main loop may be prolonged, so that the running time of the main loop is increased, which causes problems in other main loop functions.
In order to solve the above problems, embodiments of the present invention provide an electronic device, a screen display method and apparatus thereof, and a storage medium, in which an excessively large image to be displayed is divided by the screen display method of the electronic device, and divided sub-images to be displayed are sequentially displayed, so that a problem of screen flashing during a picture refresh process is effectively solved, and meanwhile, a running time of a main cycle during a screen refresh process is reduced, so that the running time of the main cycle is controlled within a maximum allowable time.
Fig. 1 is a flowchart of a screen display method of an electronic device according to an embodiment of the present invention. As shown in fig. 1, the screen display method of the electronic device includes the steps of:
step S101, obtaining the execution time of the electronic equipment executing the main control program once, wherein the execution time comprises the display time of the image to be displayed on the screen.
Specifically, the electronic device receives the information of the image to be displayed through the MCU serial port communication and displays the received image through the screen of the electronic device, after the electronic equipment receives new image information to be displayed, the screen of the electronic equipment updates and displays the received new image in a screen refreshing mode, the electronic equipment needs to run a main control program every time the electronic equipment receives the new image information to be displayed, the time required for the main control program to execute the instruction each time the main control program obtains the information of the image to be displayed is the execution time (abbreviated as execution time) for the electronic device to execute the main control program once, and it should be noted that the duration of the image to be displayed on the screen of the electronic device is included in the execution time, that is, the execution time includes both the display time of the image to be displayed and the instruction execution time of the preparation work except the display process.
As an embodiment, acquiring an execution time of the electronic device executing the main control program once includes: acquiring the size of an image to be displayed and the transmission rate of transmitting the image to be displayed to a screen; acquiring display time according to the size of the image and the transmission rate; and acquiring the execution time of the electronic equipment for executing the main control program once according to the display time and the instruction execution time of the main control program except the display time.
That is to say, when the execution time of the main control program of the electronic device is obtained, the duration of each time the image is displayed on the screen of the electronic device needs to be obtained first, specifically, the size of the image to be displayed communicated through the MCU serial port and the fixed data transmission rate of the communication interface are obtained, and the ratio of the size of the image to be displayed to the transmission rate is calculated according to the obtained size of the image to be displayed and the transmission rate of the MCU serial port communication, so that the display time of each time the image to be displayed on the screen of the electronic device can be obtained; besides, besides the duration of displaying the image on the screen of the electronic device, the running time of other main loops in the main control program, that is, the execution time of all other instructions in the main control program except the duration of displaying the image to be displayed, is also obtained, and the execution time of the electronic device executing the main control program once includes the display time of the image to be displayed on the screen of the electronic device and the execution time of all other instructions except the display time.
If the image to be displayed is too large, under the condition that the transmission rate is fixed, the data transmission time may be too long due to the picture, so that the screen flashing phenomenon of the electronic equipment screen may occur, and in addition, the picture data transmission time is too long, the execution time of other instructions in the main program is also occupied, so that other circulation functions of the main program have problems.
As another embodiment, acquiring an execution time for the electronic device to execute the main control program once includes: executing the main control program once through the electronic equipment, and acquiring the instruction execution starting time and the instruction execution ending time of the main control program; and acquiring the execution time of the electronic equipment for executing the primary control program according to the instruction execution starting time and the instruction execution ending time.
Further, the main control program comprises a first instruction and a second instruction for setting an idle communication port of the electronic equipment, and the time for setting the idle communication port to be a first value through the first instruction is obtained to be used as the instruction execution starting time of the main control program; and acquiring the time for setting the idle communication port to be at the second value through the second instruction as the instruction execution end time of the main control program.
That is, in acquiring the execution time, in addition to directly calculating the display time from the image size and the transmission rate and obtaining the execution time from the calculated display time and the execution times of all the instructions other than the display time, the execution time may be acquired by calculating the instruction execution start and end times, i.e., the difference between the instruction execution start and end times.
Specifically, in the process of transmitting the image data to be displayed through the MCU serial port communication by the electronic device, the port of the MCU serial port communication is in a working communication port during data transmission, the port of the non-working communication is an idle communication port, and in the execution process of a main program, the execution time can be obtained according to the running time interval of two idle communication ports.
In a main control program of electronic equipment, a command starting position is correspondingly provided with a first command, a command ending position is correspondingly provided with a second command, the first command or the second command is triggered only when an MCU serial port communication port is an idle communication port, when the port of the MCU serial port communication is in the idle communication port, the first command is triggered, the time point of the triggering of the first command at this time is recorded, the time is taken as the time point of starting the execution of the main control program, in the execution process of the main control program, the port of the MCU serial port communication is always in a working communication port, when the idle communication port of the main control program reappears in the communication process, namely the execution of the main program is finished at this time, the second command is triggered, the time point of the triggering of the second command at this time is recorded, the time is taken as the time point of finishing the execution of the main control program, according to the time point of starting the execution of the program and the time point of finishing the execution of the program, the execution time of the main program can be calculated once.
In the main control program, the execution time may be obtained by counting the time by a timer when the first command corresponding to the start position and the second command corresponding to the end position are triggered. That is to say, a timing program can be set in the main control program, when the port of the MCU serial port communication is in an idle communication port, the first instruction triggers, and at this time, the timer starts to time, and when the idle communication port appears again in the communication process of the main control program, that is, the main program is executed this time, the second instruction triggers, and the timer stops timing, and the recording time of the timer is the execution time of the main program.
Step S102, when the execution time is determined to exceed the preset time threshold, dividing the image to be displayed into a plurality of sub images to be displayed.
Specifically, when the image to be displayed is too large, the data transmission time is prolonged, which results in the image display time plus the execution time of other instructions in the main program being too long, possibly exceeding the preset time threshold of the electronic device, that is, the execution time of the primary main program is greater than the preset time threshold, when the situation occurs, in order to prevent the screen flash of the electronic equipment caused by the overlong transmission time of the picture data and the problems of other circulation functions of the primary program, the image to be displayed is divided into a plurality of sub-images to be displayed, which is equivalent to dividing the image to be displayed with larger data into sub-images to be displayed with smaller data, thereby ensuring that the execution time of a main program of the sub-image to be displayed in the display process is less than the preset time threshold, and then the problem of screen flashing possibly occurring on the display screen and the problem that other circulation functions of the main program are occupied are solved.
In some embodiments, dividing the image to be displayed into a plurality of sub-images to be displayed comprises: acquiring the ratio of the execution time to a preset time threshold; and acquiring the number of the sub-images to be displayed according to the ratio.
Specifically, when it is determined that the execution time of the primary program is too large, that is, the execution time of the primary program exceeds the preset time threshold of the electronic device, rounding needs to be performed according to the ratio of the execution time of the primary program to the preset time threshold to calculate the number N of the sub-images to be displayed.
It should be noted that, after the sub-images to be displayed are divided, the execution time of the primary main program of the sub-images to be displayed each time is the ratio of the execution time of the primary main program of the original image to be displayed to the number N of the sub-images to be displayed, so that the execution time of the main program is greatly reduced, the execution time of the primary main program of the sub-images to be displayed after the sub-images are subjected to screen division processing is ensured to be less than a preset time threshold, meanwhile, the data volume required to be transmitted when the original image to be displayed is also averagely divided into N parts, and the data transmission volume of the sub-images to be displayed is reduced.
And step S103, executing the main control program for multiple times through the electronic equipment so as to sequentially display the multiple sub-images to be displayed on the screen.
Specifically, after dividing an original image to be displayed into N sub images to be displayed, correspondingly, executing a main control program for N times in a circulating manner by the electronic equipment, wherein the execution time of each sub image to be displayed when executing the main control program is one N times of the execution time of the original image to be displayed, and meanwhile, the N is obtained by rounding up the execution time of the original image to be displayed and a preset time threshold value, so that the execution time of the sub images to be displayed is completely ensured to be less than or equal to the preset time threshold value; and when the main control program of the sub-image to be displayed is executed circularly each time, the divided data of the sub-image to be displayed is sequentially transmitted to the screen of the electronic equipment, the data transmission quantity of the sub-image to be displayed is also one N times of the data transmission quantity of the original image to be displayed, and finally, the whole original image to be displayed is loaded under the condition that the execution time of the main program when the data quantity of the transmitted image is displayed each time is less than the preset time threshold value, so that the flash screen is eliminated, and the running time of the main cycle of image transmission each time is reduced.
Therefore, the overlarge image to be displayed is divided, and the divided sub-images to be displayed are sequentially displayed, so that the screen flashing problem in the picture refreshing process is effectively solved, and meanwhile, the running time of the main cycle in the screen refreshing process is reduced, and the running time of the main cycle is controlled within the maximum allowable time.
In some embodiments, the screen display method of the electronic device further includes: and when the execution time is determined not to exceed the preset time threshold, executing the main control program once through the electronic equipment to display the image to be displayed on the screen.
Specifically, when the image to be displayed is not large, the data transmission time is short, the image display time plus the execution time of other instructions in the main program is short, so that the preset time threshold of the electronic device is not exceeded, that is, the execution time of the main program does not exceed the preset time threshold, the image to be displayed is not required to be divided into a plurality of sub-images to be displayed, but the image to be displayed is directly displayed on the screen of the electronic device through the main control program, and therefore, the adaptive adjustment of the screen display of the electronic device is achieved.
In some embodiments, the screen display method of the electronic device further includes: acquiring hardware parameters of the electronic equipment; and acquiring a preset time threshold according to the hardware parameter, wherein the preset time threshold is the maximum allowable time for the electronic equipment to execute the primary main control program.
Specifically, by acquiring parameters of hardware such as a processor and a memory of the electronic device, and according to parameters such as the maximum operational performance of the processor of the electronic device and the maximum storage capacity of the memory, a preset time threshold value in the process of displaying an image on a screen of the electronic device is acquired, the preset time threshold is the maximum allowable time of the main cycle running time, and in the process of displaying the image to be displayed, ensuring that the execution time does not exceed the maximum allowable time of the main loop running time, if the maximum allowable time of the main loop control program running time is exceeded, dividing the image to be displayed after rounding the execution time of the primary program and the ratio of the preset time threshold value as described above, sequentially transmitting and displaying the divided sub-images to be displayed, therefore, the execution time of the sub-image to be displayed does not exceed the maximum allowable time of the main cycle running time, and the aims of eliminating the splash screen and reducing the main cycle running time of each image transmission are fulfilled.
Further, as a specific example, referring to fig. 2, the screen display method of the electronic device may include the steps of:
step S201, obtaining the execution time T of the original image to be displayed of the electronic equipmentoldAnd a preset time threshold Tmax。
Specifically, it is possible to directly calculate the display time from the size of the image to be displayed and the transmission rate, and to calculate the display time from the calculated display time and the display time other than the display timeThe execution time of all the instructions of the system obtains the execution time T of the original image to be displayedoldOr obtaining the execution time T of the original image to be displayed through the running time interval of two idle communication ports for instructing the execution start and the execution endold(ii) a And acquiring a preset time threshold T in the process of displaying the image on the screen of the electronic equipment according to the parameters of hardware such as a processor, a memory and the like of the electronic equipmentmax。
Step S202, judging ToldWhether or not greater than Tmax. If so, step S204 is executed, otherwise, step S203 is executed.
Specifically, the execution time T of the image to be displayed is judgedoldAnd a preset time threshold TmaxIf the time T is executedoldGreater than a preset time threshold TmaxIf the image to be displayed is too large, step S204 is executed, and if the execution time T is up tooldLess than or equal to the preset time threshold TmaxIf the size of the image to be displayed is normal, step S203 is executed.
Step S203, the whole image to be displayed is transmitted to the screen of the electronic equipment, and the program runs normally.
Specifically, the execution time T when the image to be displayed isoldLess than or equal to the preset time threshold TmaxWhen the image to be displayed is displayed on the screen of the electronic equipment directly through a main control program, namely,
step S204, dividing the original image to be displayed into N sub-images to be displayed.
Specifically, the execution time T when the image to be displayed isoldGreater than a preset time threshold TmaxAccording to the execution time T of the image to be displayedoldAnd a preset time threshold TmaxThe ratio is rounded to calculate the number N of the subimages to be displayed, when the ratio is not an integer, the ratio is rounded to serve as the number N of the subimages to be displayed, the original image to be displayed is divided into N subimages to be displayed, after the subimages to be displayed are divided, the execution time of the primary program of the subimages to be displayed each time is the execution time of the primary program of the original image to be displayed and the number N of the subimages to be displayedA ratio.
In step S205, the electronic device executes a main control program to sequentially display the sub-images to be displayed on the screen.
Specifically, after the original image to be displayed is divided into N sub-images to be displayed, correspondingly, the electronic device circularly executes the main control program, and when the main control program is circularly executed each time, the divided data of the sub-images to be displayed are sequentially transmitted to the screen of the electronic device, and the data transmission quantity of each sub-image to be displayed is also averagely divided into N parts, so that the data of each image to be displayed is reduced.
In step S206, it is determined whether to execute the main program loop N times. If yes, step S207 is executed, otherwise, step S205 is returned to.
Specifically, when the data of the sub-images to be displayed are sequentially transmitted to the screen of the electronic device, the number of the displayed sub-images to be displayed needs to be recorded, if the number of the displayed sub-images to be displayed does not reach N, the step S205 is returned, the non-displayed sub-images to be displayed are continuously and sequentially displayed, and if the number of the displayed sub-images to be displayed reaches N, the batch transmission of the original image data to be displayed is completed, and the step S207 is executed.
In step S207, the picture display is completed, and the program runs normally.
Specifically, after N times of cyclic processing, the loading of the whole original image to be displayed is completed under the condition that the execution time of the main program when the image data amount is transmitted and displayed each time is ensured to be smaller than the preset time threshold, so that the aims of eliminating the splash screen and reducing the operation time of the main cycle of image transmission each time are achieved.
In conclusion, the oversized image to be displayed is divided, and the divided sub-images to be displayed are sequentially displayed, so that the problem of screen flashing in the picture refreshing process is effectively solved, and meanwhile, the running time of the main cycle in the screen refreshing process is reduced, so that the running time of the main cycle is controlled within the maximum allowable time.
An embodiment of the present invention provides a computer-readable storage medium having stored thereon a screen display program of an electronic device, which when executed by a processor implements the screen display method of the electronic device described above.
According to the computer-readable storage medium of the embodiment of the invention, by the screen display method of the electronic device, the oversized image to be displayed is divided, and the divided sub-images to be displayed are sequentially displayed, so that the problem of screen flashing in the picture refreshing process is effectively solved, and meanwhile, the running time of the main cycle in the screen refreshing process is reduced, so that the running time of the main cycle is controlled within the maximum allowable time.
An embodiment of the present invention provides an electronic device, including: the screen display method of the electronic equipment comprises a memory, a processor and a screen display program of the electronic equipment, wherein the screen display program of the electronic equipment is stored in the memory and can run on the processor, and when the processor executes the program, the screen display method of the electronic equipment is realized.
According to the electronic equipment provided by the embodiment of the invention, by the screen display method of the electronic equipment, the overlarge image to be displayed is divided, and the divided sub-images to be displayed are sequentially displayed, so that the problem of screen flashing in the picture refreshing process is effectively solved, and meanwhile, the running time of a main cycle in the screen refreshing process is reduced, so that the running time of the main cycle is controlled within the maximum allowable time.
Fig. 3 is a schematic structural diagram of a screen display device of an electronic apparatus according to an embodiment of the invention. As shown in fig. 3, the automatic driving mapping result testing apparatus 100 includes: an acquisition module 110, a division module 120, and a display module 130.
The obtaining module 110 is configured to obtain an execution time for the electronic device to execute a primary main control program, where the execution time includes a display time for displaying an image to be displayed on a screen; the dividing module 120 is configured to divide the image to be displayed into a plurality of sub images to be displayed when the execution time exceeds the preset time threshold; the display module 130 is configured to execute a main control program multiple times through the electronic device, so as to sequentially display a plurality of sub images to be displayed on the screen.
In some embodiments, the obtaining module 110 is further specifically configured to: acquiring the size of an image to be displayed and the transmission rate of transmitting the image to be displayed to a screen; acquiring display time according to the size of the image and the transmission rate; and acquiring the execution time of the electronic equipment for executing the main control program once according to the display time and the instruction execution time of the main control program except the display time.
In some embodiments, the obtaining module 110 is further specifically configured to: executing the main control program once through the electronic equipment, and acquiring the instruction execution starting time and the instruction execution ending time of the main control program; and acquiring the execution time of the electronic equipment for executing the primary control program according to the instruction execution starting time and the instruction execution ending time.
In some embodiments, the obtaining module 110 is further specifically configured to: acquiring time for setting an idle communication port to a first value through a first instruction to serve as instruction execution starting time of a main control program; and acquiring the time for setting the idle communication port to be at the second value through the second instruction as the instruction execution end time of the main control program.
In some embodiments, the partitioning module 120 is specifically configured to: acquiring the ratio of the execution time to a preset time threshold; and acquiring the number of the sub-images to be displayed according to the ratio.
In some embodiments, the display module 130 is specifically configured to: and when the execution time is determined not to exceed the preset time threshold, executing the main control program once through the electronic equipment to display the image to be displayed on the screen.
In some embodiments, the obtaining module 110 is further specifically configured to: acquiring hardware parameters of the electronic equipment; and acquiring a preset time threshold according to the hardware parameter, wherein the preset time threshold is the maximum allowable time for the electronic equipment to execute the primary main control program.
It should be noted that, for the description of the screen display apparatus of the electronic device in the present application, please refer to the description of the screen display method of the electronic device in the present application, which is not repeated herein.
According to the screen display device of the electronic equipment, the screen display method of the electronic equipment is adopted to divide the overlarge image to be displayed and display the divided sub-images to be displayed in sequence, so that the problem of screen flashing in the picture refreshing process is effectively solved, the running time of a main cycle in the screen refreshing process is reduced, and the running time of the main cycle is controlled within the maximum allowable time.
It should be noted that the logic and/or steps represented in the flowcharts or otherwise described herein, such as an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
In the present invention, unless otherwise expressly stated or limited, the terms "mounted," "connected," "secured," and the like are to be construed broadly and can, for example, be fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; they may be directly connected or indirectly connected through intervening media, or they may be connected internally or in any other suitable relationship, unless expressly stated otherwise. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.
Claims (10)
1. A screen display method of an electronic device, the method comprising:
acquiring the execution time of the electronic equipment executing the primary main control program, wherein the execution time comprises the display time of displaying the image to be displayed on the screen;
when the execution time is determined to exceed a preset time threshold, dividing the image to be displayed into a plurality of sub images to be displayed;
and executing the main control program for multiple times through the electronic equipment so as to sequentially display the multiple sub images to be displayed on the screen.
2. The method of claim 1, wherein the obtaining an execution time for the electronic device to execute the main control program once comprises:
acquiring the size of the image to be displayed and the transmission rate for transmitting the image to be displayed to the screen;
acquiring the display time according to the image size and the transmission rate;
and acquiring the execution time of the electronic equipment for executing the primary main control program according to the display time and the instruction execution time of the main control program except the display time.
3. The method of claim 1, wherein the obtaining an execution time for the electronic device to execute the main control program once comprises:
executing the main control program once through the electronic equipment, and acquiring the instruction execution starting time and the instruction execution ending time of the main control program;
and acquiring the execution time of the electronic equipment for executing the main control program once according to the instruction execution starting time and the instruction execution ending time.
4. The method of claim 3, wherein the main control program comprises a first instruction and a second instruction for setting an idle communication port of the electronic device, the first instruction and the second instruction are respectively located at an instruction start position and an instruction end position of the main control program, and the obtaining of the instruction execution start time and the instruction execution end time of the main control program comprises:
acquiring time for setting the idle communication port to a first value through the first instruction as instruction execution start time of the main control program;
and acquiring the time for setting the idle communication port to be a second value through the second instruction to serve as the instruction execution end time of the main control program.
5. The method according to any one of claims 1-4, wherein the dividing the image to be displayed into a plurality of sub-images to be displayed comprises:
acquiring the ratio of the execution time to the preset time threshold;
and acquiring the number of the sub-images to be displayed according to the ratio.
6. The method according to any one of claims 1-4, further comprising:
and when the execution time is determined not to exceed a preset time threshold, executing the main control program once through the electronic equipment to display the image to be displayed on the screen.
7. The method according to any one of claims 1-4, further comprising:
acquiring hardware parameters of the electronic equipment;
and acquiring the preset time threshold according to the hardware parameter, wherein the preset time threshold is the maximum allowable time for the electronic equipment to execute the main control program once.
8. A computer-readable storage medium, having stored thereon a screen display program of an electronic device, which when executed by a processor implements the screen display method of the electronic device according to any one of claims 1 to 7.
9. An electronic device, comprising: a memory, a processor and a screen display program of an electronic device stored on the memory and operable on the processor, the processor implementing the screen display method of the electronic device according to any one of claims 1 to 7 when executing the program.
10. A screen display apparatus of an electronic device, the apparatus comprising:
the acquisition module is used for acquiring the execution time of the electronic equipment for executing the primary main control program, wherein the execution time comprises the display time for displaying the image to be displayed on the screen;
the dividing module is used for dividing the image to be displayed into a plurality of sub images to be displayed when the execution time is determined to exceed a preset time threshold;
and the display module is used for executing the main control program for multiple times through the electronic equipment so as to sequentially display the sub-images to be displayed on the screen.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111253154.8A CN113986172B (en) | 2021-10-27 | 2021-10-27 | Electronic equipment, screen display method and device thereof and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111253154.8A CN113986172B (en) | 2021-10-27 | 2021-10-27 | Electronic equipment, screen display method and device thereof and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113986172A true CN113986172A (en) | 2022-01-28 |
CN113986172B CN113986172B (en) | 2024-07-19 |
Family
ID=79742226
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111253154.8A Active CN113986172B (en) | 2021-10-27 | 2021-10-27 | Electronic equipment, screen display method and device thereof and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113986172B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2016036132A (en) * | 2014-08-04 | 2016-03-17 | キヤノン株式会社 | Information processing apparatus, information processing method, and program |
CN107315792A (en) * | 2017-06-14 | 2017-11-03 | 北京小米移动软件有限公司 | Method for updating pages, device, electronic equipment and computer-readable recording medium |
CN108416722A (en) * | 2018-01-17 | 2018-08-17 | 深圳壹账通智能科技有限公司 | A kind of method for displaying image, storage medium and terminal device |
JP2020030811A (en) * | 2018-08-22 | 2020-02-27 | 北京百度网▲訊▼科技有限公司Beijing Baidu Netcom Science And Technology Co.,Ltd. | Method and device for determining response time |
CN111046448A (en) * | 2019-12-16 | 2020-04-21 | 联想(北京)有限公司 | Information processing method and electronic device |
CN111078172A (en) * | 2019-12-04 | 2020-04-28 | 在线途游(北京)科技有限公司 | Display fluency adjusting method and device, electronic equipment and storage medium |
-
2021
- 2021-10-27 CN CN202111253154.8A patent/CN113986172B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2016036132A (en) * | 2014-08-04 | 2016-03-17 | キヤノン株式会社 | Information processing apparatus, information processing method, and program |
CN107315792A (en) * | 2017-06-14 | 2017-11-03 | 北京小米移动软件有限公司 | Method for updating pages, device, electronic equipment and computer-readable recording medium |
CN108416722A (en) * | 2018-01-17 | 2018-08-17 | 深圳壹账通智能科技有限公司 | A kind of method for displaying image, storage medium and terminal device |
JP2020030811A (en) * | 2018-08-22 | 2020-02-27 | 北京百度网▲訊▼科技有限公司Beijing Baidu Netcom Science And Technology Co.,Ltd. | Method and device for determining response time |
CN111078172A (en) * | 2019-12-04 | 2020-04-28 | 在线途游(北京)科技有限公司 | Display fluency adjusting method and device, electronic equipment and storage medium |
CN111046448A (en) * | 2019-12-16 | 2020-04-21 | 联想(北京)有限公司 | Information processing method and electronic device |
Also Published As
Publication number | Publication date |
---|---|
CN113986172B (en) | 2024-07-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10726804B2 (en) | Display device and display driving method thereof | |
CN108231016B (en) | Display panel pixel brightness compensation control method and device | |
US20160247445A1 (en) | Display device and method and apparatus for compensating luminance of display device | |
KR100945577B1 (en) | Driving device of liquid crystal display and method thereof | |
WO2018000407A1 (en) | Display controller with multiple common voltages corresponding to multiple refresh rates | |
CN106339196A (en) | Data compression and decompression method of DeMura table and Mura compensation method | |
CN111933071B (en) | Driving method and driving device of display panel | |
CN106409240A (en) | Liquid crystal display brightness control method, apparatus and the liquid crystal display device | |
CN110322833B (en) | Display driving method, method for controlling light emission of display panel and display panel | |
US20160293141A1 (en) | Display driving apparatus and display driving method thereof | |
CN112116894A (en) | Brightness compensation method and device of display panel, display panel and storage medium | |
CN115359763B (en) | Ink screen display control method, device, equipment and storage medium | |
CN114093323B (en) | Screen control method and device, electronic equipment and storage medium | |
CN110502090B (en) | Display method and device of display screen | |
CN113986172A (en) | Electronic equipment, screen display method and device thereof and storage medium | |
CN112634821B (en) | Data display method and device and readable storage medium | |
CN109935194A (en) | Display control method, device and the storage medium of LED display | |
CN108597435B (en) | Method for controlling display of display panel, device thereof and display device | |
CN117524128A (en) | Viewing angle compensation method, device, computer equipment and storage medium | |
CN109272972B (en) | Display device and control method thereof | |
CN110673812B (en) | Display method and device of terminal equipment, terminal equipment and storage medium | |
CN117012164A (en) | Brightness adjustment method, device, apparatus and storage medium | |
CN110618799B (en) | Display method and device based on folding screen | |
US11127325B2 (en) | Technologies for enabling simplified pixel shifting to mitigate pixel burn-in | |
CN113314085B (en) | Display method and display device of display panel |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant |