WO2019047125A1 - 界面处理方法、装置、计算机存储介质及电子设备 - Google Patents

界面处理方法、装置、计算机存储介质及电子设备 Download PDF

Info

Publication number
WO2019047125A1
WO2019047125A1 PCT/CN2017/100951 CN2017100951W WO2019047125A1 WO 2019047125 A1 WO2019047125 A1 WO 2019047125A1 CN 2017100951 W CN2017100951 W CN 2017100951W WO 2019047125 A1 WO2019047125 A1 WO 2019047125A1
Authority
WO
WIPO (PCT)
Prior art keywords
interface
loading
elements
drawn
loading data
Prior art date
Application number
PCT/CN2017/100951
Other languages
English (en)
French (fr)
Inventor
任超
Original Assignee
深圳市云中飞网络科技有限公司
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 深圳市云中飞网络科技有限公司 filed Critical 深圳市云中飞网络科技有限公司
Priority to PCT/CN2017/100951 priority Critical patent/WO2019047125A1/zh
Priority to CN201780001919.4A priority patent/CN107995977A/zh
Publication of WO2019047125A1 publication Critical patent/WO2019047125A1/zh

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/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Definitions

  • the invention relates to an interface processing method, device, computer storage medium and electronic device.
  • Embodiments of the present invention provide an interface processing method and apparatus, a computer storage medium, and an electronic device.
  • An embodiment of the present invention provides an interface processing method, where the method includes: receiving an interface loading request;
  • the drawing duration reaches a preset threshold
  • the drawing is aborted, and the display interface is loaded based on the elements that have been drawn.
  • the drawing according to the preset rule, the multiple elements included in the interface loading data, including:
  • the aborting drawing, loading the display interface based on the drawn elements includes:
  • the first part of the undrawn elements of the plurality of elements is aborted, and the first part of the element is loaded based on the second part of the drawing.
  • the method further includes: after the first interface loading display is completed, continuing to draw the first partial element.
  • the method further includes: after the drawing of the first partial element is completed, displaying the second interface based on loading the first partial element and the second partial element.
  • the method further includes: determining, during the first partial element drawing process, whether an interface jump request is received;
  • An embodiment of the present invention further provides an interface processing device, where the device includes: an acquiring unit, a drawing unit, and a loading unit;
  • the drawing unit is configured to draw an element included in the interface loading data obtained by the acquiring unit according to a preset rule and count a drawing duration; when the drawing duration reaches a preset threshold, the drawing is suspended;
  • the loading unit is configured to load a display interface based on the drawing unit having completed rendering elements.
  • the embodiment of the present invention further provides a computer storage medium, where the computer instructions are stored, and the instructions are executed by the processor to implement the steps of the interface processing method according to the embodiment of the present invention.
  • the embodiment of the present invention further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and operable on the processor, where the processor executes the program to implement the embodiment of the present invention.
  • the steps of the interface processing method including a memory, a processor, and a computer program stored on the memory and operable on the processor, where the processor executes the program to implement the embodiment of the present invention.
  • the interface processing method and device, the computer storage medium and the electronic device provided by the embodiments of the present invention.
  • the method includes: receiving an interface loading request; acquiring interface loading data; drawing an element included in the interface loading data according to a preset rule and counting a drawing duration; and when the drawing duration reaches a preset threshold, aborting drawing, based on Draw the completed element to load the display interface.
  • the drawing duration by controlling the drawing duration, when the drawing duration reaches the preset threshold, and the interface loading data is not completely drawn, the drawing is aborted, and the interface is loaded based on the part of the element that has been drawn, and the display is output.
  • the drawing duration By shortening the drawing duration, the interface loading time is greatly shortened, and the situation that a blank page is presented for a long time when the interface is requested is avoided, and the user experience is improved.
  • FIG. 1 is a schematic diagram of a first process of an interface processing method according to an embodiment of the present invention
  • FIG. 2 is a second schematic flowchart of an interface processing method according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of a third process of an interface processing method according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of an interface processing apparatus according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of hardware implementation of an electronic device according to an embodiment of the present invention.
  • FIG. 1 is a schematic diagram of a first process of an interface processing method according to an embodiment of the present invention; as shown in FIG. 1 , the method includes:
  • Step 101 Receive an interface loading request, and obtain interface loading data.
  • Step 102 Draw an element included in the interface loading data based on a preset rule and count the drawing duration.
  • Step 103 When the drawing duration reaches a preset threshold, the drawing is aborted, and the display interface is loaded based on the elements that have been drawn.
  • the interface processing method in the embodiment of the present invention can be applied to a terminal device, where the terminal is an electronic device that supports installation and operation of a client, such as a smart phone, a tablet computer, or a vehicle terminal device; and the client can adopt an application installed in the terminal.
  • a client such as a smart phone, a tablet computer, or a vehicle terminal device
  • the client can adopt an application installed in the terminal.
  • the client is, for example, a browser client, a social client, an instant application client, a multimedia play client, and the like.
  • the client refers to a client in the terminal for implementing network communication, that is, when the client runs, the communication component in the terminal communicates with the network server corresponding to the client, thereby obtaining display data.
  • the receiving interface loading request, and acquiring the interface loading data includes: receiving an interface loading request when detecting a running operation of the client, and sending an interface data request corresponding to the client according to the interface loading request to obtain interface data. Requesting the corresponding interface to load data; or, when the running client detects the interface jump instruction, receiving an interface loading request, and sending an interface data request corresponding to the interface jump instruction based on the interface loading request, based on the interface data Request to get interface loading data.
  • the operating system receives the interface loading.
  • the request sends an interface data request to the server to which the client belongs to request the first screen interface to load data.
  • the user when the client is in the running state, the user jumps from one interface to another based on the user's operation, for example, based on the input operation obtained by the terminal, when the operation corresponds to the link address in the interface, the generated Interface jump instruction, at this time, the operating system receives an interface loading request; the terminal sends the interface to the client
  • the genus server sends an interface data request corresponding to the link address, that is, requests interface loading data corresponding to the link address.
  • the elements included in the interface loading data are drawn according to a preset rule.
  • the obtained interface loading data may be represented by an application code, where the application code may include multiple types of data, such as data of a class type, and the elements in the page loading data may be a certain type of type.
  • the data may be data representing a view class type of a user interface (UI) element.
  • UI user interface
  • the attributes of the elements in the loading data may be drawn according to the interface represented by the application code.
  • timing is performed when the interface loading data starts to be drawn, and the drawing duration is counted; when the drawing duration reaches the preset threshold, the drawing is paused (aborted), and the loading and displaying of the interface is directly performed based on the drawn completed element, thereby greatly shortening drawing.
  • Time also greatly shortens the interface loading time; on the other hand, the drawing of the abort element also reduces the consumption of part of the system resources, can provide sufficient system resources for the interface loading, and can also shorten the interface loading time to a certain extent, thereby The time from the interface request to the interface loading display is greatly shortened.
  • the preset threshold may be pre-configured by the client of the client in the configuration parameter of the client; the preset threshold may also be pre-configured in the operating system of the terminal device; the value of the preset threshold may be based on actual requirements. Configuration.
  • the drawing duration by controlling the drawing duration, when the drawing duration reaches the preset threshold, and the interface loading data is not completely drawn, the drawing is aborted, and the interface is loaded based on the part of the element that has been drawn, and the display is output.
  • the interface loading time is greatly shortened by shortening the drawing duration.
  • the embodiment of the invention further provides an interface processing method.
  • 2 is a second schematic flowchart of an interface processing method according to an embodiment of the present invention; as shown in FIG. 2, the method includes:
  • Step 201 Receive an interface loading request, and obtain interface loading data.
  • Step 202 Draw a plurality of elements included in the interface loading data based on a preset rule and count the drawing duration.
  • Step 203 When the drawing duration reaches a preset threshold, the first part of the plurality of elements that is not drawn is suspended, and the first part is loaded based on the second part of the drawing.
  • the first partial element and the second partial element are some of the plurality of elements.
  • the second partial element is an element other than the first partial element among the plurality of elements.
  • Step 204 After the loading of the first interface is completed, continue to draw the first part of the element.
  • Step 205 After the drawing of the first partial element is completed, displaying the second interface based on loading the first partial element and the second partial element.
  • step 201 corresponds to the step 101 in the first embodiment. Therefore, those skilled in the art can understand the step 201 described above with reference to the embodiment shown in FIG. 1. For the sake of space saving, no further details are provided herein.
  • the element that has been drawn after the preset duration is reached and the element that has not been drawn is obtained.
  • the undrawn element is recorded as the first part, and the completed element is drawn. Recorded as the second part of the element.
  • the interface based on the second partial element loading display is the first interface. After the loading of the first interface is completed, the first part of the elements that are not drawn is continuously drawn.
  • the continuation drawing rule of the first part of the elements may refer to the drawing rules of multiple elements in the corresponding embodiment of FIG. 1 , and details are not described herein again.
  • the continuous drawing process of the first partial element may not be limited by the drawing duration, that is, when the first partial element continues to be drawn, it is not necessary to count the drawing duration until the first partial element drawing is completed.
  • continuing to draw the first part of the element is controlled by the drawing duration, that is, when the first part of the element continues to be drawn, the statistics are still Drawing duration, when the drawing duration reaches a preset threshold, and there is a part of the first part of the element that is not drawn, the drawing is aborted again, and the display interface is loaded based on the part of the element drawn in the first part of the element until the All of the elements in the first part of the element are drawn.
  • the system may preset a timer, and the timer duration threshold of the timer is the preset threshold.
  • the timer is started.
  • the drawing process may load the elements in the data based on the drawing interface; the preset time is reached at the timer.
  • the drawing process aborts the drawing, and the loading process performs a loading display of the second part of the element that has been drawn.
  • the second interface is displayed based on the loading of the first partial element and the second partial element. Specifically, the interface is reloaded as the second interface based on the first part element drawn later and the second part element drawn first.
  • the drawing duration by controlling the drawing duration, when the drawing duration reaches the preset threshold, and the interface loading data is not completely drawn, the drawing is aborted, and the interface is loaded based on the part of the element that has been drawn, and the display is output.
  • the interface loading time is greatly shortened, and the situation that a blank page is presented for a long time when the interface is requested is avoided, and the user experience is improved.
  • FIG. 3 is a schematic diagram of a third process of an interface processing method according to an embodiment of the present invention; as shown in FIG. 3, the method includes:
  • Step 301 Receive an interface loading request, and obtain interface loading data.
  • Step 302 Draw and count the duration of the plurality of elements based on the priority parameters of the plurality of elements included in the interface loading data.
  • Step 303 Determine whether the drawing duration reaches a preset threshold; when the determination result is that the preset threshold is reached for a long time, step 304 is performed; when the determination result is that the preset threshold is not reached for a long time, step 302 is performed again.
  • Step 304 Determine whether the plurality of elements are drawn or not.
  • step 305 to step are performed.
  • step 310 is directly performed.
  • Step 305 Suspend the drawing, and display the first interface based on the second part of the element loading completion of the drawing.
  • Step 306 After the loading of the first interface is completed, continue to draw the first part of the element.
  • Step 307 In the first part element drawing process, determining whether an interface jump request is received; when the interface jump request is not received, performing step 308: continuing to draw the first part element; receiving the interface jump When requested, the acquisition interface loading data in step 301 is re-executed.
  • Step 309 After the drawing of the first partial element is completed, displaying the second interface based on loading the first partial element and the second partial element.
  • Step 310 Display a third interface based on the plurality of element loadings that are completed by drawing.
  • step 301 corresponds to the step 101 in the first embodiment. Therefore, those skilled in the art can understand the step 301 described above with reference to the embodiment shown in FIG. 1. To save space, no further details are provided herein.
  • the plurality of elements are drawn based on the priority parameters corresponding to the multiple elements in the interface loading data, and are drawn.
  • the statistical drawing duration is calculated.
  • the drawing, according to the priority parameter of the multiple elements included in the interface loading data the plurality of elements are drawn, including: prioritizing the priority parameters of the multiple elements according to a numerical value, according to the priority
  • the order of the level parameters is to draw the plurality of elements, that is, the elements with higher priority are drawn first, and the elements with lower priority are delayed.
  • a priority parameter corresponding to the element is determined based on a hierarchical attribute of an element in the interface loading data; a priority parameter of the element and a hierarchical attribute of the element
  • the corresponding priority parameter can be obtained by identifying the hierarchical attribute of the element.
  • the hierarchical attribute of an element is represented as a parent view class
  • the corresponding priority parameter is a
  • the hierarchical attribute of another element is represented as a child view class. If the corresponding priority parameter is b, and a is greater than b, the priority parameter is drawn first.
  • the element for a is
  • the priority parameter of the element may be pre-configured by the developer in the interface loading data, or configured by the end user in the interface loading data; wherein the priority parameter of the element is configured by the user, or the developer according to the user
  • the priority parameter of the feedback configuration element can be configured according to the user's focus, preference, or habit, etc., for example, when the interface is displayed, the user's focus is on a specific area of the display (eg, the middle offset The upper area), the priority of the element corresponding to the specific area is higher than the priority of the element corresponding to the other area except the specific area, and the element corresponding to the specific area is preferentially drawn, so that the user pays attention to and prefers the high priority.
  • the elements of the level parameters are drawn first, which also greatly enhances the user experience to a certain extent.
  • the priority parameter corresponding to the element is determined based on the quantity of resources occupied by the elements in the interface loading data, and the priority parameter of the element with a small number of resources is higher than the priority of the element with a large number of resources.
  • Level parameter specifically, the priority parameter of the element corresponds to the number of resources occupied by the element (the amount of resources occupied by the element, for example, the size of the occupied memory); the smaller the number of resources occupied by the element, the higher the corresponding priority parameter;
  • the number of resources occupied by the elements is sorted according to the numerical value, and the elements occupying the smaller number of resources are preferentially drawn.
  • the timer preset by the system starts counting and counts the drawing duration; when the drawing duration reaches the preset threshold, and the interface loading data includes more
  • the drawing is paused (aborted), and the first interface is directly loaded based on the second part of the drawing, thereby greatly shortening the drawing time and greatly shortening the interface loading time; on the other hand, the drawing of the abort element It also reduces the consumption of part of the system resources, can provide sufficient system resources for interface loading, and can also shorten the interface loading time to a certain extent, thereby greatly shortening the interface request to interface loading.
  • the preset threshold may be pre-configured by the client of the client in the configuration parameter of the client; the preset threshold may also be pre-configured in the operating system of the terminal device; the value of the preset threshold may be based on actual requirements. Configuration.
  • the drawing duration reaches the preset threshold, and multiple elements included in the interface loading data are all completed, it indicates that multiple elements included in the interface loading data have been drawn, and the interface can be directly based on the drawn multiple elements.
  • the loaded interface is recorded as the third interface output and displayed to the end user.
  • the first part of the element that is not drawn is continuously drawn, and the continuation drawing rule of the first part element may be Referring to the drawing rules of multiple elements in the corresponding embodiment of FIG. 1 , details are not described herein again.
  • the interface jump request is not received, the first part of the element is continuously drawn; if the interface jump request is received, it indicates that a new interface loading request is received, requesting to acquire a new one. If the interface loads the data, step 301 is re-executed.
  • the continuation drawing process of the first partial element may not be limited by the limitation of the drawing duration, that is, when the first partial element is continued to be drawn, it is not necessary to count the drawing duration until the first partial element drawing is completed.
  • continuing to draw the first part of the element is controlled by the drawing duration, that is, when the first part of the element continues to be drawn, the drawing duration is still statistically, when the drawing duration reaches a preset threshold, and the first part of the element is When there is a part of the element that is not drawn, the drawing is aborted again, and the display interface is loaded based on the part of the first part of the element that is drawn until the drawing of all the elements in the first part of the element is completed.
  • the second interface is displayed based on the loading of the first partial element and the second partial element. Specifically, based on the first part of the element drawn later and the second part of the element previously drawn, the interface is reloaded as the first Second interface.
  • the display content of the second interface is the same as the display content of the third interface.
  • the drawing duration by controlling the drawing duration, when the drawing duration reaches the preset threshold, and the interface loading data is not completely drawn, the drawing is aborted, and the interface is loaded based on the part of the element that has been drawn, and the display is output.
  • the interface loading time is greatly shortened, and the situation that a blank page is presented for a long time when the interface is requested is avoided, and the user experience is improved.
  • An embodiment of the present invention further provides an interface processing apparatus.
  • 4 is a schematic structural diagram of an interface processing apparatus according to an embodiment of the present invention; as shown in FIG. 4, the apparatus includes: an obtaining unit 41, a drawing unit 42, and a loading unit 43;
  • the acquiring unit 41 is configured to receive an interface loading request, and is further configured to obtain interface loading data.
  • the drawing unit 42 is configured to draw an element included in the interface loading data obtained by the acquiring unit 41 according to a preset rule and count the drawing duration; when the drawing duration reaches a preset threshold, the drawing is suspended;
  • the loading unit 43 is configured to load a display interface based on an element that the drawing unit 42 has drawn.
  • the drawing unit 42 is configured to draw the plurality of elements based on priority parameters of the plurality of elements included in the interface loading data.
  • the drawing unit 42 is configured to determine a priority parameter corresponding to the element based on a hierarchical attribute of an element in the interface loading data; or determine the quantity based on a quantity of resources occupied by an element in the interface loading data.
  • the priority parameter corresponding to the element, the priority parameter of the element with a small number of resources is higher than the priority parameter of the element with a large number of resources; and the plurality of elements are drawn based on the priority parameter of the multiple element.
  • the drawing unit 42 is configured to: when the drawing duration reaches a preset threshold, discontinue drawing the first part of the plurality of elements that is not drawn;
  • the loading unit 43 is configured to display the first interface based on the second partial element loading completed by the drawing unit 42.
  • the first partial element and the second partial element are some of the plurality of elements.
  • the second partial element is an element other than the first partial element among the plurality of elements.
  • the drawing unit 42 is further configured to continue to draw the first partial element after the loading unit 43 loads and displays the first interface.
  • the loading unit 43 is further configured to display the second interface based on the first partial element and the second partial element loading after the drawing unit 42 draws the first partial element.
  • the device further includes a determining unit configured to determine whether an interface jump request is received during the drawing of the first partial element by the drawing unit 42;
  • the drawing unit 42 is further configured to: when the determining unit determines that the interface jump request is not received, continue to draw the first partial element; and when the determining unit determines that the interface jump request is received, terminate drawing the first Part of the element.
  • the drawing unit 42, the loading unit 43, and the determining unit in the device may be implemented by a central processing unit (CPU), a digital signal processor (DSP), or a digital signal processor (DSP).
  • CPU central processing unit
  • DSP digital signal processor
  • DSP digital signal processor
  • FIG. 5 is an electronic device according to an embodiment of the present invention.
  • the electronic device 50 includes a memory 52, a processor 51, and a computer program stored on the memory 52 and operable on the processor 51; the electronic device further includes at least one external communication 54.
  • the interface and user interface 53; the various components of the electronic device 50 are coupled together by a bus system 55.
  • the bus system 55 is used to implement connection communication between these components.
  • the bus system 55 includes, in addition to the data bus, a power bus, a control bus, and a status signal bus. However, for clarity of description, various buses are labeled as bus system 55 in FIG.
  • the user interface 53 may include: a display, a keyboard, a mouse, a trackball, a click wheel, a button, a button, a touch panel, or a touch screen.
  • the external communication interface 54 is used for wired or wireless communication between the electronic device 50 and other devices.
  • the electronic device 50 can access a wireless network based on a communication standard such as WiFi, 2G or 3G, or a combination thereof.
  • the external communication interface 54 receives broadcast signals or broadcast associated information from an external broadcast management system via a broadcast channel.
  • the external communication interface 54 also includes a Near Field Communication (NFC) module to facilitate short range communication.
  • the NFC module may be based on Radio Frequency Identification (RFID) technology, IrDA (Infrared Data Association) technology, Ultra Wideband (UWB) technology, Bluetooth (BT, BlueTooth) technology or other technologies. to fulfill.
  • RFID Radio Frequency Identification
  • IrDA Infrared Data Association
  • UWB Ultra Wideband
  • Bluetooth BT, Blue
  • memory 52 can be either volatile memory or non-volatile memory, as well as both volatile and non-volatile memory.
  • the non-volatile memory may be a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), or an Erasable Programmable Read (EPROM). Only Memory), Electrically Erasable Programmable Read-Only Memory (EEPROM), Ferromagnetic Random Access Memory (FRAM), Flash Memory, Magnetic Surface Memory , CD, or CD-ROM (CD-ROM, Compact Disc) Read-Only Memory); the magnetic surface memory can be a disk storage or a tape storage.
  • the volatile memory can be a random access memory (RAM) that acts as an external cache.
  • RAM Random Access Memory
  • SRAM Static Random Access Memory
  • SSRAM Synchronous Static Random Access Memory
  • SSRAM Dynamic Random Access
  • DRAM Dynamic Random Access Memory
  • SDRAM Synchronous Dynamic Random Access Memory
  • DDRSDRAM Double Data Rate Synchronous Dynamic Random Access Memory
  • ESDRAM enhancement Enhanced Synchronous Dynamic Random Access Memory
  • SLDRAM Synchronous Dynamic Random Access Memory
  • DRRAM Direct Memory Bus Random Access Memory
  • the memory 52 in the embodiment of the present invention includes: any computer program for operating on the electronic device 50, such as an operating system 521 and an application 522; wherein the operating system 521 includes various system programs, such as a framework layer and a core library layer. , driver layer, etc., used to implement various basic services and handle hardware-based tasks.
  • the application 522 can include various applications, such as a Media Player, a Browser, etc., for implementing various application services.
  • a program implementing the method of the embodiment of the present invention may be included in the application 522.
  • Processor 51 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor 51 or an instruction in a form of software.
  • the processor 51 described above may be a general purpose processor, a DSP, or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, or the like.
  • the processor 51 can implement or perform the various methods, steps, and logic blocks disclosed in the embodiments of the present invention.
  • a general purpose processor can be a microprocessor or any conventional processor or the like.
  • the steps of the method disclosed in the embodiment of the present invention may be directly implemented as a hardware decoding processor, or may be performed by a combination of hardware and software modules in the decoding processor.
  • the software module can reside in a storage medium located in memory 52, which reads the information in memory 52 and, in conjunction with its hardware, performs the steps of the foregoing method.
  • the electronic device 50 may be configured by at least one Application Specific Integrated Circuit (ASIC), DSP, Programmable Logic Device (PLD), Complex Programmable Logic Device (CPLD, Complex). Programmable Logic Device), FPGA, general purpose processor, controller, MCU, microprocessor 51, or other electronic component implementation for performing the aforementioned methods.
  • ASIC Application Specific Integrated Circuit
  • DSP Digital Signal processor
  • PLD Programmable Logic Device
  • CPLD Complex Programmable Logic Device
  • FPGA general purpose processor
  • controller MCU
  • microprocessor 51 or other electronic component implementation for performing the aforementioned methods.
  • the processor 51 executes the program, the steps of the interface processing method in the embodiment of the present invention are implemented. Specifically, the processor 51 implements receiving an interface loading request when the program is executed; acquiring interface loading data; drawing an element included in the interface loading data according to a preset rule and counting a drawing duration; when the drawing duration reaches a pre- When the threshold is set, the drawing is aborted, and the display interface is loaded based on the elements that have been drawn.
  • the method is: drawing the plurality of elements based on a priority parameter of a plurality of elements included in the interface loading data.
  • the processor 51 executes the program, the first part of the plurality of elements that is not drawn is completed, and the first part is loaded based on the second part of the drawing.
  • the processor 51 executes the program, after the first interface loading display is completed, the first partial element is continuously drawn.
  • the display is loaded based on the first partial element and the second partial element.
  • the second interface when the processor 51 executes the program, after the first partial element is drawn, the display is loaded based on the first partial element and the second partial element.
  • the processor 51 is configured to: when the first partial element drawing process is performed, determine whether an interface jump request is received; when the interface jump request is not received, continue to draw the The first part of the element.
  • the processor 51 is configured to: when determining, according to a hierarchical attribute of an element in the interface loading data, a priority parameter corresponding to the element; or, based on the interface loading data
  • the number of resources occupied by the element determines a priority parameter corresponding to the element, and the priority parameter of the element with a small number of resources is higher than the priority parameter of the element with a large number of resources; the priority parameter of the multiple elements based on the determined Drawing the plurality of elements.
  • Embodiments of the present invention also provide a computer storage medium, including, for example, a memory 52 having a computer program shown in FIG. 5, which may be executed by processor 51 of electronic device 50 to perform the steps described in the foregoing methods.
  • the computer readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories, such as Mobile phones, computers, tablet devices, personal digital assistants, etc.
  • the computer storage medium stores computer instructions, which are executed by the processor to implement the steps of the interface processing method according to the embodiment of the present invention. Specifically, the instruction is executed by the processor to: receive an interface loading request; acquire interface loading data; draw an element included in the interface loading data according to a preset rule, and count a drawing duration; when the drawing duration reaches a preset threshold When the drawing is aborted, the display interface is loaded based on the drawn completion element.
  • the instruction is implemented by the processor: loading based on the interface A priority parameter of a plurality of elements included in the data draws the plurality of elements.
  • the first part of the plurality of elements that is not drawn is completed, and the first part of the element is loaded based on the drawing.
  • the instruction when executed by the processor, after the first interface loading display is completed, the first partial element is continuously drawn.
  • the second interface is displayed based on the first partial element and the second partial element loading.
  • the instruction is executed by the processor to: determine a priority parameter corresponding to the element based on a hierarchical attribute of an element in the interface loading data; or, based on an element occupied by the interface loading data
  • the quantity of the resource determines a priority parameter corresponding to the element, and the priority parameter of the element with a small number of resources is higher than the priority parameter of the element with a large number of resources; the priority parameter is determined based on the determined priority parameter of the multiple element Multiple elements are drawn.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner such as: multiple units or components may be combined, or Can be integrated into another system, or some features can be ignored or not executed.
  • the coupling, or direct coupling, or communication connection of the components shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, and may be electrical, mechanical or other forms. of.
  • the units described above as separate components may or may not be physically separated, and the components displayed as the unit may or may not be physical units, that is, may be located in one place or distributed to multiple network units; Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be separately used as one unit, or two or more units may be integrated into one unit;
  • the unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
  • the foregoing program may be stored in a computer readable storage medium, and the program is executed when executed.
  • the foregoing steps include the steps of the foregoing method embodiments; and the foregoing storage medium includes: a removable storage device, a ROM, a RAM, a magnetic disk, or an optical disk, and the like, which can store program codes.
  • the above-described integrated unit of the present invention may be stored in a computer readable storage medium if it is implemented in the form of a software function module and sold or used as a standalone product.
  • the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium, including a plurality of instructions.
  • a computer device (which may be a personal computer, server, or network device, etc.) is caused to perform all or part of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes various media that can store program codes, such as a mobile storage device, a ROM, a RAM, a magnetic disk, or an optical disk.

Landscapes

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

Abstract

一种界面处理方法、装置、计算机存储介质及电子设备。所述方法包括:接收界面加载请求,获取界面加载数据(101);基于预设规则绘制所述界面加载数据中包括的元素并统计绘制时长(102);当所述绘制时长达到预设阈值时,中止绘制,基于已绘制完成的元素加载显示界面(103)。

Description

界面处理方法、装置、计算机存储介质及电子设备 技术领域
本发明涉及一种界面处理方法、装置、计算机存储介质及电子设备。
背景技术
随着互联网技术的飞速发展,应用界面的设计越来越复杂。而应用界面的显示需要在界面数据全部绘制完成后才能进行界面的加载,部分情况下由于加载的内容过多,界面数据的绘制时长很长,使得用户在请求一个界面时,可能会存在有较长的时间无显示内容的情况,即在该时间范围内呈现空白页面的情况,这样给用户带来较差的体验。
发明内容
本发明实施例提供一种界面处理方法、装置、计算机存储介质及电子设备。
本发明实施例的技术方案是这样实现的:
本发明实施例提供了一种界面处理方法,所述方法包括:接收界面加载请求;
获取界面加载数据;
基于预设规则绘制所述界面加载数据中包括的元素并统计绘制时长;
当所述绘制时长达到预设阈值时,中止绘制,基于已绘制完成的元素加载显示界面。
在一实施例中,所述基于预设规则绘制所述界面加载数据中包括的多个元素,包括:
基于所述界面加载数据中包括的多个元素的优先级参数对所述多个元 素进行绘制。
在一实施例中,所述中止绘制,基于已绘制完成的元素加载显示界面,包括:
中止绘制多个元素中未绘制完成的第一部分元素,基于绘制完成的第二部分元素加载显示第一界面。
在一实施例中,所述方法还包括:所述第一界面加载显示完成后,继续绘制所述第一部分元素。
在一实施例中,所述方法还包括:所述第一部分元素绘制完成后,基于所述第一部分元素和所述第二部分元素加载显示第二界面。
在一实施例中,所述方法还包括:在所述第一部分元素绘制过程中,判断是否接收到界面跳转请求;
在未接收到界面跳转请求时,继续绘制所述第一部分元素。
在一实施例中,所述方法还包括:基于所述界面加载数据中的元素的层级属性确定所述元素对应的优先级参数;
或者,基于所述界面加载数据中的元素占用的资源数量确定所述元素对应的优先级参数,资源占用数量小的元素的优先级参数高于资源占用数量大的元素的优先级参数。
本发明实施例还提供了一种界面处理装置,所述装置包括:获取单元、绘制单元和加载单元;其中,
所述获取单元,配置为接收界面加载请求;获取界面加载数据;
所述绘制单元,配置为基于预设规则绘制所述获取单元获得的所述界面加载数据中包括的元素并统计绘制时长;当所述绘制时长达到预设阈值时,中止绘制;
所述加载单元,配置为基于所述绘制单元已绘制完成元素加载显示界面。
本发明实施例还提供了一种计算机存储介质,其上存储有计算机指令,该指令被处理器执行时实现本发明实施例所述的界面处理方法的步骤。
本发明实施例还提供了一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现本发明实施例所述的界面处理方法的步骤。
本发明实施例提供的界面处理方法、装置、计算机存储介质及电子设备。所述方法包括:接收界面加载请求;获取界面加载数据;基于预设规则绘制所述界面加载数据中包括的元素并统计绘制时长;当所述绘制时长达到预设阈值时,中止绘制,基于已绘制完成的元素加载显示界面。采用本发明实施例的技术方案,通过对绘制时长的控制,在绘制时长达到预设阈值、且界面加载数据未全部绘制完成时,中止绘制,基于已经绘制完成的部分元素加载界面并输出显示,通过缩短绘制时长的方式大大缩短了界面加载时间,避免了请求界面时长时间的呈现空白页面的情况发生,提升了用户的体验。
附图说明
图1为本发明实施例的界面处理方法的第一种流程示意图;
图2为本发明实施例的界面处理方法的第二种流程示意图;
图3为本发明实施例的界面处理方法的第三种流程示意图;
图4为本发明实施例的界面处理装置的组成结构示意图;
图5为本发明实施例的电子设备的硬件实现结构示意图。
具体实施方式
下面结合附图及具体实施例对本发明作进一步详细的说明。
本发明实施例提供了一种界面处理方法。图1为本发明实施例的界面处理方法的第一种流程示意图;如图1所示,所述方法包括:
步骤101:接收界面加载请求,获取界面加载数据。
步骤102:基于预设规则绘制所述界面加载数据中包括的元素并统计绘制时长。
步骤103:当所述绘制时长达到预设阈值时,中止绘制,基于已绘制完成的元素加载显示界面。
本发明实施例所述的界面处理方法可应用于终端设备中,所述终端为支持安装运行客户端的电子设备,例如智能手机、平板电脑或车载终端设备;客户端可采用在终端中安装的应用(APP)的形式,则客户端例如是浏览器客户端、社交客户端、即时应用客户端、多媒体播放客户端等等。作为一种实施方式,客户端指终端中用于实现网络通信的客户端,即客户端运行时,通过终端中的通信组件与该客户端对应的网络服务器进行通信,从而获得显示数据。
本实施例中,所述接收界面加载请求,获取界面加载数据,包括:检测到客户端的运行操作时,接收界面加载请求,基于界面加载请求发送对应于所述客户端的界面数据请求,获得界面数据请求对应的界面加载数据;或者,基于运行的客户端检测到界面跳转指令时,接收界面加载请求,基于界面加载请求发送对应于所述界面跳转指令的界面数据请求,基于所述界面数据请求获得界面加载数据。
在上述实施方式中,作为第一种实施方式,在客户端基于终端获得的输入操作被激活运行时,即检测到客户端的运行指令,同时,客户端被激活运行时,操作系统接收到界面加载请求;终端向该客户端所属服务器发送界面数据请求,以请求首屏界面加载数据。作为第二种实施方式,在客户端处于运行状态时基于用户的操作从一个界面跳转至另一个界面,例如基于终端获得的输入操作识别出该操作对应于界面中的链接地址时,则生成界面跳转指令,此时操作系统接收到界面加载请求;终端向该客户端所 属服务器发送对应于所述链接地址的界面数据请求,即请求该链接地址对应的界面加载数据。
本实施例中,获得界面加载数据后,按照预设规则绘制所述界面加载数据中包括的元素。其中,获得的界面加载数据可通过应用程序代码表示,所述应用程序代码中可包括多种类型的数据,例如类(class)类型的数据,所述页面加载数据中的元素可以是某类类型的数据。作为一种实施方式,元素可以是表示用户界面(UI)元素的view类类型的数据。在界面加载数据的绘制过程中可按照通过应用程序代码表示的界面加载数据中的元素的属性(例如元素的层级属性)进行绘制。
本实施例中,在界面加载数据开始绘制时进行计时,统计绘制时长;当绘制时长达到预设阈值时,暂停(中止)绘制,直接基于已绘制完成元素进行界面的加载显示,从而大大缩短绘制时间,也大大缩短界面加载时间;另一方面,中止元素的绘制也减少了一部分的系统资源的消耗,可为界面加载提供充分的系统资源,在一定程度上也可缩短界面加载的时间,从而大大缩短了从界面请求到界面加载显示的时间。其中,所述预设阈值可由客户端的开发人员预先配置在客户端的配置参数中;所述预设阈值也可预先配置在终端设备的操作系统中;所述预设阈值的取值可根据实际需求配置。
采用本发明实施例的技术方案,通过对绘制时长的控制,在绘制时长达到预设阈值、且界面加载数据未全部绘制完成时,中止绘制,基于已经绘制完成的部分元素加载界面并输出显示,通过缩短绘制时长的方式大大缩短了界面加载时间,虽然呈现的界面中包括的内容并不完整,但也避免了请求界面时长时间的呈现空白页面的情况发生,提升了用户的体验。
本发明实施例还提供了一种界面处理方法。图2为本发明实施例的界面处理方法的第二种流程示意图;如图2所示,所述方法包括:
步骤201:接收界面加载请求,获取界面加载数据。
步骤202:基于预设规则绘制所述界面加载数据中包括的多个元素并统计绘制时长。
步骤203:当所述绘制时长达到预设阈值时,中止绘制多个元素中未绘制完成的第一部分元素,基于绘制完成的第二部分元素加载显示第一界面。其中,所述第一部分元素和所述第二部分元素均为所述多个元素中的部分元素。所述第二部分元素为所述多个元素中除所述第一部分元素以外的其他元素。
步骤204:所述第一界面加载完成后,继续绘制所述第一部分元素。
步骤205:所述第一部分元素绘制完成后,基于所述第一部分元素和所述第二部分元素加载显示第二界面。
本实施例中,上述的步骤201对应于实施例一中的步骤101因此,本领域的技术人员可以参阅图1所示实施例而理解上述的步骤201,为节约篇幅,这里不再赘述。
本实施例中,区别于在预设阈值的绘制时长达到后已绘制完成的元素和未绘制完成的元素,本实施例中将未绘制完成的元素记为第一部分元素,将已绘制完成的元素记为第二部分元素。相应的,基于在获得界面加载数据后首次绘制时长达到预设阈值时,基于第二部分元素加载显示的界面即为第一界面。在第一界面加载完成后,继续绘制未绘制完成的第一部分元素,所述第一部分元素的继续绘制规则可参照图1对应实施例中多个元素的绘制规则,这里不再赘述。
其中,作为一种实施方式,第一部分元素的继续绘制过程可不受绘制时长的限制,即在继续绘制所述第一部分元素时,无需统计绘制时长,直至所述第一部分元素绘制完成。作为另一种实施方式,继续绘制所述第一部分元素受绘制时长的控制,即继续绘制所述第一部分元素时,依旧统计 绘制时长,当绘制时长达到预设阈值、且所述第一部分元素中存在未绘制完成的部分元素时,再一次中止绘制,基于所述第一部分元素中绘制完成的部分元素加载显示界面,直至所述第一部分元素中的所有元素均绘制完成。实际应用中,系统可预置计时器,计时器的计时时长阈值为所述预设阈值。当获取界面加载数据后待进行绘制加载时,启动计时器,在计时器的计时时间未达到预设阈值时,绘制进程可基于绘制界面加载数据中的元素;在计时器的计时时间达到预设阈值时,绘制进程中止绘制,加载进程进行已绘制完成的第二部分元素的加载显示。
本实施例中,在所述第一部分元素中的所有元素均绘制完成后,基于所述第一部分元素和所述第二部分元素加载显示第二界面。具体的,基于在后绘制的第一部分元素和在先绘制的第二部分元素重新加载界面作为第二界面。
采用本发明实施例的技术方案,通过对绘制时长的控制,在绘制时长达到预设阈值、且界面加载数据未全部绘制完成时,中止绘制,基于已经绘制完成的部分元素加载界面并输出显示,通过缩短绘制时长的方式大大缩短了界面加载时间,避免了请求界面时长时间的呈现空白页面的情况发生,提升了用户的体验。
本发明实施例还提供了一种界面处理方法。图3为本发明实施例的界面处理方法的第三种流程示意图;如图3所示,所述方法包括:
步骤301:接收界面加载请求,获取界面加载数据。
步骤302:基于所述界面加载数据中包括的所述多个元素的优先级参数对所述多个元素进行绘制并统计绘制时长。
步骤303:判断绘制时长是否达到预设阈值;当判断结果为时长时间达到预设阈值时,执行步骤304;当判断结果为时长时间未达到预设阈值时,重新执行步骤302。
步骤304:判断所述多个元素是否绘制完成;当判断结果为所述多个元素中未绘制完成时,即所述多个元素中存在未绘制完成的第一部分元素时,执行步骤305至步骤307;当判断结果为所述多个元素绘制完成时,即所述多个元素中不存在未绘制完成的元素时,直接执行步骤310。
步骤305:中止绘制,基于绘制完成的第二部分元素加载显示第一界面。
步骤306:所述第一界面加载完成后,继续绘制所述第一部分元素。
步骤307:在所述第一部分元素绘制过程中,判断是否接收到界面跳转请求;在未接收到界面跳转请求时,执行步骤308:继续绘制所述第一部分元素;在接收到界面跳转请求时,重新执行步骤301中的获取界面加载数据。
步骤309:所述第一部分元素绘制完成后,基于所述第一部分元素和所述第二部分元素加载显示第二界面。
步骤310:基于绘制完成的所述多个元素加载显示第三界面。
本实施例中,上述的步骤301对应于实施例一中的步骤101,因此,本领域的技术人员可以参阅图1所示实施例而理解上述的步骤301,为节约篇幅,这里不再赘述。
区别于图1和图2所示的实施例,本实施例中,获得界面加载数据后,基于界面加载数据中的多个元素对应的优先级参数对所述多个元素进行绘制,在绘制的同时统计绘制时长。其中,所述基于所述界面加载数据中包括的所述多个元素的优先级参数对所述多个元素进行绘制,包括:对所述多个元素的优先级参数按照数值大小排序,按照优先级参数的顺序对所述多个元素进行绘制,即优先级高的元素优先绘制,优先级低的元素延后绘制。
具体的,作为一种实施方式,基于所述界面加载数据中的元素的层级属性确定所述元素对应的优先级参数;元素的优先级参数与元素的层级属 性对应,则可通过识别元素的层级属性获得对应的优先级参数。例如,一元素的层级属性表示为父view类,对应优先级参数为a,另一元素的层级属性表示为子view类,对应优先级参数为b,且a大于b,则优先绘制优先级参数为a的元素。作为另一种实施方式,元素的优先级参数可由开发人员预先配置在界面加载数据中,或者由终端用户配置在界面加载数据中;其中,由用户配置元素的优先级参数,或者开发人员依据用户的反馈配置元素的优先级参数,可依据用户的关注点、喜好、或者习惯等因素配置元素的优先级参数,例如,在界面显示时,用户的关注点在显示屏的特定区域(例如中部偏上区域),则将该特定区域对应的元素的优先级高于除特定区域以外的其他区域对应的元素的优先级,优先绘制该特定区域对应的元素,使得用户关注的、喜欢的具有高优先级参数的元素优先绘制,在一定程度上也大大提升了用户的体验。作为又一种实施方式,基于所述界面加载数据中的元素占用的资源数量确定所述元素对应的优先级参数,资源占用数量小的元素的优先级参数高于资源占用数量大的元素的优先级参数;具体的,元素的优先级参数对应于该元素占用的资源数量(元素占用的资源数量例如占用的内存大小);元素占用的资源数量越小,对应的优先级参数越高;则可基于元素占用的资源数量按照数值大小进行排序,优先绘制占用的资源数量越小的元素。
本实施例中,在界面加载数据开始依据元素的优先级参数进行绘制时,系统预置的计时器开始计时,并统计绘制时长;当绘制时长达到预设阈值时,并且界面加载数据包括的多个元素并未绘制完成时,暂停(中止)绘制,直接基于绘制完成的第二部分元素加载显示第一界面,从而大大缩短绘制时间,也大大缩短界面加载时间;另一方面,中止元素的绘制也减少了一部分的系统资源的消耗,可为界面加载提供充分的系统资源,在一定程度上也可缩短界面加载的时间,从而大大缩短了从界面请求到界面加载 显示的时间。其中,所述预设阈值可由客户端的开发人员预先配置在客户端的配置参数中;所述预设阈值也可预先配置在终端设备的操作系统中;所述预设阈值的取值可根据实际需求配置。
而当绘制时长达到所述预设阈值、且界面加载数据包括的多个元素均绘制完成时,则表明界面加载数据包括的多个元素均已绘制完成,可直接基于绘制的多个元素进行界面加载,加载后的界面记为第三界面输出显示给终端用户。
本实施例中,在第一界面加载完成后,即终端设备输出加载后的第一界面以供终端用户浏览时,继续绘制未绘制完成的第一部分元素,所述第一部分元素的继续绘制规则可参照图1对应实施例中多个元素的绘制规则,这里不再赘述。其中,在继续绘制第一部分元素的过程中,如果未接收到界面跳转请求,则继续绘制第一部分元素;如果接收到界面跳转请求,则表明接收到新的界面加载请求,以请求获取新的界面加载数据,则重新执行步骤301。
其中,作为一种实施方式,第一部分元素的继续绘制过程可不受限与绘制时长的限制,即在继续绘制所述第一部分元素时,无需统计绘制时长,直至所述第一部分元素绘制完成。作为另一种实施方式,继续绘制所述第一部分元素受绘制时长的控制,即继续绘制所述第一部分元素时,依旧统计绘制时长,当绘制时长达到预设阈值、且所述第一部分元素中存在未绘制完成的部分元素时,再一次中止绘制,基于所述第一部分元素中绘制完成的部分元素加载显示界面,直至所述第一部分元素中的所有元素均绘制完成。
本实施例中,在所述第一部分元素中的所有元素均绘制完成后,基于所述第一部分元素和所述第二部分元素加载显示第二界面。具体的,基于在后绘制的第一部分元素和在先绘制的第二部分元素重新加载界面作为第 二界面。该第二界面的显示内容与第三界面的显示内容相同。
采用本发明实施例的技术方案,通过对绘制时长的控制,在绘制时长达到预设阈值、且界面加载数据未全部绘制完成时,中止绘制,基于已经绘制完成的部分元素加载界面并输出显示,通过缩短绘制时长的方式大大缩短了界面加载时间,避免了请求界面时长时间的呈现空白页面的情况发生,提升了用户的体验。
本发明实施例还提供了一种界面处理装置。图4为本发明实施例的界面处理装置的组成结构示意图;如图4所示,所述装置包括:获取单元41、绘制单元42和加载单元43;其中,
所述获取单元41,配置为接收界面加载请求;还配置为获取界面加载数据;
所述绘制单元42,配置为基于预设规则绘制所述获取单元41获得的所述界面加载数据中包括的元素并统计绘制时长;当所述绘制时长达到预设阈值时,中止绘制;
所述加载单元43,配置为基于所述绘制单元42已绘制完成的元素加载显示界面。
本实施例中,所述绘制单元42,配置为基于所述界面加载数据中包括的所述多个元素的优先级参数对所述多个元素进行绘制。
其中,所述绘制单元42,配置为基于所述界面加载数据中的元素的层级属性确定所述元素对应的优先级参数;或者,基于所述界面加载数据中的元素占用的资源数量确定所述元素对应的优先级参数,资源占用数量小的元素的优先级参数高于资源占用数量大的元素的优先级参数;基于所述多个元素的优先级参数对所述多个元素进行绘制。
本实施例中,所述绘制单元42,配置为当所述绘制时长达到预设阈值时,中止绘制多个元素中未绘制完成的第一部分元素;
所述加载单元43,配置为基于所述绘制单元42绘制完成的第二部分元素加载显示第一界面。其中,所述第一部分元素和所述第二部分元素均为所述多个元素中的部分元素。所述第二部分元素为所述多个元素中除所述第一部分元素以外的其他元素。
作为一种实施方式,所述绘制单元42,还配置为所述加载单元43加载显示所述第一界面完成后,继续绘制所述第一部分元素。
所述加载单元43,还配置为所述绘制单元42绘制所述第一部分元素完成后,基于所述第一部分元素和所述第二部分元素加载显示第二界面。
作为一种实施方式,所述装置还包括判断单元,配置为在所述绘制单元42继续绘制所述第一部分元素过程中,判断是否接收到界面跳转请求;
所述绘制单元42,还配置为所述判断单元判定未接收到界面跳转请求时,继续绘制所述第一部分元素;在所述判断单元判定接收到界面跳转请求时,终止绘制所述第一部分元素。
本领域技术人员应当理解,本发明实施例的界面处理装置中各处理单元的功能,可参照前述界面处理方法的相关描述而理解,本发明实施例的界面处理装置中各处理单元,可通过实现本发明实施例所述的功能的模拟电路而实现,也可以通过执行本发明实施例所述的功能的软件在智能终端上的运行而实现。
本发明实施例中,所述装置中的绘制单元42、加载单元43和判断单元,在实际应用中均可由中央处理器(CPU,Central Processing Unit)、数字信号处理器(DSP,Digital Signal Processor)、微控制单元(MCU,Microcontroller Unit)或可编程门阵列(FPGA,Field-Programmable Gate Array)实现;所述装置中的获取单元41,在实际应用中可通过通信模组(包含:基础通信套件、操作系统、通信模块、标准化接口和协议等)及收发天线实现。
本发明实施例还提供了一种电子设备。图5为本发明实施例的电子设 备的硬件实现结构示意图;如图5所示,电子设备50包括存储器52、处理器51及存储在存储器52上并可在处理器51上运行的计算机程序;电子设备还包括至少一个外部通信54接口和用户接口53;电子设备50中的各个组件通过总线系统55耦合在一起。可理解,总线系统55用于实现这些组件之间的连接通信。总线系统55除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图5中将各种总线都标为总线系统55。
其中,用户接口53可以包括:显示器、键盘、鼠标、轨迹球、点击轮、按键、按钮、触感板或者触摸屏等。外部通信接口54用于电子设备50与其他设备之间有线或无线方式的通信。电子设备50可以接入基于通信标准的无线网络,如WiFi、2G或3G、或它们的组合。在一个示例性实施例中,外部通信接口54经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,外部通信接口54还包括近场通信(NFC,Near Field Communication)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID,Radio Frequency IDentification)技术、红外数据组织(IrDA,Infrared Data Association)技术、超宽带(UWB,Ultra WideBand)技术、蓝牙(BT,BlueTooth)技术或其他技术来实现。
可以理解,存储器52可以是易失性存储器或非易失性存储器,也可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(ROM,Read Only Memory)、可编程只读存储器(PROM,Programmable Read-Only Memory)、可擦除可编程只读存储器(EPROM,Erasable Programmable Read-Only Memory)、电可擦除可编程只读存储器(EEPROM,Electrically Erasable Programmable Read-Only Memory)、磁性随机存取存储器(FRAM,ferromagnetic random access memory)、快闪存储器(Flash Memory)、磁表面存储器、光盘、或只读光盘(CD-ROM,Compact Disc  Read-Only Memory);磁表面存储器可以是磁盘存储器或磁带存储器。易失性存储器可以是随机存取存储器(RAM,Random Access Memory),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(SRAM,Static Random Access Memory)、同步静态随机存取存储器(SSRAM,Synchronous Static Random Access Memory)、动态随机存取存储器(DRAM,Dynamic Random Access Memory)、同步动态随机存取存储器(SDRAM,Synchronous Dynamic Random Access Memory)、双倍数据速率同步动态随机存取存储器(DDRSDRAM,Double Data Rate Synchronous Dynamic Random Access Memory)、增强型同步动态随机存取存储器(ESDRAM,Enhanced Synchronous Dynamic Random Access Memory)、同步连接动态随机存取存储器(SLDRAM,SyncLink Dynamic Random Access Memory)、直接内存总线随机存取存储器(DRRAM,Direct Rambus Random Access Memory)。本发明实施例描述的存储器52旨在包括但不限于这些和任意其它适合类型的存储器。
本发明实施例中的存储器52包括:用于在电子设备50上操作的任何计算机程序,如操作系统521和应用程序522;其中,操作系统521包含各种系统程序,例如框架层、核心库层、驱动层等,用于实现各种基础业务以及处理基于硬件的任务。应用程序522可以包含各种应用程序,例如媒体播放器(Media Player)、浏览器(Browser)等,用于实现各种应用业务。实现本发明实施例方法的程序可以包含在应用程序522中。
上述本发明实施例揭示的方法可以应用于处理器51中,或者由处理器51实现。处理器51可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器51中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器51可以是通用处理器、DSP,或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。 处理器51可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本发明实施例所公开的方法的步骤,可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于存储介质中,该存储介质位于存储器52,处理器51读取存储器52中的信息,结合其硬件完成前述方法的步骤。
在示例性实施例中,电子设备50可以被至少一个应用专用集成电路(ASIC,Application Specific Integrated Circuit)、DSP、可编程逻辑器件(PLD,Programmable Logic Device)、复杂可编程逻辑器件(CPLD,Complex Programmable Logic Device)、FPGA、通用处理器、控制器、MCU、微处理器51(Microprocessor)、或其他电子元件实现,用于执行前述方法。
本实施例中,所述处理器51执行所述程序时实现本发明实施例所述的界面处理方法的步骤。具体的,所述处理器51执行所述程序时实现接收界面加载请求;获取界面加载数据;基于预设规则绘制所述界面加载数据中包括的元素并统计绘制时长;当所述绘制时长达到预设阈值时,中止绘制,基于已绘制完成的元素加载显示界面。
作为一种实施方式,所述处理器51执行所述程序时实现:基于所述界面加载数据中包括的多个元素的优先级参数对所述多个元素进行绘制。
作为一种实施方式,所述处理器51执行所述程序时实现:中止绘制多个元素中未绘制完成的第一部分元素,基于绘制完成的第二部分元素加载显示第一界面。
作为一种实施方式,所述处理器51执行所述程序时实现:所述第一界面加载显示完成后,继续绘制所述第一部分元素。
作为一种实施方式,所述处理器51执行所述程序时实现:所述第一部分元素绘制完成后,基于所述第一部分元素和所述第二部分元素加载显示 第二界面。
作为一种实施方式,所述处理器51执行所述程序时实现:在所述第一部分元素绘制过程中,判断是否接收到界面跳转请求;在未接收到界面跳转请求时,继续绘制所述第一部分元素。
作为一种实施方式,所述处理器51执行所述程序时实现:基于所述界面加载数据中的元素的层级属性确定所述元素对应的优先级参数;或者,基于所述界面加载数据中的元素占用的资源数量确定所述元素对应的优先级参数,资源占用数量小的元素的优先级参数高于资源占用数量大的元素的优先级参数;基于确定的所述多个元素的优先级参数对所述多个元素进行绘制。
这里需要指出的是:以上涉及装置/电子设备项的描述,与上述方法描述是类似的,同方法的有益效果描述,不做赘述。对于本发明装置/电子设备实施例中未披露的技术细节,请参照本发明方法实施例的描述。
本发明实施例还提供了一种计算机存储介质,例如包括图5中所示的存储有计算机程序的存储器52,上述计算机程序可由电子设备50的处理器51执行,以完成前述方法所述步骤。计算机可读存储介质可以是FRAM、ROM、PROM、EPROM、EEPROM、Flash Memory、磁表面存储器、光盘、或CD-ROM等存储器;也可以是包括上述存储器之一或任意组合的各种设备,如移动电话、计算机、平板设备、个人数字助理等。
计算机存储介质上存储有计算机指令,该指令被处理器执行时实现本发明实施例所述的界面处理方法的步骤。具体的,该指令被处理器执行时实现:接收界面加载请求;获取界面加载数据;基于预设规则绘制所述界面加载数据中包括的元素并统计绘制时长;当所述绘制时长达到预设阈值时,中止绘制,基于已绘制完成元素加载显示界面。
作为一种实施方式,该指令被处理器执行时实现:基于所述界面加载 数据中包括的多个元素的优先级参数对所述多个元素进行绘制。
作为一种实施方式,该指令被处理器执行时实现:中止绘制多个元素中未绘制完成的第一部分元素,基于绘制完成的第二部分元素加载显示第一界面。
作为一种实施方式,该指令被处理器执行时实现:所述第一界面加载显示完成后,继续绘制所述第一部分元素。
作为一种实施方式,该指令被处理器执行时实现:所述第一部分元素绘制完成后,基于所述第一部分元素和所述第二部分元素加载显示第二界面。
作为一种实施方式,该指令被处理器执行时实现:在所述第一部分元素绘制过程中,判断是否接收到界面跳转请求;在未接收到界面跳转请求时,继续绘制所述第一部分元素。
作为一种实施方式,该指令被处理器执行时实现:基于所述界面加载数据中的元素的层级属性确定所述元素对应的优先级参数;或者,基于所述界面加载数据中的元素占用的资源数量确定所述元素对应的优先级参数,资源占用数量小的元素的优先级参数高于资源占用数量大的元素的优先级参数;基于确定的所述多个元素的优先级参数对所述多个元素进行绘制。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。
上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元,即可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。
另外,在本发明各实施例中的各功能单元可以全部集成在一个处理单元中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
或者,本发明上述集成的单元如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、服务器、或者网络设备等)执行本发明各个实施例所述方法的全部或部分。而前述的存储介质包括:移动存储设备、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。

Claims (10)

  1. 一种界面处理方法,所述方法包括:
    接收界面加载请求;
    获取界面加载数据;
    基于预设规则绘制所述界面加载数据中包括的元素并统计绘制时长;
    当所述绘制时长达到预设阈值时,中止绘制,基于已绘制完成的元素加载显示界面。
  2. 根据权利要求1所述的方法,其中,所述基于预设规则绘制所述界面加载数据中包括的多个元素,包括:
    基于所述界面加载数据中包括的多个元素的优先级参数对所述多个元素进行绘制。
  3. 根据权利要求1所述的方法,其中,所述中止绘制,基于已绘制完成的元素加载显示界面,包括:
    中止绘制多个元素中未绘制完成的第一部分元素,基于绘制完成的第二部分元素加载显示第一界面。
  4. 根据权利要求3所述的方法,其中,所述方法还包括:所述第一界面加载显示完成后,继续绘制所述第一部分元素。
  5. 根据权利要求4所述的方法,其中,所述方法还包括:所述第一部分元素绘制完成后,基于所述第一部分元素和所述第二部分元素加载显示第二界面。
  6. 根据权利要求4所述的方法,其中,所述方法还包括:在所述第一部分元素绘制过程中,判断是否接收到界面跳转请求;
    在未接收到界面跳转请求时,继续绘制所述第一部分元素。
  7. 根据权利要求2所述的方法,其中,所述方法还包括:基于所述界面加载数据中的元素的层级属性确定所述元素对应的优先级参数;
    或者,基于所述界面加载数据中的元素占用的资源数量确定所述元素对应的优先级参数,资源占用数量小的元素的优先级参数高于资源占用数量大的元素的优先级参数。
  8. 一种界面处理装置,所述装置包括:获取单元、绘制单元和加载单元;其中,
    所述获取单元,配置为接收界面加载请求;还配置为获取界面加载数据;
    所述绘制单元,配置为基于预设规则绘制所述获取单元获得的所述界面加载数据中包括的元素并统计绘制时长;当所述绘制时长达到预设阈值时,中止绘制;
    所述加载单元,配置为基于所述绘制单元已绘制完成元素加载显示界面。
  9. 一种计算机存储介质,其上存储有计算机指令,该指令被处理器执行时实现权利要求1至7任一项所述的界面处理方法的步骤。
  10. 一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现权利要求1至7任一项所述的界面处理方法的步骤。
PCT/CN2017/100951 2017-09-07 2017-09-07 界面处理方法、装置、计算机存储介质及电子设备 WO2019047125A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2017/100951 WO2019047125A1 (zh) 2017-09-07 2017-09-07 界面处理方法、装置、计算机存储介质及电子设备
CN201780001919.4A CN107995977A (zh) 2017-09-07 2017-09-07 界面处理方法、装置、计算机存储介质及电子设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/100951 WO2019047125A1 (zh) 2017-09-07 2017-09-07 界面处理方法、装置、计算机存储介质及电子设备

Publications (1)

Publication Number Publication Date
WO2019047125A1 true WO2019047125A1 (zh) 2019-03-14

Family

ID=62039855

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/100951 WO2019047125A1 (zh) 2017-09-07 2017-09-07 界面处理方法、装置、计算机存储介质及电子设备

Country Status (2)

Country Link
CN (1) CN107995977A (zh)
WO (1) WO2019047125A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108762622B (zh) * 2018-06-04 2021-08-13 北京搜狐新动力信息技术有限公司 一种页面的切换显示方法及装置
CN109614525B (zh) * 2018-10-31 2023-05-05 深圳市元征科技股份有限公司 图像处理方法、装置、诊断设备及计算机可读存储介质
WO2020102956A1 (zh) * 2018-11-20 2020-05-28 深圳市欢太科技有限公司 界面显示方法、装置、计算机可存储介质和电子设备
CN109753328A (zh) * 2018-11-22 2019-05-14 广州市保伦电子有限公司 一种处理大批量终端展示的方法和存储介质
CN112925638B (zh) * 2021-02-04 2023-10-10 深圳市禅游科技股份有限公司 资源加载方法、装置、设备及计算机可读存储介质
CN113468455B (zh) * 2021-06-29 2023-06-30 网易(杭州)网络有限公司 用户选择行为获取方法、装置、客户端以及服务端设备

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103853729A (zh) * 2012-11-29 2014-06-11 腾讯科技(深圳)有限公司 页面加载方法及其系统
CN104216606A (zh) * 2013-06-05 2014-12-17 北京齐尔布莱特科技有限公司 基于安卓操作系统的WebView翻页特效方法
CN104951386A (zh) * 2014-03-28 2015-09-30 腾讯科技(深圳)有限公司 一种内容加载进度显示的方法和装置
CN105224163A (zh) * 2014-06-17 2016-01-06 北京新媒传信科技有限公司 界面显示方法和装置
CN106991016A (zh) * 2017-03-24 2017-07-28 北京金山安全软件有限公司 信息的显示方法、装置和电子设备
CN107102846A (zh) * 2016-02-19 2017-08-29 青岛海信移动通信技术股份有限公司 一种应用程序界面显示方法及终端

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101996073B (zh) * 2009-08-31 2014-02-05 阿里巴巴集团控股有限公司 一种组件渲染方法及装置
US20130232424A1 (en) * 2012-03-02 2013-09-05 Hitachi, Ltd. User operation detection system and user operation detection method
CN102902576B (zh) * 2012-09-26 2014-12-24 北京奇虎科技有限公司 一种渲染网页的方法、服务器和系统
CN105573767A (zh) * 2014-10-10 2016-05-11 惠州市德赛西威汽车电子股份有限公司 一种车载娱乐系统中界面图片加载方法
CN106155602A (zh) * 2015-03-24 2016-11-23 阿里巴巴集团控股有限公司 一种页面模块的渲染方法、装置以及显示设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103853729A (zh) * 2012-11-29 2014-06-11 腾讯科技(深圳)有限公司 页面加载方法及其系统
CN104216606A (zh) * 2013-06-05 2014-12-17 北京齐尔布莱特科技有限公司 基于安卓操作系统的WebView翻页特效方法
CN104951386A (zh) * 2014-03-28 2015-09-30 腾讯科技(深圳)有限公司 一种内容加载进度显示的方法和装置
CN105224163A (zh) * 2014-06-17 2016-01-06 北京新媒传信科技有限公司 界面显示方法和装置
CN107102846A (zh) * 2016-02-19 2017-08-29 青岛海信移动通信技术股份有限公司 一种应用程序界面显示方法及终端
CN106991016A (zh) * 2017-03-24 2017-07-28 北京金山安全软件有限公司 信息的显示方法、装置和电子设备

Also Published As

Publication number Publication date
CN107995977A (zh) 2018-05-04

Similar Documents

Publication Publication Date Title
WO2019047125A1 (zh) 界面处理方法、装置、计算机存储介质及电子设备
US10007360B1 (en) User terminal device and method for controlling the user terminal device thereof
US10790058B2 (en) User installed applications in a physiological parameter display device
US10936340B2 (en) Apparatus and method for performing selective application preloading in electronic device
KR102430941B1 (ko) 생체 상태 정보 제공 방법 및 이를 지원하는 전자 장치
US20200364085A1 (en) Task scheduling based on performance control conditions for multiple processing units
KR101932395B1 (ko) 전자 디바이스들 사이의 액티비티 계속
KR102309175B1 (ko) 스크랩 정보를 제공하는 전자 장치 및 그 제공 방법
WO2018082412A1 (zh) 电子设备控制方法、装置及电子设备
US10795720B2 (en) Electronic device for controlling application and operation method thereof
KR20180127695A (ko) 저장 공간 확보를 위한 장치 및 그에 관한 방법
US20200004496A1 (en) Method and apparatus for streaming audio by using wireless link
KR102464280B1 (ko) 입력 처리 방법 및 장치
US20190056907A1 (en) Electronic device, sound output system and electronic device control method for sound output system
US20180329607A1 (en) Electronic device and method for providing object recommendation
WO2019007248A1 (zh) 一种推荐方法、装置、设备和存储介质
US20170046041A1 (en) Electronic device and method for controlling input in electronic device
WO2023061358A1 (zh) 缓存方法、装置和电子设备
KR20180019907A (ko) 전자 장치 및 그의 운용 제공 방법
KR20170036300A (ko) 동영상 제공 방법 및 이를 수행하는 전자 장치
US20160077790A1 (en) Audio data operating method and electronic device supporting the same
US10482237B2 (en) Method for processing security of application and electronic device supporting the same
KR102312672B1 (ko) 데이터 처리 방법 및 전자 장치
US10810058B2 (en) Method for providing content to user according to user's preference and electronic device therefor
CN108089781B (zh) 界面展示方法和装置

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: 17924533

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 09/09/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 17924533

Country of ref document: EP

Kind code of ref document: A1