CN101149736B - Mass data inquiry method and system - Google Patents
Mass data inquiry method and system Download PDFInfo
- Publication number
- CN101149736B CN101149736B CN200610152312XA CN200610152312A CN101149736B CN 101149736 B CN101149736 B CN 101149736B CN 200610152312X A CN200610152312X A CN 200610152312XA CN 200610152312 A CN200610152312 A CN 200610152312A CN 101149736 B CN101149736 B CN 101149736B
- Authority
- CN
- China
- Prior art keywords
- data
- total amount
- inquiry
- server end
- checked
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Computer And Data Communications (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses an inquiry method and system of massive data, relate to data processing field, can solve the existing issues of no inquiry results and affecting the system performance when querying the massive data with the existing method. The said method comprises: make the judgments if the total amount of the inquired data is consistent with the data the server terminals recorded, if not, then correct automatically the total amount of the inquired data; inquire the data the server terminals recorded corresponding with the inquired data at client terminals; judge if the total amount of the server terminals recording data is consistent with the actual amount, if not, then correct automatically the total amount of the server terminals recording data and total amount of the inquired data, inquire the data the server terminals recorded again, return the inquiry results. The method provided by this invention avoids displaying blank pages to users through automatically correction inquiry page number, bring better use experience, and avoid the system performance problems real-time total amount of data inquiry brings through automatically corrected and recorded total amount of data.
Description
Technical field
The present invention relates to data processing field, particularly relate to a kind of querying method and system of mass data.
Background technology
The diverse network application system is after developing into certain phase, and the system data amount heightens, thereby can bring a lot of technical difficult problems, like data storage, Data Update, data presentation etc.Aspect data presentation; The problem that the network user often runs into is after clicking certain web page interlinkage; Display web information is out of date or show the blank page in browser; The data presentation function of the system video data that do not upgrade in time causes the user can not in time browse up-to-date information, brings very big inconvenience to the user.Especially in storing the frequent system of big data quantity and Data Update, cause the data presentation problem more easily.
The demonstration of current mass data; The general paging inquiring technology that adopts promptly will data presented be divided into some pages or leaves, and every page shows certain data volume; System comes the current data presented of wanting of Search and Orientation according to the every page of data presented amount and the inquiry page number, and is shown to the user.A kind of paging querying method at present commonly used is directly according to inquiry page number video data, and for example the user clicks the 8th page when browsing forum's model, after the direct Search and Orientation of system the 8th page data presentation is come out.The problem that said method exists is: the inquiry page number that do not upgrade in time if deleted certain webpage, will occur inquiring about total page number that the page number surpasses real data, and then system does not show any data with the form of the blank page.Especially for the WEB application system of high access, data change is very frequent, can often cause the no result of paging inquiry.
Also having a kind of paging querying method is real-time data query total amount, and in time adjusts the inquiry page number according to Query Result, thereby the inquiry of avoiding above-mentioned first method to bring does not have ramification problem.But this method is brought a new problem again: because the data volume of inquiry is huge, inquire about the meeting occupying system resources in real time, influence travelling speed and other performances of system.
Above-mentioned two kinds of paging querying methods are not only applicable to the data presentation aspect, are applicable to that also other are with the mass data inquiry of sequential storage logically such as paging or piecemeal.Therefore, carrying out according to the data query result in the process of concrete application processes, all can have the problem of inquiring about no result or influencing system performance.
Summary of the invention
Technical matters to be solved by this invention provides a kind of mass data inquiry method or system, does not have result and the problem that influences system performance to solve the inquiry that existing method brought when the inquiry mass data.
For solving the problems of the technologies described above, the invention provides a kind of mass data inquiry method, comprising:
Judge whether client data total amount to be checked is consistent with server end data recorded total amount,, then proofread and correct said data total amount to be checked if inconsistent;
Corresponding said client data to be checked, querying server end data recorded;
Judge whether Query Result is empty, if sky, then correction server end data recorded total amount and data total amount to be checked, querying server end data recorded again;
Return Query Result.
Wherein, judge according to following steps whether client data total amount to be checked is consistent with server end data recorded total amount: calculate reference position according to the inquiry page number and every page of data volume that comprises; Whether judge the corresponding data volume of said reference position greater than server end data recorded total amount, if greater than, then client data total amount and server end data recorded total amount to be checked is inconsistent.
Wherein, according to the corresponding said client of following steps data to be checked, querying server end data recorded: calculate the reference position of inquiry according to the inquiry page number and every page of data volume that comprises; The said reference position of inquiry is confirmed Query Result according to said reference position and every page of data volume that comprises in the server end data recorded.
The present invention also provides a kind of mass data inquiry system, comprising:
Record cell is used to write down the data total amount of server end;
Automatically correcting unit is used to judge whether client data total amount to be checked is consistent with the server end data total amount of recording unit records, if inconsistent, then from the said data total amount to be checked of NMO correction; Judge whether Query Result is empty, if empty, the data total amount and the data total amount to be checked of then proofreading and correct said record cell;
Query unit is used for corresponding said client data to be checked, querying server end data recorded, and return Query Result.
Wherein, said mass data offers client according to the paging form, and every page comprises identical data volume.
Wherein, said automatic correcting unit judges according to following steps whether client data total amount to be checked is consistent with the server end data total amount of recording unit records: calculate reference position according to the inquiry page number and every page of data volume that comprises; Judge the corresponding data volume of said reference position whether greater than the data total amount of server end, if greater than, then the server end data total amount of client data total amount to be checked and recording unit records is inconsistent.
Wherein, Said automatic correcting unit judges according to following steps whether the server end data total amount of recording unit records is consistent with the data total amount of reality: whether the Query Result of judging query unit is empty; If empty, then the server end data total amount of recording unit records is inconsistent with actual data total amount.
Wherein, said query unit is according to the corresponding said client of following steps data to be checked, querying server end data recorded: calculate the reference position of inquiry according to the inquiry page number and every page of data volume that comprises; The said reference position of inquiry is confirmed Query Result according to said reference position and every page of data volume that comprises in the server end data.
Compared with prior art, the present invention has the following advantages:
In the paging querying flow, when the inquiry reference position of calculating surpasses the data recorded total amount, then need proofread and correct all inquiry page numbers, and newly calculate reference position according to the query page code weight of proofreading and correct, inquire about then; If Query Result still is empty behind the correction inquiry page number, then need the data total amount of correction entries, and the adjustment inquiry page number, recomputate reference position again and inquire about, just can obtain correct Query Result.When the present invention surpasses the data total amount at query context,, avoid the page of blank is shown to the user, thereby bring better experience to the user from the NMO correction query context; And, through the record data total amount, when finding that the data recorded total amount deviation occurs with actual data total amount, the data total amount of automatic correction entries, thereby the system performance problems of avoiding real-time data query total amount to bring.
Description of drawings
Fig. 1 is the flow chart of steps of a kind of mass data inquiry method according to the invention;
Fig. 2 is a kind of mass data inquiry system structural drawing according to the invention.
Embodiment
For make above-mentioned purpose of the present invention, feature and advantage can be more obviously understandable, below in conjunction with accompanying drawing and embodiment the present invention done further detailed explanation.
The present invention is applied in mass data demonstration aspect, for the data of paging query display, can correct Query Result be shown to the user, and following content will be that example describes with the data presentation.
With reference to Fig. 1, be the flow chart of steps of a kind of mass data inquiry method according to the invention.For the mass data of Pagination Display, the total number of the total volume index certificate of data, for example data have 1000,100 of the data of every page of demonstration equal number, then the paging page number is totally 10 pages.When the user clicked certain page link, server system was carried out following steps, gave the client user with the data presentation of the corresponding page number.
Whether step 102 judges said reference position greater than the data recorded total amount, if greater than, then execution in step 103; If be less than or equal to, then execution in step 105.When the reference position of inquiring about surpasses the data recorded total number; Represent that then the inquiry page number of paging inquiry has surpassed total page number of data; Deviation appears in the data total amount that promptly offers client data presented total amount and server record, needs execution in step 103 to proofread and correct inquiry page number one page to the end according to the total page number of data recorded.Execution in step 104 then, according to above-mentioned formula, newly calculate the reference position of inquiry according to new query page code weight, again the bar number at the place of new reference position described in the data of execution in step 105 query notes.And surpass total page number of data when the inquiry page number of paging inquiry, promptly offer the data total amount of client data presented total amount and server record when consistent, direct execution in step 105 query notes.
Cause the inconsistent reason of data total amount of above-mentioned client data presented total amount to be checked and server record to be: when certain client is browsed certain webpage; Keeper or other client users have deleted partial data; Though the data recorded total amount is upgraded in deletion action automatically; But because said client does not refresh the page of oneself; Cause said client data presented still to be the legacy data before the deletion action, therefore deviation appears in the total amount that Updates Information with server record.When judging that data total amount to be checked and server end data recorded total amount be whether consistent, remove and above-mentionedly judge through calculating the inquiry reference position, can also adopt additive method well known to those skilled in the art.
The method of the invention only when being necessary from the inquiry page number of NMO correction paging inquiry, promptly when query context surpasses the data total amount, from the NMO correction query context, is avoided the blank page is shown to the user, thereby is brought better experience to the user.Especially for the frequent application system of Data Update, like webpages such as news, amusement, consultings, the present invention can solve the issueless problem of frequent inquiry.
Usually, cause above-mentioned data recorded total amount and the inconsistent reason of real data total amount to be: administrator hand operating database deleted data and new record more not; Or in the operating process of some interpolation, deleted data, should upgrade the data recorded total amount and not renewal, perhaps upgrade failure.Said reason all can cause data recorded total amount and actual data total amount deviation to occur, and generalized case is that the data recorded total amount has surpassed actual data total amount.When whether the judgment data total amount deviation occurs, judge through the Query Result behind the correction page number except that above-mentioned, can also adopt additive method well known to those skilled in the art.
Though it is rare that the situation of deviation appears in above-mentioned data recorded total amount and real data total amount,, can guarantee the correctness of Query Result once more through the data total amount of automatic correction entries.The method of the invention is the data total amount of correction entries automatically when being necessary only; Promptly through the record data total amount; When finding that the data recorded total amount deviation occurs with actual data total amount; The data total amount of automatic correction entries, thereby the system performance problems of avoiding real-time data query total amount to bring.
To the implementation of said system, will illustrate mass data inquiry method of the present invention below.For example the user browses forum's model tabulation, supposes that there are 1000 models in current forum, and every page shows 50 models, and then the data recorded total amount is 1000, and total page number of data is 20.The model that user capture is the 20th page, server can go to calculate the reference position of model earlier: (page number-1) * every page of demonstration number+1=951, the model that returns to the user then should be from the 951st to the 1000th.If but have this time the people to delete the model of forum, and suppose to have deleted 110, forum had had only 890 models when then in fact the user asked the 20th page data, and the data recorded total amount also is updated to 890 in deletion action.The reference position (951) that this time, system just can judge inquiry has automatically surpassed data recorded total amount (890); Can adjust to last page (890/50=18) to the page number (20) of inquiry according to the data recorded total amount automatically then; Recomputate reference position: (page number-1) * every page of demonstration number+1=851 returns to the user with the 851st to 890 data.
Return the 851st to 890 data in the user above-mentioned; There is not more new record if there is the keeper directly to delete 50 data through database; Then can judge the data that obtain for empty, error has appearred in expression data recorded total amount, and system will recomputate the total amount of data automatically; And renewal data recorded total amount (890-50=840); Proofread and correct inquiry page number one page (17) to the end then, recomputate reference position: (page number-1) * every page of demonstration number+1=801 returns to the user with the 801st to 840 data.
Method provided by the invention has not only solved the issueless problem of inquiry, has also solved system performance problems simultaneously, realizes simply more being applicable to the application system that the data query amount is huge, Data Update is frequent.Said method is not limited in the paging query display of mass data, can also be applied to other Query Results according to mass data and carry out in the application system of relevant treatment, through improving the treatment effeciency that search efficiency improves subsequent processes.
For realizing above-mentioned querying method, the present invention also provides a kind of mass data inquiry system, with reference to Fig. 2, is a kind of mass data inquiry system structural drawing according to the invention.Said system comprises query unit 201, record cell 202 and automatic correcting unit 203, explains as follows.
Automatically correcting unit 203 is used for proofreading and correct the inquiry page number and data recorded total amount.When client will show certain page data; Whether the inquiry reference position of at first judging said query unit 201 calculating is greater than data recorded total amount in the record cell 202; If surpassed the total page number of data, need proofread and correct inquiry page number one page to the end according to the total page number of data recorded in the record cell 202 greater than then inquiring about the page number.Said query unit 201 can recomputate the reference position of inquiry according to the inquiry page number after proofreading and correct, and inquires about again.If the inquiry page number of correcting unit 203 judgements surpasses the total page number of data automatically, then query unit 201 is inquired about according to the reference position of original calculating.
For avoiding data recorded total amount and the inconsistent situation of real data total amount in the above-mentioned record cell 202, correcting unit 203 will judge further also whether the Query Result of query unit 201 is empty automatically.If the Query Result behind the correction page number still is empty, deviation then appears, need statistics total amount again, correction entries unit 202 data recorded total amounts, and according to the said new total page number of data total data, the adjustment inquiry page number is one page to the end.Then, said query unit 201 can recomputate the reference position of inquiry according to the inquiry page number after proofreading and correct once more, inquires about again, just can obtain correct result.
More than to a kind of mass data inquiry method provided by the present invention and system; Carried out detailed introduction; Used concrete example among this paper principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, part all can change on embodiment and range of application.In sum, this description should not be construed as limitation of the present invention.
Claims (7)
1. a mass data inquiry method is characterized in that, comprising:
Judge whether client data total amount to be checked is consistent with server end data recorded total amount,, then proofread and correct said data total amount to be checked if inconsistent;
Corresponding said client data to be checked, querying server end data recorded;
Judge whether Query Result is empty, if sky, then correction server end data recorded total amount and data total amount to be checked, querying server end data recorded again;
Return Query Result.
2. method according to claim 1 is characterized in that, judges according to following steps whether client data total amount to be checked is consistent with server end data recorded total amount:
Calculate reference position according to the inquiry page number and every page of data volume that comprises;
Whether judge the corresponding data volume of said reference position greater than server end data recorded total amount, if greater than, then client data total amount and server end data recorded total amount to be checked is inconsistent.
3. method according to claim 1 is characterized in that, according to the corresponding said client of following steps data to be checked, and querying server end data recorded:
Calculate the reference position of inquiry according to the inquiry page number and every page of data volume that comprises;
The said reference position of inquiry is confirmed Query Result according to said reference position and every page of data volume that comprises in the server end data recorded.
4. a mass data inquiry system is characterized in that, comprising:
Record cell is used to write down the data total amount of server end;
Automatically correcting unit is used to judge whether client data total amount to be checked is consistent with the server end data total amount of recording unit records, if inconsistent, then proofreaies and correct said data total amount to be checked; Judge whether Query Result is empty, if empty, the data total amount and the data total amount to be checked of then proofreading and correct said record cell;
Query unit is used for corresponding said client data to be checked, querying server end data recorded, and return Query Result.
5. system according to claim 4 is characterized in that: said mass data offers client according to the paging form, and every page comprises identical data volume.
6. system according to claim 4 is characterized in that, said automatic correcting unit judges according to following steps whether client data total amount to be checked is consistent with the server end data total amount of recording unit records:
Calculate reference position according to the inquiry page number and every page of data volume that comprises;
Judge the corresponding data volume of said reference position whether greater than the data total amount of server end, if greater than, then the server end data total amount of client data total amount to be checked and recording unit records is inconsistent.
7. system according to claim 4 is characterized in that, said query unit is according to the corresponding said client of following steps data to be checked, querying server end data recorded:
Calculate the reference position of inquiry according to the inquiry page number and every page of data volume that comprises;
The said reference position of inquiry is confirmed Query Result according to said reference position and every page of data volume that comprises in the server end data.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200610152312XA CN101149736B (en) | 2006-09-21 | 2006-09-21 | Mass data inquiry method and system |
HK08107742.8A HK1114437A1 (en) | 2006-09-21 | 2008-07-14 | A method and system for mass data enquiry |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200610152312XA CN101149736B (en) | 2006-09-21 | 2006-09-21 | Mass data inquiry method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101149736A CN101149736A (en) | 2008-03-26 |
CN101149736B true CN101149736B (en) | 2012-01-11 |
Family
ID=39250265
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN200610152312XA Active CN101149736B (en) | 2006-09-21 | 2006-09-21 | Mass data inquiry method and system |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN101149736B (en) |
HK (1) | HK1114437A1 (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101533406B (en) * | 2009-04-10 | 2010-10-13 | 北京锐安科技有限公司 | Mass data querying method |
JP5325159B2 (en) | 2010-05-12 | 2013-10-23 | インターナショナル・ビジネス・マシーンズ・コーポレーション | File server for extracting file list and displaying on client, method for displaying on client and computer program executable on file server |
CN104281582B (en) * | 2013-07-02 | 2017-08-25 | 阿里巴巴集团控股有限公司 | Pagination Display control method and device |
CN104123340B (en) * | 2014-06-25 | 2018-04-20 | 世纪禾光科技发展(北京)有限公司 | A kind of database divides table paging query method and system |
CN105630914A (en) * | 2015-12-21 | 2016-06-01 | 山东中创软件商用中间件股份有限公司 | Log data query method and device |
CN107783978A (en) * | 2016-08-24 | 2018-03-09 | 中安消物联传感(深圳)有限公司 | A kind of big data inquiry return method and device |
CN112231597A (en) * | 2020-09-28 | 2021-01-15 | 北京金山云网络技术有限公司 | Page data query method and device and electronic equipment |
-
2006
- 2006-09-21 CN CN200610152312XA patent/CN101149736B/en active Active
-
2008
- 2008-07-14 HK HK08107742.8A patent/HK1114437A1/en unknown
Non-Patent Citations (8)
Title |
---|
兰萍.基于ASP.NET的WEB数据库的自定义分页显示.电脑知识与技术 36.2005,(36),58-62. |
兰萍.基于ASP.NET的WEB数据库的自定义分页显示.电脑知识与技术 36.2005,(36),58-62. * |
勾成图等.海量数据分页机制在Web信息系统中的应用研究.计算机应用25 8.2005,25(8),1926-1929. |
勾成图等.海量数据分页机制在Web信息系统中的应用研究.计算机应用25 8.2005,25(8),1926-1929. * |
彭宝玲.Sybase海量数据分页查询优化算法.广东公安科技 81.2005,(81),41-43. |
彭宝玲.Sybase海量数据分页查询优化算法.广东公安科技 81.2005,(81),41-43. * |
胡勇智.ADO.NET中实现查询结果的分页显示.电脑学习 6.2005,(6),27-28. |
胡勇智.ADO.NET中实现查询结果的分页显示.电脑学习 6.2005,(6),27-28. * |
Also Published As
Publication number | Publication date |
---|---|
CN101149736A (en) | 2008-03-26 |
HK1114437A1 (en) | 2008-10-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101149736B (en) | Mass data inquiry method and system | |
CN1799051B (en) | Method for browsing contents using page storing file | |
US6105028A (en) | Method and apparatus for accessing copies of documents using a web browser request interceptor | |
US6934740B1 (en) | Method and apparatus for sharing common data objects among multiple applications in a client device | |
US7210094B2 (en) | Method and system for dynamic web page breadcrumbing using javascript | |
EP0917071B1 (en) | Capturing unpaginated hypertext in a paginated document | |
CN100511220C (en) | Method and system for maintaining data in distributed caches | |
US5758361A (en) | Document editor for linear and space efficient representation of hierarchical documents | |
US20070282869A1 (en) | Automatically generating web forms from database schema | |
US20110125804A1 (en) | Modular distributed mobile data applications | |
CN100565524C (en) | A kind of system, method and browser of preserving web page contents | |
US20020016828A1 (en) | Web page rendering architecture | |
US8225192B2 (en) | Extensible cache-safe links to files in a web page | |
US20180075001A1 (en) | Document transformation performance via incremental fragment transformations | |
US8516041B1 (en) | Pre-fetching asynchronously requested content | |
CN102214192A (en) | Method for realizing data curve chart display on Web page and server | |
CN102821133B (en) | The method of XBRL Data Analysis and server | |
US6883020B1 (en) | Apparatus and method for filtering downloaded network sites | |
WO2012155621A1 (en) | Method for importing and exporting file based on web | |
US20090313352A1 (en) | Method and System for Improving the Download of Specific Content | |
US20020052889A1 (en) | Method for managing alterations of contents | |
CN110191168A (en) | Processing method, device, computer equipment and the storage medium of online business datum | |
US7895337B2 (en) | Systems and methods of generating a content aware interface | |
CN105653724A (en) | Page exposure monitoring method and device | |
EP1850847A2 (en) | Inhibitors of checkpoint kinases |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 1114437 Country of ref document: HK |
|
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: GR Ref document number: 1114437 Country of ref document: HK |