CN106055637B - A kind of caching data processing method and server - Google Patents
A kind of caching data processing method and server Download PDFInfo
- Publication number
- CN106055637B CN106055637B CN201610370249.0A CN201610370249A CN106055637B CN 106055637 B CN106055637 B CN 106055637B CN 201610370249 A CN201610370249 A CN 201610370249A CN 106055637 B CN106055637 B CN 106055637B
- Authority
- CN
- China
- Prior art keywords
- data
- identification information
- snapshot
- 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.)
- Active
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 kind of caching data processing method and servers, the described method includes: receiving the page data request information for the first webpage that client is sent, the identification information of at least one corresponding data of first webpage is got based on the solicited message;Identification information based at least one data gets at least one SNAPSHOT INFO of at least one data from caching;At least one described data are filtered based on the SNAPSHOT INFO, obtain the identification information of at least one filtered data;Based on the identification information of page data request information and at least one filtered data for the first webpage, the target data of the target pages for first webpage is got from caching, with to the target data of the client feedback target pages.
Description
Technical field
The present invention relates to the communications field more particularly to a kind of caching data processing methods and server.
Background technique
With the development of internet with there is a kind of general need in the raising server product of living standards of the people, i.e.,
The shelf life and undercarriage time mechanism of data.For example, sometime restocking in certain day can be set in some commodity in store, certain
It sometime undercarriage;Sometime restocking in certain day can be set using some application in center, certain day sometime
Undercarriage.Upper undercarriage mechanism is usually that the validity period of the data, such as half an hour is arranged in the technology that buffering scheme uses, also
It is to say, restocking and the undercarriage of data can generally have the hysteresis quality of half an hour;And another common scheme is by upper undercarriage
Time is set as unit of day, can carry out in the timed task in daily morning to the data for reaching the undercarriage time so clear
Reason, it is done so that generally requiring to sacrifice the more manageabilities of data.
Summary of the invention
It is a primary object of the present invention to propose a kind of caching data processing method and server, it is intended to solve the prior art
Present in the above problem.
To achieve the above object, a kind of caching data processing method provided by the invention is applied to server, the method
Include:
The page data request information for the first webpage that client is sent is received, is got based on the solicited message
The identification information of at least one corresponding data of first webpage;
Identification information based at least one data gets at least the one of at least one data from caching
A SNAPSHOT INFO;Wherein, in the SNAPSHOT INFO include at least have the identification information of data, the initial time of the data and
Terminate the time;
At least one described data are filtered based on the SNAPSHOT INFO, obtain at least one filtered data
Identification information;
Mark letter based on the page data request information and at least one filtered data for the first webpage
Breath, gets the target data of the target pages for first webpage from caching, with to the client feedback target
The target data of the page.
A kind of server provided by the invention, comprising:
Request unit is based on for receiving the page data request information for the first webpage of client transmission
The solicited message gets the identification information of at least one corresponding data of first webpage;
Snapshot searching unit, for the identification information based at least one data got from caching it is described at least
At least one SNAPSHOT INFO of one data;Wherein, identification information, the number for there are data are included at least in the SNAPSHOT INFO
According to initial time and terminate the time;
Filter element is obtained filtered for being filtered based on the SNAPSHOT INFO at least one described data
The identification information of at least one data;
Data transmission unit, for based on for the first webpage page data request information and it is filtered at least
The identification information of one data gets the target data of the target pages for first webpage from caching, with to institute
State the target data of client feedback target pages.
Caching data processing method and server proposed by the present invention receive the page data request information of the first webpage
Afterwards, at least one corresponding data of the first webpage are got, and then at least one data is filtered according to snapshot data, most
The data obtained after filtering are extracted afterwards, the identification information of target data for the target page are obtained, according to number of targets
According to identification information get the target datas of target pages.In this way, being maintained for the consistency of data, while by using snapshot
Form, reduce cache access number, improve interface concurrency performance.In addition, due to comprising only data in SNAPSHOT INFO
Identification information and data the state pause judgments time, so guarantee this programme will not occupy excessive spatial cache.
Detailed description of the invention
Fig. 1 is the network architecture schematic diagram of application of the embodiment of the present invention;
Fig. 2 is caching data processing method of embodiment of the present invention flow diagram one;
Fig. 3 is the corresponding relationship between the identification information and SNAPSHOT INFO of data of the embodiment of the present invention;
Fig. 4 is the content for including in data snapshot of the embodiment of the present invention;
Fig. 5 is the processing schematic that the embodiment of the present invention is filtered data based on SNAPSHOT INFO;
Fig. 6 is the processing schematic that the embodiment of the present invention refreshes data cached and its snapshot;
Fig. 7 is caching data processing method of embodiment of the present invention flow diagram two;
Fig. 8 is server of embodiment of the present invention composed structure schematic diagram.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The embodiment of the present invention is applied to server side, as shown in Figure 1,11 side of server needs and at least one client
It is interacted between 12, specifically may include thering is user end to server side to issue data request information, then server side
It is fed back to client.
Wherein, the client can be mounted in mobile terminal or tablet computer or desktop computer have it is logical
Cross the client that network obtains data function.For example, can be the client that can install and run web browser software.
Mobile terminal can be implemented in a variety of manners.For example, terminal described in the present invention may include such as moving
Phone, smart phone, laptop, digit broadcasting receiver, PDA (personal digital assistant), PAD (tablet computer), PMP
The mobile terminal of (portable media player), navigation device etc. and such as number TV, desktop computer etc. are consolidated
Determine terminal.Hereinafter it is assumed that terminal is mobile terminal.However, it will be understood by those skilled in the art that in addition to being used in particular for moving
Except the element of purpose, the construction of embodiment according to 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 method for the present invention is proposed.
Embodiment one,
The embodiment of the invention provides a kind of caching data processing methods, are applied to server, as shown in Figure 2, comprising:
Step 201: receiving the page data request information for the first webpage that client is sent, believed based on the request
Breath gets the identification information of at least one corresponding data of first webpage;
Step 202: the identification information based at least one data gets at least one described data from caching
At least one SNAPSHOT INFO;Wherein, the starting for having the identification information, the data of data is included at least in the SNAPSHOT INFO
Time and termination time;
Step 203: at least one described data being filtered based on the SNAPSHOT INFO, obtain filtered at least one
The identification information of a data;
Step 204: based on the page data request information and at least one filtered data for being directed to the first webpage
Identification information gets the target data of the target pages for first webpage from caching, with anti-to the client
Present the target data of target pages.
Here, the server can be specially to save data cached cache server.
The client can be to be mounted on having in mobile terminal or tablet computer or desktop computer to pass through net
The client of network acquisition data function.For example, can be the client that can install and run web browser software.
The mode for accessing the first webpage can be to be accessed, for example, http by the URL of webpage: //
www.123.com.Correspondingly, it is directed to the page data request information of the first webpage, it can be for for a certain in the first webpage
The solicited message of a page, for example, the first webpage can be made of multiple pages, wherein each page can correspond to one
Page data request information.
The identification information of at least one corresponding data of first webpage, Ke Yiwei are got based on the solicited message
Whole corresponding identification informations of data that first webpage saves in the buffer are got first according to the solicited message.
Included at least in SNAPSHOT INFO described in the present embodiment have the identification informations of data, the data initial time with
And terminate the time etc..In addition, than as shown in figure 3, the identification information of each data corresponds to a snapshot letter in the present embodiment
Breath
Further, the mode for establishing the corresponding SNAPSHOT INFO of the data can be to be based on operation data, such as application
It, which is extracted, in recommendation list, effort scale, gift bag list, ranking list etc. is related to the part of filtration condition, such as referring to fig. 4,
It may include having data ID, state, shelf life, undercarriage time etc. in data snapshot, snapshot of these parts as the data.
Snapshot portion can also include more attributes in addition to the state mentioned here and upper undercarriage time, such as whether data are hidden, are
No audit is medium.
Wherein, whether the data are hidden and can also influence the filtering of data in whether auditing, for example, working as snapshot
Image watermarking is indicated in information, can determine to fall data filtering, that is, data are not added in filtering data list;Or
Person can also determine to fall data filtering, i.e., not add data to filtering when indicating that data are in audit in SNAPSHOT INFO
In data list.
Further, the identification information of at least one filtered data is obtained, it can be with are as follows: establish one and cross filter data column
Table, by the identification information of deleted data is not added in data filtering list after filtering.
In the page data request information of first webpage other than including the corresponding URL of the first webpage, may be used also
To include the mark of target pages, for example, can be first page or the N pages, wherein N is the integer more than or equal to 1.
The present embodiment by regarding the correlation attribute information of data (as above undercarriage time, state etc.) as data snapshot,
When needing to obtain data, data are screened using snapshot.For example, the first webpage is corresponding with n data referring to Fig. 5, then
Its corresponding SNAPSHOT INFO is also n, is filtered by n SNAPSHOT INFO to n data, and wherein n is whole more than or equal to 1
Number;Finally obtain the identification information of the m data after filtering, wherein m is the integer more than or equal to 1 and less than or equal to n.
For example, when stating scheme in actual use, by adding the SNAPSHOT INFO of each data in cache server,
Especially by shelf life and undercarriage time of the setting for the data in SNAPSHOT INFO, so that user passes through buffer service
When device obtains the data, it can guarantee that client can have the administrative mechanism of unified acquisition data, will not generate a certain
A webpage checks the data undercarriage, but the problem of data are also in restocking state is checked in another webpage, protects
It had demonstrate,proved the uniformity of the upper undercarriage time of data and had avoided its hysteresis quality.In addition, due to can be by SNAPSHOT INFO to data
The upper undercarriage time be accurately controlled, it is possible to avoid that data are carried out as unit of day the processing such as to clear up, avoid
Sacrifice the manageability of data.
As it can be seen that after the page data request information for receiving the first webpage, getting the first webpage pair by using this programme
At least one data answered, and then at least one data is filtered according to snapshot data, finally to the number obtained after filtering
According to extracting, the identification information of target data for the target page is obtained, is got according to the identification information of target data
The target data of target pages.In this way, being maintained for the consistency of data, while by using the form of snapshot, reducing caching
Access times improve interface concurrency performance, ensure that the accuracy for showing the data of client.In addition, since snapshot is believed
The identification information of data and the state pause judgments time of data are comprised only in breath, so it is excessive to guarantee that this programme will not occupy
Spatial cache.
Embodiment two,
The embodiment of the invention provides a kind of caching data processing methods, are applied to server, as shown in Figure 2, comprising:
Step 201: receiving the page data request information for the first webpage that client is sent, believed based on the request
Breath gets the identification information of at least one corresponding data of first webpage;
Step 202: the identification information based at least one data gets at least one described data from caching
At least one SNAPSHOT INFO;Wherein, the starting for having the identification information, the data of data is included at least in the SNAPSHOT INFO
Time and termination time;
Step 203: at least one described data being filtered based on the SNAPSHOT INFO, obtain filtered at least one
The identification information of a data;
Step 204: based on the page data request information and at least one filtered data for being directed to the first webpage
Identification information gets the target data of the target pages for first webpage from caching, with anti-to the client
Present the target data of target pages.
Here, the server can be specially to save data cached cache server.
The client can be to be mounted on having in mobile terminal or tablet computer or desktop computer to pass through net
The client of network acquisition data function.For example, can be the client that can install and run web browser software.
The mode for accessing the first webpage can be to be accessed, for example, http by the URL of webpage: //
www.123.com.Correspondingly, it is directed to the page data request information of the first webpage, it can be for for a certain in the first webpage
The solicited message of a page, for example, the first webpage can be made of multiple pages, wherein each page can correspond to one
Page data request information.
The identification information of at least one corresponding data of first webpage, Ke Yiwei are got based on the solicited message
Whole corresponding identification informations of data that first webpage saves in the buffer are got first according to the solicited message.
Included at least in SNAPSHOT INFO described in the present embodiment have the identification informations of data, the data initial time with
And terminate the time etc..In addition, the identification information of each data corresponds to a SNAPSHOT INFO in the present embodiment.
Further, the mode for establishing the corresponding SNAPSHOT INFO of the data can be to be based on operation data, such as application
It is extracted in recommendation list, effort scale, gift bag list, ranking list etc. and is related to the part of filtration condition, such as state, restocking
Time, undercarriage time etc., snapshot of these parts as the data.When snapshot portion is in addition to the state mentioned here and upper undercarriage
Between, can also include more attributes, such as data whether hide, whether audit it is medium.
Wherein, whether the data are hidden and can also influence the filtering of data in whether auditing, for example, working as snapshot
Image watermarking is indicated in information, can determine to fall data filtering, that is, data are not added in filtering data list;Or
Person can also determine to fall data filtering, i.e., not add data to filtering when indicating that data are in audit in SNAPSHOT INFO
In data list.
Further, the identification information of at least one filtered data is obtained, it can be with are as follows: establish one and cross filter data column
Table, by the identification information of deleted data is not added in data filtering list after filtering.
In the page data request information of first webpage other than including the corresponding URL of the first webpage, may be used also
To include the mark of target pages, for example, can be first page or the N pages, wherein N is the integer more than or equal to 1.
The present embodiment by regarding the correlation attribute information of data (as above undercarriage time, state etc.) as data snapshot,
When needing to obtain data, data are screened using snapshot.For example, the first webpage is corresponding with n data referring to Fig. 5, then
Its corresponding SNAPSHOT INFO is also n, is filtered by n SNAPSHOT INFO to n data, and wherein n is whole more than or equal to 1
Number;Finally obtain the identification information of the m data after filtering, wherein m is the integer more than or equal to 1 and less than or equal to n.
Further, the identification information based at least one data got from caching it is described at least one
At least one corresponding SNAPSHOT INFO of data, comprising:
Whether identification information judgment based on the data preserves the corresponding SNAPSHOT INFO of the data in the buffer;
If not preserving the corresponding SNAPSHOT INFO of the data, identification information based on the data is mentioned from database
Take the corresponding SNAPSHOT INFO of the data.
In addition, the method also includes: judge whether the data in caching refresh;If it is determined that refreshing, then refreshing is judged
Whether the corresponding SNAPSHOT INFO of data changes, when determining that the corresponding SNAPSHOT INFO of the data refreshed changes,
The corresponding SNAPSHOT INFO of the data of refreshing is obtained from database.
When operation personnel modifies to data by backstage, in order to guarantee that the data of modification can be at once slow
Middle refreshing is deposited, the program needs to provide the interface of cache flush for backstage.When cache flush, it is necessary first to judge the fast of the data
According to partially whether changing, if there is a change, it is necessary to refresh snapshot list corresponding to the data;Then again to the number
According to caching part refreshed.
That is, when data in the buffer without corresponding SNAPSHOT INFO when, need to check the data from database
Corresponding SNAPSHOT INFO, in addition, being also required to check that the corresponding SNAPSHOT INFO of data is from database when data refresh
No to change, for example, referring to Fig. 6, then the corresponding caching of refresh data first obtains the SNAPSHOT INFO of data from database
The SNAPSHOT INFO portion of the data saved in part, SNAPSHOT INFO part based on the data got in database and current cache
Divide and be compared, judge whether SNAPSHOT INFO changes, however, it is determined that changes, then get SNAPSHOT INFO column from database
Table simultaneously saves;The caching of data can finally be handled according to the SNAPSHOT INFO list of refreshing.
In addition, it is necessary to explanation, in order to preferably be adapted to original buffering scheme, the data snapshot list of corresponding data is straight
The position for being stored in that its caching Hash table ID is 0 is connect, management that in this way can be more convenient and unified is same set of data cached.
It is described that at least one described data are filtered based on the SNAPSHOT INFO, obtain at least one filtered number
According to identification information, comprising:
Get current time value;
Target snapshot data are successively got from least one snapshot data;
Judge current time value whether earlier than data described in the target snapshot information initial time or whether evening
In the termination time of the data;
If current time value earlier than data described in the target snapshot information initial time or be later than the data
The termination time, then the identification information of the corresponding data of the target snapshot information is added in data filtering list;
Otherwise, it determines the identification informations of the corresponding data of target snapshot information is deleted alternatively, not to the expression information into
Row processing is directly entered in the processing to next target snapshot information.
It is its corresponding, it is described based on the page data request information and filtered at least one for being directed to the first webpage
The identification information of a data gets the target data of the target pages for first webpage from caching, comprising:
Based on the page data request information for being directed to the first webpage, the corresponding initial data identification information of target pages is determined
And terminate data identification information;
Based on the corresponding initial data identification information of the target pages and data identification information is terminated, from data filtering
It is chosen in list and obtains the identification information of the corresponding target data of the target pages;
Identification information based on the target data gets target data from caching.
That is, when obtaining the paged data of some page, the snapshot of its all data is mentioned first referring to Fig. 7
It takes out and is put into caching, then according to the snapshot list, data are filtered, take out and divide further according to paging condition after filtering
The corresponding id list of page, finally disposably takes out data list according to the id list from caching and returns to client.Herein,
Paging condition refers to required parameter when client paging obtains data, such as obtains which page of data, and one page needs obtain
How many data taken.
Assuming that there are 100 datas in data snapshot, it is left 80 after the filtering such as state, shelf life, undercarriage time
Data, and client needs to obtain the data of first page, which needs 20 datas.So server at this time will by this 80
The id of preceding 20 data in data forms id list, further according to this 20 id, reads technology using the list of caching, postpones
Data content list corresponding to 20 id is disposably taken out in the content regions deposited returns to client as a result.
Under this scenario, data accessed by client any time access server, can be ensured of allows at this time
It is shown in the data of client.In this way, just can fully ensure that the accuracy of operation data.
As it can be seen that after the page data request information for receiving the first webpage, getting the first webpage pair by using this programme
At least one data answered, and then at least one data is filtered according to snapshot data, finally to the number obtained after filtering
According to extracting, the identification information of target data for the target page is obtained, is got according to the identification information of target data
The target data of target pages.In this way, being maintained for the consistency of data, while by using the form of snapshot, reducing caching
Access times improve interface concurrency performance.In addition, identification information and data due to comprising only data in SNAPSHOT INFO
The state pause judgments time, so guarantee this programme will not occupy excessive spatial cache.
The space very little as shared by data snapshot, it is this to design the pressure that not will increase original buffering scheme.In addition, reading
Access only needs to access primary caching according to snapshot list, so there will not be any influence to the performance of system.In conclusion
The data snapshot for devising caching of program novelty is accounted under the premise of not increasing caching pressure by lesser space
With, solve the problems such as system performance in data in undercarriage time machine system, operation accuracy, data consistency, while with compared with
Small modification cost is fused in original caching system, is greatly improved the competitiveness of similar server product.
Embodiment three,
The embodiment of the invention provides a kind of servers, as shown in Figure 8, comprising:
Request unit 81, for receiving the page data request information for the first webpage of client transmission, base
The identification information of at least one corresponding data of first webpage is got in the solicited message;
Snapshot searching unit 82, for the identification information based at least one data got from caching it is described to
At least one SNAPSHOT INFO of few data;Wherein, the identification information, described for there are data is included at least in the SNAPSHOT INFO
The initial time of data and termination time;
Filter element 83, for being filtered based on the SNAPSHOT INFO at least one described data, after obtaining filtering
At least one data identification information;
Data transmission unit 84, for based on for the first webpage page data request information and it is filtered extremely
The identification information of few data, gets the target data of the target pages for first webpage from caching, with to
The target data of the client feedback target pages.
Here, the server can be specially to save data cached cache server.
The client can be to be mounted on having in mobile terminal or tablet computer or desktop computer to pass through net
The client of network acquisition data function.For example, can be the client that can install and run web browser software.
The mode for accessing the first webpage can be to be accessed, for example, http by the URL of webpage: //
www.123.com.Correspondingly, it is directed to the page data request information of the first webpage, it can be for for a certain in the first webpage
The solicited message of a page, for example, the first webpage can be made of multiple pages, wherein each page can correspond to one
Page data request information.
The identification information of at least one corresponding data of first webpage, Ke Yiwei are got based on the solicited message
Whole corresponding identification informations of data that first webpage saves in the buffer are got first according to the solicited message.
Included at least in SNAPSHOT INFO described in the present embodiment have the identification informations of data, the data initial time with
And terminate the time etc..In addition, than as shown in figure 3, the identification information of each data corresponds to a snapshot letter in the present embodiment
Breath
Further, the mode for establishing the corresponding SNAPSHOT INFO of the data can be to be based on operation data, such as application
It, which is extracted, in recommendation list, effort scale, gift bag list, ranking list etc. is related to the part of filtration condition, such as referring to Fig. 5,
It may include having data ID, state, shelf life, undercarriage time etc. in data snapshot, snapshot of these parts as the data.
Snapshot portion can also include more attributes in addition to the state mentioned here and upper undercarriage time, such as whether data are hidden, are
No audit is medium.
Wherein, whether the data are hidden and can also influence the filtering of data in whether auditing, for example, working as snapshot
Image watermarking is indicated in information, can determine to fall data filtering, that is, data are not added in filtering data list;Or
Person can also determine to fall data filtering, i.e., not add data to filtering when indicating that data are in audit in SNAPSHOT INFO
In data list.
Further, the identification information of at least one filtered data is obtained, it can be with are as follows: establish one and cross filter data column
Table, by the identification information of deleted data is not added in data filtering list after filtering.
In the page data request information of first webpage other than including the corresponding URL of the first webpage, may be used also
To include the mark of target pages, for example, can be first page or the N pages, wherein N is the integer more than or equal to 1.
The present embodiment by regarding the correlation attribute information of data (as above undercarriage time, state etc.) as data snapshot,
When needing to obtain data, data are screened using snapshot.For example, the first webpage is corresponding with n data referring to Fig. 5, then
Its corresponding SNAPSHOT INFO is also n, is filtered by n SNAPSHOT INFO to n data, and wherein n is whole more than or equal to 1
Number;Finally obtain the identification information of the m data after filtering, wherein m is the integer more than or equal to 1 and less than or equal to n.
As it can be seen that after the page data request information for receiving the first webpage, getting the first webpage pair by using this programme
At least one data answered, and then at least one data is filtered according to snapshot data, finally to the number obtained after filtering
According to extracting, the identification information of target data for the target page is obtained, is got according to the identification information of target data
The target data of target pages.In this way, being maintained for the consistency of data, while by using the form of snapshot, reducing caching
Access times improve interface concurrency performance, ensure that the accuracy for showing the data of client.In addition, since snapshot is believed
The identification information of data and the state pause judgments time of data are comprised only in breath, so it is excessive to guarantee that this programme will not occupy
Spatial cache.
Example IV,
The embodiment of the invention provides a kind of servers, as shown in Figure 8, comprising:
Request unit 81, for receiving the page data request information for the first webpage of client transmission, base
The identification information of at least one corresponding data of first webpage is got in the solicited message;
Snapshot searching unit 82, for the identification information based at least one data got from caching it is described to
At least one SNAPSHOT INFO of few data;Wherein, the identification information, described for there are data is included at least in the SNAPSHOT INFO
The initial time of data and termination time;
Filter element 83, for being filtered based on the SNAPSHOT INFO at least one described data, after obtaining filtering
At least one data identification information;
Data transmission unit 84, for based on for the first webpage page data request information and it is filtered extremely
The identification information of few data, gets the target data of the target pages for first webpage from caching, with to
The target data of the client feedback target pages.
Here, the server can be specially to save data cached cache server.
The client can be to be mounted on having in mobile terminal or tablet computer or desktop computer to pass through net
The client of network acquisition data function.For example, can be the client that can install and run web browser software.
The mode for accessing the first webpage can be to be accessed, for example, http by the URL of webpage: //
www.123.com.Correspondingly, it is directed to the page data request information of the first webpage, it can be for for a certain in the first webpage
The solicited message of a page, for example, the first webpage can be made of multiple pages, wherein each page can correspond to one
Page data request information.
The identification information of at least one corresponding data of first webpage, Ke Yiwei are got based on the solicited message
Whole corresponding identification informations of data that first webpage saves in the buffer are got first according to the solicited message.
Included at least in SNAPSHOT INFO described in the present embodiment have the identification informations of data, the data initial time with
And terminate the time etc..In addition, the identification information of each data corresponds to a SNAPSHOT INFO in the present embodiment.
Further, the mode for establishing the corresponding SNAPSHOT INFO of the data can be to be based on operation data, such as application
It is extracted in recommendation list, effort scale, gift bag list, ranking list etc. and is related to the part of filtration condition, such as state, restocking
Time, undercarriage time etc., snapshot of these parts as the data.When snapshot portion is in addition to the state mentioned here and upper undercarriage
Between, can also include more attributes, such as data whether hide, whether audit it is medium.
Wherein, whether the data are hidden and can also influence the filtering of data in whether auditing, for example, working as snapshot
Image watermarking is indicated in information, can determine to fall data filtering, that is, data are not added in filtering data list;Or
Person can also determine to fall data filtering, i.e., not add data to filtering when indicating that data are in audit in SNAPSHOT INFO
In data list.
Further, the snapshot searching unit, for establishing a filtering data list, by what is be not deleted after filtering
The identification information of data is added in data filtering list.
In the page data request information of first webpage other than including the corresponding URL of the first webpage, may be used also
To include the mark of target pages, for example, can be first page or the N pages, wherein N is the integer more than or equal to 1.
The present embodiment by regarding the correlation attribute information of data (as above undercarriage time, state etc.) as data snapshot,
When needing to obtain data, data are screened using snapshot.For example, the first webpage is corresponding with n data referring to Fig. 5, then
Its corresponding SNAPSHOT INFO is also n, is filtered by n SNAPSHOT INFO to n data, and wherein n is whole more than or equal to 1
Number;Finally obtain the identification information of the m data after filtering, wherein m is the integer more than or equal to 1 and less than or equal to n.
Further, the snapshot searching unit, for identification information judgment based on the data in the buffer whether
Preserve the corresponding SNAPSHOT INFO of the data;
If not preserving the corresponding SNAPSHOT INFO of the data, identification information based on the data is mentioned from database
Take the corresponding SNAPSHOT INFO of the data.
In addition, the snapshot searching unit, for judging whether the data in caching refresh;If it is determined that refreshing, then judge
Whether the corresponding SNAPSHOT INFO of the data of refreshing changes, when the corresponding SNAPSHOT INFO of the data for determining refreshing becomes
When change, the corresponding SNAPSHOT INFO of the data of refreshing is obtained from database.
When operation personnel modifies to data by backstage, in order to guarantee that the data of modification can be at once slow
Middle refreshing is deposited, the program needs to provide the interface of cache flush for backstage.When cache flush, it is necessary first to judge the fast of the data
According to partially whether changing, if there is a change, it is necessary to refresh snapshot list corresponding to the data;Then again to the number
According to caching part refreshed.
That is, when data in the buffer without corresponding SNAPSHOT INFO when, need to check the data from database
Corresponding SNAPSHOT INFO, in addition, being also required to check that the corresponding SNAPSHOT INFO of data is from database when data refresh
No to change, for example, referring to Fig. 6, then the corresponding caching of refresh data first obtains the SNAPSHOT INFO of data from database
The SNAPSHOT INFO portion of the data saved in part, SNAPSHOT INFO part based on the data got in database and current cache
Divide and be compared, judge whether SNAPSHOT INFO changes, however, it is determined that changes, then get SNAPSHOT INFO column from database
Table simultaneously saves;The caching of data can finally be handled according to the SNAPSHOT INFO list of refreshing.
In addition, it is necessary to explanation, in order to preferably be adapted to original buffering scheme, the data snapshot list of corresponding data is straight
The position for being stored in that its caching Hash table ID is 0 is connect, management that in this way can be more convenient and unified is same set of data cached.
The filter element, for getting current time value;Successively target is got from least one snapshot data
Snapshot data;Judge current time value whether earlier than data described in the target snapshot information initial time or whether
It is later than the termination time of the data;If current time value earlier than data described in the target snapshot information initial time,
Or be later than the termination time of the data, then the identification information of the corresponding data of the target snapshot information is added to data
In filter list;Otherwise, it determines the identification information of the corresponding data of target snapshot information is deleted alternatively, not to the expression information
Processing is carried out to be directly entered in the processing to next target snapshot information.
It is its corresponding, the filter element, for determining mesh based on the page data request information for being directed to the first webpage
It marks the corresponding initial data identification information of the page and terminates data identification information;Based on the corresponding starting number of the target pages
According to identification information and data identification information is terminated, is chosen from data filtering list and obtains the corresponding target of the target pages
The identification information of data;Identification information based on the target data gets target data from caching.
That is, when obtaining the paged data of some page, the snapshot of its all data is mentioned first referring to Fig. 7
It takes out and is put into caching, then according to the snapshot list, data are filtered, take out and divide further according to paging condition after filtering
The corresponding id list of page, finally disposably takes out data list according to the id list from caching and returns to client.Herein,
Paging condition refers to required parameter when client paging obtains data, such as obtains which page of data, and one page needs obtain
How many data taken.
Assuming that there are 100 datas in data snapshot, it is left 80 after the filtering such as state, shelf life, undercarriage time
Data, and client needs to obtain the data of first page, which needs 20 datas.So server at this time will by this 80
The id of preceding 20 data in data forms id list, further according to this 20 id, reads technology using the list of caching, postpones
Data content list corresponding to 20 id is disposably taken out in the content regions deposited returns to client as a result.
Under this scenario, data accessed by client any time access server, can be ensured of allows at this time
It is shown in the data of client.In this way, just can fully ensure that the accuracy of operation data.
As it can be seen that after the page data request information for receiving the first webpage, getting the first webpage pair by using this programme
At least one data answered, and then at least one data is filtered according to snapshot data, finally to the number obtained after filtering
According to extracting, the identification information of target data for the target page is obtained, is got according to the identification information of target data
The target data of target pages.In this way, being maintained for the consistency of data, while by using the form of snapshot, reducing caching
Access times improve interface concurrency performance.In addition, identification information and data due to comprising only data in SNAPSHOT INFO
The state pause judgments time, so guarantee this programme will not occupy excessive spatial cache.
The space very little as shared by data snapshot, it is this to design the pressure that not will increase original buffering scheme.In addition, reading
Access only needs to access primary caching according to snapshot list, so there will not be any influence to the performance of system.In conclusion
The data snapshot for devising caching of program novelty is accounted under the premise of not increasing caching pressure by lesser space
With, solve the problems such as system performance in data in undercarriage time machine system, operation accuracy, data consistency, while with compared with
Small modification cost is fused in original caching system, is greatly improved the competitiveness of similar server product.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row
His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and
And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do
There is also other identical elements in the process, method of element, article or device.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art
The part contributed out can be embodied in the form of software products, which is stored in a storage medium
In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, computer, clothes
Business device, air conditioner or the network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair
Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills
Art field, is included within the scope of the present invention.
Claims (10)
1. a kind of caching data processing method is applied to server, which is characterized in that the described method includes:
The page data request information for the first webpage that client is sent is received, is got based on the solicited message described
The identification information of at least one corresponding data of first webpage;
Identification information based at least one data got from caching at least one data at least one is fast
According to information;Wherein, the initial time and termination of the identification information, the data that there are data are included at least in the SNAPSHOT INFO
Time;
At least one described data are filtered based on the SNAPSHOT INFO, obtain the mark of at least one filtered data
Information;
Based on for the first webpage page data request information and at least one filtered data identification information, from
The target data of the target pages for first webpage is got in caching, with to the client feedback target pages
Target data.
2. the method according to claim 1, wherein the identification information based at least one data from
At least one corresponding SNAPSHOT INFO of at least one described data is got in caching, comprising:
It is corresponding whether the identification information judgment based at least one data preserves at least one described data in the buffer
SNAPSHOT INFO;
If not preserving the corresponding SNAPSHOT INFO of at least one described data, the identification information based at least one data
The corresponding SNAPSHOT INFO of at least one described data is extracted from database.
3. the method according to claim 1, wherein the method also includes:
Judge whether the data in caching refresh;
If it is determined that refreshing, then judge whether the corresponding SNAPSHOT INFO of data refreshed changes, when the number for determining refreshing
When changing according to corresponding SNAPSHOT INFO, the corresponding SNAPSHOT INFO of the data of refreshing is obtained from database.
4. the method according to claim 1, wherein described be based on the SNAPSHOT INFO at least one described number
According to being filtered, the identification information of at least one filtered data is obtained, comprising:
Get current time value;
Target snapshot data are successively got from least one snapshot data;
Judge current time value whether earlier than data described in the target snapshot information initial time or whether be later than institute
State the termination time of data;
If current time value earlier than data described in the target snapshot information initial time or be later than ends of the data
The identification information of the corresponding data of the target snapshot information is then added in data filtering list by the only time.
5. according to the method described in claim 4, it is characterized in that, the page data request based on for the first webpage is believed
The identification information of breath and at least one filtered data, gets the page object for first webpage from caching
The target data in face, comprising:
Based on be directed to the first webpage page data request information, determine the corresponding initial data identification information of target pages and
Terminate data identification information;
Based on the corresponding initial data identification information of the target pages and data identification information is terminated, from data filtering list
Middle selection obtains the identification information of the corresponding target data of the target pages;
Identification information based on the target data gets target data from caching.
6. a kind of server characterized by comprising
Request unit, for receiving the page data request information for the first webpage of client transmission, based on described
Solicited message gets the identification information of at least one corresponding data of first webpage;
Snapshot searching unit, for the identification information based at least one data got from caching it is described at least one
At least one SNAPSHOT INFO of data;Wherein, the identification information, the data for there are data are included at least in the SNAPSHOT INFO
Initial time and termination time;
Filter element, for being filtered at least one described data based on the SNAPSHOT INFO, obtain it is filtered at least
The identification information of one data;
Data transmission unit, for based on for the first webpage page data request information and it is filtered at least one
The identification information of data gets the target data of the target pages for first webpage from caching, with to the visitor
The target data of the family end feedback target page.
7. server according to claim 6, which is characterized in that
Whether the snapshot searching unit preserves in the buffer for the identification information judgment based at least one data
The corresponding SNAPSHOT INFO of described at least one data;If not preserving the corresponding SNAPSHOT INFO of at least one described data, base
The corresponding SNAPSHOT INFO of at least one described data is extracted from database in the identification information of at least one data.
8. server according to claim 6, which is characterized in that the snapshot searching unit, for judging in caching
Whether data refresh;If it is determined that refreshing, then judge whether the corresponding SNAPSHOT INFO of data refreshed changes, refreshes when determining
The data corresponding SNAPSHOT INFO when changing, the corresponding snapshot letter of the data of refreshing is obtained from database
Breath.
9. server according to claim 6, which is characterized in that the filter element, for getting current time value;
Target snapshot data are successively got from least one snapshot data;Judge current time value whether earlier than the target snapshot
The initial time of data described in information or the termination time for whether being later than the data;If current time value is earlier than described
The initial time of data described in target snapshot information or the termination time for being later than the data, then by the target snapshot
The identification information of the corresponding data of information is added in data filtering list.
10. server according to claim 9, which is characterized in that the filter element, for based on for the first webpage
Page data request information, determine the corresponding initial data identification information of target pages and terminate data identification information;Base
In the corresponding initial data identification information of the target pages and data identification information is terminated, is chosen from data filtering list
Obtain the identification information of the corresponding target data of the target pages;Identification information based on the target data is obtained 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 CN106055637A (en) | 2016-10-26 |
CN106055637B true 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) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108153783B (en) * | 2016-12-06 | 2020-10-02 | 腾讯科技(北京)有限公司 | Data caching method and device |
CN112910973B (en) * | 2021-01-21 | 2022-11-25 | 云账户技术(天津)有限公司 | 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 |
Also Published As
Publication number | Publication date |
---|---|
CN106055637A (en) | 2016-10-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106055637B (en) | A kind of caching data processing method and server | |
US9009103B2 (en) | Fingerprint-based, intelligent, content pre-fetching | |
US10091322B2 (en) | Method and apparatus for improving a user experience or device performance using an enriched user profile | |
CN102985921B (en) | There is the client terminal device high speed caching electronic document resources of e-sourcing data base | |
KR101662195B1 (en) | Client-side modification of search results based on social network data | |
CN106649349B (en) | Data caching method, device and system for game application | |
CN110245470A (en) | Intelligent data desensitization method, device, computer equipment and storage medium | |
JP7084691B2 (en) | How to process and present real-time social data on a map | |
CN103678647A (en) | Method and system for recommending information | |
US20170004150A1 (en) | Storing and processing data organized as flexible records | |
EP2910028B1 (en) | Filtering a stream of content | |
CN110245069A (en) | The methods of exhibiting and device of the test method and device of page versions, the page | |
CN104025083A (en) | Method and apparatus for providing web pages | |
CN106980696B (en) | Photo file classification method and device | |
US20140244784A1 (en) | Website Impersonation System and Method | |
CN106372266A (en) | Cache and accessing method of cloud operation system based on aspects and configuration documents | |
CN109857802A (en) | Daily record data synchronous method, device, equipment and computer readable storage medium | |
CN102404242A (en) | User information updating device, electronic equipment and user information updating method | |
CN105653724A (en) | Page exposure monitoring method and device | |
CN110020297A (en) | A kind of loading method of web page contents, apparatus and system | |
DE202021102320U1 (en) | System for implementing sub-database replication | |
US20190286671A1 (en) | Algorithmic computation of entity information from ip address | |
CN107395777A (en) | A kind of method of information push, server | |
CN101169792A (en) | Data base read-write system and method | |
CN107181625A (en) | Data, services provide method and device |
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 |