Data cached monitoring method, device and system based on distributed system
The application is the divisional application of CN105630823A, and the applying date of original application is on November 4th, 2014, application No. is
201410613792.X, it is entitled " data cached monitoring method, device and system based on distributed system ".
Technical field
This application involves the distribution calculating fields of computer, in particular to a kind of caching based on distributed system
Monitoring method, the device and system of data.
Background technique
In the distribution calculating field of computer, under distributed system cluster, caching technology is widely used.Distribution system
System is directed to the caching mechanism of hotspot query data, can greatly improve the efficiency of system processing and the data throughput rule of system itself
Mould.
Distributed system is directed to the caching mechanism of hotspot query data, generally can data volume is small, read operation for having
Amount is big and write operation amount is small and data source is system database or the number of query result these types feature to other systems
According to.The data volume of this categorical data is small, so the Installed System Memory that data itself occupy is few;Read operation amount is big, write operation
Measure it is small, so data itself have very strong read-only property;Data source is system database or the query result to other systems, institute
To illustrate that data itself do not have to handle again.
By taking existing specific actual conditions as an example, such as: system is according to " at 30 minutes, user is in strange land (transprovincially)
User's login behavior occurs and belongs to high risk behavior " this rule, to each user, when logging in, position progress is corresponding
Judgement.Because system will monitor user debarkation point in real time, which may be defined as expression formula
Form is stored in the database.By taking the rule as an example, it is daily occur user log in behavior number can reach millions or even
Hundred million grades.If the rule is directly deposited in system database, when user's login behavior occurring every time, user occurs and logs in row
For application node can be all read out from system database.It reads system database repeatedly in this way, service can be aggravated significantly
Device uses load, causes the serious waste to the resource of system database.
Therefore, under distributed system framework, above-mentioned rule can be defined as a hot spot rule, advise to this hot spot
Data then can use caching technology.The regular data is cached to each generation user in distributed system cluster to log in
In the memory of the application node of behavior, when user's login behavior occurs every time, application node need to only directly read application node
Regular data in memory, so that it may realize to " at 30 minutes, user occurs user in strange land (transprovincially) and logs in behavior
Belong to high risk behavior " this regular judgement.In this way, just reducing the use load of system server, system money is avoided
The waste in source.
In the above scheme, the cache contents of distributed system data buffer storage, because all there is the interior of each application node
In depositing, so cache contents are extremely difficult to consistency.Specific manifestation are as follows: when the data in system server change,
Each application node can not refresh local cache content in time;Between the individual nodes, although reading identical data source
The data content of caching is inconsistent.Caching technology under existing distributed system cluster, can not Centralized Monitoring distributed system
In cluster in a application node thousands of or even up to ten thousand each application node buffer status and content;Application node can not be delayed
It deposits content and carries out consistency check, to find that abnormal application node occur in cache contents, and it is repaired in time;It can not be thin
The caching of some specific data exception inside some specific application node of granular management, the application node.
Aiming at the problem that above-mentioned distributed system not can guarantee data cached consistency, effective solution is not yet proposed at present
Certainly scheme.
Summary of the invention
The embodiment of the invention provides a kind of data cached monitoring method, device and system based on distributed system,
With at least solve due to can not in Centralized Monitoring distributed system cluster each application node it is data cached caused by can not protect
The technical issues of demonstrate,proving the caching data consistency of application node.
According to the one aspect of the embodiment of the present application, a kind of data cached monitoring side based on distributed system is provided
Method, comprising: whether the hot spot data that detection is established in the hot spot data table of correspondence with application terminal cluster updates,
In, application terminal cluster registers the hot spot data of local cache to hot spot data table;Detecting the heat in hot spot data table
In the case that point data updates, shape will be cached with the associated hot spot data of hot spot data updated in hot spot data table
State is revised as state to be updated;If hot spot data buffer status is state to be updated, driving application terminal cluster refreshes local
The hot spot data of caching.
According to the another aspect of the embodiment of the present application, a kind of data cached monitoring based on distributed system is additionally provided
Device, comprising: detection module, for detecting the hot spot data established in the hot spot data table of correspondence with application terminal cluster
Whether update, wherein application terminal cluster registers the hot spot data of local cache to hot spot data table;Modification state mould
Block, in the case where detecting that the hot spot data in hot spot data table updates, will with occur more in hot spot data table
The associated hot spot data buffer status of new hot spot data is revised as state to be updated;Drive module, if being used for hot spot data
Buffer status is state to be updated, and driving application terminal cluster refreshes the hot spot data of local cache.
According to the another aspect of the embodiment of the present application, a kind of data cached monitoring based on distributed system is additionally provided
System, comprising: application terminal cluster;Database terminal establishes correspondence with application terminal cluster, for storing hot spot data
Library and caching slip condition database;Monitoring server is cached, correspondence is established with database terminal, for detecting hotspot database
Hot spot data table in hot spot data whether update, the hot spot number in the hot spot data table for detecting hotspot database
In the case where updating, by the hot spot data buffer status that hot spot data table is corresponded in buffer status database be revised as to
More new state drives application terminal cluster if the hot spot data buffer status in buffer status database is state to be updated
Refresh the hot spot data of local cache.
In the embodiment of the present application, the heat in the hot spot data table of correspondence is established with application terminal cluster using detection
Whether point data updates, wherein application terminal cluster registers the hot spot data of local cache to hot spot data table;It is examining
Measure in the case that the hot spot data in hot spot data table updates, by with the hot spot data that is updated in hot spot data table
Associated hot spot data buffer status is revised as state to be updated, wherein with the hot spot number updated in hot spot data table
It is pre-stored in buffer status database according to associated hot spot data buffer status;If timing scan is to buffer status data
When hot spot data buffer status in library is state to be updated, driving application terminal cluster refreshes the hot spot data of local cache
Mode, solve due to can not in Centralized Monitoring distributed system cluster each application node it is data cached caused by can not protect
The technical issues of demonstrate,proving the caching data consistency of application node.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present application, constitutes part of this application, this Shen
Illustrative embodiments and their description please are not constituted an undue limitation on the present application for explaining the application.In the accompanying drawings:
Fig. 1 is the structure according to a kind of data cached monitoring system based on distributed system of the embodiment of the present application one
Schematic diagram;
Fig. 2 is the process according to a kind of data cached monitoring method based on distributed system of the embodiment of the present application two
Schematic diagram;
Fig. 3 is a kind of data cached monitoring method for being preferably based on distributed system according to the embodiment of the present application two
Flow diagram;
Fig. 4 is a kind of data cached monitoring method for being preferably based on distributed system according to the embodiment of the present application two
Flow diagram;
Fig. 5 is a kind of data cached monitoring method for being preferably based on distributed system according to the embodiment of the present application two
Flow diagram;And
Fig. 6 is the signal according to a kind of data cached monitoring device based on distributed system of the embodiment of the present application three
Figure.
Specific embodiment
In order to make those skilled in the art more fully understand application scheme, below in conjunction in the embodiment of the present application
Attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is only
The embodiment of the application a part, instead of all the embodiments.Based on the embodiment in the application, ordinary skill people
Member's every other embodiment obtained without making creative work, all should belong to the model of the application protection
It encloses.
It should be noted that the description and claims of this application and term " first " in above-mentioned attached drawing, "
Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way
Data be interchangeable under appropriate circumstances, so as to embodiments herein described herein can in addition to illustrating herein or
Sequence other than those of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that cover
Cover it is non-exclusive include, for example, the process, method, system, product or equipment for containing a series of steps or units are not necessarily limited to
Step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, product
Or other step or units that equipment is intrinsic.
Embodiment 1
In its most basic configuration, Fig. 1 is according to the embodiment of the present application one based on the data cached of distributed system
Monitoring system structural schematic diagram.For purposes of illustration, the architecture drawn is only an example of proper environment, and
Non- use scope or function to the application proposes any limitation.Also the computing system should not be construed to shown in FIG. 1
One component or combinations thereof has any dependence or demand.
As shown in Figure 1, the data cached monitoring system provided by the present application based on distributed system may include: application
Terminal cluster 10, database terminal 12 and caching monitoring server 14.
Wherein application terminal cluster 10;Database terminal 12 establishes correspondence with application terminal cluster, for storing heat
Point data base and caching slip condition database;Monitoring server 14 is cached, correspondence is established with database terminal, for detecting heat
Whether the hot spot data in the hot spot data table of point data base updates, in the hot spot data table for detecting hotspot database
Hot spot data update in the case where, will delay with the associated hot spot data of hot spot data updated in hot spot data table
Depositing status modifier is state to be updated, if the hot spot data buffer status in buffer status database is state to be updated, is driven
Dynamic application terminal cluster refreshes the hot spot data of local cache;Wherein, application terminal cluster steps on the hot spot data of local cache
Note obtains the hot spot data in hot spot data table to hotspot database, and with the hot spot number that is updated in hot spot data table
It is pre-stored in buffer status database according to associated hot spot data buffer status.
Analysis caches monitoring server to the hot spot data table of hotspot database it is found that in the above embodiments of the present application one
In hot spot data real time monitoring, caching monitoring server once find hotspot database in hot spot data table in hot spot number
According to changing, then the hot spot data of hot spot data table corresponding with the hotspot database in buffer status database is modified at once
Buffer status be state to be updated, to guarantee the accuracy of data in buffer status database.
At the same time, caching monitoring server is again scanned buffer status database with the unit time, if caching
When monitoring server detects that the hot spot data buffer status in buffer status database is state to be updated, monitoring service is cached
Device will drive the application terminal in the cluster of application terminal to refresh local cache hot spot data corresponding with the hot spot data.
Step provided by the above embodiments of the present application one can be used on caching monitoring server 14, implementation process
In, a kind of embodiment of the caching monitoring server in above-described embodiment one can be Internet bank's client to realize
Refresh " at 30 minutes, user occurs user's login behavior in strange land (transprovincially) and belongs to high risk behavior " this regular institute
The caching monitoring server used, below just by taking the caching monitoring server as an example, above-described embodiment one is described in detail.
In above-described embodiment one, " at 30 minutes, user occurs user's login behavior in strange land (transprovincially) and belongs to height
This rule of risk behavior " can regard it as a hot spot data, can be stored in the hot spot server of bank.Bank
It caches monitoring server and implementing monitoring is carried out to this hot spot data in the hot spot data table in bank's hotspot database.Work as silver
Row hot spot server modifies to this hot spot data, be revised as " in 20 minutes, user strange land (transprovincially) occur
User logs in behavior and belongs to high risk behavior " when, the caching monitoring server of bank will be modified at once in buffer status database
The buffer status of the rule of hot spot data table corresponding with the hotspot database is state to be updated.At the same time, bank
Caching monitoring server be scanned with the unit time that (unit time may is that 1 second kind, 1 point to buffer status database again
Clock or 1 hour this kind of form, are also possible to other time forms, such as: user logged in every time using Internet bank's client,
User is operated etc. every time using Internet bank's client), if caching monitoring server detects buffer status database
In this hot spot data buffer status be it is to be updated when, the caching monitoring server of bank will drive it is all be equipped with network silver
The application terminal of row client is updated hot spot data corresponding with this hot spot data in its local cache.
Preferably, in the scheme that the above embodiments of the present application one provide, application terminal cluster 10 may include: at least one
Application terminal 101, each application terminal receive the refresh notification that caching monitoring server issues, and are accessing heat according to refresh notification
Updated hot spot data after reading updated hot spot data, is cached to local answer by the hot spot data table of point data base
In memory, the update to hot spot data is realized.
After above-mentioned application terminal receives the refresh notification that caching monitoring server is sent, every in application cluster is answered
The hot spot data table for accessing hotspot database according to refresh notification with terminal reads updated hot spot data and caches to application
In the locally applied memory of every application terminal in terminal cluster.
In specific implementation process, a kind of embodiment of the application terminal cluster in above-described embodiment one can be net
Network bank client is to realize that " at 30 minutes, user logs in behavior in strange land (transprovincially) generation user and belongs to height for refreshing
Application terminal used in this rule of risk behavior ", below just with a certain in the application terminal cluster be equipped with network silver
For row client application terminal, above-described embodiment one is described in detail.
In above-described embodiment one, " at 30 minutes, user occurs user's login behavior in strange land (transprovincially) and belongs to height
This rule of risk behavior " can regard it as a hot spot data, can be stored in the hot spot server of bank.Work as bank
Hot spot server modifies to this hot spot data, is revised as that " in 20 minutes, user uses in strange land (transprovincially)
Family logs in behavior and belongs to high risk behavior " when, the caching monitoring server of bank can detect the update of this hot spot data, lead to
Know the application terminal.This is equipped with the application terminal of Internet bank's client after receiving update notification, which visits
Ask the hot spot data table of bank's hotspot database, reading is updated to that " in 20 minutes, user uses in strange land (transprovincially)
Family log in behavior belong to high risk behavior " hot spot data cache to the memory of the local network bank client of the application terminal
In the middle.
Preferably, in the above embodiments of the present application one, database terminal 12 may include data base processor 120 and storage
Device 122.
Data base processor 120, for starting for the first time when any one or more application terminals in the cluster of application terminal
When, the initialization information of the hot spot data cached in each application terminal is registered to buffer status database, initialization information packet
It includes: machine name, IP address, the caching title, hot spot data buffer status, timestamp, cached version of application terminal;
The data base processor of above-mentioned database terminal, one or more application terminal in the cluster of application terminal exist
When starting for the first time, the initialization information of the hot spot data cached in each application terminal is carried out in buffer status database
Registration, the information of each application terminal initialization may include: the machine name of application terminal, IP address, caching title, hot spot number
According to buffer status, timestamp, cached version etc..Above-mentioned initialization information main purpose is to realize mark application terminal, read ground
Manage the basic functions such as position and confirmation cached version.
Memory 122 establishes connection with data base processor, for storing the buffer status database.Wherein, it is inciting somebody to action
Hot spot data is loaded onto after application terminal, initializes initialization information success, and saves the caching note of each application terminal
Volume information.
Above-mentioned memory, the application terminal initialized in the cluster of application terminal is in normal load hot spot data, completion pair
After the initialization of the terminal, memory will obtain the caching registration information of the application terminal.
Preferably, the hot spot data buffer status in buffer status database includes: that shape is completed in state to be updated and update
State, wherein the application terminal in application terminal cluster 10 is also used to the application terminal in the cluster of application terminal will be updated
It after hot spot data is cached in locally applied memory, generates and refreshes completion notice, and will be cached using completion notice is refreshed
Hot spot data buffer status in slip condition database updates completion status from condition conversion to be updated.
Updated hot spot data is cached to answering for locally applied terminal by the application terminal in above-mentioned application terminal cluster
After in memory, which, which generates, refreshes completion notice.Buffer status database is receiving the refreshing completion notice
It afterwards, is to update completion status from condition conversion to be updated by the hot spot data buffer status in buffer status database.To prevent
Caching monitoring server drives application terminal cluster to refresh the hot spot data of local cache repeatedly, avoids to hot spot data base resource
Waste.
Preferably, in the scheme that the above embodiments of the present application one provide, caching monitoring server 14 may include at monitoring
Device 141 is managed, it is whether identical for detecting the quantity of caching registration information of each application terminal in the cluster of application terminal, if not
It is identical, then read the caching registration information of the application terminal of quantity exception, and the prompt information of amount shipped out exception;Alternatively, inspection
Whether the hot spot data buffer status for surveying each application terminal in the cluster of application terminal is consistent, if it is inconsistent, reading hot spot
The caching registration information of the application terminal of data buffer storage abnormal state, and issue the prompt letter of hot spot data buffer status exception
Breath.
Above-mentioned monitoring processor 141, for carrying out abnormal judgement to each application terminal in application terminal cluster.Sentence
Fixed abnormal method can be divided into two kinds.One of which, caching monitoring server is in each application in application terminal cluster
Caching registration information detected, whether the number of entries for detecting the caching registration information of each application terminal identical.If
The cache information quantity of some application terminal and the cache information quantity of other application terminal are different, then determine the application terminal
Cache information exist abnormal, read the caching registration information of the application terminal of the registration information quantity exception, and issue caching
The prompt information of registration information quantity exception.Or by another kind, caching monitoring server is to every in application terminal cluster
The hot spot data buffer status of a application terminal is detected, and whether the buffer status for detecting each application terminal is consistent.If
The buffer status of some application terminal and the buffer status of other application terminal have differences, then determine there is exception with this
There is exception in the cache information of the corresponding application terminal of hot spot data buffer status, read the cache information and there is abnormal application
The caching registration information of terminal, and send the prompt information of hot spot data buffer status exception.Monitoring server is cached to realize
To the function of the data cached carry out abnormal monitoring of each application terminal in application terminal cluster.
Preferably, in the above embodiments of the present application one, monitoring processor 141 is also used to drive the application terminal of quantity exception
The hot spot data table of read access hotspot database reads all hot spot datas, and all hot spot datas read are synchronous
It is cached in the memory of application terminal.
Above-mentioned monitoring processor 141, opening can be used for after exception occurs in each application terminal in the cluster of application terminal
Processing.The monitoring processor in monitoring server is cached after detecting abnormal prompt information, caching monitoring server will drive
The hot spot data table of the hotspot database of dynamic application terminal access database terminal corresponding with quantity exception information, re-reads
All hot spot datas, and all hot spot datas read are cached in the locally applied memory of the application terminal.With
It realizes to abnormal data cached refreshing, to solve the problems, such as local cache data exception.
Embodiment 2
According to the embodiment of the present application, a kind of method of data cached monitoring method based on distributed system is additionally provided
Embodiment, it should be noted that step shown in the flowchart of the accompanying drawings can be in such as a group of computer-executable instructions
It is executed in computer system, although also, logical order is shown in flow charts, and it in some cases, can be with not
The sequence being same as herein executes shown or described step.
Fig. 2 is illustrated according to the process of the data cached monitoring method based on distributed system of the embodiment of the present application two
Figure.
As shown in Fig. 2, this method can be applied in caching monitoring server, from the angle of the caching monitoring server to this
The implementation process of data cached monitoring method of the application based on distributed system is described in detail, and may include walking as follows
It is rapid:
Step S20, detects whether the hot spot data established in the hot spot data table of correspondence with application terminal cluster is sent out
It is raw to update, wherein application terminal cluster registers the hot spot data of local cache to hot spot data table.
In above-mentioned steps S20, hot spot data table can be saved to hotspot database, can be visited by caching monitoring server
It asks hotspot database, to read the hot spot data in the hot spot data table in the database, detects whether the hot spot data updates.
Above-mentioned hot spot data database can independently be stored in a third-party server end, can also be stored directly in caching monitoring clothes
It is engaged in device.
Step S22 will be with hot spot data table in the case where detecting that the hot spot data in hot spot data table updates
The middle associated hot spot data buffer status of hot spot data updated is revised as state to be updated, wherein with hot spot data table
In the associated hot spot data buffer status of hot spot data that updates be pre-stored in buffer status database.
In above-mentioned steps S22, if caching monitoring server detects the hot spot in the hot spot data table of hotspot database
Data change, then hot spot number corresponding with the hotspot database in buffer status database will be modified by caching monitoring server
Buffer status according to the hot spot data of table is state to be updated.
Herein it should be noted that the buffer status database in above-mentioned steps is for saving hot spot data buffer status,
And the related information for characterizing hot spot data buffer status Yu corresponding hot spot data.Above-mentioned hotspot database can be with
Buffer status database merges, and is merged into a database.In addition, the database of the merging can independently be stored in one
Third-party server end can also be stored directly in caching monitoring server.
Step S24, if hot spot data buffer status is state to be updated, driving application terminal cluster refreshes local cache
Hot spot data.
In above-mentioned steps S24, time of the monitoring server to set, periodic scanning buffer status database are cached.When sweeping
When to retouch hot spot data buffer status in buffer status database be state to be updated, caching monitoring server will driving application
Local cache hot spot data corresponding with the hot spot data is refreshed in application terminal in terminal cluster.
In the above embodiments of the present application two, monitoring server is cached to the hot spot number in the hot spot data table of hotspot database
According to real time monitoring, monitoring server is cached once finding that the hot spot data in the hot spot data table in hotspot database becomes
Change, then modifies the caching shape of the hot spot data of hot spot data table corresponding with the hotspot database in buffer status database at once
State is state to be updated, to guarantee the accuracy of data in buffer status database.
At the same time, caching monitoring server is again scanned buffer status database with the unit time, if caching
When monitoring server detects that the hot spot data buffer status in buffer status database is state to be updated, monitoring service is cached
Device will drive the application terminal in the cluster of application terminal to refresh local cache hot spot data corresponding with the hot spot data.
Step S20 provided by the above embodiments of the present application two to step S24 can be used on caching monitoring server,
In implementation process, a kind of embodiment of the caching monitoring server in above-described embodiment two can be Internet bank client
End for realize refresh " at 30 minutes in, user strange land (transprovincially) occur user log in behavior belong to high risk behavior " this
As soon as caching monitoring server used in regular, below by taking the caching monitoring server as an example, above-described embodiment two is carried out
Detailed description.
In above-described embodiment one, " at 30 minutes, user occurs user's login behavior in strange land (transprovincially) and belongs to height
This rule of risk behavior " can regard it as a hot spot data, can be stored in the hot spot server of bank.Bank
It caches monitoring server and implementing monitoring is carried out to this hot spot data in the hot spot data table in bank's hotspot database.Work as silver
Row hot spot server modifies to this hot spot data, be revised as " in 20 minutes, user strange land (transprovincially) occur
User logs in behavior and belongs to high risk behavior " when, the caching monitoring server of bank will be modified at once in buffer status database
The buffer status of the rule of hot spot data table corresponding with the hotspot database is state to be updated.At the same time, bank
Caching monitoring server be scanned with the unit time that (unit time may is that 1 second kind, 1 point to buffer status database again
Clock or 1 hour this kind of form, are also possible to other time forms, such as: user logged in every time using Internet bank's client,
User is operated etc. every time using Internet bank's client), if caching monitoring server detects buffer status database
In this hot spot data buffer status be it is to be updated when, the caching monitoring server of bank will drive it is all be equipped with network silver
The application terminal of row client is updated hot spot data corresponding with this hot spot data in its local cache.
Preferably, as shown in figure 3, in the scheme that the above embodiments of the present application two provide, the driving application of step S24 realization
Terminal cluster refreshes the scheme of the hot spot data of local cache, may include that step is implemented as follows:
Step S241 sends refresh notification to application terminal cluster so that application terminal in the cluster of application terminal according to
Refresh notification updates hot spot data.Specifically, the application terminal in the step can access hot spot data by refresh notification
Table to read updated hot spot data, and modifies local hot spot data using the updated hot spot data, thus real
Existing application terminal updates hot spot data according to refresh notification.
Above scheme may be implemented to send refresh notification to after the cluster of application terminal, and refresh notification triggers application terminal
The hot spot data table of application terminal access hotspot database in cluster, scan hot spot tables of data are detecting hot spot data table
In there are after updated hot spot data, can hot spot data after buffer update.Herein it should be noted that in buffer update
During hot spot data afterwards, old hot spot data can be first deleted, then current updated hot spot data is cached to this
In the memory of ground application, old hot spot data directly can also be replaced using updated hot spot data, in addition, if considering
The demand that hot spot data restores can be taken current updated hot spot data being cached to it in locally applied memory
Afterwards, old hot spot data is cached into certain time, be automatically deleted after some time.
Above scheme can also be used on every application terminal in the cluster of application terminal.When application terminal receive it is slow
After the refresh notification for depositing monitoring server transmission, every application terminal in application cluster accesses hot spot data according to refresh notification
The hot spot data table in library reads the local of the every application terminal of updated hot spot data and caching into application terminal cluster
In the memory of application.
In specific implementation process, a kind of embodiment of the application terminal cluster in above-described embodiment two can be net
Network bank client is to realize that " at 30 minutes, user logs in behavior in strange land (transprovincially) generation user and belongs to height for refreshing
Application terminal used in this rule of risk behavior ", below just with a certain in the application terminal cluster be equipped with network silver
For row client application terminal, above-described embodiment two is described in detail.
In above-described embodiment two, " at 30 minutes, user occurs user's login behavior in strange land (transprovincially) and belongs to height
This rule of risk behavior " can regard it as a hot spot data, can be stored in the hot spot server of bank.Work as bank
Hot spot server modifies to this hot spot data, is revised as that " in 20 minutes, user uses in strange land (transprovincially)
Family logs in behavior and belongs to high risk behavior " when, the caching monitoring server of bank can detect the update of this hot spot data, lead to
Know the application terminal.This is equipped with the application terminal of Internet bank's client after receiving update notification, which visits
Ask the hot spot data table of bank's hotspot database, reading is updated to that " in 20 minutes, user uses in strange land (transprovincially)
Family log in behavior belong to high risk behavior " hot spot data cache to the memory of the local network bank client of the application terminal
In the middle.
Preferably, as shown in figure 4, in the above embodiments of the present application two, step S22 will with occur more in hot spot data table
The associated hot spot data buffer status of new hot spot data is revised as before state to be updated, can also be performed and step is implemented as follows
It is rapid:
Step S211, when any one or more application terminals in the cluster of application terminal start for the first time, registration is each
For the initialization information of the hot spot data cached in application terminal to buffer status database, initialization information includes: application terminal
Machine name, IP address, caching title, hot spot data buffer status, timestamp, cached version;
Above-mentioned steps S211 can be used on the data base processor of database terminal.One in the cluster of application terminal
Or the initialization information of the hot spot data cached in each application terminal is being delayed when starting first time in multiple application terminals
It deposits in slip condition database and is registered, the information of each application terminal initialization may include: the machine name of application terminal, IP
Location, caching title, hot spot data buffer status, timestamp, cached version etc..Above-mentioned initialization information main purpose is to realize mark
Know application terminal, read geographical location and confirms the basic functions such as cached version.
Hot spot data is being loaded onto application terminal by step S213, after initializing initialization information success, is obtained every
The caching registration information of a application terminal.
In above-mentioned steps S213, the application terminal of the initialization in the cluster of application terminal is complete in normal load hot spot data
After the initialization of the pairs of terminal, the memory of database terminal will obtain the caching registration information of the application terminal.
Preferably, as shown in figure 5, hot spot data buffer status includes: in the scheme that the above embodiments of the present application two provide
State to be updated and update completion status, wherein realize in step S241 so that the application terminal in the cluster of application terminal updates
After hot spot data, it can also be performed and step is implemented as follows:
Step S2451 receives the refreshing completion notice that the application terminal in the cluster of application terminal generates.
Step S2453, using above-mentioned refreshing completion notice by the hot spot data buffer status in buffer status database from
Condition conversion to be updated is to update completion status.
Above-mentioned steps S2451 is into step S2453, and application terminal in the cluster of application terminal is by updated hot spot data
After being cached in the application memory of locally applied terminal, which, which generates, refreshes completion notice.Buffer status database
After receiving the refreshing completion notice, by the hot spot data buffer status in buffer status database from condition conversion to be updated
To update completion status.With the hot spot number for preventing caching monitoring server from application terminal cluster being driven to refresh local cache repeatedly
According to avoiding the waste to hot spot data base resource.
Preferably, in the scheme that the above embodiments of the present application two provide, refresh in step S24 in driving application terminal cluster
After the hot spot data of local cache, it can also be performed and step is implemented as follows:
Step S251, whether the quantity for detecting the caching registration information of each application terminal in the cluster of application terminal is identical,
If it is not the same, then reading the caching registration information of the application terminal of quantity exception, and the prompt information of amount shipped out exception;Or
Person
Step S253, whether the hot spot data buffer status for detecting each application terminal in the cluster of application terminal is consistent, such as
Fruit is inconsistent, then reads the caching registration information of the application terminal of hot spot data buffer status exception, and it is slow to issue hot spot data
Deposit the prompt information of abnormal state.
Above-mentioned steps S251 to step S253 is judged extremely each application terminal in application terminal cluster
Specific implementation step.Determine that abnormal method can be divided into two kinds.Wherein, in step S251, monitoring server is cached to application
The caching registration information in each application in terminal cluster is detected, and the caching registration information of each application terminal is detected
Whether number of entries is identical.If the cache information quantity of the cache information quantity of some application terminal and other application terminal
It is abnormal then to determine that the cache information of the application terminal exists, reads the slow of the application terminal of the registration information quantity exception for difference
Registration information is deposited, and issues the prompt information of caching registration information quantity exception.Alternatively, by step S253, caching monitoring clothes
Business device detects the hot spot data buffer status of each application terminal in application terminal cluster, detects each application terminal
Buffer status it is whether consistent.If it is poor that the buffer status of some application terminal and the buffer status of other application terminal exist
It is different, then it is abnormal to determine that the cache information of application terminal corresponding with the hot spot data buffer status that there is exception exists, reads
There is the caching registration information of abnormal application terminal in the cache information, and send the prompt letter of hot spot data buffer status exception
Breath.To realize caching monitoring server to the function of the data cached carry out abnormal monitoring of each application terminal in application terminal cluster
Energy.
Preferably, in the scheme that the above embodiments of the present application two provide, the abnormal application of quantity is read eventually in step S251
The caching note of the application terminal of hot spot data buffer status exception is read after the caching registration information at end or in step S253
After volume information, it can also be performed and step is implemented as follows:
Step S261, the hot spot data table of the application terminal access hotspot database of driving quantity exception, reads all heat
Point data;
Step S263, by all hot spot data synchronization cachings read into the memory of application terminal.
Above-mentioned steps S261 to S263 is that each application terminal in the cluster of application terminal the specific implementation after exception occurs
Step.The monitoring processor in monitoring server is cached after detecting abnormal prompt information, caching monitoring server will drive
The hot spot data table of the hotspot database of dynamic application terminal access database terminal corresponding with quantity exception information, re-reads
All hot spot datas, and all hot spot datas read are cached in the locally applied memory of the application terminal.With
It realizes to abnormal data cached refreshing, to solve the problems, such as local cache data exception.
It should be noted that for the various method embodiments described above two, for simple description, therefore, it is stated as a systems
The combination of actions of column, but those skilled in the art should understand that, the application is not limited by the described action sequence, because
For according to the application, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art should also know
It knows, embodiment two described in this description belongs to preferred embodiment two, and related actions and modules is not necessarily originally
Necessary to application.
Through the above description of the embodiments, those skilled in the art can be understood that according to above-mentioned implementation
The method of example two can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but very
The former is more preferably embodiment in more situations.Based on this understanding, the technical solution of the application is substantially in other words to existing
The part for having technology to contribute can be embodied in the form of software products, which is stored in one and deposits
In storage media (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, count
Calculation machine, server or network equipment etc.) execute each embodiment two of the application method.
Embodiment 3
Fig. 6 is the schematic diagram according to the data cached monitoring device based on distributed system of the embodiment of the present application three.
As shown in fig. 6, the apparatus may include: detection module 301, modification block of state 303 and drive module 305.
Wherein, detection module 301, for detecting the heat established in the hot spot data table of correspondence with application terminal cluster
Whether point data updates, wherein application terminal cluster registers the hot spot data of local cache to hot spot data table;Modification
Block of state 303 will be with hot spot data table in the case where detecting that the hot spot data in hot spot data table updates
The middle associated hot spot data buffer status of hot spot data updated is revised as state to be updated, wherein with hot spot data table
In the associated hot spot data buffer status of hot spot data that updates be pre-stored in buffer status database;Drive mould
Block 305, if being state to be updated for hot spot data buffer status, driving application terminal cluster refreshes the hot spot of local cache
Data.
It, can herein it should be noted that the hot spot data table in above-mentioned apparatus embodiment can be saved to hotspot database
To access hotspot database by caching monitoring server, to read the hot spot data in the hot spot data table in the database,
Detect whether the hot spot data updates.Above-mentioned hot spot data database can independently be stored in a third-party server end,
It can be stored directly in caching monitoring server.
Buffer status database in above-described embodiment can be used to save hot spot data buffer status, and for characterizing
The related information of hot spot data buffer status and corresponding hot spot data.Above-mentioned hotspot database can be with buffer status data
Library merges, and is merged into a database.In addition, the database of the merging can also independently be stored in a third party's service
Device end can also be stored directly in caching monitoring server.
In the above embodiments of the present application three, monitoring server is cached to the hot spot number in the hot spot data table of hotspot database
According to real time monitoring, monitoring server is cached once finding that the hot spot data in the hot spot data table in hotspot database becomes
Change, then modifies the caching shape of the hot spot data of hot spot data table corresponding with the hotspot database in buffer status database at once
State is state to be updated, to guarantee the accuracy of data in buffer status database.
At the same time, caching monitoring server is again scanned buffer status database with the unit time, if caching
When monitoring server detects that the hot spot data buffer status in buffer status database is state to be updated, monitoring service is cached
Device will drive the application terminal in the cluster of application terminal to refresh local cache hot spot data corresponding with the hot spot data.
Modules provided by the above embodiments of the present application three can use on caching monitoring server, implementation process
In, a kind of embodiment of the caching monitoring server in above-described embodiment three can be Internet bank's client to realize
Refresh " at 30 minutes, user occurs user's login behavior in strange land (transprovincially) and belongs to high risk behavior " this regular institute
The caching monitoring server used, below just by taking the caching monitoring server as an example, above-described embodiment three is described in detail.
In above-described embodiment three, " at 30 minutes, user occurs user's login behavior in strange land (transprovincially) and belongs to height
This rule of risk behavior " can regard it as a hot spot data, can be stored in the hot spot server of bank.Bank
It caches monitoring server and implementing monitoring is carried out to this hot spot data in the hot spot data table in bank's hotspot database.Work as silver
Row hot spot server modifies to this hot spot data, be revised as " in 20 minutes, user strange land (transprovincially) occur
User logs in behavior and belongs to high risk behavior " when, the caching monitoring server of bank will be modified at once in buffer status database
The buffer status of the rule of hot spot data table corresponding with the hotspot database is state to be updated.At the same time, bank
Caching monitoring server be scanned with the unit time that (unit time may is that 1 second kind, 1 point to buffer status database again
Clock or 1 hour this kind of form, are also possible to other time forms, such as: user logged in every time using Internet bank's client,
User is operated etc. every time using Internet bank's client), if caching monitoring server detects buffer status database
In this hot spot data buffer status be it is to be updated when, the caching monitoring server of bank will drive it is all be equipped with network silver
The application terminal of row client is updated hot spot data corresponding with this hot spot data in its local cache.
Herein it should be noted that above-mentioned detection module 301, modification block of state 303 and drive module 305 correspond in fact
The step S20 to step S24 in example two is applied, three modules are identical as example and application scenarios that corresponding step is realized, but
It is not limited to the above embodiments two disclosure of that.It should be noted that above-mentioned module can be run as a part of of device
In the caching monitoring server 14 that embodiment one provides, hardware realization can also be passed through by software realization.
The above-mentioned drive module 10 of the application is after driving application terminal cluster refreshes the hot spot data of local cache, using end
The receiving module of end cluster receives refresh notification.
The read module of application terminal in the cluster of application terminal accesses the hot spot number of hotspot database according to refresh notification
According to table, updated hot spot data is read.Updated hot spot data is cached to locally applied by the update module of application terminal
Memory in, realize update to hot spot data.
Modules provided in the above embodiments of the present application three can be with every application terminal in terminal cluster
Upper utilization.After application terminal receives the refresh notification that caching monitoring server is sent, every application in application cluster is eventually
End accesses the hot spot data table of hotspot database according to refresh notification, reads updated hot spot data and caches to application terminal
In the locally applied memory of every application terminal in cluster.
In specific implementation process, a kind of embodiment of the application terminal cluster in above-described embodiment three can be net
Network bank client is to realize that " at 30 minutes, user logs in behavior in strange land (transprovincially) generation user and belongs to height for refreshing
Application terminal used in this rule of risk behavior ", below just with a certain in the application terminal cluster be equipped with network silver
For row client application terminal, above-described embodiment three is described in detail.
In above-described embodiment three, " at 30 minutes, user occurs user's login behavior in strange land (transprovincially) and belongs to height
This rule of risk behavior " can regard it as a hot spot data, can be stored in the hot spot server of bank.Work as bank
Hot spot server modifies to this hot spot data, is revised as that " in 20 minutes, user uses in strange land (transprovincially)
Family logs in behavior and belongs to high risk behavior " when, the caching monitoring server of bank can detect the update of this hot spot data, lead to
Know the application terminal.This is equipped with the application terminal of Internet bank's client after receiving update notification, which visits
Ask the hot spot data table of bank's hotspot database, reading is updated to that " in 20 minutes, user uses in strange land (transprovincially)
Family log in behavior belong to high risk behavior " hot spot data cache to the memory of the local network bank client of the application terminal
In the middle.
The corresponding hot spot data buffer status of hot spot data table in buffer status database is repaired in modification block of state 303
It is changed to before state to be updated, if any one or more application terminals in the cluster of application terminal are the case where starting for the first time
Under, initialization module is used to register the initialization information of the hot spot data cached in each application terminal to buffer status data
Library, initialization information include: the machine name of application terminal, IP address, caching title, hot spot data buffer status, timestamp, delay
Keep standing this.
Above-mentioned initialization module can use on the data base processor of database terminal.One in the cluster of application terminal
A or multiple application terminals exist the initialization information of the hot spot data cached in each application terminal when starting first time
It is registered in buffer status database, the information of each application terminal initialization may include: the machine name of application terminal, IP
Address, caching title, hot spot data buffer status, timestamp, cached version etc..Above-mentioned initialization information main purpose is to realize
Application terminal is identified, geographical location is read and confirms the basic functions such as cached version.
If the initialization module of application terminal after hot spot data is loaded onto application terminal, initializes the initialization
Information success, the sub-acquisition module of database terminal will obtain the caching registration information of each application terminal.
Above-mentioned sub-acquisition module, the application terminal of the initialization in the cluster of application terminal in normal load hot spot data,
After completing to the initialization of the terminal, the sub-acquisition module of the memory of server terminal will obtain the caching of the application terminal
Registration information.
In above-described embodiment three, hot spot data buffer status includes: state to be updated and update completion status, wherein is driven
Updated hot spot data is cached to it in locally applied memory in the application terminal in the cluster of application terminal by dynamic model block 305
Afterwards, the generation module of the application terminal in the cluster of application terminal, which generates, refreshes completion notice.It will be cached using completion notice is refreshed
Hot spot data buffer status in slip condition database updates completion status from condition conversion to be updated.
Updated hot spot data is cached in the application of locally applied terminal by the application terminal in the cluster of application terminal
After depositing, which, which generates, refreshes completion notice.Buffer status database, will after receiving the refreshing completion notice
Hot spot data buffer status in buffer status database updates completion status from condition conversion to be updated.To prevent caching from supervising
Control server drives application terminal cluster to refresh the hot spot data of local cache repeatedly, avoids the wave to hot spot data base resource
Take.
After drive module 305 drives application terminal cluster to refresh the hot spot data of local cache, monitoring service is cached
The first sub- detection module in device, the quantity of the caching registration information for detecting each application terminal in the cluster of application terminal are
It is no identical, if it is not the same, then reading the caching registration information of the application terminal of quantity exception, and the prompt of amount shipped out exception
Information;Or the second sub- detection module in caching monitoring server detects the hot spot of each application terminal in the cluster of application terminal
Whether data buffer storage state is consistent, if it is inconsistent, reading the caching note of the application terminal of hot spot data buffer status exception
Volume information, and issue the prompt information of hot spot data buffer status exception.
Above-mentioned two self-detection module is specific to being judged extremely using each application terminal in terminal cluster
Implementation steps.Determine that abnormal method can be divided into two kinds.Wherein, the first sub- detection module is for caching monitoring server
Caching registration information in each application in application terminal cluster is detected, the caching registration of each application terminal is detected
Whether the number of entries of information is identical.If the caching of the cache information quantity of some application terminal and other application terminal is believed
Quantity difference is ceased, then it is abnormal to determine that the cache information of the application terminal exists, it is whole to read the abnormal application of the registration information quantity
The caching registration information at end, and issue the prompt information of caching registration information quantity exception.Alternatively, the second sub- detection module, is used
It detects, detects in hot spot data buffer status of the caching monitoring server to each application terminal in application terminal cluster
Whether the buffer status of each application terminal is consistent.If the buffer status of some application terminal is slow with other application terminal
The state of depositing has differences, then determines that the cache information of application terminal corresponding with the hot spot data buffer status of presence exception is deposited
In exception, reads the cache information and there is the caching registration information of abnormal application terminal, and send hot spot data buffer status
Abnormal prompt information.To realize data cached progress of the caching monitoring server to each application terminal in application terminal cluster
The function of abnormal monitoring.
Further, after reading the caching registration information of application terminal of quantity exception, or hot spot number is being read
After caching registration information according to the application terminal of buffer status exception, the application terminal of sub- drive module driving quantity exception is read
The hot spot data table for taking access hotspot database, reads all hot spot datas;And all hot spot datas read are synchronized slow
It is stored in the memory of application terminal.
The step of above-mentioned sub- drive module is carried out is after exception occurs in each application terminal in the cluster of application terminal
Specific implementation step.The monitoring processor in monitoring server is cached after detecting abnormal prompt information, caching monitoring clothes
Business device will drive the hot spot data table of the hotspot database of application terminal access database terminal corresponding with quantity exception information,
All hot spot datas are re-read, and all hot spot datas read are cached to the locally applied memory of the application terminal
In the middle.To realize to abnormal data cached refreshing, to solve the problems, such as local cache data exception.
Above-mentioned the embodiment of the present application serial number is for illustration only, does not represent the advantages or disadvantages of the embodiments.
In above-described embodiment of the application, all emphasizes particularly on different fields to the description of each embodiment, do not have in some embodiment
The part of detailed description, reference can be made to the related descriptions of other embodiments.
In several embodiments provided herein, it should be understood that disclosed device, it can be by another way
It realizes.Wherein, the apparatus embodiments described above are merely exemplary, such as the division of the unit, only a kind of
Logical function partition, there may be another division manner in actual implementation, such as multiple units or components can combine or can
To be integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual
Coupling, direct-coupling or communication connection can be through some interfaces, the indirect coupling or communication connection of unit or module,
It can be electrical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product
When, it can store in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially
The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words
It embodies, which is stored in a storage medium, including some instructions are used so that a computer
Equipment (can for personal computer, server or network equipment etc.) execute each embodiment the method for the application whole or
Part steps.And storage medium above-mentioned includes: that USB flash disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited
Reservoir (RAM, Random Access Memory), mobile hard disk, magnetic or disk etc. be various to can store program code
Medium.
The above is only the preferred embodiment of the application, it is noted that for the ordinary skill people of the art
For member, under the premise of not departing from the application principle, several improvements and modifications can also be made, these improvements and modifications are also answered
It is considered as the protection scope of the application.