CN109669752A - A kind of interface method for drafting, device and mobile terminal - Google Patents

A kind of interface method for drafting, device and mobile terminal Download PDF

Info

Publication number
CN109669752A
CN109669752A CN201811555800.4A CN201811555800A CN109669752A CN 109669752 A CN109669752 A CN 109669752A CN 201811555800 A CN201811555800 A CN 201811555800A CN 109669752 A CN109669752 A CN 109669752A
Authority
CN
China
Prior art keywords
task
interface
drafting
view unit
thread
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811555800.4A
Other languages
Chinese (zh)
Inventor
邓生金
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
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 Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN201811555800.4A priority Critical patent/CN109669752A/en
Publication of CN109669752A publication Critical patent/CN109669752A/en
Pending legal-status Critical Current

Links

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
    • 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5018Thread allocation

Abstract

The disclosure is directed to a kind of interface method for drafting, device and mobile terminals, are related to computer application field, wherein the above method includes: that preprocessing tasks before the drafting for constituting the view unit at interface to be drawn are distributed to sub thread by main thread;Sub thread is called to execute being assigned to for task according to the first hierarchic sequence;After monitoring that sub thread completes being assigned to for task, the drafting task of view unit is executed according to the first hierarchic sequence, and then completes the drafting at interface to be drawn.When drawing interface using scheme provided in an embodiment of the present invention, the role pressure of main thread can be reduced, alleviates user interface and the case where Caton occurs.

Description

A kind of interface method for drafting, device and mobile terminal
Technical field
This disclosure relates to computer application field more particularly to a kind of interface method for drafting, device and mobile terminal.
Background technique
With flourishing for Internet industry, the function of application program is more and more, the UI (User's of application program Interface, user interface) it is also increasingly exquisiter.Corresponding, the algorithm of application program becomes increasingly complex, occupied Calculation resources are also more and more.In calculation resources anxiety, easily leads to when drawing UI and frame losing occur, so as to cause FPS (Frames Per Second, drafting frame number per second) decline, so that situations such as UI of application program will appear Caton.
Summary of the invention
To alleviate the problem of UI of application program in the related technology will appear Caton, the disclosure provides a kind of interface drafting side Method, device and mobile terminal.
According to the first aspect of the embodiments of the present disclosure, a kind of interface method for drafting is provided, comprising:
Preprocessing tasks before the drafting for constituting the view unit at interface to be drawn are distributed to sub thread by main thread, wherein The view unit are as follows: sets of views or view;
The sub thread is called to execute being assigned to for task according to the first hierarchic sequence, wherein first hierarchic sequence Are as follows: constitute the hierarchic sequence between the view unit at the interface to be drawn;
After monitoring that the sub thread completes being assigned to for task, the view is executed according to first hierarchic sequence The drafting task of unit.
In a kind of implementation of the embodiment of the present disclosure, the main thread is drawn the view unit for constituting interface to be drawn Preprocessing tasks distribute to sub thread before making, comprising:
Main thread will be pre-processed according to the preset task method of salary distribution before the drafting for constituting the view unit at interface to be drawn Task distributes to sub thread, wherein the task method of salary distribution are as follows: by each father's hierarchical view unit and father's hierarchical view Preprocessing tasks distribute to same sub thread before the drafting of the child level view unit of unit.
In a kind of implementation of the embodiment of the present disclosure, preprocessing tasks before the drafting are as follows: measurement task and layout are appointed Business;
The task method of salary distribution are as follows: regard the child level of each father's hierarchical view unit and father's hierarchical view unit The measurement task of figure unit distributes to same sub thread, by each father's hierarchical view unit and the son of father's hierarchical view unit The layout task of hierarchical view unit distributes to same sub thread.
In a kind of implementation of the embodiment of the present disclosure, the main thread are as follows: for drawing the thread of user interface UI.
According to the second aspect of an embodiment of the present disclosure, a kind of interface drawing apparatus is provided, comprising:
Allocation unit is configured as: main thread will constitute preprocessing tasks before the drafting of the view unit at interface to be drawn Distribute to sub thread, wherein the view unit are as follows: sets of views or view;
Call unit is configured as: call the sub thread to execute being assigned to for task according to the first hierarchic sequence, In, first hierarchic sequence are as follows: constitute the hierarchic sequence between the view unit at the interface to be drawn;
Drawing unit is configured as: after monitoring that the sub thread completes being assigned to for task, according to the first layer Grade sequence executes the drafting task of the view unit, and then completes the drafting at the interface to be drawn.
In a kind of implementation of the embodiment of the present disclosure, the allocation unit is specifically configured to:
It is pre- before the drafting for the view unit that the main thread will constitute interface to be drawn according to the preset task method of salary distribution Processing task distributes to sub thread, wherein the task method of salary distribution are as follows: by each father's hierarchical view unit and father's level Preprocessing tasks distribute to same sub thread before the drafting of the child level view unit of view unit.
In a kind of implementation of the embodiment of the present disclosure, preprocessing tasks before the drafting are as follows: measurement task and layout are appointed Business;
The task method of salary distribution are as follows: regard the child level of each father's hierarchical view unit and father's hierarchical view unit The measurement task of figure unit distributes to same sub thread, by each father's hierarchical view unit and the son of father's hierarchical view unit The layout task of hierarchical view unit distributes to same sub thread.
In a kind of implementation of the embodiment of the present disclosure, the main thread are as follows: for drawing the thread of user interface UI.
According to the third aspect of an embodiment of the present disclosure, a kind of mobile terminal is provided, comprising:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to: when for executing the instruction stored on the memory, realize it is any of the above-described The step of described interface method for drafting.
According to a fourth aspect of embodiments of the present disclosure, a kind of non-transitorycomputer readable storage medium is provided, when described When instruction in storage medium is executed by the processor of mobile terminal, so that mobile terminal is able to carry out any of the above-described boundary The step of iso-surface patch method.
According to a fifth aspect of the embodiments of the present disclosure, a kind of application program/computer program product is provided, when it is being calculated When being run on machine, so that computer executes any of the above-described interface method for drafting.
The technical scheme provided by this disclosed embodiment can include the following benefits: constitute the view at interface to be drawn Preprocessing tasks before the drafting of unit are assigned to sub thread by main thread and execute, so that by leading in drawing interface process Thread and sub thread cooperation are completed interface and are drawn.In this way calculation resources anxiety in the case where, for draw interface won compared with There is Caton so as to mitigate the degree of FPS decline so as to which the user interface of application program is effectively relieved in more resources The case where.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not The disclosure can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention Example, and be used to explain the principle of the present invention together with specification.
Fig. 1 is a kind of flow chart of interface method for drafting shown according to an exemplary embodiment.
Fig. 2 is a kind of view unit hierarchical structure schematic diagram at interface shown according to an exemplary embodiment.
Fig. 3 a is the view unit hierarchical structure schematic diagram at another interface shown according to an exemplary embodiment.
Fig. 3 b is another flow chart of interface method for drafting shown according to an exemplary embodiment.
Fig. 4 is a kind of block diagram of interface drawing apparatus shown according to an exemplary embodiment.
Fig. 5 is a kind of block diagram of device shown according to an exemplary embodiment.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all embodiments consistented with the present invention.On the contrary, they be only with it is such as appended The example of device and method being described in detail in claims, some aspects of the invention are consistent.
Fig. 1 is a kind of flow chart of interface method for drafting shown according to an exemplary embodiment, as shown in Figure 1, interface Method for drafting is for including the following steps in terminal.
Step S101: preprocessing tasks before the drafting for constituting the view unit at interface to be drawn are distributed to sub-line by main thread Journey.
Above-mentioned view unit are as follows: ViewGroup (sets of views) or View (view).Interface is by ViewGroup or View structure At.For example, ImageView (picture component), the TextView (text component) etc. on interface belong to View, on interface RelativeLayout (relative placement), LinearLayout (linear placement) etc. belong to ViewGroup.
Preprocessing tasks and drafting task before the drafting for the view unit that drafting interface needs completion to constitute interface to be drawn, Wherein, preprocessing tasks may include: measurement task and layout task before drawing.For same view unit, need first to complete Measurement task can just execute layout task, need first to complete layout task, can just execute drafting task.
Main thread: as soon as when application program launching, there is a thread that can run at once, the thread i.e. application program Main thread.
Because main thread is that application program is carried out when starting, if creating thread again, the thread created is just It is the sub thread of this main thread.
In this step S101, preprocessing tasks before the drafting for the view unit that main thread can will constitute interface to be drawn One or more sub threads are distributed to, sub thread and main thread can carry out interface drafting in a manner of multithreading asynchronous process. Above-mentioned task can be distributed to each sub thread to draw the separated mode of preceding preprocessing tasks by main thread;Main thread can incite somebody to action Above-mentioned view unit classification, according to the classification of view unit, such as sets of views or view, distributes to each sub-line for above-mentioned task Journey;Main thread can be according to the hierarchical relationship of above-mentioned view unit, by drawing for each view unit with upper and lower hierarchical relationship Preprocessing tasks are assigned in same sub thread before making;Certainly, main thread can be fully allocated to a sub-line with above-mentioned task Journey.
Step S102: sub thread is called to execute being assigned to for task according to the first hierarchic sequence.
Above-mentioned first hierarchic sequence are as follows: constitute the hierarchic sequence between the view unit at interface to be drawn.Fig. 2 is according to one A kind of view unit hierarchical structure schematic diagram at interface shown in exemplary embodiment.As shown in Fig. 2, each in Fig. 2 ViewGroup and View is view unit, wherein father's layer that ViewGroup1 is ViewGroup1.1 and ViewGroup1.2 Grade, ViewGroup1.1 are father's level of View1 and View2.ViewGroup1, ViewGroup2 and ViewGroup3 are same The view unit of level;ViewGroup1.1, ViewGroup1.2 ..., ViewGroup3.2 be same level view list Member;View1, View2 ..., View12 be same level view unit.
First hierarchic sequence can be the sequence of each view unit of breadth first traversal, or depth-first traversal The sequence of each view unit particularly can use the view for constituting interface to be drawn of On Binary Tree Representation for shown in Fig. 2 Hierarchical relationship between unit, the sequence of each view unit of depth-first traversal can also be preorder traversal sequence.
If the first hierarchic sequence be each view unit of breadth first traversal sequence, for it is shown in Fig. 2 to Draw interface, the first hierarchic sequence are as follows: ViewGroup1 → ViewGroup2 → ViewGroup3 → ViewGroup1.1 → ViewGroup1.2→ViewGroup2.1→……→View8→View9→View10→View11→View12。
If the first hierarchic sequence is preorder traversal sequence, for interface to be drawn shown in Fig. 2, the first level is suitable Sequence are as follows: ViewGroup1 → ViewGroup1.1 → View1 → View2 → ViewGroup1.2 → View3 → View4 →... ... →ViewGroup3.2→View11→View12。
Since preprocessing tasks include measurement task and layout task before the drafting that sub thread is assigned to, in the first level It, can be using the execution measurement task of each view unit and layout task as a sequence element, according to above-mentioned in sequence The sequence of view unit is ranked up.Can also by the measurement task of same view unit and layout task separate and respectively according to The sequence of above-mentioned view unit is ranked up.
It should be understood that the sub thread in this step S102 can be a sub thread, or multiple and different Sub thread.If multiple and different sub threads executes being assigned to for task according to the first hierarchic sequence, when two of them sub thread Between pending task without upper and lower hierarchical relationship when, above-mentioned two sub thread may be performed simultaneously above-mentioned task.
For a view unit, when executing the layout task of the view unit, need to obtain execution view unit survey The data of the obtained view unit of amount task, so, if the measurement task of a view unit and layout task are no longer It is executed in the same sub thread, then the sub thread for executing the view unit measurement task can be by the obtained view unit Data be sent to need to be implemented the view unit layout task sub thread.
Step S103: after monitoring that sub thread completes being assigned to for task, view list is executed according to the first hierarchic sequence The drafting task of member, and then complete the drafting at interface to be drawn.
For a view unit, when executing the drafting task of the view unit, need to obtain the execution view unit cloth The data of office's obtained view unit of task.Sub thread, can will be obtained after having executed the layout task being assigned to The data of view unit are sent to main thread.
In a kind of implementation, sub thread can be after the completing to be assigned to of the task, and sending to main thread indicates to complete point It is fitted on the signal of task, main thread obtains above-mentioned signal and determines that sub thread has completed being assigned to for task.Another kind is realized In mode, main thread can monitor the Task Progress of sub thread, after sub thread completes being assigned to of the task, main thread by pair The monitoring of sub thread determines the task that sub thread has been completed to be assigned to.
The technical scheme provided by this disclosed embodiment can include the following benefits: constitute the view at interface to be drawn Preprocessing tasks before the drafting of unit are assigned to sub thread by main thread and execute, so that by leading in drawing interface process Thread and sub thread cooperation are completed interface and are drawn.In this way calculation resources anxiety in the case where, for draw interface won compared with There is Caton so as to mitigate the degree of FPS decline so as to which the user interface of application program is effectively relieved in more resources The case where.
In a kind of implementation of the invention, main thread will constitute the view unit at interface to be drawn in above-mentioned steps S101 Drafting before preprocessing tasks when distributing to sub thread, can be distributed according to the preset task method of salary distribution.
The above-mentioned task method of salary distribution are as follows: regard the child level of each father's hierarchical view unit and father's hierarchical view unit Preprocessing tasks distribute to same sub thread before the drafting of figure unit.Therefore, with each view unit of upper and lower hierarchical relationship It can be assigned in same sub thread.By taking Fig. 2 as an example, view unit ViewGroup1, ViewGroup1.1 in Fig. 2, Preprocessing tasks can be assigned to same sub thread before the drafting of ViewGroup1.2, View1 and View2.
It, will tool because sub thread needs to execute being assigned to for task according to the first hierarchic sequence in this implementation There is each view unit of upper and lower hierarchical relationship to be assigned in same sub thread, facilitates each sub thread to be performed simultaneously and be assigned to Task can save the time required for interface is drawn, and promote the efficiency that interface is drawn.
Based on above-mentioned implementation, in another implementation of the invention, preprocessing tasks before above-mentioned drafting are as follows: measurement Task and layout task, and the above-mentioned task method of salary distribution are as follows: by each father's hierarchical view unit and father's hierarchical view list The measurement task of the child level view unit of member distributes to same sub thread, by each father's hierarchical view unit and father's level The layout task of the child level view unit of view unit distributes to same sub thread.
In a kind of implementation of the invention, above-mentioned main thread are as follows: for drawing the thread of user interface UI.
Fig. 3 a is the view unit hierarchical structure schematic diagram at another interface shown according to an exemplary embodiment.Such as figure Shown in 3a, interface to be drawn is made of 3 view units ViewGroup1, View1 and View2, ViewGroup1 be View1 and Father's hierarchical view unit of View2.
Fig. 3 b is another flow chart of interface method for drafting shown according to an exemplary embodiment, drawn interface View unit structure is as shown in Figure 3a, and interface method for drafting is used in terminal, including main thread, sub thread 1 and sub thread 2 three Executing subject.Interface method for drafting shown in the present exemplary embodiment includes the following steps of main thread:
Step S3101: pretreatment.
Preprocessing process may include: calling and run ViewRootImpl.performTraversals () function, tune With and run ViewRootImpl.performMeasure () function and and run ViewRootImpl.performLayout () function.
Step S3102: sub thread 1 is assigned the task to.
The distributing to sub thread 1 of the task can be with are as follows: measurement task, the measurement task of View1, View2 of ViewGroup1 Measurement task.
Step S3103: sub thread 2 is assigned the task to.
The distributing to sub thread 2 of the task can be with are as follows: layout task, the layout task of View1, View2 of ViewGroup1 Layout task.
Step S3104: the drafting task of ViewGroup1, View1 and View2 are executed.
After completing being assigned to for task to sub thread, main thread executes the drafting task of view unit.A kind of realization side In formula, main thread first calls before the drafting task for executing view unit and runs ViewRootImpl.performdraw () function.
Interface method for drafting shown in the present exemplary embodiment includes the following steps of sub thread 1:
Step S3201: the measurement task of ViewGroup1 is executed.
Step S3202: the data of ViewGroup1 are sent to sub thread 2.
Step S3203: the measurement task of View1 is executed.
Step S3204: the data of View1 are sent to sub thread 2.
Step S3205: the measurement task of View2 is executed.
Step S3206: the data of View2 are sent to sub thread 2.
Step S3207: the completed signal of task is sent to main thread.
Interface method for drafting shown in the present exemplary embodiment includes the following steps of sub thread 2:
Step S3301: the layout task of ViewGroup1 is executed.
Step S3302: the layout task of View1 is executed.
Step S3303: the layout task of View2 is executed.
Step S3304: the number of task completed signal and ViewGroup1, View1 and View2 is sent to main thread According to.
Fig. 4 is a kind of interface drawing apparatus block diagram shown according to an exemplary embodiment.Referring to Fig. 4, which includes: Allocation unit 401, call unit 402 and drawing unit 403.
The allocation unit 401, is configured as: main thread will pre-process before the drafting for constituting the view unit at interface to be drawn Task distributes to sub thread, wherein the view unit are as follows: sets of views or view.
The call unit 402, is configured as: the sub thread being called to execute times being assigned to according to the first hierarchic sequence Business, wherein first hierarchic sequence are as follows: constitute the hierarchic sequence between the view unit at the interface to be drawn.
The drawing unit 403, is configured as: after monitoring that the sub thread completes being assigned to for task, according to described First hierarchic sequence executes the drafting task of the view unit, and then completes the drafting at the interface to be drawn.
The technical scheme provided by this disclosed embodiment can include the following benefits: constitute the view at interface to be drawn Preprocessing tasks before the drafting of unit are assigned to sub thread by main thread and execute, so that by leading in drawing interface process Thread and sub thread cooperation are completed interface and are drawn.In this way calculation resources anxiety in the case where, for draw interface won compared with There is Caton so as to mitigate the degree of FPS decline so as to which the user interface of application program is effectively relieved in more resources The case where.
In a kind of implementation of the invention, the allocation unit 401 is specifically configured to:
It is pre- before the drafting for the view unit that the main thread will constitute interface to be drawn according to the preset task method of salary distribution Processing task distributes to sub thread, wherein the task method of salary distribution are as follows: by each father's hierarchical view unit and father's level Preprocessing tasks distribute to same sub thread before the drafting of the child level view unit of view unit.
It, will tool because sub thread needs to execute being assigned to for task according to the first hierarchic sequence in this implementation There is each view unit of upper and lower hierarchical relationship to be assigned in same sub thread, facilitates each sub thread to be performed simultaneously and be assigned to Task can save the time required for interface is drawn, and promote the efficiency that interface is drawn.
Based on above-mentioned implementation, in another implementation of the invention, preprocessing tasks before the drafting are as follows: measurement Task and layout task;The task method of salary distribution are as follows: by each father's hierarchical view unit and father's hierarchical view unit The measurement task of child level view unit distributes to same sub thread, by each father's hierarchical view unit and father's hierarchical view The layout task of the child level view unit of unit distributes to same sub thread.
In a kind of implementation of the invention, the main thread are as follows: for drawing the thread of user interface UI.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method Embodiment in be described in detail, no detailed explanation will be given here.
Based on the same inventive concept, the interface method for drafting provided according to that above embodiment of the present invention, correspondingly, the present invention Embodiment additionally provides a kind of mobile terminal, including processor, communication interface, memory and communication bus, wherein processor, Communication interface and memory complete mutual communication by communication bus,
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes any interface drafting side in above-described embodiment The step of method.
The communication bus that above-mentioned electronic equipment is mentioned can be Peripheral Component Interconnect standard (Peripheral Component Interconnect, PCI) bus or expanding the industrial standard structure (Extended Industry Standard Architecture, EISA) bus etc..The communication bus can be divided into address bus, data/address bus, control bus etc..For just It is only indicated with a thick line in expression, figure, it is not intended that an only bus or a type of bus.
Communication interface is for the communication between above-mentioned electronic equipment and other equipment.
Memory may include random access memory (Random Access Memory, RAM), also may include non-easy The property lost memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally, memory may be used also To be storage device that at least one is located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit, CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal Processing, DSP), it is specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing It is field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete Door or transistor logic, discrete hardware components.
The technical scheme provided by this disclosed embodiment can include the following benefits: constitute the view at interface to be drawn Preprocessing tasks before the drafting of unit are assigned to sub thread by main thread and execute, so that by leading in drawing interface process Thread and sub thread cooperation are completed interface and are drawn.In this way calculation resources anxiety in the case where, for draw interface won compared with There is Caton so as to mitigate the degree of FPS decline so as to which the user interface of application program is effectively relieved in more resources The case where.
Fig. 5 is a kind of block diagram of device 500 drawn for interface shown according to an exemplary embodiment.For example, dress Setting 500 can be mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical treatment Equipment, body-building equipment, personal digital assistant etc..
Referring to Fig. 5, device 500 may include following one or more components: processing component 502, memory 504, electric power Component 506, multimedia component 508, audio component 510, the interface 512 of input/output (I/O), sensor module 514, and Communication component 516.
The integrated operation of the usual control device 500 of processing component 502, such as with display, telephone call, data communication, phase Machine operation and record operate associated operation.Processing component 502 may include that one or more processors 520 refer to execute It enables, to perform all or part of the steps of the methods described above.In addition, processing component 502 may include one or more modules, just Interaction between processing component 502 and other assemblies.For example, processing component 502 may include multi-media module, it is more to facilitate Interaction between media component 508 and processing component 502.
Memory 504 is configured as storing various types of data to support the operation in equipment 500.These data are shown Example includes the instruction of any application or method for operating on device 500, contact data, and telephone book data disappears Breath, picture, video etc..Memory 504 can be by any kind of volatibility or non-volatile memory device or their group It closes and realizes, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasable to compile Journey read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash Device, disk or CD.
Power supply module 506 provides electric power for the various assemblies of device 500.Power supply module 506 may include power management system System, one or more power supplys and other with for device 500 generate, manage, and distribute the associated component of electric power.
Multimedia component 508 includes the screen of one output interface of offer between described device 500 and user.One In a little embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen Curtain may be implemented as touch screen, to receive input signal from the user.Touch panel includes one or more touch sensings Device is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or sliding action Boundary, but also detect duration and pressure associated with the touch or slide operation.In some embodiments, more matchmakers Body component 508 includes a front camera and/or rear camera.When equipment 500 is in operation mode, such as screening-mode or When video mode, front camera and/or rear camera can receive external multi-medium data.Each front camera and Rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 510 is configured as output and/or input audio signal.For example, audio component 510 includes a Mike Wind (MIC), when device 500 is in operation mode, when such as call mode, recording mode, and voice recognition mode, microphone is matched It is set to reception external audio signal.The received audio signal can be further stored in memory 504 or via communication set Part 516 is sent.In some embodiments, audio component 510 further includes a loudspeaker, is used for output audio signal.
I/O interface 512 provides interface between processing component 502 and peripheral interface module, and above-mentioned peripheral interface module can To be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and lock Determine button.
Sensor module 514 includes one or more sensors, and the state for providing various aspects for device 500 is commented Estimate.For example, sensor module 514 can detecte the state that opens/closes of equipment 500, and the relative positioning of component, for example, it is described Component is the display and keypad of device 500, and sensor module 514 can be with 500 1 components of detection device 500 or device Position change, the existence or non-existence that user contacts with device 500,500 orientation of device or acceleration/deceleration and device 500 Temperature change.Sensor module 514 may include proximity sensor, be configured to detect without any physical contact Presence of nearby objects.Sensor module 514 can also include optical sensor, such as CMOS or ccd image sensor, at As being used in application.In some embodiments, which can also include acceleration transducer, gyro sensors Device, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 516 is configured to facilitate the communication of wired or wireless way between device 500 and other equipment.Device 500 can access the wireless network based on communication standard, such as WiFi, carrier network (such as 2G, 3G, 4G or 5G) or them Combination.In one exemplary embodiment, communication component 516 is received via broadcast channel from the wide of external broadcasting management system Broadcast signal or broadcast related information.In one exemplary embodiment, the communication component 516 further includes near-field communication (NFC) Module, to promote short range communication.For example, radio frequency identification (RFID) technology, Infrared Data Association (IrDA) can be based in NFC module Technology, ultra wide band (UWB) technology, bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 500 can be believed by one or more application specific integrated circuit (ASIC), number Number processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing the above method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction is additionally provided, when When instruction in the storage medium is executed by the processor of mobile terminal, appoint so that mobile terminal is able to carry out in above-described embodiment The step of one interface method for drafting.Memory 504 for example including instruction, above-metioned instruction can be held by the processor 520 of device 500 Row is to complete the above method.For example, the non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and optical data storage devices etc..
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to of the invention its Its embodiment.This application is intended to cover any variations, uses, or adaptations of the invention, these modifications, purposes or Person's adaptive change follows general principle of the invention and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by following Claim is pointed out.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is limited only by the attached claims.

Claims (10)

1. a kind of interface method for drafting characterized by comprising
Preprocessing tasks before the drafting for constituting the view unit at interface to be drawn are distributed to sub thread by main thread, wherein described View unit are as follows: sets of views or view;
The sub thread is called to execute being assigned to for task according to the first hierarchic sequence, wherein first hierarchic sequence are as follows: structure At the hierarchic sequence between the view unit at the interface to be drawn;
After monitoring that the sub thread completes being assigned to for task, the view unit is executed according to first hierarchic sequence Drafting task.
2. interface method for drafting according to claim 1, which is characterized in that the main thread will constitute interface to be drawn Preprocessing tasks distribute to sub thread before the drafting of view unit, comprising:
Preprocessing tasks before the drafting for the view unit that main thread will constitute interface to be drawn according to the preset task method of salary distribution Distribute to sub thread, wherein the task method of salary distribution are as follows: by each father's hierarchical view unit and father's hierarchical view unit Child level view unit drafting before preprocessing tasks distribute to same sub thread.
3. interface method for drafting according to claim 2, which is characterized in that
Preprocessing tasks before the drafting are as follows: measurement task and layout task;
The task method of salary distribution are as follows: by each father's hierarchical view unit and the child level view list of father's hierarchical view unit The measurement task of member distributes to same sub thread, by the child level of each father's hierarchical view unit and father's hierarchical view unit The layout task of view unit distributes to same sub thread.
4. interface method for drafting according to any one of claim 1-3, which is characterized in that
The main thread are as follows: for drawing the thread of user interface UI.
5. a kind of interface drawing apparatus characterized by comprising
Allocation unit is configured as: preprocessing tasks are distributed before main thread will constitute the drafting of the view unit at interface to be drawn To sub thread, wherein the view unit are as follows: sets of views or view;
Call unit is configured as: calling the sub thread to execute being assigned to for task according to the first hierarchic sequence, wherein institute State the first hierarchic sequence are as follows: constitute the hierarchic sequence between the view unit at the interface to be drawn;
Drawing unit is configured as: suitable according to first level after monitoring that the sub thread completes being assigned to for task Sequence executes the drafting task of the view unit, and then completes the drafting at the interface to be drawn.
6. interface drawing apparatus according to claim 5, which is characterized in that the allocation unit is specifically configured to:
The main thread will be pre-processed according to the preset task method of salary distribution before the drafting for constituting the view unit at interface to be drawn Task distributes to sub thread, wherein the task method of salary distribution are as follows: by each father's hierarchical view unit and father's hierarchical view Preprocessing tasks distribute to same sub thread before the drafting of the child level view unit of unit.
7. interface drawing apparatus according to claim 6, which is characterized in that
Preprocessing tasks before the drafting are as follows: measurement task and layout task;
The task method of salary distribution are as follows: by each father's hierarchical view unit and the child level view list of father's hierarchical view unit The measurement task of member distributes to same sub thread, by the child level of each father's hierarchical view unit and father's hierarchical view unit The layout task of view unit distributes to same sub thread.
8. the interface drawing apparatus according to any one of claim 5-7, which is characterized in that
The main thread are as follows: for drawing the thread of user interface UI.
9. a kind of mobile terminal characterized by comprising
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to: when for executing the instruction stored on the memory, realize claim 1-4 In any method and step.
10. a kind of non-transitorycomputer readable storage medium, when the instruction in the storage medium is by the processing of mobile terminal When device executes, so that mobile terminal is able to carry out any method and step in claim 1-4.
CN201811555800.4A 2018-12-19 2018-12-19 A kind of interface method for drafting, device and mobile terminal Pending CN109669752A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811555800.4A CN109669752A (en) 2018-12-19 2018-12-19 A kind of interface method for drafting, device and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811555800.4A CN109669752A (en) 2018-12-19 2018-12-19 A kind of interface method for drafting, device and mobile terminal

Publications (1)

Publication Number Publication Date
CN109669752A true CN109669752A (en) 2019-04-23

Family

ID=66144978

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811555800.4A Pending CN109669752A (en) 2018-12-19 2018-12-19 A kind of interface method for drafting, device and mobile terminal

Country Status (1)

Country Link
CN (1) CN109669752A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110187985A (en) * 2019-05-30 2019-08-30 苏州浪潮智能科技有限公司 A kind of communication means, system and device
CN110502294A (en) * 2019-07-20 2019-11-26 华为技术有限公司 The method, apparatus and electronic equipment of data processing
CN110569118A (en) * 2019-08-29 2019-12-13 贝壳技术有限公司 Task scheduling method and device, electronic equipment and storage medium
CN111026541A (en) * 2019-05-22 2020-04-17 珠海随变科技有限公司 Rendering resource scheduling method, device, equipment and storage medium
CN111190590A (en) * 2020-01-07 2020-05-22 广州虎牙科技有限公司 Catton optimization method, device, terminal and computer readable storage medium
WO2021036735A1 (en) * 2019-08-23 2021-03-04 华为技术有限公司 User interface display method and electronic device
CN112540810A (en) * 2020-12-09 2021-03-23 竞技世界(北京)网络技术有限公司 Drawing method, drawing device, drawing equipment and computer readable storage medium
CN113326115A (en) * 2021-06-21 2021-08-31 上海华客信息科技有限公司 Rendering method and system of multi-chart page, electronic device and storage medium
CN115549811A (en) * 2021-06-30 2022-12-30 深圳市瑞图生物技术有限公司 Time sequence control method and device, dry chemical scanning equipment and storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105183547A (en) * 2015-08-13 2015-12-23 青岛海信移动通信技术股份有限公司 Task scheduling method and device of user interface
CN105549820A (en) * 2015-12-11 2016-05-04 魅族科技(中国)有限公司 Graphic user interface display method and terminal
CN105872679A (en) * 2015-12-31 2016-08-17 乐视网信息技术(北京)股份有限公司 Barrage display method and device
CN105957121A (en) * 2016-06-29 2016-09-21 努比亚技术有限公司 Animation display system and display method in application
CN107040818A (en) * 2017-03-31 2017-08-11 武汉斗鱼网络科技有限公司 Layout analytic hierarchy process method and system for Android TV
CN107122176A (en) * 2017-03-31 2017-09-01 武汉斗鱼网络科技有限公司 A kind of pattern drawing method and device
CN107656759A (en) * 2017-09-04 2018-02-02 口碑(上海)信息技术有限公司 A kind of rendering intent and device for user interface
CN107729094A (en) * 2017-08-29 2018-02-23 口碑(上海)信息技术有限公司 The method and device that a kind of user interface renders
CN108595236A (en) * 2018-03-27 2018-09-28 五八有限公司 A kind of method and device for preventing sub-line journey from carrying out operating user interface
CN108733445A (en) * 2018-05-17 2018-11-02 北京五八信息技术有限公司 A kind of view management method, device, equipment and computer readable storage medium
CN108762881A (en) * 2018-06-21 2018-11-06 广州酷狗计算机科技有限公司 Interface method for drafting, device, terminal and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105183547A (en) * 2015-08-13 2015-12-23 青岛海信移动通信技术股份有限公司 Task scheduling method and device of user interface
CN105549820A (en) * 2015-12-11 2016-05-04 魅族科技(中国)有限公司 Graphic user interface display method and terminal
CN105872679A (en) * 2015-12-31 2016-08-17 乐视网信息技术(北京)股份有限公司 Barrage display method and device
CN105957121A (en) * 2016-06-29 2016-09-21 努比亚技术有限公司 Animation display system and display method in application
CN107040818A (en) * 2017-03-31 2017-08-11 武汉斗鱼网络科技有限公司 Layout analytic hierarchy process method and system for Android TV
CN107122176A (en) * 2017-03-31 2017-09-01 武汉斗鱼网络科技有限公司 A kind of pattern drawing method and device
CN107729094A (en) * 2017-08-29 2018-02-23 口碑(上海)信息技术有限公司 The method and device that a kind of user interface renders
CN107656759A (en) * 2017-09-04 2018-02-02 口碑(上海)信息技术有限公司 A kind of rendering intent and device for user interface
CN108595236A (en) * 2018-03-27 2018-09-28 五八有限公司 A kind of method and device for preventing sub-line journey from carrying out operating user interface
CN108733445A (en) * 2018-05-17 2018-11-02 北京五八信息技术有限公司 A kind of view management method, device, equipment and computer readable storage medium
CN108762881A (en) * 2018-06-21 2018-11-06 广州酷狗计算机科技有限公司 Interface method for drafting, device, terminal and storage medium

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111026541A (en) * 2019-05-22 2020-04-17 珠海随变科技有限公司 Rendering resource scheduling method, device, equipment and storage medium
CN111026541B (en) * 2019-05-22 2020-09-29 珠海随变科技有限公司 Rendering resource scheduling method, device, equipment and storage medium
CN110187985A (en) * 2019-05-30 2019-08-30 苏州浪潮智能科技有限公司 A kind of communication means, system and device
WO2021013055A1 (en) * 2019-07-20 2021-01-28 华为技术有限公司 Data processing method and apparatus, and electronic device
CN110502294A (en) * 2019-07-20 2019-11-26 华为技术有限公司 The method, apparatus and electronic equipment of data processing
CN110502294B (en) * 2019-07-20 2021-08-20 华为技术有限公司 Data processing method and device and electronic equipment
WO2021036735A1 (en) * 2019-08-23 2021-03-04 华为技术有限公司 User interface display method and electronic device
CN110569118A (en) * 2019-08-29 2019-12-13 贝壳技术有限公司 Task scheduling method and device, electronic equipment and storage medium
CN111190590A (en) * 2020-01-07 2020-05-22 广州虎牙科技有限公司 Catton optimization method, device, terminal and computer readable storage medium
CN111190590B (en) * 2020-01-07 2024-03-15 广州虎牙科技有限公司 Katon optimization method, device, terminal and computer readable storage medium
CN112540810A (en) * 2020-12-09 2021-03-23 竞技世界(北京)网络技术有限公司 Drawing method, drawing device, drawing equipment and computer readable storage medium
CN113326115A (en) * 2021-06-21 2021-08-31 上海华客信息科技有限公司 Rendering method and system of multi-chart page, electronic device and storage medium
CN115549811A (en) * 2021-06-30 2022-12-30 深圳市瑞图生物技术有限公司 Time sequence control method and device, dry chemical scanning equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109669752A (en) A kind of interface method for drafting, device and mobile terminal
CN104731688B (en) Point out the method and device of reading progress
CN111309418A (en) Control display method and electronic equipment
CN105094577A (en) Method and apparatus for application switching
CN108038102A (en) Recommendation method, apparatus, terminal and the storage medium of facial expression image
CN105069073A (en) Contact information recommendation method and device
CN106412221A (en) Mobile terminal and method for controlling the same
CN103927081A (en) Method and device for processing notification events
EP3046352A1 (en) Method by which portable device displays information through wearable device, and device therefor
CN106055707A (en) Bullet screen display method and device
CN107193653A (en) Method for allocating bandwidth resources, device and storage medium
WO2020238759A1 (en) Interface display method and electronic device
CN105892618A (en) Information display method and device and electronic device
CN110087118A (en) Comment on message treatment method, device, terminal, server and medium
CN107241495A (en) The split screen treating method and apparatus of terminal device
KR20160063875A (en) Mobile terminal and method for controlling the same
CN108540850A (en) Barrage display methods and device
CN104714826B (en) Using the loading method and device of theme
CN107133280A (en) The response method and device of feedback
CN104951194B (en) The display methods and device of photographing operation menu
CN108141517A (en) For handling the electronic equipment of image and method
CN109344051A (en) Method, apparatus, electronic equipment and the storage medium of data processing
CN105827834A (en) Mobile device application method and device
CN107729439A (en) Obtain the methods, devices and systems of multi-medium data
CN104616133A (en) Resource storage reminding method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190423

RJ01 Rejection of invention patent application after publication