CN107291779A - Data cached management method and device - Google Patents
Data cached management method and device Download PDFInfo
- Publication number
- CN107291779A CN107291779A CN201610224699.9A CN201610224699A CN107291779A CN 107291779 A CN107291779 A CN 107291779A CN 201610224699 A CN201610224699 A CN 201610224699A CN 107291779 A CN107291779 A CN 107291779A
- Authority
- CN
- China
- Prior art keywords
- data cached
- altering event
- data
- event type
- strategy
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
- G06F16/24552—Database cache management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Software Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a kind of data cached management method and device, methods described includes:Obtain and altering event type is included in databases comparison event message, the altering event message;Based on the altering event message and data cached configuration information, it is determined that data cached with the altering event information matches;Determined to be directed to acquired data cached management strategy according to the altering event type;Data cached handled to described according to identified management strategy.The present invention is updated corresponding data cached by obtaining databases comparison event message so that the change of database and the asynchronous progress of corresponding cache management, it is possible to decrease be synchronously written the complexity of database, improve the availability of caching.
Description
Technical field
The present embodiments relate to microcomputer data processing field, more particularly to a kind of data cached management
Method and device.
Background technology
With developing rapidly for scientific and technological and Internet technology, a kind of new commercial operation pattern i.e. electricity is occurred in that
Sub- commercial affairs, ecommerce is under the network environment that internet is opened, based on browser/server application mode,
Both parties carry out various commercial activities with not meeting, realize the net between the shopping online of consumer, trade company
Upper transaction and online e-payment and various commercial activitys, transaction, finance activities and related synthesis
Service activity.
E-commerce platform common at present includes Baidu's take-away, Baidu's glutinous rice etc., with e-commerce user
Increase, the attribute information for the product data that e-commerce platform is managed also increases severely therewith, ecommerce put down
Platform also becomes increasingly complex when managing these data.In order that user more quickly obtains product data,
Generally part objects data are placed in the buffer, user is directly obtained in acquisition from caching.
Therefore, in the prior art, in order to allow users to the real-time last state for reading product data,
When product data write into Databasce, while updating corresponding product data in caching.That is,
When current item data are changed, corresponding article number in caching is also updated while storehouse is updated the data
According to.With growing stronger day by day, it is necessary to the number of articles of restocking is also rapidly increasing for ecommerce, synchronous write
The operation for entering database is more complicated, likewise, frequently being operated to caching, makes effective profit of caching
With rate than relatively low.
The content of the invention
The present invention provides a kind of data cached management method and device, to improve Buffer Utilization.
In a first aspect, the embodiments of the invention provide a kind of data cached management method, including:
Obtain and altering event type is included in databases comparison event message, the altering event message;
Based on the altering event message and data cached configuration information, it is determined that disappearing with the altering event
It is data cached that manner of breathing is matched;
Determined to be directed to acquired data cached management strategy according to the altering event type;
Data cached handled to described according to identified management strategy.
Second aspect, the embodiment of the present invention additionally provides a kind of data cached managing device, including:
Altering event acquisition module, for obtaining in databases comparison event message, the altering event message
Include altering event type;
Data cached determining module, for based on the altering event message and data cached configuration information,
It is determined that data cached with the altering event information matches;
Management strategy determining module, for being determined to be directed to acquired caching number according to the altering event type
According to management strategy;
Data cached processing module, for data cached being handled to described according to identified management strategy.
The present invention includes the databases comparison event message of change list of fields and altering event type by obtaining,
And based on the altering event message and data cached configuration information, it is determined that with the altering event message
What is matched is data cached, according to the management strategy of determination to it is described it is data cached handle, solve existing
There is databases comparison and data cached management in technology synchronously to carry out, due to frequently operate it is data cached so that
Utilization rate is cached than relatively low technical problem, the invention enables the change of database and corresponding data cached pipe
Reason is asynchronous to be carried out, it is possible to decrease the complexity of database synchronization write-in, improves the availability of caching.
Brief description of the drawings
Fig. 1 is a kind of flow chart of data cached management method in the embodiment of the present invention one;
Fig. 2 is a kind of flow chart of data cached management method in the embodiment of the present invention two;
Fig. 3 is a kind of structure chart of data cached managing device in the embodiment of the present invention three.
Embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this
The specific embodiment of place description is used only for explaining the present invention, rather than limitation of the invention.Also need in addition
It is noted that illustrate only part related to the present invention for the ease of description, in accompanying drawing and not all knot
Structure.
Embodiment one
Fig. 1 is a kind of flow chart for data cached management method that the embodiment of the present invention one is provided, the present embodiment
It is applicable under each scene for databases comparison, the corresponding data cached situation for carrying out asynchronous refresh,
This method can be performed by data cached managing device provided in an embodiment of the present invention, and the device can be integrated in
In mobile terminal, fixed terminal or server, as shown in figure 1, specifically including:
Altering event type is included in S101, acquisition databases comparison event message, the altering event message.
In database store an article when, can using the corresponding attribute of the article as attribute field (including
The title and/or numbering of article, corresponding price, weight and quantity etc.) stored.For example, in storage
During apple, corresponding attribute field may include " apple ", " price ", " quantity " etc. in database.
And when database is changed, then altering event message can be produced, change is included in the altering event message
The change type of event.
Specifically, the Operation Log of database can be obtained in real time, known by the Operation Log for parsing database
The modification information of database, altering event message is generated according to the modification information.Sent out when detecting database
Change when more (such as increasing new data, change data message and delete unnecessary data), then give birth to respectively
It is added into corresponding altering event message, and by corresponding altering event type in altering event message.
S102, based on the altering event message and data cached configuration information, it is determined that with the change
It is data cached that event message matches.
Be put into by the data in database in caching, can this data cached configured.Specifically, true
Surely match it is data cached when, by the configuration information with it is described change list of fields be compared, by list
It is middle to there are the corresponding data of field occured simultaneously, it is defined as data cached with the altering event information matches.
S103, according to the altering event type determine be directed to acquired data cached management strategy.
Different management strategies are preset for different altering event types.The altering event type bag
Include but be not limited to increase event type, altering event type and deletion event type.
Specifically, when the altering event type is increase event type, then setting corresponding management strategy
For newly-increased strategy;When the altering event type is update event type, then corresponding management strategy is set
For more new strategy;When the altering event type is deletion event type, then corresponding management strategy is set
For deletion strategy.
S104, data cached handled to described according to identified management strategy.
Data cached processing is also differed for different management strategies.For example, when the management strategy
During for newly-increased strategy, then by the attribute data write-in caching of the change list of fields;When the management plan
Slightly more new strategy when, then by corresponding attribute data be revised as update after field attribute data;When described
When altering event type is deletion event type, then delete described data cached.
The present embodiment is disappeared by obtaining the databases comparison event comprising change list of fields and altering event type
Breath, and based on the altering event message and data cached configuration information, it is determined that with the altering event
Information matches it is data cached, according to the management strategy of determination to it is described it is data cached handle, solve
Databases comparison and data cached management are synchronously carried out in the prior art, due to frequently operating data cached
So that caching utilization rate is than relatively low technical problem so that the change of database and corresponding data cached management
It is asynchronous to carry out, it is possible to decrease the complexity of database synchronization write-in, improve the availability of caching.
It is described also comprising change list of fields in the altering event message on the basis of above-described embodiment
Data cached configuration information includes care list of fields, and based on the altering event message and caching
The configuration information of data, it is determined that with the altering event information matches it is data cached including:
By it is described care list of fields with it is described change list of fields exist occur simultaneously it is data cached, be defined as and
The altering event information matches it is data cached.
Wherein, the field that the change list of fields is made up of the corresponding attribute of the data changed is constituted.
If for example, the initial data stored in database be apple price, weight and quantity, the price of grape,
Weight and quantity etc., when it is the price of apple that user, which needs the data changed, then in change database
After the price of apple, the change list of fields for including attribute field " apple-price " can be generated, the change word
Duan Liebiao works as price and weight that user needs the data changed to be apple in the form of altering event message
When, then it can generate the change list of fields for including attribute field " apple-price-weight ".And work as user to number
When writing new data according to storehouse, then the corresponding attribute field generation change field row of data write according to user
Table.For example, user can be then generated in the price of dragon fruit and quantity write into Databasce comprising attribute field
The change list of fields of " dragon fruit-price-quantity ".Equally, when user deletes the data of database, then
The corresponding attribute field generation change list of fields of data that can be deleted according to user, for example, user is from data
When the quantity of apple is deleted in storehouse, then change field of the generation comprising attribute field " apple-price-quantity " is arranged
Table.
That is, the change list of fields included in the altering event message can be changed according in database
The corresponding attribute field of data be defined, or attribute field corresponding with the attribute data of change is identical,
Such as information such as title, mark, the attributes (for example, price, weight and quantity) that can include article.
Can also be comprising the data message after change, such as after the price, change after changing in the altering event message
Weight and change after number etc..
Wherein, the configuration information is comprising list of fields is concerned about, the care list of fields includes but is not limited to
Attribute field described in step S101.It is determined that matching it is data cached when, by the care list of fields
It is compared with the change list of fields, will there are the corresponding data of field of common factor in list, be defined as
It is data cached with the altering event information matches.
On the basis of above-described embodiment, the altering event type includes increase event type, altering event
Type or deletion event type, the change list of fields include field after field before changing and change, and
Determined to include for acquired data cached management strategy according to the altering event type:
In the absence of data cached with the altering event information matches, and in the altering event message
Altering event type for increase event type when, the management strategy is defined as newly-increased strategy, it is described new
It is to write the attribute data of the change list of fields in caching to increase strategy;
It is data cached with the altering event information matches existing, and the altering event type is more
During new events type, the management strategy is defined as more new strategy, the more new strategy is to be concerned about described
The attribute data of list of fields is revised as the attribute data of field after the renewal in the change list of fields;Or
Person exists data cached with the altering event information matches, and the altering event type is deletes
During event type, the management strategy is defined as deletion strategy, the deletion strategy is the deletion caching
Data.
On the basis of above-described embodiment, the configuration information further comprises being concerned about altering event type, phase
Answer, based on the altering event message and data cached configuration information, it is determined that with the altering event
Information matches it is data cached including:
By it is described care list of fields with it is described change list of fields exist occur simultaneously and be concerned about altering event type with
The altering event type matching it is data cached, be defined as the caching with the altering event information matches
Data.
Wherein, the care list of fields includes but is not limited to the following attribute field of article:The title of article and/
Or numbering, corresponding price, weight and quantity.
Specifically, obtain matching it is data cached when, first by care list of fields and the change
List of fields is compared, and obtains the field for existing and occuring simultaneously, and will be concerned about that altering event type becomes with described
More event type is matched, and obtains corresponding data cached when both are satisfied by, and becomes experienced according to described
Part type is handled the data cached of matching.For example, determining pin according to the altering event type first
To acquired data cached management strategy, then according to identified management strategy to described data cached
Handled, detailed process refers to retouching in step S103 and step S104 in above-described embodiment one
State.
On the basis of above-described embodiment, it is that further improve caches service efficiency, reduces the caching number of processing
According to data volume, present invention additionally comprises following steps:
According to setting, to acquired data cached carry out filtration treatment, and
The data cached progress processing is included according to identified management strategy:
According to identified management strategy, data cached after filtration treatment is handled.
Wherein, the filtering rule of the setting includes but is not limited to, service filtering rule or temperature filtering are advised
Then.
If specifically, the rule set as temporal filtering rule, from it is described it is data cached in match somebody with somebody confidence
Recent renewal time is obtained in breath, if the recent renewal time is earlier than or equal to the altering event message
Time of origin, then handled data cached according to identified management strategy, if during the recent renewal
Between be later than the time of origin of the altering event message, then refuse to handle data cached.
If the rule set is service filtering rule, from it is described it is data cached in configuration information in obtain
The current traffic state of event, if the current traffic state is invalid service condition, refuses to caching number
According to being handled, if the present type of service is effective traffic state, according to identified management strategy
Handle data cached.For example, in technical field of electronic commerce, the invalid service condition can be for
Undercarriage article, the article stopped production or non-restocking or the article reached the standard grade, it is corresponding data cached for these articles
Disarmed state is in, then without being handled, the utilization rate of raising caching can be entered.
If the rule set is temperature filtering rule, the data cached temperature, the temperature are counted
By user couple with clicking rate, purchase volume, pageview and the scoring of the data cached associated event
At least one is determined;If the temperature exceedes preset heat, according to identified management strategy to caching number
According to being handled;If temperature is less than or equal to preset heat, refuse to handle data cached.
On the basis of above-described embodiment, if the configuration information includes shielding period information, according to described
Altering event type determines to further comprise for acquired data cached management strategy:
According to the altering event type and the shielding period information, it is determined that for acquired management plan
Slightly.
Specifically, shielding period information is obtained from the data cached configuration information, in altering event
When time of origin was in the shielding period, the management strategy is defined as to postpone strategy, it is described to postpone
Strategy is directed to the push of the altering event message to postpone in the asynchronous queue;In the generation of altering event
When time was not in the shielding period, the management strategy, root are determined according to the altering event type
Handled according to identified management strategy data cached..
On the basis of above-described embodiment, the form storage according to caching subjects is above-mentioned data cached, then really
It is fixed with the altering event information matches it is data cached including:
It is determined that the caching subjects associated with the change list of fields, and obtain correspondence in the caching subjects
It is data cached.
On the basis of above-described embodiment, at according to identified management strategy to the data cached progress
During reason, according to the change data unique mark included in identified management strategy and the altering event message,
Data cached handled to the change data unique mark is corresponding under the caching subjects.
Wherein, the caching subjects include one or more attribute of article, corresponding data cached to include
One or more attribute data or the fixed structure that is calculated according to one or more attribute data
One group of data.For example, the caching for storing fruit, the caching that can set up individually storage price is corresponding slow
Deposit theme, can also set up while storing the corresponding caching subjects of caching of price and weight, or set up needs
The corresponding caching subjects of caching of obtained total amount are calculated according to the product of price and weight.
Specifically, the attribute field of change is included in change list of fields, for the attribute changed in database
Field, need to pre-establish the corresponding relation list arrived between attribute field and corresponding caching subjects, the correspondence
Relation list can be separately positioned in caching or database.After databases comparison event message is got,
Attribute field according to being included in change list of fields searches corresponding relation list, if found and the category
Property the corresponding caching subjects of field, it is determined that exist with the associated caching subjects of the change list of fields,
It is right then according to the change data unique mark included in identified management strategy and the altering event message
The change data unique mark is corresponding under the caching subjects data cached is handled.
Specifically, a caching subjects might have stored the corresponding attribute data of a large amount of different articles, such as it is right
In " price " caching subjects, the corresponding price caching number of apple, pears, grape etc. fruit may be included
According to, then when the attribute field that change list of fields is included in the databases comparison event message got is " apple
During really-price ", then by searching the corresponding relation list of the attribute field and caching subjects that pre-establish, if
Find associated with " price " field caching subjects (i.e. " price " caching subjects, " total amount " delay
Deposit theme), then according to the unique mark of article it is further apple, to " price " caching subjects, " total
" apple " is corresponding under the amount of money " caching subjects data cached is changed.
If between attribute field and caching subjects to corresponding relation list in do not find corresponding caching
Theme, then set up the caching subjects associated with the attribute field, and the write-in of corresponding attribute data is slow
Deposit in the corresponding caching of theme, while the corresponding relation list arrived between Update attribute field and caching subjects.
For example, when the attribute field that change list of fields is included in the databases comparison event message got is
When " substance is average weight ", then by searching the attribute field in the absence of in corresponding relation list, then build
Vertical is " substance " corresponding caching subjects with the attribute field, and the corresponding substance of mango is placed on pair
In the caching answered, while the corresponding relation of " mango-substance " corresponding attribute field and caching subjects is added
Into corresponding relation list.Or, when change list of fields bag in the databases comparison event message got
When the attribute field contained is " pears-total amount ", then by searching corresponding relation list, attribute field is found
" total amount " corresponding caching subjects, then whether there is under further query caching theme and uniquely marked with article
Know " pears " corresponding total amount data cached, if being not present, further check that databases comparison event disappears
The altering event type included in breath, however, it is determined that change type is increase event type, it is determined that corresponding pipe
Reason strategy is newly-increased strategy, the then caching expanded under " total amount " caching subjects, by the corresponding total amount of pears
Store in corresponding caching.
For the altering event type included in the different altering event message of database, in caching subjects
It is data cached have different processing, in addition to above-mentioned increase event type, in addition to update event type
With deletion event type.
Equally by taking the database of above-mentioned storage fruit price as an example, when the altering event message got is
During the price of more new apple, it is determined that by the management strategy be more new strategy, then according to article unique mark
Will described in " apple " is corresponding under " price " caching subjects data cached is updated to new price data.
There is the following two kinds situation for renewal data cached under " price-weight " caching subjects:Work as needs
Update it is data cached now need while get weight corresponding data when being only price, it is together right
Under " price-weight " caching subjects it is corresponding it is data cached be updated, data cached be when need to update
When price and weight, then using the price data and weight data after updating to " price-weight " caching subjects
Under corresponding data cached be updated.
Exist such as renewal data cached under " total amount " caching subjects (total amount=price * quantity)
Lower three kinds of situations:When the Database field of change is only price, now need while getting after renewal
Price and quantity it is corresponding data cached, obtain total amount by calculating, use the obtained total amount of calculating
It is updated to corresponding total amount is data cached under " total amount " caching subjects;When the database word of change
When section is only quantity, the incremental data while after getting the data cached of price and updating now is needed,
Total amount is obtained by calculating, the total amount obtained using calculating is to corresponding under " total amount " caching subjects
Total amount is data cached to be updated;When need update it is data cached be price and weight when, then using more
Price data and weight data after new, calculating obtain total amount, and the total amount obtained using calculating is to " total
It is corresponding under the amount of money " caching subjects data cached to be updated.
When price of the altering event message got for deletion apple, it is determined that with " price "
Associated caching subjects, it is determined that the management strategy is deletion strategy, then deletes under the caching subjects
" apple " corresponding caching, while the corresponding relation list of Update attribute field and caching subjects, will " apple
Really corresponding price " is deleted from the caching of the caching subjects.
In order to more effectively using caching, when being operated to caching, it is also contemplated that operation opportunity, i.e. root
According to the filtering rule of setting, to the data cached carry out filtration treatment under acquired caching subjects, Ran Hougen
According to identified management strategy, data cached under the caching subjects after filtration treatment is handled.
The filtering rule of the setting includes temporal filtering rule, service filtering rule or temperature filtering rule.Tool
Body processing procedure is similar with the associated description in above-described embodiment one, repeats no more here.
Embodiment two
Fig. 2 is a kind of flow chart for data cached management method that the embodiment of the present invention two is provided, the present embodiment
The article restocking process (the article restocking of such as Baidu's glutinous rice) in technical field of electronic commerce is applicable to,
Specifically include:
S201, undercarriage will be deleted in the attribute field write into Databasce for treating restocking article or from database
Article updates the data in storehouse the attribute data of restocking article, generates database manipulation daily record.
Wherein, the attribute field for treating restocking article specifically may include Item Title, weight, price, face
At least one of letter attribute breath such as color.
S202, the Operation Log for obtaining or periodically obtaining database in real time, parse the Operation Log generation
It is described comprising change list of fields and altering event type in altering event message, the altering event message
Change the attribute field that change is included in list of fields.
Attribute field and caching subjects corresponding relation list that S203, lookup are pre-established, it is determined whether exist
The caching subjects associated with the change list of fields.
If there is the caching subjects associated with the change list of fields, then step 204 is performed;If
In the absence of the caching subjects associated with the attribute field, then step 206 is performed.
S204, the altering event type determined in the altering event message, according to the altering event type
It is determined that for the data cached management strategy under acquired caching subjects.
S205, the management strategy determined by are corresponding to changing data unique mark under the caching subjects
It is data cached to be handled.
S206, determine that altering event type in the altering event message is increase event type, set up with
The associated caching subjects of the attribute field, and corresponding attribute data write-in caching subjects are corresponding slow
In depositing, while Update attribute field and caching subjects corresponding relation list.
In the prior art (referring to the description of background technology), the restocking process of article includes writing for database
Enter operation and the more new management operation of caching, and use the technical scheme of the present embodiment, pass through real-time or week
The acquisition databases comparison event message of phase property, makes the change and the data cached asynchronous progress of change of database,
Restocking operation and the more new management operation of caching can be effectively decoupled, the consumption of article restocking is effectively saved
When, effective lifting restocking efficiency.
Embodiment three
Fig. 3 show a kind of structural representation of data cached managing device of the offer of the embodiment of the present invention three,
The device can be realized by the way of software or hardware, the device can be integrated in mobile terminal, fixed terminal or
In server, as shown in figure 3, the concrete structure of the device is as follows:Altering event acquisition module 31, caching
Data determining module 32, management strategy determining module 33 and data cached processing module 34.
The altering event acquisition module 31 is used to obtain databases comparison event message, and the altering event disappears
Altering event type is included in breath.
The data cached determining module 32 is used for based on the altering event message and data cached matched somebody with somebody
Confidence ceases, it is determined that data cached with the altering event information matches.
The management strategy determining module 33 is used to be determined for acquired according to the altering event type
Data cached management strategy.
The data cached processing module 34 be used for according to identified management strategy to it is described it is data cached enter
Row processing.
Data cached managing device described in the present embodiment is used to perform the data cached pipe described in the various embodiments described above
Reason method, its technical principle is similar with the technique effect produced, repeats no more here.
It is described also comprising change list of fields in the altering event message on the basis of above-described embodiment
Data cached configuration information is specifically used comprising care list of fields, and the data cached determining module 32
In the care list of fields and the change list of fields are existed into the data cached of common factor, it is defined as and institute
State the data cached of altering event information matches.
On the basis of above-described embodiment, the configuration information includes being concerned about altering event type, and described
Data cached determining module 32 is specifically for the care list of fields is existed with the change list of fields
Occur simultaneously and be concerned about the data cached of altering event type and the altering event type matching, be defined as with it is described
Altering event information matches it is data cached.
On the basis of above-described embodiment, described device also includes:Data cached filtering module 35.
The data cached filtering module 35 is used for according to the filtering rule of setting, to acquired data cached
Carry out filtration treatment.
The data cached processing module 34 is specifically for according to identified management strategy, to by filtering
Data cached after reason is handled.
On the basis of above-described embodiment, the altering event type includes increase event type, altering event
Type or deletion event type, the change list of fields include field after field before changing and change, and
The management strategy determining module 33 is specifically in the absence of slow with the altering event information matches
When altering event type in deposit data, and the altering event message is increase event type, by the pipe
Reason strategy is defined as newly-increased strategy, and the newly-increased strategy is to write the attribute data of the change list of fields
In caching;It is data cached with the altering event information matches existing, and the altering event type
During for update event type, the management strategy is defined as more new strategy, the more new strategy is will be described
It is concerned about the attribute data of field after the renewal that the attribute data of list of fields is revised as in the change list of fields;
Or it is data cached with the altering event information matches existing, and the altering event type is to delete
During except event type, the management strategy is defined as deletion strategy, the deletion strategy is described slow to delete
Deposit data.
On the basis of above-described embodiment, the filtering rule of the setting includes temporal filtering rule, business mistake
Filter rule or temperature filtering rule.
On the basis of above-described embodiment, the configuration information includes shielding period information, and the management
Tactful determining module 33 specifically for according to the altering event type and the shielding period information, it is determined that
For acquired management strategy.
On the basis of above-described embodiment, the altering event message is in asynchronous queue, the management plan
Slightly determining module 33 is specifically for when the time of origin of altering event was in the shielding period, by described in
Management strategy is defined as postponing strategy, and the strategy of postponing is directed to the change to postpone in the asynchronous queue
The push of event message, and when the time of origin of altering event was not in the shielding period, according to
The altering event type determines the management strategy.
On the basis of above-described embodiment, the data cached determining module 32 is specifically for determining to become with described
The associated caching subjects of more list of fields, and obtain corresponding data cached in the caching subjects.
On the basis of above-described embodiment, the data cached processing module 34 is specifically for according to identified
The change data unique mark included in management strategy and the altering event message, under the caching subjects
The change data unique mark is corresponding data cached to be handled.
On the basis of above-described embodiment, operation of the altering event acquisition module 31 specifically for parsing database
Daily record, generates altering event message.
Data cached managing device described in the various embodiments described above is used to perform the caching number described in the various embodiments described above
According to management method, its technical principle is similar with the technique effect produced, repeats no more here.
Note, above are only presently preferred embodiments of the present invention and institute's application technology principle.Those skilled in the art
It will be appreciated that the invention is not restricted to specific embodiment described here, can enter for a person skilled in the art
Row it is various it is obvious change, readjust and substitute without departing from protection scope of the present invention.Therefore, though
So the present invention is described in further detail by above example, but the present invention be not limited only to
Upper embodiment, without departing from the inventive concept, can also include other more equivalent embodiments,
And the scope of the present invention is determined by scope of the appended claims.
Claims (22)
1. a kind of data cached management method, it is characterised in that including:
Obtain and altering event type is included in databases comparison event message, the altering event message;
Based on the altering event message and data cached configuration information, it is determined that disappearing with the altering event
It is data cached that manner of breathing is matched;
Determined to be directed to acquired data cached management strategy according to the altering event type;
Data cached handled to described according to identified management strategy.
2. according to the method described in claim 1, it is characterised in that also included in the altering event message
List of fields is changed, the data cached configuration information includes care list of fields, and becomes based on described
More event message and data cached configuration information, it is determined that the caching with the altering event information matches
Data include:
By it is described care list of fields with it is described change list of fields exist occur simultaneously it is data cached, be defined as and
The altering event information matches it is data cached.
3. method according to claim 2, it is characterised in that the configuration information, which includes being concerned about, to be changed
Event type, and based on the altering event message and data cached configuration information, it is determined that with it is described
Altering event information matches it is data cached including:
By it is described care list of fields with it is described change list of fields exist occur simultaneously and be concerned about altering event type with
The altering event type matching it is data cached, be defined as the caching with the altering event information matches
Data.
4. according to the method described in claim 1, it is characterised in that methods described also includes:
According to the filtering rule of setting, to acquired data cached carry out filtration treatment, and
The data cached progress processing is included according to identified management strategy:
According to identified management strategy, data cached after filtration treatment is handled.
5. method according to claim 2, it is characterised in that the altering event type includes increase
Event type, altering event type or deletion event type, the change list of fields include field before changing
With field after change, and
Determined to include for acquired data cached management strategy according to the altering event type:
In the absence of data cached with the altering event information matches, and in the altering event message
Altering event type for increase event type when, the management strategy is defined as newly-increased strategy, it is described new
It is to write the attribute data of the change list of fields in caching to increase strategy;
It is data cached with the altering event information matches existing, and the altering event type is more
During new events type, the management strategy is defined as more new strategy, the more new strategy is to be concerned about described
The attribute data of list of fields is revised as the attribute data of field after the renewal in the change list of fields;Or
Person exists data cached with the altering event information matches, and the altering event type is deletes
During event type, the management strategy is defined as deletion strategy, the deletion strategy is the deletion caching
Data.
6. method according to claim 4, it is characterised in that when the filtering rule of the setting includes
Between filtering rule, service filtering rule or temperature filtering rule.
7. according to the method described in claim 1, it is characterised in that the configuration information includes the shielding period
Information, and
Determined to include for acquired data cached management strategy according to the altering event type:
According to the altering event type and the shielding period information, it is determined that for acquired management plan
Slightly.
8. method according to claim 7, it is characterised in that the altering event message is in asynchronous
In queue, according to the altering event type and the shielding period information, it is determined that for acquired pipe
Reason strategy includes:
When the time of origin of altering event was in the shielding period, the management strategy is defined as pushing away
Tactful late, the strategy of postponing is to postpone the push in the asynchronous queue for the altering event message,
And
When the time of origin of altering event was not in the shielding period, according to the altering event type
Determine the management strategy.
9. according to any described method in claim 2 to 8, it is characterised in that it is determined that with the change
It is data cached that event message matches, including:
It is determined that the caching subjects associated with the change list of fields, and obtain correspondence in the caching subjects
It is data cached.
10. method according to claim 9, it is characterised in that management plan determined by the basis
Slightly to it is described it is data cached handle, including:
According to the change data unique mark included in identified management strategy and the altering event message,
Data cached handled to the change data unique mark is corresponding under the caching subjects.
11. according to any described method in claim 1 to 10, it is characterised in that obtain database and become
More event message package is included:
The Operation Log of database is parsed, altering event message is generated.
12. a kind of data cached managing device, it is characterised in that including:
Altering event acquisition module, for obtaining in databases comparison event message, the altering event message
Include altering event type;
Data cached determining module, for based on the altering event message and data cached configuration information,
It is determined that data cached with the altering event information matches;
Management strategy determining module, for being determined to be directed to acquired caching number according to the altering event type
According to management strategy;
Data cached processing module, for data cached being handled to described according to identified management strategy.
13. device according to claim 12, it is characterised in that also wrapped in the altering event message
The list of fields containing change, the data cached configuration information includes care list of fields, and the caching
Data determining module specifically for:
By it is described care list of fields with it is described change list of fields exist occur simultaneously it is data cached, be defined as and
The altering event information matches it is data cached.
14. device according to claim 13, it is characterised in that the configuration information, which includes being concerned about, to be become
More event type, and the data cached determining module specifically for:
By it is described care list of fields with it is described change list of fields exist occur simultaneously and be concerned about altering event type with
The altering event type matching it is data cached, be defined as the caching with the altering event information matches
Data.
15. device according to claim 12, it is characterised in that also include:
Data cached filtering module, for the filtering rule according to setting, to acquired data cached progress
Filtration treatment;
The data cached processing module specifically for:
According to identified management strategy, data cached after filtration treatment is handled.
16. device according to claim 13, it is characterised in that the altering event type includes increasing
Plus event type, altering event type or deletion event type, the change list of fields includes word before changing
Section and change after field, and the management strategy determining module specifically for:
In the absence of data cached with the altering event information matches, and in the altering event message
Altering event type for increase event type when, the management strategy is defined as newly-increased strategy, it is described new
It is to write the attribute data of the change list of fields in caching to increase strategy;
It is data cached with the altering event information matches existing, and the altering event type is more
During new events type, the management strategy is defined as more new strategy, the more new strategy is to be concerned about described
The attribute data of list of fields is revised as the attribute data of field after the renewal in the change list of fields;Or
Person exists data cached with the altering event information matches, and the altering event type is deletes
During event type, the management strategy is defined as deletion strategy, the deletion strategy is the deletion caching
Data.
17. device according to claim 15, it is characterised in that the filtering rule of the setting includes
Temporal filtering rule, service filtering rule or temperature filtering rule.
18. device according to claim 12, it is characterised in that when the configuration information includes shielding
Segment information, and the management strategy determining module specifically for:
According to the altering event type and the shielding period information, it is determined that for acquired management plan
Slightly.
19. device according to claim 18, it is characterised in that the altering event message is in different
Walk queue in, the management strategy determining module specifically for:
When the time of origin of altering event was in the shielding period, the management strategy is defined as pushing away
Tactful late, the strategy of postponing is to postpone the push in the asynchronous queue for the altering event message,
And when the time of origin of altering event was not in the shielding period, according to the altering event type
Determine the management strategy.
20. according to any described device in claim 13 to 19, it is characterised in that the caching number
According to determining module specifically for:
It is determined that the caching subjects associated with the change list of fields, and obtain correspondence in the caching subjects
It is data cached.
21. device according to claim 20, it is characterised in that the data cached processing module tool
Body is used for:
According to the change data unique mark included in identified management strategy and the altering event message,
Data cached handled to the change data unique mark is corresponding under the caching subjects.
22. according to any described device in claim 12 to 21, it is characterised in that altering event is obtained
Modulus block specifically for:
The Operation Log of database is parsed, altering event message is generated.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610224699.9A CN107291779B (en) | 2016-04-12 | 2016-04-12 | Cache data management method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610224699.9A CN107291779B (en) | 2016-04-12 | 2016-04-12 | Cache data management method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107291779A true CN107291779A (en) | 2017-10-24 |
CN107291779B CN107291779B (en) | 2021-08-13 |
Family
ID=60093824
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610224699.9A Active CN107291779B (en) | 2016-04-12 | 2016-04-12 | Cache data management method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107291779B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108009029A (en) * | 2017-11-30 | 2018-05-08 | 中电福富信息科技有限公司 | Method and system based on the data cached decoupling persistence of Ignite grids |
CN108512948A (en) * | 2018-03-21 | 2018-09-07 | 平安普惠企业管理有限公司 | Address book updating method, device, computer equipment and storage medium |
CN108874403A (en) * | 2018-05-30 | 2018-11-23 | 深圳市分期乐网络科技有限公司 | Dissemination method, device, equipment and the storage medium of rule file |
CN109828980A (en) * | 2019-02-19 | 2019-05-31 | 北京字节跳动网络技术有限公司 | Data cache method, device, terminal and storage medium |
CN111382180A (en) * | 2020-03-11 | 2020-07-07 | 网易(杭州)网络有限公司 | Data clearing method and device for local cache |
CN111694863A (en) * | 2020-04-30 | 2020-09-22 | 武汉灯塔之光科技有限公司 | Method, system and device for refreshing database cache |
CN114443777A (en) * | 2022-04-08 | 2022-05-06 | 北京新氧科技有限公司 | Cache data processing method, device, equipment and system |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102043653A (en) * | 2010-12-23 | 2011-05-04 | 中国农业银行股份有限公司 | Cache system and methods for modifying cache configuration and operating and querying cache data |
CN103595776A (en) * | 2013-11-05 | 2014-02-19 | 福建网龙计算机网络信息技术有限公司 | Distributed type caching method and system |
US8775741B1 (en) * | 2009-01-13 | 2014-07-08 | Violin Memory Inc. | Using temporal access patterns for determining prefetch suitability |
-
2016
- 2016-04-12 CN CN201610224699.9A patent/CN107291779B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8775741B1 (en) * | 2009-01-13 | 2014-07-08 | Violin Memory Inc. | Using temporal access patterns for determining prefetch suitability |
CN102043653A (en) * | 2010-12-23 | 2011-05-04 | 中国农业银行股份有限公司 | Cache system and methods for modifying cache configuration and operating and querying cache data |
CN103595776A (en) * | 2013-11-05 | 2014-02-19 | 福建网龙计算机网络信息技术有限公司 | Distributed type caching method and system |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108009029A (en) * | 2017-11-30 | 2018-05-08 | 中电福富信息科技有限公司 | Method and system based on the data cached decoupling persistence of Ignite grids |
CN108009029B (en) * | 2017-11-30 | 2022-01-04 | 中电福富信息科技有限公司 | Method and system for decoupling and persisting cache data based on Ignite grid |
CN108512948A (en) * | 2018-03-21 | 2018-09-07 | 平安普惠企业管理有限公司 | Address book updating method, device, computer equipment and storage medium |
CN108512948B (en) * | 2018-03-21 | 2022-05-17 | 平安普惠企业管理有限公司 | Address book updating method and device, computer equipment and storage medium |
CN108874403A (en) * | 2018-05-30 | 2018-11-23 | 深圳市分期乐网络科技有限公司 | Dissemination method, device, equipment and the storage medium of rule file |
CN108874403B (en) * | 2018-05-30 | 2022-07-12 | 深圳市分期乐网络科技有限公司 | Method, device and equipment for issuing rule file and storage medium |
CN109828980A (en) * | 2019-02-19 | 2019-05-31 | 北京字节跳动网络技术有限公司 | Data cache method, device, terminal and storage medium |
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 |
CN111694863A (en) * | 2020-04-30 | 2020-09-22 | 武汉灯塔之光科技有限公司 | Method, system and device for refreshing database cache |
CN111694863B (en) * | 2020-04-30 | 2023-11-28 | 武汉灯塔之光科技有限公司 | Database cache refreshing method, system and device |
CN114443777A (en) * | 2022-04-08 | 2022-05-06 | 北京新氧科技有限公司 | Cache data processing method, device, equipment and system |
Also Published As
Publication number | Publication date |
---|---|
CN107291779B (en) | 2021-08-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107291779A (en) | Data cached management method and device | |
US7593957B2 (en) | Hybrid data provider | |
AU2003231931B2 (en) | System and method for integrating, managing and coordinating customer activities | |
CN103309866B (en) | The method and apparatus for generating recommendation results | |
KR101675409B1 (en) | Methods, systems and devices for performing incremental updates of partial databases | |
US7552132B2 (en) | Management of contract data | |
EP1542143A1 (en) | Data processing system and method | |
CN103582881B (en) | Knowledge extraction device, knowledge updating device, and program | |
CN104636338B (en) | A kind of data cleansing storage method for the monitoring of value-added tax negative and positive ticket | |
US20140279304A1 (en) | Method, System and Program Product for Matching of Transaction Records | |
CN112163160B (en) | Sensitive identification method based on knowledge graph | |
KR20120139775A (en) | Bottom-up optimized search system and method | |
CN109493151A (en) | Method for Sales Forecast method and system | |
AU2020103191A4 (en) | A commodity recommendation system based on actionable high utility negative sequential rules mining and its working method | |
CN105279158A (en) | Hotel price ordering method based on complex query condition | |
CN102346901A (en) | Internet medicine trading subject credit assessment system and method | |
CN101167091A (en) | Export queue for an enterprise software system | |
Faisal et al. | Handling slowly changing dimensions in data warehouses | |
CN111415067A (en) | Enterprise and personal credit rating system | |
WO2001093104A2 (en) | System and method for retrieving data from a database using a data management system | |
US7212992B1 (en) | Method and system for tracking a deposit | |
CN107909415A (en) | Network shopping mall is started an undertaking with consumption and integrates application system and control method | |
US20080148006A1 (en) | Mapping Compound Keys | |
CN103425688B (en) | Method and server for providing information | |
TWM547143U (en) | System for determining amount of loan |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |