CN108829311A - A kind of method and apparatus based on Widget display data - Google Patents
A kind of method and apparatus based on Widget display data Download PDFInfo
- Publication number
- CN108829311A CN108829311A CN201710286945.8A CN201710286945A CN108829311A CN 108829311 A CN108829311 A CN 108829311A CN 201710286945 A CN201710286945 A CN 201710286945A CN 108829311 A CN108829311 A CN 108829311A
- Authority
- CN
- China
- Prior art keywords
- data
- page
- display
- paging
- widget
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2203/00—Indexing scheme relating to G06F3/00 - G06F3/048
- G06F2203/048—Indexing scheme relating to G06F3/048
- G06F2203/04803—Split screen, i.e. subdividing the display area or the window area into separate subareas
Abstract
The present invention provides a kind of method and apparatus based on Widget display data, it can be realized page-turning function up and down, so that a large amount of data can be shown in the limited interface Widget, to provide more interested data for user, it shows abundant in content multiplicity, improves user experience.Method based on Widget display data of the invention includes:Data to be shown are obtained from server, and data filtering is carried out to the data to be shown;Paging processing is carried out to the filtered data by paging dispatching algorithm;According to the instruction that user inputs, by Pagination Display control, by the paging, treated that data are shown in the interface of the Widget.
Description
Technical field
The present invention relates to field of computer technology, a kind of particularly method and dress based on Widget display data
It sets, electronic equipment, computer-readable medium.
Background technique
Widget (widget) is the extension for the application program that Apple Inc. newly releases.The appearance of Widget is so that exploitation
Person can customize specific function by the function that system provides well, and system is applied and third-party application can be logical
Know and realizes interaction inside center (Notification Center).This means that user can be in the case where mobile phone does not unlock
It obtains desired information in real time by Widget, eliminates unlocked time for user, improve the efficiency that user obtains information, therefore
Widget has good development prospect.
The characteristic that Widget itself has showing interface region small, also, Apple Inc. itself to slide up and down function into
Restriction is gone, so that developer, which can not reuse, slides up and down this gesture.At present for the application of Widget, such as:Microblogging,
The data information that several users of push such as news and comment website may be concerned about, video website push the high video of several click volumes
Deng some e-commerce websites use the function not yet.Due to the limitation of Widget functionally, current many companies are answered
The single data of several content-forms are simply only shown on the interface of Widget with program, and can not be opened up on Widget
Show a large amount of information.
In realizing process of the present invention, at least there are the following problems in the prior art for inventor's discovery:It is rigid in view of Widget
Just emerging, many application programs all have not been used the status of the function, and the technology in existing scheme about Widget is seldom, for
The problem of largely showing data on Widget, the even not no solution of mainstream at present.The technical solution of existing mainstream
It is generally all only aobvious mainly by being directly shown using the simple control such as UIButton, UILabel to commodity data
Show the data of a screen ranges, undoubtedly causes the data content of Widget showing interface also extremely limited in this way.
However, one of the function of Widget is to realize the interaction of user's notice, limited data content is obviously unfavorable for
User rapidly gets oneself interested data, therefore, in practical applications, exists and is shown in further detail using Widget
Notification information demand.In addition, the Show Styles that the existing interface Widget is similar, not new, be easy to cause user
Visual fatigue, and good guiding function cannot be played to user, thus the characteristics of Widget cannot be given full play to.
Summary of the invention
In view of this, the embodiment of the present invention provide a kind of method and apparatus based on Widget display data, electronic equipment,
Computer-readable medium can be realized page-turning function up and down, so that can show a large amount of number in the limited interface Widget
According to showing abundant in content multiplicity, improve user experience to provide more interested data for user.
To achieve the above object, according to an aspect of an embodiment of the present invention, it provides a kind of based on Widget displaying number
According to method.
A method of based on Widget display data, including:Obtain data to be shown from server, and to it is described to
The data of display carry out data filtering;Paging processing is carried out to the filtered data by paging dispatching algorithm;According to
The instruction of family input, by Pagination Display control, by the paging, treated that data are shown in the interface of the Widget.
Optionally, the Pagination Display control includes segmentation control and table view control, wherein the segmentation control is used
It is controlled in paging, the table view control is used for display control, and the display control includes:According to the interface of the Widget
Size creates multiple cells, and the multiple cell is used to show the data of one page, wherein showing one in each cell
Data, and multiple cell is multiplexed when showing the data of multiple pagings.
Optionally, the data to be shown include image data, also, carry out data mistake to the data to be shown
Filter, including:It removes image data in the data to be shown and occupies the data to be displayed that memory space is more than preset threshold.
Optionally, the step of paging processing being carried out to the filtered data by paging dispatching algorithm, including:To institute
It states filtered data to be verified, the verification includes the legitimacy of verification data and the repeatability of data;According to the school
Test by the quantity of data and the quantity of data of preset every page of display determine number of pages that data shows and every page show
Data.
Optionally, the Pagination Display control includes the key for receiving the instruction of user's input, and the key packet
Include chosen, normal optional and not optional three kinds of states.
Optionally, the instruction of user's input includes page-turning instruction, and the page-turning instruction includes display page up, shows
Show lower one page and shows preset jump page, it, will be at the paging by Pagination Display control according to the instruction that user inputs
Data after reason are shown in the step in the interface of the Widget, including:If the page-turning instruction is display page up,
Judge that the page up whether there is, and if it exists, the data update of current page is then shown as upper the one of the current page
Otherwise the data of page still show the data of the current page;If the page-turning instruction is to show lower one page, judgement is worked as
Whether the preceding page is last page, if so, showing preset jump page, otherwise, the data of current page is updated display
For the data of lower one page of the current page;If the page-turning instruction is to show preset jump page, described in display
The data of jump page.
According to another aspect of an embodiment of the present invention, a kind of device based on Widget display data is provided.
A kind of device based on Widget display data, including:Data acquisition module, it is to be shown for being obtained from server
Data, and data filtering is carried out to the data to be shown;Paging processing module, for passing through paging dispatching algorithm to institute
It states filtered data and carries out paging processing;Data disaply moudle, the instruction for being inputted according to user, passes through Pagination Display control
Treated that data are shown in the interface of the Widget by the paging for part.
Optionally, the Pagination Display control includes segmentation control and table view control, wherein the segmentation control is used
It is controlled in paging, the table view control is used for display control, and the display control includes:According to the interface of the Widget
Size creates multiple cells, and the multiple cell is used to show the data of one page, wherein showing one in each cell
Data, and multiple cell is multiplexed when showing the data of multiple pagings.
Optionally, the data to be shown include image data, also, the data acquisition module is also used to:Removal
Image data occupies the data to be displayed that memory space is more than preset threshold in the data to be shown.
Optionally, the paging processing module is also used to:The filtered data are verified, the verification includes
Verify the legitimacy of data and the repeatability of data;The quantity of data passed through and preset every page of display are verified according to described
The quantity of data determines the data of the number of pages that data are shown and every page of display.
Optionally, the Pagination Display control includes the key for receiving the instruction of user's input, and the key packet
Include chosen, normal optional and not optional three kinds of states.
Optionally, the instruction of user's input includes page-turning instruction, and the page-turning instruction includes display page up, shows
Show lower one page and shows that preset jump page, the data disaply moudle are also used to:If the page-turning instruction is in display
One page then judges that the page up whether there is, and if it exists, the data update of current page is then shown as the current page
The data of page up otherwise still show the data of the current page;If the page-turning instruction is to show lower one page,
Judge whether current page is last page, if so, showing preset jump page, otherwise, more by the data of current page
Newly it is shown as the data of lower one page of the current page;If the page-turning instruction is to show preset jump page, show
Show the data of the jump page.
Another aspect according to an embodiment of the present invention, provides a kind of electronic equipment.
A kind of electronic equipment, including:One or more processors;Memory works as institute for storing one or more programs
When stating one or more programs and being executed by one or more of processors, so that the realization of one or more of processors is based on
The method of Widget display data.
Another aspect according to an embodiment of the present invention, provides a kind of computer-readable medium.
A kind of computer-readable medium is stored thereon with computer program, base is realized when described program is executed by processor
In the method for Widget display data.
Technical solution according to an embodiment of the present invention obtains data to be shown from server, and to described to be shown
Data carry out data filtering, carry out paging processing to filtered data by paging dispatching algorithm, the finger inputted according to user
It enables, by Pagination Display control, by paging, treated that data are shown in the interface of Widget.Use technical side of the invention
Case can be realized page-turning function up and down, so that a large amount of data can be shown in the limited interface Widget, to be user
More interested data are provided, abundant in content multiplicity is shown, avoids the visual fatigue for causing user, increase user couple
The good opinion of Widget improves user experience, and breaches the application mode of conventional Widget, execution efficiency height, program
Fast response time.
Further effect possessed by above-mentioned non-usual optional way adds hereinafter in conjunction with specific embodiment
With explanation.
Detailed description of the invention
Attached drawing for a better understanding of the present invention, does not constitute an undue limitation on the present invention.Wherein:
Fig. 1 is the key step schematic diagram of the method according to an embodiment of the present invention based on Widget display data;
Fig. 2 is according to an embodiment of the present invention to carry out the excellent of paging processing to data to be shown by paging dispatching algorithm
Select flow diagram;
Fig. 3 is the preferred flow schematic diagram of the configuration according to an embodiment of the present invention for updating Pagination Display control;
Fig. 4 is the preferred flow according to an embodiment of the present invention that data are shown by Pagination Display control;
Fig. 5 is the main modular schematic diagram of the device according to an embodiment of the present invention based on Widget display data;
Fig. 6 is adapted for the structural schematic diagram for the computer system for realizing the electronic equipment of the embodiment of the present invention.
Specific embodiment
Below in conjunction with attached drawing, an exemplary embodiment of the present invention will be described, including the various of the embodiment of the present invention
Details should think them only exemplary to help understanding.Therefore, those of ordinary skill in the art should recognize
It arrives, it can be with various changes and modifications are made to the embodiments described herein, without departing from scope and spirit of the present invention.Together
Sample, for clarity and conciseness, descriptions of well-known functions and structures are omitted from the following description.
Fig. 1 is the key step schematic diagram of the method according to an embodiment of the present invention based on Widget display data.
As shown in Figure 1, the method based on Widget display data of the embodiment of the present invention mainly includes the following steps, namely
S101 to step S103.
Step S101:Data to be shown are obtained from server, and data filtering is carried out to data to be shown.
Data to be shown may include the data such as picture, text, merchandise news.
Before obtaining data to be shown from server, control used in display data is initialized first,
Carrying out initialization to control includes that the essential attributes such as the display position to Pagination Display control, size, shape, pattern are set
It sets, so that the segmentation Pagination Displays control such as control and table view control is shown on the interface of Widget.
Control used in display data is mainly Pagination Display control, including segmentation control and table view control,
In, it is segmented control such as UISementedControl control, is mainly used for paging control, table view control is for example
UITableView control, is mainly used for display control, wherein display control includes:It is created according to the interface dimensions of Widget
Multiple cells, multiple cell are used to show the data of one page, wherein showing a data in each cell, and aobvious
Multiple cell is multiplexed when showing the data of multiple pagings, by Multiplexing Unit lattice, can optimize data to be shown for
The occupancy of memory in Widget, specifically, each cell are the UITableViewCell of UITableView control creation, body
In the present interface Widget, every data line of Widget interface display all corresponds to a UITableViewCell,
UITableView control creates the Cell of displayable maximum quantity on the interface of Widget according to the interface dimensions of Widget
(i.e. UITableViewCell), and these Cell are reused when showing data page by page, it is realized by reusing Cell to Widget
Memory use and performance on optimization so that can show mass data in the limited interface Widget.
Data to be shown, which are obtained, from server mainly issues request of data to server by way of network communication,
Server responds the request of data, and returns to corresponding data to be shown.
The detailed process that data to be shown are obtained from server may include:
A thread is opened for request data;
It establishes request queue and sends the network request for being used for request data, wherein set first when sending network request
Request path is set, network request is then created;
Judge whether the request succeeds, if request is unsuccessful, process terminates, if requesting successfully, to parse from clothes
The data to be displayed that business device obtains, which can be the form of Json data, also, parsing data can specifically lead to
NSJSONSeriallization method is crossed by obtained Json data conversion into Foundation object, wherein
NSJSONSeriallization is one of operating system for handling the class of data, and Foundation object is operating system
The identifiable a kind of data format of included Widget, wherein operating system can be iOS operating system.Data through this process
Class the data to be displayed of the Json form obtained from server can be converted into the identifiable data format of Widget;
Judge whether data to be displayed is abnormal, specifically, provides in the rule made an appointment by the rule made an appointment
The field that received data should include, and by by field specified in the field and above-mentioned rule in data to be displayed into
Row compares, if data to be displayed includes corresponding field, data are normal, otherwise data exception.If interface data is abnormal,
Data are not handled then, and terminate process, if interface data is normal, handled data source (i.e. data to be displayed), give
Corresponding data object carries out assignment in data source, so that data may be displayed on the corresponding position at the interface of Widget.
After obtaining data to be shown, can also data filtering be carried out to data to be shown.Due to iOS system pair
The memory limitation of Widget is stringenter, and the maximum free memory value of usual Widget is 11M or so, for making for memory optimization
With, so that a large amount of data can be shown in the limited interface Widget, it can also be to data to be shown progress data mistake
Filter, is mainly filtered image data therein, specifically, removes image data in data to be shown and occupies storage sky
Between be more than preset threshold data to be displayed.Wherein, which can be customized, and can be according to filtered picture number
According to display result adjust the customized value.
After data filtering, data to be shown can be cached, if there is no data in caching, directly will
Filtered data save in the buffer, if having had data in caching, the data in caching are updated to this filtering
Data afterwards.Specifically, judge whether the data in caching need to update, if the data in caching do not need to update, flow
Journey terminates, if the data in caching need to update, is updated data cached, Grand Central specifically can be used
The asynchronous method (the asynchronous storage method carried for system) of Dispatch, obtains Global Queue, stores to data cached
Operation.
By way of the above-mentioned UITableviewCell and data filtering reusing the creation of UITableview control
It ensure that in limited widget interface display mass data, to provide more interested data for user, improve and use
Family user experience.Further, it is also possible to be discharged by timely memory to advanced optimize the use to widget memory, timely
When memory release is deferred to use for the application of memory as far as possible, and timely release is used.
Step S102:Paging processing is carried out to filtered data by paging dispatching algorithm.
Filtered data are carried out paging to handle used filtered data being slow by paging dispatching algorithm
Data in depositing, by preferentially using caching in data, can to avoid for the first time load data when without content the case where, improve
The response speed of program, and improve user experience.
It should be noted that the data in caching can specifically update life cycle there are life cycle according to data
The demand of speed carrys out sets itself, if the data in caching are expired, or do not have data in caching, then needs to wait for from server
The data to be shown returned carry out the operation of data filtering and paging processing again.
The step of by paging dispatching algorithm to the progress paging processing of filtered data, mainly include:To filtered
Data are verified, wherein verification may include verifying the repeatability of the legitimacy and data of data;The number passed through according to verification
According to quantity and the quantity of data of preset every page of display determine number of pages that data shows and every page of data shown.
Fig. 2 shows the preferred flow schematic diagrames that by paging dispatching algorithm filtered data are carried out with paging processing.
As shown in Fig. 2, by paging dispatching algorithm to filtered data carry out paging processing process may include as
Under step S201 to step S205.
Step S201:The quantity N of the sum M of filtered data and the data of every page of display is inputted, and sequentially inputs M item
Filtered data.
Step S202:The legitimacy of data after checksum filter thens follow the steps S203, otherwise, holds if verification passes through
Row step S205.
Wherein, the legitimacy for verifying data is mainly to verify the field of every data whether there is, and in verification data
Whether the format of appearance is correct, if the field of data exists and the format of data content is correct, verification passes through, and otherwise verifies not
Pass through.
Step S203:The repeatability of data after checksum filter thens follow the steps S204, otherwise, holds if verification passes through
Row step S205.
The repeatability of verification data mainly verifies whether every data repeats with the data content before it, if certain
The content of data and Data duplication before, then data verification do not pass through, and otherwise, verification passes through.
Step S204:The filtered data of M ' item passed through to verification determine paging.
Paging, the quantity M ' of the data mainly passed through according to verification are determined to the filtered data of M ' item that verification passes through
The quantity N of the data shown with every page determines the data of the number of pages that data are shown and every page of display, and then output should (M '/N) * N
Data.Wherein, number of pages P=M '/N that data are shown, P can downward round numbers, such as M '=31, N=6, then P takes 5, and by
The data of page 6 are abandoned, in this way, the showing interface of Widget is the data of full page to every page data of user, it is relatively beautiful,
And priority can be set for data, the preferential data for showing that user's attention rate is high, to keep the data for being abandoned display logical
Data often relatively low for user's attention rate, without will affect user experience.Certainly, it will be appreciated by those skilled in the art that ground
It is that the specific value of number of pages P=M '/N that data are shown, P can also carry out value according to the rules such as round up according to demand.
Step S205:Delete this filtered data.
After carrying out paging processing to the filtered data, the result that can be also handled according to paging updates Pagination Display
The configuration of control.Firstly, available data is updated according to (M '/N) the * N data exported after above-mentioned paging processing, it is then, right
Pagination Display control used in display data (including segmentation control and table view control) carries out configuration update, in order to clear
Ground illustrates the detailed process that the configuration updates, and Fig. 3 shows the excellent of the configuration of the update Pagination Display control of the embodiment of the present invention
Select flow diagram.
As shown in figure 3, the preferred flow of the configuration of the update Pagination Display control of the embodiment of the present invention includes following step
Rapid S301 to step S306.
Step S301:Initial page is set.
Specifically, the first page data in (M '/N) the * N data exported after paging processing is initial as being shown in
Data on the page, and be the page setup page iden-tity for showing data, wherein the mark of initial page is assigned a value of 0.
Step S302:By table view control refresh data list, to be divided according to the data of the data list
Page display.
Step S303:The state of Pagination Display control is set.
The state that Pagination Display control is arranged is mainly the key-press status that Pagination Display control is arranged.Pagination Display control packet
The key of the instruction for receiving user's input is included, and the key is including having chosen, normal optional and not optional three kinds of states, it should
Three kinds of states can mutually switch.The instruction of user's input includes page-turning instruction, and page-turning instruction mainly include display page up,
Show lower one page and show preset jump page, accordingly, can configure key display content be respectively " page up ",
" lower one page ", " jump page ".
In order to meet the use habit of user, the key of Pagination Display control can be set to two, i.e. the first key and
Second key, wherein the display content of the first key can be configured to " page up ", and the display content of the second key can be configured to
" lower one page " and " jump page ", in this way, showing lower one page and showing that the page-turning instruction of preset jump page can pass through multiplexing
Same key (the second key) receives.Also, user can only pass through click keys in the case where key is normal optional state
Page-turning instruction is inputted, and when key is clicked, the state of key can be switched to the state chosen.
The state of Pagination Display control is set in this step S303, is specifically included:It will show that content is pressing for " page up "
The state of key is set as non-optional state, also, will show that content is that the state of the key of " lower one page " is set as normally may be used
The state of choosing, so that when showing initial page, user can not input the page-turning instruction of display page up, but can be normal defeated
Enter the page-turning instruction for showing lower one page.
Step S304:Judge whether the number of pages that data are shown is one page, if so, thening follow the steps S305, otherwise executes step
Rapid S306.
Step S305:It is jump page by the display curriculum offering of the second key.
Wherein, which is that more specifical show can be arranged in jump page according to specific business demand
Show content, for example, can will show content if the data of Pagination Display are the commodity data for killing shopping the second for user
It is specifically configured to " more seconds kill ", thus the merchandise display page that will show that more seconds kill when user clicks second key.
Step S306:It is " lower one page " by the display curriculum offering of the second key.
Above-mentioned step S301 to step S306, which is described in detail, updates Pagination Display control according to the result of paging processing
The process of configuration can all start the process of configuration update whenever having data update, so as in subsequent step S103,
Data are shown at the interface of Widget by Pagination Display control, number can be shown according to the configuration of the above-mentioned update
According to.
Step S103:According to the instruction that user inputs, by Pagination Display control, by paging, treated that data are shown
In the interface of Widget.
Specifically, if page-turning instruction is display page up, judge that page up whether there is, and if it exists, then will be current
Otherwise the data that the data of the page update the page up for being shown as current page still show the data of current page;If page turning
Instruction is the lower one page of display, then judges whether current page is last page, if so, show preset jump page, otherwise,
The data of current page are updated to the data for being shown as lower one page of current page;If page-turning instruction is to show preset jump
The page then shows the data of jump page.
When user inputs page-turning instruction by modes such as click keys (the first key or the second key), Pagination Display
Control paging will be handled as procedure described above after (M '/N) * N data in page of data be shown in the boundary of Widget
In face.Show that the preferred flow of data can be as shown in Figure 4 by Pagination Display control.
Fig. 4 shows the preferred flow that the embodiment of the present invention shows data by Pagination Display control, specifically includes step
S401 to step S408.
Step S401:Whether the instruction for judging user's input is display page up, if so, S402 is thened follow the steps, otherwise,
Execute step S405.
Step S402:Judge that page up whether there is, if so, S403 is thened follow the steps, it is no to then follow the steps S404.
It in advance can be the page setup page iden-tity for showing data in the configuration of update Pagination Display control, and will
The mark of initial page is assigned a value of 0, judges that page up whether there is, and specifically can judge upper one by reading the value of page iden-tity
Page whether there is, if the value of page iden-tity is 0, indicate that page up is not present, otherwise page up exists.
Step S403:The data of current page are updated to the data for being shown as the page up of current page.
Specifically, the value that current page identifies is subtracted 1, and shows that the page after the value of current page mark subtracts 1 is corresponding
Data.
Step S404:Still show the data of current page.
Step S405:Whether the instruction for judging user's input is to show lower one page, if so, then follow the steps S406, otherwise,
Execute step S408.
Step S406:Judge whether current page is last page, if so, thening follow the steps S408, otherwise, executes step
S407。
Specifically, read current page mark value, and judge current page mark value and paging processing after
Whether the number of pages P (P=M '/N, and the downward round numbers of P) of (M '/N) * N data matches, for example, the mark assignment of initial page
It is 0, if number of pages P is 6, and the value for reading current page mark is 5, then it represents that the value of current page mark and paging are handled
The number of pages P of (M '/N) * N data later is matched, then otherwise it is not last page that current page, which is last page,.
Step S407:The data of current page are updated to the data for being shown as lower one page of current page.
Step S408:Show preset jump page.
The data of current page are updated to the data for being shown as lower one page of current page, that is, by current page mark
Value plus 1, and show current page mark value add 1 after the corresponding data of the page.
It should be noted that when (display page up shows lower one page and the preset jump of display for the instruction inputted according to user
Blade-rotating face) after corresponding with the instruction data of display, the state of the key of Pagination Display control may be updated and show content.Example
Such as, according to user input display page up instruction, the number of pages currently shown has been first page, then will display content be " on
The state of the key of one page " is switched to non-optional state, so that user can not continue the instruction of input display page up.Together
Sample will show that content alteration of the content for the key of " lower one page " is display if the number of pages currently shown is maximum number of pages
Specific jump page.
After correspondingly data are shown in completion, refresh the data shown in the interface of Widget, to count accordingly
According to showing user.
Fig. 5 is the main modular schematic diagram of the device according to an embodiment of the present invention based on Widget display data.
As shown in figure 5, the device 500 based on Widget display data of the embodiment of the present invention will include:Data acquisition mould
Block 501, paging processing module 502, data disaply moudle 503.Wherein,
Data acquisition module 501 carries out data for obtaining data to be shown from server, and to data to be shown
Filtering;
Paging processing module 502 is used to carry out paging processing to filtered data by paging dispatching algorithm;
Data disaply moudle 503 is used for the instruction inputted according to user, and by Pagination Display control, by paging, treated
Data are shown in the interface of Widget.
Paging processing module 502 can also be used in:Filtered data are verified, wherein verification mainly includes verification
The legitimacy of data and the repeatability of data;According to the data of the quantity and preset every page of display that verify the data passed through
Quantity determines the data of the number of pages that data are shown and every page of display.
Pagination Display control includes segmentation control and table view control, wherein segmentation control is such as
UISementedControl control is controlled for paging;Table view control such as UITableView control, for showing control
System.
Device 500 based on Widget display data may include configuration update module, which is mainly used for
The configuration of Pagination Display control is updated according to the result of paging processing.
Pagination Display control includes the key for receiving the instruction of user's input, and the key includes having chosen, normally
Optional and not optional three kinds of states.The instruction of user's input may include page-turning instruction, and page-turning instruction include display page up,
It shows lower one page and shows preset jump page.
Data disaply moudle 503 can also be used in:If page-turning instruction is display page up, judge whether page up is deposited
, and if it exists, the data of current page are then updated to the data for being shown as the page up of current page, otherwise, are still shown current
The data of the page;If page-turning instruction is to show lower one page, judge whether current page is last page, if so, display
Otherwise the data of current page are updated the data for being shown as lower one page of current page by preset jump page;If page turning
Instruction then shows the data of jump page to show preset jump page.
Below with reference to Fig. 6, it illustrates the computer systems 600 for the electronic equipment for being suitable for being used to realize the embodiment of the present application
Structural schematic diagram.Electronic equipment shown in Fig. 6 is only an example, function to the embodiment of the present application and should not use model
Shroud carrys out any restrictions.
As shown in fig. 6, computer system 600 includes central processing unit (CPU) 601, it can be read-only according to being stored in
Program in memory (ROM) 602 or be loaded into the program in random access storage device (RAM) 603 from storage section 608 and
Execute various movements appropriate and processing.In RAM 603, also it is stored with system 600 and operates required various programs and data.
CPU 601, ROM 602 and RAM 603 are connected with each other by bus 604.Input/output (I/O) interface 605 is also connected to always
Line 604.
I/O interface 605 is connected to lower component:Importation 606 including keyboard, mouse etc.;It is penetrated including such as cathode
The output par, c 607 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 608 including hard disk etc.;
And the communications portion 609 of the network interface card including LAN card, modem etc..Communications portion 609 via such as because
The network of spy's net executes communication process.Driver 610 is also connected to I/O interface 605 as needed.Detachable media 611, such as
Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 610, in order to read from thereon
Computer program be mounted into storage section 608 as needed.
Particularly, disclosed embodiment, the process described above with reference to flow chart may be implemented as counting according to the present invention
Calculation machine software program.For example, embodiment disclosed by the invention includes a kind of computer program product comprising be carried on computer
Computer program on readable medium, the computer program include the program code for method shown in execution flow chart.?
In such embodiment, which can be downloaded and installed from network by communications portion 609, and/or from can
Medium 611 is dismantled to be mounted.When the computer program is executed by central processing unit (CPU) 601, the system that executes the application
The above-mentioned function of middle restriction.
It should be noted that computer-readable medium shown in the present invention can be computer-readable signal media or meter
Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not
Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter
The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to:Electrical connection with one or more conducting wires, just
Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage
Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device,
Or above-mentioned any appropriate combination.In this application, computer readable storage medium can be it is any include or storage journey
The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this
In application, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal,
Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited
In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can
Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for
By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium
Program code can transmit with any suitable medium, including but not limited to:Wirelessly, electric wire, optical cable, RF etc. or above-mentioned
Any appropriate combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the application, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or more
Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box
The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical
On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants
It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute rule
The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction
It closes to realize.
Being described in module involved in the embodiment of the present invention can be realized by way of software, can also be by hard
The mode of part is realized.Described module also can be set in the processor, for example, can be described as:A kind of processor packet
Include data acquisition module 501, paging processing module 502, data disaply moudle 503.Wherein, the title of these modules is in certain feelings
The restriction to the module itself is not constituted under condition, for example, data acquisition module 501 is also described as " being used for from service
Device obtains data to be shown, and data to be shown are carried out with the module of data filtering ".
As on the other hand, the present invention also provides a kind of computer-readable medium, which be can be
Included in equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying equipment.Above-mentioned calculating
Machine readable medium carries one or more program, when said one or multiple programs are executed by the equipment, makes
Obtaining the equipment includes:Data to be shown are obtained from server, and data filtering is carried out to data to be shown;Pass through paging tune
It spends algorithm and paging processing is carried out to filtered data;It, will be at paging by Pagination Display control according to the instruction that user inputs
Data after reason are shown in the interface of Widget.
Technical solution according to an embodiment of the present invention obtains data to be shown from server, and to data to be shown
Data filtering is carried out, paging processing is carried out to filtered data by paging dispatching algorithm, according to the instruction that user inputs, is led to
Crossing Pagination Display control, treated that data are shown in the interface of Widget by paging.Use the technical side of the embodiment of the present invention
Case can be realized page-turning function up and down, so that a large amount of data can be shown in the limited interface Widget, to be user
More interested data are provided, abundant in content multiplicity is shown, avoids the visual fatigue for causing user, increase user couple
The good opinion of Widget improves user experience, and breaches the application mode of conventional Widget, execution efficiency height, program
Fast response time.
Above-mentioned specific embodiment, does not constitute a limitation on the scope of protection of the present invention.Those skilled in the art should be bright
It is white, design requirement and other factors are depended on, various modifications, combination, sub-portfolio and substitution can occur.It is any
Made modifications, equivalent substitutions and improvements etc. within the spirit and principles in the present invention, should be included in the scope of the present invention
Within.
Claims (14)
1. a kind of method based on Widget display data, which is characterized in that including:
Data to be shown are obtained from server, and data filtering is carried out to the data to be shown;
Paging processing is carried out to the filtered data by paging dispatching algorithm;
According to the instruction that user inputs, by Pagination Display control, by the paging, treated that data are shown in the Widget
Interface in.
2. the method according to claim 1, wherein the Pagination Display control includes segmentation control and table view
Figure control, wherein the segmentation control is controlled for paging, and the table view control is used for display control, the display control
System includes:Multiple cells are created according to the interface dimensions of the Widget, the multiple cell is used to show the number of one page
According to wherein showing a data in each cell, and being multiplexed multiple cell when showing the data of multiple pagings.
3. the method according to claim 1, wherein the data to be shown include image data, also, right
The data to be shown carry out data filtering, including:
It removes image data in the data to be shown and occupies the data to be displayed that memory space is more than preset threshold.
4. the method according to claim 1, wherein by paging dispatching algorithm to the filtered data into
The step of row paging is handled, including:
The filtered data are verified, the verification includes the legitimacy of verification data and the repeatability of data;
The page that data are shown is determined according to the quantity of the quantity of the data for verifying and passing through and the data of preset every page of display
Several and every page of display data.
5. the method according to claim 1, wherein the Pagination Display control includes for receiving user's input
Instruction key, and the key include chosen, normal optional and not optional three kinds of states.
6. the method according to claim 1, wherein the instruction of user input includes page-turning instruction, and institute
It states page-turning instruction to include display page up, show lower one page and the preset jump page of display, according to the instruction that user inputs, lead to
Crossing Pagination Display control, treated that data show the step in the interface of the Widget by the paging, including:
If the page-turning instruction is display page up, judge that the page up whether there is, and if it exists, then by current page
Data update the data of page up for being shown as the current page and otherwise still show the data of the current page;
If the page-turning instruction is to show lower one page, judge whether current page is last page, if so, display is default
Jump page the data of current page are otherwise updated to the data for being shown as lower one page of the current page;
If the page-turning instruction is to show preset jump page, the data of the jump page are shown.
7. a kind of device based on Widget display data, which is characterized in that including:
Data acquisition module carries out data mistake for obtaining data to be shown from server, and to the data to be shown
Filter;
Paging processing module, for carrying out paging processing to the filtered data by paging dispatching algorithm;
Data disaply moudle, the instruction for being inputted according to user, by Pagination Display control by the paging treated number
According to being shown in the interface of the Widget.
8. device according to claim 7, which is characterized in that the Pagination Display control includes segmentation control and table view
Figure control, wherein the segmentation control is controlled for paging, and the table view control is used for display control, the display control
System includes:Multiple cells are created according to the interface dimensions of the Widget, the multiple cell is used to show the number of one page
According to wherein showing a data in each cell, and being multiplexed multiple cell when showing the data of multiple pagings.
9. device according to claim 7, which is characterized in that the data to be shown include image data, also, institute
Data acquisition module is stated to be also used to:
It removes image data in the data to be shown and occupies the data to be displayed that memory space is more than preset threshold.
10. device according to claim 7, which is characterized in that the paging processing module is also used to:
The filtered data are verified, the verification includes the legitimacy of verification data and the repeatability of data;
The page that data are shown is determined according to the quantity of the quantity of the data for verifying and passing through and the data of preset every page of display
Several and every page of display data.
11. device according to claim 7, which is characterized in that the Pagination Display control includes defeated for receiving user
The key of the instruction entered, and the key is including having chosen, normal optional and not optional three kinds of states.
12. device according to claim 7, which is characterized in that the instruction of user's input includes page-turning instruction, and institute
Page-turning instruction is stated to include display page up, show that lower one page and the preset jump page of display, the data disaply moudle are also used
In:
If the page-turning instruction is display page up, judge that the page up whether there is, and if it exists, then by current page
Data update the data of page up for being shown as the current page and otherwise still show the data of the current page;
If the page-turning instruction is to show lower one page, judge whether current page is last page, if so, display is default
Jump page the data of current page are otherwise updated to the data for being shown as lower one page of the current page;
If the page-turning instruction is to show preset jump page, the data of the jump page are shown.
13. a kind of electronic equipment, which is characterized in that including:
One or more processors;
Memory, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors
Realize such as method as claimed in any one of claims 1 to 6.
14. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that described program is held by processor
Such as method as claimed in any one of claims 1 to 6 is realized when row.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710286945.8A CN108829311A (en) | 2017-04-27 | 2017-04-27 | A kind of method and apparatus based on Widget display data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710286945.8A CN108829311A (en) | 2017-04-27 | 2017-04-27 | A kind of method and apparatus based on Widget display data |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108829311A true CN108829311A (en) | 2018-11-16 |
Family
ID=64154728
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710286945.8A Pending CN108829311A (en) | 2017-04-27 | 2017-04-27 | A kind of method and apparatus based on Widget display data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108829311A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111796897A (en) * | 2020-07-03 | 2020-10-20 | 北京达佳互联信息技术有限公司 | Page display method and device, storage medium and electronic equipment |
CN112286419A (en) * | 2019-07-24 | 2021-01-29 | 腾讯科技(深圳)有限公司 | List data loading method and device, terminal and storage medium |
CN113835790A (en) * | 2020-06-23 | 2021-12-24 | 北京字节跳动网络技术有限公司 | Paging page display method and device based on Android |
CN113986439A (en) * | 2021-11-01 | 2022-01-28 | 挂号网(杭州)科技有限公司 | Data display method and device |
CN114676190A (en) * | 2022-05-27 | 2022-06-28 | 太平金融科技服务(上海)有限公司深圳分公司 | Data display method and device, computer equipment and storage medium |
CN114791984A (en) * | 2022-06-27 | 2022-07-26 | 北京东方国信科技股份有限公司 | Navigation tree display method, navigation tree display device and electronic equipment |
CN116302566A (en) * | 2023-05-12 | 2023-06-23 | 深圳市新蕾电子有限公司 | Global variable customizable memory management method |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103559264A (en) * | 2013-11-04 | 2014-02-05 | 北京中搜网络技术股份有限公司 | Widget data timely updating method and device |
CN105468463A (en) * | 2014-09-09 | 2016-04-06 | 联想(北京)有限公司 | Information processing method and electronic device |
CN105677313A (en) * | 2015-11-06 | 2016-06-15 | 乐视移动智能信息技术(北京)有限公司 | Display method, device and terminal equipment for notification messages |
CN106528136A (en) * | 2016-10-27 | 2017-03-22 | 北京京东尚科信息技术有限公司 | Widget-based display method and apparatus, and terminal device |
CN106599135A (en) * | 2016-12-02 | 2017-04-26 | 湖北荆楚网络科技股份有限公司 | Terminal-adaptive picture processing method |
-
2017
- 2017-04-27 CN CN201710286945.8A patent/CN108829311A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103559264A (en) * | 2013-11-04 | 2014-02-05 | 北京中搜网络技术股份有限公司 | Widget data timely updating method and device |
CN105468463A (en) * | 2014-09-09 | 2016-04-06 | 联想(北京)有限公司 | Information processing method and electronic device |
CN105677313A (en) * | 2015-11-06 | 2016-06-15 | 乐视移动智能信息技术(北京)有限公司 | Display method, device and terminal equipment for notification messages |
CN106528136A (en) * | 2016-10-27 | 2017-03-22 | 北京京东尚科信息技术有限公司 | Widget-based display method and apparatus, and terminal device |
CN106599135A (en) * | 2016-12-02 | 2017-04-26 | 湖北荆楚网络科技股份有限公司 | Terminal-adaptive picture processing method |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112286419A (en) * | 2019-07-24 | 2021-01-29 | 腾讯科技(深圳)有限公司 | List data loading method and device, terminal and storage medium |
CN112286419B (en) * | 2019-07-24 | 2024-03-08 | 腾讯科技(深圳)有限公司 | Method, device, terminal and storage medium for loading list data |
CN113835790A (en) * | 2020-06-23 | 2021-12-24 | 北京字节跳动网络技术有限公司 | Paging page display method and device based on Android |
CN113835790B (en) * | 2020-06-23 | 2024-03-19 | 北京字节跳动网络技术有限公司 | Paging page display method and device based on Android |
CN111796897A (en) * | 2020-07-03 | 2020-10-20 | 北京达佳互联信息技术有限公司 | Page display method and device, storage medium and electronic equipment |
CN113986439A (en) * | 2021-11-01 | 2022-01-28 | 挂号网(杭州)科技有限公司 | Data display method and device |
CN114676190A (en) * | 2022-05-27 | 2022-06-28 | 太平金融科技服务(上海)有限公司深圳分公司 | Data display method and device, computer equipment and storage medium |
CN114676190B (en) * | 2022-05-27 | 2022-10-11 | 太平金融科技服务(上海)有限公司深圳分公司 | Data display method and device, computer equipment and storage medium |
CN114791984A (en) * | 2022-06-27 | 2022-07-26 | 北京东方国信科技股份有限公司 | Navigation tree display method, navigation tree display device and electronic equipment |
CN116302566A (en) * | 2023-05-12 | 2023-06-23 | 深圳市新蕾电子有限公司 | Global variable customizable memory management method |
CN116302566B (en) * | 2023-05-12 | 2023-08-18 | 深圳市新蕾电子有限公司 | Global variable customizable memory management method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108829311A (en) | A kind of method and apparatus based on Widget display data | |
CN110096344A (en) | Task management method, system, server cluster and computer-readable medium | |
CN109739478A (en) | Front end project automated construction method, device, storage medium and electronic equipment | |
CN109299088A (en) | Mass data storage means, device, storage medium and electronic equipment | |
CN109255072A (en) | Information recalls method and device, computer storage medium, electronic equipment | |
CN107797804A (en) | The method and apparatus for generating front end interactive interface | |
CN109981322A (en) | The method and apparatus of cloud resource management based on label | |
CN109981719A (en) | Information processing method and its system, computer system and computer readable medium | |
CN108733787A (en) | Database operation method, device, electronic equipment and storage medium | |
CN108804484A (en) | The data measures and procedures for the examination and approval, equipment and computer readable storage medium | |
CN109831532A (en) | Data sharing method, device, equipment and medium | |
CN109547261A (en) | Service line switching method, device, electronic equipment and storage medium | |
CN109522082A (en) | Interface jump method, device, electronic equipment and the medium of application software | |
CN109101294A (en) | Collecting method and plug-in unit, electronic equipment and storage medium | |
CN106843794A (en) | A kind of multi-screen display method and system based on Android | |
CN109002282A (en) | A kind of method and apparatus for realizing animation effect in web page exploitation | |
CN110020349A (en) | The method and device of page rendering | |
CN102855061A (en) | Mailbox interface interaction method and device based on multi-label window | |
CN110413367A (en) | Task creation method, apparatus, storage medium and electronic equipment | |
CN115617441A (en) | Method and device for binding model and primitive, storage medium and computer equipment | |
CN109992733A (en) | Method, apparatus, electronic equipment and the storage medium that information is shared | |
CN108959636A (en) | Data processing method, device, system, computer-readable medium | |
CN109683726A (en) | Characters input method, device, electronic equipment and storage medium | |
CN109491687A (en) | A kind of hot update method, device, terminal and the readable medium of application software | |
CN108710708A (en) | Report processing method, device, medium and electronic equipment |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181116 |