CN112035524A - List data query method and device, computer equipment and readable storage medium - Google Patents

List data query method and device, computer equipment and readable storage medium Download PDF

Info

Publication number
CN112035524A
CN112035524A CN202010909835.4A CN202010909835A CN112035524A CN 112035524 A CN112035524 A CN 112035524A CN 202010909835 A CN202010909835 A CN 202010909835A CN 112035524 A CN112035524 A CN 112035524A
Authority
CN
China
Prior art keywords
data
query
list
query request
loading
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010909835.4A
Other languages
Chinese (zh)
Other versions
CN112035524B (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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202010909835.4A priority Critical patent/CN112035524B/en
Publication of CN112035524A publication Critical patent/CN112035524A/en
Application granted granted Critical
Publication of CN112035524B publication Critical patent/CN112035524B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/2453Query optimisation
    • G06F16/24534Query rewriting; Transformation
    • 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
    • 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/248Presentation of query results

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)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a list data query method, a list data query device, computer equipment and a readable storage medium, wherein the method comprises the following steps: receiving a first query request, and recording the query time of the first query request, wherein the first query request is a query request for displaying first page data; loading a first page of data from the list data for display; receiving a non-primary query request; and loading the data generated before the query time from the data list for displaying. The scheme fundamentally avoids the problem of data duplication with the previously loaded data when the data loading is carried out based on the non-first query request, is favorable for avoiding the problem of data duplication in the data query of the list, supports both a paging display mode and a rolling loading display mode, and does not have the problem of data duplication under both the paging display mode and the rolling loading display mode; the occupation of the memory is reduced.

Description

List data query method and device, computer equipment and readable storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and an apparatus for querying list data, a computer device, and a readable storage medium.
Background
The general page display list data is displayed by requesting data in batches for each page, and when a plurality of people have authority to operate the data to be displayed, the problem that the newly requested data is repeated with the previously requested data occurs. In the case that the web page can use paging display, although this method does not avoid the problem that the newly requested data is repeated with the data that has been requested, the data that the user sees in this page or the same page is not repeated; however, under the condition that the screen of the mobile phone end is small, the problem cannot be solved in a paging mode, the data displayed by the mobile phone end generally adopts a rolling loading mode, and the problem of data repetition can occur to the data displayed by the mobile phone end at the moment.
In addition, there is a method in the prior art, all data are well cached in a memory during first query, and data are read from the cache during loading, but the method occupies too much memory when the transaction amount is large.
Disclosure of Invention
The embodiment of the invention provides a list data query method, which aims to solve the technical problem that data are repeated or memory is occupied in the prior art. The method comprises the following steps:
receiving a first query request, and recording query time of the first query request, wherein the first query request is a query request for displaying first page data;
loading a first page of data from the list data for display;
receiving a non-primary query request;
and loading the data generated before the query time from the data list for displaying.
The embodiment of the invention also provides a list data query device, which is used for solving the technical problem that data are repeated or memory is occupied in the prior art. The device includes:
the query request receiving module is used for receiving a first query request and recording query time of the first query request, wherein the first query request is a query request for requesting to display first page data;
the data display module is also used for loading the first page of data from the list data for display;
the query request receiving module is also used for receiving a non-primary query request;
and the data display module is used for loading the data generated before the query time from the data list and displaying the data.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the random list data query method when executing the computer program so as to solve the technical problem of data repetition or memory occupation in the prior art.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program for executing the above arbitrary list data query method is stored in the computer-readable storage medium, so as to solve the technical problem that data is duplicated or a memory is occupied in the prior art.
In the embodiment of the invention, a first query request and a non-first query request are distinguished, the first query request is a query request for requesting to display first page data when list data is queried, the first page data is loaded from the list data for display based on the first query request, the query time of the first query request is recorded, and then when the non-first query request is received, the data generated before the query time is loaded from a data list is displayed, so that the data generated from the query time to the current data loading time is excluded from the query range, namely the data generated from the query time to the current data loading time does not influence the data loading and data display based on the non-first query request, and the data loading based on the non-first query request is also loaded from unchanged data generated before the query time, the problem of data duplication with the previously loaded data when the data is loaded based on the non-first query request is fundamentally avoided, and the problem of data duplication in the list data query is avoided; in addition, the method supports both a paging display mode and a rolling loading display mode, and the problem of data repetition does not occur in the paging display mode and the rolling loading display mode; in addition, data does not need to be cached in a memory, and occupation of the memory is reduced.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the principles of the invention. In the drawings:
fig. 1 is a flowchart of a method for querying list data according to an embodiment of the present invention;
FIG. 2 is a block diagram of a computer device according to an embodiment of the present invention;
fig. 3 is a block diagram of a list data query apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the following embodiments and accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
In an embodiment of the present invention, a method for querying list data is provided, as shown in fig. 1, the method includes:
step 102: receiving a first query request, and recording query time of the first query request, wherein the first query request is a query request for displaying first page data;
step 104: loading a first page of data from the list data for display;
step 106: receiving a non-primary query request;
step 108: and loading the data generated before the query time from the data list for displaying.
It can be known from the flow shown in fig. 1 that, in the embodiment of the present invention, a first query request and a non-first query request are proposed to be distinguished, the first query request is a query request requesting to display a first page of data when querying list data, the first page of data is loaded from the list data for display based on the first query request, and the query time of the first query request is recorded, so that when the non-first query request is received, data generated before the query time is loaded from the data list for display, and data generated from the query time to the current data loading time is excluded from the query range, that is, data generated from the query time to the current data loading time does not affect data loading and data display based on the non-first query request, and data loading based on the non-first query request or data generated from the time before the query time, Loading in unchanged data, thereby fundamentally avoiding the problem of data duplication with the previously loaded data when data loading is carried out based on a non-first query request, and being beneficial to avoiding the problem of data duplication in the data query of the list; in addition, the method supports both a paging display mode and a rolling loading display mode, and the problem of data repetition does not occur in the paging display mode and the rolling loading display mode; in addition, data does not need to be cached in a memory, occupation of the memory is reduced, and extra resource consumption is avoided.
In specific implementation, the data query of the list is generally divided into multiple times of requests for requesting batch data to be displayed, data which is not requested for the second time is displayed in a page mode, each page displays a preset number of pieces of data, and then the request for requesting which page of data is displayed can be judged according to the received query request.
In a specific implementation, the list data is stored in the database, and the list data stored in the database may change at any time as the data is continuously generated, for example, the list data is added, so as to distinguish data generated before the query time from data generated after the query time.
In specific implementation, in order to further avoid data duplication in data loading, in this embodiment, data generated before query time is loaded from a data list for display in the following manner:
after receiving the non-primary query request, screening the data after the query time, and displaying the data loaded and responded according to the non-primary query request in the rest data, namely excluding the newly generated data from the query time to the current data loading time from the data loading range, so that the newly generated data can not influence the data loading and data displaying based on the non-primary query request, or the data loading of the non-primary query request is performed based on the data which is not changed before the query time, thereby fundamentally avoiding the problem of data repetition between the data loading of different requests.
For example, 20 pieces of data in the current list data are sorted according to the sequence from the generation time to the first, each query request is used for requesting to display 5 pieces of data, for example, after a first query request, the first 5 pieces (i.e., the 1 st to 5 th pieces of data) of data are loaded for display, at this time, one piece of data is newly generated and arranged in the first piece, when a non-first query request is received again, if 5 pieces (i.e., the current 6 th to 10 th pieces of data) of data are reloaded according to the prior art sequence for display, but the current 6 th piece of data is actually the 5 th piece of data before the first query time, so that the 5 th piece of data before the first query time is reloaded, and the problem of data duplication occurs, if the data after the query time is screened from the data list according to the loading manner of the present application, i.e., after the newly generated piece of data is screened, the data sequence does not change if the remaining data does not have newly generated data or data generated before the first query time, at the moment, 5 data (namely, the data from the 6 th to the 10 th before the first query time) are sequentially loaded in the remaining data for display, and the problem of data repetition is fundamentally avoided.
In specific implementation, the list data query method can display data in a paging display or rolling loading mode, namely, the method can support paging display and rolling loading display without data repetition. The list data query method based on a set of processing logic can support both page skipping query and rolling loading query when multi-person operable list data query is realized, and data are not repeated when rolling loading query is performed.
In this embodiment, a computer device is provided, as shown in fig. 2, and includes a memory 202, a processor 204, and a computer program stored on the memory and executable on the processor, and the processor implements any of the above list data query methods when executing the computer program.
In particular, the computer device may be a computer terminal, a server or a similar computing device.
In the present embodiment, there is provided a computer-readable storage medium storing a computer program for executing the above-described arbitrary list data querying method.
In particular, computer-readable storage media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer-readable 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 Discs (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. As defined herein, a computer readable storage medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
Based on the same inventive concept, the embodiment of the present invention further provides a device for querying list data, as described in the following embodiments. Because the principle of solving the problem of the list data query device is similar to that of the list data query method, the implementation of the list data query device can refer to the implementation of the list data query method, and repeated details are not repeated. As used hereinafter, the term "unit" or "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 3 is a block diagram of a structure of a list data query apparatus according to an embodiment of the present invention, as shown in fig. 3, the apparatus includes:
a query request receiving module 302, configured to receive a first query request, and record query time of the first query request, where the first query request is a query request requesting to display first page data;
the data display module 304 is further configured to load the first page of data from the list data for display;
the query request receiving module is also used for receiving a non-primary query request;
and the data display module is used for loading the data generated before the query time from the data list and displaying the data.
In one embodiment, the data in the list data is ordered by generation time.
In an embodiment, the data presentation module is specifically configured to screen out, from the data list, data whose generation time is after the query time, and present, in remaining data, data in which a response is loaded according to the non-initial query request.
In one embodiment, further comprising:
the data display module is also used for displaying data in a paging display or rolling loading mode.
The embodiment of the invention realizes the following technical effects: the method is characterized in that a first query request and a non-first query request are distinguished, the first query request is a query request for requesting to display first page data when list data is queried, the first page data is loaded from the list data to be displayed based on the first query request, the query time of the first query request is recorded, and then when the non-first query request is received, the data generated before the query time is loaded from a data list is displayed, so that the data generated from the query time to the current data loading time are excluded from the query range, namely, the data generated from the query time to the current data loading time cannot influence the data loading and data displaying based on the non-first query request, and the data loading based on the non-first query request is also loaded from the unchanged data generated before the query time, so that the data loading and the data loading occurring before the non-first query request are fundamentally avoided The problem of data repetition is favorable for avoiding the problem of data repetition in the process of searching list data; in addition, the method supports both a paging display mode and a rolling loading display mode, and the problem of data repetition does not occur in the paging display mode and the rolling loading display mode; in addition, data does not need to be cached in a memory, and occupation of the memory is reduced.
It will be apparent to those skilled in the art that the modules or steps of the embodiments of the invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes may be made to the embodiment of the present invention by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for querying list data is characterized by comprising the following steps:
receiving a first query request, and recording query time of the first query request, wherein the first query request is a query request for displaying first page data;
loading a first page of data from the list data for display;
receiving a non-primary query request;
and loading the data generated before the query time from the data list for displaying.
2. The list data query method of claim 1, wherein the data in the list data is sorted by generation time.
3. The method for querying tabular data according to claim 1, wherein loading the data generated before the query time from the data list for presentation comprises:
and screening out data with the generation time after the query time from the data list, and displaying the data of the non-first query request load response in the remaining data.
4. The list data query method of any one of claims 1 to 3, further comprising:
and displaying the data in a paging display mode or a rolling loading mode.
5. A list data query apparatus, comprising:
the query request receiving module is used for receiving a first query request and recording query time of the first query request, wherein the first query request is a query request for requesting to display first page data;
the data display module is also used for loading the first page of data from the list data for display;
the query request receiving module is also used for receiving a non-primary query request;
and the data display module is used for loading the data generated before the query time from the data list and displaying the data.
6. The list data query device of claim 5, wherein the data in the list data is sorted by generation time.
7. The list data query device of claim 5, wherein the data presentation module is specifically configured to screen out data whose generation time is after the query time from the data list, and present data whose generation time is after the query time in remaining data according to the data that is not a first query request load response.
8. The list data query device according to any one of claims 5 to 7, further comprising:
the data display module is also used for displaying data in a paging display or rolling loading mode.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of querying list data of any one of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium characterized in that the computer-readable storage medium stores a computer program for executing the list data query method of any one of claims 1 to 4.
CN202010909835.4A 2020-09-02 2020-09-02 List data query method, device, computer equipment and readable storage medium Active CN112035524B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010909835.4A CN112035524B (en) 2020-09-02 2020-09-02 List data query method, device, computer equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010909835.4A CN112035524B (en) 2020-09-02 2020-09-02 List data query method, device, computer equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN112035524A true CN112035524A (en) 2020-12-04
CN112035524B CN112035524B (en) 2024-04-19

Family

ID=73591190

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010909835.4A Active CN112035524B (en) 2020-09-02 2020-09-02 List data query method, device, computer equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN112035524B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112699147A (en) * 2020-12-31 2021-04-23 京东数字科技控股股份有限公司 Paging query method, device, equipment and storage medium
CN113868315A (en) * 2021-09-28 2021-12-31 深圳云之家网络有限公司 Data rolling loading method, device, equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103678701A (en) * 2013-12-31 2014-03-26 福建四创软件有限公司 Disaster prevention and reduction information processing system and method based on WebService
CN103778135A (en) * 2012-10-18 2014-05-07 厦门雅迅网络股份有限公司 Method for distribution storage and paging querying of real-time data
CN103942196A (en) * 2013-01-17 2014-07-23 腾讯科技(深圳)有限公司 Method, device and system for data inquiry
CN109657176A (en) * 2018-10-16 2019-04-19 深圳壹账通智能科技有限公司 Web vector graphic state identification method, device, equipment and readable storage medium storing program for executing
CN110825603A (en) * 2019-11-01 2020-02-21 北京博睿宏远数据科技股份有限公司 Page first loading time determining method and device, electronic equipment and storage medium
CN110866045A (en) * 2019-10-25 2020-03-06 广西英腾教育科技股份有限公司 Data concurrency statistical method, system, medium and equipment
CN110888925A (en) * 2019-10-11 2020-03-17 广州大气候农业科技有限公司 Data loading and distributing method and device and storage medium
CN111414534A (en) * 2019-01-07 2020-07-14 阿里巴巴集团控股有限公司 Information processing method, device, equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103778135A (en) * 2012-10-18 2014-05-07 厦门雅迅网络股份有限公司 Method for distribution storage and paging querying of real-time data
CN103942196A (en) * 2013-01-17 2014-07-23 腾讯科技(深圳)有限公司 Method, device and system for data inquiry
CN103678701A (en) * 2013-12-31 2014-03-26 福建四创软件有限公司 Disaster prevention and reduction information processing system and method based on WebService
CN109657176A (en) * 2018-10-16 2019-04-19 深圳壹账通智能科技有限公司 Web vector graphic state identification method, device, equipment and readable storage medium storing program for executing
CN111414534A (en) * 2019-01-07 2020-07-14 阿里巴巴集团控股有限公司 Information processing method, device, equipment and storage medium
CN110888925A (en) * 2019-10-11 2020-03-17 广州大气候农业科技有限公司 Data loading and distributing method and device and storage medium
CN110866045A (en) * 2019-10-25 2020-03-06 广西英腾教育科技股份有限公司 Data concurrency statistical method, system, medium and equipment
CN110825603A (en) * 2019-11-01 2020-02-21 北京博睿宏远数据科技股份有限公司 Page first loading time determining method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112699147A (en) * 2020-12-31 2021-04-23 京东数字科技控股股份有限公司 Paging query method, device, equipment and storage medium
CN113868315A (en) * 2021-09-28 2021-12-31 深圳云之家网络有限公司 Data rolling loading method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN112035524B (en) 2024-04-19

Similar Documents

Publication Publication Date Title
US11734271B2 (en) Data query method, apparatus and device
US20160142369A1 (en) Service addressing in distributed environment
CN105631035B (en) Date storage method and device
CN112035524B (en) List data query method, device, computer equipment and readable storage medium
CN110557445A (en) Access request routing method and device, storage medium and electronic equipment
CN111028009B (en) Processing method and device for retrievable business entity
CN106202082B (en) Method and device for assembling basic data cache
CN110175306A (en) A kind of processing method and processing device of advertising information
EP3401862A1 (en) Data storage and service processing method and device
CN104657435A (en) Storage management method for application data and network management system
CN105843559A (en) Read-write optimization method and system of disk cache system
US7908243B2 (en) Considering transient data also in reports generated based on data eventually stored in a data-warehouse
CN106874326A (en) A kind of item list obtains request processing method and device
CN109614270A (en) Data read-write method, device, equipment and storage medium based on Hbase
CN116595096A (en) Metadata synchronization method, device, equipment and medium based on integration of lake and warehouse
CN112052223A (en) File uploading method and device, computer equipment and readable storage medium
CN109656805B (en) Method and device for generating code link for business analysis and business server
CN110928895B (en) Data query and data table establishment method, device and equipment
CN113761053A (en) Data query method and device, electronic equipment and storage medium
CN116126546B (en) Performance optimization method and device, electronic equipment and medium
CN111400406A (en) Data processing method and device, electronic equipment and computer storage medium
US11947822B2 (en) Maintaining a record data structure using page metadata of a bookkeeping page
CN114722083A (en) Contract information storage and classification management method and device
CN110457366A (en) A kind of data query method, apparatus and electronic equipment
CN111444198A (en) Transaction storage and query method based on centralized block chain type account book

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