CN104423996A - View refreshing method and view refreshing device - Google Patents

View refreshing method and view refreshing device Download PDF

Info

Publication number
CN104423996A
CN104423996A CN201310398862.XA CN201310398862A CN104423996A CN 104423996 A CN104423996 A CN 104423996A CN 201310398862 A CN201310398862 A CN 201310398862A CN 104423996 A CN104423996 A CN 104423996A
Authority
CN
China
Prior art keywords
data
refresh
tasks
refresh tasks
view
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201310398862.XA
Other languages
Chinese (zh)
Other versions
CN104423996B (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201310398862.XA priority Critical patent/CN104423996B/en
Publication of CN104423996A publication Critical patent/CN104423996A/en
Application granted granted Critical
Publication of CN104423996B publication Critical patent/CN104423996B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a view refreshing method and a view refreshing device. The method comprises the following steps of acquiring a refreshing request on a list in a view; adding refreshing tasks of the list to a queue established in advance according to the refreshing request; sequentially extracting the refreshing tasks from the queue and loading the refreshing tasks by using a defined amount of threads to obtain data on loading of the refreshing tasks; and refreshing the view according to the loaded refreshing tasks. The data of the loaded refreshing tasks are stored in a weak reference manner. The cost on establishment of a new thread of each refreshing task is reduced due to the defined amount of threads, the data which are stored in the weak reference manner can be recycled at any time, internal storage space occupied by the data can be released, the occupancy rate of system resources such as an internal storage device and a CPU (central processing unit) is reduced, pages are refreshed smoothly, and the integrity of the data is guaranteed with the aid of the queue.

Description

View method for refreshing and device
Technical field
The present invention relates to net application technology, particularly relate to a kind of view method for refreshing and device.
Background technology
Because of the inadequate resource that mobile terminal possesses, degraded performance, has installed application program on mobile terminals, must consider the internal memory shared by application program and CPU(Central Processing Unit, central processing unit) utilization rate.Being showed with tabular form by the icon of application program is a kind of conventional mode.List is often rolled a line, need carry out batch refresh to icon.Traditional refreshing mode mainly contains three kinds: the first directly in main thread, loads icon, and quoting of icon does not process, and acquiescence uses strongly reference; The second opens a thread independent loads icon immediately, and quoting of icon does not process, and acquiescence uses strongly reference; The third uses thread pool, and adding the task independent loads icon of thread pool, quoting of icon does not process, and acquiescence uses strongly reference.Wherein, strongly reference refers to that object only just can by system recoveries when not having other to apply in Java language.
But inventor finds through research, and it is high that above-mentioned three kinds of refreshing modes all can make application program take the system resource such as CPU and internal memory rate, causes refresh page card to pause, and only have and just can reclaim shared resource when Installed System Memory is not enough.
Summary of the invention
Based on this, be necessary to refresh occupying system resources for traditional list high, refresh page card pauses problem, provides a kind of and can reduce system resource occupancy and make the view method for refreshing of page furbishing smoothness.
In addition, there is a need to provide a kind of can reduce system resource occupancy and make the view refreshing apparatus of page furbishing smoothness.
A kind of view method for refreshing, comprises step:
Obtain the refresh requests to list in view;
According to described refresh requests the refresh tasks of described list added in the queue of setting up in advance;
Adopt the thread of predetermined quantity from described queue, extract described refresh tasks successively to load, obtain the data loading described refresh tasks, wherein, the data acquisition weak reference of the described refresh tasks of loading stores;
View according to the Refresh Data of the described refresh tasks loaded.
A kind of view refreshing apparatus, comprising:
Acquisition request module, for obtaining the refresh requests to list in view;
Add module, for be added by the refresh tasks of described list in the queue of setting up in advance according to described refresh requests;
Load-on module, from described queue, extract described refresh tasks successively for adopting the thread of predetermined quantity and load, obtain the data loading described refresh tasks, wherein, the data acquisition weak reference of the described refresh tasks of loading stores;
Refresh module, for view according to the Refresh Data of the described refresh tasks loaded.
Above-mentioned view method for refreshing and device, the refresh tasks adopting the thread of predetermined quantity to extract in queue loads, obtain loading data, then according to the Refresh Data view loaded, and data acquisition weak reference stores, the expense that each refresh tasks creates new thread is reduced because adopting the thread of predetermined quantity, weak reference stores data can reclaim the internal memory taken at any time, reduce the occupancy of the system resource such as internal memory and CPU, make page furbishing smooth, and adopt queue to ensure that the integrality of data.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of view method for refreshing in an embodiment;
Fig. 2 is the process flow diagram of view method for refreshing in another embodiment;
Fig. 3 is the process flow diagram of view method for refreshing in another embodiment;
Fig. 4 is the structured flowchart of view refreshing apparatus in an embodiment;
Fig. 5 is the structured flowchart of view refreshing apparatus in another embodiment;
Fig. 6 is the inner structure block diagram of load-on module;
Fig. 7 is the structural representation of view updating system in an embodiment.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearly understand, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
As shown in Figure 1, be the process flow diagram of view method for refreshing in an embodiment.This view method for refreshing is applied on mobile terminal, can take the system resource such as internal memory and CPU less.This mobile terminal can be mobile phone, personal digital assistant or palm PC etc.This view method for refreshing, comprises step:
Step S102, obtains the refresh requests to list in view.
Concrete, the refresh requests of list in view is produced by list in slip view, or the scroll bar in rolling view produces, or to list generation in assigned direction (as to the left or to the right) mobile view etc.
Step S104, to add the refresh tasks of this list in the queue of setting up in advance according to this refresh requests.
Refresh tasks can be the icon refreshing application program in view, or refreshes picture in view, or refreshes whole view page etc.Refresh tasks is added the integrality that can ensure data in the queue of setting up in advance, prevent loss of data.
Step S106, adopt the thread of predetermined quantity from this queue, extract this refresh tasks successively and load, obtain the data loading this refresh tasks, wherein, the data acquisition weak reference of this refresh tasks of loading stores.
Thread is a kind of unit less than the process in computing machine, and a process can have multiple thread.This predetermined quantity can comprise 1,2 or 3 etc.In the present embodiment, adopt 3 threads to extract refresh tasks simultaneously, load through the known employing of experimental data 3 threads simultaneously, can the highest efficiency be reached, and effectively can take high situation by control CPU.Thread created during the page initialization of the refresh tasks loaded in each needs, and terminate when the page of refresh tasks is destroyed, during this page is not destroyed, thread is in waiting status always.
Weak reference refers to that in Java, object is under any circumstance all likely by system recoveries.In the present embodiment, refresh tasks is the icon refreshing application program, is kept at by icon in Map, to ensure that icon can be recovered at any time.
Step S108, according to this view of Refresh Data of this refresh tasks loaded.
In the present embodiment, this refresh tasks is the icon refreshing application program.Step S108 comprises: according to this view of data acquisition FindViewByTag Local hydrodynamic unit of this refresh tasks of this loading.Concrete, by tag(icon) find corresponding view(view), and then refresh this view.
Above-mentioned view method for refreshing, the refresh tasks adopting the thread of predetermined quantity to extract in queue loads, obtain loading data, then according to the Refresh Data view loaded, and data acquisition weak reference stores, and reduces because adopting the thread of predetermined quantity the expense that each refresh tasks creates new thread, weak reference stores data can reclaim the internal memory taken at any time, reduce the occupancy of the system resource such as internal memory and CPU, make page furbishing smooth, and adopt queue to ensure that the integrality of data.
As shown in Figure 2, be the process flow diagram of view method for refreshing in another embodiment.View method for refreshing in Fig. 2 and the difference of Fig. 1 are: the priority adding the loading position of refresh tasks in Fig. 2, loads from high to low according to priority.This view method for refreshing comprises:
Step S202, obtains the refresh requests to list in view.
Step S204, to add the refresh tasks of this list in the queue of setting up in advance according to this refresh requests.
Step S206, pre-sets the priority of the loading position of refresh tasks, and the priority that internal memory, local peripheral hardware store, high in the clouds stores reduces gradually.
Local peripheral hardware storage can be SD(Secure Digital Memory, safe digital card) card, high in the clouds stores and refers to remote server storage.
Step S208, adopt the thread of predetermined quantity to extract this refresh tasks successively from this queue, from high to low this refresh tasks is loaded according to the priority of loading position, obtain the data loading this refresh tasks, wherein, the data acquisition weak reference of this refresh tasks of loading stores.
Concrete, when thread loads the data of refresh tasks, first from internal memory, find identical data, if do not have, then from local peripheral hardware stores, search identical data, if do not have, then continue to store from high in the clouds to download identical data.
Step S210, according to this view of Refresh Data of this refresh tasks loaded.
Above-mentioned view method for refreshing, when loading data, first in internal memory, data are obtained, if when internal memory does not exist, store from local peripheral hardware again and obtain, do not exist if local peripheral hardware stores, finally obtain from high in the clouds stores, from internal memory and local peripheral hardware store, obtain efficiency high, improve the efficiency of Data import.
In addition, step S206 can before step S202.
As shown in Figure 3, be the process flow diagram of view method for refreshing in another embodiment.View method for refreshing in Fig. 3 and the difference of Fig. 2 are: add in refresh tasks the reference position and rearmost position that load data in Fig. 3.This view method for refreshing comprises:
Step S302, obtains the refresh requests to list in view.
Step S304, to add the refresh tasks of this list in the queue of setting up in advance according to this refresh requests.
Step S306, pre-sets the priority of the loading position of refresh tasks, and the priority that internal memory, local peripheral hardware store, high in the clouds stores reduces gradually.
Step S308, the thread of predetermined quantity is adopted to extract this refresh tasks successively from this queue, obtain the reference position and the rearmost position that load data in refresh tasks, from high to low this refresh tasks is loaded according to the priority of loading position, using the data between this reference position and rearmost position as the data loading this refresh tasks, wherein, the data acquisition weak reference of this refresh tasks of loading stores.
Concrete, at the upper interface that there is data position in detection view of the operating system (as Android system) of mobile terminal, can sliding time be monitored by this interface, then calculate the reference position and rearmost position that load needed for the data of refresh tasks according to sliding time.
Step S310, according to this view of Refresh Data of this refresh tasks loaded.
Above-mentioned view method for refreshing, only loads the data of reference position and rearmost position, to need not needing to load in the data of screen display, decreasing loading data volume, saving the expense of system resource.
In other embodiments, be with the difference of the view method for refreshing in Fig. 3:
The step of this acquisition to the refresh requests of list in view comprises: obtain the refresh requests of list in view being carried out to slide generation.
The step loading the reference position of data in this acquisition refresh tasks comprises: when detecting that this slide stops, and the reference position of place page when stopping is loaded the reference position of data in this refresh tasks.
Concrete, the data of quick sliding in view are not loaded, slides after stopping and just loading, can avoid like this loading gibberish, reduce unnecessary Data import consumption.These data can be application program icon or, or the picture or word etc. in view.
In other embodiments, be with the difference of the view method for refreshing in Fig. 1, step S106 comprises: adopt the thread of predetermined quantity to extract this refresh tasks successively from described queue, obtain the reference position and rearmost position that load data in this refresh tasks; Using the data between this reference position and rearmost position as the data loading this refresh tasks.
As shown in Figure 4, be the structured flowchart of view refreshing apparatus in an embodiment.This view refreshing apparatus is applied on mobile terminal, can take the system resources such as less internal memory and CPU.This mobile terminal can be mobile phone, personal digital assistant or palm PC etc.This view refreshing apparatus, comprises acquisition request module 420, adds module 440, load-on module 460 and refresh module 480.
Wherein, acquisition request module 420 is for obtaining the refresh requests to list in view.
Concrete, the refresh requests of list in view is produced by list in slip view, or the scroll bar in rolling view produces, or to list generation in assigned direction (as to the left or to the right) mobile view etc.
Add module 440 for being added by the refresh tasks of this list according to this refresh requests in the queue of setting up in advance.
Refresh tasks can be the icon refreshing application program in view, or refreshes picture in view, or refreshes whole view page etc.Refresh tasks is added the integrality that can ensure data in the queue of setting up in advance, prevent loss of data.
Load-on module 460 loads for adopting the thread of predetermined quantity to extract this refresh tasks successively from this queue, and obtain the data loading this refresh tasks, wherein, the data acquisition weak reference of this refresh tasks stores.
Thread is a kind of unit less than the process in computing machine, and a process can have multiple thread.This predetermined quantity can comprise 1,2 or 3 etc.In the present embodiment, adopt 3 threads to extract refresh tasks simultaneously, load through the known employing of experimental data 3 threads simultaneously, can the highest efficiency be reached, and effectively can take high situation by control CPU.Thread created during the page initialization of the refresh tasks loaded in each needs, and terminate when the page of refresh tasks is destroyed, during this page is not destroyed, thread is in waiting status always.
Weak reference refers to that in Java, object is under any circumstance all likely by system recoveries.In the present embodiment, refresh tasks is the icon refreshing application program, is kept at by icon in Map, to ensure that icon can be recovered at any time.
Refresh module 480 is for this view of Refresh Data according to this refresh tasks loaded.
In the present embodiment, this refresh tasks is the icon refreshing application program.Refresh module 480 is also for data acquisition this view of FindViewByTag Local hydrodynamic unit of this refresh tasks according to this loading.Concrete, by tag(icon) find corresponding view(view), and then refresh this view.
Above-mentioned view refreshing apparatus, the refresh tasks adopting the thread of predetermined quantity to extract in queue loads, obtain loading data, then according to the Refresh Data view loaded, and data acquisition weak reference stores, and reduces because adopting the thread of predetermined quantity the expense that each refresh tasks creates new thread, weak reference stores data can reclaim the internal memory taken at any time, reduce the occupancy of the system resource such as internal memory and CPU, make page furbishing smooth, and adopt queue to ensure that the integrality of data.
As shown in Figure 5, be the structured flowchart of view refreshing apparatus in another embodiment.This view refreshing apparatus, except comprising acquisition request module 420, adding module 440, load-on module 460 and refresh module 480, also comprises priority presetting module 450.
Wherein, priority presetting module 450 is for pre-setting the priority of the loading position of refresh tasks, and the priority that internal memory, local peripheral hardware store, high in the clouds stores reduces gradually.Local peripheral hardware storage can be SD card, and high in the clouds stores and refers to remote server storage.
This load-on module 460 also for adopting the thread of predetermined quantity to extract this refresh tasks successively from this queue, loading this refresh tasks from high to low according to the priority of loading position, obtaining the data loading this refresh tasks.Concrete, when thread loads the data of refresh tasks, first from internal memory, find identical data, if do not have, then from local peripheral hardware stores, search identical data, if do not have, then continue to store from high in the clouds to download identical data.
As shown in Figure 6, this load-on module 460 comprises position determination unit 462 and data capture unit 464.
Wherein, position determination unit 462 extracts this refresh tasks for adopting the thread of predetermined quantity successively from this queue, obtains the reference position and rearmost position that load data in this refresh tasks.
Concrete, at the upper interface that there is data position in detection view of the operating system (as Android system) of mobile terminal, can sliding time be monitored by this interface, then calculate the reference position and rearmost position that load needed for the data of refresh tasks according to sliding time.
Data capture unit 464 for using the data between this reference position and rearmost position as loading the data of this refresh tasks.
Above-mentioned view method for refreshing, only loads the data of reference position and rearmost position, to need not needing to load in the data of screen display, decreasing loading data volume, saving the expense of system resource.
Further, this acquisition request module 420 is also for obtaining the refresh requests of list in view being carried out to slide generation.
The reference position of place page when stopping, also for when detecting that this slide stops, being loaded the reference position of data by this position determination unit 462 in this refresh tasks.
Concrete, the data of quick sliding in view are not loaded, slides after stopping and just loading, can avoid like this loading gibberish, reduce unnecessary Data import consumption.These data can be application program icon or, or the picture or word etc. in view.
In addition, data capture unit 464 also loads this refresh tasks from high to low for the priority according to loading position, using the data between this reference position and rearmost position as the data loading this refresh tasks, wherein, the data acquisition weak reference of this refresh tasks of loading stores.
One of ordinary skill in the art will appreciate that all or part of flow process realized in above-described embodiment method, that the hardware that can carry out instruction relevant by computer program has come, described program can be stored in a computer read/write memory medium, this program, when performing, can comprise the flow process of the embodiment as above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random Access Memory, RAM) etc.
The embodiment of the present invention additionally provides another kind of view updating system, and as shown in Figure 7, for convenience of explanation, illustrate only the part relevant to the embodiment of the present invention, concrete ins and outs do not disclose, and please refer to embodiment of the present invention method part.This terminal can for comprising mobile phone, panel computer, PDA(Personal DigitalAssistant, personal digital assistant), POS(Point of Sales, point-of-sale terminal), the terminal device arbitrarily such as vehicle-mounted computer, take terminal as mobile phone be example:
Shown in Fig. 7 is the block diagram of the part-structure of the mobile phone relevant to the terminal that the embodiment of the present invention provides.With reference to figure 7, mobile phone comprises: radio frequency (Radio Frequency, RF) parts such as circuit 1110, storer 1120, input block 1130, display unit 1140, sensor 1150, voicefrequency circuit 1160, Wireless Fidelity (wirelessfidelity, WiFi) module 1170, processor 1180 and power supply 1190.It will be understood by those skilled in the art that the handset structure shown in Fig. 7 does not form the restriction to mobile phone, the parts more more or less than diagram can be comprised, or combine some parts, or different parts are arranged.
Concrete introduction is carried out below in conjunction with Fig. 7 each component parts to mobile phone:
RF circuit 1110 can be used for receiving and sending messages or in communication process, the reception of signal and transmission, especially, after being received by the downlink information of base station, process to processor 1180; In addition, the up data of design are sent to base station.Usually, RF circuit includes but not limited to antenna, at least one amplifier, transceiver, coupling mechanism, low noise amplifier (Low Noise Amplifier, LNA), diplexer etc.In addition, RF circuit 110 can also by radio communication and network and other devices communicatings.Above-mentioned radio communication can use arbitrary communication standard or agreement, include but not limited to global system for mobile communications (Global System of Mobilecommunication, GSM), general packet radio service (General Packet Radio Service, GPRS), CDMA (Code Division Multiple Access, CDMA), Wideband Code Division Multiple Access (WCDMA) (WidebandCode Division Multiple Access, WCDMA), Long Term Evolution (Long TermEvolution, LTE)), Email, Short Message Service (Short Messaging Service, SMS) etc.
Storer 1120 can be used for storing software program and module, and processor 1180 is stored in software program and the module of storer 1120 by running, thus performs various function application and the data processing of mobile phone.Storer 1120 mainly can comprise storage program district and store data field, and wherein, storage program district can store operating system, application program (such as sound-playing function, image player function etc.) etc. needed at least one function; Store data field and can store the data (such as voice data, phone directory etc.) etc. created according to the use of mobile phone.In addition, storer 1120 can comprise high-speed random access memory, can also comprise nonvolatile memory, such as at least one disk memory, flush memory device or other volatile solid-state parts.
Input block 1130 can be used for the numeral or the character information that receive input, and generation arranges with the user of mobile phone 1100 and function controls the input of relevant key signals.Particularly, input block 1130 can comprise contact panel 1131 and other input equipments 1132.Contact panel 1131, also referred to as touch-screen, user can be collected or neighbouring touch operation (such as user uses any applicable object or the operations of annex on contact panel 1131 or near contact panel 1131 such as finger, stylus) thereon, and drive corresponding coupling arrangement according to the formula preset.Optionally, contact panel 1131 can comprise touch detecting apparatus and touch controller two parts.Wherein, touch detecting apparatus detects the touch orientation of user, and detects the signal that touch operation brings, and sends signal to touch controller; Touch controller receives touch information from touch detecting apparatus, and converts it to contact coordinate, then gives processor 1180, and the order that energy receiving processor 1180 is sent also is performed.In addition, the polytypes such as resistance-type, condenser type, infrared ray and surface acoustic wave can be adopted to realize contact panel 1131.Except contact panel 1131, input block 1130 can also comprise other input equipments 1132.Particularly, other input equipments 1132 can include but not limited to one or more in physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, control lever etc.
Display unit 1140 can be used for the various menus showing information or the information being supplied to user and the mobile phone inputted by user.Display unit 1140 can comprise display panel 1141, optionally, the form such as liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode (Organic Light-Emitting Diode, OLED) can be adopted to configure display panel 1141.Further, contact panel 1131 can cover display panel 1141, when contact panel 1131 detects thereon or after neighbouring touch operation, send processor 1180 to determine the type of touch event, on display panel 1141, provide corresponding vision to export with preprocessor 1180 according to the type of touch event.Although in the figure 7, contact panel 1131 and display panel 1141 be as two independently parts to realize input and the input function of mobile phone, but in certain embodiments, can by integrated to contact panel 1131 and display panel 1141 and realize the input and output function of mobile phone.
Mobile phone 1100 also can comprise at least one sensor 1150, such as optical sensor, motion sensor and other sensors.Particularly, optical sensor can comprise ambient light sensor and proximity transducer, and wherein, ambient light sensor the light and shade of environmentally light can regulate the brightness of display panel 1141, proximity transducer when mobile phone moves in one's ear, can cut out display panel 1141 and/or backlight.As the one of motion sensor; accelerometer sensor can detect the size of all directions (are generally three axles) acceleration; size and the direction of gravity can be detected time static, can be used for identifying the application (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating) of mobile phone attitude, Vibration identification correlation function (such as passometer, knock) etc.; As for mobile phone also other sensors such as configurable gyroscope, barometer, hygrometer, thermometer, infrared ray sensor, do not repeat them here.
Voicefrequency circuit 1160, loudspeaker 1161, microphone 1162 can provide the audio interface between user and mobile phone.Voicefrequency circuit 1160 can by receive voice data conversion after electric signal, be transferred to loudspeaker 1161, by loudspeaker 1161 be converted to voice signal export; On the other hand, the voice signal of collection is converted to electric signal by microphone 1162, voice data is converted to after being received by voicefrequency circuit 1160, after again voice data output processor 1180 being processed, through RF circuit 1110 to send to such as another mobile phone, or export voice data to storer 1120 to process further.
WiFi belongs to short range wireless transmission technology, and mobile phone can help user to send and receive e-mail by WiFi module 1170, browse webpage and access streaming video etc., and its broadband internet wireless for user provides is accessed.Although Fig. 7 shows WiFi module 1170, be understandable that, it does not belong to must forming of mobile phone 1100, can omit in the scope of essence not changing invention as required completely.
Processor 1180 is control centers of mobile phone, utilize the various piece of various interface and the whole mobile phone of connection, software program in storer 1120 and/or module is stored in by running or performing, and call the data be stored in storer 1120, perform various function and the process data of mobile phone, thus integral monitoring is carried out to mobile phone.Optionally, processor 1180 can comprise one or more processing unit; Preferably, processor 1180 accessible site application processor and modem processor, wherein, application processor mainly processes operating system, user interface and application program etc., and modem processor mainly processes radio communication.Be understandable that, above-mentioned modem processor also can not be integrated in processor 1180.
Mobile phone 1100 also comprises the power supply 1190(such as battery of powering to all parts), preferably, power supply can be connected with processor 1180 logic by power-supply management system, thus realizes the functions such as management charging, electric discharge and power managed by power-supply management system.
Although not shown, mobile phone 1100 can also comprise camera, bluetooth module etc., does not repeat them here.
In embodiments of the present invention, the processor 1180 included by this terminal also has following functions:
Described processor performs a kind of view method for refreshing, comprises step:
Obtain the refresh requests to list in view;
According to described refresh requests the refresh tasks of described list added in the queue of setting up in advance;
Adopt the thread of predetermined quantity from described queue, extract described refresh tasks successively to load, obtain the data loading described refresh tasks, wherein, the data acquisition weak reference of the described refresh tasks of loading stores;
View according to the Refresh Data of the described refresh tasks loaded.
Wherein in an embodiment, described refresh tasks is the icon refreshing application program;
Described in the Refresh Data of the described described refresh tasks according to loading, the step of the view at list place comprises:
View according to the data acquisition FindViewByTag Local hydrodynamic unit of the described refresh tasks of described loading.
Wherein in an embodiment, from described queue, extract described refresh tasks successively at the thread of described employing predetermined quantity and load, before obtaining the step of the data loading described refresh tasks, also comprise:
Pre-set the priority of the loading position of refresh tasks, the priority that the storage of internal memory, local peripheral hardware, high in the clouds store reduces gradually;
The thread of described employing predetermined quantity extracts described refresh tasks successively and loads from described queue, and the step obtaining the data loading described refresh tasks comprises:
Adopt the thread of predetermined quantity to extract described refresh tasks successively from described queue, from high to low described refresh tasks is loaded according to the priority of loading position, obtain the data loading described refresh tasks.
Wherein in an embodiment, the thread of described employing predetermined quantity extracts described refresh tasks successively and loads from described queue, and the step obtaining the data loading described refresh tasks comprises:
Adopt the thread of predetermined quantity to extract described refresh tasks successively from described queue, obtain the reference position and rearmost position that load data in described refresh tasks;
Using the data between described reference position and rearmost position as the data loading described refresh tasks.
Wherein in an embodiment, the step of described acquisition to the refresh requests of list in view comprises:
Obtain the refresh requests of list in view being carried out to slide generation;
The step loading the reference position of data in described acquisition refresh tasks comprises:
When detecting that described slide stops, the reference position of place page when stopping is loaded the reference position of data in described refresh tasks.
Wherein in an embodiment, the thread of described predetermined quantity comprises 1,2 or 3.
The above embodiment only have expressed several embodiment of the present invention, and it describes comparatively concrete and detailed, but therefore can not be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be as the criterion with claims.

Claims (10)

1. a view method for refreshing, comprises step:
Obtain the refresh requests to list in view;
According to described refresh requests the refresh tasks of described list added in the queue of setting up in advance;
Adopt the thread of predetermined quantity from described queue, extract described refresh tasks successively to load, obtain the data loading described refresh tasks, wherein, the data acquisition weak reference of the described refresh tasks of loading stores;
View according to the Refresh Data of the described refresh tasks loaded.
2. method according to claim 1, is characterized in that, described refresh tasks is the icon refreshing application program;
Described in the Refresh Data of the described described refresh tasks according to loading, the step of the view at list place comprises:
View according to the data acquisition FindViewByTag Local hydrodynamic unit of the described refresh tasks of described loading.
3. method according to claim 1, is characterized in that, extracts described refresh tasks successively and loads, before obtaining the step of the data loading described refresh tasks, also comprise at the thread of described employing predetermined quantity from described queue:
Pre-set the priority of the loading position of refresh tasks, the priority that the storage of internal memory, local peripheral hardware, high in the clouds store reduces gradually;
The thread of described employing predetermined quantity extracts described refresh tasks successively and loads from described queue, and the step obtaining the data loading described refresh tasks comprises:
Adopt the thread of predetermined quantity to extract described refresh tasks successively from described queue, from high to low described refresh tasks is loaded according to the priority of loading position, obtain the data loading described refresh tasks.
4. method according to claim 1, is characterized in that, the thread of described employing predetermined quantity extracts described refresh tasks successively and loads from described queue, and the step obtaining the data loading described refresh tasks comprises:
Adopt the thread of predetermined quantity to extract described refresh tasks successively from described queue, obtain the reference position and rearmost position that load data in described refresh tasks;
Using the data between described reference position and rearmost position as the data loading described refresh tasks.
5. method according to claim 4, is characterized in that, the step of described acquisition to the refresh requests of list in view comprises:
Obtain the refresh requests of list in view being carried out to slide generation;
The step loading the reference position of data in described acquisition refresh tasks comprises:
When detecting that described slide stops, the reference position of place page when stopping is loaded the reference position of data in described refresh tasks.
6. a view refreshing apparatus, is characterized in that, comprising:
Acquisition request module, for obtaining the refresh requests to list in view;
Add module, for be added by the refresh tasks of described list in the queue of setting up in advance according to described refresh requests;
Load-on module, from described queue, extract described refresh tasks successively for adopting the thread of predetermined quantity and load, obtain the data loading described refresh tasks, wherein, the data acquisition weak reference of the described refresh tasks of loading stores;
Refresh module, for view according to the Refresh Data of the described refresh tasks loaded.
7. device according to claim 6, is characterized in that, described refresh tasks is the icon refreshing application program;
Described refresh module also for the described refresh tasks according to described loading data acquisition FindViewByTag Local hydrodynamic unit described in view.
8. device according to claim 6, is characterized in that, described device also comprises:
Priority presetting module, the priority that for pre-setting the priority of the loading position of refresh tasks, internal memory, local peripheral hardware store, high in the clouds stores reduces gradually;
Described load-on module also for adopting the thread of predetermined quantity to extract described refresh tasks successively from described queue, loads described refresh tasks according to the priority of loading position from high to low, obtains the data loading described refresh tasks.
9. device according to claim 6, is characterized in that, described load-on module comprises:
Position determination unit, for adopting the thread of predetermined quantity to extract described refresh tasks successively from described queue, obtains the reference position and rearmost position that load data in described refresh tasks;
Data capture unit, for using the data between described reference position and rearmost position as the data loading described refresh tasks.
10. device according to claim 9, is characterized in that, described request acquisition module is also for obtaining the refresh requests of list in view being carried out to slide generation;
The reference position of place page when stopping, also for when detecting that described slide stops, being loaded the reference position of data by described position determination unit in described refresh tasks.
CN201310398862.XA 2013-09-04 2013-09-04 View method for refreshing and device Active CN104423996B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310398862.XA CN104423996B (en) 2013-09-04 2013-09-04 View method for refreshing and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310398862.XA CN104423996B (en) 2013-09-04 2013-09-04 View method for refreshing and device

Publications (2)

Publication Number Publication Date
CN104423996A true CN104423996A (en) 2015-03-18
CN104423996B CN104423996B (en) 2019-02-01

Family

ID=52973076

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310398862.XA Active CN104423996B (en) 2013-09-04 2013-09-04 View method for refreshing and device

Country Status (1)

Country Link
CN (1) CN104423996B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105760231A (en) * 2016-02-19 2016-07-13 珠海迈科智能科技股份有限公司 Network resource previewing management method based on embedded mode
CN105975355A (en) * 2016-05-24 2016-09-28 深圳天珑无线科技有限公司 Drawing method and device and mobile device
CN106598725A (en) * 2016-10-31 2017-04-26 武汉斗鱼网络科技有限公司 Android-based Handler memory leakage prevention device and method
CN106933482A (en) * 2015-12-30 2017-07-07 百度在线网络技术(北京)有限公司 A kind of method and apparatus for switching object
CN107015866A (en) * 2017-03-23 2017-08-04 腾讯科技(深圳)有限公司 A kind of data processing method and device
WO2019071626A1 (en) * 2017-10-09 2019-04-18 华为技术有限公司 Method for processing refreshing display abnormality, and terminal
CN110162385A (en) * 2018-02-14 2019-08-23 微软技术许可有限责任公司 Can dynamic refresh memory object processing frame
CN110472168A (en) * 2019-07-05 2019-11-19 中国平安财产保险股份有限公司 Page data update method, device, computer equipment and storage medium
CN111782326A (en) * 2020-06-30 2020-10-16 北京字节跳动网络技术有限公司 Method and device for controlling page refreshing, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102385510A (en) * 2010-09-06 2012-03-21 上海可鲁系统软件有限公司 Interface refreshing method of graphical user interface based on different development tools
CN102541605A (en) * 2011-12-30 2012-07-04 Tcl集团股份有限公司 Method and device for picture loading based on Android system
CN102591721A (en) * 2011-12-30 2012-07-18 北京新媒传信科技有限公司 Method and system for distributing thread execution task
CN102750180A (en) * 2012-05-28 2012-10-24 中国科学院遥感应用研究所 Multithreading display mechanism of two-dimensional map tiles
US20130071485A1 (en) * 2011-04-14 2013-03-21 Darlene Gaynor-Krupnick Organic lubricant

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102385510A (en) * 2010-09-06 2012-03-21 上海可鲁系统软件有限公司 Interface refreshing method of graphical user interface based on different development tools
US20130071485A1 (en) * 2011-04-14 2013-03-21 Darlene Gaynor-Krupnick Organic lubricant
CN102541605A (en) * 2011-12-30 2012-07-04 Tcl集团股份有限公司 Method and device for picture loading based on Android system
CN102591721A (en) * 2011-12-30 2012-07-18 北京新媒传信科技有限公司 Method and system for distributing thread execution task
CN102750180A (en) * 2012-05-28 2012-10-24 中国科学院遥感应用研究所 Multithreading display mechanism of two-dimensional map tiles

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106933482A (en) * 2015-12-30 2017-07-07 百度在线网络技术(北京)有限公司 A kind of method and apparatus for switching object
CN105760231B (en) * 2016-02-19 2019-04-16 珠海迈科智能科技股份有限公司 One kind being based on Embedded Internet resources preview management method
CN105760231A (en) * 2016-02-19 2016-07-13 珠海迈科智能科技股份有限公司 Network resource previewing management method based on embedded mode
CN105975355B (en) * 2016-05-24 2019-06-25 四川苏格通讯技术有限公司 A kind of drawing practice, device and mobile device
CN105975355A (en) * 2016-05-24 2016-09-28 深圳天珑无线科技有限公司 Drawing method and device and mobile device
CN106598725A (en) * 2016-10-31 2017-04-26 武汉斗鱼网络科技有限公司 Android-based Handler memory leakage prevention device and method
CN107015866A (en) * 2017-03-23 2017-08-04 腾讯科技(深圳)有限公司 A kind of data processing method and device
WO2019071626A1 (en) * 2017-10-09 2019-04-18 华为技术有限公司 Method for processing refreshing display abnormality, and terminal
US11151017B2 (en) 2017-10-09 2021-10-19 Huawei Technologies Co., Ltd. Method for processing refresh and display exceptions, and terminal
CN110162385A (en) * 2018-02-14 2019-08-23 微软技术许可有限责任公司 Can dynamic refresh memory object processing frame
CN110162385B (en) * 2018-02-14 2023-07-04 微软技术许可有限责任公司 Processing framework capable of dynamically refreshing memory objects
CN110472168A (en) * 2019-07-05 2019-11-19 中国平安财产保险股份有限公司 Page data update method, device, computer equipment and storage medium
CN110472168B (en) * 2019-07-05 2024-07-05 中国平安财产保险股份有限公司 Page data updating method and device, computer equipment and storage medium
CN111782326A (en) * 2020-06-30 2020-10-16 北京字节跳动网络技术有限公司 Method and device for controlling page refreshing, computer equipment and storage medium

Also Published As

Publication number Publication date
CN104423996B (en) 2019-02-01

Similar Documents

Publication Publication Date Title
CN111984165B (en) Method and device for displaying message and terminal equipment
CN104423996A (en) View refreshing method and view refreshing device
CN104252379B (en) Picture thumbnail display packing and device
EP2882234A1 (en) Method, apparatus, equipment and system for controlling turn-on and turn-off of wireless network
CN104298436A (en) Quick reply operation method and terminal
CN104243671A (en) Volume adjustment method and device and electronic device
CN104571787A (en) Message display method and communication terminal
CN103473092A (en) Method and device for processing downloaded applications and terminal equipment
US20170097725A1 (en) Device and method for starting mobile terminal application and mobile terminal
CN104238918A (en) List view assembly sliding display method and device
CN103455603A (en) Method and device for caching webpage content and loading webpage and terminal device
CN104133752B (en) The method for supervising of operating platform and device
CN104281621A (en) Method and device for browsing web page
CN104077184A (en) Progress control method of application program and computer system
CN104216651A (en) Social information displaying method and device
CN110046032A (en) Applied program processing method and device, electronic equipment, computer readable storage medium
CN105095259B (en) Waterfall flow object display method and device
CN104571778A (en) Lock screen picture setting method and device
CN110018886B (en) Application state switching method and device, electronic equipment and readable storage medium
CN104423784A (en) Page displaying method and page displaying device
CN104424203A (en) Method and system for viewing photo sharing state in mobile device
CN104866288A (en) Method, device and terminal for accessing application program
CN112997132A (en) Application freezing method and device and electronic equipment
CN112261634B (en) Bluetooth transmission control method and device, terminal equipment and storage medium
CN104461273A (en) Information displaying method and terminal device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant