CN110069419A - Multilevel cache system and its access control method, equipment and storage medium - Google Patents
Multilevel cache system and its access control method, equipment and storage medium Download PDFInfo
- Publication number
- CN110069419A CN110069419A CN201811026909.9A CN201811026909A CN110069419A CN 110069419 A CN110069419 A CN 110069419A CN 201811026909 A CN201811026909 A CN 201811026909A CN 110069419 A CN110069419 A CN 110069419A
- Authority
- CN
- China
- Prior art keywords
- cache
- data
- caching
- redis
- level
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 47
- 238000003860 storage Methods 0.000 title claims abstract description 25
- 230000015654 memory Effects 0.000 claims abstract description 28
- 230000004044 response Effects 0.000 claims abstract description 7
- RYYVLZVUVIJVGH-UHFFFAOYSA-N caffeine Chemical group CN1C(=O)N(C)C(=O)C2=C1N=CN2C RYYVLZVUVIJVGH-UHFFFAOYSA-N 0.000 claims description 88
- LPHGQDQBBGAPDZ-UHFFFAOYSA-N Isocaffeine Natural products CN1C(=O)N(C)C(=O)C2=C1N(C)C=N2 LPHGQDQBBGAPDZ-UHFFFAOYSA-N 0.000 claims description 44
- 229960001948 caffeine Drugs 0.000 claims description 44
- VJEONQKOZGKCAK-UHFFFAOYSA-N caffeine Natural products CN1C(=O)N(C)C(=O)C2=C1C=CN2C VJEONQKOZGKCAK-UHFFFAOYSA-N 0.000 claims description 44
- 238000004590 computer program Methods 0.000 claims description 20
- 230000001360 synchronised effect Effects 0.000 claims description 9
- 230000000694 effects Effects 0.000 claims description 3
- 239000007853 buffer solution Substances 0.000 claims 1
- 238000005457 optimization Methods 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 23
- 230000006870 function Effects 0.000 description 16
- 238000004891 communication Methods 0.000 description 6
- 239000000203 mixture Substances 0.000 description 6
- 230000008569 process Effects 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 3
- 238000000151 deposition Methods 0.000 description 3
- 238000009434 installation Methods 0.000 description 3
- 241001269238 Data Species 0.000 description 2
- 230000009471 action Effects 0.000 description 2
- 230000008901 benefit Effects 0.000 description 2
- 230000005611 electricity Effects 0.000 description 2
- 239000004744 fabric Substances 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 230000001052 transient effect Effects 0.000 description 2
- RYGMFSIKBFXOCR-UHFFFAOYSA-N Copper Chemical compound [Cu] RYGMFSIKBFXOCR-UHFFFAOYSA-N 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 229910052802 copper Inorganic materials 0.000 description 1
- 239000010949 copper Substances 0.000 description 1
- 238000007405 data analysis Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 239000006185 dispersion Substances 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000004080 punching Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0806—Multiuser, multiprocessor or multiprocessing cache systems
- G06F12/0811—Multiuser, multiprocessor or multiprocessing cache systems with multilevel cache hierarchies
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0893—Caches characterised by their organisation or structure
- G06F12/0895—Caches characterised by their organisation or structure of parts of caches, e.g. directory or tag array
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0893—Caches characterised by their organisation or structure
- G06F12/0897—Caches characterised by their organisation or structure with two or more cache hierarchy levels
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
Abstract
This disclosure relates to cloud storage technical field, in particular to a kind of multilevel cache system and its access control method, equipment and storage medium.The described method includes: accessing level cache in response to receiving request of data;In the case where there is no requested data in level cache, L2 cache is accessed;There are in the case where requested data in L2 cache, the expired time of the requested data in L2 cache is extended into the predetermined time.By the presently disclosed embodiments, a kind of distribution memory technology of optimization can be provided, improves buffer efficiency, reduces caching dilatation cost.
Description
Technical field
The present invention relates to cloud storage technical field, in particular to a kind of multilevel cache system and its access control method, dress
It sets, calculate equipment and computer readable storage medium.
Background technique
With the growth of Internet bandwidth and scale, more and more large-scale data analyses, processing system are faced with number
According to the bottleneck of access performance.The continuous expansion of data scale and data accelerate the increase of requirements for access, enable the dilatation of caching system
Cost exponentially increases, and the economy of caching system is caused to decline to a great extent.In order to reduce the dilatation cost of caching, caching is improved
Performance needs a kind of more efficient novel caching system.
Summary of the invention
One or more of in order to solve the above problem, the embodiment of the invention provides a kind of multilevel cache system and its visits
It asks control method, device, calculate equipment and computer readable storage medium.
According to a first aspect of the present application, a kind of access control method for multilevel cache system, the multistage are provided
Caching system includes level cache and L2 cache, and the access control method includes:
Level cache is accessed in response to receiving request of data;
In the case where there is no requested data in level cache, L2 cache is accessed;
There are in the case where requested data in L2 cache, by the expired of the requested data in L2 cache
Time extends the predetermined time.
According to an exemplary embodiment, the access control method further include:
There are in the case where requested data, obtaining requested data from L2 cache in L2 cache, and
The data are synchronized in level cache.
According to an exemplary embodiment, the level cache is Caffeine level cache, and being includes one or more
The local cache of Caffeine node;The L2 cache is Redis L2 cache, is point for including multiple Redis nodes
Cloth caching.
According to an exemplary embodiment, the access control method further include:
In the case where causing the corresponding data of database to update due to user's operation, the user's operation occurs
Caffeine node to Redis L2 cache send caching stale messages;
The Redis L2 cache for receiving caching stale messages will cache expired news release to Redis message queue;
Redis node and Caffeine node receive the caching stale messages by subscribing to Redis message queue;
The respective counts that each Redis node and Caffeine node cache it according to the caching stale messages
According to failure.
According to an exemplary embodiment, include the field of the corresponding data updated in the caching stale messages
Title.
According to an exemplary embodiment, each Redis node and Caffeine node make according to the caching stale messages
Its described corresponding data cached fails
Each Redis node and Caffeine node exist according to the field name for including in the caching stale messages
The field name is searched in its data cached;
Each Redis node and Caffeine node make the field name and its corresponding value found fail.
According to a second aspect of the present application, a kind of multilevel cache system is provided comprising level cache and L2 cache,
In, the multilevel cache system is configured as: having institute in level cache for requested data access level cache
In the case where the data of request, from obtaining requested data in L2 cache and the data be synchronized in level cache,
Wherein, the multilevel cache system is also configured to not have requested data in level cache and second level is slow
In the case where there are requested data in depositing, the expired time of the requested data in L2 cache is extended into the predetermined time.
According to the third aspect of the application, a kind of access control apparatus for multilevel cache system, the multistage are provided
Caching system includes level cache and L2 cache, and the access control apparatus includes:
Level cache access modules, are configured as: accessing level cache in response to receiving request of data;
L2 cache access modules, are configured as: in the case where there is no requested data in level cache, access
L2 cache;
Extension module, is configured as:, will be in L2 cache there are in the case where requested data in L2 cache
Requested data expired time extend the predetermined time.
According to an exemplary embodiment, the access control apparatus further include:
Synchronization module is configured as: there are in the case where requested data in L2 cache, from L2 cache
Requested data are obtained, and the data are synchronized in level cache.
According to an exemplary embodiment, in which:
The level cache is Caffeine level cache, be include one or more Caffeine nodes local it is slow
It deposits;
The L2 cache is Redis L2 cache, is the distributed caching for including multiple Redis nodes.
According to an exemplary embodiment, the access control apparatus further include:
Stale messages sending module, is configured as: the corresponding data of database being caused to occur due to user's operation
In the case where update, the Caffeine node that the user's operation occurs is made to send caching stale messages to Redis L2 cache;
Redis message queue module, is configured as: cache the Redis L2 cache for receiving caching stale messages will
Stale messages are published to Redis message queue;
Subscribing module is configured as: making Redis node and Caffeine node by subscribing to Redis message queue
Receive the caching stale messages;
Failed module is configured as: making each Redis node and Caffeine node according to the caching stale messages
The corresponding data failure for caching it.
According to an exemplary embodiment, include the field of the corresponding data updated in the caching stale messages
Title.
According to an exemplary embodiment, the failed module includes:
Searching unit is configured as: making each Redis node and Caffeine node according to the caching stale messages
In include the field name its caching data in search the field name;
Disabling unit is configured as: the field name for making each Redis node and Caffeine node make to find
Claim and its corresponding value fails.
According to the fourth aspect of the application, a kind of calculating equipment is provided, is communicably connected with multilevel cache system,
The multilevel cache system includes level cache and L2 cache, and the calculating equipment includes memory and processor, described to deposit
Computer program is stored in reservoir, the computer program by the processor when being executed, so that the calculating equipment is held
Any of row embodiment of the method as described above.
According to the 5th of the application the aspect, a kind of computer readable storage medium is provided, computer program is stored thereon with,
The computer program realizes any of embodiment of the method as described above when being executed by one or more processors.
The technical solution that embodiments herein provides can include the following benefits:
By the application each embodiment as described above and as described below, buffer efficiency can be improved, reduce caching and expand
Rongcheng sheet.In addition, in some embodiments, there is no requested data in Caffeine level cache and Redis second level is slow
In the case where having requested data in depositing, the expired times of the requested data in Redis L2 cache is extended (such as
Extend the predetermined time), the hot spot data for allowing user frequently may need to obtain retains in the buffer for a long time, improves
Caching performance.
It should be understood that the above general description and the following detailed description are merely exemplary, this can not be limited
It is open.
Detailed description of the invention
Fig. 1 is the simplified schematic diagram of implementation environment involved in the application shown according to an exemplary embodiment.
Fig. 2 is the schematic flow diagram according to the access control method shown in one exemplary embodiment of the application.
Fig. 3 is according to the access control method including data updating process shown in the application another exemplary embodiment
Schematic flow diagram.
Fig. 4 is the example specific implementation according to step S340 in the access control method shown in Fig. 3 corresponding embodiment
Schematic flow diagram.
Fig. 5 is the signal composition block diagram according to the access control apparatus shown in one exemplary embodiment of the application.
Fig. 6 is the signal composition block diagram according to the calculating equipment shown in one exemplary embodiment of the application.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right
Exemplary embodiment of the present invention is further elaborated.In the following description when referring to the accompanying drawings, unless otherwise indicated, it is different
Same numbers in attached drawing indicate the same or similar element.The not generation of embodiment described in following exemplary embodiment
The table all embodiments consistent with the application.On the contrary, they are only and as detailed in the attached claim, this Shen
The example of the consistent device and method of some aspects please.It should be appreciated that specific embodiment described herein is used only for
It explains the present invention, is not intended to limit the present invention.
Fig. 1 is the simplified schematic diagram of implementation environment involved in the application shown according to an exemplary embodiment.Such as Fig. 1 institute
Show, multilevel cache system involved in the embodiment of the present application may include level cache 110 and L2 cache 120.Wherein, level-one
Caching 110 is local cache, and staleness algorithms are recent visit staleness algorithms, i.e., data pass through after last time write-in or access
It is expired to spend the set time.L2 cache 120 is distributed caching, replacement policy volatile-ttl had been provided with
In the bond space of time phase, will there is the key of expired time earlier preferentially to remove.For request of data, access level-one first is slow
110 are deposited, access L2 cache 120 is just removed in the case where requested data are not present in level cache 110, from L2 cache
The data are simultaneously synchronized in level cache 110 by 120 acquisition data, are requested when all no in the multi-level buffer of caching system
Data when, obtained from database and data and the data be synchronized to L2 cache 120.In one embodiment, the multistage
Caching system is configured as: not having requested data in level cache 110 and has requested number in L2 cache 120
In the case where, the expired time of the requested data in L2 cache 120 is extended into the predetermined time.In one embodiment
In, level cache 110 is Caffeine level cache, and being includes that one or more Caffeine nodes 111 (show in Fig. 1
Out be two) local cache, L2 cache be Redis L2 cache, be to include multiple Redis nodes 121 (in Fig. 1
Be shown as three) distributed caching.In one example, multilevel cache system is for one or more application (such as Java
Using) buffer service is provided, Caffeine level cache is located in the virtual machine (such as JVM) of application deployment, access speed
It spends most fast.Fig. 1 and above description are the exemplary embodiment of implementation environment involved in the application, it is to be understood that suitable
For the implementation environment of the application, there are various deformations.
Fig. 2 is according to the access control method for multilevel cache system shown in the exemplary embodiment of the application
Schematic flow diagram.The multilevel cache system is such as described in reference diagram 1 above.As shown in the exemplary embodiment of Fig. 2, this method can
With comprising steps of
S210 accesses level cache in response to receiving request of data.
In the case that there are requested data in level cache, requested number is directly acquired from level cache
According to otherwise, entering step S220.
S220 in the case where not having requested data in level cache, accesses L2 cache.
If level cache is not hit, accesses L2 cache and attempt to obtain requested data.
S230, there are in the case where requested data in L2 cache, by the requested data in L2 cache
Expired time extend the predetermined time.
The predetermined time for example can be an expiration period (such as 5 minutes).Data present in L2 cache are
The data being requested, present request of data are obtained to its at least second, this shows that the data are hot spot data,
It is likely to frequently be obtained.In order to improve data access speed, cache access performance is promoted, the hot spot data can be allowed slow
It is longer with the time existing for effective status in the L2 cache of deposit system, in order to from L2 cache rather than access speed is slower
Database obtain the hot spot data.For this purpose, extending the expired time of the hot spot data by step S230.
In one embodiment, when, also there is no in the case where requested data, system is by access number in L2 cache
Requested data are obtained according to library, and the data are synchronized in L2 cache.
Fig. 3 is according to the access control method including data updating process shown in the application another exemplary embodiment
Schematic flow diagram.In this embodiment, as described in the embodiment in figure 1, level cache is Caffeine level cache, is
Local cache including one or more Caffeine nodes, L2 cache are Redis L2 cache, and it includes multiple for being
The distributed caching of Redis node.As shown in figure 3, the embodiment method comprising steps of
In the case where causing the corresponding data of database to update due to user's operation the use occurs for S310
The Caffeine node of family operation sends caching stale messages to Redis L2 cache.
In one example, in step s310, the Caffeine node that the user's operation occurs, which is not only sent, to be cached
Phase message, the corresponding data failure for also caching it, for example, corresponding data is set to expired state or is directly deleted
It removes.
S320, the Redis L2 cache for receiving caching stale messages will cache expired news release to Redis message team
Column.
In one example, which is received by a Redis node of Redis L2 cache and is sent out
Cloth is to Redis message queue.It is specifically received by which Redis node, is determined by preconfigured routing.
S330, Redis node and Caffeine node receive that the caching is expired to disappear by subscribing to Redis message queue
Breath.
Message can be communicated to by Publish-subscribe mechanism and subscribe to Redis message queue by Redis message queue
Redis node and Caffeine node.By subscribing to Redis message queue, Redis node and Caffeine node can be received
The caching stale messages.
Described in S340, each Redis node and Caffeine node cache it according to the caching stale messages
Corresponding data failure.
" cache it the corresponding data failure " can refer to the state of the corresponding data is set to it is expired, either
Directly it is deleted.
Fig. 4 is the example specific implementation according to step S340 in the access control method shown in Fig. 3 corresponding embodiment
Schematic flow diagram.In this embodiment, the expired message package of caching issued in Redis message queue is containing the institute updated
State the field name of corresponding data.As shown in figure 4, step S340 may include step:
S410, each Redis node and Caffeine node are according to the field name for including in caching stale messages at it
The field name is searched in the data of caching.
For example, caching, expired message table is bright, and following field is data out of date: " device id " field, " user type " word
Section, then each Redis node and Caffeine node Lookup Field " device id ", " user type " in the data of its caching.
S420, each Redis node and Caffeine node lose the field name found and its corresponding value
Effect.
For example, if a Redis or Caffeine node its caching data in find " device id " field and
Its value " 13300881234 " then makes the field " device id " and its value " 13300881234 " fail in its caching.
By the way that the field name of stale data to be included in caching stale messages, and come by searching for its value so that this portion
Divided data failure can be convenient data expired in quickly removal caching, in order to avoid use the data of mistake.
According to the another aspect of the application, the access control apparatus for above-mentioned multilevel cache system is also disclosed.
Fig. 5 is the signal composition block diagram according to the access control apparatus shown in one exemplary embodiment of the application.The device
501 for executing each embodiment of access control method as described above.As shown in figure 5, example user access control apparatus 501
Include:
Level cache access modules 510, are configured as: accessing level cache in response to receiving request of data;
L2 cache access modules 520, are configured as: in the case where there is no requested data in level cache,
Access L2 cache;
Extension module 530, is configured as: there are in the case where requested data in L2 cache, second level being delayed
The expired time of requested data in depositing extends the predetermined time.
Embodiment according to figure 5, device 501 can also include:
Synchronization module 540, is configured as: there are in the case where requested data in L2 cache, delaying from second level
The middle requested data of acquisition are deposited, and the data are synchronized in level cache.
Embodiment according to figure 5, device 501 can also include:
Stale messages sending module 550, is configured as: the corresponding data of database being caused to be sent out due to user's operation
In the case where raw update, sending the Caffeine node that the user's operation occurs to Redis L2 cache, caching is expired to disappear
Breath;
Redis message queue module 560, is configured as: delay the Redis L2 cache for receiving caching stale messages will
It deposits stale messages and is published to Redis message queue;
Subscribing module 570, is configured as: making Redis node and Caffeine node by subscribing to Redis message queue
And receive the caching stale messages;
Failed module 580, is configured as: keeping each Redis node and Caffeine node expired according to the caching
The corresponding data failure that message caches it.
Embodiment according to figure 5 is caching expired field name of the message package containing the corresponding data updated
In the case where title, failed module 580 may include:
Searching unit 581, is configured as: keeping each Redis node and Caffeine node expired according to the caching
The field name for including in message searches the field name in the data of its caching;
Disabling unit 582, is configured as: the word for making each Redis node and Caffeine node make to find
Name section and its failure of corresponding value.
Each unit/module function and the realization process and correlative detail of effect are specifically detailed in above-mentioned in above-mentioned apparatus
The realization process of step is corresponded in embodiment of the method, details are not described herein.
Installation practice in the above various embodiments can realize by way of hardware, software, firmware or combinations thereof,
And which can be implemented as an individual devices, also may be implemented as each composition units/modules and are dispersed in one or more
The logic integrated system of corresponding function is executed in a calculating equipment and respectively.
Each unit/module that the device is formed in the above various embodiments is divided according to logic function, they can be with
It is repartitioned according to logic function, such as can realize the device by more or fewer units/modules.These compositions
Units/modules can realize that they can be the independence of difference by way of hardware, software, firmware or combinations thereof respectively
Component is also possible to multiple components and combines execute integrated unit/module of corresponding logic function.The hardware, software,
The mode of firmware or combinations thereof may include: the hardware component of separation, by the functional module of programming mode realization, by that can compile
The functional module, etc. that journey logical device is realized, or with the combination of upper type.
According to an exemplary embodiment, which can be implemented as a kind of calculating equipment, can with multilevel cache system
It is communicatively connected and connects, the multilevel cache system includes level cache and L2 cache, which includes memory and place
Device is managed, computer program is stored in the memory, the computer program by the processor when being executed, so that described
Processor executes any of each method embodiment as described above, alternatively, the computer program is by the processor
The calculating equipment is made to realize the group for each embodiment of access control apparatus of multilevel cache system as described above when execution
The function of being realized at units/modules.
Processor described in above embodiment can refer to single processing unit, such as central processing unit CPU, can also
Be include multiple dispersions processing unit distributed processor system.
Memory described in above embodiment may include one or more memories, can be and calculates equipment
Internal storage, such as transient state or non-transient various memories, are also possible to be connected to calculating equipment by memory interface
External memory.
Fig. 6 shows the signal composition block diagram of such exemplary embodiment for calculating equipment 601.As shown in fig. 6,
Calculating equipment 601 may include: processor 610, communication interface 620, memory 630 and bus 640.Storage in memory 630
There is the computer program that can be executed by processor 610.Processor 610 is realized in above-described embodiment when executing the computer program
Method and device function.The quantity of memory 630 and processor 610 can be respectively one or more.Communication interface 620
For the communication between processor 610 and external equipment.
Wherein, processor 610 can be central processing unit, general processor, digital signal processor, dedicated integrated electricity
Road, field programmable gate array or other programmable logic device, transistor logic, hardware component or its any group
It closes.It, which may be implemented or executes, combines various illustrative process steps, functional unit/mould described in the disclosure of invention
Block and/or circuit.The processor is also possible to realize the combination of computing function, such as includes one or more microprocessors group
Conjunction, digital signal processor etc..
Memory 630 may include volatile memory and/or nonvolatile memory, such as non-volatile dynamic random
Access memory, phase change random access memory devices, magnetic random access memory, magnetic disk storage, Electrical Erasable can be compiled
Journey read-only memory, flush memory device, semiconductor devices (such as solid state hard disk) etc..Memory 630 optionally can also be external
Remote storage.
It is total that bus 640 can be industry standard architecture (ISA, Industry Standard Architecture)
Line, external equipment interconnection (PCI, Peripheral Component) bus or extended industry-standard architecture (EISA,
Extended Industry Standard Component) bus etc..It is total that the bus can be divided into address bus, data
Line, control bus etc..Only to be indicated with a thick line in Fig. 6, it is not intended that an only bus or a type convenient for indicating
The bus of type.Optionally, if memory 630, processor 610 and communication interface 620 are integrated on one chip, memory
630, processor 610 and communication interface 620 can complete mutual communication by internal interface.
The above each method and Installation practice are also implemented as the form of computer program, are stored in storage medium
On, and can be distributed.Therefore, according to another aspect of the present disclosure, a kind of computer program product is also provided, the computer journey
Sequence product is stored on computer readable storage medium, and realize when being executed by processor each method as described above and
Any of Installation practice.According to the another aspect of the disclosure, a kind of computer readable storage medium is also provided, is deposited thereon
The computer program executed for processor is contained, the computer program is realized as described above each when being executed by processor
Any of method and apparatus embodiment.
The computer readable storage medium can be any finger that can be kept and store and can be used by instruction execution equipment
The tangible device of order.For example, it can be ,-- but is not limited to-- storage device electric, magnetic storage apparatus, light storage device, electricity
Magnetic storage apparatus, semiconductor memory apparatus or above-mentioned any appropriate combination.The more specific example of storage medium is (non-poor
The list of act) it include: portable computer diskette, hard disk, random access memory (RAM), read-only memory (ROM), erasable type
Programmable read only memory (EPROM or flash memory), static random access memory (SRAM), Portable compressed disk read-only memory
(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 program/computer instruction as described herein can download to each meter from computer readable storage medium
Calculation/processing equipment, or outer computer is downloaded to by network, such as internet, local area network, wide area network and/or wireless network
Or External memory equipment.Network may include copper transmission cable, optical fiber transmission, wireless transmission, router, firewall, interchanger,
Gateway computer and/or Edge Server.Adapter or network interface in each calculating/processing equipment connect from network
Computer-readable program instructions are received, and forward the computer-readable program instructions, for being stored in each calculating/processing equipment
Computer readable storage medium in.
Computer program instructions described in the disclosure can be assembly instruction, instruction set architecture (ISA) instructs, machine refers to
It enables, machine-dependent instructions, microcode, firmware instructions, condition setup data or with any group of one or more programming languages
The source code or object code write are compiled in collaboration with, the programming language includes programming language-such as Smalltalk, C+ of object-oriented
+ etc., and conventional procedural programming languages-such as " C " language or similar programming language.Computer-readable program instructions
It can fully execute on the user computer, partly execute, held as an independent software package on the user computer
Part executes on the remote computer or holds on a remote computer or server completely on the user computer for row, part
Row.In situations involving remote computers, remote computer can include local area network (LAN) by the network-of any kind
Or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as utilize Internet service
Provider is connected by internet).In some embodiments, by the status information using computer-readable program instructions come
Personalized customization electronic circuit, such as programmable logic circuit, field programmable gate array (FPGA) or programmable logic array
(PLA), which can execute computer-readable program instructions, to realize various aspects of the invention.
Referring herein to according to the method for the embodiment of the present invention, the flow chart of device (system) and computer program product and/
Or block diagram describes various aspects of the invention.It should be appreciated that flowchart and or block diagram each box and flow chart and/
Or in block diagram each box combination, can be realized by computer-readable program instructions.
These computer-readable program instructions can be supplied to general purpose computer, special purpose computer or other programmable datas
The processor of processing unit, so that a kind of machine is produced, so that these instructions are passing through computer or other programmable datas
When the processor of processing unit executes, function specified in one or more boxes in implementation flow chart and/or block diagram is produced
The device of energy/movement.These computer-readable program instructions can also be stored in a computer-readable storage medium, these refer to
It enables so that computer, programmable data processing unit and/or other equipment work in a specific way, thus, it is stored with instruction
Computer-readable medium then includes a manufacture comprising in one or more boxes in implementation flow chart and/or block diagram
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 are executed in computer, other programmable data processing units or other equipment, to produce
Raw computer implemented process, so that executed in computer, other programmable data processing units or other equipment
Instruct function action specified in one or more boxes in implementation flow chart and/or block diagram.
The flow chart and block diagram in the drawings show the system of multiple embodiments according to the present invention, method and computer journeys
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
One module of table, program segment or a part of instruction, the module, program segment or a part of instruction include one or more use
The executable instruction of the logic function as defined in realizing.In some implementations as replacements, function marked in the box
It can occur in a different order than that indicated in the drawings.For example, two continuous boxes can actually be held substantially in parallel
Row, they can also be executed in the opposite order sometimes, and this depends on the function involved.It is also noted that block diagram and/or
The combination of each box in flow chart and the box in block diagram and or flow chart, can the function as defined in executing or dynamic
The dedicated hardware based system made is realized, or can be realized using a combination of dedicated hardware and computer instructions.It is right
For those skilled in the art it is well known that, by hardware mode realize, by software mode realize and pass through software and
It is all of equal value that the mode of combination of hardware, which is realized,.
It should be noted that all the embodiments in this specification are described in a progressive manner, each embodiment weight
Point explanation is the difference from other embodiments, and the same or similar parts between the embodiments can be referred to each other.
But it will be clear for those skilled in the art that the various embodiments described above, which can according to need exclusive use or be combined with each other, to be made
With.In addition, for device embodiment, since it is corresponding with embodiment of the method, so describe fairly simple, it is related
Place referring to the corresponding part of embodiment of the method explanation.
The embodiments described above only express several embodiments of the present invention, and the description thereof is more specific and detailed, but simultaneously
Limitations on the scope of the patent of the present invention therefore cannot be interpreted as.It should be pointed out that for those of ordinary skill in the art
For, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to guarantor of the invention
Protect range.Therefore, the scope of protection of the patent of the invention shall be subject to the appended claims.
Claims (10)
1. a kind of access control method for multilevel cache system, which is characterized in that the multilevel cache system includes level-one
Caching and L2 cache, the access control method include:
Level cache is accessed in response to receiving request of data;
In the case where there is no requested data in level cache, L2 cache is accessed;
There are in the case where requested data in L2 cache, by the expired time of the requested data in L2 cache
Extend the predetermined time.
2. access control method as described in claim 1, which is characterized in that further include:
There are in the case where requested data, obtaining requested data from L2 cache in L2 cache, and by institute
Data are stated to be synchronized in level cache.
3. access control method as described in claim 1, it is characterised in that:
The level cache is Caffeine level cache, is the local cache for including one or more Caffeine nodes;
The L2 cache is Redis L2 cache, is the distributed caching for including multiple Redis nodes.
4. access control method as claimed in claim 3, which is characterized in that further include:
In the case where causing the corresponding data of database to update due to user's operation, the user's operation occurs
Caffeine node sends caching stale messages to Redis L2 cache;
The Redis L2 cache for receiving caching stale messages will cache expired news release to Redis message queue;
Redis node and Caffeine node receive the caching stale messages by subscribing to Redis message queue;
Each Redis node and Caffeine node lose according to the corresponding data that the caching stale messages cache it
Effect.
5. access control method as claimed in claim 4, which is characterized in that comprising updating in the caching stale messages
The corresponding data field name.
6. access control method as claimed in claim 5, which is characterized in that each Redis node and Caffeine node root
Include: according to the corresponding data failure that the caching stale messages cache it
Each Redis node and Caffeine node are slow at it according to the field name for including in the caching stale messages
The field name is searched in the data deposited;
Each Redis node and Caffeine node make the field name and its corresponding value found fail.
7. a kind of multilevel cache system, which is characterized in that including level cache and L2 cache, wherein the multi-level buffer system
System is configured as: having the case where requested data in level cache for requested data access level cache
Under, from obtaining requested data in L2 cache and the data be synchronized in level cache,
Wherein, the multilevel cache system is also configured to do not have requested data in level cache and in L2 cache
In the case where there are requested data, the expired time of the requested data in L2 cache is extended into the predetermined time.
8. a kind of access control apparatus for multilevel cache system, which is characterized in that the multilevel cache system includes level-one
Caching and L2 cache, the access control apparatus include:
Level cache access modules, are configured as: accessing level cache in response to receiving request of data;
L2 cache access modules, are configured as: in the case where not having requested data in level cache, accessing second level
Caching;
Extension module, is configured as: there are in the case where requested data in L2 cache, by the institute in L2 cache
The expired time of the data of request extends the predetermined time.
9. a kind of calculating equipment is communicably connected with multilevel cache system, the multilevel cache system includes that level-one is slow
It deposits and L2 cache, the calculating equipment includes memory and processor, computer program is stored in the memory, it is described
Computer program by the processor when being executed, so that the calculating equipment is executed as described in any one of claims 1 to 6
Access control method.
10. a kind of computer readable storage medium is stored thereon with computer program, the computer program is by one or more
Such as access control method described in any one of claims 1 to 6 is realized when a processor executes.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811026909.9A CN110069419A (en) | 2018-09-04 | 2018-09-04 | Multilevel cache system and its access control method, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811026909.9A CN110069419A (en) | 2018-09-04 | 2018-09-04 | Multilevel cache system and its access control method, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110069419A true CN110069419A (en) | 2019-07-30 |
Family
ID=67365831
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811026909.9A Pending CN110069419A (en) | 2018-09-04 | 2018-09-04 | Multilevel cache system and its access control method, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110069419A (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110489063A (en) * | 2019-08-27 | 2019-11-22 | 北京奇艺世纪科技有限公司 | Cache setting method, device, electronic equipment and the storage medium of expired time |
CN110704336A (en) * | 2019-09-26 | 2020-01-17 | 北京神州绿盟信息安全科技股份有限公司 | Data caching method and device |
CN111125583A (en) * | 2019-12-20 | 2020-05-08 | 中国移动通信集团江苏有限公司 | Data access method, device and equipment and computer storage medium |
CN111625566A (en) * | 2020-05-29 | 2020-09-04 | 北京字节跳动网络技术有限公司 | Data caching method, device, medium and equipment |
CN111858669A (en) * | 2020-07-03 | 2020-10-30 | 上海众言网络科技有限公司 | Method and device for second-level caching of data |
CN112181302A (en) * | 2020-09-28 | 2021-01-05 | 上海简苏网络科技有限公司 | Data multilevel storage and access method and system |
CN113420052A (en) * | 2021-07-08 | 2021-09-21 | 上海浦东发展银行股份有限公司 | Multi-level distributed cache system and method |
CN113421557A (en) * | 2021-06-22 | 2021-09-21 | 广州小鹏汽车科技有限公司 | Voice interaction method, voice interaction system and storage medium |
CN113742290A (en) * | 2021-11-04 | 2021-12-03 | 上海闪马智能科技有限公司 | Data storage method and device, storage medium and electronic device |
CN115174502A (en) * | 2022-06-30 | 2022-10-11 | 广东亿迅科技有限公司 | Flow control method, device, equipment and medium of API gateway |
CN116010677A (en) * | 2023-03-24 | 2023-04-25 | 中国华能集团清洁能源技术研究院有限公司 | Spatial index method and device and electronic equipment thereof |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1852318A (en) * | 2006-04-19 | 2006-10-25 | 华中科技大学 | Distributed multi-stage buffer storage system suitable for object network storage |
CN104394184A (en) * | 2014-08-19 | 2015-03-04 | 广州华多网络科技有限公司 | Request processing method, device and system |
CN105608115A (en) * | 2015-12-11 | 2016-05-25 | 北京奇虎科技有限公司 | Data acquisition method and apparatus |
CN106453667A (en) * | 2016-12-20 | 2017-02-22 | 北京小米移动软件有限公司 | Method and device for updating cached data |
CN106708833A (en) * | 2015-08-03 | 2017-05-24 | 腾讯科技(深圳)有限公司 | Position information-based data obtaining method and apparatus |
CN107231395A (en) * | 2016-03-25 | 2017-10-03 | 阿里巴巴集团控股有限公司 | Date storage method, device and system |
CN107528866A (en) * | 2016-06-21 | 2017-12-29 | 中兴通讯股份有限公司 | Method for caching and processing and device |
CN108055302A (en) * | 2017-12-05 | 2018-05-18 | 竞技世界(北京)网络技术有限公司 | A kind of image cache processing method, system and server |
CN108132958A (en) * | 2016-12-01 | 2018-06-08 | 阿里巴巴集团控股有限公司 | A kind of multi-level buffer data storage, inquiry, scheduling and processing method and processing device |
CN108429777A (en) * | 2017-02-15 | 2018-08-21 | 腾讯科技(北京)有限公司 | Data updating method based on cache and server |
-
2018
- 2018-09-04 CN CN201811026909.9A patent/CN110069419A/en active Pending
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1852318A (en) * | 2006-04-19 | 2006-10-25 | 华中科技大学 | Distributed multi-stage buffer storage system suitable for object network storage |
CN104394184A (en) * | 2014-08-19 | 2015-03-04 | 广州华多网络科技有限公司 | Request processing method, device and system |
CN106708833A (en) * | 2015-08-03 | 2017-05-24 | 腾讯科技(深圳)有限公司 | Position information-based data obtaining method and apparatus |
CN105608115A (en) * | 2015-12-11 | 2016-05-25 | 北京奇虎科技有限公司 | Data acquisition method and apparatus |
CN107231395A (en) * | 2016-03-25 | 2017-10-03 | 阿里巴巴集团控股有限公司 | Date storage method, device and system |
CN107528866A (en) * | 2016-06-21 | 2017-12-29 | 中兴通讯股份有限公司 | Method for caching and processing and device |
CN108132958A (en) * | 2016-12-01 | 2018-06-08 | 阿里巴巴集团控股有限公司 | A kind of multi-level buffer data storage, inquiry, scheduling and processing method and processing device |
CN106453667A (en) * | 2016-12-20 | 2017-02-22 | 北京小米移动软件有限公司 | Method and device for updating cached data |
CN108429777A (en) * | 2017-02-15 | 2018-08-21 | 腾讯科技(北京)有限公司 | Data updating method based on cache and server |
CN108055302A (en) * | 2017-12-05 | 2018-05-18 | 竞技世界(北京)网络技术有限公司 | A kind of image cache processing method, system and server |
Non-Patent Citations (2)
Title |
---|
段鹏;张寒云;何磊;: "基于Spring和Memcached的iBATIS二级缓存的研究与应用", 云南民族大学学报(自然科学版), no. 04 * |
茶轴的⻘春: "分布式缓存:爱我你怕了吗?", pages 1 - 7, Retrieved from the Internet <URL:https://www.cnblogs.com/lfs2640666960/archive/2018/08/28/9551519.html> * |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110489063B (en) * | 2019-08-27 | 2023-12-19 | 北京奇艺世纪科技有限公司 | Method and device for setting cache expiration time, electronic equipment and storage medium |
CN110489063A (en) * | 2019-08-27 | 2019-11-22 | 北京奇艺世纪科技有限公司 | Cache setting method, device, electronic equipment and the storage medium of expired time |
CN110704336A (en) * | 2019-09-26 | 2020-01-17 | 北京神州绿盟信息安全科技股份有限公司 | Data caching method and device |
CN110704336B (en) * | 2019-09-26 | 2021-10-15 | 绿盟科技集团股份有限公司 | Data caching method and device |
CN111125583A (en) * | 2019-12-20 | 2020-05-08 | 中国移动通信集团江苏有限公司 | Data access method, device and equipment and computer storage medium |
CN111625566A (en) * | 2020-05-29 | 2020-09-04 | 北京字节跳动网络技术有限公司 | Data caching method, device, medium and equipment |
CN111858669A (en) * | 2020-07-03 | 2020-10-30 | 上海众言网络科技有限公司 | Method and device for second-level caching of data |
CN112181302A (en) * | 2020-09-28 | 2021-01-05 | 上海简苏网络科技有限公司 | Data multilevel storage and access method and system |
CN113421557A (en) * | 2021-06-22 | 2021-09-21 | 广州小鹏汽车科技有限公司 | Voice interaction method, voice interaction system and storage medium |
CN113420052A (en) * | 2021-07-08 | 2021-09-21 | 上海浦东发展银行股份有限公司 | Multi-level distributed cache system and method |
CN113420052B (en) * | 2021-07-08 | 2023-02-17 | 上海浦东发展银行股份有限公司 | Multi-level distributed cache system and method |
CN113742290A (en) * | 2021-11-04 | 2021-12-03 | 上海闪马智能科技有限公司 | Data storage method and device, storage medium and electronic device |
CN115174502A (en) * | 2022-06-30 | 2022-10-11 | 广东亿迅科技有限公司 | Flow control method, device, equipment and medium of API gateway |
CN116010677A (en) * | 2023-03-24 | 2023-04-25 | 中国华能集团清洁能源技术研究院有限公司 | Spatial index method and device and electronic equipment thereof |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110069419A (en) | Multilevel cache system and its access control method, equipment and storage medium | |
CN108009008B (en) | Data processing method and system and electronic equipment | |
CN109313644B (en) | System and method for database proxy | |
US8818942B2 (en) | Database system with multiple layer distribution | |
US10482062B1 (en) | Independent evictions from datastore accelerator fleet nodes | |
US9208094B2 (en) | Managing and sharing storage cache resources in a cluster environment | |
TW201717040A (en) | System and method for a shared cache with adaptive partitioning | |
CN106464669B (en) | Intelligent file prefetching based on access patterns | |
US20100205344A1 (en) | Unified cache structure that facilitates accessing translation table entries | |
CN104133783B (en) | Method and device for processing distributed cache data | |
US10326854B2 (en) | Method and apparatus for data caching in a communications network | |
CN103236989B (en) | Buffer control method in a kind of content distributing network, equipment and system | |
US11188354B1 (en) | Sharing cached class data in a containerized environment | |
CN106959928B (en) | A kind of stream data real-time processing method and system based on multi-level buffer structure | |
US10585807B2 (en) | Balanced cache for recently frequently used data | |
CN111506604A (en) | Method, apparatus and computer program product for accessing data | |
EP4310691A1 (en) | Blockchain-based data processing method, apparatus, and device, and storage medium | |
WO2017117942A1 (en) | Information query method and system for sdn controllers at multiple layers | |
CN111406251B (en) | Data prefetching method and device | |
US9021208B2 (en) | Information processing device, memory management method, and computer-readable recording medium | |
US20230315634A1 (en) | Reconfigurable cache hierarchy framework for the storage of fpga bitstreams | |
US20150310026A1 (en) | Accessing logical storage in a storage cluster | |
CN114390069B (en) | Data access method, system, equipment and storage medium based on distributed cache | |
CN106161668A (en) | Generate the method for domain name mapping, device and server | |
CN115203133A (en) | Data processing method and device, reduction server and mapping server |
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 |