CN106055637A - Buffer memory data processing method and server - Google Patents
Buffer memory data processing method and server Download PDFInfo
- Publication number
- CN106055637A CN106055637A CN201610370249.0A CN201610370249A CN106055637A CN 106055637 A CN106055637 A CN 106055637A CN 201610370249 A CN201610370249 A CN 201610370249A CN 106055637 A CN106055637 A CN 106055637A
- Authority
- CN
- China
- Prior art keywords
- data
- snapshot
- identification information
- target
- webpage
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
- G06F16/9574—Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a buffer memory data processing method and server. The method comprises the following steps: receiving page data request information sent by a client for a first webpage, and based on the request information, obtaining identification information of at least one piece of data corresponding to the first webpage; based on the identification information of the at least one piece of data, obtaining at least one piece of snapshot information of the at least one piece of data from a buffer memory; based on the snapshot information, filtering the at least one piece of data to obtain identification information of the at least one piece of data after filtering; and based on the page data request information of the first webpage and the identification information of the at least one piece of data after the filtering, obtaining target data for a target page of the first webpage from the buffer memory, and feeding the target data of the target page back to the client.
Description
Technical field
The present invention relates to the communications field, particularly relate to a kind of caching data processing method and server.
Background technology
Along with the development of the Internet and the raising server product of living standards of the people existing a class general need, i.e.
The shelf life of data and undercarriage time mechanism.Such as, in store, certain commodity can arrange certain day the most added, certain
It undercarriage sometime;In application, certain application in the heart can arrange certain day the most added, and certain day sometime
Undercarriage.Upper undercarriage mechanism usually arranges effect duration of these data in the technology that buffering scheme uses, such as half an hour, the most just
Being to say, typically can there is the hysteresis quality of half an hour in the added and undercarriage of data;And the common scheme of another kind is by upper undercarriage
Set of time is in units of sky, so can carry out the data reaching the undercarriage time clearly in the timed task in morning every day
Reason, it is done so that generally require the sacrifice more manageability of data.
Summary of the invention
Present invention is primarily targeted at a kind of caching data processing method of proposition and server, it is intended to solve prior art
Present in the problems referred to above.
For achieving the above object, a kind of caching data processing method that the present invention provides, it is applied to server, described method
Including:
Receive the page data request information for the first webpage that client sends, get based on described solicited message
The identification information of at least one data that described first webpage is corresponding;
Identification informations based at least one data described get at least the one of at least one data described from caching
Individual SNAPSHOT INFO;Wherein, described SNAPSHOT INFO at least includes the identification information of data, the initial time of described data and
The termination time;
Based on described SNAPSHOT INFO, at least one data described are filtered, at least one data after being filtered
Identification information;
Based on for the first webpage page data request information and filter after at least one data mark letter
Breath, gets the target data of target pages for described first webpage, with to described client feedback target from caching
The target data of the page.
A kind of server that the present invention provides, including:
Acquisition request unit, for receiving the page data request information for the first webpage that client sends, based on
Described solicited message gets the identification information of at least one data corresponding to described first webpage;
Snapshot search unit, for identification informations based at least one data described from caching get described at least
At least one SNAPSHOT INFO of one data;Wherein, described SNAPSHOT INFO at least includes the identification information of data, described number
According to initial time and terminate the time;
Filter element, for filtering, after being filtered at least one data described based on described SNAPSHOT INFO
The identification information of at least one data;
Data transmission unit, for based on for the first webpage page data request information and filter after at least
The identification information of one data, gets the target data of target pages for described first webpage, with to institute from caching
State the target data of client feedback target pages.
The caching data processing method of present invention proposition and server, receive the page data request information of the first webpage
After, get at least one data that the first webpage is corresponding, and then according to snapshot data, at least one data is filtered,
Afterwards the data obtained after filtering are extracted, obtain the identification information of the target data for target pages, according to number of targets
According to identification information get the target data of target pages.So, it is maintained for the concordance of data, simultaneously by using snapshot
Form, decrease cache access number of times, improve interface concurrency performance.Further, since SNAPSHOT INFO comprises only data
Identification information and the state pause judgments time of data, so ensure this programme will not take too much spatial cache.
Accompanying drawing explanation
Fig. 1 is the network architecture schematic diagram of embodiment of the present invention application;
Fig. 2 is embodiment of the present invention caching data processing method schematic flow sheet one;
Fig. 3 is the corresponding relation between identification information and the SNAPSHOT INFO of embodiment of the present invention data;
Fig. 4 is the content comprised in embodiment of the present invention data snapshot;
Fig. 5 is the process schematic diagram that data are filtered by the embodiment of the present invention based on SNAPSHOT INFO;
Fig. 6 is the process schematic diagram that data cached and snapshot are refreshed by the embodiment of the present invention;
Fig. 7 is embodiment of the present invention caching data processing method schematic flow sheet two;
Fig. 8 is that embodiment of the present invention server forms structural representation.
The realization of the object of the invention, functional characteristics and advantage will in conjunction with the embodiments, are described further referring to the drawings.
Detailed description of the invention
Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
The embodiment of the present invention is applied to server side, as it is shown in figure 1, this server 11 side needs and at least one client
Interacting between 12, the concrete user end to server side that can include sends data request information, then server side
Feed back to client.
Wherein, described client can be that possessing of being arranged in mobile terminal or panel computer or desktop computer is logical
Cross the client of Network Capture data function.Such as, can be the client that can install and run web browser software.
Mobile terminal can be implemented in a variety of manners.Such as, the terminal described in the present invention can include such as moving
Phone, smart phone, notebook computer, digit broadcasting receiver, PDA (personal digital assistant), PAD (panel computer), PMP
The mobile terminal of (portable media player), guider etc. and consolidating of such as numeral TV, desk computer etc.
Determine terminal.Hereinafter it is assumed that terminal is mobile terminal.However, it will be understood by those skilled in the art that, mobile except being used in particular for
Outside the element of purpose, structure according to the embodiment of the present invention can also apply to the terminal of fixed type.
Based on above-mentioned mobile terminal hardware configuration and communication system, each embodiment of the inventive method is proposed.
Embodiment one,
Embodiments provide a kind of caching data processing method, be applied to server, as in figure 2 it is shown, include:
Step 201: receive the page data request information for the first webpage that client sends, based on described request letter
Breath gets the identification information of at least one data corresponding to described first webpage;
Step 202: identification informations based at least one data described get at least one data described from caching
At least one SNAPSHOT INFO;Wherein, described SNAPSHOT INFO at least includes the identification information of data, described data initial
Time and the time of termination;
Step 203: based on described SNAPSHOT INFO, at least one data described are filtered, at least after being filtered
The identification information of individual data;
Step 204: based on for the page data request information of the first webpage and at least one data after filtering
Identification information, gets the target data of target pages for described first webpage, with anti-to described client from caching
The target data of feedback target pages.
Here, described server can be the caching server that special preservation is data cached.
Described client can be to be arranged on possessing by net in mobile terminal or panel computer or desktop computer
Network obtains the client of data function.Such as, can be the client that can install and run web browser software.
The mode accessing the first webpage can be that the URL by webpage conducts interviews, such as, and http: //
www.123.com.Accordingly, for the page data request information of the first webpage, can be a certain in the first webpage
The solicited message of the individual page, such as, the first webpage can be made up of multiple pages, and each of which page all can correspondence one
Page data request information.
The identification information of at least one data corresponding to described first webpage, Ke Yiwei is got based on described solicited message
First the identification information that the whole data that get that described first webpage preserves in the buffer according to described solicited message are corresponding.
Described in the present embodiment, SNAPSHOT INFO at least includes the identification information of data, described data initial time with
And the termination time etc..It addition, compare as it is shown on figure 3, all corresponding snapshot of the identification information of each data is believed in the present embodiment
Breath
Further, the mode setting up SNAPSHOT INFO corresponding to described data can be, based on operation data, such as application
Recommendation list, effort scale, gift bag list, ranking list etc. extract its part relating to filtration condition, as seen Fig. 4,
Can include data ID, state, shelf life, undercarriage time etc. in data snapshot, these parts are as the snapshot of these data.
Snapshot portion is except the state mentioned here and upper undercarriage time, it is also possible to include whether more attribute, such as data are hidden, are
No examination & verification is medium.
Wherein, described data can also have influence on the filtration of data in whether hiding and whether audit, such as, works as snapshot
Information represents image watermarking, it may be determined that fallen by data filtering, be namely not added to data filter in data list;Or
Person, when representing in SNAPSHOT INFO that data are in examination & verification, it is also possible to determine and fallen by data filtering, does not the most add data to filter
In data list.
Further, the identification information of at least one data after being filtered, Ke Yiwei: set up and cross filter data row
Table, the identification information of the data not being deleted after filtering adds in data filtering list.
In the page data request information of described first webpage in addition to including the URL that the first webpage is corresponding, also may be used
To include the mark of target pages, such as, can be page 1 or the N page, wherein, N be the integer more than or equal to 1.
The present embodiment by using the correlation attribute information (as above undercarriage time, state etc.) of data as data snapshot,
When needing to obtain data, use snapshot that data are screened.Such as, seeing Fig. 5, the first webpage is to there being n data, then
The SNAPSHOT INFO of its correspondence is also n, is filtered n data by n SNAPSHOT INFO, and wherein n is whole more than or equal to 1
Number;Finally obtaining the identification information of m data after filtration, wherein, m is the integer more than or equal to 1 and less than or equal to n.
Such as, when stating scheme in actual use, by adding the SNAPSHOT INFO of each data in caching server,
Especially by arranging the shelf life for these data and undercarriage time in SNAPSHOT INFO so that user passes through buffer service
When device obtains these data, it is possible to ensure that client can possess the administrative mechanism of unified acquisition data, will not produce a certain
Individual webpage checks these data undercarriage, but checks these data problem also in added state in another webpage, protects
Demonstrate,proved the uniformity of the upper undercarriage time of data and avoided its hysteresis quality.Further, since can be by SNAPSHOT INFO to data
The upper undercarriage time be accurately controlled, it is possible to avoid in units of sky, data being carried out cleaning etc. and process, it is to avoid
Sacrifice the manageability of data.
Visible, by using this programme, after receiving the page data request information of the first webpage, get the first webpage pair
At least one data answered, and then according to snapshot data, at least one data is filtered, finally to the number obtained after filtering
According to extracting, obtain the identification information of the target data for target pages, get according to the identification information of target data
The target data of target pages.So, it is maintained for the concordance of data, simultaneously by using the form of snapshot, decreases caching
Access times, improve interface concurrency performance, it is ensured that show the accuracy of the data of client.Further, since snapshot letter
Breath comprises only the identification information of data and the state pause judgments time of data, so ensureing that this programme will not take too much
Spatial cache.
Embodiment two,
Embodiments provide a kind of caching data processing method, be applied to server, as in figure 2 it is shown, include:
Step 201: receive the page data request information for the first webpage that client sends, based on described request letter
Breath gets the identification information of at least one data corresponding to described first webpage;
Step 202: identification informations based at least one data described get at least one data described from caching
At least one SNAPSHOT INFO;Wherein, described SNAPSHOT INFO at least includes the identification information of data, described data initial
Time and the time of termination;
Step 203: based on described SNAPSHOT INFO, at least one data described are filtered, at least after being filtered
The identification information of individual data;
Step 204: based on for the page data request information of the first webpage and at least one data after filtering
Identification information, gets the target data of target pages for described first webpage, with anti-to described client from caching
The target data of feedback target pages.
Here, described server can be the caching server that special preservation is data cached.
Described client can be to be arranged on possessing by net in mobile terminal or panel computer or desktop computer
Network obtains the client of data function.Such as, can be the client that can install and run web browser software.
The mode accessing the first webpage can be that the URL by webpage conducts interviews, such as, and http: //
www.123.com.Accordingly, for the page data request information of the first webpage, can be a certain in the first webpage
The solicited message of the individual page, such as, the first webpage can be made up of multiple pages, and each of which page all can correspondence one
Page data request information.
The identification information of at least one data corresponding to described first webpage, Ke Yiwei is got based on described solicited message
First the identification information that the whole data that get that described first webpage preserves in the buffer according to described solicited message are corresponding.
Described in the present embodiment, SNAPSHOT INFO at least includes the identification information of data, described data initial time with
And the termination time etc..It addition, all corresponding SNAPSHOT INFO of the identification information of each data in the present embodiment.
Further, the mode setting up SNAPSHOT INFO corresponding to described data can be, based on operation data, such as application
Recommendation list, effort scale, gift bag list, ranking list etc. extract its part relating to filtration condition, such as state, added
Time, undercarriage time etc., these parts are as the snapshot of these data.When snapshot portion is except the state mentioned here and upper undercarriage
Between, it is also possible to include whether more attribute, such as data are hidden, it is medium whether to audit.
Wherein, described data can also have influence on the filtration of data in whether hiding and whether audit, such as, works as snapshot
Information represents image watermarking, it may be determined that fallen by data filtering, be namely not added to data filter in data list;Or
Person, when representing in SNAPSHOT INFO that data are in examination & verification, it is also possible to determine and fallen by data filtering, does not the most add data to filter
In data list.
Further, the identification information of at least one data after being filtered, Ke Yiwei: set up and cross filter data row
Table, the identification information of the data not being deleted after filtering adds in data filtering list.
In the page data request information of described first webpage in addition to including the URL that the first webpage is corresponding, also may be used
To include the mark of target pages, such as, can be page 1 or the N page, wherein, N be the integer more than or equal to 1.
The present embodiment by using the correlation attribute information (as above undercarriage time, state etc.) of data as data snapshot,
When needing to obtain data, use snapshot that data are screened.Such as, seeing Fig. 4, the first webpage is to there being n data, then
The SNAPSHOT INFO of its correspondence is also n, is filtered n data by n SNAPSHOT INFO, and wherein n is whole more than or equal to 1
Number;Finally obtaining the identification information of m data after filtration, wherein, m is the integer more than or equal to 1 and less than or equal to n.
Further, described identification information based at least one data described get from caching described at least one
At least one SNAPSHOT INFO that data are corresponding, including:
The most whether identification information judgment based on described data preserve the SNAPSHOT INFO that described data are corresponding;
If not preserving the SNAPSHOT INFO that described data are corresponding, then identification informations based on described data carry from data base
Take the SNAPSHOT INFO that described data are corresponding.
It addition, described method also includes: judge whether the data in caching refresh;If it is determined that refresh, then judge refreshing
Whether SNAPSHOT INFO corresponding to data changes, when the SNAPSHOT INFO that the described data determining refreshing are corresponding changes,
The SNAPSHOT INFO that the described data of refreshing are corresponding is obtained from data base.
When data are modified by operation personnel by backstage when, in order to ensure that the data of amendment can be at once slow
Depositing middle refreshing, the program needs to provide the interface of cache flush for backstage.During cache flush, it is necessary first to judge the fast of these data
Whether change according to part, if it occur that change, it is necessary to refresh the snapshot list corresponding to these data;The most again to this number
According to caching part refresh.
It is to say, when data do not have the SNAPSHOT INFO of correspondence in the buffer, need to check these data from data base
Corresponding SNAPSHOT INFO, it addition, be also required to when data occur and refreshing to check from data base that SNAPSHOT INFO corresponding to data is
No there is change, such as, sees Fig. 6, and then the caching that first refresh data is corresponding obtains the SNAPSHOT INFO of data from data base
Part, SNAPSHOT INFO parts based on the data got in data base and the SNAPSHOT INFO portion of the data of preservation in current cache
Divide and compare, it is judged that whether SNAPSHOT INFO changes, however, it is determined that change, then get SNAPSHOT INFO row from data base
Table also preserves;Finally according to the SNAPSHOT INFO list refreshed, the caching of data can be processed.
In addition, it is necessary to explanation, for more preferable adaptive original buffering scheme, the data snapshot list of corresponding data is straight
Connecing and leaving its caching Hash table id in is the position of 0, and management that so can be convenient and unified is same set of data cached.
Described based on described SNAPSHOT INFO, at least one data described are filtered, at least one number after being filtered
According to identification information, including:
Get current time value;
Target snapshot data are got successively from least one snapshot data;
Judge that current time value is whether early than initial time or whether evening of data described in described target snapshot information
The termination time in described data;
If current time value is early than the initial time of data described in described target snapshot information or is later than described data
The termination time, then the identification information of data corresponding for described target snapshot information is added to data filtering list;
Otherwise, it determines the identification information of data corresponding for target snapshot information is deleted or, this expression information is not entered
Row processes and is directly entered in the process to next target snapshot information.
Its corresponding, described based on for the first webpage page data request information and filter after at least one
The identification information of individual data, gets the target data of target pages for described first webpage from caching, including:
Based on the page data request information for the first webpage, determine the initial data identification information that target pages is corresponding
And termination data identification information;
The initial data identification information corresponding based on described target pages and termination data identification information, from data filtering
List is chosen the identification information obtaining target data corresponding to described target pages;
Identification information based on described target data gets target data from caching.
It is to say, see Fig. 7, when obtaining the paged data of certain page, first the snapshot of its all data is carried
Take out and put in caching, then according to this snapshot list, data are filtered, take out further according to paging condition after filtration and divide
The id list that page is corresponding, returns to client finally according to this id list disposable taking-up data list from caching.Here,
Paging condition refers to required parameter during client paging acquisition data, such as, obtain which page of data, and one page needs to obtain
Take how many data.
Assume that data snapshot has 100 data, after state, shelf life, undercarriage time etc. filter, be left 80
Data, and client needs to obtain the data of page 1, this page needs 20 data.So server at this time will by this 80
The id of front 20 data in data forms id list, further according to these 20 id, utilizes the list of caching to read technology, postpones
The content regions deposited disposably is taken out the data content list corresponding to 20 id and returns to client as result.
Under this scenario, client any time accesses the data accessed by server, can be ensured of and now allow
Show the data in client.So, just can fully ensure that the accuracy of operation data.
Visible, by using this programme, after receiving the page data request information of the first webpage, get the first webpage pair
At least one data answered, and then according to snapshot data, at least one data is filtered, finally to the number obtained after filtering
According to extracting, obtain the identification information of the target data for target pages, get according to the identification information of target data
The target data of target pages.So, it is maintained for the concordance of data, simultaneously by using the form of snapshot, decreases caching
Access times, improve interface concurrency performance.Further, since SNAPSHOT INFO comprises only identification information and the data of data
The state pause judgments time, so ensure this programme will not take too much spatial cache.
Space shared by data snapshot is the least, and this design will not increase the pressure of original buffering scheme.It addition, read
The snapshot list that fetches data has only to access and once caches, so the performance of system be there will not be any impact.In sum,
The data snapshot devising caching of program novelty, on the premise of not increasing caching pressure, is accounted for by less space
With, the systematic function that solves in data in undercarriage time machine system, the operation problem such as accuracy, data consistency, simultaneously with relatively
Little amendment cost is fused in original caching system, is greatly improved the competitiveness of similar server product.
Embodiment three,
Embodiments provide a kind of server, as shown in Figure 8, including:
Acquisition request unit 81, for receiving the page data request information for the first webpage that client sends, base
The identification information of at least one data corresponding to described first webpage is got in described solicited message;
Snapshot searches unit 82, for identification informations based at least one data described get from caching described to
At least one SNAPSHOT INFO of few data;Wherein, described SNAPSHOT INFO at least includes the identification information of data, described
The initial time of data and the time of termination;
Filter element 83, for filtering, after being filtered at least one data described based on described SNAPSHOT INFO
The identification information of at least one data;
Data transmission unit 84, for based on for the first webpage page data request information and filter after extremely
The identification information of few data, gets the target data of target pages for described first webpage from caching, with to
The target data of described client feedback target pages.
Here, described server can be the caching server that special preservation is data cached.
Described client can be to be arranged on possessing by net in mobile terminal or panel computer or desktop computer
Network obtains the client of data function.Such as, can be the client that can install and run web browser software.
The mode accessing the first webpage can be that the URL by webpage conducts interviews, such as, and http: //
www.123.com.Accordingly, for the page data request information of the first webpage, can be a certain in the first webpage
The solicited message of the individual page, such as, the first webpage can be made up of multiple pages, and each of which page all can correspondence one
Page data request information.
The identification information of at least one data corresponding to described first webpage, Ke Yiwei is got based on described solicited message
First the identification information that the whole data that get that described first webpage preserves in the buffer according to described solicited message are corresponding.
Described in the present embodiment, SNAPSHOT INFO at least includes the identification information of data, described data initial time with
And the termination time etc..It addition, compare as it is shown on figure 3, all corresponding snapshot of the identification information of each data is believed in the present embodiment
Breath
Further, the mode setting up SNAPSHOT INFO corresponding to described data can be, based on operation data, such as application
Recommendation list, effort scale, gift bag list, ranking list etc. extract its part relating to filtration condition, as seen Fig. 5,
Can include data ID, state, shelf life, undercarriage time etc. in data snapshot, these parts are as the snapshot of these data.
Snapshot portion is except the state mentioned here and upper undercarriage time, it is also possible to include whether more attribute, such as data are hidden, are
No examination & verification is medium.
Wherein, described data can also have influence on the filtration of data in whether hiding and whether audit, such as, works as snapshot
Information represents image watermarking, it may be determined that fallen by data filtering, be namely not added to data filter in data list;Or
Person, when representing in SNAPSHOT INFO that data are in examination & verification, it is also possible to determine and fallen by data filtering, does not the most add data to filter
In data list.
Further, the identification information of at least one data after being filtered, Ke Yiwei: set up and cross filter data row
Table, the identification information of the data not being deleted after filtering adds in data filtering list.
In the page data request information of described first webpage in addition to including the URL that the first webpage is corresponding, also may be used
To include the mark of target pages, such as, can be page 1 or the N page, wherein, N be the integer more than or equal to 1.
The present embodiment by using the correlation attribute information (as above undercarriage time, state etc.) of data as data snapshot,
When needing to obtain data, use snapshot that data are screened.Such as, seeing Fig. 5, the first webpage is to there being n data, then
The SNAPSHOT INFO of its correspondence is also n, is filtered n data by n SNAPSHOT INFO, and wherein n is whole more than or equal to 1
Number;Finally obtaining the identification information of m data after filtration, wherein, m is the integer more than or equal to 1 and less than or equal to n.
Visible, by using this programme, after receiving the page data request information of the first webpage, get the first webpage pair
At least one data answered, and then according to snapshot data, at least one data is filtered, finally to the number obtained after filtering
According to extracting, obtain the identification information of the target data for target pages, get according to the identification information of target data
The target data of target pages.So, it is maintained for the concordance of data, simultaneously by using the form of snapshot, decreases caching
Access times, improve interface concurrency performance, it is ensured that show the accuracy of the data of client.Further, since snapshot letter
Breath comprises only the identification information of data and the state pause judgments time of data, so ensureing that this programme will not take too much
Spatial cache.
Embodiment four,
Embodiments provide a kind of server, as shown in Figure 8, including:
Acquisition request unit 81, for receiving the page data request information for the first webpage that client sends, base
The identification information of at least one data corresponding to described first webpage is got in described solicited message;
Snapshot searches unit 82, for identification informations based at least one data described get from caching described to
At least one SNAPSHOT INFO of few data;Wherein, described SNAPSHOT INFO at least includes the identification information of data, described
The initial time of data and the time of termination;
Filter element 83, for filtering, after being filtered at least one data described based on described SNAPSHOT INFO
The identification information of at least one data;
Data transmission unit 84, for based on for the first webpage page data request information and filter after extremely
The identification information of few data, gets the target data of target pages for described first webpage from caching, with to
The target data of described client feedback target pages.
Here, described server can be the caching server that special preservation is data cached.
Described client can be to be arranged on possessing by net in mobile terminal or panel computer or desktop computer
Network obtains the client of data function.Such as, can be the client that can install and run web browser software.
The mode accessing the first webpage can be that the URL by webpage conducts interviews, such as, and http: //
www.123.com.Accordingly, for the page data request information of the first webpage, can be a certain in the first webpage
The solicited message of the individual page, such as, the first webpage can be made up of multiple pages, and each of which page all can correspondence one
Page data request information.
The identification information of at least one data corresponding to described first webpage, Ke Yiwei is got based on described solicited message
First the identification information that the whole data that get that described first webpage preserves in the buffer according to described solicited message are corresponding.
Described in the present embodiment, SNAPSHOT INFO at least includes the identification information of data, described data initial time with
And the termination time etc..It addition, all corresponding SNAPSHOT INFO of the identification information of each data in the present embodiment.
Further, the mode setting up SNAPSHOT INFO corresponding to described data can be, based on operation data, such as application
Recommendation list, effort scale, gift bag list, ranking list etc. extract its part relating to filtration condition, such as state, added
Time, undercarriage time etc., these parts are as the snapshot of these data.When snapshot portion is except the state mentioned here and upper undercarriage
Between, it is also possible to include whether more attribute, such as data are hidden, it is medium whether to audit.
Wherein, described data can also have influence on the filtration of data in whether hiding and whether audit, such as, works as snapshot
Information represents image watermarking, it may be determined that fallen by data filtering, be namely not added to data filter in data list;Or
Person, when representing in SNAPSHOT INFO that data are in examination & verification, it is also possible to determine and fallen by data filtering, does not the most add data to filter
In data list.
Further, described snapshot searches unit, is used for setting up one and filters data list, is not deleted after filtering
The identification information of data adds in data filtering list.
In the page data request information of described first webpage in addition to including the URL that the first webpage is corresponding, also may be used
To include the mark of target pages, such as, can be page 1 or the N page, wherein, N be the integer more than or equal to 1.
The present embodiment by using the correlation attribute information (as above undercarriage time, state etc.) of data as data snapshot,
When needing to obtain data, use snapshot that data are screened.Such as, seeing Fig. 4, the first webpage is to there being n data, then
The SNAPSHOT INFO of its correspondence is also n, is filtered n data by n SNAPSHOT INFO, and wherein n is whole more than or equal to 1
Number;Finally obtaining the identification information of m data after filtration, wherein, m is the integer more than or equal to 1 and less than or equal to n.
Further, described snapshot searches unit, the most whether is used for identification information judgment based on described data
Preserve the SNAPSHOT INFO that described data are corresponding;
If not preserving the SNAPSHOT INFO that described data are corresponding, then identification informations based on described data carry from data base
Take the SNAPSHOT INFO that described data are corresponding.
It addition, described snapshot searches unit, for judging whether the data in caching refresh;If it is determined that refresh, then judge
Whether the SNAPSHOT INFO that the data of refreshing are corresponding changes, and the SNAPSHOT INFO corresponding when the described data determining refreshing becomes
During change, from data base, obtain the SNAPSHOT INFO that the described data of refreshing are corresponding.
When data are modified by operation personnel by backstage when, in order to ensure that the data of amendment can be at once slow
Depositing middle refreshing, the program needs to provide the interface of cache flush for backstage.During cache flush, it is necessary first to judge the fast of these data
Whether change according to part, if it occur that change, it is necessary to refresh the snapshot list corresponding to these data;The most again to this number
According to caching part refresh.
It is to say, when data do not have the SNAPSHOT INFO of correspondence in the buffer, need to check these data from data base
Corresponding SNAPSHOT INFO, it addition, be also required to when data occur and refreshing to check from data base that SNAPSHOT INFO corresponding to data is
No there is change, such as, sees Fig. 6, and then the caching that first refresh data is corresponding obtains the SNAPSHOT INFO of data from data base
Part, SNAPSHOT INFO parts based on the data got in data base and the SNAPSHOT INFO portion of the data of preservation in current cache
Divide and compare, it is judged that whether SNAPSHOT INFO changes, however, it is determined that change, then get SNAPSHOT INFO row from data base
Table also preserves;Finally according to the SNAPSHOT INFO list refreshed, the caching of data can be processed.
In addition, it is necessary to explanation, for more preferable adaptive original buffering scheme, the data snapshot list of corresponding data is straight
Connecing and leaving its caching Hash table id in is the position of 0, and management that so can be convenient and unified is same set of data cached.
Described filter element, is used for getting current time value;Target is got successively from least one snapshot data
Snapshot data;Judge that current time value is whether early than the initial time or whether of data described in described target snapshot information
It is later than the termination time of described data;If current time value early than data described in described target snapshot information initial time,
Or it is later than the termination time of described data, then the identification information of data corresponding for described target snapshot information is added to data
In filter list;Otherwise, it determines the identification information of data corresponding for target snapshot information is deleted or, not to this expression information
Carry out processing and be directly entered in the process to next target snapshot information.
Its corresponding, described filter element, for based on the page data request information for the first webpage, determine mesh
Mark initial data identification information corresponding to the page and terminate data identification information;Based on the initial number that described target pages is corresponding
According to identification information and termination data identification information, choose from data filtering list and obtain the target that described target pages is corresponding
The identification information of data;Identification information based on described target data gets target data from caching.
It is to say, see Fig. 7, when obtaining the paged data of certain page, first the snapshot of its all data is carried
Take out and put in caching, then according to this snapshot list, data are filtered, take out further according to paging condition after filtration and divide
The id list that page is corresponding, returns to client finally according to this id list disposable taking-up data list from caching.Here,
Paging condition refers to required parameter during client paging acquisition data, such as, obtain which page of data, and one page needs to obtain
Take how many data.
Assume that data snapshot has 100 data, after state, shelf life, undercarriage time etc. filter, be left 80
Data, and client needs to obtain the data of page 1, this page needs 20 data.So server at this time will by this 80
The id of front 20 data in data forms id list, further according to these 20 id, utilizes the list of caching to read technology, postpones
The content regions deposited disposably is taken out the data content list corresponding to 20 id and returns to client as result.
Under this scenario, client any time accesses the data accessed by server, can be ensured of and now allow
Show the data in client.So, just can fully ensure that the accuracy of operation data.
Visible, by using this programme, after receiving the page data request information of the first webpage, get the first webpage pair
At least one data answered, and then according to snapshot data, at least one data is filtered, finally to the number obtained after filtering
According to extracting, obtain the identification information of the target data for target pages, get according to the identification information of target data
The target data of target pages.So, it is maintained for the concordance of data, simultaneously by using the form of snapshot, decreases caching
Access times, improve interface concurrency performance.Further, since SNAPSHOT INFO comprises only identification information and the data of data
The state pause judgments time, so ensure this programme will not take too much spatial cache.
Space shared by data snapshot is the least, and this design will not increase the pressure of original buffering scheme.It addition, read
The snapshot list that fetches data has only to access and once caches, so the performance of system be there will not be any impact.In sum,
The data snapshot devising caching of program novelty, on the premise of not increasing caching pressure, is accounted for by less space
With, the systematic function that solves in data in undercarriage time machine system, the operation problem such as accuracy, data consistency, simultaneously with relatively
Little amendment cost is fused in original caching system, is greatly improved the competitiveness of similar server product.
It should be noted that in this article, term " includes ", " comprising " or its any other variant are intended to non-row
Comprising of his property, so that include that the process of a series of key element, method, article or device not only include those key elements, and
And also include other key elements being not expressly set out, or also include intrinsic for this process, method, article or device
Key element.In the case of there is no more restriction, statement " including ... " key element limited, it is not excluded that including this
The process of key element, method, article or device there is also other identical element.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art is it can be understood that arrive above-described embodiment side
Method can add the mode of required general hardware platform by software and realize, naturally it is also possible to by hardware, but a lot of in the case of
The former is more preferably embodiment.Based on such understanding, prior art is done by technical scheme the most in other words
The part going out contribution can embody with the form of software product, and this computer software product is stored in a storage medium
In (such as ROM/RAM, magnetic disc, CD), including some instructions with so that a station terminal equipment (can be mobile phone, computer, take
Business device, air-conditioner, or the network equipment etc.) perform the method described in each embodiment of the present invention.
These are only the preferred embodiments of the present invention, not thereby limit the scope of the claims of the present invention, every utilize this
Equivalent structure or equivalence flow process that bright description and accompanying drawing content are made convert, or are directly or indirectly used in other relevant skills
Art field, is the most in like manner included in the scope of patent protection of the present invention.
Claims (10)
1. a caching data processing method, is applied to server, it is characterised in that described method includes:
Receive the page data request information for the first webpage that client sends, get based on described solicited message described
The identification information of at least one data that the first webpage is corresponding;
It is fast that identification informations based at least one data described get at least one of at least one data described from caching
According to information;Wherein, described SNAPSHOT INFO at least includes the identification information of data, the initial time of described data and termination
Time;
Based on described SNAPSHOT INFO, at least one data described are filtered, the mark of at least one data after being filtered
Information;
Based on for the page data request information of the first webpage and the identification information of at least one data after filtering, from
Caching gets the target data of target pages for described first webpage, with to described client feedback target pages
Target data.
Method the most according to claim 1, it is characterised in that described identification informations based at least one data described from
Caching gets at least one SNAPSHOT INFO that at least one data described are corresponding, including:
It is corresponding the most whether identification information judgment based at least one data described preserve at least one data described
SNAPSHOT INFO;
If not preserving the SNAPSHOT INFO that at least one data described are corresponding, then identification informations based at least one data described
The SNAPSHOT INFO that at least one data described are corresponding is extracted from data base.
Method the most according to claim 1, it is characterised in that described method also includes:
Judge whether the data in caching refresh;
If it is determined that refresh, then judge whether SNAPSHOT INFO corresponding to data refreshed changes, when the described number determining refreshing
When changing according to corresponding SNAPSHOT INFO, from data base, obtain the SNAPSHOT INFO that the described data of refreshing are corresponding.
Method the most according to claim 1, it is characterised in that described based on described SNAPSHOT INFO to described at least one number
According to filtering, the identification information of at least one data after being filtered, including:
Get current time value;
Target snapshot data are got successively from least one snapshot data;
Judge that current time value is whether early than the initial time of data described in described target snapshot information or whether be later than institute
State the termination time of data;
If current time value is early than the initial time of data described in described target snapshot information or is later than end of described data
The only time, then the identification information of data corresponding for described target snapshot information is added to data filtering list.
Method the most according to claim 4, it is characterised in that described based on the page data request letter for the first webpage
The identification information of at least one data after breath and filtration, gets the page object for described first webpage from caching
The target data in face, including:
Based on the page data request information for the first webpage, determine initial data identification information that target pages is corresponding and
Terminate data identification information;
The initial data identification information corresponding based on described target pages and termination data identification information, from data filtering list
In choose the identification information obtaining target data corresponding to described target pages;
Identification information based on described target data gets target data from caching.
6. a server, it is characterised in that including:
Acquisition request unit, for receiving the page data request information for the first webpage that client sends, based on described
Solicited message gets the identification information of at least one data corresponding to described first webpage;
Snapshot searches unit, for identification informations based at least one data described get from caching described at least one
At least one SNAPSHOT INFO of data;Wherein, described SNAPSHOT INFO at least includes the identification information of data, described data
Initial time and the time of termination;
Filter element, for filtering, after being filtered at least at least one data described based on described SNAPSHOT INFO
The identification information of one data;
Data transmission unit, for based on for the first webpage page data request information and filter after at least one
The identification information of data, gets the target data of target pages for described first webpage, with to described visitor from caching
The target data of the family end feedback target page.
Server the most according to claim 6, it is characterised in that
The most described snapshot searches unit, preserve for identification information judgment based at least one data described
The SNAPSHOT INFO that at least one data described are corresponding;If not preserving the SNAPSHOT INFO that at least one data described are corresponding, then base
Identification information at least one data described extracts the SNAPSHOT INFO that at least one data described are corresponding from data base.
Server the most according to claim 6, it is characterised in that described snapshot searches unit, for judging in caching
Whether data refresh;If it is determined that refresh, then judge whether SNAPSHOT INFO corresponding to data refreshed changes, when determining refreshing
SNAPSHOT INFO corresponding to described data when changing, from data base, obtain the snapshot letter that the described data of refreshing are corresponding
Breath.
Server the most according to claim 6, it is characterised in that described filter element, is used for getting current time value;
Target snapshot data are got successively from least one snapshot data;Judge that whether current time value is early than described target snapshot
The initial time of data described in information or whether be later than termination time of described data;If current time value is early than described
The initial time of data described in target snapshot information or be later than termination time of described data, then by described target snapshot
The identification information of the data that information is corresponding adds to data filtering list.
Server the most according to claim 9, it is characterised in that described filter element, for based on for the first webpage
Page data request information, determine initial data identification information that target pages is corresponding and terminate data identification information;Base
In initial data identification information corresponding to described target pages and terminate data identification information, choose from data filtering list
Obtain the identification information of target data corresponding to described target pages;Identification information based on described target data obtains from caching
Get target data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610370249.0A CN106055637B (en) | 2016-05-30 | 2016-05-30 | A kind of caching data processing method and server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610370249.0A CN106055637B (en) | 2016-05-30 | 2016-05-30 | A kind of caching data processing method and server |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106055637A true CN106055637A (en) | 2016-10-26 |
CN106055637B CN106055637B (en) | 2019-08-30 |
Family
ID=57172874
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610370249.0A Active CN106055637B (en) | 2016-05-30 | 2016-05-30 | A kind of caching data processing method and server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106055637B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108153783A (en) * | 2016-12-06 | 2018-06-12 | 腾讯科技(北京)有限公司 | A kind of method and apparatus of data buffer storage |
CN112910973A (en) * | 2021-01-21 | 2021-06-04 | 云账户技术(天津)有限公司 | Application page selection method and device |
CN113761423A (en) * | 2021-03-29 | 2021-12-07 | 北京沃东天骏信息技术有限公司 | Data processing method and device, equipment and storage medium |
CN113806655A (en) * | 2021-09-26 | 2021-12-17 | 北京沃东天骏信息技术有限公司 | Data processing method and device, electronic equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102486786A (en) * | 2010-12-02 | 2012-06-06 | 腾讯科技(深圳)有限公司 | Method for delivering information to mobile terminal and information delivering device |
CN104346397A (en) * | 2013-08-06 | 2015-02-11 | 中国银联股份有限公司 | Switchover method and system based on asynchronous request page |
US9037577B1 (en) * | 2012-06-19 | 2015-05-19 | Microstrategy Incorporated | Filtering posts |
-
2016
- 2016-05-30 CN CN201610370249.0A patent/CN106055637B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102486786A (en) * | 2010-12-02 | 2012-06-06 | 腾讯科技(深圳)有限公司 | Method for delivering information to mobile terminal and information delivering device |
US9037577B1 (en) * | 2012-06-19 | 2015-05-19 | Microstrategy Incorporated | Filtering posts |
CN104346397A (en) * | 2013-08-06 | 2015-02-11 | 中国银联股份有限公司 | Switchover method and system based on asynchronous request page |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108153783A (en) * | 2016-12-06 | 2018-06-12 | 腾讯科技(北京)有限公司 | A kind of method and apparatus of data buffer storage |
CN108153783B (en) * | 2016-12-06 | 2020-10-02 | 腾讯科技(北京)有限公司 | Data caching method and device |
CN112910973A (en) * | 2021-01-21 | 2021-06-04 | 云账户技术(天津)有限公司 | Application page selection method and device |
CN113761423A (en) * | 2021-03-29 | 2021-12-07 | 北京沃东天骏信息技术有限公司 | Data processing method and device, equipment and storage medium |
CN113806655A (en) * | 2021-09-26 | 2021-12-17 | 北京沃东天骏信息技术有限公司 | Data processing method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN106055637B (en) | 2019-08-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107220094B (en) | Page loading method and device and electronic equipment | |
CN106055637A (en) | Buffer memory data processing method and server | |
US9094478B2 (en) | Prereading method and system for web browser | |
CN106250464B (en) | Training method and device of ranking model | |
CN102985921B (en) | There is the client terminal device high speed caching electronic document resources of e-sourcing data base | |
CN106339469A (en) | Method and device for recommending data | |
CN103338260B (en) | The distributed analysis system of URL daily record and analytical method in network audit | |
JP7084691B2 (en) | How to process and present real-time social data on a map | |
CN105930363A (en) | HTML5 webpage based user behavior analysis method and device | |
CN109829077B (en) | Page display method, device and equipment | |
CN106980696B (en) | Photo file classification method and device | |
CN103635905A (en) | Device for providing information, method for providing information, program for providing information, and computer-readable recording medium storing program for same | |
CN106874273A (en) | Channel information statistical method, device and system | |
CN105094572B (en) | Menu self-adjusting roll screen display control method, server and portable terminal | |
CN109241437A (en) | A kind of generation method, advertisement recognition method and the system of advertisement identification model | |
CN106845267A (en) | The processing method and mobile terminal of applicating history information | |
CN112561565A (en) | User demand identification method based on behavior log | |
CN102354385A (en) | Mobile terminal, server and security information pushing method | |
CN105653724A (en) | Page exposure monitoring method and device | |
CN108200127A (en) | Data transmission method for uplink, device, server, terminal and storage medium | |
CN107436940A (en) | The method of web front-end Dynamic Display data based on user profile behavioural analysis | |
DE202021102320U1 (en) | System for implementing sub-database replication | |
CN106372158A (en) | Method and device for processing user behavior data | |
CN110020297A (en) | A kind of loading method of web page contents, apparatus and system | |
CN105472029B (en) | A kind of method and system of the single-sign-on based on caching |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |