CN106294607A - Data cached update method and updating device - Google Patents

Data cached update method and updating device Download PDF

Info

Publication number
CN106294607A
CN106294607A CN201610617685.3A CN201610617685A CN106294607A CN 106294607 A CN106294607 A CN 106294607A CN 201610617685 A CN201610617685 A CN 201610617685A CN 106294607 A CN106294607 A CN 106294607A
Authority
CN
China
Prior art keywords
data
buffer zone
cached
update
renewal
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.)
Pending
Application number
CN201610617685.3A
Other languages
Chinese (zh)
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.)
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201610617685.3A priority Critical patent/CN106294607A/en
Publication of CN106294607A publication Critical patent/CN106294607A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides data cached update method and updating device, the method includes: the data in monitor database update operation, when monitoring the first data and operation occurring to update, creates the process that buffer zone performs operation;By corresponding data cached with the first data that renewal operation occurs in data base in process-kill buffer zone;When receiving the data acquisition request for the first data, the first data after database lookup to corresponding renewal, and the first data after updating store to buffer zone.Technique scheme ensure that the data in data base and the concordance of the corresponding data of caching in buffer zone, ensure that user can get correct data in real time today;Meanwhile, when the renewal of mass data occurs, can avoid in frequent updating buffer zone corresponding data cached, reduce the consumption of system resource, improve the treatment effeciency of data, and promote the experience of user.

Description

Data cached update method and updating device
Technical field
The present invention relates to field of computer technology, specifically, the present invention relates to a kind of data cached update method, and A kind of data cached updating device.
Background technology
Along with the development of computer technology, the life of people is increasingly dependent on various application program, consequently also will Produce increasing data access operation, when data access amount is bigger when, in order to improve the speed of data access, some Large-scale, need the website frequently accessing data base generally to use distributed cache systems.
In prior art, the workflow of distributed cache systems is: when receiving request data, first examine Look into request data whether in memory cache, the most directly request data is returned to corresponding requesting party, no longer to data base Carry out any operation;If the data of request are not in memory cache, then to the data of search request in data base, data base In find the data of request after, from data base, obtain these data, and the data obtained from data base returned to accordingly Requesting party, simultaneously by a for data buffer storage in internal memory.But, when the data in data base occur to update, if in internal memory Be cached with former data, then when there being the request of correspondence, the former data remaining caching in internal memory of acquisition and new after non-update Data, thus the concordance of data cannot be ensured.
Summary of the invention
For overcoming above-mentioned technical problem or solving above-mentioned technical problem at least in part, the special techniques below scheme that proposes:
Embodiments of the invention propose a kind of data cached update method, are applied to include data base and buffer zone Database Systems in, the method includes:
Data in monitor database update operation, when monitoring the first data and operation occurring to update, create caching Region performs the process of operation;
By corresponding data cached with the first data that renewal operation occurs in data base in process-kill buffer zone;
The first number when receiving the data acquisition request for the first data, after database lookup to corresponding renewal According to, and will update after the first data store to buffer zone.
Preferably, when monitoring the first data and operation occurring to update, create the process that buffer zone is performed operation, bag Include:
When monitoring the first data and operation occurring to update, obtain the renewal feedback information for the first data;
According to updating feedback information, it is judged that whether the first data are updated successfully;
If so, the process that buffer zone is performed operation is created.
Preferably, delayed by corresponding with data base occurs the first data updating operation in process-kill buffer zone Deposit data, including:
According to data base occurs to update the identification information of the first data of operation, with the first data in lookup buffer zone The most data cached;
By corresponding data cached with the first data in process-kill buffer zone.
Preferably, delayed by corresponding with data base occurs the first data updating operation in process-kill buffer zone Deposit data, including:
After receiving the order of operation process, operation suspension process;
After predetermined time-out duration, run process, and update in data base by process-kill buffer zone First data of operation are the most data cached.
Preferably, when receiving the data acquisition request for the first data, after database lookup to corresponding renewal The first data, and will update after the first data store to buffer zone, including:
Identification information according to the first data, it is judged that whether be cached with the caching number corresponding with the first data in buffer zone According to;
If judging to obtain in buffer zone uncached corresponding with the first data data cached, then corresponding from database lookup Renewal after the first data, and the first data after the renewal that will find store to buffer zone.
Alternatively, data cached in buffer zone have the predetermined expired time cycle, and the method also includes:
According to the predetermined expired time cycle, it is judged that data cached the most expired in buffer zone;
When judge data cached expired time, delete out of date data cached.
Another embodiment of the present invention proposes a kind of data cached updating device, is applied to include data base and caching In the Database Systems in region, this device includes:
Monitoring and creation module, the data in monitor database update operation, occur more when monitoring the first data When newly operating, create the process that buffer zone is performed operation;
, for by there is to update the first number of operation with data base in process-kill buffer zone in the first removing module According to the most data cached;
More new module, in time receiving the data acquisition request for the first data, from database lookup to accordingly The first data after renewal, and will update after the first data store to buffer zone.
Preferably, monitoring and creation module include:
Acquiring unit, for when monitoring the first data and operation occurring to update, obtaining anti-for the renewal of the first data Feedforward information;
First judging unit, for according to updating feedback information, it is judged that whether the first data are updated successfully;
Creating unit, if for judging when the first data are updated successfully, creates the process that buffer zone performs operation.
Preferably, the first removing module includes:
Search unit, for according to data base occurs to update the identification information of the first data of operation, searching buffer area In territory corresponding data cached with the first data;
Delete unit, for by corresponding data cached with the first data in process-kill buffer zone.
Preferably, the first removing module includes:
Suspend unit, after the order receiving operation process, operation suspension process;
Run and delete unit, for after predetermined time-out duration, running process, and by process-kill buffer zone The first data updating operation are corresponding data cached with occurring in data base.
Preferably, more new module includes:
Whether the second judging unit, for according to the identification information of the first data, it is judged that be cached with in buffer zone and the Corresponding data cached of one data;
Search and updating block, if obtaining the uncached caching number corresponding with the first data in buffer zone for judgement According to, then the first data after database lookup updates accordingly, and the first data after the renewal that will find store to slow Deposit in region.
Alternatively, data cached in buffer zone have the predetermined expired time cycle, and this device also includes:
Judge module, for according to the predetermined expired time cycle, it is judged that data cached the most expired in buffer zone;
Second removing module, for when judge data cached expired time, delete out of date data cached.
In embodiments of the invention, it is proposed that a kind of data cached update scheme, the data in monitor database update Operation, when monitoring the first data and operation occurring to update, creates the process that buffer zone performs operation, passes through process-kill With that first data updating operation occur in data base is corresponding data cached in buffer zone, it is to avoid when the number in data base When updating according to generation, the situation that corresponding data is the legacy data not updated of caching in buffer zone, thus avoid user and obtain Get the data of mistake;When receiving the data acquisition request for the first data, after database lookup to corresponding renewal The first data, and will update after the first data store to buffer zone, it is ensured that the data in data base and buffer area The concordance of the corresponding data of caching in territory, thus ensure that user can get correct data in real time;Meanwhile, big when occurring During the renewal of amount data, can avoid in frequent updating buffer zone corresponding data cached, reduce the consumption of system resource, carry The treatment effeciency of high data, and promote the experience of user.
Aspect and advantage that the present invention adds will part be given in the following description, and these will become from the following description Obtain substantially, or recognized by the practice of the present invention.
Accompanying drawing explanation
The present invention above-mentioned and/or that add aspect and advantage will become from the following description of the accompanying drawings of embodiments Substantially with easy to understand, wherein:
Fig. 1 is the schematic flow sheet of the data cached update method of an embodiment in the present invention;
Fig. 2 is the structural representation of the data cached updating device of another embodiment in the present invention.
Detailed description of the invention
Embodiments of the invention are described below in detail, and the example of described embodiment is shown in the drawings, the most from start to finish Same or similar label represents same or similar element or has the element of same or like function.Below with reference to attached The embodiment that figure describes is exemplary, is only used for explaining the present invention, and is not construed as limiting the claims.
Those skilled in the art of the present technique are appreciated that unless expressly stated, singulative used herein " ", " Individual ", " described " and " being somebody's turn to do " may also comprise plural form.It is to be further understood that use in the description of the present invention arranges Diction " including " refers to there is described feature, integer, step, operation, element and/or assembly, but it is not excluded that existence or adds Other features one or more, integer, step, operation, element, assembly and/or their group.It should be understood that when we claim unit Part is " connected " or during " coupled " to another element, and it can be directly connected or coupled to other elements, or can also exist Intermediary element.Additionally, " connection " used herein or " coupling " can include wireless connections or wireless couple.Used herein arrange Diction "and/or" includes that one or more list the whole of item or any cell being associated combines with whole.
Those skilled in the art of the present technique are appreciated that unless otherwise defined, and all terms used herein (include technology art Language and scientific terminology), have with the those of ordinary skill in art of the present invention be commonly understood by identical meaning.Also should Be understood by, those terms defined in such as general dictionary, it should be understood that have with in the context of prior art The meaning that meaning is consistent, and unless by specific definitions as here, otherwise will not use idealization or the most formal implication Explain.
Fig. 1 is the schematic flow sheet of the data cached update method of an embodiment in the present invention;
In embodiments of the invention, the Description of content performed by each step is as follows:
Step S110: the data in monitor database update operation, when monitoring the first data and operation occurring to update, wound Build the process that buffer zone is performed operation;
Step S120: by corresponding with there are the first data updating operation in data base in process-kill buffer zone Data cached;
Step S130: when receiving the data acquisition request for the first data, updates to corresponding from database lookup After the first data, and will update after the first data store to buffer zone.
In embodiments of the invention, it is proposed that a kind of data cached update method, the data in monitor database update Operation, when monitoring the first data and operation occurring to update, creates the process that buffer zone performs operation, passes through process-kill With that first data updating operation occur in data base is corresponding data cached in buffer zone, it is to avoid when the number in data base When updating according to generation, the situation that corresponding data is the legacy data not updated of caching in buffer zone, thus avoid user and obtain Get the data of mistake;When receiving the data acquisition request for the first data, after database lookup to corresponding renewal The first data, and will update after the first data store to buffer zone, it is ensured that the data in data base and buffer area The concordance of the corresponding data of caching in territory, thus ensure that user can get correct data in real time;Meanwhile, big when occurring During the renewal of amount data, can avoid in frequent updating buffer zone corresponding data cached, reduce the consumption of system resource, carry The treatment effeciency of high data, and promote the experience of user.Do further below for implementing of each step Bright:
Step S110: the data in monitor database update operation, when monitoring the first data and operation occurring to update, wound Build the process that buffer zone is performed operation.
Specifically, the data in monitor database update operation, when monitoring the first data and operation occurring to update, create The first data in buffer zone are performed correspondence and updates the process of operation.
Such as, the renewal operation of the data in monitor database (Data Base, DB), when the data monitored in DB are sent out During raw renewal operation, create process, if process, process are for performing operation to buffer zone.
Preferably, in step S110 when monitoring the first data and operation occurring to update, create and buffer zone is performed behaviour The step of the process made farther includes step S111 (not shown), step S112 (not shown) and step S113 (not shown):
Step S111: when monitoring the first data and operation occurring to update, obtain the renewal feedback letter for the first data Breath;
Step S112: according to updating feedback information, it is judged that whether the first data are updated successfully;
Step S113: if so, create the process that buffer zone is performed operation.
Such as, by data base, such as DB, in trigger mechanism monitor database DB in the renewal operation of data, when When monitoring the renewal operation that data A in DB occur amendment, obtain the renewal feedback information for data A, as " being updated to Merit ", " it is updated successfully " according to updating feedback information, can determine whether that data A are updated successfully, after judging that data A are updated successfully, create Process process, process is for performing operation to buffer zone.
It should be noted that those skilled in the art are it can be appreciated that monitor database has different implementations, this Although the monitoring to data base can be realized in a particular manner bright, but this not limited.
Step S120: by corresponding with there are the first data updating operation in data base in process-kill buffer zone Data cached.
Such as, the renewal operation of the data in monitor database DB, when data A monitored in DB occur the renewal of amendment During operation, create process process, deleted in buffer zone by process process subsequently and update in database D B The corresponding data cached A ' of data A of operation.
Preferably, step S120 farther includes step S121 (not shown) and step S122 (not shown):
Step S121: according to there is to update the identification information of the first data of operation in data base, search in buffer zone Corresponding data cached with the first data;
Step S122: by corresponding data cached with the first data in process-kill buffer zone.
Such as, the renewal operation of the data in monitor database DB, when data A monitored in DB occur the renewal of amendment During operation, create process process;Subsequently according to database D B occurs to update the identification information of data A of operation, such as " ID =001 ", in buffer zone, in MC1, searching data identification information in MC1 is the data cached A ' of " ID=001 ";Subsequently, The data cached A ' in MC1 is deleted by process process.
In another preferred embodiment, step S120 farther includes step S123 (not shown) and step S124 (not shown):
Step S123: after receiving the order of operation process, operation suspension process;
Step S124: after predetermined time-out duration, runs process, and by process-kill buffer zone with in data base Occur the first data updating operation the most data cached.
Such as, the renewal operation of the data in monitor database DB, when data A monitored in DB occur the renewal of amendment During operation, create process process, find number in the MC1 of buffer zone according to the identification information " ID=001 " of data A in DB According to the data cached A ' that identification information is " ID=001 ", subsequent start-up runs the order of process process, when the clothes at MC1 place After business device receives the order of operation process process, operation suspension process process, at predetermined time-out duration, after 1 second, Rerun process process, and delete the data cached A ' in MC1 by process process.
By the present embodiment, whether the process that can dispatch any processor uses timeslice, the most currently there are and make By the process of processor, all can abandon taking the time of processor after predetermined time-out duration, therefore processor occupancy is relatively low, Improve the treatment effeciency of processor;Simultaneously, it is ensured that in data base first data update operation execution complete after perform again into Journey is deleted in buffer zone corresponding data cached with the first data that renewal operation occurs in data base, it is ensured that in data base The first data data cached concordance corresponding with buffer zone, it is to avoid because physics power-off or other factors cause number Update operation according to the first data in storehouse and be not carried out complete, and delete in buffer zone and occur to update the first of operation with data base The situation that data are the most data cached.
Step S130: when receiving the data acquisition request for the first data, updates to corresponding from database lookup After the first data, and will update after the first data store to buffer zone.
Specifically, when receiving the data acquisition request that client application sends for the first data, from data base Find the first data after corresponding renewal, and the first data after updating store to buffer zone.
Preferably, step S130 farther includes step S131 (not shown) and step S132 (not shown):
Step S131: according to the identification information of the first data, it is judged that whether be cached with in buffer zone and the first data pair That answers is data cached;
Step S132: if judging to obtain in buffer zone uncached corresponding with the first data data cached, then from data Library lookup update accordingly after the first data, and the first data after the renewal that will find store to buffer zone.
Such as, receive client application, such as APP1, when sending the data acquisition request for data A, foundation number Identification information " ID=001 " according to A, it is judged that whether being cached with the identification information corresponding with data A in the MC1 of buffer zone is " ID =001 " data cached A ';When judging to obtain the uncached data cached A ' corresponding with data A in MC1, then from database D B Middle lookup identification information is data A after the renewal of " ID=001 ", and will update after data A store to MC1, subsequently, Corresponding data cached A ' is sent to APP1 by MC1.
In a preferred embodiment, data cached in buffer zone have the predetermined expired time cycle, and the method is also wrapped Include step S140 (not shown) and step S150 (not shown):
Step S140 is according to the predetermined expired time cycle, it is judged that data cached the most expired in buffer zone;
Step S150: when judge data cached expired time, delete out of date data cached.
Such as, data cached in the MC1 of buffer zone have the predetermined expired time cycle, such as 5 minutes, caches in MC1 While data, add data cached timestamp information, while A ' data cached in MC1, add data cached A ' Timestamp information " 2016-07-20 12:00 ", according to the predetermined method checking stale data, as judged one every 5 minutes In secondary MC1, the data of caching are the most expired, such as the operation of start-up check stale data when " 2016-07-20 12:01 ", according to In 5 minutes predetermined expired time cycles, can determine whether that the data cached A in MC1 is not out of date;Subsequently at " 2016-07-20 12:06 " Time start-up check stale data operation, believe according to the timestamp in 5 minutes and data cached A ' predetermined expired time cycle Breath " 2016-07-20 12:00 ", can determine whether that the data cached A ' in MC1 is expired, deletes data cached A ' out of date subsequently.
In a concrete application scenarios, user, when " 2016-07-20 13:00:01 ", buys 5 by electricity business website Commodity B, the price of sole product B is 100 yuans, and now the discount information of electricity business website is 5 foldings, and user is electricity business subsequently Have selected the business website offer of exchange electricity in cart page corresponding with this user in website is of use certificate, at " 2016-07-20 13:00:10 " time, user clicks on " confirming to buy " button, and the server of electricity business website receives the purchase request of user subsequently After, calculate user and can use the operation such as amount size being of use certificate, calculated and determined that time of the amount being of use certificate is " 2016-07-20 13:00:10.05 ", simultaneously electricity business website when " 2016-07-20 13:00:10.01 " by discount information by 5 foldings are revised as 7 foldings, when there is to update operation in discount information data discount monitored in database D B1, and subsequent start-up The order of operation process process1, after the server at MC2 place receives the order of operation process process1, suspends fortune Traveling journey process1, at predetermined time-out duration, after 3 milliseconds, i.e. reruns when " 2016-07-20 13:00:10.03 " Process process1, and the discount information number operated in MC2 is deleted with generation renewal in database D B1 by process process1 According to the corresponding data cached discount ' of discount, the discount ' value now deleted is " 5 folding ";When calculating completes to determine After being of use the amount of certificate, when " 2016-07-20 13:00:10.05 ", according to the identification information of discount in DB1, such as " ID =002 ", it is judged that MC2 does not exist caching discount information data discount that identification information is " ID=002 " ', then from data Storehouse DB1 searches discount information data discount that identification information is " ID=002 ", and the value of discount is 7 foldings, and will search To renewal after discount information data discount store to MC2, subsequently, MC2 is by data cached discount ', now Discount ' value is " 7 folding ", sends the electric business website logged in user, show that user confirms an order the page of information subsequently, this Showing in the page that user buys 5 B goods amount is 350 yuans.
Fig. 2 is the structural representation of the data cached updating device of another embodiment in the present invention.
In embodiments of the invention, the Description of content performed by each module is as follows:
Data in monitoring and creation module 210 monitor database update operation, update when monitoring the first data During operation, create the process that buffer zone is performed operation;
By there are to update the first data of operation with data base in process-kill buffer zone in the first removing module 220 The most data cached;
When more new module 230 receives the data acquisition request for the first data, from database lookup to the most more The first data after Xin, and will update after the first data store to buffer zone.
In embodiments of the invention, it is proposed that a kind of data cached updating device, the data in monitor database update Operation, when monitoring the first data and operation occurring to update, creates the process that buffer zone performs operation, passes through process-kill With that first data updating operation occur in data base is corresponding data cached in buffer zone, it is to avoid when the number in data base When updating according to generation, the situation that corresponding data is the legacy data not updated of caching in buffer zone, thus avoid user and obtain Get the data of mistake;When receiving the data acquisition request for the first data, after database lookup to corresponding renewal The first data, and will update after the first data store to buffer zone, it is ensured that the data in data base and buffer area The concordance of the corresponding data of caching in territory, thus ensure that user can get correct data in real time;Meanwhile, big when occurring During the renewal of amount data, can avoid in frequent updating buffer zone corresponding data cached, reduce the consumption of system resource, carry The treatment effeciency of high data, and promote the experience of user.Do further below for implementing of modules Bright:
Data in monitoring and creation module 210 monitor database update operation, update when monitoring the first data During operation, create the process that buffer zone is performed operation.
Specifically, the data in monitor database update operation, when monitoring the first data and operation occurring to update, create The first data in buffer zone are performed correspondence and updates the process of operation.
Such as, monitor database, such as DB, in the renewal operation of data, when the data monitored in DB occur to update behaviour When making, create process, if process, process are for performing operation to buffer zone.
Preferably, monitoring and creation module 210 farther include acquiring unit (not shown), the first judging unit (not shown) and creating unit (not shown):
Acquiring unit, when monitoring the first data and operation occurring to update, obtains the renewal feedback letter for the first data Breath;
First judging unit is according to updating feedback information, it is judged that whether the first data are updated successfully;
If judging when the first data are updated successfully, creating unit creates the process that buffer zone performs operation.
Such as, by data base, such as DB, in trigger mechanism monitor database DB in the renewal operation of data, when When monitoring the renewal operation that data A in DB occur amendment, obtain the renewal feedback information for data A, as " being updated to Merit ", " it is updated successfully " according to updating feedback information, can determine whether that data A are updated successfully, after judging that data A are updated successfully, create Process process, process is for performing operation to buffer zone.
It should be noted that those skilled in the art are it can be appreciated that monitor database has different implementations, this Although the monitoring to data base can be realized in a particular manner bright, but this not limited.
By there are to update the first data of operation with data base in process-kill buffer zone in the first removing module 220 The most data cached.
Such as, the renewal operation of the data in monitor database DB, when data A monitored in DB occur the renewal of amendment During operation, create process process, deleted in buffer zone by process process subsequently and update in database D B The corresponding data cached A ' of data A of operation.
Preferably, the first removing module 220 farther includes search unit (not shown) and delete unit (in figure not Illustrate):
Search unit according to data base occurs to update the identification information of the first data of operation, search in buffer zone with First data are the most data cached;
Delete unit by corresponding data cached with the first data in process-kill buffer zone.
Such as, the renewal operation of the data in monitor database DB, when data A monitored in DB occur the renewal of amendment During operation, create process process;Subsequently according to database D B occurs to update the identification information of data A of operation, such as " ID =001 ", in buffer zone, in MC1, searching data identification information in MC1 is the data cached A ' of " ID=001 ";Subsequently, The data cached A ' in MC1 is deleted by process process.
In another preferred embodiment, the first removing module 220 farther includes to suspend unit (not shown) and fortune Row and deletion unit (not shown):
After suspending the order that unit receives operation process, operation suspension process;
Run and delete unit after predetermined time-out duration, run process, and by process-kill buffer zone with number According to occurring in storehouse, the first data updating operation are the most data cached.
Such as, the renewal operation of the data in monitor database DB, when data A monitored in DB occur the renewal of amendment During operation, create process process, find number in the MC1 of buffer zone according to the identification information " ID=001 " of data A in DB According to the data cached A ' that identification information is " ID=001 ", subsequent start-up runs the order of process process, when the clothes at MC1 place After business device receives the order of operation process process, operation suspension process process, at predetermined time-out duration, after 1 second, Rerun process process, and delete the data cached A ' in MC1 by process process.
By the present embodiment, whether the process that can dispatch any processor uses timeslice, the most currently there are and make By the process of processor, all can abandon taking the time of processor after predetermined time-out duration, therefore processor occupancy is relatively low, Improve the treatment effeciency of processor;Simultaneously, it is ensured that in data base first data update operation execution complete after perform again into Journey is deleted in buffer zone corresponding data cached with the first data that renewal operation occurs in data base, it is ensured that in data base The first data data cached concordance corresponding with buffer zone, it is to avoid because physics power-off or other factors cause number Update operation according to the first data in storehouse and be not carried out complete, and delete in buffer zone and occur to update the first of operation with data base The situation that data are the most data cached.
When more new module 230 receives the data acquisition request for the first data, from database lookup to the most more The first data after Xin, and will update after the first data store to buffer zone.
Specifically, when receiving the data acquisition request that client application sends for the first data, from data base Find the first data after corresponding renewal, and the first data after updating store to buffer zone.
Preferably, more new module 230 farther includes the second judging unit (not shown) and lookup and updating block (not shown):
Whether the second judging unit is according to the identification information of the first data, it is judged that be cached with in buffer zone and the first data Corresponding is data cached;
If searching and updating block judging to obtain in buffer zone uncached corresponding with the first data data cached, then from Database lookup update accordingly after the first data, and the first data after the renewal that will find store to buffer zone In.
Such as, receive client application, such as APP1, when sending the data acquisition request for data A, foundation number Identification information " ID=001 " according to A, it is judged that whether being cached with the identification information corresponding with data A in the MC1 of buffer zone is " ID =001 " data cached A ';When judging to obtain the uncached data cached A ' corresponding with data A in MC1, then from database D B Middle lookup identification information is data A after the renewal of " ID=001 ", and will update after data A store to MC1, subsequently, Corresponding data cached A ' is sent to APP1 by MC1.
In a preferred embodiment, data cached in buffer zone have the predetermined expired time cycle, and this device also wraps Include judge module (not shown) and the second removing module (not shown):
Judge module is according to the predetermined expired time cycle, it is judged that data cached the most expired in buffer zone;
Second removing module when judge data cached expired time, delete out of date data cached.
Such as, data cached in the MC1 of buffer zone have the predetermined expired time cycle, such as 5 minutes, caches in MC1 While data, add data cached timestamp information, while A ' data cached in MC1, add data cached A ' Timestamp information " 2016-07-20 12:00 ", according to the predetermined method checking stale data, as judged one every 5 minutes In secondary MC1, the data of caching are the most expired, such as the operation of start-up check stale data when " 2016-07-20 12:01 ", according to In 5 minutes predetermined expired time cycles, can determine whether that the data cached A in MC1 is not out of date;Subsequently at " 2016-07-20 12:06 " Time start-up check stale data operation, believe according to the timestamp in 5 minutes and data cached A ' predetermined expired time cycle Breath " 2016-07-20 12:00 ", can determine whether that the data cached A ' in MC1 is expired, deletes data cached A ' out of date subsequently.
In a concrete application scenarios, user, when " 2016-07-20 13:00:01 ", buys 5 by electricity business website Commodity B, the price of sole product B is 100 yuans, and now the discount information of electricity business website is 5 foldings, and user is electricity business subsequently Have selected the business website offer of exchange electricity in cart page corresponding with this user in website is of use certificate, at " 2016-07-20 13:00:10 " time, user clicks on " confirming to buy " button, and the server of electricity business website receives the purchase request of user subsequently After, calculate user and can use the operation such as amount size being of use certificate, calculated and determined that time of the amount being of use certificate is " 2016-07-20 13:00:10.05 ", simultaneously electricity business website when " 2016-07-20 13:00:10.01 " by discount information by 5 foldings are revised as 7 foldings, when there is to update operation in discount information data discount monitored in database D B1, and subsequent start-up The order of operation process process1, after the server at MC2 place receives the order of operation process process1, suspends fortune Traveling journey process1, at predetermined time-out duration, after 3 milliseconds, i.e. reruns when " 2016-07-20 13:00:10.03 " Process process1, and the discount information number operated in MC2 is deleted with generation renewal in database D B1 by process process1 According to the corresponding data cached discount ' of discount, the discount ' value now deleted is " 5 folding ";When calculating completes to determine After being of use the amount of certificate, when " 2016-07-20 13:00:10.05 ", according to the identification information of discount in DB1, such as " ID =002 ", it is judged that MC2 does not exist caching discount information data discount that identification information is " ID=002 " ', then from data Storehouse DB1 searches discount information data discount that identification information is " ID=002 ", and the value of discount is 7 foldings, and will search To renewal after discount information data discount store to MC2, subsequently, MC2 is by data cached discount ', now Discount ' value is " 7 folding ", sends the electric business website logged in user, show that user confirms an order the page of information subsequently, this Showing in the page that user buys 5 B goods amount is 350 yuans.
Those skilled in the art of the present technique are appreciated that the present invention includes relating to perform in operation described herein One or more equipment.These equipment can be required purpose and specialized designs and manufacture, or can also include general Known device in computer.These equipment have storage computer program within it, and these computer programs are optionally Activate or reconstruct.Such computer program can be stored in equipment (such as, computer) computer-readable recording medium or be stored in In being suitable to store e-command and be coupled to any kind of medium of bus respectively, described computer-readable medium include but not Be limited to any kind of dish (including floppy disk, hard disk, CD, CD-ROM and magneto-optic disk), ROM (Read-Only Memory, only Read memorizer), RAM (Random Access Memory, memorizer immediately), EPROM (Erasable Programmable Read-Only Memory, Erarable Programmable Read only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory, EEPROM), flash memory, magnetic card or light line card Sheet.It is, computer-readable recording medium includes by equipment (such as, computer) with the form storage that can read or any Jie of transmission information Matter.
Those skilled in the art of the present technique be appreciated that can with computer program instructions realize these structure charts and/or The combination of the frame in each frame in block diagram and/or flow graph and these structure charts and/or block diagram and/or flow graph.This technology is led Field technique personnel be appreciated that these computer program instructions can be supplied to general purpose computer, special purpose computer or other The processor of programmable data processing method realizes, thus by computer or the process of other programmable data processing methods Device performs the scheme specified in structure chart disclosed by the invention and/or block diagram and/or the frame of flow graph or multiple frame.
Those skilled in the art of the present technique be appreciated that the various operations discussed in the present invention, method, in flow process Step, measure, scheme can be replaced, changed, combined or deleted.Further, there is discussed in the present invention each Other steps in kind operation, method, flow process, measure, scheme can also be replaced, changed, reset, decomposed, combined or deleted. Further, of the prior art have and the step in the various operations disclosed in the present invention, method, flow process, measure, scheme Can also be replaced, changed, reset, decomposed, combined or deleted.
The above is only the some embodiments of the present invention, it is noted that for the ordinary skill people of the art For Yuan, under the premise without departing from the principles of the invention, it is also possible to make some improvements and modifications, these improvements and modifications also should It is considered as protection scope of the present invention.

Claims (10)

1. a data cached update method, be applied to include data base with in the Database Systems of buffer zone, the method Including:
Data in monitor database update operation, when monitoring the first data and operation occurring to update, create buffer zone Perform the process of operation;
By corresponding with described data base occurs the first data updating operation in buffer zone described in described process-kill Data cached;
The first number when receiving the data acquisition request for the first data, after described database lookup to corresponding renewal According to, and will update after the first data store to buffer zone.
Method the most according to claim 1, wherein, when monitoring the first data and operation occurring to update, creates caching Region performs the process of operation, including:
When monitoring the first data and operation occurring to update, obtain the renewal feedback information for described first data;
According to described renewal feedback information, it is judged that whether described first data are updated successfully;
If so, the process that buffer zone is performed operation is created.
Method the most according to claim 1 and 2, wherein, by buffer zone described in described process-kill with described number According to occurring in storehouse, the first data updating operation are the most data cached, including:
According to described data base occurs to update the identification information of the first data of operation, search in described buffer zone with described First data are the most data cached;
By corresponding data cached with described first data in buffer zone described in described process-kill.
4. according to the method described in any one of claim 1-3, wherein, by buffer zone described in described process-kill with institute State and data base occurs the first data updating operation the most data cached, including:
Receive after running the order of described process, process described in operation suspension;
After predetermined time-out duration, run described process, and by buffer zone described in described process-kill with described data Storehouse occur the first data updating operation the most data cached.
5. according to the method described in any one of claim 1-4, wherein, receive the data acquisition request for the first data Time, the first data after described database lookup to corresponding renewal, and the first data after updating store to buffer area In territory, including:
Identification information according to described first data, it is judged that whether be cached with corresponding with described first data in described buffer zone Data cached;
If judging to obtain corresponding data cached, then from described data base of uncached and described first data in described buffer zone Search the first data after corresponding renewal, and the first data after the renewal that will find store to buffer zone.
6. according to the method described in any one of claim 1-5, wherein, in buffer zone data cached have predetermined expired time Between the cycle, the method also includes:
According to the described predetermined expired time cycle, it is judged that data cached the most expired in buffer zone;
When judge data cached expired time, delete out of date data cached.
7. a data cached updating device, be applied to include data base with in the Database Systems of buffer zone, this device Including:
Monitoring and creation module, the data in monitor database update operation, occur to update behaviour when monitoring the first data When making, create the process that buffer zone is performed operation;
First removing module, for by occurring to update operation with described data base in buffer zone described in described process-kill The first data the most data cached;
More new module, in time receiving the data acquisition request for the first data, from described database lookup to accordingly The first data after renewal, and will update after the first data store to buffer zone.
Device the most according to claim 7, wherein, described monitoring and creation module include:
Acquiring unit, for when monitoring the first data and operation occurring to update, obtaining anti-for the renewal of described first data Feedforward information;
First judging unit, for according to described renewal feedback information, it is judged that whether described first data are updated successfully;
Creating unit, when described first data are updated successfully, creates the process that buffer zone performs operation.
9. according to the device described in claim 7 or 8, wherein, described first removing module includes:
Search unit, for according to described data base occurs to update the identification information of the first data of operation, search described slow Deposit in region corresponding data cached with described first data;
Delete unit, for by corresponding data cached with described first data in buffer zone described in described process-kill.
10. according to the device described in any one of claim 7-9, wherein, described first removing module includes:
Suspend unit, after receiving the order running described process, process described in operation suspension;
Run and delete unit, for after predetermined time-out duration, running described process, and by slow described in described process-kill Deposit in region corresponding data cached with the first data that renewal operation occurs in described data base.
CN201610617685.3A 2016-07-29 2016-07-29 Data cached update method and updating device Pending CN106294607A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610617685.3A CN106294607A (en) 2016-07-29 2016-07-29 Data cached update method and updating device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610617685.3A CN106294607A (en) 2016-07-29 2016-07-29 Data cached update method and updating device

Publications (1)

Publication Number Publication Date
CN106294607A true CN106294607A (en) 2017-01-04

Family

ID=57663492

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610617685.3A Pending CN106294607A (en) 2016-07-29 2016-07-29 Data cached update method and updating device

Country Status (1)

Country Link
CN (1) CN106294607A (en)

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107085603A (en) * 2017-03-31 2017-08-22 北京奇艺世纪科技有限公司 A kind of data processing method and device
CN107483640A (en) * 2017-09-25 2017-12-15 山东浪潮云服务信息科技有限公司 A kind of buffering updating method, server and operation system
CN108829713A (en) * 2018-05-04 2018-11-16 华为技术有限公司 Distributed cache system, cache synchronization method and device
CN108846052A (en) * 2018-05-31 2018-11-20 郑州云海信息技术有限公司 A kind of browser caching data update method and relevant apparatus
CN109144992A (en) * 2017-06-15 2019-01-04 北京京东尚科信息技术有限公司 A kind of method and apparatus of data storage
CN109597724A (en) * 2018-09-18 2019-04-09 北京微播视界科技有限公司 Service stability measurement method, device, computer equipment and storage medium
CN110008224A (en) * 2019-03-08 2019-07-12 阿里巴巴集团控股有限公司 A kind of db transaction processing method and processing device
CN110166553A (en) * 2019-05-22 2019-08-23 苏州浪潮智能科技有限公司 A kind of data access method, device, equipment and readable storage medium storing program for executing
CN110347545A (en) * 2019-05-21 2019-10-18 深圳壹账通智能科技有限公司 A kind of test method and device of business platform cache policy
CN110427386A (en) * 2019-08-05 2019-11-08 广州华多网络科技有限公司 Data processing method, device and computer storage medium
CN110633299A (en) * 2019-08-19 2019-12-31 中国平安财产保险股份有限公司 Business data caching method and device, computer equipment and storage medium
CN110851856A (en) * 2019-10-12 2020-02-28 福建天泉教育科技有限公司 Cache data acquisition method and computer-readable storage medium
CN111078717A (en) * 2019-12-20 2020-04-28 深圳前海环融联易信息科技服务有限公司 Database and cache consistency synchronization method and device, computer equipment and storage medium
CN111125138A (en) * 2019-12-26 2020-05-08 深圳前海环融联易信息科技服务有限公司 Method, device, computer equipment and storage medium for polling data
CN111221828A (en) * 2018-11-26 2020-06-02 福建省华渔教育科技有限公司 Method and terminal for improving consistency of database data and cache data
CN111382180A (en) * 2020-03-11 2020-07-07 网易(杭州)网络有限公司 Data clearing method and device for local cache
CN111597402A (en) * 2020-05-21 2020-08-28 北京字节跳动网络技术有限公司 Method and device for updating graph index data, electronic equipment and storage medium
CN111651520A (en) * 2020-05-25 2020-09-11 北京字节跳动网络技术有限公司 Cache architecture access method, device, medium and electronic equipment
CN111881167A (en) * 2020-07-22 2020-11-03 苏州浪潮智能科技有限公司 Method for acquiring fan state

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102073494A (en) * 2010-12-30 2011-05-25 用友软件股份有限公司 Method and device for managing cache data
CN102117309A (en) * 2010-01-06 2011-07-06 卓望数码技术(深圳)有限公司 Data caching system and data query method
CN102142971A (en) * 2010-01-29 2011-08-03 新奥特(北京)视频技术有限公司 Monitoring system and monitoring method for realizing subscription-collection mechanism
CN103218724A (en) * 2013-04-18 2013-07-24 北京京东尚科信息技术有限公司 System and method for providing information updating in communication network
CN103237060A (en) * 2013-04-08 2013-08-07 北京小米科技有限责任公司 Method, device and system for data object acquisition
CN103336849A (en) * 2013-07-24 2013-10-02 昆明理工大学 Method and device for increasing retrieval speed in database retrieval system
CN103488684A (en) * 2013-08-23 2014-01-01 国家电网公司 Electricity reliability index rapid calculation method based on caching data multithread processing
CN103530349A (en) * 2013-09-30 2014-01-22 乐视致新电子科技(天津)有限公司 Method and equipment for cache updating
CN104391862A (en) * 2014-10-23 2015-03-04 北京锐安科技有限公司 Method and device for updating cache data
CN104537119A (en) * 2015-01-26 2015-04-22 浪潮通信信息系统有限公司 Update method of cache data, data use terminal and system
CN104980455A (en) * 2014-04-02 2015-10-14 腾讯科技(深圳)有限公司 Multi-terminal data synchronization method based on cloud storage, device and system thereof
CN105095354A (en) * 2015-06-19 2015-11-25 北京奇虎科技有限公司 Data updating method and data updating device
CN105608159A (en) * 2015-12-18 2016-05-25 北京奇虎科技有限公司 Data caching method and device

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102117309A (en) * 2010-01-06 2011-07-06 卓望数码技术(深圳)有限公司 Data caching system and data query method
CN102142971A (en) * 2010-01-29 2011-08-03 新奥特(北京)视频技术有限公司 Monitoring system and monitoring method for realizing subscription-collection mechanism
CN102073494A (en) * 2010-12-30 2011-05-25 用友软件股份有限公司 Method and device for managing cache data
CN103237060A (en) * 2013-04-08 2013-08-07 北京小米科技有限责任公司 Method, device and system for data object acquisition
CN103218724A (en) * 2013-04-18 2013-07-24 北京京东尚科信息技术有限公司 System and method for providing information updating in communication network
CN103336849A (en) * 2013-07-24 2013-10-02 昆明理工大学 Method and device for increasing retrieval speed in database retrieval system
CN103488684A (en) * 2013-08-23 2014-01-01 国家电网公司 Electricity reliability index rapid calculation method based on caching data multithread processing
CN103530349A (en) * 2013-09-30 2014-01-22 乐视致新电子科技(天津)有限公司 Method and equipment for cache updating
CN104980455A (en) * 2014-04-02 2015-10-14 腾讯科技(深圳)有限公司 Multi-terminal data synchronization method based on cloud storage, device and system thereof
CN104391862A (en) * 2014-10-23 2015-03-04 北京锐安科技有限公司 Method and device for updating cache data
CN104537119A (en) * 2015-01-26 2015-04-22 浪潮通信信息系统有限公司 Update method of cache data, data use terminal and system
CN105095354A (en) * 2015-06-19 2015-11-25 北京奇虎科技有限公司 Data updating method and data updating device
CN105608159A (en) * 2015-12-18 2016-05-25 北京奇虎科技有限公司 Data caching method and device

Cited By (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107085603B (en) * 2017-03-31 2020-04-03 北京奇艺世纪科技有限公司 Data processing method and device
CN107085603A (en) * 2017-03-31 2017-08-22 北京奇艺世纪科技有限公司 A kind of data processing method and device
CN109144992A (en) * 2017-06-15 2019-01-04 北京京东尚科信息技术有限公司 A kind of method and apparatus of data storage
CN107483640A (en) * 2017-09-25 2017-12-15 山东浪潮云服务信息科技有限公司 A kind of buffering updating method, server and operation system
CN108829713A (en) * 2018-05-04 2018-11-16 华为技术有限公司 Distributed cache system, cache synchronization method and device
CN108846052A (en) * 2018-05-31 2018-11-20 郑州云海信息技术有限公司 A kind of browser caching data update method and relevant apparatus
CN109597724A (en) * 2018-09-18 2019-04-09 北京微播视界科技有限公司 Service stability measurement method, device, computer equipment and storage medium
CN109597724B (en) * 2018-09-18 2022-11-04 北京微播视界科技有限公司 Service stability measuring method, device, computer equipment and storage medium
CN111221828A (en) * 2018-11-26 2020-06-02 福建省华渔教育科技有限公司 Method and terminal for improving consistency of database data and cache data
CN110008224A (en) * 2019-03-08 2019-07-12 阿里巴巴集团控股有限公司 A kind of db transaction processing method and processing device
CN110008224B (en) * 2019-03-08 2023-08-11 创新先进技术有限公司 Database transaction processing method and device
CN110347545A (en) * 2019-05-21 2019-10-18 深圳壹账通智能科技有限公司 A kind of test method and device of business platform cache policy
CN110166553A (en) * 2019-05-22 2019-08-23 苏州浪潮智能科技有限公司 A kind of data access method, device, equipment and readable storage medium storing program for executing
CN110427386B (en) * 2019-08-05 2023-09-19 广州方硅信息技术有限公司 Data processing method, device and computer storage medium
CN110427386A (en) * 2019-08-05 2019-11-08 广州华多网络科技有限公司 Data processing method, device and computer storage medium
CN110633299A (en) * 2019-08-19 2019-12-31 中国平安财产保险股份有限公司 Business data caching method and device, computer equipment and storage medium
CN110851856A (en) * 2019-10-12 2020-02-28 福建天泉教育科技有限公司 Cache data acquisition method and computer-readable storage medium
CN110851856B (en) * 2019-10-12 2021-10-08 福建天泉教育科技有限公司 Cache data acquisition method and computer-readable storage medium
CN111078717A (en) * 2019-12-20 2020-04-28 深圳前海环融联易信息科技服务有限公司 Database and cache consistency synchronization method and device, computer equipment and storage medium
CN111125138A (en) * 2019-12-26 2020-05-08 深圳前海环融联易信息科技服务有限公司 Method, device, computer equipment and storage medium for polling data
CN111125138B (en) * 2019-12-26 2023-08-25 深圳前海环融联易信息科技服务有限公司 Method, device, computer equipment and storage medium for polling query data
CN111382180A (en) * 2020-03-11 2020-07-07 网易(杭州)网络有限公司 Data clearing method and device for local cache
CN111382180B (en) * 2020-03-11 2024-04-26 网易(杭州)网络有限公司 Data clearing method and device for local cache
CN111597402A (en) * 2020-05-21 2020-08-28 北京字节跳动网络技术有限公司 Method and device for updating graph index data, electronic equipment and storage medium
CN111651520B (en) * 2020-05-25 2023-04-18 北京字节跳动网络技术有限公司 Cache architecture access method, device, medium and electronic equipment
CN111651520A (en) * 2020-05-25 2020-09-11 北京字节跳动网络技术有限公司 Cache architecture access method, device, medium and electronic equipment
CN111881167A (en) * 2020-07-22 2020-11-03 苏州浪潮智能科技有限公司 Method for acquiring fan state
CN111881167B (en) * 2020-07-22 2022-12-27 苏州浪潮智能科技有限公司 Method for acquiring fan state

Similar Documents

Publication Publication Date Title
CN106294607A (en) Data cached update method and updating device
CN108133008B (en) Method, device, equipment and storage medium for processing service data in database
CN103677664B (en) Method and data handling system for on-demand caching
US20090300065A1 (en) Computer system and methods for improving identification of subrogation opportunities
US9195773B2 (en) Structure-based adaptive document caching
JP6185917B2 (en) Efficient cache management in a cluster
CN106610854A (en) Model update method and device
US11567681B2 (en) Method and system for synchronizing requests related to key-value storage having different portions
TW200426625A (en) A transparent edge-of-network data cache
CN109710228A (en) A kind of middleware engine frame system can be applied to electric business B2B transaction platform
US11748357B2 (en) Method and system for searching a key-value storage
CN106354732B (en) A kind of off-line data version conflict solution for supporting concurrently to cooperate with
CN113449753B (en) Service risk prediction method, device and system
CN110020310A (en) Method, apparatus, terminal and the storage medium of resource load
US9646016B2 (en) Methods circuits apparatuses systems and associated computer executable code for data deduplication
CN102929943A (en) Data output method and device
CN103618761B (en) Method and browser for processing cookie information
CN110209510B (en) Data processing method and device for social contact
CN110851708A (en) Negative sample extraction method and device, computer equipment and storage medium
CN107004036A (en) Method and system to search for the daily record for including a large amount of entries
CN114840559A (en) Travel product query and model training method, device, equipment and storage medium
CN114944942A (en) Data reporting method and device based on effective buried points, computer equipment and medium
JP7251462B2 (en) Information processing method, information processing device, information processing program, history reference program
CN116107801A (en) Transaction processing method and related product
CN105389399A (en) Method and device for managing meta-information of database cluster

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20170104

RJ01 Rejection of invention patent application after publication