WO2020102956A1 - Interface display method and apparatus, and computer storable medium and electronic device - Google Patents

Interface display method and apparatus, and computer storable medium and electronic device

Info

Publication number
WO2020102956A1
WO2020102956A1 PCT/CN2018/116292 CN2018116292W WO2020102956A1 WO 2020102956 A1 WO2020102956 A1 WO 2020102956A1 CN 2018116292 W CN2018116292 W CN 2018116292W WO 2020102956 A1 WO2020102956 A1 WO 2020102956A1
Authority
WO
WIPO (PCT)
Prior art keywords
target interface
drawing time
interface
preset
preset drawing
Prior art date
Application number
PCT/CN2018/116292
Other languages
French (fr)
Chinese (zh)
Inventor
吴汝煜
Original Assignee
深圳市欢太科技有限公司
Oppo广东移动通信有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 深圳市欢太科技有限公司, Oppo广东移动通信有限公司 filed Critical 深圳市欢太科技有限公司
Priority to PCT/CN2018/116292 priority Critical patent/WO2020102956A1/en
Priority to CN201880098204.XA priority patent/CN112789595A/en
Publication of WO2020102956A1 publication Critical patent/WO2020102956A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Definitions

  • the present application relates to the field of computer technology, and in particular, to interface display methods, devices, computer storable media, and electronic equipment.
  • window management can be responsible for the display and destruction of interface windows.
  • Embodiments of the present application provide an interface display method, device, computer storable medium, and electronic equipment, which can reduce the probability of a black screen and improve the display stability of a target interface.
  • An interface display method including:
  • the start instruction is used to start and draw the target interface to be displayed by the application;
  • an interface display device which runs an acquisition module, including:
  • the instruction receiving module is used to receive the start instruction of the application program, and the start instruction is used to start and draw the target interface to be displayed by the application program;
  • the window obtaining module is used to obtain the window information to be drawn in the target interface according to the startup instruction;
  • the time adjustment module is used to adjust the preset drawing time for drawing the target interface according to the window information
  • the interface drawing module is used to draw the target interface of the application program within the preset drawing time after adjustment and open the target interface.
  • a computer-readable storage medium is also provided on which a computer program is stored, and when the program is executed by a processor, the above interface display method is realized.
  • an electronic device which includes a memory, a processor, and a computer program stored on the memory and executable on the processor.
  • the processor implements the program to implement the above interface display method.
  • the interface display method can receive the start instruction of the application program.
  • the start instruction is used to start and draw the target interface to be displayed by the application program; according to the start instruction, the target interface to be drawn Window information; adjust the preset drawing time for drawing the target interface according to the window information; draw the target interface of the application within the adjusted preset drawing time, and open the target interface to reduce the flash screen by adjusting the preset drawing time
  • 1 is a flowchart of an interface display method in an embodiment
  • FIG. 2 is a flowchart of drawing the target interface of the application program and opening the target interface within the adjusted preset drawing time in one embodiment
  • FIG. 3 is a flowchart of drawing the target interface of the application program and opening the target interface within the adjusted preset drawing time in another embodiment
  • FIG. 5 is a structural frame diagram of an interface display device in an embodiment
  • FIG. 6 is a block diagram of a partial structure of a mobile phone related to an electronic device provided by an embodiment of the present application.
  • FIG. 1 is a flowchart of an interface display method in an embodiment.
  • an interface display method is provided, including steps 102-108. among them,
  • Step 102 Receive a start instruction of the application program, the start instruction is used to start and draw a target interface to be displayed by the application program.
  • the startup instruction is used to draw the target interface to be displayed by the application program as the display interface that needs to be loaded and displayed in the startup operation for the application program.
  • the display interface can be understood as a graphical user interface (Graphical User Interface, GUI) refers to a user interface displayed in a graphical manner. Among them, the generation of graphical user interface brings better visual enjoyment to users.
  • GUI graphical User Interface
  • the graphical user interface is presented on a screen including a parent window and a plurality of child windows drawn within the parent window according to the display scheme.
  • the start instruction may be a user's tap operation on the application icon to request the application to start, or it may be a touch operation on the notification message to request the activation of the notification message.
  • the application program and the target interface to be displayed by the application program, etc., are not limited here.
  • performing the startup operation for the application according to the startup instruction includes starting multiple processes and services corresponding to the application, drawing and loading a target interface (target display interface) corresponding to the application, and so on.
  • the startup instruction is used to draw the target interface to be displayed by the application program as the display interface that needs to be loaded and displayed in the startup operation for the application program.
  • the application program refers to a system application program and a third-party application program installed on the electronic device.
  • the third-party application program may be, for example, a game application, a camera application, an instant messaging application, a video application, etc.
  • the third-party application may It is installed by the user or pre-installed by the developer before the mobile terminal leaves the factory. There is no unique limitation here.
  • Step 104 Acquire window information to be drawn in the target interface according to the startup instruction.
  • the window management module is responsible for the display and destruction of the interface and the window, etc.
  • the window management is implemented by WMS (WindowManagerService).
  • a window is a rectangular area on the screen that can display UI and interact with users.
  • the window is actually a Surface (canvas).
  • the target display interface of a screen may include a parent window and multiple child windows drawn in the parent window according to the display scheme, and the layout and order of the parent window and multiple child windows and window animations are managed by WMS, and then called by a SurfaceFlinger's service to mix and display multiple canvas content.
  • the electronic device may display the target interface according to the startup instruction. While displaying the target interface, the electronic device may obtain the window information to be drawn in the target interface based on the monitoring thread.
  • the window information may include information such as the number of windows, the position of the window, and the type of window.
  • Step 106 Adjust the preset drawing time for drawing the target interface according to the window information.
  • the preset drawing time is the system default time set by the window management module.
  • the target interface of the application program A displays the interface (interface switching display) according to the preset drawing time. If the target interface of the application is drawn within the preset drawing time, the drawn target interface can be displayed normally; if the application is particularly time-consuming to start during the preset drawing time, the target interface If the drawing is not completed, if the preset drawing time is exceeded, the window management module will force the interface to display. Since the target interface is drawn, it is that the target interface of the application cannot be displayed normally, resulting in a black screen.
  • the electronic device may adjust the preset drawing time for drawing the target interface according to the window information.
  • the preset drawing time can generally be set to 5 seconds, for example, the electronic device can adjust the preset drawing time according to the window information, can increase the preset drawing time, and adjust it to 6 seconds, 7 seconds, 8 seconds, or 10 seconds, etc. Time greater than 5 seconds without affecting user experience.
  • the electronic device can also maintain the preset drawing time unchanged at 5 seconds according to the window information.
  • Step 108 Draw the target interface of the application within the adjusted preset drawing time, and open the target interface.
  • the electronic device can adjust the preset drawing time for drawing the target interface according to the window information.
  • the preset drawing time is 5 seconds
  • the electronic device may appropriately increase the preset drawing time so that the adjusted preset drawing time is 10 seconds
  • the electronic device may use the adjusted preset drawing time (10 seconds) to Draw the target interface of the application and display the target interface.
  • the interface display method may receive a start instruction of the application program, the start instruction is used to start and draw the target interface to be displayed by the application program; the window information to be drawn in the target interface is obtained according to the start instruction; Draw the preset drawing time of the target interface; draw the target interface of the application within the adjusted preset drawing time, and open the target interface, reduce the probability of flashing black screen by adjusting the preset drawing time, and improve the display stability of the target interface To improve user experience.
  • the preset drawing time is increased. That is, if the number of windows to be displayed in the target interface is one, the preset drawing time can be doubled to change it from 5 seconds to 10 seconds. That is, by increasing the preset drawing time, the application program can have more time to draw the target interface, so that it can display the target interface normally.
  • the adjusted preset drawing time is greater than the system's default preset drawing time, so that the adjusted preset drawing time is in the range of 6-15 seconds, so as not to affect the normal time and user's use of electronic devices Experience degree.
  • the preset drawing time is maintained.
  • the electronic device can maintain the default preset drawing time of the system. If only one of the windows is drawn successfully within the default preset drawing time of the system, the corresponding successfully drawn window is displayed, but not The successfully drawn window is not displayed, or the unsuccessfully drawn window area is displayed in black.
  • drawing the target interface of the application program within the preset drawing time after adjustment and opening the target interface includes steps 202-206. among them,
  • step 202 the target interface is drawn within the adjusted preset drawing time according to the startup instruction.
  • the electronic device may implement the drawing of the target interface within the adjusted preset drawing time based on the window management in the android system.
  • WindowManagerService there are many modules involved in window management.
  • WindowManagerService also includes SurfaceFlinger service, Linux shared memory and tmpfs file system, Binder communication, InputManagerService, animation, VSYNC synchronization technology, etc.
  • it is the application side to complete the image drawing, and the SurfaceFlinger service to complete the layer composition.
  • the electronic device can enable the application to add a window to it through the proxy of WindowManagerService according to the startup instruction, and apply for a Surface canvas to the SurfaceFlinger service.
  • the canvas corresponds to a piece of memory. When the memory application is successful, the application side only draws The goal.
  • the memory is shared between the application and the process between SurfaceFlinger.
  • Linux-based shared memory that is, MAP + tmpfs file system
  • the information related to this memory is passed to the application terminal through binder, and the application terminal draws content into this memory according to the adjusted preset drawing time, and the drawing is completed , Notify the SF layer shuffle, after that, SF will render the data to the screen.
  • the electronic device may call the main thread (Main) Thread according to the startup instruction.
  • the main thread may be understood as a thread responsible for drawing the target interface of the application that needs to be displayed, which uses the main loop (Main Looper) To be responsible for the task of drawing the target interface.
  • the main thread will continuously take messages from the message queue and call its bound Handler to perform the task of drawing the target interface on the main thread.
  • Step 204 Obtain the actual drawing time of the target interface, and use a monitoring thread to monitor whether the actual drawing time exceeds the preset drawing time.
  • the electronic device when the target interface starts to draw, the electronic device triggers the callback interface to interact with the window management module (service). Therefore, the electronic device can create a monitoring thread, and the monitoring thread can draw the actual drawing time of the target interface. During the process of drawing the target interface, the monitoring thread can monitor whether the actual drawing time exceeds the preset drawing time.
  • Step 206 When the actual drawing time does not exceed the adjusted preset drawing time, open the target interface when the target interface drawing is completed.
  • the adjusted preset drawing time may be set to t1, and the actual drawing time may be set to t2.
  • the electronic device can obtain the actual drawing time t2 of the drawing target interface according to the monitoring thread, and compare the monitored actual drawing time t2 with the adjusted preset drawing time t1, if the actual drawing time t2 does not exceed the adjusted preset drawing time At t1, the target interface is opened when the target interface is drawn.
  • the actual drawing time t2 is 3 seconds
  • the preset drawing time t1 is 8 seconds after adjustment.
  • the application B When the application B starts the drawing of the target interface within 3 seconds according to the startup instruction, it can be completed in the first
  • the target interface can be displayed at the end of 3 seconds without waiting for the adjusted preset drawing time (8 seconds) to be displayed before the drawn target interface is completed, which can improve the display efficiency.
  • the adjusted preset drawing time is greater than the system default preset drawing time.
  • opening the target interface when the target interface drawing is completed includes the step of opening the target interface based on the pre-created active window stack when the target interface drawing is completed.
  • the electronic device can create a task stack corresponding to the application program in the pre-created active window stack; and start the active window corresponding to the application program in the task stack; draw and display the startup interface corresponding to the application program based on the launched active window . Subsequently, a new active window can be started under the above task stack, and the target interface is drawn and displayed based on the new active window.
  • the active window can be understood as an independent interface that directly provides users with interaction and operation. Different operating systems may use different terms to name the interface. Take the Android operating system as an example for the following description.
  • the active window is called Activity.
  • Activity is a component responsible for interacting with the user. It provides a screen (which can be understood as a screen interface, rather than a physical display screen) for the user to complete a certain task interactively.
  • an Activity is usually a separate screen, it can display some controls on it can also listen to and handle user events.
  • the interface display method further includes step 208, when the actual drawing time exceeds the adjusted preset drawing time and the target interface is not drawn, the target interface is displayed in black.
  • the electronic device may obtain the actual drawing time t2 of the drawing target interface according to the monitoring thread, and compare the monitored actual drawing time t2 with the adjusted preset drawing time t1, if the actual drawing time t2 exceeds the adjusted preset When the drawing time is t1, but the target interface has not been drawn yet, the target interface is controlled to display a black screen.
  • the preset drawing time t1 is 8 seconds.
  • the target interface can be controlled to display a black screen at the end of the 8th second.
  • the display can inform the user that the electronic device can start the application program, and the application program has feedback on the user's start-up operation, but the start-up operation is not successful, thereby preventing the user from always initiating the start-up operation of the application program.
  • the adjusted preset drawing time is greater than the system default preset drawing time.
  • the interface display method further includes step 210, when the actual drawing time exceeds the preset drawing time and the target interface is not drawn, displaying information about the abnormality of the application.
  • the electronic device may obtain the actual drawing time t2 of the drawing target interface according to the monitoring thread, and compare the monitored actual drawing time t2 with the adjusted preset drawing time t1, if the actual drawing time t2 exceeds the adjusted preset When the drawing time is t1, but the target interface has not been drawn yet, the target interface is controlled to display a black screen.
  • the preset drawing time t1 is 8 seconds.
  • the target interface can be controlled to display a black screen at the end of the 8th second.
  • the application B does not complete the drawing within the preset drawing time after adjustment, it means that the startup of the application B has been stuck, and the target interface of the application will never be drawn successfully, indicating that the application B starts If it is abnormal, you can pop up an application abnormal prompt, such as "APP detected an abnormality, please restart APP" and other prompt text or voice prompts.
  • an application abnormal prompt such as "APP detected an abnormality, please restart APP" and other prompt text or voice prompts.
  • the adjusted preset drawing time is greater than the system default preset drawing time.
  • the user can be informed that it is not the electronic device that has the problem but the abnormal startup of the application program, thereby eliminating the bad impression of the user on the electronic device manufacturer.
  • the number of windows is multiple, drawing the target interface of the application within the preset drawing time after adjustment, and opening the target interface, including:
  • Step 302 Drawing multiple windows of the target interface within the adjusted preset drawing time according to the startup instruction.
  • Step 304 when at least one window is completed within the preset drawing time after adjustment, the target interface is opened.
  • the electronic device when multiple windows of the target interface start to draw, the electronic device triggers the callback interface to interact with the window management module (service). Therefore, the electronic device can create a monitoring thread that can draw the actual drawing time of each window of the target interface. During the process of drawing the target interface, the monitoring thread can monitor whether there is at least one within the adjusted preset drawing time The window drawing is complete.
  • window A and window B are represented by window A and window B, respectively, when window A is drawn within the adjusted preset drawing time, and window B is drawn after the adjusted preset drawing time
  • the electronic device can control to open the target interface and make the window A displayed normally, and the other areas except the window A are displayed in black.
  • the adjusted preset drawing time is the same as the system default preset drawing time.
  • the interface display method further includes: Step 306, when no window is completed within the preset drawing time, causing the target interface to display a black screen.
  • the electronic device can control the target The interface is blank. If the target interface does not finish drawing within the preset drawing time after adjustment, it means that the start of the application has been stuck, and the target interface of the application will never be drawn successfully.
  • the black screen display of the target interface The user can be informed that the electronic device can start the application program, and the application program has feedback on the user's start-up operation, but the start-up operation is not successful, thereby preventing the user from always initiating the start-up operation of the application program.
  • the adjusted preset drawing time is the same as the system default preset drawing time.
  • the information of the abnormal application is displayed. For example, if there is no window in the application and the drawing is not completed within the preset drawing time after adjustment, the start of the application has been stuck, and the target interface of the application will never be drawn successfully, indicating that the application
  • a prompt of abnormal application program may pop up, such as the prompt text or prompt voice such as "APP detected an abnormality, please restart APP".
  • the adjusted preset drawing time is the same as the system default preset drawing time.
  • the interface display method includes steps 402-416. among them,
  • Step 402 Receive a start instruction of the application program, the start instruction is used to start and draw a target interface to be displayed by the application program;
  • Step 404 Acquire window information to be drawn in the target interface according to the startup instruction, and the window information includes the number of windows;
  • Step 405 When the number of windows is one, increase the preset drawing time.
  • step 407 the target interface is drawn within the adjusted preset drawing time according to the startup instruction.
  • Step 409 Obtain the actual drawing time of the target interface, and use the monitoring thread to monitor whether the actual drawing time exceeds the preset drawing time.
  • Step 411 When the actual drawing time does not exceed the preset drawing time, open the target interface when the target interface drawing is completed.
  • Step 413 When the actual drawing time exceeds the preset drawing time and the target interface is not drawn, the target interface is displayed in black.
  • Step 406 when the number of windows is multiple, maintain the preset drawing time
  • Step 408 Call the main thread to draw multiple windows of the target interface within a preset drawing time according to the startup instruction
  • Step 410 when at least one window is completed within a preset drawing time, a target interface is opened.
  • Step 412 when no window is completed within the preset drawing time, the target interface is displayed in black.
  • the interface display method may receive the startup instruction of the application program, and obtain the window information to be drawn in the target interface according to the startup instruction; wherein, the window information includes the number of windows, and then adjusts the pre-drawing used to draw the target interface according to the number of windows Set the drawing time.
  • the preset drawing time By adjusting the preset drawing time, the probability of flashing black screen is reduced, the display stability of the target interface is improved, and the user experience is improved.
  • the number of windows is one, increase the preset drawing time, and draw the target interface within the adjusted preset drawing time according to the startup instruction, obtain the actual drawing time of the target interface, and use the monitoring thread to monitor whether the actual drawing time exceeds Preset drawing time.
  • the target interface is opened when the target interface drawing is completed, the electronic device can quickly start and complete the drawing of the target interface, and immediately display the target interface when the drawing is completed without waiting Displaying the target interface where the drawing is completed until the adjusted preset drawing time ends can improve its display efficiency.
  • the target interface is displayed in black, which can inform the user that the electronic device can start the application.
  • the application has feedback on the user's startup operation, but It has not been started successfully, which can prevent the user from always initiating the operation of starting the application.
  • the target interface is displayed on a black screen, which can inform the user that the electronic device can start the application.
  • the application has feedback on the user's startup operation, but it is not successful. , Which can prevent the user from always initiating the operation of starting the application.
  • steps in the flowcharts of FIGS. 1-4 are displayed in order according to the arrows, the steps are not necessarily executed in the order indicated by the arrows. Unless clearly stated in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least some of the steps in FIGS. 1-4 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times. These sub-steps or stages The execution order of is not necessarily sequential, but may be executed in turn or alternately with at least a part of other steps or sub-steps or stages of other steps.
  • FIG. 5 is a schematic structural diagram of an interface display device in an embodiment.
  • the interface display device includes an instruction receiving module 510, a window obtaining module 520, a time adjustment module 530, and an interface drawing module 540. among them,
  • the instruction receiving module 510 is used to receive the start instruction of the application program, and the start instruction is used to start and draw the target interface to be displayed by the application program;
  • the window obtaining module 520 is used to obtain the window information to be drawn in the target interface according to the startup instruction;
  • the time adjustment module 530 is used to adjust the preset drawing time for drawing the target interface according to the window information.
  • the interface drawing module 540 is used for drawing the target interface of the application program within the preset drawing time after adjustment and opening the target interface.
  • the above interface display device can receive the start instruction of the application program, and the start instruction is used to start and draw the target interface to be displayed by the application program; obtain the window information to be drawn in the target interface according to the start instruction; adjust to draw the target interface according to the window information Preset drawing time; draw the target interface of the application within the adjusted preset drawing time, and open the target interface, reduce the probability of flashing black screen by adjusting the preset drawing time, improve the display stability of the target interface, and improve the user Experience degree.
  • the window information includes the number of windows; the time adjustment module 530 is further configured to adjust the preset drawing time for drawing the target interface according to the number of windows.
  • the preset drawing time is increased.
  • the preset drawing time is maintained.
  • the interface drawing module 540 when the number of windows is one, includes:
  • the drawing unit is used to draw the target interface within a preset drawing time according to the startup instruction
  • the monitoring unit is used to obtain the actual drawing time of the target interface, and use the monitoring thread to monitor whether the actual drawing time exceeds the adjusted preset drawing time;
  • the interface unit is used to open the target interface when the target interface drawing is completed when the actual drawing time does not exceed the adjusted preset drawing time.
  • the electronic device can obtain the actual drawing time t2 of the drawing target interface according to the monitoring thread, and compare the monitored actual drawing time t2 with the adjusted preset drawing time t1, if the actual drawing time t2 does not exceed the adjusted At the preset drawing time t1, the target interface is opened when the target interface drawing is completed.
  • the actual drawing time t2 is 3 seconds
  • the preset drawing time t1 is 8 seconds after adjustment.
  • the application B starts the drawing of the target interface within 3 seconds according to the startup instruction, it can be completed in the first
  • the target interface can be displayed at the end of 3 seconds without waiting for the adjusted preset drawing time (8 seconds) to be displayed before the drawn target interface is completed, which can improve the display efficiency.
  • the interface unit is further used to make the target interface display black when the actual drawing time exceeds the adjusted preset drawing time and the target interface is not drawn.
  • the application B does not complete the drawing within the adjusted preset drawing time, it means that the startup of the application B has been stuck, and the target interface of the application will never be drawn successfully.
  • the black screen display of the control target interface can inform the user that the electronic device can start the application.
  • the application has feedback on the user's start-up operation, but it is not successful, which can prevent the user from always launching the application. operating.
  • the interface unit is further used to display abnormal information of the application program when the actual drawing time exceeds the adjusted preset drawing time and the target interface is not drawn.
  • the user can be informed that it is not the electronic device that has the problem but the abnormal startup of the application program, thereby eliminating the bad impression of the user on the electronic device manufacturer.
  • the monitoring unit is further configured to draw multiple windows of the target interface within the adjusted preset drawing time according to the startup instruction.
  • the interface unit is also used to open the target interface based on the pre-created active window stack when the target interface is drawn.
  • the interface unit is further configured to open the target interface when at least one window is completed within the adjusted preset drawing time.
  • the interface unit is also used to make the target interface display black when no window is completed within the adjusted preset drawing time.
  • the target interface when no window is completed within the preset drawing time, the target interface is displayed in a black screen, which can inform the user that the electronic device can start the application, and the application has feedback on the user's startup operation. It is just that it has not been started successfully, which can prevent the user from always initiating the operation of starting the application.
  • each module in the above interface display device is for illustration only. In other embodiments, the interface display device may be divided into different modules as needed to complete all or part of the functions of the above interface display device.
  • Each module in the above-mentioned interface display device may be implemented in whole or in part by software, hardware, or a combination thereof.
  • the above modules may be embedded in the hardware or independent of the processor in the electronic device, or may be stored in the memory in the electronic device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
  • the embodiments of the present application also provide a computer-readable storage medium.
  • One or more non-volatile computer-readable storage media containing computer-executable instructions when the computer-executable instructions are executed by one or more processors, cause the processor to perform the following steps of the interface display method:
  • the start instruction is used to start and draw the target interface to be displayed by the application;
  • one or more non-volatile computer-readable storage media containing computer-executable instructions when the computer-executable instructions are executed by one or more processors, may also cause the processor to perform any of the foregoing implementations
  • the interface display method in the example may also cause the processor to perform any of the foregoing implementations
  • a computer program product containing instructions that, when run on a computer, causes the computer to perform the steps of the interface display method:
  • the start instruction is used to start and draw the target interface to be displayed by the application;
  • a computer program product containing instructions when run on a computer, causes the computer to execute the interface display method in any of the above embodiments.
  • An embodiment of the present application also provides an electronic device. As shown in FIG. 6, for ease of description, only parts related to the embodiments of the present application are shown, and specific technical details are not disclosed, please refer to the method part of the embodiments of the present application.
  • the electronic device may be any terminal device including a mobile phone, tablet computer, PDA (Personal Digital Assistant), POS (Point of Sales), in-vehicle computer, wearable device, etc. that has a voice call function and has a speaker , Taking an electronic device as a mobile phone as an example:
  • the mobile phone includes: a radio frequency (Radio Frequency) circuit 610, a memory 620, an input unit 630, a display unit 640, a sensor 650, an audio circuit 660, a wireless fidelity (WiFi) module 670, a processor 680 , And power supply 690 and other components.
  • a radio frequency (Radio Frequency) circuit 610 the radio frequency (Radio Frequency) circuit 610
  • a memory 620 includes: a radio frequency (Radio Frequency) circuit 610, a memory 620, an input unit 630, a display unit 640, a sensor 650, an audio circuit 660, a wireless fidelity (WiFi) module 670, a processor 680 , And power supply 690 and other components.
  • WiFi wireless fidelity
  • the structure of the mobile phone shown in FIG. 6 does not constitute a limitation on the mobile phone, and may include more or fewer components than those shown in the figure, or a combination of certain components, or a different component arrangement.
  • the RF circuit 610 can be used to receive and send signals during sending and receiving information or during a call. It can receive the downlink information of the base station and process it to the processor 680; it can also send the uplink data to the base station.
  • RF circuits include but are not limited to antennas, at least one amplifier, transceiver, coupler, low noise amplifier (Low Noise Amplifier, LNA), duplexer, and so on.
  • the RF circuit 610 can also communicate with other devices through a wireless communication network.
  • the above wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile (GSM), General Packet Radio Service (GPRS), and Code Division Multiple Access (Code Division) Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), e-mail, Short Message Service (SMS), etc.
  • GSM Global System of Mobile
  • GPRS General Packet Radio Service
  • CDMA Code Division Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • LTE Long Term Evolution
  • SMS Short Message Service
  • the memory 620 may be used to store software programs and modules.
  • the processor 680 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 620.
  • the memory 620 may mainly include a program storage area and a data storage area, where the program storage area may store an operating system and at least one function-required application program (such as a sound playback function application program, an image playback function application program, etc.), etc .;
  • the data storage area can store data (such as audio data, address book, etc.) created according to the use of the mobile phone.
  • the memory 620 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
  • the input unit 630 may be used to receive input numeric or character information, and generate key signal input related to user settings and function control of the mobile phone 600.
  • the input unit 630 may include a touch panel 631 and other input devices 632.
  • the touch panel 631 also known as a touch screen, can collect user's touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc. on or near the touch panel 631 Operation), and drive the corresponding connection device according to the preset program.
  • the touch panel 631 may include a touch detection device and a touch controller.
  • the touch detection device detects the user's touch orientation and detects the signal brought by the touch operation, and transmits the signal to the touch controller; To the processor 680, and can receive the command sent by the processor 680 and execute it.
  • the touch panel 631 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 630 may also include other input devices 632.
  • the other input devices 632 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.).
  • the display unit 640 may be used to display information input by the user or information provided to the user and various menus of the mobile phone.
  • the display unit 640 may include a display panel 641.
  • the display panel 641 may be configured in the form of a liquid crystal display (Liquid Crystal) (LCD), an organic light-emitting diode (Organic Light-Emitting Diode, OLED), or the like.
  • the touch panel 631 may cover the display panel 641, and when the touch panel 631 detects a touch operation on or near it, it is transmitted to the processor 680 to determine the type of touch event, and then the processor 680 according to The type of touch event provides corresponding visual output on the display panel 641.
  • the touch panel 631 and the display panel 641 are implemented as two independent components to realize the input and input functions of the mobile phone, in some embodiments, the touch panel 631 and the display panel 641 may be integrated Realize the input and output functions of the mobile phone.
  • the mobile phone 600 may further include at least one sensor 650, such as a light sensor, a motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 641 according to the brightness of the ambient light, and the proximity sensor may close the display panel 641 and / or when the mobile phone moves to the ear Or backlight.
  • the motion sensor may include an acceleration sensor, which can detect the magnitude of acceleration in various directions through the acceleration sensor, and can detect the magnitude and direction of gravity when at rest, and can be used for applications that recognize mobile phone gestures (such as horizontal and vertical screen switching), and vibration recognition-related functions (such as Pedometer, percussion), etc.
  • the mobile phone can also be equipped with other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor and so on.
  • the audio circuit 660, the speaker 661, and the microphone 662 may provide an audio interface between the user and the mobile phone.
  • the audio circuit 660 can transmit the converted electrical signal of the received audio data to the speaker 661, which converts the speaker 661 into a sound signal output; on the other hand, the microphone 662 converts the collected sound signal into an electrical signal, which is converted by the audio circuit 660 After receiving, it is converted into audio data, and then processed by the audio data output processor 680, and then sent to another mobile phone through the RF circuit 610, or the audio data is output to the memory 620 for subsequent processing.
  • WiFi is a short-range wireless transmission technology.
  • the mobile phone can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 670. It provides users with wireless broadband Internet access.
  • FIG. 6 shows the WiFi module 670, it can be understood that it is not a necessary component of the mobile phone 600, and may be omitted as needed.
  • the processor 680 is the control center of the mobile phone, and uses various interfaces and lines to connect the various parts of the entire mobile phone. Various functions and processing data of the mobile phone, so as to monitor the mobile phone as a whole.
  • the processor 680 may include one or more processing units.
  • the processor 680 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, application programs, and the like; the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 680.
  • the mobile phone 600 further includes a power supply 690 (such as a battery) that supplies power to various components.
  • a power supply 690 (such as a battery) that supplies power to various components.
  • the power supply can be logically connected to the processor 680 through a power management system, so as to realize functions such as charging, discharging, and power management through the power management system.
  • the mobile phone 600 may further include a camera, a Bluetooth module, and the like.
  • the processor 680 included in the electronic device implements the following steps when executing the computer program stored on the memory:
  • the start instruction is used to start and draw the target interface to be displayed by the application;
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

An interface display method and apparatus, and a computer storable medium and an electronic device. The interface display method comprises: receiving a startup instruction of an application program, the startup instruction being used for starting up and drawing a target interface to be displayed by the application program (102); acquiring, according to the startup instruction, window information to be drawn in the target interface (104); adjusting, according to the window information, a preset drawing time for drawing the target interface (106); and drawing the target interface of the application program within the adjusted preset drawing time, and opening the target interface (108).

Description

界面显示方法、装置、计算机可存储介质和电子设备Interface display method, device, computer storable medium and electronic equipment 技术领域Technical field
本申请涉及计算机技术领域,特别是涉及界面显示方法、装置、计算机可存储介质和电子设备。The present application relates to the field of computer technology, and in particular, to interface display methods, devices, computer storable media, and electronic equipment.
背景技术Background technique
电子设备用户在使用某个应用程序(APP)时,通常需要启动该应用程序并显示该应用程序的目标界面,或需要从一个应用程序的目标界面切换至另一应用程序的目标界面。基于电子设备的android系统,窗口管理可负责界面窗口的显示和销毁等。When users of an electronic device use an application (APP), they usually need to start the application and display the target interface of the application, or need to switch from the target interface of one application to the target interface of another application. Based on the android system of electronic devices, window management can be responsible for the display and destruction of interface windows.
在使用电子设备的过程中,当需要启动一应用程序时,若该应用程序的启动较为耗时,则会导致该应用程序的目标界面绘制失败,在一定情况下窗口管理就会强制进行界面切换而导致目标界面无法显示而黑屏。In the process of using an electronic device, when an application needs to be started, if the application is time-consuming to start, it will cause the target interface of the application to fail to be drawn, and under certain circumstances, window management will force interface switching As a result, the target interface cannot be displayed and the screen is blank.
发明内容Summary of the invention
本申请实施例提供一种界面显示方法、装置、计算机可存储介质和电子设备,能够降低黑屏的概率,提高目标界面的显示稳定性。Embodiments of the present application provide an interface display method, device, computer storable medium, and electronic equipment, which can reduce the probability of a black screen and improve the display stability of a target interface.
一种界面显示方法,方法包括:An interface display method, including:
接收应用程序的启动指令,启动指令用于启动并绘制应用程序待显示的目标界面;Receive the start instruction of the application, the start instruction is used to start and draw the target interface to be displayed by the application;
根据启动指令获取目标界面内待绘制的窗口信息;Obtain the window information to be drawn in the target interface according to the startup instruction;
根据窗口信息调节用于绘制目标界面的预设绘制时间;Adjust the preset drawing time for drawing the target interface according to the window information;
在调节后的预设绘制时间内绘制应用程序的目标界面,并打开目标界面。Draw the target interface of the application within the preset drawing time after adjustment, and open the target interface.
此外,还提供一种界面显示装置,运行获取模块,包括:In addition, an interface display device is provided, which runs an acquisition module, including:
指令接收模块,用于接收应用程序的启动指令,启动指令用于启动并绘制应用程序待显示的目标界面;The instruction receiving module is used to receive the start instruction of the application program, and the start instruction is used to start and draw the target interface to be displayed by the application program;
窗口获取模块,用于根据启动指令获取目标界面内待绘制的窗口信息;The window obtaining module is used to obtain the window information to be drawn in the target interface according to the startup instruction;
时间调节模块,用于根据窗口信息调节用于绘制目标界面的预设绘制时间;The time adjustment module is used to adjust the preset drawing time for drawing the target interface according to the window information;
界面绘制模块,用于在调节后的预设绘制时间内绘制应用程序的目标界面,并打开目标界面。The interface drawing module is used to draw the target interface of the application program within the preset drawing time after adjustment and open the target interface.
此外,还提供一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述的界面显示方法。In addition, a computer-readable storage medium is also provided on which a computer program is stored, and when the program is executed by a processor, the above interface display method is realized.
此外,还提供一种电子设备,包括存储器,处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行程序时实现上述的界面显示方法。In addition, an electronic device is provided, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor. The processor implements the program to implement the above interface display method.
上述界面显示方法、装置、计算机可存储介质和电子设备,界面显示方法可接收应用程序的启动指令,启动指令用于启动并绘制应用程序待显示的目标界面;根据启动指令获取目标界面内待绘制的窗口信息;根据窗口信息调节用于绘制目标界面的预设绘制时间;在调节后的预设绘制时间内绘制应用程序的目标界面,并打开目标界面,通过调节预设绘制时间来降低闪黑屏的概率,提高目标界面的显示稳定性,提高用户体验度。The above-mentioned interface display method, device, computer storable medium and electronic equipment. The interface display method can receive the start instruction of the application program. The start instruction is used to start and draw the target interface to be displayed by the application program; according to the start instruction, the target interface to be drawn Window information; adjust the preset drawing time for drawing the target interface according to the window information; draw the target interface of the application within the adjusted preset drawing time, and open the target interface to reduce the flash screen by adjusting the preset drawing time The probability of improving the display stability of the target interface and improving the user experience.
附图说明BRIEF DESCRIPTION
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他实施例的附图。In order to more clearly explain the embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings required in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present application. For those of ordinary skill in the art, without paying any creative work, drawings of other embodiments can be obtained based on these drawings.
图1为一个实施例中界面显示方法的流程图;1 is a flowchart of an interface display method in an embodiment;
图2为一个实施例中在调节后的预设绘制时间内绘制应用程序的目标界面,并打开目标界面的流程图;FIG. 2 is a flowchart of drawing the target interface of the application program and opening the target interface within the adjusted preset drawing time in one embodiment;
图3为另一个实施例中在调节后的预设绘制时间内绘制应用程序的目标界面,并打开目标界面的流程图;FIG. 3 is a flowchart of drawing the target interface of the application program and opening the target interface within the adjusted preset drawing time in another embodiment;
图4为另一个实施例中界面显示方法的流程图;4 is a flowchart of an interface display method in another embodiment;
图5为一个实施例中界面显示装置的结构框架图;5 is a structural frame diagram of an interface display device in an embodiment;
图6为与本申请实施例提供的电子设备相关的手机的部分结构的框图。6 is a block diagram of a partial structure of a mobile phone related to an electronic device provided by an embodiment of the present application.
具体实施方式detailed description
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用 以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application more clear, the present application will be described in further detail in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
图1为一个实施例中界面显示方法的流程图。在本申请实施例中,提供一种界面显示方法,包括步骤102-步骤108。其中,FIG. 1 is a flowchart of an interface display method in an embodiment. In an embodiment of the present application, an interface display method is provided, including steps 102-108. among them,
步骤102,接收应用程序的启动指令,启动指令用于启动并绘制应用程序待显示的目标界面。Step 102: Receive a start instruction of the application program, the start instruction is used to start and draw a target interface to be displayed by the application program.
启动指令用于绘制应用程序待显示的目标界面为针对应用程序的启动操作中需要加载显示的显示界面。显示界面可理解为图形用户界面(Graphical User Interface,GUI)是指采用图形方式显示的用户界面。其中,图形用户界面的产生给用户带来更好的视觉享受。图形用户界面被呈现在包括父窗口以及根据显示方案绘制在该父窗口内的多个子窗口的屏幕上。The startup instruction is used to draw the target interface to be displayed by the application program as the display interface that needs to be loaded and displayed in the startup operation for the application program. The display interface can be understood as a graphical user interface (Graphical User Interface, GUI) refers to a user interface displayed in a graphical manner. Among them, the generation of graphical user interface brings better visual enjoyment to users. The graphical user interface is presented on a screen including a parent window and a plurality of child windows drawn within the parent window according to the display scheme.
电子设备接收到针对应用程序的启动指令时,该启动指令可以是用户针对应用程序图标的点触操作,请求启动应用程序,或者可以是针对通知消息的点触操作,请求启动与通知消息关联的应用程序并绘制应用程序待显示的目标界面等,在此不做唯一限定。When the electronic device receives the start instruction for the application, the start instruction may be a user's tap operation on the application icon to request the application to start, or it may be a touch operation on the notification message to request the activation of the notification message. The application program and the target interface to be displayed by the application program, etc., are not limited here.
其中,根据启动指令执行针对应用程序的启动操作包括启动应用程序对应的多个进程和服务,绘制并加载与应用程序对应的目标界面(目标显示界面)等。启动指令用于绘制应用程序待显示的目标界面为针对应用程序的启动操作中需要加载显示的显示界面。Among them, performing the startup operation for the application according to the startup instruction includes starting multiple processes and services corresponding to the application, drawing and loading a target interface (target display interface) corresponding to the application, and so on. The startup instruction is used to draw the target interface to be displayed by the application program as the display interface that needs to be loaded and displayed in the startup operation for the application program.
应用程序是指安装在电子设备的系统应用程序和第三方应用程序,该第三方应用程序例如可以是游戏类应用、拍照类应用、即时通讯类应用、视频类应用等,该第三方应用程序可以由用户安装,也可以由开发人员在移动终端出厂前预装,此处不做唯一限定。The application program refers to a system application program and a third-party application program installed on the electronic device. The third-party application program may be, for example, a game application, a camera application, an instant messaging application, a video application, etc. The third-party application may It is installed by the user or pre-installed by the developer before the mobile terminal leaves the factory. There is no unique limitation here.
步骤104,根据启动指令获取目标界面内待绘制的窗口信息。Step 104: Acquire window information to be drawn in the target interface according to the startup instruction.
例如,在android系统框架层中,窗口管理模块负责界面以及窗口的显示和销毁等,窗口管理是由WMS(WindowManagerService)负责实现的。窗口就是屏幕上的一块矩形区域,可以显示UI和与用户交互。窗口其实是一个Surface(画布)。一个屏幕的目标显示界面可包括父窗口以及根据显示方案绘制在该父窗口内的多个子窗口,而这父窗口和多个子窗口的布局和顺序以及窗口动画是由WMS管理的,然后由一个叫SurfaceFlinger的服务来对多个画布内容混合和显示出来。For example, in the framework layer of the Android system, the window management module is responsible for the display and destruction of the interface and the window, etc. The window management is implemented by WMS (WindowManagerService). A window is a rectangular area on the screen that can display UI and interact with users. The window is actually a Surface (canvas). The target display interface of a screen may include a parent window and multiple child windows drawn in the parent window according to the display scheme, and the layout and order of the parent window and multiple child windows and window animations are managed by WMS, and then called by a SurfaceFlinger's service to mix and display multiple canvas content.
在目标界面中可仅包括一个窗口,或可包括多个窗口。其中,多个为大于或等于2个。窗口可以为透明窗口、隐藏窗口、弹窗窗口等。电子设备可以根据启动指令来显示该目标界面,在进行显示该目标界面的同时,电子设备可以基于监控线程来获取目标界面内待绘制的窗口信息。具体地,窗口信息可包括窗口数量、窗口位置、窗口类型等信息。Only one window may be included in the target interface, or multiple windows may be included. Among them, multiple are greater than or equal to two. The window can be a transparent window, a hidden window, a pop-up window, etc. The electronic device may display the target interface according to the startup instruction. While displaying the target interface, the electronic device may obtain the window information to be drawn in the target interface based on the monitoring thread. Specifically, the window information may include information such as the number of windows, the position of the window, and the type of window.
步骤106,根据窗口信息调节用于绘制目标界面的预设绘制时间。Step 106: Adjust the preset drawing time for drawing the target interface according to the window information.
预设绘制时间为窗口管理模块设置的系统默认时间。其中,当应用程序A接收到启动指令时,该应用程序A的目标界面根据该预设绘制时间来实现界面的显示(界面切换显示)。若在该预设绘制时间内,该应用程序的目标界面绘制完成,则可正常显示该绘制的目标界面;若在该预设绘制时间内,该应用程序启动时特别耗时,该目标界面一直未绘制完成,若超过该预设绘制时间,窗口管理模块就会强制进行界面显示,由于该目标界面为绘制完成,就是使得该应用程序的目标界面无法正常显示而导致黑屏。The preset drawing time is the system default time set by the window management module. Wherein, when the application program A receives the startup instruction, the target interface of the application program A displays the interface (interface switching display) according to the preset drawing time. If the target interface of the application is drawn within the preset drawing time, the drawn target interface can be displayed normally; if the application is particularly time-consuming to start during the preset drawing time, the target interface If the drawing is not completed, if the preset drawing time is exceeded, the window management module will force the interface to display. Since the target interface is drawn, it is that the target interface of the application cannot be displayed normally, resulting in a black screen.
电子设备可根据窗口信息来调节用于绘制该目标界面的预设绘制时间。预设绘制时间一般可设置为5秒,例如,电子设备可根据窗口信息来调节预设绘制时间,可增加该预设绘制时间,将其调节为6秒、7秒、8秒或10秒等大于5秒且不影响用户体验度的时间。电子设备还可根据窗口信息维持预设绘制时间不变,保持在5秒等。The electronic device may adjust the preset drawing time for drawing the target interface according to the window information. The preset drawing time can generally be set to 5 seconds, for example, the electronic device can adjust the preset drawing time according to the window information, can increase the preset drawing time, and adjust it to 6 seconds, 7 seconds, 8 seconds, or 10 seconds, etc. Time greater than 5 seconds without affecting user experience. The electronic device can also maintain the preset drawing time unchanged at 5 seconds according to the window information.
步骤108,在调节后的预设绘制时间内绘制应用程序的目标界面,并打开目标界面。Step 108: Draw the target interface of the application within the adjusted preset drawing time, and open the target interface.
电子设备可以根据窗口信息调节用于绘制目标界面的预设绘制时间。例如,预设绘制时间为5秒,电子设备可适当增加该预设绘制时间,使其调节后的预设绘制时间为10秒,电子设备可根据调节后的预设绘制时间(10秒)来绘制应用程序的目标界面,并显示该目标界面。The electronic device can adjust the preset drawing time for drawing the target interface according to the window information. For example, the preset drawing time is 5 seconds, and the electronic device may appropriately increase the preset drawing time so that the adjusted preset drawing time is 10 seconds, and the electronic device may use the adjusted preset drawing time (10 seconds) to Draw the target interface of the application and display the target interface.
本实施例中,界面显示方法可接收应用程序的启动指令,启动指令用于启动并绘制应用程序待显示的目标界面;根据启动指令获取目标界面内待绘制的窗口信息;根据窗口信息调节用于绘制目标界面的预设绘制时间;在调节后的预设绘制时间内绘制应用程序的目标界面,并打开目标界面,通过调节预设绘制时间来降低闪黑屏的概率,提高目标界面的显示稳定性,提高用户体验度。In this embodiment, the interface display method may receive a start instruction of the application program, the start instruction is used to start and draw the target interface to be displayed by the application program; the window information to be drawn in the target interface is obtained according to the start instruction; Draw the preset drawing time of the target interface; draw the target interface of the application within the adjusted preset drawing time, and open the target interface, reduce the probability of flashing black screen by adjusting the preset drawing time, and improve the display stability of the target interface To improve user experience.
窗口信息可包括窗口数量、窗口位置、窗口类型等信息。根据窗口信息调节 用于绘制目标界面的预设绘制时间,具体可包括:根据窗口数量调节用于绘制目标界面的预设绘制时间的步骤。The window information may include information such as the number of windows, the position of the window, and the type of window. Adjusting the preset drawing time for drawing the target interface according to the window information may specifically include: adjusting the preset drawing time for drawing the target interface according to the number of windows.
在一实施例中,当窗口数量为一个时,增加预设绘制时间。也即,若目标界面中待显示的窗口数量为一个时,可以将预设绘制时间增加一倍,使其从5秒变为10秒。也即,通过增加该预设绘制时间,可以使应用程序能够有更多的时间来绘制该目标界面,使其能够正常显示该目标界面。In one embodiment, when the number of windows is one, the preset drawing time is increased. That is, if the number of windows to be displayed in the target interface is one, the preset drawing time can be doubled to change it from 5 seconds to 10 seconds. That is, by increasing the preset drawing time, the application program can have more time to draw the target interface, so that it can display the target interface normally.
需要说明的是,调节后的预设绘制时间大于系统默认的预设绘制时间,可使调节后的预设绘制时间在6-15秒的范围内,以不影响用户使用电子设备的正常时间和体验度。It should be noted that the adjusted preset drawing time is greater than the system's default preset drawing time, so that the adjusted preset drawing time is in the range of 6-15 seconds, so as not to affect the normal time and user's use of electronic devices Experience degree.
在一实施例中,当窗口数量为多个时,维持预设绘制时间。当有多个窗口时,电子设备可维持系统默认的预设绘制时间,若其中仅有一个窗口绘制在系统默认的预设绘制时间内绘制成功时,则对应显示该绘制成功的窗口,而未绘制成功的窗口不显示,或未绘制成功的窗口区域黑屏显示。In one embodiment, when there are multiple windows, the preset drawing time is maintained. When there are multiple windows, the electronic device can maintain the default preset drawing time of the system. If only one of the windows is drawn successfully within the default preset drawing time of the system, the corresponding successfully drawn window is displayed, but not The successfully drawn window is not displayed, or the unsuccessfully drawn window area is displayed in black.
如图2所示,在一个实施例中,当窗口数量为一个时,增加预设绘制时间。其中,在调节后的预设绘制时间内绘制应用程序的目标界面,并打开目标界面,包括步骤202-步骤206。其中,As shown in FIG. 2, in one embodiment, when the number of windows is one, the preset drawing time is increased. Wherein, drawing the target interface of the application program within the preset drawing time after adjustment and opening the target interface includes steps 202-206. among them,
步骤202,根据启动指令在调节后的预设绘制时间内绘制目标界面。In step 202, the target interface is drawn within the adjusted preset drawing time according to the startup instruction.
在一实施例中,电子设备可基于android系统中的窗口管理在调节后的预设绘制时间内来实现目标界面的绘制。其中,窗口管理涉及的模块比较多,除了WindowManagerService还包括SurfaceFlinger服务、Linux的共享内存及tmpfs文件系统、Binder通信、InputManagerService、动画、VSYNC同步技术等。其中,完成图像绘制的是应用程序端,而完成图层合成的是SurfaceFlinger服务。电子设备根据启动指令可使应用程序通过WindowManagerService的代理向其添加窗口,并向SurfaceFlinger服务申请一块Surface画布,该画布背后所对应的是一块内存,当该内存申请成功之后,应用程序端才有绘图的目标。其中,内存是应用程序与SurfaceFlinger间进程共享的。基于Linux的共享内存,即MAP+tmpfs文件系统,然后通过binder将这块内存相关的信息传递应用程序端,应用程序端往这块内存中根据调节后的预设绘制时间来绘制内容,绘制完毕,通知SF图层混排,之后,SF再将数据渲染到屏幕。In an embodiment, the electronic device may implement the drawing of the target interface within the adjusted preset drawing time based on the window management in the android system. Among them, there are many modules involved in window management. In addition to WindowManagerService, it also includes SurfaceFlinger service, Linux shared memory and tmpfs file system, Binder communication, InputManagerService, animation, VSYNC synchronization technology, etc. Among them, it is the application side to complete the image drawing, and the SurfaceFlinger service to complete the layer composition. The electronic device can enable the application to add a window to it through the proxy of WindowManagerService according to the startup instruction, and apply for a Surface canvas to the SurfaceFlinger service. The canvas corresponds to a piece of memory. When the memory application is successful, the application side only draws The goal. Among them, the memory is shared between the application and the process between SurfaceFlinger. Linux-based shared memory, that is, MAP + tmpfs file system, and then the information related to this memory is passed to the application terminal through binder, and the application terminal draws content into this memory according to the adjusted preset drawing time, and the drawing is completed , Notify the SF layer shuffle, after that, SF will render the data to the screen.
可选的,电子设备可以根据该启动指令来调用主线程(Main Thread),该主线 程可理解为负责对需要进行显示的应用程序的目标界面进行绘制的线程,其使用主循环(Main Looper)来负责目标界面绘制任务。主线程会不断地从消息队列中取出消息,调用其绑定的Handler在主线程执行目标界面绘制的任务。Optionally, the electronic device may call the main thread (Main) Thread according to the startup instruction. The main thread may be understood as a thread responsible for drawing the target interface of the application that needs to be displayed, which uses the main loop (Main Looper) To be responsible for the task of drawing the target interface. The main thread will continuously take messages from the message queue and call its bound Handler to perform the task of drawing the target interface on the main thread.
步骤204,获取目标界面的实际绘制时间,并利用监控线程监控实际绘制时间是否超过预设绘制时间。Step 204: Obtain the actual drawing time of the target interface, and use a monitoring thread to monitor whether the actual drawing time exceeds the preset drawing time.
在一实施例中,当目标界面开始绘制时,电子设备会触发回调接口与窗口管理模块(服务)交互。因此,电子设备可以创建监控线程,监控线程可绘制目标界面的实际绘制时间,在绘制的目标界面的过程中,监控线程可监控实际绘制时间是否超过预设绘制时间。In one embodiment, when the target interface starts to draw, the electronic device triggers the callback interface to interact with the window management module (service). Therefore, the electronic device can create a monitoring thread, and the monitoring thread can draw the actual drawing time of the target interface. During the process of drawing the target interface, the monitoring thread can monitor whether the actual drawing time exceeds the preset drawing time.
步骤206,当实际绘制时间未超过调节后的预设绘制时间时,在目标界面绘制完成时打开目标界面。Step 206: When the actual drawing time does not exceed the adjusted preset drawing time, open the target interface when the target interface drawing is completed.
在一实施例中,调节后的预设绘制时间可设置为t1,实际绘制时间可设置为t2。电子设备可以根据监控线程获取绘制目标界面的实际绘制时间t2,并将监控的实际绘制时间t2与调节后的预设绘制时间t1进行比较,若实际绘制时间t2未超过调节后的预设绘制时间t1时,在目标界面绘制完成时打开目标界面。例如,实际绘制时间t2为3秒,而调节后预设绘制时间t1为8秒,当应用程序B根据该启动指令在3秒内,很快启动并完成了目标界面的绘制,即可在第3秒末就可以实现目标界面的显示,而不需要等待到调节后的预设绘制时间(8秒)结束的那一刻才对绘制完成的目标界面进行显示,可以提高其显示效率。In an embodiment, the adjusted preset drawing time may be set to t1, and the actual drawing time may be set to t2. The electronic device can obtain the actual drawing time t2 of the drawing target interface according to the monitoring thread, and compare the monitored actual drawing time t2 with the adjusted preset drawing time t1, if the actual drawing time t2 does not exceed the adjusted preset drawing time At t1, the target interface is opened when the target interface is drawn. For example, the actual drawing time t2 is 3 seconds, and the preset drawing time t1 is 8 seconds after adjustment. When the application B starts the drawing of the target interface within 3 seconds according to the startup instruction, it can be completed in the first The target interface can be displayed at the end of 3 seconds without waiting for the adjusted preset drawing time (8 seconds) to be displayed before the drawn target interface is completed, which can improve the display efficiency.
需要说明的是,在本实施例中,调节后的预设绘制时间大于系统默认的预设绘制时间。It should be noted that, in this embodiment, the adjusted preset drawing time is greater than the system default preset drawing time.
在一实施例中,在目标界面绘制完成时打开目标界面,包括:在目标界面绘制完成时,基于预先创建的活动窗口堆栈打开目标界面的步骤。In an embodiment, opening the target interface when the target interface drawing is completed includes the step of opening the target interface based on the pre-created active window stack when the target interface drawing is completed.
具体的,电子设备可在预先创建的活动窗口堆栈中创建应用程序对应的任务栈;并在任务栈中启动应用程序对应的活动窗口;基于所启动的活动窗口绘制并显示应用程序对应的启动界面。随后,可在上述任务栈下启动新的活动窗口,基于新的活动窗口绘制并显示目标界面。Specifically, the electronic device can create a task stack corresponding to the application program in the pre-created active window stack; and start the active window corresponding to the application program in the task stack; draw and display the startup interface corresponding to the application program based on the launched active window . Subsequently, a new active window can be started under the above task stack, and the target interface is drawn and displayed based on the new active window.
具体的,活动窗口可理解为一个独立的直接面向用户提供交互和操作的界面,在不同的操作系统中可能采用不同的名词来命名该界面。以安卓(Android)操作系统为例进行下面的说明。在Android系统中,活动窗口被称为Activity。 Activity是一个负责与用户交互的组件,其提供一个屏幕(可以理解为屏幕界面,而非实体的显示屏幕),以供用户交互完成某项任务。在一个android应用程序中,一个Activity通常就是一个单独的屏幕,它上面可以显示一些控件也可以监听并处理用户的事件。Specifically, the active window can be understood as an independent interface that directly provides users with interaction and operation. Different operating systems may use different terms to name the interface. Take the Android operating system as an example for the following description. In the Android system, the active window is called Activity. Activity is a component responsible for interacting with the user. It provides a screen (which can be understood as a screen interface, rather than a physical display screen) for the user to complete a certain task interactively. In an Android application, an Activity is usually a separate screen, it can display some controls on it can also listen to and handle user events.
在一个实施例中,界面显示方法,还包括步骤208,当实际绘制时间超过调节后的预设绘制时间且目标界面未绘制完成时,使目标界面黑屏显示。In one embodiment, the interface display method further includes step 208, when the actual drawing time exceeds the adjusted preset drawing time and the target interface is not drawn, the target interface is displayed in black.
具体地,电子设备可以根据监控线程获取绘制目标界面的实际绘制时间t2,并将监控的实际绘制时间t2与调节后的预设绘制时间t1进行比较,若实际绘制时间t2超过调节后的预设绘制时间t1时,但是目标界面仍未未绘制完成时,则控制目标界面黑屏显示。例如,调节后预设绘制时间t1为8秒,当应用程序B根据该启动指令在8秒内,仍未完成了目标界面的绘制,即可在第8秒末就可以控制目标界面黑屏显示。该应用程序B在调节后的预设绘制时间内若仍未完成绘制,则说明该应用程序B的启动已经卡死,该应用程序的目标界面永远都不会绘制成功,通过控制目标界面的黑屏显示,可以告知用户电子设备可以启动了该应用程序,该应用程序对用户的启动操作是有所反馈的,只是未启动成功而已,进而可以避免用户一直发起启动该应用程序的操作。Specifically, the electronic device may obtain the actual drawing time t2 of the drawing target interface according to the monitoring thread, and compare the monitored actual drawing time t2 with the adjusted preset drawing time t1, if the actual drawing time t2 exceeds the adjusted preset When the drawing time is t1, but the target interface has not been drawn yet, the target interface is controlled to display a black screen. For example, after the adjustment, the preset drawing time t1 is 8 seconds. When the application B does not complete the drawing of the target interface within 8 seconds according to the startup instruction, the target interface can be controlled to display a black screen at the end of the 8th second. If the application B does not complete the drawing within the preset drawing time after adjustment, it means that the startup of the application B has been stuck, and the target interface of the application will never be drawn successfully. By controlling the black screen of the target interface The display can inform the user that the electronic device can start the application program, and the application program has feedback on the user's start-up operation, but the start-up operation is not successful, thereby preventing the user from always initiating the start-up operation of the application program.
需要说明的是,在本实施例中,调节后的预设绘制时间大于系统默认的预设绘制时间。It should be noted that, in this embodiment, the adjusted preset drawing time is greater than the system default preset drawing time.
在一个实施例中,界面显示方法,还包括步骤210,当实际绘制时间超过预设绘制时间且目标界面未绘制完成时,则显示应用程序异常的信息。In one embodiment, the interface display method further includes step 210, when the actual drawing time exceeds the preset drawing time and the target interface is not drawn, displaying information about the abnormality of the application.
具体地,电子设备可以根据监控线程获取绘制目标界面的实际绘制时间t2,并将监控的实际绘制时间t2与调节后的预设绘制时间t1进行比较,若实际绘制时间t2超过调节后的预设绘制时间t1时,但是目标界面仍未未绘制完成时,则控制目标界面黑屏显示。例如,调节后预设绘制时间t1为8秒,当应用程序B根据该启动指令在8秒内,仍未完成了目标界面的绘制,即可在第8秒末就可以控制目标界面黑屏显示。该应用程序B在调节后的预设绘制时间内若仍未完成绘制,则说明该应用程序B的启动已经卡死,该应用程序的目标界面永远都不会绘制成功,表明该应用程序B启动异常,则可弹出应用程序异常的提示,例如“APP检测到异常,请重启APP”等之类的提示文字或提示语音等。Specifically, the electronic device may obtain the actual drawing time t2 of the drawing target interface according to the monitoring thread, and compare the monitored actual drawing time t2 with the adjusted preset drawing time t1, if the actual drawing time t2 exceeds the adjusted preset When the drawing time is t1, but the target interface has not been drawn yet, the target interface is controlled to display a black screen. For example, after the adjustment, the preset drawing time t1 is 8 seconds. When the application B does not complete the drawing of the target interface within 8 seconds according to the startup instruction, the target interface can be controlled to display a black screen at the end of the 8th second. If the application B does not complete the drawing within the preset drawing time after adjustment, it means that the startup of the application B has been stuck, and the target interface of the application will never be drawn successfully, indicating that the application B starts If it is abnormal, you can pop up an application abnormal prompt, such as "APP detected an abnormality, please restart APP" and other prompt text or voice prompts.
可选的,在显示应用程序异常信息前,还可以强制关闭异常应用,例如关闭 该应用程序的所有进程等。Optionally, before displaying the application abnormal information, you can also force the abnormal application to close, for example, close all processes of the application.
需要说明的是,在本实施例中,调节后的预设绘制时间大于系统默认的预设绘制时间。It should be noted that, in this embodiment, the adjusted preset drawing time is greater than the system default preset drawing time.
在本实施例中,通过显示应用程序异常的信息,可告知用户不是电子设备出现了问题,而是应用程序的启动异常,从而消除了用户对电子设备厂商的不好印象。In this embodiment, by displaying the information about the abnormality of the application program, the user can be informed that it is not the electronic device that has the problem but the abnormal startup of the application program, thereby eliminating the bad impression of the user on the electronic device manufacturer.
在一个实施例中,窗口数量为多个,在调节后的预设绘制时间内绘制应用程序的目标界面,并打开目标界面,包括:In one embodiment, the number of windows is multiple, drawing the target interface of the application within the preset drawing time after adjustment, and opening the target interface, including:
步骤302,根据启动指令在调节后的预设绘制时间内绘制目标界面的多个窗口。Step 302: Drawing multiple windows of the target interface within the adjusted preset drawing time according to the startup instruction.
步骤302与步骤202的根据启动指令在调节后的预设绘制时间内绘制目标界面的方式相同,在此,不再赘述。The method of drawing the target interface in step 302 and step 202 in the adjusted preset drawing time according to the startup instruction is the same, which will not be repeated here.
步骤304,当至少一个窗口在调节后的预设绘制时间内完成时,打开目标界面。 Step 304, when at least one window is completed within the preset drawing time after adjustment, the target interface is opened.
在一实施例中,当目标界面的多个窗口开始绘制时,电子设备会触发回调接口与窗口管理模块(服务)交互。因此,电子设备可以创建监控线程,监控线程可绘制目标界面每个窗口的实际绘制时间,在绘制的目标界面的过程中,监控线程可监控在调节后的预设绘制时间内,是否有至少一个窗口绘制完成。In an embodiment, when multiple windows of the target interface start to draw, the electronic device triggers the callback interface to interact with the window management module (service). Therefore, the electronic device can create a monitoring thread that can draw the actual drawing time of each window of the target interface. During the process of drawing the target interface, the monitoring thread can monitor whether there is at least one within the adjusted preset drawing time The window drawing is complete.
若目标界面中需要绘制的窗口数为2个,分别用窗口A和窗口B表示,其中,当窗口A在调节后的预设绘制时间内绘制完成,而窗口B在调节后的预设绘制时间内未绘制完成,则电子设备可控制打开目标界面并使窗口A正常显示,而除了窗口A的其他区域黑色显示。If the number of windows to be drawn in the target interface is 2, they are represented by window A and window B, respectively, when window A is drawn within the adjusted preset drawing time, and window B is drawn after the adjusted preset drawing time If the drawing is not completed, the electronic device can control to open the target interface and make the window A displayed normally, and the other areas except the window A are displayed in black.
需要说明的是,在本实施中,调节后的预设绘制时间与系统默认的预设绘制时间相同。It should be noted that, in this implementation, the adjusted preset drawing time is the same as the system default preset drawing time.
进一步的,界面显示方法还包括:步骤306,当未有窗口在预设绘制时间内完成时,使目标界面黑屏显示。Further, the interface display method further includes: Step 306, when no window is completed within the preset drawing time, causing the target interface to display a black screen.
若目标界面中需要绘制的窗口数为2个,分别用窗口A和窗口B表示,其中,当窗口A和窗口B在调节后的预设绘制时间内均未绘制完成,则电子设备可控制目标界面黑屏显示。该目标界面在调节后的预设绘制时间内若仍未完成绘制,则说明该应用程序的启动已经卡死,该应用程序的目标界面永远都不会绘制 成功,通过控制目标界面的黑屏显示,可以告知用户电子设备可以启动了该应用程序,该应用程序对用户的启动操作是有所反馈的,只是未启动成功而已,进而可以避免用户一直发起启动该应用程序的操作。If the number of windows to be drawn in the target interface is 2, they are respectively represented by window A and window B. Among them, when window A and window B are not drawn within the adjusted preset drawing time, the electronic device can control the target The interface is blank. If the target interface does not finish drawing within the preset drawing time after adjustment, it means that the start of the application has been stuck, and the target interface of the application will never be drawn successfully. By controlling the black screen display of the target interface, The user can be informed that the electronic device can start the application program, and the application program has feedback on the user's start-up operation, but the start-up operation is not successful, thereby preventing the user from always initiating the start-up operation of the application program.
需要说明的是,在本实施中,调节后的预设绘制时间与系统默认的预设绘制时间相同。It should be noted that, in this implementation, the adjusted preset drawing time is the same as the system default preset drawing time.
可选的,未有窗口在预设绘制时间内完成时,则显示应用程序异常的信息。例如,该应用程序未有窗口在调节后的预设绘制时间内若仍未完成绘制,则说明该应用程序的启动已经卡死,该应用程序的目标界面永远都不会绘制成功,表明该应用程序启动异常,则可弹出应用程序异常的提示,例如“APP检测到异常,请重启APP”等之类的提示文字或提示语音等。通过显示应用程序异常的信息,可告知用户不是电子设备出现了问题,而是应用程序的启动异常,从而消除了用户对电子设备厂商的不好印象。Optionally, when no window is completed within the preset drawing time, the information of the abnormal application is displayed. For example, if there is no window in the application and the drawing is not completed within the preset drawing time after adjustment, the start of the application has been stuck, and the target interface of the application will never be drawn successfully, indicating that the application If the program starts abnormally, a prompt of abnormal application program may pop up, such as the prompt text or prompt voice such as "APP detected an abnormality, please restart APP". By displaying the information about the abnormality of the application program, the user can be informed that it is not the electronic device that has the problem but the abnormal startup of the application program, thereby eliminating the bad impression of the user on the electronic device manufacturer.
需要说明的是,在本实施中,调节后的预设绘制时间与系统默认的预设绘制时间相同。It should be noted that, in this implementation, the adjusted preset drawing time is the same as the system default preset drawing time.
在一实施例中,界面显示方法,包括步骤402-步骤416。其中,In an embodiment, the interface display method includes steps 402-416. among them,
步骤402,接收应用程序的启动指令,启动指令用于启动并绘制应用程序待显示的目标界面;Step 402: Receive a start instruction of the application program, the start instruction is used to start and draw a target interface to be displayed by the application program;
步骤404,根据启动指令获取目标界面内待绘制的窗口信息,窗口信息包括窗口数量;Step 404: Acquire window information to be drawn in the target interface according to the startup instruction, and the window information includes the number of windows;
步骤405,当窗口数量为一个时,增加预设绘制时间。Step 405: When the number of windows is one, increase the preset drawing time.
步骤407,根据启动指令在调节后的预设绘制时间内绘制目标界面。In step 407, the target interface is drawn within the adjusted preset drawing time according to the startup instruction.
步骤409,获取目标界面的实际绘制时间,并利用监控线程监控实际绘制时间是否超过预设绘制时间。Step 409: Obtain the actual drawing time of the target interface, and use the monitoring thread to monitor whether the actual drawing time exceeds the preset drawing time.
步骤411,当实际绘制时间未超过预设绘制时间时,在目标界面绘制完成时打开目标界面。Step 411: When the actual drawing time does not exceed the preset drawing time, open the target interface when the target interface drawing is completed.
步骤413,当实际绘制时间超过预设绘制时间且目标界面未绘制完成时,使目标界面黑屏显示。Step 413: When the actual drawing time exceeds the preset drawing time and the target interface is not drawn, the target interface is displayed in black.
步骤406,当窗口数量为多个时,维持预设绘制时间; Step 406, when the number of windows is multiple, maintain the preset drawing time;
步骤408,根据启动指令调用主线程在预设绘制时间内绘制目标界面的多个窗口;Step 408: Call the main thread to draw multiple windows of the target interface within a preset drawing time according to the startup instruction;
步骤410,当至少一个窗口在预设绘制时间内完成时,打开目标界面。 Step 410, when at least one window is completed within a preset drawing time, a target interface is opened.
步骤412,当未有窗口在预设绘制时间内完成时,使目标界面黑屏显示。 Step 412, when no window is completed within the preset drawing time, the target interface is displayed in black.
本实施例中,界面显示方法可接收应用程序的启动指令,根据启动指令获取目标界面内待绘制的窗口信息;其中,窗口信息包括窗口数量,进而根据窗口数量来调节用于绘制目标界面的预设绘制时间。通过调节预设绘制时间来降低闪黑屏的概率,提高目标界面的显示稳定性,提高用户体验度。In this embodiment, the interface display method may receive the startup instruction of the application program, and obtain the window information to be drawn in the target interface according to the startup instruction; wherein, the window information includes the number of windows, and then adjusts the pre-drawing used to draw the target interface according to the number of windows Set the drawing time. By adjusting the preset drawing time, the probability of flashing black screen is reduced, the display stability of the target interface is improved, and the user experience is improved.
其中,当窗口数量为一个时,增加预设绘制时间,并根据启动指令在调节后的预设绘制时间内绘制目标界面,获取目标界面的实际绘制时间,并利用监控线程监控实际绘制时间是否超过预设绘制时间。当实际绘制时间未超过预设绘制时间时,在目标界面绘制完成时打开目标界面,电子设备可以很快启动并完成了目标界面的绘制,并在绘制完成时立即显示目标界面,而不需要等待到调节后的预设绘制时间结束的那一刻才对绘制完成的目标界面进行显示,可以提高其显示效率。当实际绘制时间超过预设绘制时间且目标界面未绘制完成时,使目标界面黑屏显示,可以告知用户电子设备可以启动了该应用程序,该应用程序对用户的启动操作是有所反馈的,只是未启动成功而已,进而可以避免用户一直发起启动该应用程序的操作。When the number of windows is one, increase the preset drawing time, and draw the target interface within the adjusted preset drawing time according to the startup instruction, obtain the actual drawing time of the target interface, and use the monitoring thread to monitor whether the actual drawing time exceeds Preset drawing time. When the actual drawing time does not exceed the preset drawing time, the target interface is opened when the target interface drawing is completed, the electronic device can quickly start and complete the drawing of the target interface, and immediately display the target interface when the drawing is completed without waiting Displaying the target interface where the drawing is completed until the adjusted preset drawing time ends can improve its display efficiency. When the actual drawing time exceeds the preset drawing time and the target interface is not drawn, the target interface is displayed in black, which can inform the user that the electronic device can start the application. The application has feedback on the user's startup operation, but It has not been started successfully, which can prevent the user from always initiating the operation of starting the application.
另外,当窗口数量为多个时,维持预设绘制时间,根据启动指令在预设绘制时间内绘制目标界面的多个窗口;当至少一个窗口在预设绘制时间内完成时,打开目标界面并显示绘制完成的窗口。当未有窗口在预设绘制时间内完成时,使目标界面黑屏显示,可以告知用户电子设备可以启动了该应用程序,该应用程序对用户的启动操作是有所反馈的,只是未启动成功而已,进而可以避免用户一直发起启动该应用程序的操作。In addition, when the number of windows is multiple, maintain the preset drawing time, and draw multiple windows of the target interface within the preset drawing time according to the startup instruction; when at least one window is completed within the preset drawing time, open the target interface and The window where the drawing is completed is displayed. When no window is completed within the preset drawing time, the target interface is displayed on a black screen, which can inform the user that the electronic device can start the application. The application has feedback on the user's startup operation, but it is not successful. , Which can prevent the user from always initiating the operation of starting the application.
应该理解的是,虽然图1-4的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图1-4中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the steps in the flowcharts of FIGS. 1-4 are displayed in order according to the arrows, the steps are not necessarily executed in the order indicated by the arrows. Unless clearly stated in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least some of the steps in FIGS. 1-4 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times. These sub-steps or stages The execution order of is not necessarily sequential, but may be executed in turn or alternately with at least a part of other steps or sub-steps or stages of other steps.
本申请实施例还提供一种界面显示装置,图5为一个实施例中界面显示装置 的结构示意图。界面显示装置包括指令接收模块510、窗口获取模块520、时间调节模块530和界面绘制模块540。其中,An embodiment of the present application also provides an interface display device. FIG. 5 is a schematic structural diagram of an interface display device in an embodiment. The interface display device includes an instruction receiving module 510, a window obtaining module 520, a time adjustment module 530, and an interface drawing module 540. among them,
指令接收模块510,用于接收应用程序的启动指令,启动指令用于启动并绘制应用程序待显示的目标界面;The instruction receiving module 510 is used to receive the start instruction of the application program, and the start instruction is used to start and draw the target interface to be displayed by the application program;
窗口获取模块520,用于根据启动指令获取目标界面内待绘制的窗口信息;The window obtaining module 520 is used to obtain the window information to be drawn in the target interface according to the startup instruction;
时间调节模块530,用于根据窗口信息调节用于绘制目标界面的预设绘制时间;及The time adjustment module 530 is used to adjust the preset drawing time for drawing the target interface according to the window information; and
界面绘制模块540,用于在调节后的预设绘制时间内绘制应用程序的目标界面,并打开目标界面。The interface drawing module 540 is used for drawing the target interface of the application program within the preset drawing time after adjustment and opening the target interface.
上述界面显示装置,可接收应用程序的启动指令,启动指令用于启动并绘制应用程序待显示的目标界面;根据启动指令获取目标界面内待绘制的窗口信息;根据窗口信息调节用于绘制目标界面的预设绘制时间;在调节后的预设绘制时间内绘制应用程序的目标界面,并打开目标界面,通过调节预设绘制时间来降低闪黑屏的概率,提高目标界面的显示稳定性,提高用户体验度。The above interface display device can receive the start instruction of the application program, and the start instruction is used to start and draw the target interface to be displayed by the application program; obtain the window information to be drawn in the target interface according to the start instruction; adjust to draw the target interface according to the window information Preset drawing time; draw the target interface of the application within the adjusted preset drawing time, and open the target interface, reduce the probability of flashing black screen by adjusting the preset drawing time, improve the display stability of the target interface, and improve the user Experience degree.
在一实施例中,窗口信息包括窗口数量;时间调节模块530还用于根据窗口数量调节用于绘制目标界面的预设绘制时间。In an embodiment, the window information includes the number of windows; the time adjustment module 530 is further configured to adjust the preset drawing time for drawing the target interface according to the number of windows.
在一实施例中,当窗口数量为一个时,增加预设绘制时间。In one embodiment, when the number of windows is one, the preset drawing time is increased.
在一实施例中,当窗口数量为多个时,维持预设绘制时间。In one embodiment, when there are multiple windows, the preset drawing time is maintained.
在一实施例中,当窗口数量为一个时,界面绘制模块540,包括:In an embodiment, when the number of windows is one, the interface drawing module 540 includes:
绘制单元,用于根据启动指令在预设绘制时间内绘制目标界面;The drawing unit is used to draw the target interface within a preset drawing time according to the startup instruction;
监控单元,用于获取目标界面的实际绘制时间,并利用监控线程监控实际绘制时间是否超过调节后的预设绘制时间;The monitoring unit is used to obtain the actual drawing time of the target interface, and use the monitoring thread to monitor whether the actual drawing time exceeds the adjusted preset drawing time;
界面单元,用于当实际绘制时间未超过调节后的预设绘制时间时,在目标界面绘制完成时打开目标界面。The interface unit is used to open the target interface when the target interface drawing is completed when the actual drawing time does not exceed the adjusted preset drawing time.
本实施例中,电子设备可以根据监控线程获取绘制目标界面的实际绘制时间t2,并将监控的实际绘制时间t2与调节后的预设绘制时间t1进行比较,若实际绘制时间t2未超过调节后的预设绘制时间t1时,在目标界面绘制完成时打开目标界面。例如,实际绘制时间t2为3秒,而调节后预设绘制时间t1为8秒,当应用程序B根据该启动指令在3秒内,很快启动并完成了目标界面的绘制,即可在第3秒末就可以实现目标界面的显示,而不需要等待到调节后的预设绘制时间 (8秒)结束的那一刻才对绘制完成的目标界面进行显示,可以提高其显示效率。In this embodiment, the electronic device can obtain the actual drawing time t2 of the drawing target interface according to the monitoring thread, and compare the monitored actual drawing time t2 with the adjusted preset drawing time t1, if the actual drawing time t2 does not exceed the adjusted At the preset drawing time t1, the target interface is opened when the target interface drawing is completed. For example, the actual drawing time t2 is 3 seconds, and the preset drawing time t1 is 8 seconds after adjustment. When the application B starts the drawing of the target interface within 3 seconds according to the startup instruction, it can be completed in the first The target interface can be displayed at the end of 3 seconds without waiting for the adjusted preset drawing time (8 seconds) to be displayed before the drawn target interface is completed, which can improve the display efficiency.
在一实施例中,界面单元,还用于当实际绘制时间超过调节后的预设绘制时间且目标界面未绘制完成时,使目标界面黑屏显示。In an embodiment, the interface unit is further used to make the target interface display black when the actual drawing time exceeds the adjusted preset drawing time and the target interface is not drawn.
本实施例中,若应用程序B在调节后的预设绘制时间内若仍未完成绘制,则说明该应用程序B的启动已经卡死,该应用程序的目标界面永远都不会绘制成功,通过控制目标界面的黑屏显示,可以告知用户电子设备可以启动了该应用程序,该应用程序对用户的启动操作是有所反馈的,只是未启动成功而已,进而可以避免用户一直发起启动该应用程序的操作。In this embodiment, if the application B does not complete the drawing within the adjusted preset drawing time, it means that the startup of the application B has been stuck, and the target interface of the application will never be drawn successfully. The black screen display of the control target interface can inform the user that the electronic device can start the application. The application has feedback on the user's start-up operation, but it is not successful, which can prevent the user from always launching the application. operating.
在一实施例中,界面单元,还用于当实际绘制时间超过调节后的预设绘制时间且目标界面未绘制完成时,则显示应用程序的异常信息。In an embodiment, the interface unit is further used to display abnormal information of the application program when the actual drawing time exceeds the adjusted preset drawing time and the target interface is not drawn.
在本实施例中,通过显示应用程序异常的信息,可告知用户不是电子设备出现了问题,而是应用程序的启动异常,从而消除了用户对电子设备厂商的不好印象。In this embodiment, by displaying the information about the abnormality of the application program, the user can be informed that it is not the electronic device that has the problem but the abnormal startup of the application program, thereby eliminating the bad impression of the user on the electronic device manufacturer.
在一实施例中,监控单元还用于根据启动指令在调节后的预设绘制时间内绘制目标界面的多个窗口。In an embodiment, the monitoring unit is further configured to draw multiple windows of the target interface within the adjusted preset drawing time according to the startup instruction.
在一实施例中,界面单元,还用于在目标界面绘制完成时,基于预先创建的活动窗口堆栈打开目标界面。In an embodiment, the interface unit is also used to open the target interface based on the pre-created active window stack when the target interface is drawn.
在一实施例中,界面单元,还用于当至少一个窗口在调节后的预设绘制时间内完成时,打开目标界面。In an embodiment, the interface unit is further configured to open the target interface when at least one window is completed within the adjusted preset drawing time.
在一实施例中,界面单元还用于当未有窗口在调节后的预设绘制时间内完成时,使目标界面黑屏显示。In an embodiment, the interface unit is also used to make the target interface display black when no window is completed within the adjusted preset drawing time.
本实施例中,当未有窗口在预设绘制时间内完成时,使目标界面黑屏显示,可以告知用户电子设备可以启动了该应用程序,该应用程序对用户的启动操作是有所反馈的,只是未启动成功而已,进而可以避免用户一直发起启动该应用程序的操作。In this embodiment, when no window is completed within the preset drawing time, the target interface is displayed in a black screen, which can inform the user that the electronic device can start the application, and the application has feedback on the user's startup operation. It is just that it has not been started successfully, which can prevent the user from always initiating the operation of starting the application.
上述界面显示装置中各个模块的划分仅用于举例说明,在其他实施例中,可将界面显示装置按照需要划分为不同的模块,以完成上述界面显示装置的全部或部分功能。The division of each module in the above interface display device is for illustration only. In other embodiments, the interface display device may be divided into different modules as needed to complete all or part of the functions of the above interface display device.
上述界面显示装置中的各个模块可全部或部分通过软件、硬件及其组合来实 现。上述各模块可以硬件形式内嵌于或独立于电子设备中的处理器中,也可以以软件形式存储于电子设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。Each module in the above-mentioned interface display device may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in the hardware or independent of the processor in the electronic device, or may be stored in the memory in the electronic device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
本申请实施例还提供了一种计算机可读存储介质。一个或多个包含计算机可执行指令的非易失性计算机可读存储介质,当计算机可执行指令被一个或多个处理器执行时,使得处理器执行以下界面显示方法的步骤:The embodiments of the present application also provide a computer-readable storage medium. One or more non-volatile computer-readable storage media containing computer-executable instructions, when the computer-executable instructions are executed by one or more processors, cause the processor to perform the following steps of the interface display method:
接收应用程序的启动指令,启动指令用于启动并绘制应用程序待显示的目标界面;Receive the start instruction of the application, the start instruction is used to start and draw the target interface to be displayed by the application;
根据启动指令获取目标界面内待绘制的窗口信息;Obtain the window information to be drawn in the target interface according to the startup instruction;
根据窗口信息调节用于绘制目标界面的预设绘制时间;Adjust the preset drawing time for drawing the target interface according to the window information;
在调节后的预设绘制时间内绘制应用程序的目标界面,并打开目标界面。Draw the target interface of the application within the preset drawing time after adjustment, and open the target interface.
需要说明的是,一个或多个包含计算机可执行指令的非易失性计算机可读存储介质,当计算机可执行指令被一个或多个处理器执行时,还可以使得处理器执行上述任一实施例中的界面显示方法。It should be noted that one or more non-volatile computer-readable storage media containing computer-executable instructions, when the computer-executable instructions are executed by one or more processors, may also cause the processor to perform any of the foregoing implementations The interface display method in the example.
一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行界面显示方法的步骤:A computer program product containing instructions that, when run on a computer, causes the computer to perform the steps of the interface display method:
接收应用程序的启动指令,启动指令用于启动并绘制应用程序待显示的目标界面;Receive the start instruction of the application, the start instruction is used to start and draw the target interface to be displayed by the application;
根据启动指令获取目标界面内待绘制的窗口信息;Obtain the window information to be drawn in the target interface according to the startup instruction;
根据窗口信息调节用于绘制目标界面的预设绘制时间;Adjust the preset drawing time for drawing the target interface according to the window information;
在调节后的预设绘制时间内绘制应用程序的目标界面,并打开目标界面。Draw the target interface of the application within the preset drawing time after adjustment, and open the target interface.
需要说明的是,一种包含指令的计算机程序产品,当其在计算机上运行时使得计算机执行上述任一实施例中的界面显示方法。It should be noted that a computer program product containing instructions, when run on a computer, causes the computer to execute the interface display method in any of the above embodiments.
本申请实施例还提供了一种电子设备。如图6所示,为了便于说明,仅示出了与本申请实施例相关的部分,具体技术细节未揭示的,请参照本申请实施例方法部分。该电子设备可以为包括手机、平板电脑、PDA(Personal Digital Assistant,个人数字助理)、POS(Point of Sales,销售终端)、车载电脑、穿戴式设备等具有语音通话功能并具有扬声器的任意终端设备,以电子设备为手机为例:An embodiment of the present application also provides an electronic device. As shown in FIG. 6, for ease of description, only parts related to the embodiments of the present application are shown, and specific technical details are not disclosed, please refer to the method part of the embodiments of the present application. The electronic device may be any terminal device including a mobile phone, tablet computer, PDA (Personal Digital Assistant), POS (Point of Sales), in-vehicle computer, wearable device, etc. that has a voice call function and has a speaker , Taking an electronic device as a mobile phone as an example:
图6为与本申请实施例提供的电子设备相关的手机的部分结构的框图。参考 图6,手机包括:射频(Radio Frequency,RF)电路610、存储器620、输入单元630、显示单元640、传感器650、音频电路660、无线保真(wireless fidelity,WiFi)模块670、处理器680、以及电源690等部件。本领域技术人员可以理解,图6所示的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。6 is a block diagram of a partial structure of a mobile phone related to an electronic device provided by an embodiment of the present application. 6, the mobile phone includes: a radio frequency (Radio Frequency) circuit 610, a memory 620, an input unit 630, a display unit 640, a sensor 650, an audio circuit 660, a wireless fidelity (WiFi) module 670, a processor 680 , And power supply 690 and other components. Those skilled in the art may understand that the structure of the mobile phone shown in FIG. 6 does not constitute a limitation on the mobile phone, and may include more or fewer components than those shown in the figure, or a combination of certain components, or a different component arrangement.
其中,RF电路610可用于收发信息或通话过程中,信号的接收和发送,可将基站的下行信息接收后,给处理器680处理;也可以将上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路610还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(Global System of Mobile communication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE))、电子邮件、短消息服务(Short Messaging Service,SMS)等。Among them, the RF circuit 610 can be used to receive and send signals during sending and receiving information or during a call. It can receive the downlink information of the base station and process it to the processor 680; it can also send the uplink data to the base station. Generally, RF circuits include but are not limited to antennas, at least one amplifier, transceiver, coupler, low noise amplifier (Low Noise Amplifier, LNA), duplexer, and so on. In addition, the RF circuit 610 can also communicate with other devices through a wireless communication network. The above wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile (GSM), General Packet Radio Service (GPRS), and Code Division Multiple Access (Code Division) Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), e-mail, Short Message Service (SMS), etc.
存储器620可用于存储软件程序以及模块,处理器680通过运行存储在存储器620的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器620可主要包括程序存储区和数据存储区,其中,程序存储区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能的应用程序、图像播放功能的应用程序等)等;数据存储区可存储根据手机的使用所创建的数据(比如音频数据、通讯录等)等。此外,存储器620可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 620 may be used to store software programs and modules. The processor 680 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 620. The memory 620 may mainly include a program storage area and a data storage area, where the program storage area may store an operating system and at least one function-required application program (such as a sound playback function application program, an image playback function application program, etc.), etc .; The data storage area can store data (such as audio data, address book, etc.) created according to the use of the mobile phone. In addition, the memory 620 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
输入单元630可用于接收输入的数字或字符信息,以及产生与手机600的用户设置以及功能控制有关的键信号输入。具体地,输入单元630可包括触控面板631以及其他输入设备632。触控面板631,也可称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板631上或在触控面板631附近的操作),并根据预先设定的程式驱动相应的连接装置。在一个实施例中,触控面板631可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号, 将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器680,并能接收处理器680发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板631。除了触控面板631,输入单元630还可以包括其他输入设备632。具体地,其他输入设备632可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)等中的一种或多种。The input unit 630 may be used to receive input numeric or character information, and generate key signal input related to user settings and function control of the mobile phone 600. Specifically, the input unit 630 may include a touch panel 631 and other input devices 632. The touch panel 631, also known as a touch screen, can collect user's touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc. on or near the touch panel 631 Operation), and drive the corresponding connection device according to the preset program. In one embodiment, the touch panel 631 may include a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation and detects the signal brought by the touch operation, and transmits the signal to the touch controller; To the processor 680, and can receive the command sent by the processor 680 and execute it. In addition, the touch panel 631 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 631, the input unit 630 may also include other input devices 632. Specifically, the other input devices 632 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.).
显示单元640可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元640可包括显示面板641。在一个实施例中,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板641。在一个实施例中,触控面板631可覆盖显示面板641,当触控面板631检测到在其上或附近的触摸操作后,传送给处理器680以确定触摸事件的类型,随后处理器680根据触摸事件的类型在显示面板641上提供相应的视觉输出。虽然在图6中,触控面板631与显示面板641是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将触控面板631与显示面板641集成而实现手机的输入和输出功能。The display unit 640 may be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 640 may include a display panel 641. In one embodiment, the display panel 641 may be configured in the form of a liquid crystal display (Liquid Crystal) (LCD), an organic light-emitting diode (Organic Light-Emitting Diode, OLED), or the like. In one embodiment, the touch panel 631 may cover the display panel 641, and when the touch panel 631 detects a touch operation on or near it, it is transmitted to the processor 680 to determine the type of touch event, and then the processor 680 according to The type of touch event provides corresponding visual output on the display panel 641. Although in FIG. 6, the touch panel 631 and the display panel 641 are implemented as two independent components to realize the input and input functions of the mobile phone, in some embodiments, the touch panel 631 and the display panel 641 may be integrated Realize the input and output functions of the mobile phone.
手机600还可包括至少一种传感器650,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板641的亮度,接近传感器可在手机移动到耳边时,关闭显示面板641和/或背光。运动传感器可包括加速度传感器,通过加速度传感器可检测各个方向上加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换)、振动识别相关功能(比如计步器、敲击)等;此外,手机还可配置陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器等。The mobile phone 600 may further include at least one sensor 650, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 641 according to the brightness of the ambient light, and the proximity sensor may close the display panel 641 and / or when the mobile phone moves to the ear Or backlight. The motion sensor may include an acceleration sensor, which can detect the magnitude of acceleration in various directions through the acceleration sensor, and can detect the magnitude and direction of gravity when at rest, and can be used for applications that recognize mobile phone gestures (such as horizontal and vertical screen switching), and vibration recognition-related functions (such as Pedometer, percussion), etc. In addition, the mobile phone can also be equipped with other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor and so on.
音频电路660、扬声器661和传声器662可提供用户与手机之间的音频接口。音频电路660可将接收到的音频数据转换后的电信号,传输到扬声器661,由扬声器661转换为声音信号输出;另一方面,传声器662将收集的声音信号转换为电信号,由音频电路660接收后转换为音频数据,再将音频数据输出处理器680处理后,经RF电路610可以发送给另一手机,或者将音频数据输出至存储器620以便后续处理。The audio circuit 660, the speaker 661, and the microphone 662 may provide an audio interface between the user and the mobile phone. The audio circuit 660 can transmit the converted electrical signal of the received audio data to the speaker 661, which converts the speaker 661 into a sound signal output; on the other hand, the microphone 662 converts the collected sound signal into an electrical signal, which is converted by the audio circuit 660 After receiving, it is converted into audio data, and then processed by the audio data output processor 680, and then sent to another mobile phone through the RF circuit 610, or the audio data is output to the memory 620 for subsequent processing.
WiFi属于短距离无线传输技术,手机通过WiFi模块670可以帮助用户收发 电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图6示出了WiFi模块670,但是可以理解的是,其并不属于手机600的必须构成,可以根据需要而省略。WiFi is a short-range wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 670. It provides users with wireless broadband Internet access. Although FIG. 6 shows the WiFi module 670, it can be understood that it is not a necessary component of the mobile phone 600, and may be omitted as needed.
处理器680是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器620内的软件程序和/或模块,以及调用存储在存储器620内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。在一个实施例中,处理器680可包括一个或多个处理单元。在一个实施例中,处理器680可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等;调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器680中。The processor 680 is the control center of the mobile phone, and uses various interfaces and lines to connect the various parts of the entire mobile phone. Various functions and processing data of the mobile phone, so as to monitor the mobile phone as a whole. In one embodiment, the processor 680 may include one or more processing units. In one embodiment, the processor 680 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, application programs, and the like; the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 680.
手机600还包括给各个部件供电的电源690(比如电池),优选的,电源可以通过电源管理系统与处理器680逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The mobile phone 600 further includes a power supply 690 (such as a battery) that supplies power to various components. Preferably, the power supply can be logically connected to the processor 680 through a power management system, so as to realize functions such as charging, discharging, and power management through the power management system.
在一个实施例中,手机600还可以包括摄像头、蓝牙模块等。In one embodiment, the mobile phone 600 may further include a camera, a Bluetooth module, and the like.
在本申请实施例中,该电子设备所包括的处理器680执行存储在存储器上的计算机程序时实现以下步骤:In the embodiment of the present application, the processor 680 included in the electronic device implements the following steps when executing the computer program stored on the memory:
接收应用程序的启动指令,启动指令用于启动并绘制应用程序待显示的目标界面;Receive the start instruction of the application, the start instruction is used to start and draw the target interface to be displayed by the application;
根据启动指令获取目标界面内待绘制的窗口信息;Obtain the window information to be drawn in the target interface according to the startup instruction;
根据窗口信息调节用于绘制目标界面的预设绘制时间;Adjust the preset drawing time for drawing the target interface according to the window information;
在调节后的预设绘制时间内绘制应用程序的目标界面,并打开目标界面。Draw the target interface of the application within the preset drawing time after adjustment, and open the target interface.
需要说明的是,电子设备所包括的处理器680执行存储在存储器上的计算机程序时实现上述任一实施例中的界面显示方法。It should be noted that, when the processor 680 included in the electronic device executes the computer program stored in the memory, the interface display method in any of the foregoing embodiments is implemented.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,的程序可存储于一非易失性计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等。A person of ordinary skill in the art can understand that all or part of the process in the method of the above embodiments can be completed by instructing relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it may include the processes of the foregoing method embodiments. Among them, the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), etc.
以上实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并 不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above examples only express several implementations of the present application, and their descriptions are more specific and detailed, but they should not be construed as limiting the patent scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which all fall within the protection scope of the present application. Therefore, the protection scope of the patent of this application shall be subject to the appended claims.

Claims (17)

  1. 一种界面显示方法,包括:An interface display method, including:
    接收应用程序的启动指令,所述启动指令用于启动并绘制所述应用程序待显示的目标界面;Receiving a start instruction of an application program, the start instruction is used to start and draw a target interface to be displayed by the application program;
    根据所述启动指令获取所述目标界面内待绘制的窗口信息;Acquiring window information to be drawn in the target interface according to the startup instruction;
    根据所述窗口信息调节用于绘制所述目标界面的预设绘制时间;Adjusting the preset drawing time for drawing the target interface according to the window information;
    在调节后的所述预设绘制时间内绘制所述应用程序的所述目标界面,并打开所述目标界面。Draw the target interface of the application within the preset drawing time after adjustment, and open the target interface.
  2. 根据权利要求1所述的方法,其中,所述窗口信息包括窗口数量;所述根据所述窗口信息调节用于绘制所述目标界面的预设绘制时间,包括:The method according to claim 1, wherein the window information includes a number of windows; and adjusting the preset drawing time for drawing the target interface according to the window information includes:
    根据所述窗口数量调节用于绘制所述目标界面的预设绘制时间。The preset drawing time for drawing the target interface is adjusted according to the number of windows.
  3. 根据权利要求2所述的方法,其中,所述根据所述窗口数量调节用于绘制所述目标界面的预设绘制时间,包括:The method according to claim 2, wherein the adjusting the preset drawing time for drawing the target interface according to the number of windows includes:
    当所述窗口数量为一个时,增加所述预设绘制时间。When the number of windows is one, increase the preset drawing time.
  4. 根据权利要求2所述的方法,其中,所述根据所述窗口数量调节用于绘制所述目标界面的预设绘制时间,包括:The method according to claim 2, wherein the adjusting the preset drawing time for drawing the target interface according to the number of windows includes:
    当所述窗口数量为多个时,维持所述预设绘制时间。When the number of the windows is multiple, the preset drawing time is maintained.
  5. 根据权利要求3所述的方法,其中,所述在调节后的所述预设绘制时间内绘制所述应用程序的所述目标界面,并打开所述目标界面,包括:The method according to claim 3, wherein the drawing the target interface of the application within the preset drawing time after adjustment and opening the target interface includes:
    根据所述启动指令在调节后的所述预设绘制时间内绘制所述目标界面;Drawing the target interface within the preset drawing time after adjustment according to the startup instruction;
    获取所述目标界面的实际绘制时间,并利用监控线程监控所述实际绘制时间是否超过调节后的所述预设绘制时间;Acquiring the actual drawing time of the target interface, and using a monitoring thread to monitor whether the actual drawing time exceeds the adjusted preset drawing time;
    当所述实际绘制时间未超过调节后的所述预设绘制时间时,在所述目标界面绘制完成时打开所述目标界面。When the actual drawing time does not exceed the adjusted preset drawing time, the target interface is opened when the drawing of the target interface is completed.
  6. 根据权利要求5所述的方法,其中,所述在所述目标界面绘制完成时打开所述目标界面,包括:The method according to claim 5, wherein the opening of the target interface when the drawing of the target interface is completed includes:
    在所述目标界面绘制完成时,基于预先创建的活动窗口堆栈打开所述目标界面。When the target interface drawing is completed, the target interface is opened based on the pre-created active window stack.
  7. 根据权利要求5所述的方法,进一步包括:当所述实际绘制时间超过调节后的所述预设绘制时间且所述目标界面未绘制完成时,使所述目标界面 黑屏显示。The method according to claim 5, further comprising: when the actual drawing time exceeds the adjusted preset drawing time and the target interface is not drawn, causing the target interface to be displayed on a black screen.
  8. 根据权利要求5所述的界面显示方法,进一步包括:当所述实际绘制时间超过调节后的所述预设绘制时间且所述目标界面未绘制完成时,则显示所述应用程序的异常信息。The interface display method according to claim 5, further comprising: displaying the abnormal information of the application program when the actual drawing time exceeds the adjusted preset drawing time and the target interface is not drawn.
  9. 根据权利要求4所述的方法,其中,所述在调节后的所述预设绘制时间内绘制所述应用程序的所述目标界面,并打开所述目标界面,包括:The method according to claim 4, wherein the drawing the target interface of the application within the preset drawing time after adjustment and opening the target interface includes:
    根据所述启动指令在所述预设绘制时间内绘制所述目标界面的多个窗口;Drawing multiple windows of the target interface within the preset drawing time according to the startup instruction;
    当至少一个所述窗口在调节后的所述预设绘制时间内完成时,打开所述目标界面。When at least one of the windows is completed within the preset drawing time after adjustment, the target interface is opened.
  10. 根据权利要求9所述的方法,其中,进一步包括:The method of claim 9, further comprising:
    当未有所述窗口在调节后的所述预设绘制时间内完成时,使所述目标界面黑屏显示。When no window is completed within the preset drawing time after adjustment, the target interface is displayed in a black screen.
  11. 一种界面显示装置,包括:An interface display device, including:
    指令接收模块,用于接收应用程序的启动指令,所述启动指令用于启动并绘制所述应用程序待显示的目标界面;An instruction receiving module, configured to receive a start instruction of an application program, and the start instruction is used to start and draw a target interface to be displayed by the application program;
    窗口获取模块,用于根据所述启动指令获取所述目标界面内待绘制的窗口信息;A window obtaining module, configured to obtain window information to be drawn in the target interface according to the startup instruction;
    时间调节模块,用于根据所述窗口信息调节用于绘制所述目标界面的预设绘制时间;A time adjustment module for adjusting the preset drawing time for drawing the target interface according to the window information;
    界面绘制模块,用于在调节后的所述预设绘制时间内绘制所述应用程序的所述目标界面,并打开所述目标界面。The interface drawing module is configured to draw the target interface of the application program within the preset drawing time after adjustment and open the target interface.
  12. 根据权利要求11所述的装置,其中,所述窗口信息包括窗口数量;时间调节模块还用于根据所述窗口数量调节用于绘制所述目标界面的预设绘制时间。The apparatus according to claim 11, wherein the window information includes a number of windows; and the time adjustment module is further configured to adjust a preset drawing time for drawing the target interface according to the number of windows.
  13. 根据权利要求11所述的装置,其中,所述界面绘制模块,包括:The apparatus according to claim 11, wherein the interface drawing module includes:
    绘制单元,用于根据所述启动指令在所述预设绘制时间内绘制所述目标界面;A drawing unit, configured to draw the target interface within the preset drawing time according to the startup instruction;
    监控单元,用于获取所述目标界面的实际绘制时间,并利用监控线程监控所述实际绘制时间是否超过调节后的所述预设绘制时间;A monitoring unit, configured to obtain the actual drawing time of the target interface, and monitor whether the actual drawing time exceeds the adjusted preset drawing time by using a monitoring thread;
    界面单元,用于当所述实际绘制时间未超过调节后的所述预设绘制时间时,在所述目标界面绘制完成时打开所述目标界面。The interface unit is configured to open the target interface when the target interface drawing is completed when the actual drawing time does not exceed the adjusted preset drawing time.
  14. 根据权利要求13所述的装置,其中,所述界面单元,还用于当所述实际绘制时间超过调节后的所述预设绘制时间且所述目标界面未绘制完成时,使所述目标界面黑屏显示,或,当所述实际绘制时间超过调节后的所述预设绘制时间且所述目标界面未绘制完成时,则显示所述应用程序的异常信息。The apparatus according to claim 13, wherein the interface unit is further configured to enable the target interface when the actual drawing time exceeds the adjusted preset drawing time and the target interface is not drawn A black screen is displayed, or when the actual drawing time exceeds the adjusted preset drawing time and the target interface is not drawn, the abnormal information of the application program is displayed.
  15. 根据权利要求13所述的装置,其中,所述监控单元还用于根据所述启动指令在调节后的所述预设绘制时间内绘制所述目标界面的多个窗口;The apparatus according to claim 13, wherein the monitoring unit is further configured to draw a plurality of windows of the target interface within the adjusted preset drawing time according to the startup instruction;
    所述界面单元,还用于当至少一个所述窗口在调节后的所述预设绘制时间内完成时,打开所述目标界面,或,还用于当未有所述窗口在调节后的所述预设绘制时间内完成时,使所述目标界面黑屏显示。The interface unit is also used to open the target interface when at least one of the windows is completed within the preset drawing time after adjustment, or is also used to When the preset drawing time is completed, the target interface is displayed in a black screen.
  16. 一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如权利要求1至10中任一项所述的界面显示方法。A computer-readable storage medium on which a computer program is stored, which when executed by a processor implements the interface display method according to any one of claims 1 to 10.
  17. 一种电子设备,包括存储器,处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现如权利要求1至10中任一项所述的界面显示方法。An electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the program realizes the interface according to any one of claims 1 to 10 Display method.
PCT/CN2018/116292 2018-11-20 2018-11-20 Interface display method and apparatus, and computer storable medium and electronic device WO2020102956A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/116292 WO2020102956A1 (en) 2018-11-20 2018-11-20 Interface display method and apparatus, and computer storable medium and electronic device
CN201880098204.XA CN112789595A (en) 2018-11-20 2018-11-20 Interface display method and device, computer storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/116292 WO2020102956A1 (en) 2018-11-20 2018-11-20 Interface display method and apparatus, and computer storable medium and electronic device

Publications (1)

Publication Number Publication Date
WO2020102956A1 true WO2020102956A1 (en) 2020-05-28

Family

ID=70773715

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/116292 WO2020102956A1 (en) 2018-11-20 2018-11-20 Interface display method and apparatus, and computer storable medium and electronic device

Country Status (2)

Country Link
CN (1) CN112789595A (en)
WO (1) WO2020102956A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113610699A (en) * 2021-07-19 2021-11-05 广州致远电子有限公司 Hardware layer rendering scheduling method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104639725A (en) * 2013-11-08 2015-05-20 腾讯科技(深圳)有限公司 Interface switching method and device
CN104951386A (en) * 2014-03-28 2015-09-30 腾讯科技(深圳)有限公司 Method and device for displaying content loading progress
CN107748686A (en) * 2017-11-30 2018-03-02 广东欧珀移动通信有限公司 Starting guide method, apparatus, storage medium and the intelligent terminal of application program
CN107995977A (en) * 2017-09-07 2018-05-04 深圳市云中飞网络科技有限公司 Interface processing method, device, computer-readable storage medium and electronic equipment
CN108762881A (en) * 2018-06-21 2018-11-06 广州酷狗计算机科技有限公司 Interface method for drafting, device, terminal and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8418078B2 (en) * 2004-04-30 2013-04-09 Ebay Inc. Method and system to display a pop-up window when a user leaves a website
CN107589977B (en) * 2017-09-06 2021-01-08 Oppo广东移动通信有限公司 Resource allocation method, resource allocation device, mobile terminal and medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104639725A (en) * 2013-11-08 2015-05-20 腾讯科技(深圳)有限公司 Interface switching method and device
CN104951386A (en) * 2014-03-28 2015-09-30 腾讯科技(深圳)有限公司 Method and device for displaying content loading progress
CN107995977A (en) * 2017-09-07 2018-05-04 深圳市云中飞网络科技有限公司 Interface processing method, device, computer-readable storage medium and electronic equipment
CN107748686A (en) * 2017-11-30 2018-03-02 广东欧珀移动通信有限公司 Starting guide method, apparatus, storage medium and the intelligent terminal of application program
CN108762881A (en) * 2018-06-21 2018-11-06 广州酷狗计算机科技有限公司 Interface method for drafting, device, terminal and storage medium

Also Published As

Publication number Publication date
CN112789595A (en) 2021-05-11

Similar Documents

Publication Publication Date Title
US11137876B2 (en) Information display method, device and terminal for displaying progress on application icon
WO2021109926A1 (en) Application sharing method, electronic device and computer-readable storage medium
WO2019154181A1 (en) Display control method and mobile terminal
WO2016066092A1 (en) Multimedia playing controlling method and device, and storage medium
CN106371964B (en) Method and device for prompting message
US20160105418A1 (en) Method, system, device, and terminal for network initialization of multimedia playback device
CN110837327B (en) Message viewing method and terminal
WO2015078293A1 (en) Sound effect processing method and device, plug-in unit manager and sound effect plug-in unit
AU2010327452A1 (en) Mobile device and control method thereof
WO2018095130A1 (en) Method and system for determining duration of live streaming
CN110058836B (en) Audio signal output method and terminal equipment
JP7403648B2 (en) Synchronization method and electronic equipment
WO2015078145A1 (en) Method and apparatus for enlarging display font
CN110308834B (en) Setting method of application icon display mode and terminal
JP2018504708A (en) Method, device, and system for managing information recommendations
WO2019076250A1 (en) Push message management method and related products
KR101621637B1 (en) Method, apparatus device, client computer, server, mobile terminal, program and storage medium for processing mobile terminal resource
CN114565070A (en) Label binding method and device and mobile terminal
WO2014166307A1 (en) Method for determining performance of process of application and computer system
CN110825474B (en) Interface display method and device and electronic equipment
CN111314548A (en) Double-screen display method and device, storage medium and terminal
WO2020001190A1 (en) Application program interface display method and device, readable storage medium, and mobile terminal
WO2019096043A1 (en) Application icon management method and mobile terminal
CN108366106B (en) Communication information updating method, management method, modification method and related equipment
CN111694537B (en) Audio playing method, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18940754

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 29.09.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18940754

Country of ref document: EP

Kind code of ref document: A1