[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN105353976A - Cache data acquisition method and apparatus - Google Patents

Cache data acquisition method and apparatus Download PDF

Info

Publication number
CN105353976A
CN105353976A CN201510689666.7A CN201510689666A CN105353976A CN 105353976 A CN105353976 A CN 105353976A CN 201510689666 A CN201510689666 A CN 201510689666A CN 105353976 A CN105353976 A CN 105353976A
Authority
CN
China
Prior art keywords
data
data cached
signature
cached
local disk
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510689666.7A
Other languages
Chinese (zh)
Other versions
CN105353976B (en
Inventor
徐宪君
白建民
胡斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Baidu Online Network Technology Beijing Co Ltd
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201510689666.7A priority Critical patent/CN105353976B/en
Publication of CN105353976A publication Critical patent/CN105353976A/en
Application granted granted Critical
Publication of CN105353976B publication Critical patent/CN105353976B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/062Securing storage systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention provides a cache data acquisition method and apparatus. The method comprises: according to a data request of an application server, acquiring a data signature corresponding to the data request from a data signature cache server, and if the data signature is acquired from the data signature cache server, acquiring cache data corresponding to the data signature from a corresponding local disk; if the data signature is not acquired from the data signature cache server, determining that cache data acquisition fails; and if the data signature cache server goes down, acquiring cache data corresponding to the data request from a corresponding data content cache server. Compared with the prior art, according to the cache data acquisition method and apparatus provided by the present invention, the data signature cache server is accessed to acquire the data signature, and the cache data is acquired from the local disk, so as to avoid initiating a request to the data content cache server; and when the data signature cache server goes down, the cache data is acquired from the data content cache server, so that pressure of the data content cache server is relieved.

Description

A kind ofly obtain data cached method and apparatus
Technical field
The present invention relates to field of computer technology, particularly relate to and a kind ofly obtain data cached method and apparatus.
Background technology
Caching system stores the data message that user often accesses, and contributes to obtaining data nearby when user initiates data access, reaches the effect that access is accelerated.But prior art only has content caching usually, it needs to transmit mass data.Further, when caching system collapses, different processing schemes can bring different effects to system.
Current process caching system collapse case the two schemes commonly used respectively:
1) after caching system collapse is without response, directly request is transparent to True Data source, rear end.The program causes back-end data source instant failure, causes system snowslide, cannot provide service, and then affects other services of same data source;
2) when after caching system collapse, request is not transparent to rear end, direct denial of service.Although the program provides the protection to back-end data source, service is abnormal.
Therefore, how a kind of data cached acquisition methods is provided, alleviate the pressure of content caching in prior art, further, impact to True Data source, rear end after the collapse of mitigation caching system, there is provided to request of data side the data alleviation service that system crash brings abnormal, become one of those skilled in the art's problem needing solution badly.
Summary of the invention
The object of this invention is to provide a kind of for obtaining data cached method and apparatus.
According to an aspect of the present invention, provide a kind of for obtaining data cached method, wherein, the method comprises the following steps:
According to the request of data of application server, in data signature caching server, obtain the data signature corresponding with described request of data;
Wherein, the method also comprises following any one:
If a gets described data signature in described data signature caching server, obtain corresponding with described data signature data cached in self-corresponding local disk;
If b does not get described data signature in described data signature caching server, judge to obtain data cached failure;
The machine if the described data signature caching server of c is delayed, obtains corresponding with request of data data cached in self-corresponding data content caching server.
According to another aspect of the present invention, additionally provide a kind of for obtaining data cached device, wherein, this device comprises with lower device:
First acquisition device, for the request of data according to application server, obtains the data signature corresponding with described request of data in data signature caching server;
Wherein, this device also comprises following any one:
Second acquisition device, if for getting described data signature in described data signature caching server, obtains corresponding with described data signature data cached in self-corresponding local disk;
First decision maker, if for not getting described data signature in described data signature caching server, judges to obtain data cached failure;
3rd acquisition device, if to delay machine for described data signature caching server, obtains corresponding with request of data data cached in self-corresponding data content caching server.
Compared with prior art, caching server is divided into Liang Ge district by the present invention: data signature caching server and data content caching server, when access cache server, first a visit data signature cache server obtains data signature, when data signature can be obtained from data signature caching server, success obtains data cached from local disk, if data cached effective, what directly use local disk to obtain is data cached, avoid initiating request to data content caching server, alleviate the pressure of data content caching server; When data signature caching server delays machine, just obtain data cached from data content caching server, alleviate the pressure of data content caching server.
Further, the present invention obtains less than visiting again data content caching server data cached at local disk, avoids initiating request directly to data content caching server, alleviates the pressure of data content caching server.
Further, the present invention is when data content caching server delays machine, can not directly judge to obtain cache failure, but a mirror image data come in handy can be obtained to demand data side from local disk, avoiding judging when running into the situation of the machine of delaying obtaining data cached failed and initiate request of data directly to True Data source, rear end, thus causing back-end system to collapse.
Accompanying drawing explanation
By reading the detailed description done non-limiting example done with reference to the following drawings, other features, objects and advantages of the present invention will become more obvious:
Fig. 1 illustrate according to one aspect of the invention for obtaining data cached method flow schematic diagram.
Fig. 2 illustrates the overall flow schematic diagram for obtaining data cached method.
Fig. 3 illustrate according to a further aspect of the present invention for obtaining data cached device schematic diagram.
In accompanying drawing, same or analogous Reference numeral represents same or analogous parts.
Embodiment
Before in further detail exemplary embodiment being discussed, it should be mentioned that some exemplary embodiments are described as the process or method described as process flow diagram.Although operations is described as the process of order by process flow diagram, many operations wherein can be implemented concurrently, concomitantly or simultaneously.In addition, the order of operations can be rearranged.Described process can be terminated when its operations are completed, but can also have the additional step do not comprised in the accompanying drawings.Described process can correspond to method, function, code, subroutine, subroutine etc.
Within a context alleged " computer equipment ", also referred to as " computer ", refer to the intelligent electronic device that can be performed the predetermined process such as numerical evaluation and/or logical calculated process by operation preset program or instruction, it can comprise processor and storer, the survival instruction that prestores in memory is performed to perform predetermined process process by processor, or perform predetermined process process by the hardware such as ASIC, FPGA, DSP, or combined by said two devices and realize.Computer equipment includes but not limited to server, PC, notebook computer, panel computer, smart mobile phone etc.
Described computer equipment comprises subscriber equipment and the network equipment.Wherein, described subscriber equipment includes but not limited to computer, smart mobile phone, PDA etc.; The described network equipment includes but not limited to the server group that single network server, multiple webserver form or the cloud be made up of a large amount of computing machine or the webserver based on cloud computing (CloudComputing), wherein, cloud computing is the one of Distributed Calculation, the super virtual machine be made up of a group loosely-coupled computing machine collection.Wherein, described computer equipment isolated operation can realize the present invention, also accessible network by realizing the present invention with the interactive operation of other computer equipments in network.Wherein, the network residing for described computer equipment includes but not limited to internet, wide area network, Metropolitan Area Network (MAN), LAN (Local Area Network), VPN etc.
It should be noted that; described subscriber equipment, the network equipment and network etc. are only citing; other computer equipments that are existing or that may occur from now on or network, as being applicable to the present invention, within also should being included in scope, and are contained in this with way of reference.
Method (some of them are illustrated by process flow diagram) discussed below can be implemented by hardware, software, firmware, middleware, microcode, hardware description language or its combination in any.When implementing by software, firmware, middleware or microcode, program code or code segment in order to implement necessary task can be stored in machine or computer-readable medium (such as storage medium).(one or more) processor can implement necessary task.
Concrete structure disclosed herein and function detail are only representational, and are the objects for describing exemplary embodiment of the present invention.But the present invention can carry out specific implementation by many replacement forms, and should not be construed as only being limited to the embodiments set forth herein.
Should be understood that, although may have been used term " first ", " second " etc. here to describe unit, these unit should not limit by these terms.These terms are used to be only used to a unit and another unit to distinguish.For example, when not deviating from the scope of exemplary embodiment, first module can be called as second unit, and second unit can be called as first module similarly.Here used term "and/or" comprise one of them or more any and all combinations of listed associated item.
Should be understood that, when a unit is called as " connection " or " coupling " to another unit, it can directly connect or be coupled to another unit described, or can there is temporary location.On the other hand, " when being directly connected " or " directly coupled " to another unit, then there is not temporary location when a unit is called as.Should explain in a comparable manner the relation be used between description unit other words (such as " and be in ... between " compared to " and be directly in ... between ", " with ... contiguous " compared to " and with ... be directly close to " etc.).
Here used term is only used to describe specific embodiment and be not intended to limit exemplary embodiment.Unless context refers else clearly, otherwise singulative used here " ", " one " are also intended to comprise plural number.It is to be further understood that, the existence of the feature that term used here " comprises " and/or " comprising " specifies to state, integer, step, operation, unit and/or assembly, and do not get rid of and there is or add other features one or more, integer, step, operation, unit, assembly and/or its combination.
Also it should be mentioned that and to replace in implementation at some, the function/action mentioned can according to being different from occurring in sequence of indicating in accompanying drawing.For example, depend on involved function/action, in fact the two width figure in succession illustrated can perform simultaneously or sometimes can perform according to contrary order substantially.
Below in conjunction with accompanying drawing, the present invention is described in further detail.
Fig. 1 illustrate according to one aspect of the invention for obtaining data cached method flow schematic diagram.
At this, buffer memory acquisition device 1 is such as arranged in computer equipment.
In step S101, buffer memory acquisition device 1, according to the request of data of application server, obtains the data signature corresponding with described request of data in data signature caching server.Particularly, when request of data initiated by application server, buffer memory acquisition device 1, such as according to cache key (key), obtains the data signature corresponding with the data of request in the data signature caching server of caching server.Such as, when application server sends the request of data obtaining a certain data, in order to improve the speed obtaining data, buffer memory acquisition device 1 can first be attempted obtaining corresponding data cached of described request of data at local disk, the data cached needs obtaining local disk storage if want first obtains this data cached data signature, thus according to this data signature, obtain corresponding data cached with it from this local disk.Therefore caching server can be divided into two parts: data signature caching server and data content caching server.When application server sends request of data, buffer memory acquisition device 1 first to proceed in data signature cache server and obtains the data signature corresponding with the data of asking rapidly, then obtains corresponding with data signature data cached in local disk according to data signature.
At this, described data signature is such as determined by Hash (hash) algorithm.
At this, buffer memory acquisition device 1 is according to cache key, data signature is obtained in data signature caching server, analogously, this buffer memory acquisition device 1, also according to cache key, obtains corresponding data in other devices following, as obtain in data content caching server data cached, obtain in local disk data cached, do not repeat them here, and be contained in this by way of reference.
Further, according to the concrete acquisition situation obtaining the data signature corresponding with described request of data in data signature caching server, following three steps are divided into:
In step s 102, if get described data signature in described data signature caching server, obtain corresponding with described data signature data cached in the self-corresponding local disk of buffer memory acquisition device 1.Particularly, in step s 102, if get the described data signature corresponding with described request of data in described data signature caching server, namely, there is the data signature corresponding with described request of data in data signature caching server, and when can obtain this data signature from described data signature caching server, buffer memory acquisition device 1 proceeds in local disk, compare in local disk according to the information of described data signature and search, data cached to obtain this.
Preferably, step S102 also comprises sub-step S1021 (not shown), S1022 (not shown) and S1023 (not shown).
In sub-step S1021, if get described data cached in described local disk, buffer memory acquisition device 1 verifies described data cached validity.Particularly, in sub-step S1021, if buffer memory acquisition device 1 gets described data cached in described local disk, namely, after searching by the data in data signature and local disk are compared, find to exist in local disk corresponding with data signature data cached, and local disk is in normal operating conditions, buffer memory acquisition device 1 can obtain from local disk described corresponding with data signature data cached time, verify the described data cached validity got further obtaining described data cached rear needs.Such as, if previous after local disk performs acquisition operation, True Data source, rear end there occurs data variation, but local cache does not upgrade in time, data cachedly may there is invalid problem in what then buffer memory acquisition device 1 obtained in this locality, therefore need to verify the data cached validity obtained at local disk.
Those skilled in the art will be understood that and above-mentionedly in local disk, obtain data cached mode according to data signature be only citing; other existing or may occur from now in local disk, obtain data cached mode as being applicable to the present invention according to data signature; also within scope should being included in, and this is contained in by reference at this.
At this, verify that the mode of described data cached validity comprises following at least any one:
1) described in comparison, whether the data signature of data cached correspondence is consistent with the data signature in described local disk; Particularly, compare by the data signature in the described data signature obtained from data signature caching server and described local disk, if comparison result is consistent, then pass through, otherwise do not pass through;
2) whether the difference of the last modification time of the local disk file of data cached correspondence described in comparison and current time is within the term of validity; Particularly, before the deadline whether the last modification time of the local disk file of data cached correspondence described in comparison and the difference of current time, if this difference is before the deadline, described effectively data cached, if this difference exceedes the term of validity, described data cached invalid.
Those skilled in the art will be understood that the mode of the validity of above-mentioned verification msg is only citing; the mode of the validity of his verification msg that is existing or that may occur from now on is as being applicable to the present invention; also within scope should being included in, and this is contained in by reference at this.
Further, according in sub-step S1021 to the result of described data cached validation verification, respectively perform sub-step S1022 or S1023.
In sub-step S1022, if described effectively data cached, buffer memory acquisition device 1 directly returns described data cached.Particularly, in sub-step S1022, buffer memory acquisition device 1 by described data cached according to after the checking of above-mentioned verification mode, if described effectively data cached, the described data cached of local disk acquisition is back to described application server, completes the process that described acquisition is data cached.In sub-step S1023, if described data cached invalid, obtain described data cached in described data content caching server.Particularly, in sub-step S1023, if from described local disk obtain described data cached invalid, proceed in described data content caching server described data cached to obtain.
At this, when getting the data signature corresponding with request of data from data signature caching server, it is corresponding with described data signature data cached that buffer memory acquisition device 1 proceeds to that local disk obtains that local disk stores, if get described data cached from local disk, and empirical tests, described effectively data cached, then the data cached of acquisition is back to application server, completes data cached acquisition process.
Preferably, step S102 also comprises sub-step S1024 (not shown).In sub-step S1024, if do not get described data cached in described local disk, buffer memory acquisition device 1 obtains described data cached in described data content caching server.Particularly, in sub-step S1024, if do not get described data cached in described local disk, that is, when do not exist in local disk corresponding with described data signature described data cached time; Or when local disk breaks down, such as local side temporarily crashes, thus acquisition operation can not normally be performed, now whether exist in uncertain described local disk corresponding with described data signature data cached time, buffer memory acquisition device 1 proceed in content caching server obtain corresponding with request of data data cached.
At this, be described in detail with the operation of an embodiment to above-mentioned steps:
Such as, application server sends the request of access one website, obtains the data signature of this website data in described data signature caching server; If success gets this data signature in described data signature caching server, proceed to local disk and check in local disk whether store this website data to obtain the data that are buffered in this website of local disk corresponding with described data signature; 1) when get from described local disk described data cached time, need verify described data cached validity.When described effectively data cached, as when as described in data signature and the difference of the last modification time of local disk and current time consistent with the signature in local disk file in the predetermined term of validity time, namely this website data does not change, directly return described data cached, the website data of display request access, obtain data cached success, ending request; When described data cached invalid, namely when the signature in the described data signature got and local disk file is inconsistent, or the last modification time of local disk and the difference of current time be not in the predetermined term of validity, or when the inconsistent and difference of the last modification time of local disk and current time of the signature in described data signature and local disk file is not in the predetermined term of validity, proceed to obtain in data content caching server data cached.2) when do not get from described local disk described data cached time, proceed in data content caching server data cached to obtain.
At this, from data signature caching server, obtain data signature, obtain data cached from local disk after success, if content is effective, directly use the content in local disk, avoid initiating request to content caching server, alleviate the pressure of content caching server.
In step s 103, if do not get described data signature in described data signature caching server, buffer memory acquisition device 1 judges to obtain data cached failure.Particularly, in step s 103, if do not get described data signature in described data signature caching server, namely, when signature cache server does not work as machine, the operation obtained can be realized, but when there is not the data signature corresponding with described request of data in described data signature caching server, buffer memory acquisition device 1 directly judges to obtain data cached failure, stops obtaining data cached process.
In step S104, the machine if described data signature caching server is delayed, obtains corresponding with request of data data cached in buffer memory acquisition device 1 self-corresponding data content caching server.Particularly, in step S104, the machine if described data signature caching server is delayed, namely when described data cache server breaks down, such as temporarily crash or the temporary transient deadlock of database, when thus normally can not perform acquisition operation, now whether there is the data signature corresponding with described request of data in uncertain described data signature caching server, in such cases, buffer memory acquisition device 1 proceed in content caching server obtain corresponding with request of data data cached.
Preferably, obtain in described data content caching server and describedly data cachedly also comprise step S105 (not shown), step S106 (not shown) and step S107 (not shown).
Wherein, in step S105, if get described data cached in described data content caching server, buffer memory acquisition device 1 arranges described data cached in described local disk.Particularly, in step S105, if get described data cached in described data content caching server, namely, if exist corresponding with described request of data data cached in described data content caching server, and can get described data cached from described content caching server, then buffer memory acquisition device 1 proceed in local disk reset or upgrade described data cached.
Such as, application server sends the request of access one website, and buffer memory acquisition device 1 obtains the data signature of this website data in described data signature caching server; The machine if data signature caching server is delayed, but or from data signature caching server, get data signature but from local disk, do not get cache contents or the cache contents empirical tests that obtains from local disk invalid, then proceed in data content caching server to obtain the data cached of this website, if get described data cached in described data content caching server, buffer memory acquisition device 1 arranges local cache data in described local disk, and local cache data is upgraded with the data syn-chronization of following in data content caching server.
At this, the above-mentioned local cache data that arranges in described local disk comprises following at least any one:
1) described data cached and corresponding data signature is write in the local disk file of described local disk;
2) filemodetime of described local disk file is updated to current time stamp.
Particularly, because the data cached possibility in local disk is wrong, such as, when in sub-step S1024, buffer memory acquisition device 1 does not get described data cached in described local disk, and in step S105, buffer memory acquisition device 1 gets described data cached in described data content caching server, what at this moment can be understood as in this local disk is data cached wrong, needs to arrange.Or, when in step S104, described data signature caching server is delayed machine, and in step S105, buffer memory acquisition device 1 gets described data cached in described data content caching server, at this moment also can arrange the data cached of this local disk.Such as, the data cached and corresponding data signature obtained in data content caching server writes in the local disk file of this local disk by buffer memory acquisition device 1; Further, the filemodetime of this local disk file can also be updated to current time stamp by this buffer memory acquisition device 1.
Those skilled in the art will be understood that and above-mentionedly arrange data cached mode and be only citing; he existing or may occur from now on data cached mode is set as being applicable to the present invention; also within scope should being included in, and this is contained in by reference at this.
In step s 106, if do not obtain described data cached in described data content caching server, buffer memory acquisition device 1 judges to obtain data cached failure.Particularly, in step s 106, if do not obtain described data cached in described data content caching server, not corresponding with described request of data described data cached in even described data content caching server, buffer memory acquisition device 1 judges to obtain data cached failure, stop the process that this acquisition is data cached, and return the notice of the data not getting described request to application server.
In step s 107, the machine if described data content caching server is delayed, buffer memory acquisition device 1 obtains described data cached in described local disk.Particularly, in step s 107, the machine if described data content caching server is delayed, that is, when described data content caching server breaks down, such as, temporarily crash or the temporary transient deadlock of database, when thus normally can not perform acquisition operation, now whether exist corresponding with described request of data data cached in uncertain described data content caching server, in such cases, buffer memory acquisition device 1 proceed in local disk obtain described data cached.
Preferably, step S107 also comprises sub-step S1071 (not shown) and sub-step S1072 (not shown).
In sub-step S1071, if get described data cached in described local disk, buffer memory acquisition device 1 directly returns described data cached.Particularly, in sub-step S1071, if get described data cached in described local disk, namely, corresponding with data signature data cached when existing in local disk, and can obtain from local disk described corresponding with data signature data cached time, buffer memory acquisition device 1 is direct is back to described application server by the described data cached of local disk acquisition, complete the process that described acquisition is data cached, and without the need to verifying that whether described data message effective.
Such as, application server sends the request of access one website, obtains the data signature of this website data in described data signature caching server; The machine if data signature caching server is delayed, or from data signature caching server, get data signature but do not get data cached from local disk or but from local disk, get data cached empirical tests invalid, then proceed in data content caching server to obtain the data cached of this website, the machine if data content caching server is delayed, then proceed to local disk data cached with what obtain in local disk.If get the data cached of asked website from local disk, then described data cached whether effective without the need to verifying, directly the data cached of this website is back to described application server.
At this, when data content caching server delays machine, can not directly judge to obtain cache failure, but a mirror image data come in handy can be obtained to demand data side from local disk, avoid judging when running into the situation of the machine of delaying obtaining cache failure and directly to rear end really data source initiate request of data and cause back-end system to collapse.
In sub-step S1072, if do not get described data cached in described local disk, buffer memory acquisition device 1 judges to obtain data cached failure.Particularly, in sub-step S1072, if do not get described data cached in described local disk, that is, when do not exist in local disk corresponding with described data signature described data cached time; Or when local disk breaks down, such as local side temporarily crashes, thus acquisition operation can not normally be performed, now whether exist in uncertain described local disk corresponding with described data signature data cached time, buffer memory acquisition device 1 judges to obtain data cached failure, stops obtaining data cached process.
Preferably, obtain data cached method and also comprise following arbitrary step: step S108 (not shown), step S109 (not shown).
Wherein, in step S108, buffer memory acquisition device 1 arranges data cached in described data content caching server; In step S109, buffer memory acquisition device 1 is setting data signature in described data signature caching server.Particularly, in step S108, when needing setting data content caching server data cached, buffer memory acquisition device 1 arranges data cached in described data content caching server; In step S109, when needing the data signature in setting data signature cache server, buffer memory acquisition device 1 is setting data signature in described data signature caching server.
Preferably, obtain data cached method and also comprise following arbitrary step: step S110 (not shown), step S111 (not shown).
Wherein, in step s 110, buffer memory acquisition device 1 is deleted data cached in described data content caching server; In step S111, buffer memory acquisition device 1 deletes data signature in described data signature caching server.Particularly, in step s 110, when needing deletion of data content caching server data cached, buffer memory acquisition device 1 is deleted described data cached in described data content caching server; In step S111, when needing to delete the data signature in data signature caching server, buffer memory acquisition device 1 deletes described data signature in described data signature caching server.
Fig. 2 illustrates the overall flow schematic diagram for obtaining data cached method, is described in detail below in conjunction with Fig. 2 step of some specific embodiments to the data cached method of above-mentioned acquisition.
Request of data initiated by application server, proceeds to data signature cache server to obtain the data signature corresponding with this request of data.
1) such as, when data signature caching server delays machine without when responding, buffer memory acquisition device 1 proceeds in data content caching server and obtains the data cached of correspondence, if now data content caching server is also in machine state of delaying just, then temporarily obtain less than data cached, proceed to local disk data cached with what obtain in this local disk, if what got in local disk is data cached, then do not need to verify data cached validity, what directly return in local disk is data cached to described application server, obtain data cached success, terminate.
At this, when data signature caching server and data content caching server delay machine simultaneously, can not directly judge to obtain data cached failure, but from local disk, temporarily obtain a mirror image data directly to application server, initiate request directly to True Data source, rear end after avoiding judging to obtain data cached failure, the collapse of back-end data source and the snowslide of system can not be caused.
2) such as, when getting data signature in data signature caching server, proceed to local disk data cached with what obtain in local disk, if get corresponding with described data signature data cached from local disk, and empirical tests, described data cached invalid, then proceed in data content caching server data cached to obtain; If do not get in local disk corresponding with described data signature data cached time, also to proceed in data content caching server data cached to obtain.If now data content caching server is in machine state of delaying just, then temporarily obtain less than data cached, continue to proceed to local disk data cached with what obtain in local disk, if what got in local disk is data cached, then do not need to verify data cached validity, what directly return in local disk is data cached to described application server, obtains data cached success, terminates.
At this, data signature can be obtained, but local disk obtain less than data cached or obtain less than effectively data cached, and data content caching server is delayed during machine, can not directly judge to obtain data cached failure, but from local disk, temporarily obtain a mirror image data to application server, initiate request directly to True Data source, rear end after avoiding judging to obtain data cached failure, the collapse of back-end data source and the snowslide of system can not be caused.
3) such as, when getting data signature in data signature caching server, proceed to local disk to obtain local disk cache contents, if get corresponding with described data signature data cached from local disk, and empirical tests, described effectively data cached, then be directly data cachedly back in application server by what get from local disk, obtain data cached success, terminate.
At this, when data signature can be obtained from data signature caching server, success obtains cache contents from local disk, if content is effective, what directly use local disk to obtain is data cached, avoid initiating request to data content caching server, alleviate the pressure of content caching server.
4) such as, when data signature caching server delays machine without when responding, proceed in data content caching server and obtain the data cached of correspondence; Or, when getting data signature in data signature caching server, proceed to local disk data cached with what obtain in local disk, if get corresponding with described data signature data cached from local disk, and empirical tests, described data cached invalid, then proceed in data content caching server data cached to obtain equally; If do not get in local disk corresponding with described data signature data cached time, also to proceed in data content caching server data cached to obtain.If can get data cached from data content caching server, be then back to application server by data cached, and it is data cached to arrange in local disk file; If fail to get from data content caching server data cached, then judge to obtain data cached failure, terminate.
5) such as, when not getting data signature in data signature caching server, directly judging to obtain data cached failure, terminating.
Fig. 3 illustrate according to a further aspect of the present invention for obtaining data cached device schematic diagram.
Buffer memory acquisition device 1 comprises the first acquisition device 301, second acquisition device 302, first decision maker 303, the 3rd acquisition device 304.
At this, buffer memory acquisition device 1 is such as arranged in computer equipment.
Wherein, the first acquisition device 301, according to the request of data of application server, obtains the data signature corresponding with described request of data in data signature caching server.Particularly, when request of data initiated by application server, the first acquisition device 301, such as according to cache key (key), obtains the data signature corresponding with the data of request in the data signature caching server of caching server.Such as, when application server sends the request of data obtaining a certain data, in order to improve the speed obtaining data, can first attempt obtaining corresponding data cached of described request of data at local disk, the data cached needs obtaining local disk storage if want first obtains this data cached data signature, thus according to this data signature, obtain corresponding data cached with it from this local disk.Therefore caching server can be divided into two parts: data signature caching server and data content caching server.When application server sends request of data, first acquisition device 301 first to proceed in data signature cache server and obtains the data signature corresponding with the data of asking rapidly, then obtains corresponding with data signature data cached in local disk according to data signature.
At this, described data signature is such as determined by Hash (hash) algorithm.
At this, buffer memory acquisition device 1 is according to cache key, data signature is obtained in data signature caching server, analogously, this buffer memory acquisition device 1, also according to cache key, obtains corresponding data in other devices following, as obtain in data content caching server data cached, obtain in local disk data cached, do not repeat them here, and be contained in this by way of reference.
If get described data signature in described data signature caching server, obtain corresponding with described data signature data cached in the self-corresponding local disk of the second acquisition device 302.Particularly, if get the described data signature corresponding with described request of data in described data signature caching server, namely, the data signature corresponding with described request of data is there is in data signature caching server, and when can obtain this data signature from described data signature caching server, second acquisition device 302 proceeds in local disk, compares search according to the information of described data signature in local disk, data cached to obtain this.
Preferably, the second acquisition device 302 also comprises authentication unit 3021 (not shown), first and returns unit 3022 (not shown) and the 4th acquiring unit 3023 (not shown).
If get described data cached in described local disk, authentication unit 3021 verifies described data cached validity.Particularly, if the second acquisition device 302 gets described data cached in described local disk, namely, after searching by the data in data signature and local disk are compared, find to exist in local disk corresponding with data signature data cached, and local disk is in normal operating conditions, second acquisition device 302 can obtain from local disk described corresponding with data signature data cached time, verify the described data cached validity got further obtaining described data cached rear needs.Such as, if previous after local disk performs acquisition operation, True Data source, rear end there occurs data variation, but local cache does not upgrade in time, data cachedly may there is invalid problem in what then the second acquisition device 302 obtained at local disk, therefore need to verify the data cached validity obtained at local disk.
Those skilled in the art will be understood that and above-mentionedly in local disk, obtain data cached mode according to data signature be only citing; other existing or may occur from now in local disk, obtain data cached mode as being applicable to the present invention according to data signature; also within scope should being included in, and this is contained in by reference at this.
At this, verify that the mode of described data cached validity comprises following at least any one:
1) described in comparison, whether the data signature of data cached correspondence is consistent with the data signature in described local disk; Particularly, compare by the data signature in the described data signature obtained from data signature caching server and described local disk, if comparison result is consistent, then pass through, otherwise do not pass through;
2) whether the difference of the last modification time of the local disk file of data cached correspondence described in comparison and current time is within the term of validity; Particularly, before the deadline whether the last modification time of the local disk file of data cached correspondence described in comparison and the difference of current time, if this difference is before the deadline, described effectively data cached, if this difference exceedes the term of validity, described data cached invalid.
Those skilled in the art will be understood that the mode of the validity of above-mentioned verification msg is only citing; the mode of the validity of his verification msg that is existing or that may occur from now on is as being applicable to the present invention; also within scope should being included in, and this is contained in by reference at this.
Further, according to the result of authentication unit 3021 to described data cached validation verification, return unit 3022 by first respectively or the 4th acquiring unit 3023 performs further operation.
If described effectively data cached, first returns unit 3022 directly returns described data cached.Particularly, authentication unit 3021 is by described data cached according to after above-mentioned verification mode checking, if described effectively data cached, first returns described data cached that local disk obtains by unit 3022 is back to described application server, completes the process that described acquisition is data cached.If described data cached invalid, the 4th acquiring unit 3023 obtains described data cached in described data content caching server.Particularly, if from described local disk obtain described data cached invalid, the 4th acquiring unit 3023 proceeds in described data content caching server described data cached to obtain.
At this, when getting the data signature corresponding with request of data from data signature caching server, what proceed to that local disk obtains that local disk stores is corresponding with described data signature data cached, if get described data cached from local disk, and empirical tests, described effectively data cached, then the data cached of acquisition is back to application server, completes data cached acquisition process.
Preferably, the second acquisition device 302 also comprises the 5th acquiring unit 3024 (not shown).If do not get described data cached in described local disk, the 5th acquiring unit 3024 obtains described data cached in described data content caching server.Particularly, if do not get described data cached in described local disk, that is, when do not exist in local disk corresponding with described data signature described data cached time; Or when local disk breaks down, such as local side temporarily crashes, thus acquisition operation can not normally be performed, now whether exist in uncertain described local disk corresponding with described data signature data cached time, the 5th acquiring unit 3024 proceed in content caching server obtain corresponding with request of data data cached.
At this, by an embodiment, said apparatus is described in detail:
Such as, application server sends the request of access one website, is obtained the data signature of this website data by the first acquisition device 301 in described data signature caching server; If success gets this data signature in described data signature caching server, proceed to local disk by the second acquisition device 302 and check in local disk whether store this website data to obtain the data that are buffered in this website of local disk corresponding with described data signature; 1) when get from described local disk described data cached time, need to verify described data cached validity by authentication unit.When described effectively data cached, as when as described in data signature and the difference of the last modification time of local disk and current time consistent with the signature in local disk file in the predetermined term of validity time, namely this website data does not change, returning unit 3022 by first directly returns described data cached, the website data of display request access, obtain data cached success, ending request; When described data cached invalid, namely when the signature in the described data signature got and local disk file is inconsistent, or the last modification time of local disk and the difference of current time be not in the predetermined term of validity, or when the inconsistent and difference of the last modification time of local disk and current time of the signature in described data signature and local disk file is not in the predetermined term of validity, by the 4th acquiring unit 3023 proceed to obtain in data content caching server data cached.2) when do not get from described local disk described data cached time, proceed in data content caching server data cached to obtain by the 5th acquiring unit 3024.
At this, from data signature caching server, obtain data signature, obtain data cached from local disk after success, if content is effective, directly use the content in local disk, avoid initiating request to content caching server, alleviate the pressure of content caching server.
If do not get described data signature in described data signature caching server, the first decision maker 303 judges to obtain data cached failure.Particularly, if do not get described data signature in described data signature caching server, namely, when signature cache server does not work as machine, the operation obtained can be realized, but when there is not the data signature corresponding with described request of data in described data signature caching server, the first decision maker 303 directly judges to obtain data cached failure, stops obtaining data cached process.
The machine if described data signature caching server is delayed, obtains corresponding with request of data data cached in the 3rd acquisition device 304 self-corresponding data content caching server.Particularly, the machine if described data signature caching server is delayed, namely when described data cache server breaks down, such as temporarily crash or the temporary transient deadlock of database, when thus normally can not perform acquisition operation, now whether there is the data signature corresponding with described request of data in uncertain described data signature caching server, in such cases, the 3rd acquisition device 304 proceed in content caching server obtain corresponding with request of data data cached.
Preferably, obtain in described data content caching server and describedly data cachedly also comprise the first setting device 305 (not shown), the second decision maker 306 (not shown) and the 6th acquisition device 307 (not shown).
Wherein, if get described data cached in described data content caching server, slow first setting device 305 arranges described data cached in described local disk.Particularly, if get described data cached in described data content caching server, namely, if exist corresponding with described request of data data cached in described data content caching server, and can get described data cached from described content caching server, then by the first setting device 305 proceed in local disk reset or upgrade described data cached.
Such as, application server sends the request of access one website, and the first acquisition device 301 obtains the data signature of this website data in described data signature caching server, the machine if data signature caching server is delayed, or but it is still invalid getting cache contents or get cache contents empirical tests from local disk from local disk to get data signature from data signature caching server, then the 3rd acquisition device 304 obtains the data cached of this website in data content caching server, if get described data cached in described data content caching server, first setting device 305 arranges local cache data in described local disk, local cache data is upgraded with the data syn-chronization of following in data content caching server.
At this, above-mentionedly local cache data be set in described local disk by the first setting device 305 comprise following at least any one:
1) described data cached and corresponding data signature is write in the local disk file of described local disk;
2) filemodetime of described local disk file is updated to current time stamp.
Particularly, because the data cached possibility in local disk is wrong, such as, when the 5th acquiring unit does not get described data cached in described local disk, and the first setting device 305 can get in described data content caching server described data cached time, what can be understood as in described local disk is data cached wrong, needs to arrange.Or, when described data signature caching server is delayed machine, and get in described data content caching server described data cached time, also can be arranged the data cached of this local disk by the first setting device 305.Such as, the data cached and corresponding data signature obtained in data content caching server is write in the local disk file of this local disk; Further, the filemodetime of this local disk file can also be updated to current time stamp.
Those skilled in the art will be understood that and above-mentionedly arrange data cached mode and be only citing; he existing or may occur from now on data cached mode is set as being applicable to the present invention; also within scope should being included in, and this is contained in by reference at this.
If do not obtain described data cached in described data content caching server, the second decision maker 306 judges to obtain data cached failure.If do not obtain described data cached particularly in described data content caching server, not corresponding with described request of data described data cached in even described data content caching server, second decision maker 306 judges to obtain data cached failure, stop the process that this acquisition is data cached, and return the notice of the data not getting described request to application server.
The machine if described data content caching server is delayed, the 6th acquisition device 307 obtains described data cached in described local disk.Particularly, the machine if described data content caching server is delayed, namely, when described data content caching server breaks down, such as temporarily crash or the temporary transient deadlock of database, when thus normally can not perform acquisition operation, now whether exist corresponding with described request of data data cached in uncertain described data content caching server, in such cases, obtain described data cached in local disk by the 6th acquisition device 307.
Preferably, the 6th acquisition device 307 also comprises second and returns unit 3071 (not shown) and the 3rd identifying unit 3072 (not shown).
If get described data cached in described local disk, second returns unit 3071 directly returns described data cached.Particularly, if get described data cached in described local disk, namely, corresponding with data signature data cached when existing in local disk, and can obtain from local disk described corresponding with data signature data cached time, second returns unit is directly back to described application server by the described data cached of local disk acquisition, completes the process that described acquisition is data cached, and without the need to verifying that whether described data message effective.
Such as, application server sends the request of access one website, and the first acquisition device 301 obtains the data signature of this website data in described data signature caching server; The machine if data signature caching server is delayed, or from data signature caching server, get data signature but do not get data cached from local disk or but from local disk, get data cached empirical tests invalid, then in data content caching server, obtain the data cached of this website by the 3rd acquisition device, the machine if data content caching server is delayed, then obtain in local disk by the 6th acquisition device 307 from local disk data cached.If get the data cached of asked website from local disk, then described data cached whether effective without the need to verifying, directly the data cached of this website is back to described application server.
At this, when data content caching server delays machine, can not directly judge to obtain cache failure, but a mirror image data come in handy can be obtained to demand data side from local disk, avoid judging when running into the situation of the machine of delaying obtaining cache failure and directly to rear end really data source initiate request of data and cause back-end system to collapse.
If do not get described data cached in described local disk, the 3rd decision maker 3072 judges to obtain data cached failure.Particularly, if do not get described data cached in described local disk, that is, when do not exist in local disk corresponding with described data signature described data cached time; Or when local disk breaks down, such as local side temporarily crashes, thus acquisition operation can not normally be performed, now whether exist in uncertain described local disk corresponding with described data signature data cached time, 3rd identifying unit 3072 judges to obtain data cached failure, stops obtaining data cached process.
Preferably, buffer memory acquisition device also comprises following arbitrary device: the second setting device 308 (not shown), the 3rd setting device 309 (not shown).
Second setting device 308 arranges data cached in described data content caching server; 3rd setting device 309 is setting data signature in described data signature caching server.Particularly, when needing setting data content caching server data cached, the second setting device 308 arranges data cached in described data content caching server; When needing the data signature in setting data signature cache server, the 3rd setting device 309 is setting data signature in described data signature caching server.
Preferably, buffer memory acquisition device also comprises following arbitrary device: the first delete device 310 (not shown), the second delete device 311 (not shown).
First delete device 310 is deleted data cached in described data content caching server; Second delete device 311 deletes data signature in described data signature caching server.Particularly, when needing deletion of data content caching server data cached, the first delete device 310 is deleted described data cached in described data content caching server; When needing to delete the data signature in data signature caching server, the second acquisition device 311 deletes described data signature in described data signature caching server.
Be described in detail with the device that some specific embodiments are data cached to above-mentioned acquisition below.
Request of data initiated by application server, the first acquisition device 301 from data signature caching server to obtain the data signature corresponding with this request of data.
1) such as, when data signature caching server delays machine without when responding, 3rd acquisition device 304 obtains the data cached of correspondence in data content caching server, if now data content caching server is also in machine state of delaying just, then temporarily obtain less than data cached, it is data cached that 6th acquisition device 307 obtains in this local disk from local disk, if it is data cached that the 6th acquisition device 307 has successfully got in local disk, then do not need to verify data cached validity, by second return that unit 3071 directly returns in local disk data cached to described application server, obtain data cached success, terminate.
At this, when data signature caching server and data content caching server delay machine simultaneously, can not directly judge to obtain data cached failure, but from local disk, temporarily obtain a mirror image data directly to application server, initiate request directly to True Data source, rear end after avoiding judging to obtain data cached failure, the collapse of back-end data source and the snowslide of system can not be caused.
2) such as, when getting data signature in data signature caching server, it is data cached that second acquisition device 302 obtains in local disk from local disk, if get corresponding with described data signature data cached from local disk, and empirical tests unit 3021 is verified, described data cached invalid, then by the 4th acquiring unit 3023 proceed to obtain in data content caching server data cached; If do not get in local disk corresponding with described data signature data cached time, by the 5th acquiring unit 3024 also to proceed to obtain in data content caching server data cached.If now data content caching server is in machine state of delaying just, then temporarily obtain less than data cached, continue by the 6th acquisition device 307 proceed to that local disk obtains in local disk data cached, if what got in local disk is data cached, then do not need to verify data cached validity, directly by second return that unit 3071 returns in local disk data cached to described application server, obtain data cached success, end.
At this, data signature can be obtained, but local disk obtain less than data cached or obtain less than effectively data cached, and data content caching server is delayed during machine, can not directly judge to obtain data cached failure, but from local disk, temporarily obtain a mirror image data to application server, initiate request directly to True Data source, rear end after avoiding judging to obtain data cached failure, the collapse of back-end data source and the snowslide of system can not be caused.
3) such as, when getting data signature in data signature caching server, local disk cache contents is obtained from local disk by the second acquisition device 302, if the second acquisition device 302 gets corresponding with described data signature data cached from local disk, and empirical tests, described effectively data cached, then return unit 3022 by first and be directly data cachedly back in application server by what get from local disk, obtain data cached success, terminate.
At this, when data signature can be obtained from data signature caching server, success obtains cache contents from local disk, if content is effective, what directly use local disk to obtain is data cached, avoid initiating request to data content caching server, alleviate the pressure of content caching server.
4) such as, when data signature caching server delays machine without when responding, proceeded in data content caching server by the 3rd acquisition device 304 and obtain the data cached of correspondence; Or, when getting data signature in data signature caching server, obtain in local disk by the second acquisition device 302 from local disk data cached, if get corresponding with described data signature data cached from local disk, and empirical tests unit 3021 is verified, described data cached invalid, then proceed in data content caching server data cached to obtain equally by the 4th acquiring unit 3023; If do not get in local disk corresponding with described data signature data cached time, also to proceed in data content caching server data cached to obtain by the 5th acquiring unit 3024.If can get data cached from data content caching server, be then back to application server by data cached, and it is data cached to arrange in local disk file by the first setting device 305; If fail to get from data content caching server data cached, then judged to obtain data cached failure by the second decision maker 306, terminate.
5) such as, when not getting data signature in data signature caching server, directly being judged to obtain data cached failure by the first decision maker 303, terminating.
It should be noted that the present invention can be implemented in the assembly of software and/or software restraint, such as, each device of the present invention can adopt special IC (ASIC) or any other similar hardware device to realize.In one embodiment, software program of the present invention can perform to realize step mentioned above or function by processor.Similarly, software program of the present invention (comprising relevant data structure) can be stored in computer readable recording medium storing program for performing, such as, and RAM storer, magnetic or CD-ROM driver or flexible plastic disc and similar devices.In addition, steps more of the present invention or function can adopt hardware to realize, such as, as coordinating with processor thus performing the circuit of each step or function.
To those skilled in the art, obviously the invention is not restricted to the details of above-mentioned one exemplary embodiment, and when not deviating from spirit of the present invention or essential characteristic, the present invention can be realized in other specific forms.Therefore, no matter from which point, all should embodiment be regarded as exemplary, and be nonrestrictive, scope of the present invention is limited by claims instead of above-mentioned explanation, and all changes be therefore intended in the implication of the equivalency by dropping on claim and scope are included in the present invention.Any Reference numeral in claim should be considered as the claim involved by limiting.In addition, obviously " comprising " one word do not get rid of other unit or step, odd number does not get rid of plural number.Multiple unit of stating in system claims or device also can be realized by software or hardware by a unit or device.First, second word such as grade is used for representing title, and does not represent any specific order.

Claims (18)

1., for obtaining a data cached method, wherein, the method comprises:
-according to the request of data of application server, in data signature caching server, obtain the data signature corresponding with described request of data;
Wherein, the method also comprises following any one:
If a gets described data signature in described data signature caching server, obtain corresponding with described data signature data cached in self-corresponding local disk;
If b does not get described data signature in described data signature caching server, judge to obtain data cached failure;
The machine if the described data signature caching server of c is delayed, obtains corresponding with request of data data cached in self-corresponding data content caching server.
2. method according to claim 1, wherein, described step a also comprises:
-Ruo gets described data cached in described local disk, verifies described data cached validity;
Effectively data cached described in-Ruo, directly return described data cached;
Data cached invalid described in-Ruo, obtain described data cached in described data content caching server.
3. method according to claim 1, wherein, described step a also comprises:
-Ruo does not get described data cached in described local disk, obtains described data cached in described data content caching server.
4. method according to claim 2, wherein, verify that the mode of described data cached validity comprises following at least any one:
Described in-comparison, whether the data signature of data cached correspondence is consistent with the data signature in described local disk;
Whether the last modification time of the local disk file of data cached correspondence described in-comparison and the difference of current time be within the term of validity.
5. method according to any one of claim 1 to 4, wherein, obtains described data cachedly also to comprise in described data content caching server:
If c1 gets described data cached in described data content caching server, arrange described data cached in described local disk;
If c2 does not get described data cached in described data content caching server, judge to obtain data cached failure;
The machine if the described data content caching server of c3 is delayed, obtains described data cached in described local disk.
6. method according to claim 5, wherein, described step c3 also comprises:
-Ruo gets described data cached in described local disk, directly returns described data cached;
-Ruo does not get described data cached in described local disk, judges to obtain data cached failure.
7. method according to claim 5, wherein, arranges local cache data and comprises following at least any one in described local disk:
-described data cached and corresponding data signature is write in the local disk file of described local disk;
-filemodetime of described local disk file is updated to current time stamp.
8. method according to claim 1, wherein, the method also comprises following at least any one:
-arrange data cached in described data content caching server;
-in described data signature caching server, setting data is signed.
9. method according to claim 1, wherein, the method also comprises following at least any one:
-delete data cached in described data content caching server;
-in described data signature caching server, delete data signature.
10. for obtaining a data cached buffer memory acquisition device, wherein, this buffer memory acquisition device comprises:
First acquisition device, for the request of data according to application server, obtains the data signature corresponding with described request of data in data signature caching server;
Wherein, this device also comprises following any one:
Second acquisition device, if for getting described data signature in described data signature caching server, obtains corresponding with described data signature data cached in self-corresponding local disk;
First decision maker, if for not getting described data signature in described data signature caching server, judges to obtain data cached failure;
3rd acquisition device, if to delay machine for described data signature caching server, obtains corresponding with request of data data cached in self-corresponding data content caching server.
11. buffer memory acquisition device according to claim 10, wherein, described second acquisition device also comprises:
Authentication unit, if described data cached for getting in described local disk, verifies described data cached validity;
First returns unit, if for described effectively data cached, directly returns described data cached;
4th acquiring unit, if for described data cached invalid, obtain described data cached in described data content caching server.
12. buffer memory acquisition device according to claim 10, wherein, described second acquisition device also comprises:
5th acquiring unit, if described data cached for not getting in described local disk, obtains described data cached in described data content caching server.
13. buffer memory acquisition device according to claim 11, wherein, verify that the mode of described data cached validity comprises following at least any one:
Described in-comparison, whether the data signature of data cached correspondence is consistent with the data signature in described local disk;
Whether the last modification time of the local disk file of data cached correspondence described in-comparison and the difference of current time be within the term of validity.
14. according to claim 10 to the buffer memory acquisition device according to any one of 13, and wherein, this buffer memory acquisition device also comprises:
First setting device, if described data cached for getting in described data content caching server, arranges described data cached in described local disk;
Second decision maker, if described data cached for not getting in described data content caching server, judges to obtain data cached failure;
6th acquisition device, if to delay machine for described data content caching server, obtains described data cached in described local disk.
15. buffer memory acquisition device according to claim 14, wherein, described 6th acquisition device also comprises:
Second returns unit, if described data cached for getting in described local disk, directly returns described data cached;
3rd identifying unit, if described data cached for not getting in described local disk, judges to obtain data cached failure.
16. buffer memory acquisition device according to claim 14, wherein, arrange local cache data and comprise following at least any one in described local disk:
-described data cached and corresponding data signature is write in the local disk file of described local disk;
-filemodetime of described local disk file is updated to current time stamp.
17. buffer memory acquisition device according to claim 10, wherein, this buffer memory acquisition device also comprises following at least any one:
Second setting device, data cached for arranging in described data content caching server;
3rd setting device, signs for setting data in described data signature caching server.
18. buffer memory acquisition device according to claim 10, wherein, this buffer memory acquisition device also comprises following at least any one:
First delete device, data cached for deleting in described data content caching server;
Second delete device, for deleting data signature in described data signature caching server.
CN201510689666.7A 2015-10-21 2015-10-21 It is a kind of to obtain data cached method and apparatus Active CN105353976B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510689666.7A CN105353976B (en) 2015-10-21 2015-10-21 It is a kind of to obtain data cached method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510689666.7A CN105353976B (en) 2015-10-21 2015-10-21 It is a kind of to obtain data cached method and apparatus

Publications (2)

Publication Number Publication Date
CN105353976A true CN105353976A (en) 2016-02-24
CN105353976B CN105353976B (en) 2018-09-07

Family

ID=55329955

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510689666.7A Active CN105353976B (en) 2015-10-21 2015-10-21 It is a kind of to obtain data cached method and apparatus

Country Status (1)

Country Link
CN (1) CN105353976B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106649566A (en) * 2016-11-14 2017-05-10 上海艾融软件股份有限公司 Serial number generation method and device
CN107819729A (en) * 2016-09-13 2018-03-20 腾讯科技(深圳)有限公司 A kind of data request method and its system, access device, storage device
CN109324858A (en) * 2018-09-20 2019-02-12 郑州云海信息技术有限公司 The acquisition methods and device of content are shown in webpage

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050114619A1 (en) * 2002-10-04 2005-05-26 Takashi Matsuo Data management system, data management method, virtual memory device, virtual memory control method, reader/writer device, ic module access device and ic module access control method
CN102035815A (en) * 2009-09-29 2011-04-27 华为技术有限公司 Data acquisition method, access node and data acquisition system
CN102196423A (en) * 2010-03-04 2011-09-21 腾讯科技(深圳)有限公司 Safety data transferring method and system
CN103491171A (en) * 2013-09-24 2014-01-01 成都金山数字娱乐科技有限公司 Network resource asynchronous loading method and device
CN103546439A (en) * 2012-07-16 2014-01-29 中兴通讯股份有限公司 Processing method and processing device for content requests
CN103714078A (en) * 2012-09-29 2014-04-09 百度在线网络技术(北京)有限公司 Method, system and device for providing update contents of web pages

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050114619A1 (en) * 2002-10-04 2005-05-26 Takashi Matsuo Data management system, data management method, virtual memory device, virtual memory control method, reader/writer device, ic module access device and ic module access control method
CN102035815A (en) * 2009-09-29 2011-04-27 华为技术有限公司 Data acquisition method, access node and data acquisition system
CN102196423A (en) * 2010-03-04 2011-09-21 腾讯科技(深圳)有限公司 Safety data transferring method and system
CN103546439A (en) * 2012-07-16 2014-01-29 中兴通讯股份有限公司 Processing method and processing device for content requests
CN103714078A (en) * 2012-09-29 2014-04-09 百度在线网络技术(北京)有限公司 Method, system and device for providing update contents of web pages
CN103491171A (en) * 2013-09-24 2014-01-01 成都金山数字娱乐科技有限公司 Network resource asynchronous loading method and device

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107819729A (en) * 2016-09-13 2018-03-20 腾讯科技(深圳)有限公司 A kind of data request method and its system, access device, storage device
CN107819729B (en) * 2016-09-13 2021-06-25 腾讯科技(深圳)有限公司 Data request method and system, access device, storage device and storage medium
US11128622B2 (en) 2016-09-13 2021-09-21 Tencent Technology (Shenzhen) Company Limited Method for processing data request and system therefor, access device, and storage device
CN106649566A (en) * 2016-11-14 2017-05-10 上海艾融软件股份有限公司 Serial number generation method and device
CN106649566B (en) * 2016-11-14 2019-10-15 上海艾融软件股份有限公司 A kind of sequence number generation method and device
CN109324858A (en) * 2018-09-20 2019-02-12 郑州云海信息技术有限公司 The acquisition methods and device of content are shown in webpage
CN109324858B (en) * 2018-09-20 2022-03-22 郑州云海信息技术有限公司 Method and device for acquiring display content in webpage

Also Published As

Publication number Publication date
CN105353976B (en) 2018-09-07

Similar Documents

Publication Publication Date Title
US20210160053A1 (en) Merkle tree construction methods and apparatuses and simplified payment verification methods and apparatuses
CN104102643B (en) A kind of method and apparatus for carrying out page snapshot
CN108153849B (en) Database table segmentation method, device, system and medium
US20210184837A1 (en) Methods and apparatuses for reading blockchain data
CN108683668B (en) Resource checking method, device, storage medium and equipment in content distribution network
CN110909025A (en) Database query method, query device and terminal
CN107911249B (en) Method, device and equipment for sending command line of network equipment
US8868857B2 (en) Managing remote data replication
KR100891325B1 (en) Key cache management method on TSS
CN106302595B (en) Method and equipment for carrying out health check on server
US10261908B2 (en) Method and apparatus for expanding cache size for cache array
CN108121559A (en) Configuration file method for pushing, server and storage medium
CN105630632A (en) Virtual machine recovery method and virtual machine management device
CN109445861A (en) System start method, device, computer installation and storage medium
US9804965B2 (en) Virtual machine host server apparatus and method for operating the same
US10007785B2 (en) Method and apparatus for implementing virtual machine introspection
CN106557278A (en) A kind of method of data cached persistence
CN107566392B (en) Detection method for error reporting type SQL injection, proxy server and storage medium
CN108881461A (en) A kind of data transmission method, apparatus and system
CN105353976A (en) Cache data acquisition method and apparatus
CN104111957A (en) Method and system for synchronizing distributed transaction
CN110069729B (en) Offline caching method and system for application
CN105550071A (en) System file upgrading and detecting method and communication device
CN108271420A (en) Manage method, file system and the server system of file
CN108200157B (en) Log synchronization method and device for triggering rollback by master node

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