CN112083859B - Multi-page data aggregation processing method and device - Google Patents

Multi-page data aggregation processing method and device Download PDF

Info

Publication number
CN112083859B
CN112083859B CN202010908001.1A CN202010908001A CN112083859B CN 112083859 B CN112083859 B CN 112083859B CN 202010908001 A CN202010908001 A CN 202010908001A CN 112083859 B CN112083859 B CN 112083859B
Authority
CN
China
Prior art keywords
page
layout information
transverse
label
switching
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.)
Active
Application number
CN202010908001.1A
Other languages
Chinese (zh)
Other versions
CN112083859A (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.)
Beijing Jindi Credit Service Co ltd
Original Assignee
Beijing Jindi Credit Service Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jindi Credit Service Co ltd filed Critical Beijing Jindi Credit Service Co ltd
Priority to CN202010908001.1A priority Critical patent/CN112083859B/en
Publication of CN112083859A publication Critical patent/CN112083859A/en
Application granted granted Critical
Publication of CN112083859B publication Critical patent/CN112083859B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/106Display of layout of documents; Previewing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention provides a method and a device for processing multi-page data aggregation, wherein the method comprises the following steps: based on the platform system page component, creating a page with transverse layout information and longitudinal layout information, wherein the transverse layout information comprises a plurality of transverse tags, and each transverse tag is associated with corresponding longitudinal layout information; receiving a page operation instruction triggered by a user, and acquiring data switching information carried in the page operation instruction; acquiring a corresponding preset switching strategy according to data switching information carried in the page operation instruction, and switching the longitudinal layout information associated with the currently displayed transverse label into the longitudinal layout information associated with the target transverse label according to the corresponding preset switching strategy; and loading longitudinal layout information corresponding to the target transverse label, and calling a display interface to display. According to the invention, the aggregation processing of the pages with different structures can be carried out without a large amount of data transformation, so that the page display effect is improved, and the development cost is greatly reduced.

Description

Multi-page data aggregation processing method and device
Technical Field
The invention relates to the technical field of page processing, in particular to a multi-page data aggregation processing method and device.
Background
Generally, pages with similar functions or attributes are often displayed in a single page. Therefore, the method is relatively simple, but the user needs to frequently return the function index, select a new function and enter the next-level page again to check the new function page, so that the complexity of the function page level is improved, the use enthusiasm of the user is reduced, and the exposure of the function is further reduced.
The existing improvement scheme requires that all pages have the same structure, the interaction mode is single, and the expansibility is poor. If pages with different structures need to be aggregated together, a great deal of reconstruction is needed, the development cost of the front end and the back end is high, and great limitation exists.
Disclosure of Invention
The invention aims to provide a multi-page data aggregation processing method and device to solve the technical problem of single-page display in the prior art.
According to a first aspect of the present invention, a method for processing multi-page data aggregation is provided, which includes:
based on the platform system page component, creating a page with transverse layout information and longitudinal layout information, wherein the transverse layout information comprises a plurality of transverse tags, and each transverse tag is associated with corresponding longitudinal layout information;
receiving a page operation instruction triggered by a user, and acquiring data switching information carried in the page operation instruction;
acquiring a corresponding preset switching strategy according to data switching information carried in the page operation instruction, and switching the longitudinal layout information associated with the currently displayed transverse label into the longitudinal layout information associated with the target transverse label according to the corresponding preset switching strategy;
and loading longitudinal layout information corresponding to the target transverse label, and calling a display interface to display.
Further, switching the longitudinal layout information associated with the currently displayed transverse label into the longitudinal layout information associated with the target transverse label according to a corresponding preset switching strategy, including:
if the data switching information carried in the page operation instruction is determined to meet a first switching condition, judging whether the currently displayed longitudinal layout information is the last page information;
if so, taking the next transverse label of the current transverse label as a target transverse label, and acquiring longitudinal layout information associated with the next transverse label;
and if not, the current transverse label is the target transverse label, and next page information of the currently displayed longitudinal layout information is loaded and displayed.
Further, switching the longitudinal layout information associated with the currently displayed transverse label into the longitudinal layout information associated with the target transverse label according to a corresponding preset switching strategy, including:
if the data switching information carried in the page operation instruction is determined to meet a second switching condition, judging whether the currently displayed longitudinal layout information is first page information;
if so, taking the last transverse label of the current transverse label as a target transverse label, and acquiring the page information of the longitudinal layout associated with the last transverse label;
if not, the current transverse label is the target transverse label, and the previous page information of the currently displayed longitudinal layout information is obtained and displayed.
Further, the method further comprises:
acquiring a switching operation value included in a page operation instruction triggered by a user;
judging whether the switching operation value reaches a top interval threshold or a bottom interval threshold;
and if so, switching the longitudinal layout information associated with the currently displayed transverse label to switch the longitudinal layout information.
Further, before loading the longitudinal layout information corresponding to the target horizontal label, the method further includes:
judging whether longitudinal layout information corresponding to the target transverse label is loaded or not;
if the label is loaded, acquiring and displaying the loaded longitudinal layout information corresponding to the target transverse label;
if the page is not loaded, adding a target page mark to the longitudinal layout information corresponding to the target transverse tag, and checking whether the mark of the current page is consistent with the target page mark;
if the page operation instruction is consistent with the page operation instruction, when the page operation instruction is determined to be the switching operation as the cross-page switching according to the data switching information, recording a mark of a target page to be displayed, loading the target page with the recorded mark, and displaying.
Further, after loading the longitudinal layout information corresponding to the target horizontal label, the method further includes:
and caching the longitudinal layout information corresponding to the switched target transverse label.
Further, after caching the vertical layout information corresponding to the target horizontal label after the switching is completed, the method further includes:
calculating the weight of each cached page by using a preset algorithm;
sorting the weight values of the cached pages from low to high;
and releasing the page corresponding to the weight of the first n bits, wherein n is more than or equal to 1.
Further, calculating the weight of each cached page by using a preset algorithm, including:
calculating the distance between the cached page and the current page according to a shortest distance algorithm;
acquiring page display times of a cached page;
setting a first ratio for the distance between the cached page and the current page, and setting a second ratio for the page display times;
and calculating the weight of each cached page according to the distance between the cached page and the current page, the first ratio, the page display times and the second ratio.
Further, calculating the weight of each cached page according to the distance between the cached page and the current page, the first ratio, the page display times and the second ratio, and the method comprises the following steps:
calculating the weight of each cached page according to the following calculation formula:
weight value of 0.4+ displayCount 0.6(1)
In formula (1), distance represents the distance from the current page, and displayCount represents the number of page presentations.
Further, calculating the weight of each cached page according to the distance between the cached page and the current page, the first ratio, the page display times and the second ratio, and the method comprises the following steps:
calculating the weight of each cached page according to the following calculation formula:
weight value of distance 0.5+ displayCount 0.5(2)
In the formula (2), distance represents the distance from the current page, and displayCount represents the number of page presentations.
According to a second aspect of the present invention, there is provided a multi-page data aggregation processing apparatus, comprising:
the system comprises a creating unit, a processing unit and a display unit, wherein the creating unit is used for creating a page with transverse layout information and longitudinal layout information based on a platform system page component, the transverse layout information comprises a plurality of transverse tags, and each transverse tag is associated with corresponding longitudinal layout information;
the receiving unit is used for receiving a page operation instruction triggered by a user and acquiring data switching information carried in the page operation instruction;
the switching unit is used for acquiring a corresponding preset switching strategy according to the data switching information carried in the page operation instruction, and switching the longitudinal layout information associated with the currently displayed transverse label into the longitudinal layout information associated with the target transverse label according to the corresponding preset switching strategy;
and the loading unit is used for loading the longitudinal layout information corresponding to the target transverse label and calling the display interface for displaying.
Further, the switching unit is specifically configured to:
if the data switching information carried in the page operation instruction is determined to meet a first switching condition, judging whether the currently displayed longitudinal layout information is the last page information;
if so, taking the next transverse label of the current transverse label as a target transverse label, and acquiring longitudinal layout information associated with the next transverse label;
and if not, the current transverse label is the target transverse label, and next page information of the currently displayed longitudinal layout information is loaded and displayed.
Further, the switching unit is specifically configured to:
if the data switching information carried in the page operation instruction is determined to meet a second switching condition, judging whether the currently displayed longitudinal layout information is first page information;
if so, taking the last transverse label of the current transverse label as a target transverse label, and acquiring the page information of the longitudinal layout associated with the last transverse label;
if not, the current transverse label is the target transverse label, and the previous page information of the currently displayed longitudinal layout information is obtained and displayed.
Further, still include:
the page changing unit is used for acquiring a switching operation value included in a page operation instruction triggered by a user;
and judging whether the switching operation value reaches a top spacing threshold or a bottom spacing threshold;
and if so, switching the longitudinal layout information associated with the currently displayed transverse label to switch the longitudinal layout information.
Further, still include:
the judging unit is used for judging whether the longitudinal layout information corresponding to the target transverse label is loaded or not;
if the label is loaded, acquiring and displaying the loaded longitudinal layout information corresponding to the target transverse label;
if the page is not loaded, adding a target page mark to the longitudinal layout information corresponding to the target transverse tag, and checking whether the mark of the current page is consistent with the target page mark;
if the page operation instruction is consistent with the page operation instruction, when the page operation instruction is determined to be the switching operation as the cross-page switching according to the data switching information, recording a mark of a target page to be displayed, loading the target page with the recorded mark, and displaying.
Further, still include:
and the cache unit is used for caching the longitudinal layout information corresponding to the switched target transverse label.
Further, still include:
the calculation unit is used for calculating the weight of each cached page by using a preset algorithm;
the sorting unit is used for sorting the weight values of all cached pages from low to high;
and the release unit is used for releasing the page corresponding to the front n-bit weight, wherein n is more than or equal to 1.
Further, the computing unit is specifically configured to:
calculating the distance between the cached page and the current page according to a shortest distance algorithm;
acquiring page display times of a cached page;
setting a first ratio for the distance between the cached page and the current page, and setting a second ratio for the page display times;
and calculating the weight of each cached page according to the distance between the cached page and the current page, the first ratio, the page display times and the second ratio.
Further, the formula for calculating the weight of the cached page is as follows:
weight value of 0.4+ displayCount 0.6(1)
In formula (1), distance represents the distance from the current page, and displayCount represents the number of page presentations.
Further, the formula for calculating the weight of the cached page is as follows:
weight value of distance 0.5+ displayCount 0.5(2)
In the formula (2), distance represents the distance from the current page, and displayCount represents the number of page presentations.
According to a third aspect of the present invention there is provided a storage medium storing computer program instructions for performing a method according to the present invention.
According to a fourth aspect of the invention, there is provided a computing device comprising: a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein the computer program instructions, when executed by the processor, trigger the computing device to perform the method of the invention.
According to the multi-page data aggregation processing method and device provided by the invention, when multi-page display is realized, the conventional mode does not limit the page structure, various interaction modes are supported, the expansibility is good, the development and use cost is low, and the user experience is greatly improved.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments thereof, made with reference to the following drawings:
FIG. 1 is a schematic flow chart of a multi-page data aggregation processing method according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a multi-page data aggregation processing apparatus according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an operation flow of a multi-page data aggregation processing method according to an embodiment of the present invention;
FIGS. 4A-4B are diagrams illustrating horizontal switching for multi-page data aggregation processing according to an embodiment of the present invention;
FIGS. 5A-5B are vertical switch views illustrating multi-page data aggregation processing according to an embodiment of the present invention.
Detailed Description
The present invention is described in further detail below with reference to the attached drawing figures.
Fig. 1 is a multi-page data aggregation processing method according to an embodiment of the present invention, including:
101, creating a page with transverse layout information and longitudinal layout information based on a platform system page component, wherein the transverse layout information comprises a plurality of transverse tags, and each transverse tag is associated with corresponding longitudinal layout information;
102, receiving a page operation instruction triggered by a user, and acquiring data switching information carried in the page operation instruction;
103, acquiring a corresponding preset switching strategy according to the data switching information carried in the page operation instruction, and switching the longitudinal layout information associated with the currently displayed transverse label into the longitudinal layout information associated with the target transverse label according to the corresponding preset switching strategy;
and 104, loading longitudinal layout information corresponding to the target transverse label, and calling a display interface for displaying.
The multi-page data aggregation processing method in the embodiment may be applied to various system platforms, for example, Android and iOS operating platforms may be mainly used. The embodiment can realize the switching between the horizontal mode and the vertical mode by arranging the page into the horizontal mode and the vertical mode. Therefore, the multi-page continuous display is realized, the function index does not need to be frequently returned by a user, the page structure is not limited, various interaction modes are supported, the expansibility is good, the user experience is greatly improved, a large amount of modification cost does not need to be invested, and the development and use cost is low.
Creating a page with transverse layout information and longitudinal layout information based on a platform system page component, wherein the transverse layout information comprises a plurality of transverse tags, and each transverse tag is associated with corresponding longitudinal layout information in 101;
in this exemplary embodiment, the horizontal layout information is information horizontally arranged on a page, the horizontal layout information may include a plurality of horizontal tags, and a horizontal tag may be a tag including each dimension information of some main information, or a category name after classifying some information, for example, a horizontal tag in this exemplary embodiment may be a name of each enterprise dimension information of some enterprise: shareholder information, ultimate beneficiaries, actual control rights, financial analysis, and the like. Each horizontal label is associated with corresponding vertical layout information, which is specific information of the dimension corresponding to the horizontal label, for example, the vertical layout information of the "actual control right" of the horizontal label is a specific actual control right situation of the enterprise, such as including the name of the stock-holding company, the investment proportion, the investment chain, and so on.
In 102, receiving a page operation instruction triggered by a user, and acquiring data switching information carried in the page operation instruction;
the user-triggered page operation instruction may be an instruction triggered according to a conventional gesture trajectory, for example, a user may perform a horizontal operation and a vertical operation to trigger a page operation instruction, where the horizontal operation may be divided into a rightward sliding operation and a leftward sliding operation; the longitudinal operation may be divided into an upward slide and a downward slide.
As shown in fig. 4A-4B, the display diagram shows the moving end page switching horizontally, and the page on the right side in the diagram is the page on the left side obtained by the user sliding to the right. The "final beneficiary 1", "actual control 4" and "financial analysis" in FIGS. 4A-4B are all horizontal labels; the left part of fig. 4A-4B shows the vertical layout information corresponding to "actual control authority 4".
As shown in FIGS. 5A-5B, the left page is a process diagram when the right page is slid up. In FIGS. 5A-5B, "principal," "fixed information," "final beneficiary 1," and "actual control 4" are all horizontal labels; the left and right portions of fig. 5A-5B each show the vertical layout information corresponding to the "final beneficiary 1".
In 103, switching the longitudinal layout information associated with the currently displayed transverse label to the longitudinal layout information associated with the target transverse label according to a corresponding preset switching policy, including:
1031a, if it is determined that the data switching information carried in the page operation instruction meets the first switching condition, judging whether the currently displayed longitudinal layout information is the last page information;
1032a, if yes, taking a next transverse label of the current transverse label as a target transverse label, and acquiring longitudinal layout information associated with the next transverse label;
1032a, if not, the current transverse label is the target transverse label, and next page information of the currently displayed longitudinal layout information is loaded and displayed.
If the user instruction is to "slide up" the page, that is, the first switching condition is to complete the page turning operation by "slide up" the page, it is necessary to determine whether the longitudinal layout information corresponding to the current transverse tag is the last page information.
If the last page of the longitudinal layout information corresponding to the current transverse label is displayed, the longitudinal layout information corresponding to the next transverse label is displayed; otherwise, displaying the next page of the longitudinal layout information corresponding to the current transverse label.
As shown in fig. 5A-5B, it is assumed that the right part of fig. 5A-5B is the last page of the longitudinal layout information corresponding to the "final beneficiary 1"; the left side part is the penultimate page of the vertical layout information corresponding to the "final beneficiary 1". As shown in fig. 4A-4B, it is assumed that the left part of fig. 4A-4B is the first page of the vertical layout information corresponding to "actual control right 4".
When the current page is the left part of fig. 5A-5B, the currently displayed vertical layout information is not the last page information, and after the user "slides up" the page, the right part of fig. 5A-5B is loaded for display.
When the current page is the right part of fig. 5A-5B, the currently displayed vertical layout information is the last page information, and after the user "slides up" the page, the user takes the "actual control right 4" as the target horizontal label to obtain the vertical layout information associated with the "actual control right 4", as shown in the left part of fig. 4A-4B.
In 103, switching the longitudinal layout information associated with the currently displayed transverse label to the longitudinal layout information associated with the target transverse label according to a corresponding preset switching policy, including:
1031b, if it is determined that the data switching information carried in the page operation instruction meets the second switching condition, judging whether the currently displayed longitudinal layout information is the home page information;
1032b, if yes, taking the previous transverse label of the current transverse label as a target transverse label, and acquiring the page information of the longitudinal layout associated with the previous transverse label;
1033b, if not, the current transverse label is the target transverse label, and the last page information of the currently displayed longitudinal layout information is obtained and displayed.
If the user instruction is to "draw down" the page, that is, the second switching condition is to complete the page turning operation by "drawing down" the page, it is necessary to determine whether the longitudinal layout information corresponding to the current horizontal tab is the first page information.
If the longitudinal layout information corresponding to the current transverse label is the first page, the longitudinal layout information corresponding to the transverse label is displayed; otherwise, displaying the last page of the longitudinal layout information corresponding to the current transverse label.
As shown in fig. 4A-4B, it is assumed that the left part of fig. 4A-4B is the first page of the vertical layout information corresponding to "actual control right 4". And after the user slides down the page, if the currently displayed longitudinal layout information is the first page information, taking the final beneficiary 1 as a target transverse label to acquire the longitudinal layout information associated with the actual control right 4.
The method further comprises the following steps:
105, acquiring a switching operation value included in a page operation instruction triggered by a user;
106, judging whether the switching operation value reaches a top interval threshold value or a bottom interval threshold value;
and 107, if so, switching the vertical layout information associated with the currently displayed horizontal label to switch the vertical layout information.
The switching operation value may be the strength of the page operation triggered by the user, or the sliding distance of the page corresponding to the strength, or the position of the page reached during the page operation.
As shown in fig. 4A-4B and 5A-5B, in the present embodiment, the vertical switching: when the bottom of the dimension is reached, the switching operation value can be the position of the bottom of the reached page, the next page can be quickly reached by continuously pulling up, or the bottom guide button is directly clicked to reach. Transverse switching: the next page can be reached by directly sliding the page transversely left and right on the current page.
104, before loading the vertical layout information corresponding to the target horizontal label, the method further includes:
108, judging whether the longitudinal layout information corresponding to the target transverse label is loaded;
109, if the label is loaded, acquiring and displaying the loaded longitudinal layout information corresponding to the target transverse label;
110, if the page is not loaded, adding a target page mark to the longitudinal layout information corresponding to the target transverse label, and checking whether the mark of the current page is consistent with the target page mark;
and 111, if the page operation instruction is consistent with the data switching information, when the page operation instruction is determined to be the switching operation and is the cross-page switching operation, recording a mark of a target page to be displayed, loading the marked target page, and displaying.
After the switching operation of the user is completed, judging whether the current page is loaded or not; if not, executing: for the target page binding mark to be displayed, after the subscript of the current page is checked to be consistent with the mark of the target page: when the switching operation is continuous page-by-page switching, each target page to be displayed is loaded and displayed; when the switching operation is cross-page switching, recording subscripts of target pages to be displayed, only loading the target pages with the recorded subscripts, and displaying; and if the current page is loaded, directly displaying the current page.
In this embodiment, first, each page to be displayed is created. For example, the following are created: a. b, c, d. And caching the pages a, b, c and d. The current page displayed by the mobile terminal is the current page. For example, if page a is switched to b, then the current page is b.
If the user switches page across, the subscript of the target page is recorded, the non-target page is skipped, and only the target page is loaded. And if the user slides the pages continuously and the sliding speed is high, waiting for the stopping of the sliding action of the user to display the target page. If the page has already been loaded, the page is displayed directly. If the target page is not loaded, the page binding mark k is delayed to be loaded, and whether the mark k of the page is consistent with the subscript of the current position or not is checked when the page is loaded. Only if the subscripts are consistent will the page be loaded.
In 104, after loading the vertical layout information corresponding to the target horizontal label, the method further includes:
and 112, caching the vertical layout information corresponding to the switched target horizontal label.
112, caching the vertical layout information corresponding to the target horizontal label after the switching is completed, further comprising:
113, calculating the weight of each cached page by using a preset algorithm;
114, sorting the weight values of the cached pages from low to high;
115, releasing the page corresponding to the front n-bit weight value, wherein n is more than or equal to 1.
Wherein, the calculating the weight of each cached page by using a preset algorithm in 113 includes:
1131, calculating the distance between the cached page and the current page according to a shortest distance algorithm;
1132, acquiring page display times of the cached page;
1133, setting a first ratio for the distance between the cached page and the current page, and setting a second ratio for the page display times;
1134, calculating the weight of each cached page according to the distance between the cached page and the current page, the first ratio, the page display times and the second ratio.
In the present embodiment, the preset algorithm may include an LRU algorithm and a shortest distance algorithm.
The calculation formula of the weight of each cached page is as follows:
weight value of 0.4+ displayCount 0.6(1)
In the formula (1), distance represents the distance from the page, and displayCount represents the number of page presentations.
In the above example, after switching to the page b, there may be an overload situation in the background at this time, so that the page with the overload cache needs to be released, thereby improving the efficiency of the background.
In another embodiment, in the calculation of caching the loaded pages:
the calculation formula of the weight of each loaded page is as follows:
weight value of distance 0.5+ displayCount 0.5(2)
In the formula (2), distance represents the distance from the page, and displayCount represents the number of page presentations.
In this embodiment, the page of the overload cache is released, so that the loading efficiency is improved.
On one hand, the development process is simplified, the page transformation cost is greatly reduced, and the efficiency is improved; on the other hand, various page switching modes are supported, the method has stronger adaptability to the use habits of different users, and the usability of the product is improved.
The technical solution of the present embodiment is described in detail by taking examples as follows:
s1, setting layout based on system components of different platforms, and constructing different layout modes to be supported;
for example, the iOS side supports horizontal and vertical page switching (Android can use ViewPager to process layout problems).
Creating UICollectionViewController, constructing horizon layout and vertical layout, setting a page to be switched for the whole page, and setting the attributes of layout, Item Size, Item Spacing and the like. The horizon layout is set to be free-rolling and the vertical layout is set to be non-free-rolling to avoid up-down sliding and interaction conflict of internal pages.
S2, creating page cache;
and creating a page cache NScache for caching the successfully created pages.
S3, processing page switching;
the page defaults to the horizontal layout mode of horizon layout, and the user can freely scroll in the x-axis direction.
When a user pulls down a page, the vertical layout mode of the vertical layout mode can be automatically switched to, after the page is pulled down, the top distance reaches a set threshold value 50pt (which can be changed according to requirements), and when the user releases the hand, the page can be automatically switched to the previous page.
Similarly, when the user pulls up the page, the vertical layout mode of the vertical layout mode is automatically switched. After the upper page is pulled up, the bottom space reaches a set threshold value of 50pt (which can be changed according to requirements), and when the user releases his hand, the next page can be automatically switched to.
Some pages support multiple loads of data, which can be relatively complex. For UITableViewController, we can monitor the state of page load data; for more complex pages, the state to be monitored can be customized by the developer.
When a page is loading more data, the pull-up behavior is handled by the page itself. And after the page data is loaded, the user pulls up again, the bottom distance reaches a threshold value, and the next page can be automatically turned over to display the data of the next page.
S4, finishing page switching;
and checking the page state, storing the current page position, and calling the page state back to the developer so as to facilitate the developer to perform custom logic processing.
S5, refreshing the cache;
and caching the current page, and releasing the overload cache by using an LRU algorithm and a shortest distance algorithm. And calculating the weight of each cache page according to a weighting formula distance (distance from the current page) 0.4+ displayCount (page display times) 0.6, and then sorting to eliminate the pages with lower priority.
As shown in fig. 2, the apparatus for processing aggregation of multiple pages data provided in this embodiment includes:
the creating unit 21 is configured to create a page having horizontal layout information and vertical layout information based on the platform system page component, where the horizontal layout information includes a plurality of horizontal tags, and each horizontal tag is associated with corresponding vertical layout information;
the receiving unit 22 is configured to receive a page operation instruction triggered by a user, and acquire data switching information carried in the page operation instruction;
the switching unit 23 is configured to acquire a corresponding preset switching policy according to data switching information carried in the page operation instruction, and switch the longitudinal layout information associated with the currently displayed transverse tag into the longitudinal layout information associated with the target transverse tag according to the corresponding preset switching policy;
and the loading unit 24 is configured to load the longitudinal layout information corresponding to the target horizontal tag, and call the display interface to display the information.
The switching unit 23 is specifically configured to:
if the data switching information carried in the page operation instruction is determined to meet a first switching condition, judging whether the currently displayed longitudinal layout information is the last page information;
if so, taking the next transverse label of the current transverse label as a target transverse label, and acquiring longitudinal layout information associated with the next transverse label;
and if not, the current transverse label is the target transverse label, and next page information of the currently displayed longitudinal layout information is loaded and displayed.
The switching unit 23 is specifically configured to:
if the data switching information carried in the page operation instruction is determined to meet a second switching condition, judging whether the currently displayed longitudinal layout information is first page information;
if so, taking the last transverse label of the current transverse label as a target transverse label, and acquiring the page information of the longitudinal layout associated with the last transverse label;
if not, the current transverse label is the target transverse label, and the previous page information of the currently displayed longitudinal layout information is obtained and displayed.
The device, still include:
a page changing unit 25, configured to obtain a switching operation value included in a page operation instruction triggered by a user;
and judging whether the switching operation value reaches a top spacing threshold or a bottom spacing threshold;
and if so, switching the longitudinal layout information associated with the currently displayed transverse label to switch the longitudinal layout information.
The device, still include:
a judging unit 26 for judging whether the longitudinal layout information corresponding to the target transverse label is loaded;
if the label is loaded, acquiring and displaying the loaded longitudinal layout information corresponding to the target transverse label;
if the page is not loaded, adding a target page mark to the longitudinal layout information corresponding to the target transverse tag, and checking whether the mark of the current page is consistent with the target page mark;
if the page operation instruction is consistent with the page operation instruction, when the page operation instruction is determined to be the switching operation as the cross-page switching according to the data switching information, recording a mark of a target page to be displayed, loading the target page with the recorded mark, and displaying.
The device, still include:
and a caching unit 27, configured to cache the vertical layout information corresponding to the target horizontal label after the handover is completed.
The device, still include:
the calculating unit 28 is configured to calculate a weight of each cached page by using a preset algorithm;
a sorting unit 29, configured to sort the weight values of the cached pages from low to high;
and the release unit 210 is configured to release the page corresponding to the first n-bit weight, where n is greater than or equal to 1.
The calculating unit 28 is specifically configured to:
calculating the distance between the cached page and the current page according to a shortest distance algorithm;
acquiring page display times of a cached page;
setting a first ratio for the distance between the cached page and the current page, and setting a second ratio for the page display times;
and calculating the weight of each cached page according to the distance between the cached page and the current page, the first ratio, the page display times and the second ratio.
The calculation formula of the weight of the cached page is as follows:
weight value of 0.4+ displayCount 0.6(1)
In formula (1), distance represents the distance from the current page, and displayCount represents the number of page presentations.
The calculation formula of the weight of the cached page is as follows:
weight value of distance 0.5+ displayCount 0.5(2)
In the formula (2), distance represents the distance from the current page, and displayCount represents the number of page presentations.
The apparatus shown in fig. 2 is an implementation apparatus of the method shown in fig. 1, and the specific principle of the apparatus is the same as that of the method shown in fig. 1, which is not described herein again.
In one embodiment of the present invention, there is also provided a storage medium storing computer program instructions for performing a method according to an embodiment of the present invention.
In one exemplary configuration of the invention, the computing devices each include one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
In one embodiment of the present invention, there is also provided a computing device comprising: a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein the computer program instructions, when executed by the processor, trigger the computing device to perform the method of an embodiment of the invention.
Computer-readable storage media include permanent and non-permanent, removable and non-removable media and may implement information storage by any method or technology. The information may be computer readable instructions, data structures, program means, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
It should be noted that the present invention may be implemented in software and/or in a combination of software and hardware, for example, as an Application Specific Integrated Circuit (ASIC), a general purpose computer or any other similar hardware device. In some embodiments, the software program of the present invention may be executed by a processor to implement the above steps or functions. Also, the software programs (including associated data structures) of the present invention can be stored in a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. Further, some of the steps or functions of the present invention may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or functions.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the apparatus claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.

Claims (11)

1. A multi-page data aggregation processing method is characterized by comprising the following steps:
based on the platform system page component, creating a page with transverse layout information and longitudinal layout information, wherein the transverse layout information comprises a plurality of transverse tags, and each transverse tag is associated with corresponding longitudinal layout information;
receiving a page operation instruction triggered by a user, and acquiring data switching information carried in the page operation instruction;
acquiring a corresponding preset switching strategy according to data switching information carried in the page operation instruction, and switching the longitudinal layout information associated with the currently displayed transverse label into the longitudinal layout information associated with the target transverse label according to the corresponding preset switching strategy;
loading longitudinal layout information corresponding to the target transverse label, and calling a display interface to display;
caching longitudinal layout information corresponding to the switched target transverse label;
calculating the distance between the cached page and the current page according to a shortest distance algorithm;
acquiring page display times of a cached page;
setting a first ratio for the distance between the cached page and the current page, and setting a second ratio for the page display times;
calculating the weight of each cached page according to the distance between the cached page and the current page, the first ratio, the page display times and the second ratio;
and releasing the overload cache based on the weight of each cached page.
2. The method for processing the aggregation of multi-page data according to claim 1, wherein switching the vertical layout information associated with the currently displayed horizontal label to the vertical layout information associated with the target horizontal label according to a corresponding preset switching policy comprises:
if the data switching information carried in the page operation instruction is determined to meet a first switching condition, judging whether the currently displayed longitudinal layout information is the last page information;
if so, taking the next transverse label of the current transverse label as a target transverse label, and acquiring longitudinal layout information associated with the next transverse label;
and if not, the current transverse label is the target transverse label, and next page information of the currently displayed longitudinal layout information is loaded and displayed.
3. The method for processing the aggregation of multi-page data according to claim 1, wherein switching the vertical layout information associated with the currently displayed horizontal label to the vertical layout information associated with the target horizontal label according to a corresponding preset switching policy comprises:
if the data switching information carried in the page operation instruction is determined to meet a second switching condition, judging whether the currently displayed longitudinal layout information is first page information;
if so, taking the last transverse label of the current transverse label as a target transverse label, and acquiring the page information of the longitudinal layout associated with the last transverse label;
if not, the current transverse label is the target transverse label, and the previous page information of the currently displayed longitudinal layout information is obtained and displayed.
4. The method for processing aggregation of multiple pages of data according to claim 1, further comprising:
acquiring a switching operation value included in a page operation instruction triggered by a user;
judging whether the switching operation value reaches a top interval threshold or a bottom interval threshold;
and if so, switching the longitudinal layout information associated with the currently displayed transverse label to switch the longitudinal layout information.
5. The method for processing multi-page data aggregation according to claim 1, wherein before loading the vertical layout information corresponding to the target horizontal label, the method further comprises:
judging whether longitudinal layout information corresponding to the target transverse label is loaded or not;
if the label is loaded, acquiring and displaying the loaded longitudinal layout information corresponding to the target transverse label;
if the page is not loaded, adding a target page mark to the longitudinal layout information corresponding to the target transverse tag, and checking whether the mark of the current page is consistent with the target page mark;
if the page operation instruction is consistent with the page operation instruction, when the page operation instruction is determined to be the switching operation as the cross-page switching according to the data switching information, recording a mark of a target page to be displayed, loading the target page with the recorded mark, and displaying.
6. The method for processing the aggregation of the multiple pages of data according to claim 5, wherein after caching the vertical layout information corresponding to the target horizontal label after the switching is completed, the method further comprises:
calculating the weight of each cached page by using a preset algorithm;
sorting the weight values of the cached pages from low to high;
and releasing the page corresponding to the weight of the first n bits, wherein n is more than or equal to 1.
7. The method of claim 6, wherein calculating the weight of each cached page according to the distance between the cached page and the current page, the first ratio, the page display times, and the second ratio comprises:
calculating the weight of each cached page according to the following calculation formula:
weight value of 0.4+ displayCount 0.6(1)
In formula (1), distance represents the distance from the current page, and displayCount represents the number of page presentations.
8. The method of claim 6, wherein calculating the weight of each cached page according to the distance between the cached page and the current page, the first ratio, the page display times, and the second ratio comprises:
weight value of distance 0.5+ displayCount 0.5(2)
In the formula (2), distance represents the distance from the current page, and displayCount represents the number of page presentations.
9. A mobile terminal multi-page data aggregation processing device is characterized by comprising:
the system comprises a creating unit, a processing unit and a display unit, wherein the creating unit is used for creating a page with transverse layout information and longitudinal layout information based on a platform system page component, the transverse layout information comprises a plurality of transverse tags, and each transverse tag is associated with corresponding longitudinal layout information;
the receiving unit is used for receiving a page operation instruction triggered by a user and acquiring data switching information carried in the page operation instruction;
the switching unit is used for acquiring a corresponding preset switching strategy according to the data switching information carried in the page operation instruction, and switching the longitudinal layout information associated with the currently displayed transverse label into the longitudinal layout information associated with the target transverse label according to the corresponding preset switching strategy;
the loading unit is used for loading the longitudinal layout information corresponding to the target transverse label and calling the display interface to display the information;
the cache unit is used for caching the longitudinal layout information corresponding to the switched target transverse label;
the calculating unit is used for calculating the distance between the cached page and the current page according to a shortest distance algorithm; acquiring page display times of a cached page; setting a first ratio for the distance between the cached page and the current page, and setting a second ratio for the page display times; calculating the weight of each cached page according to the distance between the cached page and the current page, the first ratio, the page display times and the second ratio;
and the releasing unit is used for releasing the overload cache based on the weight of each cached page.
10. A storage medium storing computer program instructions for performing a method according to any one of claims 1 to 8.
11. A computing device, comprising: a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein the computer program instructions, when executed by the processor, trigger the computing device to perform the method of any of claims 1 to 8.
CN202010908001.1A 2020-09-02 2020-09-02 Multi-page data aggregation processing method and device Active CN112083859B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010908001.1A CN112083859B (en) 2020-09-02 2020-09-02 Multi-page data aggregation processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010908001.1A CN112083859B (en) 2020-09-02 2020-09-02 Multi-page data aggregation processing method and device

Publications (2)

Publication Number Publication Date
CN112083859A CN112083859A (en) 2020-12-15
CN112083859B true CN112083859B (en) 2021-10-15

Family

ID=73732327

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010908001.1A Active CN112083859B (en) 2020-09-02 2020-09-02 Multi-page data aggregation processing method and device

Country Status (1)

Country Link
CN (1) CN112083859B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103279321A (en) * 2013-05-07 2013-09-04 青岛海信电器股份有限公司 Audio and video control device and audio and video control method
CN105868241A (en) * 2015-12-11 2016-08-17 乐视网信息技术(北京)股份有限公司 Data loading method and apparatus

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103218143B (en) * 2012-01-18 2016-12-07 阿里巴巴集团控股有限公司 A kind of classification page switching method and mobile device
CN103218156B (en) * 2013-02-28 2016-08-03 广东欧珀移动通信有限公司 Realize the method for many Tab page layout switch and touch mobile terminal thereof
CN105512251B (en) * 2015-12-01 2019-09-10 北京百度网讯科技有限公司 A kind of page cache method and device
CN106095411A (en) * 2016-05-31 2016-11-09 乐视控股(北京)有限公司 Display packing and terminal
CN106227459B (en) * 2016-08-11 2019-05-14 合一网络技术(北京)有限公司 Content switching method and device
CN111580718A (en) * 2020-04-30 2020-08-25 北京字节跳动网络技术有限公司 Page switching method and device of application program, electronic equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103279321A (en) * 2013-05-07 2013-09-04 青岛海信电器股份有限公司 Audio and video control device and audio and video control method
CN105868241A (en) * 2015-12-11 2016-08-17 乐视网信息技术(北京)股份有限公司 Data loading method and apparatus

Also Published As

Publication number Publication date
CN112083859A (en) 2020-12-15

Similar Documents

Publication Publication Date Title
US20090327965A1 (en) Selection of items in a virtualized view
US7877702B2 (en) Tree widget data population
US10810364B2 (en) Data flow view for a spreadsheet
CN106468984A (en) A kind of method of item associations picture rapid preview and device
US11907164B2 (en) File loading method and apparatus, electronic device, and storage medium
CN105302828B (en) Page label information display method and device and electronic equipment
US20150046796A1 (en) Page formation method and electronic device supporting the method
WO2015142974A1 (en) Asynchronously prefetching sharable memory pages
CN104685443A (en) Pinning boot data for faster boot
CN109614600B (en) Report display method and device and computer storage medium
CN114880289A (en) File grouping display method and computing device
CN107391534A (en) The page is shown, pagefile return method and device, computer-readable storage medium
CN114428657A (en) Sliding method and equipment based on Taro framework at H5 end
CN112083859B (en) Multi-page data aggregation processing method and device
US9442857B2 (en) Dynamic memory estimations for memory bounded applications
CN105893198A (en) Method and device for testing KVM stability
CN111368240B (en) Page display method, device and equipment and storage medium
US20200110528A1 (en) Rendering on a mobile device
CN107450859B (en) Method and device for reading file data
CN111522939B (en) Method and device for processing notes, computer storage medium and terminal
CN113722630A (en) Method and equipment for presenting resource data in web page based on client rendering
US8977814B1 (en) Information lifecycle management for binding content
CN107357493A (en) A kind of catalogue methods of exhibiting and device, storage medium
CN108984247B (en) Information display method, terminal equipment and network equipment thereof
CN111475762A (en) Method for processing published page, computing device and storage medium

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
GR01 Patent grant
GR01 Patent grant