CN107948318A - Cache synchronization method and system between multinode - Google Patents

Cache synchronization method and system between multinode Download PDF

Info

Publication number
CN107948318A
CN107948318A CN201711451424.XA CN201711451424A CN107948318A CN 107948318 A CN107948318 A CN 107948318A CN 201711451424 A CN201711451424 A CN 201711451424A CN 107948318 A CN107948318 A CN 107948318A
Authority
CN
China
Prior art keywords
synchronization
cache
synchronization request
request instruction
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201711451424.XA
Other languages
Chinese (zh)
Other versions
CN107948318B (en
Inventor
肖锋身
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianyi Shilian Technology Co ltd
Original Assignee
CENTURY DRAGON INFORMATION NETWORK Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CENTURY DRAGON INFORMATION NETWORK Co Ltd filed Critical CENTURY DRAGON INFORMATION NETWORK Co Ltd
Priority to CN201711451424.XA priority Critical patent/CN107948318B/en
Publication of CN107948318A publication Critical patent/CN107948318A/en
Application granted granted Critical
Publication of CN107948318B publication Critical patent/CN107948318B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching

Abstract

The present invention relates to technical field of data transmission, more particularly to the cache synchronization method and system between a kind of multinode.Cache synchronization method between multinode comprises the following steps:Receive the synchronization request instruction of operation system;Wherein, synchronization request instruction includes interface parameters and caching instructions;The interface parameters instructed according to synchronization request calls corresponding interface;Synchronization request instruction is sent to each preset buffer memory synchronous service end by interface, wherein, cache synchronization server-side obtains synchronization request and instructs and perform the caching instructions in synchronization request instruction.Such scheme, by sending synchronization request instruction to the cache synchronization server-side of cache node to be synchronized, progress cache synchronization is instructed to operate according to synchronization request by cache synchronization server-side again, reduce occupancy of the cache synchronization to operation system resource, the generation of synchronization request accumulation is reduced, improves system response time.

Description

Cache synchronization method and system between multinode
Technical field
The present invention relates to technical field of data transmission, more particularly to the cache synchronization method between a kind of multinode and is System.
Background technology
As user data scale increases, the framework of operation system is continued to optimize, and many operation systems are needed in Business Stream Serviced in journey using distributed caching, such as memcache clusters, redis clusters etc..Meanwhile in order to tackle emergency case and industry Business is uprushed the situation that causes system load high or even can not use, and can be selected a whole set of service arrangement in multiple geographical locations, Including independent distributed caching cluster, the single operation system of every suit is referred to as a node.When host node services the opportunity for combat Can not be in use, standby node can be switched to, if standby node service buffer data and the service buffer data of host node It is inconsistent, user can be caused inconsistent in the operating experience of cross-node, or even can not use.Therefore, host node and backup node Between cache must be completely the same, keep synchronous, just can guarantee that the normal use of user.However, in conventional art, cache synchronization Operation system excess resource can be taken, causes cache synchronization request stacking, system response time to reduce, it could even be possible to machine of delaying.
The content of the invention
Based on this, it is necessary to the problem of reduction for synchronization request accumulation, system response time, there is provided between a kind of multinode Cache synchronization method and system.
A kind of cache synchronization method between multinode, comprises the following steps:
Receive the synchronization request instruction of operation system;Wherein, the synchronization request instruction includes interface parameters and caching Operational order;
The interface parameters instructed according to the synchronization request calls corresponding interface;
Synchronization request instruction is sent to each preset buffer memory synchronous service end by the interface, wherein, it is described Cache synchronization server-side obtains the synchronization request and instructs and perform the caching instructions in the synchronization request instruction.
Cache synchronization method between above-mentioned multinode, by the way that synchronization request instruction is sent delaying to cache node to be synchronized Synchronous service end is deposited, then instructs progress cache synchronization to operate according to synchronization request by cache synchronization server-side, reduces cache synchronization To the occupancy of operation system resource, the generation of synchronization request accumulation is reduced, improves system response time.
In one of the embodiments, the cache synchronization method between multinode is further comprising the steps of:
Receive the synchronization success prompt message that the cache synchronization server-side returns;Wherein, the synchronization successfully prompts to believe Breath is that the cache synchronization server-side acquisition synchronization request instructs and performs the caching in the synchronization request instruction The prompt message sent after instruction;
According to the synchronous success prompt message return first cache successfully prompt message to the operation system.
In one of the embodiments, the cache synchronization method between multinode is further comprising the steps of:
If the cache synchronization server-side can not receive the synchronization request instruction, synchronization request instruction is preserved extremely Retry in pond;
In preset time threshold, synchronization request instruction is sent to the caching together according to cycle regular hour Server-side is walked, wherein, the cache synchronization server-side obtains the synchronization request and instructs and perform in the synchronization request instruction Caching instructions.
In one of the embodiments, it is described in preset time threshold, according to cycle regular hour by the synchronization Request instruction was sent the step of cache synchronization server-side, further comprising the steps of:
The synchronization success prompt message that the cache synchronization server-side returns is received, the synchronization request is instructed from described Retry in pond and delete, wherein, the synchronous success prompt message is that the cache synchronization server-side reception synchronization request refers to Make and perform the prompt message sent after the caching instructions in the synchronization request instruction.
A kind of cache synchronization method between multinode, comprises the following steps:
The synchronization request instruction that order caching synchronous service end is sent, wherein, the synchronization request instruction includes caching behaviour Instruct, data cached and cashing indication;
The cashing indication instructed according to the synchronization request positions buffer service;
Data cached it is updated to according to the caching instructions by described in the buffer service.
Cache synchronization method between above-mentioned multinode, the cache synchronization server-side that node is initiated by receiving synchronization caching are sent out Send synchronization request to instruct, instructed according to synchronization request and carry out cache synchronization operation, to reduce cache synchronization to operation system resource Occupancy, reduce synchronization request accumulation generation, improve system response time.
In one of the embodiments, the cache synchronization method between multinode is further comprising the steps of:
Receive the buffer service return second caches successfully prompt message;
Successfully prompt message, which is cached, according to described second sends synchronous success prompt message to the cache synchronization server-side.
A kind of cache synchronization method between multinode, comprises the following steps:
First cache synchronization server-side receives the synchronization request instruction of operation system;Wherein, the synchronization request instruction bag Interface parameters, caching instructions, cache size and cashing indication are included, the first cache synchronization server-side includes synchronization caching Initiate the cache synchronization server-side of node;
The interface parameters that the first cache synchronization server-side is instructed according to the synchronization request calls corresponding interface, and Synchronization request instruction is sent to the second cache synchronization server-side by the interface, wherein, second cache synchronization Server-side includes the cache synchronization server-side of cache node to be synchronized;
The second cache synchronization server-side receives the synchronization request instruction that the first cache synchronization server-side is sent, and The cashing indication instructed according to the synchronization request positions buffer service;
The second cache synchronization server-side according to the caching instructions by it is described it is data cached be updated to it is described slow Deposit in service.
Cache synchronization method between above-mentioned multinode, the cache synchronization server-side that synchronization caching initiates node send synchronous ask Instruction is asked, after the cache synchronization server-side reception synchronization request instruction of cache node to be synchronized, is instructed and carried out according to synchronization request Cache synchronization operates, and to reduce occupancy of the cache synchronization to operation system resource, reduces the generation of synchronization request accumulation, improves System response time.
In one of the embodiments, the cache synchronization method between multinode is further comprising the steps of:
The second cache synchronization server-side receives second that the buffer service returns and caches successfully prompt message, and root Successfully prompt message, which is cached, according to described second sends synchronous success prompt message to the first cache synchronization server-side;
The first cache synchronization server-side receives the synchronous success prompt message, and is successfully prompted according to the synchronization Information return first cache successfully prompt message to the operation system.
A kind of cache synchronization system between multinode, including:
First synchronization request command reception module, the synchronization request for receiving operation system instruct;Wherein, the synchronization Request instruction includes interface parameters and caching instructions;
Interface calling module, the interface parameters for being instructed according to the synchronization request call corresponding interface;
Synchronization request instruction sending module, for being sent synchronization request instruction to each default by the interface Cache synchronization server-side, wherein, the cache synchronization server-side obtains the synchronization request and instructs and perform the synchronization request Caching instructions in instruction.
Cache synchronization system between above-mentioned multinode, by the way that synchronization request instruction is sent delaying to cache node to be synchronized Synchronous service end is deposited, then instructs progress cache synchronization to operate according to synchronization request by cache synchronization server-side, reduces cache synchronization To the occupancy of operation system resource, the generation of synchronization request accumulation is reduced, improves system response time.
A kind of cache synchronization system between multinode, including:
Second synchronization request command reception module, the synchronization request instruction sent for order caching synchronous service end, its In, the synchronization request instruction includes caching instructions, data cached and cashing indication;
Buffer service locating module, the cashing indication for being instructed according to the synchronization request position buffer service;
Data cached update module, for data cached being updated to the caching by described according to the caching instructions In service.
Cache synchronization system between above-mentioned multinode, the cache synchronization server-side that node is initiated by receiving synchronization caching are sent out Send synchronization request to instruct, instructed according to synchronization request and carry out cache synchronization operation, to reduce cache synchronization to operation system resource Occupancy, reduce synchronization request accumulation generation, improve system response time.
Brief description of the drawings
Fig. 1 is the flow chart of the cache synchronization method between multinode in one embodiment of the invention;
Fig. 2 is the flow chart of the cache synchronization method between multinode in another embodiment of the present invention;
Fig. 3 is the flow chart of the cache synchronization method between multinode in another embodiment of the invention;
Fig. 4 is the applied environment figure of the cache synchronization method between multinode in one embodiment of the invention;
Fig. 5 is the structure diagram of the cache synchronization system between multinode in one embodiment of the invention;
Fig. 6 is the structure diagram of the cache synchronization system between multinode in another embodiment of the present invention;
Fig. 7 is the structure diagram of the cache synchronization system between multinode in another embodiment of the present invention.
Embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, with reference to the accompanying drawings and embodiments, it is right The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not intended to limit the scope of the invention.
Referring to Fig. 1, the flow chart of cache synchronization methods of the Fig. 1 between multinode in one embodiment of the invention, the implementation Example is illustrated by taking the cache synchronization server-side side that cache synchronization initiates node as an example, the cache synchronization method bag between multinode Include following steps:
Step S110:Receive the synchronization request instruction of operation system;Wherein, synchronization request instruction include interface parameters and Caching instructions.
In this step, local cache synchronous service end receives the synchronization request instruction that operation system is sent, the synchronization request Instruction is that some operation system occurs to trigger and send during data cached operation in local node, wherein, local node Node is initiated as cache synchronization, synchronization request instruction is recordable to have interface parameters to be called and the caching of synchronization to refer to Order.
Step S120:The interface parameters instructed according to synchronization request calls corresponding interface.
In this step, the interface parameters that local cache synchronous service end is instructed according to synchronization request calls corresponding interface.
Step S130:Synchronization request instruction is sent to each preset buffer memory synchronous service end by interface, wherein, caching Synchronous service end obtains synchronization request and instructs and perform the caching instructions in synchronization request instruction.
Synchronization request instruction is sent to the cache synchronization server-side of distal end cache node to be synchronized by the interface, far Hold the cache synchronization server-side of cache node to be synchronized to obtain synchronization request instruction, synchronized according to synchronization request instruction slow Deposit.
Optionally, it is logical between the cache synchronization server-side of local cache synchronous service end and distal end cache node to be synchronized Letter agreement can use HTTP (HyperText Transfer Protocol, hypertext transfer protocol) agreement, can also use The interaction protocols such as TCP (Transmission Control Protocol, transmission control protocol), Thrift agreements.
Further, the selection of distal end cache node to be synchronized can be realized by the route test between node.Carry out Before synchronization caching, the distant-end node for needing synchronization caching can be set by the route test between adjustment node, realize a section The data cached of point is synchronized in the caching of another distant-end node specified, or the data cached synchronization value of a node is more In the caching of a distant-end node specified.
In above-described embodiment, by sending synchronization request instruction to the cache synchronization server-side of cache node to be synchronized, Instruct progress cache synchronization to operate according to synchronization request by cache synchronization server-side again, reduce cache synchronization to operation system resource Occupancy, reduce synchronization request accumulation generation, improve system response time, realize the cache synchronization between multinode, make more Cache business data are consistent between node, can ensure operation system user's unaware when switching node, reduce business System inconsistent causes a large amount of concurrent requests breakdown databases to cause to service opportunity for combat etc. in switching node due to data cached Situation, ensures the stabilization of each operation system in each node.
In one of the embodiments, the cache synchronization method between multinode can also comprise the following steps:
The synchronization success prompt message that order caching synchronous service end returns;Wherein, synchronous success prompt message is caching Synchronous service end obtains synchronization request and instructs and perform the prompt message sent after the caching instructions in synchronization request instruction; According to synchronous success prompt message return first cache successfully prompt message to operation system.
Referred to after the cache synchronization server-side of distal end cache node to be synchronized obtains synchronization request instruction according to synchronization request Order synchronizes caching, after realizing cache synchronization, can return to synchronization success prompt message to local cache synchronous service end, sheet Ground cache synchronization server-side is according to synchronous success prompt message return cache success prompt message into operation system.
Further, during cache synchronization is carried out, when network fluctuation or Network Abnormal, distal end caching to be synchronized The cache synchronization server-side of node can not receive synchronization request instruction, can not be also synchronized to data cached in caching, local slow Data cached final consistency can have been ensured by retry mechanism by depositing synchronous service end.It is more as one of embodiment Cache synchronization method between node can also include the steps of:
If cache synchronization server-side can not receive synchronization request instruction, synchronization request instruction is preserved to retrying in pond;
In preset time threshold, synchronization request instruction is sent to cache synchronization service according to cycle regular hour End, wherein, cache synchronization server-side obtains synchronization request and instructs and perform the caching instructions in synchronization request instruction.
It is above-mentioned to retry scheme, it is possible to prevente effectively from synchronization request is accumulated, the occupancy to system resource is reduced, improves response speed Degree, reduces the generation for machine of delaying.
Further, in preset time threshold, synchronization request instruction is sent to caching according to cycle regular hour It is further comprising the steps of after the step of synchronous service end:
The synchronization success prompt message that order caching synchronous service end returns, synchronization request instruction is deleted from retrying in pond Remove, wherein, synchronous success prompt message is that cache synchronization server-side reception synchronization request is instructed and performed in synchronization request instruction Caching instructions after the prompt message that sends.
Delay specifically, local cache synchronous service end sends the synchronization request instruction in pond is retried to distal end is to be synchronized Deposit the cache synchronization server-side of node, and the cache synchronization server-side for receiving distal end cache node to be synchronized return it is synchronous into After work(prompt message, the synchronization request retried in pond can be instructed and deleted, save the memory space for retrying pond, avoided same same Request instruction is walked to repeat to send.
Referring to Fig. 2, the flow chart of cache synchronization methods of the Fig. 2 between multinode in another embodiment of the present invention, the reality Apply example to illustrate by taking the cache synchronization server-side side of cache node to be synchronized as an example, it may include following steps:
Step S210:The synchronization request instruction that order caching synchronous service end is sent, wherein, synchronization request instruction includes slow Deposit operational order, data cached and cashing indication.
In this step, the cache synchronization server-side of cache node to be synchronized is receiving the caching of synchronization caching initiation node The synchronization request instruction that synchronous service end is sent, synchronization request instruction are that synchronization caching initiates some operation system hair in node Give birth to what is triggered and send during data cached operation, wherein, synchronization request instruction is recordable to be had synchronous caching instructions, treats The synchronous data cached and cashing indication for positioning to buffer service accords with.
Step S220:The cashing indication instructed according to synchronization request positions buffer service.
Step S230:It is updated to according to caching instructions by data cached in buffer service.
Caching instructions may include write instruction, modification instruction, delete instruction etc., can be real according to caching instructions Now by it is data cached write-in buffer service in, by it is data cached from buffer service delete and to the data in buffer service into Row modification.
In the present embodiment, the caching of the cache synchronization server-side reception synchronization caching initiation node of cache node to be synchronized is same After walking the synchronization request instruction that server-side is sent, instructed according to synchronization request and carry out cache synchronization operation, reduce cache synchronization pair The occupancy of operation system resource, reduces the generation of synchronization request accumulation, improves system response time.
Further, the cache synchronization method between multinode is further comprising the steps of:
The second of order caching service return caches successfully prompt message;Successfully prompt message is cached according to second to send together Walk successfully prompt message to cache synchronization server-side.
By after the data cached renewal in buffer service, buffer service returns the cache synchronization server-side of cache node to be synchronized Return and cache successful prompt message to the cache synchronization server-side of cache node to be synchronized, the cache synchronization of cache node to be synchronized and take Business end sends cache synchronization service of the synchronous success prompt message to cache synchronization initiation node according to successfully prompt message is cached End.
Referring to Fig. 3, the flow chart of cache synchronization methods of the Fig. 3 between multinode in another embodiment of the invention, the reality Apply example is with the cache synchronization server-side interaction of the cache synchronization server-side of cache synchronization initiation node and cache node to be synchronized Example illustrates, and comprises the following steps:
Step S310:First cache synchronization server-side receives the synchronization request instruction of operation system;Wherein, synchronization request refers to Order includes interface parameters, caching instructions, cache size and cashing indication, and the first cache synchronization server-side includes synchronization caching Initiate the cache synchronization server-side of node;
Step S320:The interface parameters that first cache synchronization server-side is instructed according to synchronization request calls corresponding interface, And sent synchronization request instruction to the second cache synchronization server-side by interface, wherein, the second cache synchronization server-side includes The cache synchronization server-side of cache node to be synchronized;
Step S330:Second cache synchronization server-side receives the synchronization request instruction that the first cache synchronization server-side is sent, And the cashing indication instructed according to synchronization request positions buffer service;
Step S340:Second cache synchronization server-side is updated to buffer service according to caching instructions by data cached In.
In the present embodiment, the cache synchronization server-side that synchronization caching initiates node sends synchronization request instruction, to be synchronized slow After the cache synchronization server-side reception synchronization request instruction for depositing node, instructed according to synchronization request and carry out cache synchronization operation, with Occupancy of the cache synchronization to operation system resource is reduced, the generation of synchronization request accumulation is reduced, improves system response time, carry System response time is risen.
Specifically, the first cache synchronization server-side initiates the cache synchronization server-side of node, the second caching for cache synchronization Synchronous service end is the cache synchronization server-side of cache node to be synchronized.The caching number of a certain piece of operation system in one node According to operating, operation system sends a synchronization request and instructs to local cache synchronous service end, then the node is as caching Synchronous to initiate node, the local cache synchronous service end of the node is as the first cache synchronization server.First cache synchronization takes It is engaged in after device reception synchronization request instruction, the interface parameters instructed according to synchronization request calls corresponding interface, while is connect by this Mouth sends synchronization request instruction to the second cache synchronization server of distal end;Distally the second cache synchronization server obtains synchronous ask After asking instruction, positioned according to the cashing indication that synchronization request instructs to the buffer service of this node, and according to caching instructions, Such as write instruction, modification instruction, instruction etc. is deleted, the data cached renewal in buffer service is realized slow between multinode Synchronization is deposited, cache business data are consistent between making multinode, can ensure that operation system user when switching node is noninductive Know, reduce operation system and inconsistent cause a large amount of concurrent requests breakdown databases to cause due to data cached in switching node Situations such as servicing the opportunity for combat, ensures the stabilization of each operation system in each node.
Further, the first cache synchronization server can realize that the second cache synchronization takes by the route test between node The selection of business device.During synchronization caching, the route test between adjustment node, selection needs the distant-end node of synchronization caching, Realize that the data cached of node is synchronized in the caching of a distant-end node specified, or node is data cached In the caching of the multiple distant-end nodes specified of synchronization value.
In one of the embodiments, the cache synchronization method between multinode is further comprising the steps of:
The second of second cache synchronization server-side order caching service return caches successfully prompt message, and slow according to second It is saved as work(prompt message and sends synchronous success prompt message to the first cache synchronization server-side;
First cache synchronization server-side receives synchronous success prompt message, and returns to first according to synchronous success prompt message Cache successfully prompt message to operation system.
The operation system that synchronization caching initiates node is notified to complete cache synchronization by synchronous success prompt message.
Further, during cache synchronization is carried out, when network fluctuation or Network Abnormal, the second cache synchronization clothes Business end can not receive synchronization request instruction, can not be also synchronized to data cached in caching, the first cache synchronization server-side passes through Retry mechanism ensures data cached final consistency.As one of embodiment, the cache synchronization method between multinode is also It may include following steps:
If the synchronization request that the second cache synchronization server-side can not receive the transmission of the first cache synchronization server-side instructs, first Cache synchronization server-side preserves synchronization request instruction to retrying in pond;
In preset time threshold, synchronization request is instructed and sent out by the first cache synchronization server-side according to cycle regular hour Send to the second cache synchronization server-side, wherein, the second cache synchronization server-side obtains synchronization request and instructs and perform synchronization request Caching instructions in instruction.
First cache synchronization server-side preserves synchronization request instruction to retrying in pond, in the effective of synchronization request instruction In time, synchronization request instruction is sent to the second cache synchronization take at regular intervals by the first cache synchronization server-side again It is engaged in end, having ensured data cached final consistency, having avoided result in request stacking, reduces the occupancy to system resource, improve and ring Speed is answered, reduces the generation for machine of delaying.
Further, in preset time threshold, the first cache synchronization server-side will be synchronous according to cycle regular hour Request instruction was sent the step of cache synchronization server-side, further comprising the steps of:
First cache synchronization server-side receives the synchronization success prompt message that the second cache synchronization server-side returns, will be synchronous Request instruction is deleted from retrying in pond, wherein, synchronous success prompt message is that the second cache synchronization server-side receives synchronization request Instruct and perform the prompt message sent after the caching instructions in synchronization request instruction.
First cache synchronization server-side sends the synchronization request instruction in pond is retried to the second cache synchronization server-side, And after receiving the second cache synchronization server-side and returning to synchronous success prompt message, the synchronization request retried in pond can be instructed Delete, save the memory space for retrying pond, avoid synchronization request instruction from sending again to the second cache synchronization server-side.
In order to become apparent from technical solution of the present invention, by taking Fig. 4 as an example, to the middle multinode of one embodiment of the present of invention Between cache synchronization method illustrate.
The applied environment figure of cache synchronization methods of the Fig. 4 between multinode in one embodiment of the invention, the application environment Including multiple nodes, the completely a set of service of each node deployment, including independent distributed caching cluster, for example, node 400A includes systematic group 410a, cache synchronization server-side 420a and distributed caching cluster 430a;Wherein, systematic group 410 Include one or more operation system, distributed caching service cluster 430 includes one or more buffer services.
In node 400A, data cached the operating of some operation system of systematic group 410a, operation system can be sent One synchronization request is instructed to local cache synchronous service end 420a.Node 400A initiates node as cache synchronization.Caching is same After walking server-side 420a reception synchronization request instructions, the interface parameters instructed according to synchronization request calls corresponding interface, at the same time By the interface by synchronization request instruction send to one or more distant-end node cache synchronization server-side, such as send to Cache synchronization server-side 420b, cache synchronization server-side 420z and cache synchronization server-side 420y.The caching of distant-end node is same After walking server acquisition synchronization request instruction, positioned according to the cashing indication that synchronization request instructs to the buffer service of this node, According to caching instructions, such as write instruction, modification instruction, instruction etc. is deleted, by the data cached renewal in buffer service, Realize the cache synchronization between multinode, cache business data are consistent between making multinode, can ensure that operation system is saved in switching User's unaware when point, reduces operation system and inconsistent causes a large amount of concurrently please due to data cached in switching node Situations such as asking breakdown database to cause to service the opportunity for combat, ensures the stabilization of each operation system in each node.
According to the cache synchronization method between above-mentioned multinode, the present invention also provides the cache synchronization system between a kind of multinode System, just the embodiment of the cache synchronization system between the multinode of the present invention is described in detail below.
Referring to Fig. 5, Fig. 5 is the structure diagram of the cache synchronization system between multinode in one embodiment of the invention.This The embodiment is illustrated by taking the cache synchronization server-side side that cache synchronization initiates node as an example in embodiment, between multinode Cache synchronization system includes:
First synchronization request command reception module 510, the synchronization request for receiving operation system instruct;Wherein, it is synchronous Request instruction includes interface parameters and caching instructions;
Interface calling module 520, the interface parameters for being instructed according to synchronization request call corresponding interface;
Synchronization request instruction sending module 530, for being sent synchronization request instruction to each preset buffer memory by interface Synchronous service end, wherein, cache synchronization server-side obtains synchronization request and instructs and perform the caching in synchronization request instruction Instruction.
In the present embodiment, synchronization request instruction is sent to be synchronized by the first synchronization request command reception module 510 The cache synchronization server-side of cache node, then instruct progress cache synchronization to operate according to synchronization request by cache synchronization server-side, Occupancy of the cache synchronization to operation system resource is reduced, the generation of synchronization request accumulation is reduced, improves system response time.
In one of the embodiments, the cache synchronization system between multinode further includes the first feedback information receiving module, The synchronization success prompt message returned for order caching synchronous service end;Wherein, synchronous success prompt message is cache synchronization Server-side obtains synchronization request and instructs and perform the prompt message sent after the caching instructions in synchronization request instruction;According to Synchronous success prompt message return first cache successfully prompt message to operation system.
In one of the embodiments, synchronization request instruction sending module 530 can not receive together in cache synchronization server-side When walking request instruction, synchronization request instruction is preserved to retrying in pond;In preset time threshold, according to cycle regular hour Synchronization request instruction is sent to cache synchronization server-side, wherein, cache synchronization server-side obtains synchronization request and instructs and perform Caching instructions in synchronization request instruction.
In one of the embodiments, the first feedback information receiving module order caching synchronous service end return it is synchronous into Work(prompt message, synchronization request instruction is deleted from retrying in pond, wherein, synchronous success prompt message is cache synchronization server-side Receive synchronization request and instruct and perform the prompt message sent after the caching instructions in synchronization request instruction.
Referring to Fig. 6, Fig. 6 is the structure diagram of the cache synchronization system between multinode in another embodiment of the present invention. The embodiment is illustrated by taking the cache synchronization server-side side of cache node to be synchronized as an example, the cache synchronization system between multinode System includes:
Second synchronization request command reception module 610, the synchronization request instruction sent for order caching synchronous service end, Wherein, synchronization request instruction includes caching instructions, data cached and cashing indication;
Buffer service locating module 620, the cashing indication for being instructed according to synchronization request position buffer service;
Data cached update module 630, for being updated to according to caching instructions by data cached in buffer service.
In one of the embodiments, the cache synchronization system between multinode further includes the second feedback information receiving module, Successfully prompt message is cached for order caching service returns second;According to second cache successfully prompt message send it is synchronous into Work(prompt message is to cache synchronization server-side.
Referring to Fig. 7, Fig. 7 is the structure diagram of the cache synchronization system between multinode in another embodiment of the present invention. The embodiment initiates the cache synchronization server-side of node with cache synchronization and the cache synchronization server-side of cache node to be synchronized is handed over Illustrated exemplified by mutually, the cache synchronization system between multinode includes the first synchronization request command reception module 510, interface calls Module 520, synchronization request instruction sending module 530, the second synchronization request command reception module 610, buffer service locating module 620 and data cached update module 630.
First synchronization request command reception module 510 receives the synchronization request instruction of operation system;Wherein, synchronization request refers to Order includes interface parameters, caching instructions, cache size and cashing indication;
The interface parameters that interface calling module 520 is instructed according to synchronization request calls corresponding interface;
Synchronization request instruction is sent to the instruction of the second synchronization request and connect by synchronization request instruction sending module 530 by interface Receive module 610;
Second synchronization request command reception module 610 receives the synchronization request instruction that the first cache synchronization server-side is sent;
The caching that the cashing indication that buffer service locating module 620 is instructed according to synchronization request positions caching to be synchronized takes Business;
Data cached update module 630 is updated in buffer service according to caching instructions by data cached.
In one of the embodiments, the cache synchronization system between multinode further include the second feedback information receiving module with And the first feedback information receiving module;
The second of second feedback information receiving module order caching service return caches successfully prompt message, and according to second Cache successfully prompt message and send synchronous success prompt message to the first feedback information receiving module;
First feedback information receiving module receives synchronously success prompt message, and is returned and delayed according to synchronous success prompt message Work(prompt message is saved as to operation system.
In one of the embodiments, synchronization request instruction sending module 530 is in the second synchronization request command reception module 610 when can not receive synchronization request instruction, and synchronization request instruction is preserved to retrying in pond;In preset time threshold, according to Cycle regular hour sends synchronization request instruction to cache synchronization server-side, wherein, cache synchronization server-side obtains synchronous Request instruction simultaneously performs the caching instructions in synchronization request instruction.
In one of the embodiments, the first feedback information receiving module receives what the second feedback information receiving module returned Synchronous success prompt message, synchronization request instruction is deleted from retrying in pond, wherein, synchronous success prompt message is cache synchronization Server-side receives synchronization request and instructs and perform the prompt message sent after the caching instructions in synchronization request instruction.
Cache synchronization system between the multinode of the present invention and the cache synchronization method one between the multinode of the present invention are a pair of Should, the technical characteristic and its advantage of the embodiment elaboration of the cache synchronization method between above-mentioned multinode are suitable for more piece In the embodiment of cache synchronization system between point, hereby give notice that.
In one embodiment, a kind of computer equipment is also provided, which includes memory, processor and deposit The computer program that can be run on a memory and on a processor is stored up, wherein, processor is realized as above when performing described program State the cache synchronization method between any one multinode in each embodiment.
The computer equipment, during its processor executive program, by realizing as any one in the various embodiments described above is more Cache synchronization method between node, so as to reduce occupancy of the cache synchronization to operation system resource, reduces synchronization request heap Long-pending generation, improves system response time.
In addition, one of ordinary skill in the art will appreciate that realize all or part of flow in above-described embodiment method, It is that relevant hardware can be instructed to complete by computer program, the program can be stored in a non-volatile calculating In machine read/write memory medium, in the embodiment of the present invention, which can be stored in the storage medium of computer system, and by At least one processor in the computer system performs, and is included with realizing such as the cache synchronization method between above-mentioned each multinode The flow of embodiment.
In one embodiment, a kind of storage medium is also provided, is stored thereon with computer program, wherein, the program quilt Realized when processor performs such as the cache synchronization method between any one multinode in the various embodiments described above.Wherein, it is described Storage medium can be magnetic disc, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
The computer-readable storage medium, its computer program stored, is included as slow between above-mentioned each multinode by realizing The flow of the embodiment of synchronous method is deposited, so as to reduce occupancy of the cache synchronization to operation system resource, reduces synchronous ask The generation of accumulation is asked, improves system response time.
Each technical characteristic of embodiment described above can be combined arbitrarily, to make description succinct, not to above-mentioned reality Apply all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited In contradiction, the scope that this specification is recorded all is considered to be.
Embodiment described above only expresses the several embodiments of the present invention, its description is more specific and detailed, but simultaneously Cannot therefore it be construed as limiting the scope of the patent.It should be pointed out that come for those of ordinary skill in the art Say, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to the protection of the present invention Scope.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.

Claims (10)

1. the cache synchronization method between a kind of multinode, it is characterised in that comprise the following steps:
Receive the synchronization request instruction of operation system;Wherein, the synchronization request instruction includes interface parameters and caching Instruction;
The interface parameters instructed according to the synchronization request calls corresponding interface;
Synchronization request instruction is sent to each preset buffer memory synchronous service end by the interface, wherein, the caching Synchronous service end obtains the synchronization request and instructs and perform the caching instructions in the synchronization request instruction.
2. the cache synchronization method between multinode according to claim 1, it is characterised in that further comprising the steps of:
Receive the synchronization success prompt message that the cache synchronization server-side returns;Wherein, the synchronous success prompt message is The cache synchronization server-side obtains the synchronization request and instructs and perform the caching instructions in the synchronization request instruction The prompt message sent afterwards;
According to the synchronous success prompt message return first cache successfully prompt message to the operation system.
3. the cache synchronization method between multinode according to claim 1, it is characterised in that further comprising the steps of:
If the cache synchronization server-side can not receive synchronization request instruction, synchronization request instruction is preserved to retrying Chi Zhong;
In preset time threshold, synchronization request instruction is sent to the cache synchronization according to cycle regular hour and is taken Business end, wherein, the cache synchronization server-side obtains the synchronization request and instructs and perform slow in the synchronization request instruction Deposit operational order.
4. the cache synchronization method between multinode according to claim 3, it is characterised in that described in preset time threshold It is interior, synchronization request instruction was sent the step of cache synchronization server-side according to cycle regular hour, also Comprise the following steps:
The synchronization success prompt message that the cache synchronization server-side returns is received, the synchronization request is instructed from described and is retried Deleted in pond, wherein, the synchronous success prompt message is that the cache synchronization server-side receives the synchronization request instruction simultaneously Perform the prompt message sent after the caching instructions in the synchronization request instruction.
5. the cache synchronization method between a kind of multinode, it is characterised in that comprise the following steps:
The synchronization request instruction that order caching synchronous service end is sent, wherein, the synchronization request instruction includes caching and refers to Make, data cached and cashing indication;
The cashing indication instructed according to the synchronization request positions buffer service;
Data cached it is updated to according to the caching instructions by described in the buffer service.
6. the cache synchronization method between multinode according to claim 5, it is characterised in that further comprising the steps of:
Receive the buffer service return second caches successfully prompt message;
Successfully prompt message, which is cached, according to described second sends synchronous success prompt message to the cache synchronization server-side.
7. the cache synchronization method between a kind of multinode, it is characterised in that comprise the following steps:
First cache synchronization server-side receives the synchronization request instruction of operation system;Wherein, the synchronization request instruction includes connecing Mouth parameter, caching instructions, cache size and cashing indication, the first cache synchronization server-side include synchronization caching and initiate The cache synchronization server-side of node;
The interface parameters that the first cache synchronization server-side is instructed according to the synchronization request calls corresponding interface, and passes through The interface sends synchronization request instruction to the second cache synchronization server-side, wherein, the second cache synchronization service End includes the cache synchronization server-side of cache node to be synchronized;
The second cache synchronization server-side receives the synchronization request that the first cache synchronization server-side is sent and instructs, and according to The cashing indication positioning buffer service of the synchronization request instruction;
The second cache synchronization server-side according to the caching instructions by it is described it is data cached be updated to it is described caching take In business.
8. the cache synchronization method between multinode according to claim 7, it is characterised in that further comprising the steps of:
The second cache synchronization server-side receives second that the buffer service returns and caches successfully prompt message, and according to institute State the second caching success prompt message and send synchronous success prompt message to the first cache synchronization server-side;
The first cache synchronization server-side receives the synchronous success prompt message, and according to the synchronous success prompt message Return first cache successfully prompt message to the operation system.
A kind of 9. cache synchronization system between multinode, it is characterised in that including:
First synchronization request command reception module, the synchronization request for receiving operation system instruct;Wherein, the synchronization request Instruction includes interface parameters and caching instructions;
Interface calling module, the interface parameters for being instructed according to the synchronization request call corresponding interface;
Synchronization request instruction sending module, for being sent synchronization request instruction to each preset buffer memory by the interface Synchronous service end, wherein, the cache synchronization server-side obtains the synchronization request and instructs and perform the synchronization request instruction In caching instructions.
A kind of 10. cache synchronization system between multinode, it is characterised in that including:
Second synchronization request command reception module, the synchronization request instruction sent for order caching synchronous service end, wherein, institute Stating synchronization request instruction includes caching instructions, data cached and cashing indication;
Buffer service locating module, the cashing indication for being instructed according to the synchronization request position buffer service;
Data cached update module, for data cached being updated to the buffer service by described according to the caching instructions In.
CN201711451424.XA 2017-12-27 2017-12-27 Method and system for synchronizing cache among multiple nodes Active CN107948318B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711451424.XA CN107948318B (en) 2017-12-27 2017-12-27 Method and system for synchronizing cache among multiple nodes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711451424.XA CN107948318B (en) 2017-12-27 2017-12-27 Method and system for synchronizing cache among multiple nodes

Publications (2)

Publication Number Publication Date
CN107948318A true CN107948318A (en) 2018-04-20
CN107948318B CN107948318B (en) 2021-02-19

Family

ID=61940518

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711451424.XA Active CN107948318B (en) 2017-12-27 2017-12-27 Method and system for synchronizing cache among multiple nodes

Country Status (1)

Country Link
CN (1) CN107948318B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110413418A (en) * 2019-06-25 2019-11-05 北京三快在线科技有限公司 Cache synchronization device and method, cache synchronization system, electronic equipment
CN110825758A (en) * 2019-10-31 2020-02-21 中国银联股份有限公司 Transaction processing method and device
CN111159233A (en) * 2019-12-18 2020-05-15 金蝶软件(中国)有限公司 Distributed caching method, system, computer device and storage medium
CN111324668A (en) * 2020-02-18 2020-06-23 中国联合网络通信集团有限公司 Database data synchronous processing method and device and storage medium
CN113392132A (en) * 2021-05-07 2021-09-14 杭州数知梦科技有限公司 Distributed caching method and system for IOT scene
CN113761037A (en) * 2020-09-28 2021-12-07 西安京迅递供应链科技有限公司 Import and export method, device, server, medium and service system

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1514370A (en) * 2002-12-31 2004-07-21 深圳市中兴通讯股份有限公司 Mobile customer high performance HLR/AUC mobile customer data bank implementing method
CN1780201A (en) * 2004-11-17 2006-05-31 中兴通讯股份有限公司 Method for realizing synchronous information between multiple nodes
CN101437179A (en) * 2008-12-17 2009-05-20 烽火通信科技股份有限公司 Method for implementing batch synchronization multi-configuration data based on EPON system
CN101146127B (en) * 2007-10-30 2010-06-09 金蝶软件(中国)有限公司 A client buffer update method and device in distributed system
CN103973727A (en) * 2013-01-28 2014-08-06 深圳市腾讯计算机系统有限公司 Data synchronizing method and device
CN104301990A (en) * 2014-10-10 2015-01-21 大唐移动通信设备有限公司 Data synchronizing method and device
CN104734838A (en) * 2013-12-20 2015-06-24 深圳市国微电子有限公司 Method, system and switching matrix for synchronizing data
CN106033474A (en) * 2016-04-21 2016-10-19 苏州奖多多科技有限公司 Data synchronization updating method and device, and electronic device
CN106202365A (en) * 2016-07-07 2016-12-07 帅斌鹏 Method, system and the data-base cluster that database update synchronizes
CN106790705A (en) * 2017-02-27 2017-05-31 郑州云海信息技术有限公司 A kind of Distributed Application local cache realizes system and implementation method
CN107018170A (en) * 2016-10-27 2017-08-04 阿里巴巴集团控股有限公司 A kind of method of data synchronization and equipment
CN107071059A (en) * 2017-05-25 2017-08-18 腾讯科技(深圳)有限公司 Distributed caching service implementing method, device, terminal, server and system
CN107153644A (en) * 2016-03-02 2017-09-12 阿里巴巴集团控股有限公司 A kind of method of data synchronization and device

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1514370A (en) * 2002-12-31 2004-07-21 深圳市中兴通讯股份有限公司 Mobile customer high performance HLR/AUC mobile customer data bank implementing method
CN1780201A (en) * 2004-11-17 2006-05-31 中兴通讯股份有限公司 Method for realizing synchronous information between multiple nodes
CN101146127B (en) * 2007-10-30 2010-06-09 金蝶软件(中国)有限公司 A client buffer update method and device in distributed system
CN101437179A (en) * 2008-12-17 2009-05-20 烽火通信科技股份有限公司 Method for implementing batch synchronization multi-configuration data based on EPON system
CN103973727A (en) * 2013-01-28 2014-08-06 深圳市腾讯计算机系统有限公司 Data synchronizing method and device
CN104734838A (en) * 2013-12-20 2015-06-24 深圳市国微电子有限公司 Method, system and switching matrix for synchronizing data
CN104301990A (en) * 2014-10-10 2015-01-21 大唐移动通信设备有限公司 Data synchronizing method and device
CN107153644A (en) * 2016-03-02 2017-09-12 阿里巴巴集团控股有限公司 A kind of method of data synchronization and device
CN106033474A (en) * 2016-04-21 2016-10-19 苏州奖多多科技有限公司 Data synchronization updating method and device, and electronic device
CN106202365A (en) * 2016-07-07 2016-12-07 帅斌鹏 Method, system and the data-base cluster that database update synchronizes
CN107018170A (en) * 2016-10-27 2017-08-04 阿里巴巴集团控股有限公司 A kind of method of data synchronization and equipment
CN106790705A (en) * 2017-02-27 2017-05-31 郑州云海信息技术有限公司 A kind of Distributed Application local cache realizes system and implementation method
CN107071059A (en) * 2017-05-25 2017-08-18 腾讯科技(深圳)有限公司 Distributed caching service implementing method, device, terminal, server and system

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110413418A (en) * 2019-06-25 2019-11-05 北京三快在线科技有限公司 Cache synchronization device and method, cache synchronization system, electronic equipment
CN110413418B (en) * 2019-06-25 2022-04-05 北京三快在线科技有限公司 Cache synchronization device and method, cache synchronization system and electronic equipment
CN110825758A (en) * 2019-10-31 2020-02-21 中国银联股份有限公司 Transaction processing method and device
CN111159233A (en) * 2019-12-18 2020-05-15 金蝶软件(中国)有限公司 Distributed caching method, system, computer device and storage medium
CN111159233B (en) * 2019-12-18 2024-03-08 金蝶软件(中国)有限公司 Distributed caching method, system, computer equipment and storage medium
CN111324668A (en) * 2020-02-18 2020-06-23 中国联合网络通信集团有限公司 Database data synchronous processing method and device and storage medium
CN111324668B (en) * 2020-02-18 2023-11-21 中国联合网络通信集团有限公司 Database data synchronous processing method, device and storage medium
CN113761037A (en) * 2020-09-28 2021-12-07 西安京迅递供应链科技有限公司 Import and export method, device, server, medium and service system
CN113392132A (en) * 2021-05-07 2021-09-14 杭州数知梦科技有限公司 Distributed caching method and system for IOT scene

Also Published As

Publication number Publication date
CN107948318B (en) 2021-02-19

Similar Documents

Publication Publication Date Title
CN107948318A (en) Cache synchronization method and system between multinode
CN105472002B (en) Based on the session synchronization method copied immediately between clustered node
US8825710B2 (en) Cloud computing method for dynamically scaling a process across physical machine boundaries
CN105635216B (en) Upgrade method, equipment and the distributed system of Distributed Application
US20050004952A1 (en) Transaction processing method, transaction control apparatus and program thereof
US20100076925A1 (en) System for managing data collection processes
CN101668046A (en) Resource caching method, resource obtaining method, device and system thereof
CN110099084B (en) Method, system and computer readable medium for ensuring storage service availability
CN109819336B (en) Method and system for downloading fragments based on size of play cache
CN106034080A (en) Metadata migration method and metadata migration device in distributed system
CN111221469B (en) Method, device and system for synchronizing cache data
CN110737388A (en) Data pre-reading method, client, server and file system
CN108491163B (en) Big data processing method and device and storage medium
CN110311979A (en) A kind of the task immigration method and relevant apparatus of MEC server
CN103647811B (en) A method and an apparatus for application's accessing backstage service
CN112667527A (en) Method for ensuring data acquisition accuracy of client and client
CN111221861B (en) Method and device for synchronizing local cache and database data
CN105893429A (en) Method and system for optimizing WEB cache
CN105893135B (en) Distributed data processing method and data center
CN108153794B (en) Page cache data refreshing method, device and system
CN107181773A (en) Data storage and data managing method, the equipment of distributed memory system
CN111698281B (en) Resource downloading method and device, electronic equipment and storage medium
CN110119388A (en) File read/write method, device, system, equipment and computer readable storage medium
CN105550362B (en) A kind of the index data restorative procedure and storage system of storage system
CN110300140A (en) For the method for content update, refreshing client and network node in cloud distribution network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Xiao Feng

Inventor before: Xiao Fengshen

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220216

Address after: Room 1423, No. 1256 and 1258, Wanrong Road, Jing'an District, Shanghai 200040

Patentee after: Tianyi Digital Life Technology Co.,Ltd.

Address before: 1 / F and 2 / F, East Garden, Huatian International Plaza, 211 Longkou Middle Road, Tianhe District, Guangzhou, Guangdong 510630

Patentee before: Century Dragon Information Network Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240321

Address after: Unit 1, Building 1, China Telecom Zhejiang Innovation Park, No. 8 Xiqin Street, Wuchang Street, Yuhang District, Hangzhou City, Zhejiang Province, 311100

Patentee after: Tianyi Shilian Technology Co.,Ltd.

Country or region after: Zhong Guo

Address before: Room 1423, No. 1256 and 1258, Wanrong Road, Jing'an District, Shanghai 200040

Patentee before: Tianyi Digital Life Technology Co.,Ltd.

Country or region before: Zhong Guo