CN113672650A - Method, device and equipment for selecting data in page crossing manner and storage medium - Google Patents

Method, device and equipment for selecting data in page crossing manner and storage medium Download PDF

Info

Publication number
CN113672650A
CN113672650A CN202110972878.1A CN202110972878A CN113672650A CN 113672650 A CN113672650 A CN 113672650A CN 202110972878 A CN202110972878 A CN 202110972878A CN 113672650 A CN113672650 A CN 113672650A
Authority
CN
China
Prior art keywords
data
page
storage block
total
total number
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110972878.1A
Other languages
Chinese (zh)
Inventor
周江龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Founder Electronics Co Ltd
Original Assignee
Beijing Founder Electronics 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 Founder Electronics Co Ltd filed Critical Beijing Founder Electronics Co Ltd
Priority to CN202110972878.1A priority Critical patent/CN113672650A/en
Publication of CN113672650A publication Critical patent/CN113672650A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24553Query execution of query operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention provides a method, a device, equipment and a storage medium for selecting data in a page-crossing manner, wherein the method comprises the following steps: recording a selected data ID corresponding to data selected by a user in a data list, performing block storage on the selected data ID according to a page number initially presented in the data list to form at least one storage block, displaying a page corresponding to a page turning request when the page turning request triggered by the user is obtained, judging whether a second data total number during page turning is the same as a first data total number initially presented in the data list, determining a target storage block according to a judgment result, searching the selected data ID contained in the target storage block in the current page and displaying the selected data ID in an emphasized manner, avoiding matching of a large number of invalid data IDs, being capable of quickly displaying the selected data ID, and improving the hit rate of the selected data ID.

Description

Method, device and equipment for selecting data in page crossing manner and storage medium
Technical Field
The present invention relates to the field of data processing, and in particular, to a method, an apparatus, a device, and a storage medium for selecting data across pages.
Background
With the change of times, the data volume of electronic information is increasing day by day, and users can use list paging to screen data with demands when using the data. However, when the data list is used for division, due to the fact that the data volume is continuously updated and changed, the data list is refreshed when pages are turned, and if the selected data are not recorded in time, the data of the data list cannot be selected in a page-crossing mode.
In the prior art, multiple pieces of data are selected, and the multiple pieces of data are matched with each piece of data in a page through for circulation to obtain the data selected in the current page, so that cross-page selection is realized. The method has the advantages of large workload and low efficiency during matching.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment and a storage medium for selecting data in a page-crossing manner, which can reduce the workload during matching and improve the working efficiency.
In a first aspect, an embodiment of the present invention provides a method for selecting data across pages, where the method includes:
recording a selected data ID corresponding to data selected by a user in a data list, and performing block storage on the selected data ID according to a page number initially presented in the data list to form at least one storage block; the data list comprises a plurality of pages, each page comprises a plurality of data, and the page number of each page containing the data selected by the user corresponds to one memory block;
when a page turning request triggered by a user is acquired, displaying a page corresponding to the page turning request, and judging whether the total number of second data in page turning is the same as the total number of first data initially presented in the data list or not;
and determining a target storage block corresponding to the current page according to the judgment result, searching the selected data ID contained in the target storage block in the current page and emphatically displaying.
Optionally, determining the target storage block according to the determination result includes:
and if the second total data number is the same as the first total data number, the target storage block is a storage block corresponding to the page number of the current page.
Optionally, the method further includes:
if the second data total number is different from the first data total number, calculating an initial page number corresponding to the current page after page turning according to the second data total number, the first data total number and the single-page data total number, wherein the initial page number is a page number of a data ID (identity) contained in the current page in an initial state;
the target storage block comprises a storage block corresponding to the initial page number.
Optionally, calculating an initial page number corresponding to the current page after page turning according to the second total data number, the first total data number, and the total single-page data number, including:
calculating the difference value between the second total data number and the first total data number, and dividing the absolute value of the difference value by the total data number of the single page to obtain a first numerical value;
and judging whether the difference is integral multiple of the total number of the single-page data, and determining a target storage block corresponding to the current page according to the first numerical value.
Optionally, recording a selected data ID corresponding to data selected by a user in the data list, and performing block storage on the selected data ID according to page number to form at least one storage block, including:
when a page turning request triggered by a user is acquired, recording a selected data ID corresponding to data selected by a first page of the user before page turning;
judging whether the total number of the second data is the same as the total number of the first data or not when the page is turned;
and if the data IDs are the same, updating the storage block corresponding to the page number of the first page according to the selected data ID.
Optionally, the method further includes:
if not, calculating an initial page number corresponding to the page before page turning according to the second data total number, the first data total number and the single-page data total number, wherein the initial page number corresponding to the page before page turning is a page number of a data ID (identity) contained in the page before page turning in an initial state;
and updating the storage block corresponding to the initial page number according to the data ID selected by the page before page turning by the user.
In a second aspect, an embodiment of the present invention provides an apparatus for selecting data across pages, where the apparatus includes:
the forming module is used for recording a selected data ID corresponding to data selected by a user in a data list, and performing block storage on the selected data ID according to a page number initially presented in the data list to form at least one storage block; the data list comprises a plurality of pages, each page comprises a plurality of data, and the page number of each page containing the data selected by the user corresponds to one memory block;
the judging module is used for displaying a page corresponding to a page turning request when the page turning request triggered by a user is obtained, and judging whether the total number of second data in page turning is the same as the total number of first data initially presented in the data list or not;
and the display module is used for determining a target storage block corresponding to the current page according to the judgment result, searching the selected data ID contained in the target storage block in the current page and emphatically displaying the selected data ID.
In a third aspect, an embodiment of the present invention provides an apparatus for selecting data across pages, including:
a memory and at least one processor;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the method of selecting data across pages as described in any one of the first aspects above.
In a fourth aspect, the present invention provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, the computer-readable storage medium is used for implementing the method for selecting data across pages as described in any one of the first aspect.
In a fifth aspect, an embodiment of the present invention provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the method for selecting data across pages as described in any one of the first aspect above is implemented.
According to the method, the device, the equipment and the storage medium for selecting data in a page crossing manner, at least one storage block is formed by recording the selected data ID corresponding to the data selected by the user in the data list and storing the selected data ID in blocks according to the page number initially presented in the data list; the data list comprises a plurality of pages, each page comprises a plurality of data, each page containing the selected data of a user corresponds to one storage block, when a page turning request triggered by the user is obtained, the page corresponding to the page turning request is displayed, whether the total number of second data in page turning is the same as the total number of first data initially presented in the data list or not is judged, a target storage block is determined according to the judgment result, the selected data ID contained in the target storage block is searched for in the current page and is displayed emphatically, matching of a large number of invalid data IDs is avoided, the selected data ID can be quickly displayed back, and the hit rate of the selected data ID is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for selecting data across pages according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a method for determining a target storage block according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating another method for selecting data across pages according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of an apparatus for selecting data across pages according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an apparatus for selecting data across pages according to an embodiment of the present invention.
With the above figures, certain embodiments of the invention have been illustrated and described in more detail below. The drawings and the description are not intended to limit the scope of the inventive concept in any way, but rather to illustrate it by those skilled in the art with reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
The following describes the technical solution of the present invention and how to solve the above technical problems with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
The following explains an application scenario provided by an embodiment of the present invention: the scheme provided by the embodiment of the invention relates to the page crossing selection of list data. When the user selects data from the list data, the user may select the desired data on a different page. However, the data in the list is updated in real time, the user may have a situation of refreshing the data list when turning the page, and the selected data may be refreshed to other locations, which is inconvenient for the user to view the selected data.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present invention. As shown in fig. 1, the page corresponding to page number 1 in the data list shows 4 sets of data, and each set of data has its corresponding data ID. Where the data ID of each data in the list is different from one another for uniquely identifying the data. The number of the data IDs displayed on each page in the data list is the same, when 24 pieces of data exist, 6 pages of data are correspondingly displayed, and 4 groups of data are displayed on the page corresponding to each page number.
When the user selects the data with the data ID of 1, under the condition that the total number of the page data is not changed, the data with the data ID of 1 can be accurately found and highlighted for the user when the page returns to the first page; in the case where the total number of page data is changed, when data whose data ID is 1 is searched for in the first page is returned, the data may be found in the first page or may not be found because the data may have been refreshed to other pages.
In some techniques, to solve this problem, all the selected data and the data in the list may be matched one by one through a for loop. Assuming that all data selected by the user are 20 pieces and the data in the list are 100 pieces, each piece of the 20 pieces of data is matched with the data of the current page through for circulation to obtain the matched data in the list and perform redisplay.
Therefore, an embodiment of the present invention provides a method for selecting data across pages, where a selected data ID in a data list is recorded, and is stored in blocks according to a page number corresponding to each data ID to form a corresponding storage block, when a user turns a page, whether a total number of data initially presented in the data list is the same as a total number of data when the page is turned, and according to a determination result, the corresponding storage block is searched to match the selected data ID, and the selected data ID is highlighted, so that workload when the selected ID is matched can be reduced, and processing efficiency is improved.
Some embodiments of the invention are described in detail below with reference to the accompanying drawings. The features of the embodiments and examples described below may be combined with each other without conflict between the embodiments.
Fig. 2 is a flowchart illustrating a method for selecting data across pages according to an embodiment of the present invention. As shown in fig. 2, the method in this embodiment may include:
step 201, recording a selected data ID corresponding to data selected by a user in a data list, and performing block storage on the selected data ID according to a page number initially presented in the data list to form at least one storage block; wherein the data list comprises a plurality of pages, each page comprises a plurality of data, and the page number of each page containing the data selected by the user corresponds to one memory block.
When the data amount in the data list is changed, the data list is stored according to the page number initially presented by the data list when the storage block is formed.
Optionally, the storage block is obtained according to a page number initially presented in the data list and a selected data ID corresponding to the page number. Specifically, when the data list initially presents 15 pages, where the selected data ID on the page with page number 12 is 123,124, then the memory block formed is ("12", "{ 123,124 }").
Step 202, when a page turning request triggered by a user is obtained, displaying a page corresponding to the page turning request, and judging whether the total number of the second data during page turning is the same as the total number of the first data initially presented in the data list.
Optionally, when the user performs a page turning operation, the second total number of data in the current data list is updated at the same time. And judging whether the total number of the second data is the same as the total number of the first data initially presented in the data list, when the total number of the second data is the same as the total number of the first data, indicating that no data is increased or decreased in the list, when the total number of the second data is larger than the total number of the first data, indicating that the data in the list is increased, and when the total number of the second data is smaller than the total number of the first data, indicating that the data in the list is decreased.
When the data in the list is added, the data is generally added in front of the first page data, that is, all the original data in the list is moved backward. The data in the list may also decrease in order as it decreases, i.e., the remaining data in the list all moves forward.
Step 203, determining a target storage block corresponding to the current page according to the judgment result, searching the selected data ID contained in the target storage block in the current page, and displaying the selected data ID emphatically.
The emphasis display may be that the user can directly observe the selected data ID from all the data IDs of the current page. Specifically, the selected data ID is marked with a number display, or the selected data ID is displayed in red.
Optionally, the determination result includes that the total number of the second data is the same as the total number of the first data, or that the total number of the second data is different from the total number of the first data.
Optionally, according to the determination result, the target storage block storing the selected data ID of the current page may be determined, and the selected data ID may be searched from the target storage block. Specifically, it is determined that the target memory blocks are ("10", {10,13} ") and (" 11 ", {14,19 }") according to the determination result, and the current page number indicates that the data IDs are 13 to 18, the data with the data IDs of 13 and 14 are found and are emphatically displayed in red, and other data are displayed in a normal manner.
In the method for selecting data across pages provided by this embodiment, a selected data ID corresponding to data selected by a user in a data list is recorded, and the selected data ID is stored in blocks according to a page number initially presented in the data list to form at least one storage block; the data list comprises a plurality of pages, each page comprises a plurality of data, each page containing the selected data of a user corresponds to one storage block, when a page turning request triggered by the user is obtained, the page corresponding to the page turning request is displayed, whether the total number of second data in page turning is the same as the total number of first data initially presented in the data list or not is judged, a target storage block is determined according to the judgment result, the selected data ID contained in the target storage block is searched for in the current page and is displayed emphatically, matching of a large number of invalid data IDs is avoided, the selected data ID can be quickly displayed back, and the hit rate of the selected data ID is improved.
On the basis of the technical solution provided in the foregoing embodiment, optionally, determining the target storage block according to the determination result includes: and if the second total data number is the same as the first total data number, the target storage block is a storage block corresponding to the page number of the current page.
Optionally, when the total number of the second data recorded during page turning is the same as the total number of the first data initially presented in the data list, it indicates that the data amount in the list has not changed, and the target storage block is a storage block corresponding to the current page number.
Illustratively, when the first total data number initially presented in the data list is 20, the data IDs selected on the page of page 1 are 3 and 4, and the storage blocks formed are ("1", {3,4} "), when the user turns from page 2 to page 1, the second total data number recorded is still 20, and the amount of data in the list data is not changed, when the storage block is determined, the storage block corresponding to the current page number is (" 1 ", {3,4 }"), and then the selected data IDs corresponding to the current page number are searched for by the storage block to be 3 and 4.
In this embodiment, when the data amount in the data list is not changed, the selected data ID is searched by selecting the storage block according to the current page number, which is more convenient and faster, and the efficiency of searching the selected data ID is improved.
Optionally, the method further includes: if the second data total number is different from the first data total number, calculating an initial page number corresponding to the current page after page turning according to the second data total number, the first data total number and the single-page data total number, wherein the initial page number is a page number of a data ID (identity) contained in the current page in an initial state; the target storage block comprises a storage block corresponding to the initial page number.
And if the first total data number is not the same as the second total data number, the data amount in the list is changed.
The total number of the single page data may be the number of data IDs displayed on the page corresponding to each page number except the last page, and the data ID displayed on the page corresponding to the last page may be equal to the total number of the single page data or may be smaller than the total number of the single-sided data. Specifically, the list has 5 pages, 5 pieces of data are displayed on the page corresponding to each page number of the first 4 pages, and 3 pieces of data are displayed on the page corresponding to the last page.
Optionally, when the total data number changes during page turning, an initial page number corresponding to the current page after page turning may be calculated according to the second total data number, the first total data number and the total data number of a single page, and a storage block corresponding to the current page is determined according to the initial page, so as to determine a target storage block corresponding to the current page.
Alternatively, the target memory block may be multiple, that is, the memory block corresponding to the current page number may be multiple, for example, the memory block corresponding to the current page number 5 may be the memory block corresponding to the initial page numbers 3 and 4.
In this embodiment, when the data amount in the list changes, the target storage block may be determined according to the calculation result by calculating the second total data amount, the first total data amount, and the total data amount of a single page, so that the efficiency of searching the target storage block may be improved.
Fig. 3 is a schematic flow chart of a method for determining a target storage block according to an embodiment of the present invention, as shown in fig. 3, specifically combining with searching for a corresponding target storage block when a total number of second data is different from a total number of first data, and calculating an initial page number corresponding to a current page after page turning according to the total number of the second data, the total number of the first data, and a total number of single-page data, on the basis of the foregoing embodiment, the method includes:
step 301, calculating a difference between the total number of the second data and the total number of the first data, and dividing the absolute value of the difference by the total number of the single-page data to obtain a first value.
Wherein, rounding represents rounding up, and integer is the original value. For example, 0.4 is rounded to 1 and 2 is rounded to 2.
Optionally, when the second total data number is different from the first total data number, it indicates that the data amount in the data list changes, and the increased or decreased data amount in the data list may be obtained by calculating a difference between the second total data number and the first total data number.
Alternatively, when the difference between the second total data number and the first total data number is a positive value, it indicates that the amount of data in the data list increases, and the currently displayed page number may not be the page number in the initial state. Specifically, when there are 20 pages in the initial data list, the page number in the data list becomes 30 pages after the data in the list is added, and the data displayed on the 1 st page before may be displayed on the page of the 11 th page after the data is added.
Alternatively, when the difference between the second total number of data and the first total number of data is a negative value, it indicates that the amount of data in the data list is decreased, and the currently displayed page number may not be the page number in the initial state. Specifically, when there are 20 pages in the initial data list, and the page number in the data list becomes 10 pages after the data in the list is reduced, the data in the initial state on the 20 th page may be on the 10 th page after the data is reduced.
Step 302, judging whether the difference is an integral multiple of the total number of the single page data, and determining a target storage block corresponding to the current page according to the first numerical value.
And when the difference is a positive value and is an integral multiple of the total number of the single-page data, determining that the target storage block is a storage block corresponding to a page obtained by subtracting the first numerical value from the current page.
When the data in the initial list is increased, if the calculated difference is an integral multiple of the total number of the single page data, it indicates that the data in the list is moved for the whole page, i.e. when 10 pages of data are added to the page, the data on the page corresponding to page 1 is displayed on the page corresponding to page 11 after the data are added. When the user turns over the page and turns to the next page, the storage block corresponding to the page obtained by subtracting the first numerical value from the current page is the target storage block, and the data ID selected by the current page can be searched from the target storage block.
And when the target storage block of the current page number is determined, dividing the calculated difference value by the total number of the current page to obtain a first numerical value, and then the target storage block is a storage block corresponding to the page number obtained by subtracting the first numerical value from the current page number. For example, if the current page number is 12 and the first value is 2, the memory block corresponding to the current page is the memory block 10. For example, if the first total data in the list is 20 and the single page data is 4, when the user turns to page 5, the second total data is 28. And calculating the difference value between the second total data number and the first total data number to be 8, dividing the difference value by the total data number 4 of the single page to obtain a first numerical value 2, wherein the target storage block corresponding to the current page number 5 is the storage block corresponding to the page number 3 obtained by subtracting the first numerical value 2 from the current page number 5.
Optionally, when the difference is a negative value, if there is a case of data reduction, and the data reduction is performed sequentially, it is determined that the target storage block is a storage block corresponding to a page obtained by adding the first numerical value to the current page.
And when the difference is a positive value and is not an integral multiple of the total number of the single-page data, determining that the target storage block is a storage block corresponding to a page obtained by subtracting the first numerical value from the current page and a storage block corresponding to a previous page obtained by subtracting 1 from the page corresponding to the storage block.
Another possible situation is that when the data in the initial list increases, it may be scattered over the pages corresponding to two page numbers. For example, the total number of the single page data in the list is 5, and two pieces of data are added to the page corresponding to the first page, the last two pieces of data on the page corresponding to the first page will be moved to the page corresponding to the second page, the last two pieces of data on the page corresponding to the corresponding second page will be moved to the page corresponding to the third page, and so on, and the data on each page number in the initial list can be obtained and dispersed on the page corresponding to the two page numbers. When the user turns over the page and turns to the next page, the target storage block is a storage block corresponding to the page obtained by subtracting the first numerical value from the current page and a storage block corresponding to the previous page obtained by subtracting 1 from the page corresponding to the storage block.
And when the target storage block of the current page number is determined, dividing the calculated difference value by the total number of the current page to obtain a first numerical value, wherein the target storage block is a storage block corresponding to the page number obtained by subtracting the first numerical value from the current page number and a storage block corresponding to the previous page number obtained by subtracting 1 from the page number corresponding to the storage block. For example, if the current page number is 12 and the first value is 2, the memory blocks corresponding to the current page are the memory block 10 and the memory block 9.
Specifically, if the total number of the first data in the list is 20 and the total number of the single page data is 5, when the user turns to the 5 th page, the total number of the second data is 32. And calculating the difference value between the second data total number and the first data total number to be 12, dividing the difference value by the single-page data total number 5, and rounding to obtain a first numerical value 3, wherein the target storage block corresponding to the current page 5 is a storage block corresponding to a page 2 obtained by subtracting the first numerical value 3 from the current page 5, and a storage block corresponding to a previous page 1 obtained by subtracting 1 from the page 2.
Optionally, when the difference is a negative value, if there is a case of data reduction, and the data reduction is performed sequentially, it is determined that the target storage block is a storage block corresponding to a page obtained by adding the first numerical value to the current page and a storage block corresponding to a previous page obtained by adding 1 to the page corresponding to the storage block.
In this embodiment, whether the difference is an integral multiple of the total number of the single page data is determined by calculating the difference between the total number of the second data and the total number of the first data, so as to determine the target storage block corresponding to the current page number, improve the search efficiency of the target storage block, avoid losing the selected data ID in the matching process, and improve the data ID playback efficiency.
Optionally, when the data in the data list is randomly reduced, the reduced data position may be determined according to the data ID, and the storage block corresponding to the current page in the list is determined.
Optionally, recording a selected data ID corresponding to data selected by a user in the data list, and performing block storage on the selected data ID according to page number to form at least one storage block, including:
when a page turning request triggered by a user is acquired, recording a selected data ID corresponding to data selected by a first page of the user before page turning; judging whether the total number of the second data before page turning is the same as the total number of the first data or not; and if the data IDs are the same, updating the storage block corresponding to the page number of the first page according to the selected data ID.
Optionally, when the user cancels the selected data ID or selects a new data ID in the first page before page turning, if the second data total number during page turning is the same as the first data total number, the selected data ID of the current page is stored in the storage block corresponding to the current page number, so as to update the storage block corresponding to the current page number.
Specifically, the data IDs selected by the user in the first page are 12 and 13, and when the user turns pages, and the second total data is determined to be the same as the first total data, the selected data ID is stored in the storage block corresponding to the first page to obtain ("1", "{ 12,13 }").
In this embodiment, when the total number of the second data is the same as the total number of the first data, the selected data ID is directly stored in the storage block corresponding to the page number, and the storage block is updated, so that the storage efficiency can be improved, and the search is facilitated. On the basis of realizing cross-page selection, the echoing efficiency of the list is improved through a logic algorithm, and the efficiency of echoing logic processing is improved by effectively eliminating unnecessary data polling.
Optionally, the method further includes: if not, calculating an initial page number corresponding to the page before page turning according to the second data total number, the first data total number and the single-page data total number, wherein the initial page number corresponding to the page before page turning is a page number of a data ID (identity) contained in the page before page turning in an initial state; and updating the storage block corresponding to the initial page number according to the data ID selected by the page before page turning by the user.
Optionally, when the second total data number is different from the first total data number, there may be a case where data is increased or data is decreased.
Optionally, when the user turns the page, the situation that the current data is increased or decreased is obtained through the second data total number, the first data total number and the single-page data total number, an initial page number corresponding to the selected data ID before the page is turned is calculated, and the storage block corresponding to the initial page number is updated according to the selected data ID during the page turning.
Specifically, when the data in the data list is reduced, the data change in the data list may be determined according to the reduced data ID, and the corresponding storage block may be determined according to the selected data ID and updated when the page is turned.
Alternatively, when data is increased, it is possible to store the case where the block has a negative page number, and the negative page number is in a relative positional relationship with respect to the positive page number.
In this embodiment, when the second total data number is different from the first total data number, the initial storage block corresponding to the current page number may be obtained through calculation, and the storage block corresponding to the initial page number is updated according to the selected data ID, so that the data storage efficiency is improved.
When the total number of the second data is the same as the total number of the first data, compared with for-loop, the embodiment can obviously reduce the matching of the data amount, reduce the workload and improve the matching efficiency.
Fig. 4 is a schematic flow chart of another method for selecting data across pages according to an embodiment of the present invention, and as shown in fig. 4, 5 member variables Docids, DocMap, PageCount, number, and ListNum are created at a client, respectively: the selected data ID, the page number, the total number of the first data initially presented, the total number of the second data when the page is turned, and the total number of the single-page display data. The data records are stored in the client, the logic processing is also performed in the client, and the ID selector combined with JavaScript can obtain the data ID actually stored in the documents from the page and directly match the data in the list.
Wherein JavaScript member variables are required:
var Docids=new Array();
var DocMap=new Map();
var PageCount=0;
var number=0;
var ListNum=0;
docids is an array variable for storing the selected data ID of the current page, DocMap is a Map structure variable, the current page number is used as Key, the data ID (Docids) selected by the current page is Value, PageCount is the total number of the first data initially presented, number is the total number of the second data when the page is turned, and ListNum is the total number of the single-page display data.
When the page is turned, the current page and the selected data ID are recorded and stored in DocMap.
Specifically, when the page is turned, the current page number is acquired, the selected data ID is stored in Docids, and the current page is a key of the DocMap to form a docmap.set ("1", {001,002,003} "), wherein 1 denotes the current page number, and 001 denotes the currently selected data ID.
Returning to the first page, judging whether the total page number is changed.
Specifically, if PageCount is equal to number, the total number of pages is not changed, whether the current page has a value of docmap.has ("1") is judged according to the current number of pages, no logical processing is performed on the current page, if yes, the data value of docmap.get ("1") is obtained, the data ID obtained through the DocMap is directly matched with the list data according to the ID selector of JavaScript without performing other logical judgment to obtain the data ID, and the check box state is set to be tube.
If the PageCount is not equal to the number, the total number of pages changes, and an algorithm is adopted to calculate the DocMap of the forward page number and the backward page number. The total number of pages to be changed can be calculated by adopting an algorithm [ (PageCount-number)/total number of single-page data ], and data of the first pages or the last pages corresponding to the initial page number needs to be acquired, so that when the DocMap variable is acquired according to the page number, the data can be acquired forwards or backwards to avoid data matching errors.
The method provided by the embodiment is realized in a client side mode, server resources or network bandwidth are not occupied, corresponding data can be quickly found for logic processing by using the unique ID identification of the list data and combining with the ID selector of the JavaScript, the problem of pain points of cross-page selection can be solved, and the efficiency of page turning and display returning can be improved while the JavaScript is good in compatibility with the client side.
Fig. 5 is a schematic structural diagram of an apparatus for selecting data across pages according to an embodiment of the present invention. As shown in fig. 5, the apparatus for selecting data across pages provided in this embodiment may include:
a forming module 501, configured to record a selected data ID corresponding to data selected by a user in a data list, and perform block storage on the selected data ID according to a page number initially presented in the data list to form at least one storage block; the data list comprises a plurality of pages, each page comprises a plurality of data, and the page number of each page containing the data selected by the user corresponds to one memory block;
the determining module 502 is configured to, when a page turning request triggered by a user is obtained, display a page corresponding to the page turning request, and determine whether a total number of second data during page turning is the same as a total number of first data initially presented in the data list;
and a display module 503, configured to determine a target storage block corresponding to the current page according to the determination result, search for the selected data ID included in the target storage block in the current page, and display the selected data ID emphatically.
Optionally, when determining the target storage block according to the determination result, the display module 503 is specifically configured to:
and if the second total data number is the same as the first total data number, the target storage block is a storage block corresponding to the page number of the current page.
Optionally, the display module 503 is further configured to:
if the second data total number is different from the first data total number, calculating an initial page number corresponding to the current page after page turning according to the second data total number, the first data total number and the single-page data total number, wherein the initial page number is a page number of a data ID (identity) contained in the current page in an initial state;
the target storage block comprises a storage block corresponding to the initial page number.
Optionally, when calculating the initial page number corresponding to the current page after page turning according to the second total data number, the first total data number, and the total data number of the single page, the display module 503 is specifically configured to:
calculating the difference value between the second total data number and the first total data number, and dividing the absolute value of the difference value by the total data number of the single page to obtain a first numerical value;
and judging whether the difference is integral multiple of the total number of the single-page data, and determining a target storage block corresponding to the current page according to the first numerical value.
Optionally, the forming module 501 is specifically configured to:
when a page turning request triggered by a user is acquired, recording a selected data ID corresponding to data selected by a first page of the user before page turning;
judging whether the total number of the second data is the same as the total number of the first data or not when the page is turned;
and if the data IDs are the same, updating the storage block corresponding to the page number of the first page according to the selected data ID.
Optionally, the forming module 501 is further configured to:
if not, calculating an initial page number corresponding to the page before page turning according to the second data total number, the first data total number and the single-page data total number, wherein the initial page number corresponding to the page before page turning is a page number of a data ID (identity) contained in the page before page turning in an initial state;
and updating the storage block corresponding to the initial page number according to the data ID selected by the page before page turning by the user.
The apparatus provided in this embodiment may implement the technical solutions of the method embodiments shown in fig. 1 to fig. 4, and the implementation principles and technical effects are similar, which are not described herein again.
Fig. 6 is a schematic structural diagram of an apparatus for selecting data across pages according to an embodiment of the present invention. As shown in fig. 6, the apparatus provided in this embodiment may include: a memory 62 and at least one processor 61;
the memory 62 stores computer-executable instructions;
the at least one processor 61 executes computer-executable instructions stored by the memory 62 to cause the at least one processor 61 to perform the method of any of the embodiments described above.
Wherein the memory 62 and the processor 61 may be connected by a bus 63.
For specific implementation principles and effects of the device provided in this embodiment, reference may be made to relevant descriptions and effects corresponding to the embodiments shown in fig. 1 to fig. 4, which are not described herein in detail.
Embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the method for selecting data across pages provided in any embodiment of the present invention.
Embodiments of the present invention further provide a computer program product, which includes a computer program, and when the computer program is executed by a processor, the method for selecting data across pages according to any embodiment of the present invention is implemented.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of modules is merely a division of logical functions, and an actual implementation may have another division, for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to implement the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each module may exist alone physically, or two or more modules are integrated into one unit. The unit formed by the modules can be realized in a hardware form, and can also be realized in a form of hardware and a software functional unit.
The integrated module implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor to execute some steps of the methods according to the embodiments of the present invention.
It should be understood that the Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor, or in a combination of the hardware and software modules within the processor.
The memory may comprise a high-speed RAM memory, and may further comprise a non-volatile storage NVM, such as at least one disk memory, and may also be a usb disk, a removable hard disk, a read-only memory, a magnetic or optical disk, etc.
The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the buses in the figures of the present invention are not limited to only one bus or one type of bus.
The storage medium may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an Application Specific Integrated Circuits (ASIC). Of course, the processor and the storage medium may reside as discrete components in an electronic device or host device.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (10)

1. A method for selecting data across pages, comprising:
recording a selected data ID corresponding to data selected by a user in a data list, and performing block storage on the selected data ID according to a page number initially presented in the data list to form at least one storage block; the data list comprises a plurality of pages, each page comprises a plurality of data, and the page number of each page containing the data selected by the user corresponds to one memory block;
when a page turning request triggered by a user is acquired, displaying a page corresponding to the page turning request, and judging whether the total number of second data in page turning is the same as the total number of first data initially presented in the data list or not;
and determining a target storage block corresponding to the current page according to the judgment result, searching the selected data ID contained in the target storage block in the current page and emphatically displaying.
2. The method of claim 1, wherein determining the target memory block according to the determination result comprises:
and if the second total data number is the same as the first total data number, the target storage block is a storage block corresponding to the page number of the current page.
3. The method of claim 2, further comprising:
if the second data total number is different from the first data total number, calculating an initial page number corresponding to the current page after page turning according to the second data total number, the first data total number and the single-page data total number, wherein the initial page number is a page number of a data ID (identity) contained in the current page in an initial state;
the target storage block comprises a storage block corresponding to the initial page number.
4. The method of claim 3, wherein calculating an initial page number corresponding to the current page after page turning according to the second total data number, the first total data number and the total single-page data number comprises:
calculating the difference value between the second total data number and the first total data number, and dividing the absolute value of the difference value by the total data number of the single page to obtain a first numerical value;
and judging whether the difference is integral multiple of the total number of the single-page data, and determining a target storage block corresponding to the current page according to the first numerical value.
5. The method of claim 1, wherein recording a selected data ID corresponding to data selected by a user in the data list, and storing the selected data ID in blocks by page number to form at least one memory block, comprises:
when a page turning request triggered by a user is acquired, recording a selected data ID corresponding to data selected by a first page of the user before page turning;
judging whether the total number of the second data is the same as the total number of the first data or not when the page is turned;
and if the data IDs are the same, updating the storage block corresponding to the page number of the first page according to the selected data ID.
6. The method of claim 5, further comprising:
if not, calculating an initial page number corresponding to the page before page turning according to the second data total number, the first data total number and the single-page data total number, wherein the initial page number corresponding to the page before page turning is a page number of a data ID (identity) contained in the page before page turning in an initial state;
and updating the storage block corresponding to the initial page number according to the data ID selected by the page before page turning by the user.
7. An apparatus for selecting data across pages, the apparatus comprising:
the forming module is used for recording a selected data ID corresponding to data selected by a user in a data list, and performing block storage on the selected data ID according to a page number initially presented in the data list to form at least one storage block; the data list comprises a plurality of pages, each page comprises a plurality of data, and the page number of each page containing the data selected by the user corresponds to one memory block;
the judging module is used for displaying a page corresponding to a page turning request when the page turning request triggered by a user is obtained, and judging whether the total number of second data in page turning is the same as the total number of first data initially presented in the data list or not;
and the display module is used for determining a target storage block corresponding to the current page according to the judgment result, searching the selected data ID contained in the target storage block in the current page and emphatically displaying the selected data ID.
8. An apparatus for selecting data across pages, comprising: a memory and at least one processor;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the method of selecting data across pages of any of claims 1-6.
9. A computer-readable storage medium having computer-executable instructions stored thereon, which when executed by a processor, perform a method of cross-page selection data as claimed in any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, carries out the method of cross-page selection data according to any one of claims 1-6.
CN202110972878.1A 2021-08-24 2021-08-24 Method, device and equipment for selecting data in page crossing manner and storage medium Pending CN113672650A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110972878.1A CN113672650A (en) 2021-08-24 2021-08-24 Method, device and equipment for selecting data in page crossing manner and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110972878.1A CN113672650A (en) 2021-08-24 2021-08-24 Method, device and equipment for selecting data in page crossing manner and storage medium

Publications (1)

Publication Number Publication Date
CN113672650A true CN113672650A (en) 2021-11-19

Family

ID=78545412

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110972878.1A Pending CN113672650A (en) 2021-08-24 2021-08-24 Method, device and equipment for selecting data in page crossing manner and storage medium

Country Status (1)

Country Link
CN (1) CN113672650A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115952772A (en) * 2023-03-13 2023-04-11 广州市玄武无线科技股份有限公司 Page-stepping table display method and device, electronic equipment and storage medium

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0684587A1 (en) * 1994-05-27 1995-11-29 International Business Machines Corporation Method and apparatus for turning over a page in a book
WO2009082540A1 (en) * 2007-12-25 2009-07-02 Shenzhen Tcl New Technology Ltd System and method for selecting programs to record
US20130036170A1 (en) * 2011-08-01 2013-02-07 Ricoh Company, Ltd. Information processing apparatus, information processing method, and storage medium
CN103425708A (en) * 2012-05-25 2013-12-04 金蝶软件(中国)有限公司 Optimized web paging query method and device
US20140040225A1 (en) * 2012-07-31 2014-02-06 International Business Machines Corporation Displaying browse sequence with search results
CN104750693A (en) * 2013-12-26 2015-07-01 阿里巴巴集团控股有限公司 Method and device for realizing dotting
CN105260394A (en) * 2015-09-15 2016-01-20 广州视睿电子科技有限公司 web cross-page data selection method and system
CN107145488A (en) * 2016-03-01 2017-09-08 阿里巴巴集团控股有限公司 The method and apparatus of data item is chosen in a kind of record results page
US10157426B1 (en) * 2014-11-28 2018-12-18 Intuit Inc. Dynamic pagination of tax return questions during preparation of electronic tax return
US20190243876A1 (en) * 2018-02-02 2019-08-08 International Business Machines Corporation Pagination of data filtered after retrieval thereof from a data source
WO2019205019A1 (en) * 2018-04-25 2019-10-31 深圳市元征软件开发有限公司 Method and system for displaying a vehicle data stream and a vehicle diagnosis device
CN111414371A (en) * 2019-01-07 2020-07-14 阿里巴巴集团控股有限公司 Data information processing method and device, storage medium and processor
US20210173838A1 (en) * 2019-12-06 2021-06-10 Sap Se Intelligent sharing pagination mechanism adaptive to huge data
CN113127117A (en) * 2021-03-05 2021-07-16 深圳点猫科技有限公司 Qt development framework-based interface paging display method, device, system and medium

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0684587A1 (en) * 1994-05-27 1995-11-29 International Business Machines Corporation Method and apparatus for turning over a page in a book
WO2009082540A1 (en) * 2007-12-25 2009-07-02 Shenzhen Tcl New Technology Ltd System and method for selecting programs to record
US20130036170A1 (en) * 2011-08-01 2013-02-07 Ricoh Company, Ltd. Information processing apparatus, information processing method, and storage medium
CN103425708A (en) * 2012-05-25 2013-12-04 金蝶软件(中国)有限公司 Optimized web paging query method and device
US20140040225A1 (en) * 2012-07-31 2014-02-06 International Business Machines Corporation Displaying browse sequence with search results
CN104750693A (en) * 2013-12-26 2015-07-01 阿里巴巴集团控股有限公司 Method and device for realizing dotting
US10157426B1 (en) * 2014-11-28 2018-12-18 Intuit Inc. Dynamic pagination of tax return questions during preparation of electronic tax return
CN105260394A (en) * 2015-09-15 2016-01-20 广州视睿电子科技有限公司 web cross-page data selection method and system
CN107145488A (en) * 2016-03-01 2017-09-08 阿里巴巴集团控股有限公司 The method and apparatus of data item is chosen in a kind of record results page
US20190243876A1 (en) * 2018-02-02 2019-08-08 International Business Machines Corporation Pagination of data filtered after retrieval thereof from a data source
WO2019205019A1 (en) * 2018-04-25 2019-10-31 深圳市元征软件开发有限公司 Method and system for displaying a vehicle data stream and a vehicle diagnosis device
CN111414371A (en) * 2019-01-07 2020-07-14 阿里巴巴集团控股有限公司 Data information processing method and device, storage medium and processor
US20210173838A1 (en) * 2019-12-06 2021-06-10 Sap Se Intelligent sharing pagination mechanism adaptive to huge data
CN113127117A (en) * 2021-03-05 2021-07-16 深圳点猫科技有限公司 Qt development framework-based interface paging display method, device, system and medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115952772A (en) * 2023-03-13 2023-04-11 广州市玄武无线科技股份有限公司 Page-stepping table display method and device, electronic equipment and storage medium
CN115952772B (en) * 2023-03-13 2023-08-08 广州市玄武无线科技股份有限公司 Paging table display method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
EP3992801A1 (en) Data storage method for flash memory device and flash memory device
CN106716395B (en) The method, apparatus and computer system of issued transaction
US9710283B2 (en) System and method for pre-storing small data files into a page-cache and performing reading and writing to the page cache during booting
US20050055532A1 (en) Method for efficiently controlling read/write of flash memory
CN102929786A (en) Volatile memory representation of nonvolatile storage device set
CN110718264A (en) Method and device for testing information of solid state disk, computer equipment and storage medium
CN106933494B (en) The operating method and device of mixing storage equipment
CN114385089B (en) Cross addressing-based dynamic bank storage method and device and electronic equipment
CN113672650A (en) Method, device and equipment for selecting data in page crossing manner and storage medium
CN116339643B (en) Formatting method, formatting device, formatting equipment and formatting medium for disk array
CN114138292A (en) System upgrading method, storage medium and terminal equipment
CN115237351B (en) NAND block dynamic remapping and read-write command processing method and storage device
CN100447758C (en) Snapshot management method for logic disk
KR20170055206A (en) Method of controlling memory cell access based on safe address mapping
CN115617338A (en) Method and device for quickly generating service page and readable storage medium
CN107436918B (en) Database implementation method, device and equipment
CN111435285B (en) Data writing method and device for storage volume, electronic equipment and machine-readable storage medium
CN112306901B (en) Disk refreshing method and device based on layered storage system, electronic equipment and medium
CN116150212B (en) Data processing method and device
CN117708000B (en) Random writing method and device of data, electronic equipment and storage medium
CN108228437B (en) Method and device for improving evaluation accuracy, electronic device and storage medium
CN107229419B (en) Data writing method and device based on three-dimensional flash memory
CN114242147A (en) Method and device for improving SSD writing performance, computer equipment and storage medium
CN111930300A (en) Data writing method and device, computer readable storage medium and electronic equipment
JP2903605B2 (en) File area management processing method

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