The content of the invention
It is an object of the present invention to provide a kind of new solution for data cached synchronous method.
According to the first aspect of the invention, there is provided a kind of data cached synchronous method, multicenter service system is implemented on,
The multicenter service system includes multiple service centres, and each service centre comprises at least application service layer, accumulation layer
And cache layer, methods described include:
When first service center has data to be updated, distinguished by the application service layer at the first service center
Trigger the accumulation layer at the first service center, data corresponding to cache layer renewal, and generate comprising corresponding data renewal letter
The log cache table of breath is to be stored in the accumulation layer;
By the accumulation layer at the first service center by the data of renewal and the log cache table, second is synchronized to
The accumulation layer of service centre, caching is realized according to the log cache table for the application service layer at the second service center
Data syn-chronization.
Optionally, methods described also includes:
By the application service layer at the first service center, detect that the accumulation layer is stored with the log cache table
When, the data fresh information corresponding to the log cache table acquisition is read, notify the second service center applies clothes
Layer be engaged in trigger data cached synchronization;
The data fresh information is received by the application service layer at the second service center, detects second clothes
When the accumulation layer at business center is stored with the log cache table corresponding with the data fresh information, obtained from the accumulation layer
Corresponding with the log cache table to update the data, the cache layer for triggering the second service center correspondingly updates the data, with reality
Existing data cached synchronization.
Optionally, methods described also includes:
By the application service layer at first service center, whether the first service center is detected with the default period 1
It is stored with the log cache table.
Optionally, methods described also includes:
By the application service layer at the second service center, the second service center is detected with default second round
Accumulation layer, if be stored with from the synchronous log cache table of the accumulation layer of service centre other described;
When the application service layer at the second service center, to detect that the accumulation layer at the second service center has described same
During the log cache table of step, updated the data from accumulation layer acquisition is corresponding with the log cache table, triggering described second
The cache layer of service centre correspondingly updates the data, to realize data cached synchronization.
Optionally, methods described also includes:
After data cached synchronization is completed at the second service center, pass through the application service at the second service center
Layer, trigger the log cache table corresponding to the accumulation layer deletion at the second service center, and data syn-chronization corresponding to generation
The cache synchronization of information completes instruction, to notify the accumulation layer at the first service center;
Instruction is synchronously completed by the accumulation layer order caching at the first service center, after confirming data cached synchronization,
Delete the log cache table corresponding with cache synchronization completion instruction.
Optionally, methods described also includes:
Unique corresponding log cache table mark is also stored with the log cache table;
And/or
The accumulation layer at the first service center and the second service center is MySQL database.
According to the second aspect of the invention, there is provided a kind of data cached synchronizer, applied to multicenter service system,
The multicenter service system includes multiple service centres, and each service centre comprises at least application service layer, accumulation layer
And cache layer, the data cached synchronizer are arranged at any one service centre side, including:
Local update unit, for when the service centre has data to be updated, passing through the application of the service centre
Data corresponding to service layer triggers the accumulation layer of the service centre respectively, cache layer updates, and generate comprising corresponding data more
The log cache table of fresh information is to be stored in the accumulation layer;
Synchronization unit is stored, for the accumulation layer by the service centre by the data of renewal and the log cache
Table, be synchronized to the accumulation layer of other service centres, for other service centres application service layer according to the log cache table
To realize data cached synchronization.
Optionally, the equipment also includes:
Cache synchronization notification unit, for the application service layer by the service centre, detect the accumulation layer storage
When having the log cache table, read the log cache table obtain corresponding to the data fresh information, notify other services
The application service layer at center is to trigger data cached synchronization;
And/or
Cache synchronization response unit, received by the application service layer of the service centre described in other service centres notice
Data fresh information, detect that the accumulation layer of the service centre is stored with the caching day corresponding with the data fresh information
During will table, the cache layer for updating the data, triggering the service centre corresponding with the log cache table is obtained from the accumulation layer
It is corresponding to update the data, to realize data cached synchronization.
Optionally, the equipment also includes:
First detection unit, for the application service layer by the service centre, the is stated with the detection of default period 1
Whether one service centre is stored with the log cache table.
Optionally, the equipment also includes:
Second detection unit, for the application service layer by the service centre, with described in the detection of default second round
The accumulation layer of the service centre, if be stored with from the synchronous log cache table of the accumulation layer of service centre other described;
Cache synchronization execution unit, for when the application service layer of the service centre detect the storage of the service centre
When layer has the synchronous log cache table, from the accumulation layer obtain it is corresponding with the log cache table update the data, it is tactile
The cache layer for sending out the service centre correspondingly updates the data, to realize data cached synchronization.
Optionally, the equipment also includes:
Unit is deleted, for after the service centre completes data cached synchronization, passing through the application of the service centre
Service layer, trigger the service centre accumulation layer delete corresponding to the log cache table, and by corresponding deletion action information
Notify the accumulation layer of the service centre to the synchronous log cache table;
And/or
Response unit is deleted, for receiving the deletion of other service centres notice by the accumulation layer of the service centre
Operation information, delete the log cache table corresponding with the deletion action information.
According to the third aspect of the invention we, there is provided a kind of electronic equipment, including:
Memory and processor,
The memory is used for store instruction, described to instruct for controlling the processor to be operated to perform such as this hair
The data cached synchronous method described in any one that bright first aspect provides.
According to the fourth aspect of the invention, there is provided a kind of service centre, including:
Application service layer;
Accumulation layer;
Cache layer;
And as second aspect of the present invention provide any one data buffering device or as third aspect present invention carries
The electronic equipment of confession.
According to the fifth aspect of the invention, there is provided a kind of multicenter service system, including it is multiple such as present invention four directions
The service centre that face provides.
It was found by the inventors of the present invention that in the prior art, a kind of data cached synchronous method not yet be present, it is ensured that
In multicenter service system, when data renewal occurs for any one service centre, the cache layer energy basis of other service centres is deposited
After the synchronous log cache table of reservoir obtains the progress data renewal of data fresh information, each service centre is data cached consistent, with
Sane network service is provided.Therefore, the technical assignment or technical problem to be solved that the present invention to be realized are abilities
It is that field technique personnel never expect or it is not expected that, therefore the present invention is a kind of new technical scheme.
By referring to the drawings to the present invention exemplary embodiment detailed description, further feature of the invention and its
Advantage will be made apparent from.
Embodiment
The various exemplary embodiments of the present invention are described in detail now with reference to accompanying drawing.It should be noted that:Unless have in addition
Body illustrates that the unlimited system of part and the positioned opposite of step, numerical expression and the numerical value otherwise illustrated in these embodiments is originally
The scope of invention.
The description only actually at least one exemplary embodiment is illustrative to be never used as to the present invention below
And its application or any restrictions that use.
It may be not discussed in detail for technology, method and apparatus known to person of ordinary skill in the relevant, but suitable
In the case of, the technology, method and apparatus should be considered as part for specification.
In shown here and discussion all examples, any occurrence should be construed as merely exemplary, without
It is as limitation.Therefore, other examples of exemplary embodiment can have different values.
It should be noted that:Similar label and letter represents similar terms in following accompanying drawing, therefore, once a certain Xiang Yi
It is defined, then it need not be further discussed in subsequent accompanying drawing in individual accompanying drawing.
<Hardware configuration>
Fig. 2 is the block diagram for showing to realize the hardware configuration of the multicenter service system 1000 of embodiments of the invention.
As shown in Fig. 2 multicenter service system 1000 can include network 1100 and service centre 1200.
Network 1100 can be that wireless network can also be cable network, can be that LAN can also be wide area network.Such as
In multicenter service system 1000 shown in Fig. 2, service centre 1200-1,1200-2,1200-3 can be entered by network 1100
Row communication.
Service centre 1200 can include application service layer, accumulation layer and cache layer.In one example, service centre
1200 can be group computer.In another example, service centre 1200 can with as shown in Fig. 2 including with accumulation layer pair
Memory 1210, server 1220 corresponding with application service layer and the buffer 1230 corresponding with cache layer answered.Wherein,
Memory 1210 can include ROM (read-only storage), RAM (random access memory), the non-volatile of such as hard disk to deposit
Reservoir etc..Server 1220 is such as can be blade server, Cloud Server.Buffer 1230 for example can be memory bar,
Cache (cache memory) etc..
Multicenter service system 1000 shown in Fig. 2 is only explanatory, and never be intended to limitation the present invention, its
Using or purposes.Applied in embodiments of the invention, multicenter service system 1000 includes multiple service centres 1200, each
Service centre 1200 is used to implement the data cached synchronous method of any one provided in an embodiment of the present invention, it is assumed that one of them
Service centre 1200_1 is first service center, to perform the data cached synchronization side of any one provided in an embodiment of the present invention
Method:When first service center has data to be updated, triggered respectively by the application service layer at the first service center
Data corresponding to the accumulation layer at the first service center, cache layer renewal, and generate comprising corresponding data fresh information
Log cache table is to be stored in the accumulation layer;By the accumulation layer at the first service center by data of renewal and described
Log cache table, be synchronized to the accumulation layer at second service center, for the second service center application service layer according to institute
Log cache table is stated to realize data cached synchronization.
It will be appreciated by those skilled in the art that " first ", the skill of " second " description embodiment of the present invention merely for convenience
Art scheme and service centre is made a distinction, in actual applications, do not differentiate between first service center and second service center.Fig. 2
In illustrate only the partial devices of multicenter service system 1000.Technical staff can refer to according to presently disclosed conceptual design
Order.How control processor is operated for instruction, and this is it is known in the art that therefore being not described in detail herein.
<Embodiment of the method>
In the present embodiment, there is provided a kind of data cached synchronous method, be implemented on multicenter service system, the multicenter
Service system includes multiple service centres, and each service centre comprises at least application service layer, accumulation layer and cache layer.
In one example, the multicenter service system can be with as shown in Fig. 2 wherein, application service layer corresponds to Fig. 2
In server 1220, accumulation layer correspond to Fig. 2 in memory 1210, cache layer correspond to Fig. 2 in buffer 1230.
It should be noted that first service center and second service center described in the present embodiment, are intended merely to conveniently
Describe the technical scheme of the present embodiment and service centre is made a distinction, in data syn-chronization, service centre can both be used as the
One service centre, second service center can also be used as.In practical application, do not differentiate between in first service center and second service
The heart.
The data cached synchronous method that the present embodiment provides, as shown in figure 3, including:
Step 2100, when data to be updated be present in first service center, pass through the application at the first service center
Data corresponding to service layer triggers the accumulation layer at the first service center respectively, cache layer updates, and generate comprising corresponding
The log cache table of data fresh information is to be stored in the accumulation layer.
Wherein, data to be updated refer to that each service centre that service centre is related to when providing network service needs synchronization
Data, for example, when providing such as network game service as " king's honor ", first service center have received such as " king
The game gift bag of person's honor ", the specific data content included in the game gift bag are exactly data to be updated, each service centre
Between need the data that synchronized update king's honor game gift bag includes.
Comprising information such as filename corresponding with the data of renewal, sequence number, numberings in data fresh information, and it is included in and deposits
It is stored in the log cache table of accumulation layer.
In first service center, data corresponding to the accumulation layer renewal of application service layer triggering, and the caching of triggering
The process of data does not have sequencing corresponding to layer renewal, after accumulation layer and cache layer complete data renewal, application service layer
Log cache table of the generation comprising corresponding data fresh information simultaneously stores the log cache table to accumulation layer, for the second clothes
The application service layer at business center realizes data cached synchronization according to the log cache table.
In one example, when the accumulation layer at first service center be stored with from it is multiple it is different update the data corresponding to it is slow
Unique corresponding log cache table mark can also be included when depositing log sheet, in log cache table, with to different caching days
Will table is distinguish between.For example, when multiple different data to be updated be present, pass through the application service layer point at first service center
Not Chu Fa first service center accumulation layer and cache layer update respectively corresponding to multiple different data, and generate comprising corresponding
Data fresh information multiple log cache tables, in each log cache table comprising log cache table mark corresponding to unique with
Make a distinction.
Step 2200, by the accumulation layer at the first service center by the data of renewal and the log cache table,
Be synchronized to the accumulation layer at second service center, for the second service center application service layer according to the log cache table
To realize data cached synchronization.
Delay it should be noted that the accumulation layer at first service center and second service center can utilize synchronization mechanism to realize
The synchronization of deposit data and caching log sheet.For example, accumulation layer can utilize MySQL database to realize synchronously, MySQL is a pass
It is type data base management system, wherein MySQL binlog are MySQL binary logs, can be used for checking MySQL database
Change history, MySQL database incremental backup and recovery, MySQL duplication.Therefore, in the present embodiment, MySQL is utilized
Binlog realizes data cached and log cache table the synchronization of the accumulation layer at first service center and second service center, herein
Repeat no more.
Specifically, by the data that this data updated of first service center are contained in log cache table update letter
Breath, therefore in this step, the accumulation layer at first service center is in the accumulation layer by the data syn-chronization of renewal to second service center
While, above-mentioned log cache table can be also synchronized to the accumulation layer at second service center, so, second service center can root
According to the data fresh information in the log cache table, the data to be updated corresponding to acquisition from the accumulation layer at second service center
Data renewal is carried out, to realize data cached synchronization.
The data of renewal and log cache table are synchronized to depositing for second service center by the accumulation layer at first service center
After reservoir, the application service layer at second service center can cache the slow of center according to the notification triggers second at first service center
Deposit the data cached synchronization of layer;The application service layer at second service center can also detect the second clothes in default second round
The accumulation layer at business center be stored with from the accumulation layers of other service centres synchronous log cache table when, the caching of triggering second center
Cache layer data cached synchronization.
In one example, the application service layer at second service center is slow according to the notification triggers second at first service center
The data cached synchronization of the cache layer at center is deposited, as shown in figure 4, the method that the present embodiment provides can also include:
Step 3100, the application service layer by the first service center, it is described to detect that the accumulation layer is stored with
During log cache table, read the log cache table obtain corresponding to the data fresh information, notify in the second service
The application service layer of the heart is to trigger data cached synchronization.
Specifically, data fresh information can be notified second service by the application service layer at first service center by interface
The application service layer at center, to trigger data cached synchronization.
In one example, can be by the application service layer at first service center, with detection of default period 1 the
Whether one service centre is stored with log cache table, in order to detect that when being stored with log cache table, notice is other to be taken
Trigger data cached synchronization in business center.
For example, it is 1s that can set the period 1, by the application service layer at first service center, using 1s as cycle detection
Whether the accumulation layer at first service center is stored with log cache table, and log cache table is stored with if detected, reads slow
Data fresh information corresponding to log sheet acquisition is deposited, and it is slow to trigger by the application service layer at interface notification second service center
Deposit data is synchronous.Wherein, the period 1 can be configured according to the demand in practical application, and the present embodiment is not limited this
It is fixed.
Step 3200, the application service layer reception data fresh information by the second service center, are detected
When the accumulation layer at the second service center is stored with the log cache table corresponding with the data fresh information, from described
Accumulation layer obtains the corresponding renewal of cache layer for updating the data, triggering the second service center corresponding with the log cache table
Data, to realize data cached synchronization.
Specifically, the application service layer at second service center can be according to the filename in the data fresh information of reception
And/or whether sequence number and/or numbering, the accumulation layer at detection second service center are stored with corresponding log cache table.Work as detection
Accumulation layer to second service center is stored with what is matched with the filename in data fresh information and/or sequence number and/or numbering
During log cache table, the log cache table is defined as log cache table corresponding with data fresh information.
When it is determined that the accumulation layer at second service center is stored with log cache table corresponding with data fresh information, from depositing
Reservoir obtains that log cache table is corresponding updates the data with this, and the cache layer for triggering second service center updates the data, realization
Data cached synchronization.
When network is in the presence of postponing or being abnormal, with this information it is possible to determine the accumulation layer for going out second service center is not stored with data more
Log cache table corresponding to fresh information, is retried in such a case, it is possible to return, and detects the accumulation layer at second service center again
Log cache table corresponding with data fresh information whether is stored with, corresponding with data fresh information day is cached until detecting
Untill will table, updated the data further according to corresponding to the acquisition of log cache table, the cache layer at triggering second service center is corresponding to be updated
Data, realize data cached synchronization.So, second service center can be caused to obtain data renewal letter according to log cache table
Breath carries out data renewal, ensure it is data cached with first service center in it is data cached unanimously so as to ensureing to provide sane net
Network service.
In another example, the application service layer at second service center detects second service in default second round
The accumulation layer at center be stored with from the accumulation layers of other service centres synchronous log cache table when, the caching of triggering second center
The data cached synchronization of cache layer, as shown in figure 5, the method that the present embodiment provides can also include:
Step 4100, the application service layer by the second service center, with detection of default second round described the
The accumulation layer of two service centres, if be stored with from the synchronous log cache table of the accumulation layer of service centre other described.
In this example, the data of renewal and the log cache table are synchronized to by the accumulation layer of other service centres
After the accumulation layer of two service centres, the application service layer at second service center is not notified to trigger data cached renewal, but the
Two service centres set second round, by the application service layer at second service center in the clothes of detection of default second round second
Whether the accumulation layer at business center is stored with from the synchronous log cache table of the accumulation layer of other service centres.
Wherein, default second round can be configured according to the demand in practical application, and the present embodiment is not made to this
Limitation.For example, second round could be arranged to 2s, then by the application service layer at second service center, using 2s as cycle detection
Whether the accumulation layer at second service center is stored with from the synchronous log cache table of the accumulation layer of other service centres.
Step 4200, detect the accumulation layer at the second service center when the application service layer at the second service center
When having the synchronous log cache table, from the accumulation layer obtain it is corresponding with the log cache table update the data, triggering
The cache layer at the second service center correspondingly updates the data, to realize data cached synchronization.
When the application service layer at second service center detects with default second round the accumulation layer at second service center
It is corresponding with log cache table in acquisition accumulation layer to update the data when being stored with synchronous log cache table, trigger second service
The cache layer at center correspondingly updates the data, and realizes data cached synchronization.
It is understood that if the application service layer at second service center is not detected by second with default second round
The accumulation layer of service centre is stored with synchronous log cache table, then need not trigger data cached synchronous process.
Optionally, after data cached synchronization is completed, the accumulation layer of service centre can delete log cache table, to ensure
Cache synchronization will not be repeated or the abnormal conditions such as data cached synchronization is out of order occur.In one example, as shown in fig. 6, originally
The method that embodiment provides can also further include:
Step 5100, when the second service center complete data cached synchronization after, pass through the second service center
Application service layer, the log cache table corresponding to the accumulation layer deletion at the second service center is triggered, and corresponding to generation
The cache synchronization of data synchronization information completes instruction, to notify the accumulation layer at the first service center.
Wherein, data synchronization information includes realizing data cached synchronous data message, for example, can include data and
The title of data.By the application service layer at second service center, delay corresponding to the accumulation layer deletion at triggering second service center
While depositing log sheet, generation cache synchronization completes instruction, and the cache synchronization is completed comprising corresponding data syn-chronization to believe in instruction
Breath, and log cache table corresponding to the accumulation layer deletion at first service center is notified, to avoid repeating cache synchronization or delay
The synchronous abnormal conditions such as out of order of deposit data.
Step 5200, instruction is synchronously completed by the accumulation layer order caching at the first service center, confirm caching number
After synchronization, the log cache table corresponding with cache synchronization completion instruction is deleted.
Instruction is synchronously completed by the accumulation layer order caching at first service center, completes to wrap in instruction according to cache synchronization
The data synchronization information contained, it is determined that log cache table corresponding with cache synchronization completion instruction, and the log cache table is deleted, with
Avoid repeating cache synchronization or the abnormal conditions such as data cached synchronization is out of order occur.
For the application scenarios of multiple service centre's cache synchronizations, source service centre, corresponding to first in the present embodiment
Service centre, the cache synchronization that can receive other service centres complete instruction, and source service centre is in all services are confirmed
After the heart all completes data cached synchronization, log cache table that itself is stored, corresponding with cache synchronization completion instruction is just deleted, with
Ensure that the data that all service centres are cached are consistent, to provide sane network service.
The data cached synchronous method that the present embodiment provides, it can be ensured that in multicenter service system, any one service
When data renewal occurs for center, the cache layer of other service centres can obtain data more according to the synchronous log cache table of accumulation layer
Fresh information carries out data renewal, realizes that each service centre is data cached consistent, to provide sane network service.
<Example>
The data cached synchronous method provided in the present embodiment is carried out furtherly with reference to the example shown in Fig. 7
It is bright.
Data syn-chronization between any two service centre include the accumulation layer of Liang Ge service centres data syn-chronization and
Cache layer is synchronous, generally as shown in Figure 7.
In the figure 7, with A the first service center of computer room and B computer room second service central instance, work as first service
When data renewal occurs for center, the data cached synchronous method that this example provides includes:
Step1, data corresponding to the accumulation layer renewal at the application service layer triggering first service center at first service center.
For example, in first service center, the data of renewal are " king's honor " game gift bag that gift bag ID is 001, first
The data included in " king's honor " credit game gift bag are updated in the application service layer triggering accumulation layer of service centre.
Step2, the application service layer generation log cache table at first service center are simultaneously stored in accumulation layer.
After data corresponding to accumulation layer renewal " king's honor " game gift bag at first service center, first service center
Application service layer generation corresponding to log cache table, log cache table be used to recording corresponding to data fresh informations.Cache day
The data fresh information included in will table for example can with as shown in the table, wherein, " major key " be used for uniquely identify the data more
Fresh information, to distinguish the fresh information of other data renewal, " caching key " is in data renewal bar specifically updates the data now
The mark of appearance, for example, in this example, " caching key " is Data Identification corresponding to the data of king's honor game gift bag.
Table one
Major key |
Cache key |
001 |
scene_001 |
Step3, the application service layer at first service center trigger cache layer from the data of accumulation layer acquisition renewal to update
Data.
In this step, the application service layer at first service center can detect first service center in the default period 1
Accumulation layer whether be stored with log cache table, if detecting, the accumulation layer at first service center is stored with log cache table,
Trigger cache layer and obtain " major key from accumulation layer:Data fresh information corresponding to 001 ", and " caching key is for corresponding acquisition
Updating the data corresponding to scene_001 ", updated according to acquired updating the data data cached in cache layer.
The data of renewal and log cache table are synchronized in second service by Step4, the accumulation layer at first service center
The accumulation layer of the heart.
First service center can specifically utilize MySQL binlog by the data of renewal " king's honor play gift bag " with
And corresponding data cached table is synchronized to the accumulation layer at the second service center on B ground.
Whether Step5, the accumulation layer at the application service layer detection second service center at second service center are stored with caching
Log sheet.
In one example, the application service layer at second service center can receive the application clothes at first service center
It is engaged in after the notice of layer, according to data fresh information, whether the accumulation layer at detection second service center is stored with corresponding caching day
Will table.
For example, contain " major key in data fresh information:001 ", then the application service layer at second service center is according to this
Data fresh information, whether the storage at detection second service center is from being stored with " major key:001 " log cache table.
If the accumulation layer for being not detected by second service center is stored with corresponding log cache table, return retries code,
Until detect that the accumulation layer at second service center is stored with corresponding log cache table.
In another example, the application service layer at second service center can detect the second clothes in default second round
Whether the accumulation layer at business center is stored with from the synchronous log cache table of other service centres.For example, second service center is answered
It is stored with accumulation layer of the service layer at detection of default second round second service center synchronous from other service centres, such as
Log cache table shown in above-mentioned table one.
If detecting, the accumulation layer at second service center is stored with from the synchronous log cache table of other service centres, is held
Row Step6, if the accumulation layer for being not detected by second service center is stored with from the synchronous log cache table of other service centres,
Any operation is not performed.
Step6, when the application service layer at second service center detects log cache table, obtained from accumulation layer with caching day
Updated the data corresponding to will table.
Second service center is according to the data fresh information " major key of first service center notice:001 ", detect the second clothes
The accumulation layer at business center is stored with and " major key:Log cache table corresponding to 001 ";Or second service center is default
Two cycles detect that the accumulation layer at second service center is stored with the log cache table from the synchronization of other service centres, such as above-mentioned
Log cache table shown in table one, the application service layer at second service center obtain and " caching in log cache table from accumulation layer
key:Updated the data corresponding to scene_001 ".
Step7, the cache layer at the application service layer triggering second service center at second service center correspondingly updates the data, real
Existing data cached synchronization.
Second service center is being got and " caching key in log cache table:Updated the data corresponding to scene_001 "
Afterwards, the cache layer for triggering second service center correspondingly updates the data, so as to realize the second of the first service center on A ground and B ground
The data cached synchronization of service centre.
Further, second service center, can also answering by second service center after data cached synchronization is completed
With service layer, log cache table corresponding to the accumulation layer deletion at triggering second service center, such as above-mentioned table one;And generate correspondingly
The cache synchronization of data synchronization information complete instruction, comprising completing, synchronous data cached " king is flourish in data synchronization information
" caching key is scene_001 ", and is delayed this by the accumulation layer at second service center corresponding numbering of credit game gift bag "
Deposit and synchronously complete the accumulation layer that instruction is synchronized to first service center.
Receive the cache synchronization complete instruction first service center accumulation layer, confirm with should " cache key be
After data cached synchronization corresponding to scene_001 ", log cache table corresponding to deletion.To avoid repeating cache synchronization or go out
The abnormal conditions such as existing data cached synchronization is out of order.
Combined accompanying drawing and example illustrate the data cached synchronous method that the present embodiment provides above, based on log cache
Table realizes data cached synchronization, it can be ensured that in multicenter service system, when data renewal occurs for any one service centre, its
The cache layer of his service centre can obtain data fresh information according to the synchronous log cache table of accumulation layer and carry out data renewal, real
Xian Ge service centres are data cached consistent, to provide sane network service.
<Equipment>
Fig. 8 is the schematic block diagram of data cached synchronizer provided in an embodiment of the present invention.Applied to multicenter service
System, the multicenter service system include multiple service centres, and each service centre comprises at least application service layer, deposited
Reservoir and cache layer, the data cached synchronizer is arranged at any one service centre side, as shown in figure 8, this implementation
The data cached synchronizer 6000 that example provides includes:
Local update unit 6100, for when the service centre has data to be updated, passing through the service centre
Data corresponding to application service layer triggers the accumulation layer of the service centre respectively, cache layer updates, and generate comprising corresponding number
According to the log cache table of fresh information to be stored in the accumulation layer;
Synchronization unit 6200 is stored, for the accumulation layer by the service centre by the data of renewal and the caching day
Will table, be synchronized to the accumulation layer of other service centres, for other service centres application service layer according to the log cache
Table realizes data cached synchronization.
Optionally, data cached synchronizer 6000 also includes:
Cache synchronization notification unit, for the application service layer by the service centre, detect the accumulation layer storage
When having the log cache table, read the log cache table obtain corresponding to the data fresh information, notify other services
The application service layer at center is to trigger data cached synchronization;
And/or
Cache synchronization response unit, received by the application service layer of the service centre described in other service centres notice
Data fresh information, detect that the accumulation layer of the service centre is stored with the caching day corresponding with the data fresh information
During will table, the cache layer for updating the data, triggering the service centre corresponding with the log cache table is obtained from the accumulation layer
It is corresponding to update the data, to realize data cached synchronization.
Optionally, data cached synchronizer 6000 also includes:
First detection unit, for the application service layer by the service centre, the is stated with the detection of default period 1
Whether one service centre is stored with the log cache table.
Optionally, data cached synchronizer 6000 also includes:
Second detection unit, for the application service layer by the service centre, with described in the detection of default second round
The accumulation layer of the service centre, if be stored with from the synchronous log cache table of the accumulation layer of service centre other described;
Cache synchronization execution unit, for when the application service layer of the service centre detect the storage of the service centre
When layer has the synchronous log cache table, from the accumulation layer obtain it is corresponding with the log cache table update the data, it is tactile
The cache layer for sending out the service centre correspondingly updates the data, to realize data cached synchronization.
Optionally, data cached synchronizer 6000 also includes:
Unit is deleted, for after the service centre completes data cached synchronization, passing through the application of the service centre
Service layer, trigger the service centre accumulation layer delete corresponding to the log cache table, and by corresponding deletion action information
Notify the accumulation layer of the service centre to the synchronous log cache table;
And/or
Response unit is deleted, for receiving the deletion of other service centres notice by the accumulation layer of the service centre
Operation information, delete the log cache table corresponding with the deletion action information.
In the present embodiment, the form of implementation of data cached synchronizer 6000 is not intended to limit, for example, data cached synchronization
Equipment can be the autonomous device of a peripheral hardware, establish and communicate to connect with service centre 1200 as shown in Figure 2, to implement this reality
The data cached synchronous method of middle offer is provided;Data cached synchronizer can also be the functional unit built in one, be arranged at
Communication connection is established in service centre 1200 as shown in Figure 2, to implement the data cached synchronous method provided in this implementation;Or
Person, data cached synchronizer can also be service centres 1200 as shown in Figure 2 itself.It is numerous to list herein.
In the present embodiment, a kind of service centre 8000 is also provided, as shown in figure 9, including:
Application service layer 8100;
Accumulation layer 8200;
Cache layer 8300;
And the data cached synchronizer 6000 of any one such as the present embodiment offer.
The service centre 8000 that the present embodiment provides, first service center or second service center can be used as to perform above-mentioned side
The technical scheme of method embodiment, its implementing principle and technical effect is similar, and here is omitted.
It should be appreciated that " first ", " second " they are not specifically to identify in the present embodiment, it is corresponding specifically to set
Standby, the data cached synchronizer 6000 that specifically the present embodiment provides can be used as first service center or second service center to hold
The technical scheme of row above method embodiment, its implementing principle and technical effect is similar, and here is omitted.
In the present embodiment, there is provided a kind of electronic equipment.As shown in Figure 10, the electronic equipment 7000 that the present embodiment provides wraps
Include:
Including memory 7100 and processor 7200, the memory 7100 is used for store instruction, described to instruct for controlling
The processor 7200 is made to be operated to perform data cached synchronous method provided in an embodiment of the present invention.
The equipment that the electronic equipment 7000 that the present embodiment provides can be independently of service centre 1200 as shown in Figure 2,
Establish and communicate to connect with the service centre 1200 shown in Fig. 2, to implement the data cached synchronous method provided in the present embodiment;Electricity
Sub- equipment 7000 can also be disposed on the functional unit in service centre 1200 as shown in Figure 2, and in the service shown in Fig. 2
The heart 1200 establishes communication connection, to implement the data cached synchronous method provided in the present embodiment;Or electronic equipment 7000
It can be service centre 1200 as shown in Figure 2 itself.It is numerous to list herein.
It should be appreciated that the electronic equipment 7000 that the present embodiment provides can be used as in first service center or second service
The heart performs the technical scheme of above method embodiment, and its implementing principle and technical effect is similar, and here is omitted.
In the present embodiment, a kind of service centre 8000 is also provided.As shown in figure 11, the service centre that the present embodiment provides
8000 include:
Application service layer 8100;
Accumulation layer 8200;
Cache layer 8300;
And the electronic equipment 7000 such as the present embodiment offer.
Set specifically, the memory 7100 of electronic equipment 7000 and accumulation layer 8200 can be an entities physically
It is standby;The processor 7200 of electronic equipment 7000 and the entity device that application service layer 8100 can be physically.
The service centre 8000 of the present embodiment, first service center or second service center can be used as to perform the inventive method
The technical scheme of embodiment, its implementing principle and technical effect is similar, and here is omitted.In one example, the service
Center 8000 can be service centre 1200 as shown in Figure 2.
In the present embodiment, a kind of multicenter service system is also provided, including in the service provided in multiple the present embodiment
The heart 8000.
In a specific example, the hardware configuration for the multicenter service system that the present embodiment provides can be such as Fig. 2 institutes
The multicenter service system 1000 shown.
Above combined accompanying drawing and example illustrate the present embodiment provide data cached synchronous method, equipment, service
Center and system, it can be ensured that in multicenter service system, when data renewal occurs for any one service centre, in other services
The cache layer of the heart can obtain data fresh information according to the synchronous log cache table of accumulation layer and carry out data renewal, realize each service
Central cache data are consistent, to provide sane network service.
It is well known by those skilled in the art that the development of the electronic information technology with such as large scale integrated circuit technology
With the trend of hardware and software, clearly to divide computer system soft and hardware boundary and seem relatively difficult.Because appoint
What operation can be realized with software, can also be realized by hardware.The execution of any instruction can be completed by hardware, equally also may be used
To be completed by software.Hardware implementations or software implement scheme are used for a certain machine function, depending on price, speed
The Non-technical factors such as degree, reliability, memory capacity, change cycle.Therefore, for the ordinary skill of electronic information technical field
For personnel, mode more direct and that a technical scheme is explicitly described is to describe each operation in the program.Knowing
In the case of road institute operation to be performed, those skilled in the art can directly be set based on the consideration to the Non-technical factor
Count out desired product.
The present invention can be system, method and/or computer program product.Computer program product can include computer
Readable storage medium storing program for executing, containing for making processor realize the computer-readable program instructions of various aspects of the invention.
Computer-readable recording medium can keep and store to perform the tangible of the instruction that uses of equipment by instruction
Equipment.Computer-readable recording medium can for example be but not limited to electric accumulation layer, magnetic storage layer, optical storage layers, electromagnetism storage
Layer, semiconductor storage layer or above-mentioned any appropriate combination.The more specifically example of computer-readable recording medium is (non-poor
The list of act) include:Portable computer diskette, hard disk, random access memory layer (RAM), read-only accumulation layer (ROM), erasable type
It may be programmed read-only accumulation layer (EPROM or flash memory), static random access memory layer (SRAM), the read-only accumulation layer of Portable compressed disk
(CD-ROM), digital versatile disc (DVD), memory stick, floppy disk, mechanical coding equipment, the punching for being for example stored thereon with instruction
Card or groove internal projection structure and above-mentioned any appropriate combination.Computer-readable recording medium used herein above is not
It is interpreted instantaneous signal in itself, the electromagnetic wave of such as radio wave or other Free propagations, passes through waveguide or other transmission
The electromagnetic wave (for example, the light pulse for passing through fiber optic cables) of media transmission or the electric signal transmitted by electric wire.
Computer-readable program instructions as described herein can be downloaded to from computer-readable recording medium it is each calculate/
Processing equipment, or outer computer or outer is downloaded to by network, such as internet, LAN, wide area network and/or wireless network
Portion's accumulation layer.Network can include copper transmission cable, optical fiber is transmitted, is wirelessly transferred, router, fire wall, interchanger, gateway meter
Calculation machine and/or Edge Server.Adapter or network interface in each calculating/processing equipment receive from network to be calculated
Machine readable program instructions, and the computer-readable program instructions are forwarded, for the calculating being stored in each calculating/processing equipment
In machine readable storage medium storing program for executing.
For perform the computer program instructions that operate of the present invention can be assembly instruction, instruction set architecture (ISA) instruction,
Machine instruction, machine-dependent instructions, microcode, firmware instructions, condition setup data or with one or more programming languages
The source code or object code that any combination is write, programming language of the programming language including object-oriented-such as
Smalltalk, C++ etc., and conventional procedural programming languages-such as " C " language or similar programming language.Computer
Readable program instructions fully can on the user computer perform, partly perform on the user computer, be only as one
Vertical software kit performs, part performs or completely in remote computer on the remote computer on the user computer for part
Or performed on server.In the situation of remote computer is related to, remote computer can pass through network-bag of any kind
LAN (LAN) or wide area network (WAN)-be connected to subscriber computer are included, or, it may be connected to outer computer (such as profit
Pass through Internet connection with ISP).In certain embodiments, by using computer-readable program instructions
Status information carry out personalized customization electronic circuit, such as PLD, field programmable gate array (FPGA) or can
Programmed logic array (PLA) (PLA), the electronic circuit can perform computer-readable program instructions, so as to realize each side of the present invention
Face.
Referring herein to method, apparatus (system) and computer program product according to embodiments of the present invention flow chart and/
Or block diagram describes various aspects of the invention.It should be appreciated that each square frame and flow chart of flow chart and/or block diagram and/
Or in block diagram each square frame combination, can be realized by computer-readable program instructions.
These computer-readable program instructions can be supplied to all-purpose computer, special-purpose computer or other programmable datas
The processor of processing unit, so as to produce a kind of machine so that these instructions are passing through computer or other programmable datas
During the computing device of processing unit, work(specified in one or more of implementation process figure and/or block diagram square frame is generated
The device of energy/action.These computer-readable program instructions can also be stored in a computer-readable storage medium, these refer to
Order causes computer, programmable data processing unit and/or other equipment to work in a specific way, so as to be stored with instruction
Computer-readable medium then includes a manufacture, and it is included in one or more of implementation process figure and/or block diagram square frame
The instruction of the various aspects of defined function/action.
Computer-readable program instructions can also be loaded into computer, other programmable data processing units or other
In equipment so that series of operation steps is performed on computer, other programmable data processing units or miscellaneous equipment, with production
Raw computer implemented process, so that performed on computer, other programmable data processing units or miscellaneous equipment
Instruct function/action specified in one or more of implementation process figure and/or block diagram square frame.
Flow chart and block diagram in accompanying drawing show system, method and the computer journey of multiple embodiments according to the present invention
Architectural framework in the cards, function and the operation of sequence product.At this point, each square frame in flow chart or block diagram can generation
One module of table, program segment or a part for instruction, the module, program segment or a part for instruction include one or more use
In the executable instruction of logic function as defined in realization.At some as the function of in the realization replaced, being marked in square frame
Can be with different from the order marked in accompanying drawing generation.For example, two continuous square frames can essentially be held substantially in parallel
OK, they can also be performed in the opposite order sometimes, and this is depending on involved function.It is also noted that block diagram and/or
The combination of each square frame and block diagram in flow chart and/or the square frame in flow chart, function or dynamic as defined in performing can be used
The special hardware based system made is realized, or can be realized with the combination of specialized hardware and computer instruction.It is right
It is well known that, realized for those skilled in the art by hardware mode, realized by software mode and by software and
It is all of equal value that the mode of combination of hardware, which is realized,.
It is described above various embodiments of the present invention, described above is exemplary, and non-exclusive, and
It is not limited to disclosed each embodiment.In the case of without departing from the scope and spirit of illustrated each embodiment, for this skill
Many modifications and changes will be apparent from for the those of ordinary skill in art field.The selection of term used herein, purport
Best explaining the principle of each embodiment, practical application or to the technological improvement in market, or make the art its
Its those of ordinary skill is understood that each embodiment disclosed herein.The scope of the present invention is defined by the appended claims.