CN108536617A - Buffer memory management method, medium, system and electronic equipment - Google Patents

Buffer memory management method, medium, system and electronic equipment Download PDF

Info

Publication number
CN108536617A
CN108536617A CN201810295031.2A CN201810295031A CN108536617A CN 108536617 A CN108536617 A CN 108536617A CN 201810295031 A CN201810295031 A CN 201810295031A CN 108536617 A CN108536617 A CN 108536617A
Authority
CN
China
Prior art keywords
interface
data
configuration information
present
data cached
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
CN201810295031.2A
Other languages
Chinese (zh)
Other versions
CN108536617B (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.)
WANGYIBAO Co Ltd
Original Assignee
WANGYIBAO 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 WANGYIBAO Co Ltd filed Critical WANGYIBAO Co Ltd
Priority to CN201810295031.2A priority Critical patent/CN108536617B/en
Publication of CN108536617A publication Critical patent/CN108536617A/en
Application granted granted Critical
Publication of CN108536617B publication Critical patent/CN108536617B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0891Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches using clearing, invalidating or resetting means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0866Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
    • G06F12/0871Allocation or management of cache space

Abstract

Embodiments of the present invention provide a kind of buffer memory management method, including, the access request for accessing first interface is obtained, determines at least one second interface associated with the first interface, and delete the data cached of at least partly described second interface.This method utilizes the data in the relevance management caching between interface, makes to clean up expired data in caching in time, improves the access efficiency of interface.Embodiments of the present invention additionally provide a kind of computer readable storage medium, a kind of cache management system and a kind of electronic equipment.

Description

Buffer memory management method, medium, system and electronic equipment
Technical field
Embodiments of the present invention are related to Internet technical field, more specifically, embodiments of the present invention are related to one kind Buffer memory management method, medium, system and electronic equipment.
Background technology
Background that this section is intended to provide an explanation of the embodiments of the present invention set forth in the claims or context.Herein Description recognizes it is the prior art not because not being included in this part.
It refers to the storage unit that can carry out high-speed data exchange to cache (Cache), it exchanges number prior to memory with CPU According to, therefore rate is quickly, usually in development and application, more storage measures being directed toward to frequently accessing data, are to have obtained The duplicate of data, prior to the access strategy of real data, from rate from the point of view of caching reading faster, experience is more preferable, when Required data really in the buffer in the presence of, we term it hits.
However, in some cases, certain data in caching are no longer valid, need to introduce certain strategy and ensure other Program is unlikely to read expired data, and common method is divided into be emptied and empty automatically manually, empties that multifinger hand is dynamic to be gone manually Removing is specified data cached, empties automatically and refers to, to the condition of one premise of default, after system meets the condition, going It empties the cache.
Existing interface caching technology is realized based on HTTP, and the basic principle of realization is request and response in HTTP Some critical fielies, such as time-out time, tag versions and last modified is added in head.
Invention content
But the cache policy of existing interface is more basic, can be cached for idempotent interface, non-idempotent interface is then not Caching, under many scenes, which can not manage caching well, some fail datas cannot delete in time, cause to connect Mouth access efficiency is relatively low.
Thus, it is also very desirable to a kind of improved buffer memory management method, can solve in the prior art interface access efficiency compared with Low technical problem realizes that aimed management is data cached, improves the technique effect of interface access efficiency.
In the present context, embodiments of the present invention are intended to provide a kind of buffer memory management method, medium, system and electronics Equipment.
In the first aspect of embodiment of the present invention, a kind of buffer memory management method is provided, including, it obtains for accessing The access request of first interface determines at least one second interface associated with the first interface, and deletes at least partly The second interface it is data cached.
According to an exemplary embodiment of the present, the determination at least one second interface packet associated with the first interface It includes, obtains the configuration information of the first interface, the configuration information includes associated with the first interface at least one The information of second interface, and at least one second interface is determined according to the information of at least one second interface.
According to an exemplary embodiment of the present, the configuration information further includes the deletion priority of the second interface, institute It includes being based on the configuration information to state and delete at least partly described the data cached of second interface, and preferential delete has higher delete Except the second interface of priority.
According to an exemplary embodiment of the present, second interface it is data cached include multiple subdatas in the case of, institute The identification information that configuration information further includes the subdata of the second interface is stated, at least partly described second interface of deletion It is data cached to include, according to the identification information, delete the second interface it is data cached in part subdata.
According to an exemplary embodiment of the present, wherein the configuration information includes being stored as being made of multiple key-value pairs Object structure.
According to an exemplary embodiment of the present, the configuration information further includes following at least one, the first interface Method type, wherein the method type includes idempotent method or non-idempotent method, and/or, the first interface Data cached enabled state does not cache the data of the first interface in non-enabled state.
According to an exemplary embodiment of the present, in the case where the method for the first interface is idempotent method, the side Method further includes, if the requested first interface data of the access request are present in caching, in using the caching After data respond access request, the first interface data in the caching are updated.
According to an exemplary embodiment of the present, the data cached of the first interface stores in the way of key-value pair, key Title include request address, request header cookie, required parameter and Method type.
In the second aspect of embodiment of the present invention, a kind of computer readable storage medium is provided, is stored thereon with Executable instruction, the executable instruction make the processing unit execute according to any one as described above when being executed by processing unit Method.
In the third aspect of embodiment of the present invention, a kind of cache management system, including acquisition module, determination are provided Module and removing module.Acquisition module, for obtaining the access request for accessing first interface.Determining module, for obtaining Take at least one second interface associated with the first interface.Removing module, for deleting at least partly described second interface It is data cached.
According to an exemplary embodiment of the present, the determining module includes acquisition submodule and determination sub-module.Obtain son Module, the configuration information for obtaining the first interface, the configuration information include it is associated with the first interface at least The information of one second interface.Determination sub-module, it is at least one for being determined according to the information of at least one second interface Second interface.
According to an exemplary embodiment of the present, the configuration information further includes that the second interface deletes priority, described Removing module includes that first deletes submodule, is used to be based on the configuration information, and preferential delete has higher deletion priority Second interface.
According to an exemplary embodiment of the present, second interface it is data cached include multiple subdatas in the case of, institute The identification information that configuration information further includes the second interface subdata is stated, the removing module includes that second deletes submodule, For according to the identification information, delete the second interface it is data cached in part subdata.
According to an exemplary embodiment of the present, the configuration information includes the object for being stored as being made of multiple key-value pairs Structure.
According to an exemplary embodiment of the present, the configuration information further includes following at least one, the first interface Method type, wherein the method type includes idempotent method or non-idempotent method, and/or, the first interface Data cached enabled state does not cache the data of the first interface in non-enabled state.
According to an exemplary embodiment of the present, in the case where the method for the first interface is idempotent method, the system System further includes update module, if being present in caching for the requested first interface data of the access request, is being used After data response access request in the caching, the first interface data in the caching are updated.
According to an exemplary embodiment of the present, the data cached of the first interface stores in the way of key-value pair, key Title include request address, request header cookie, required parameter and Method type.
In the fourth aspect of embodiment of the present invention, a kind of electronic equipment, including processing unit and storage are provided Unit is stored thereon with executable instruction, and described instruction executes the processing unit when being executed by the processing unit as above The either method.
This method, medium, system and electronic equipment, the lower technology of interface access efficiency in the prior art that can solve are asked Topic realizes that aimed management is data cached, improves the technique effect of interface access efficiency.
Description of the drawings
Detailed description below, above-mentioned and other mesh of exemplary embodiment of the invention are read by reference to attached drawing , feature and advantage will become prone to understand.In the accompanying drawings, if showing the present invention's by way of example rather than limitation Dry embodiment, wherein:
Fig. 1 schematically shows the system architecture of application cache management method according to an exemplary embodiment of the present invention;
Fig. 2 schematically shows buffer memory management method flow charts according to an exemplary embodiment of the present invention;
It is associated with the first interface at least that Fig. 3 schematically shows determination according to an exemplary embodiment of the present invention The method flow diagram of one second interface;
It is adapted to carry out buffer memory management method and system Fig. 4 schematically shows according to an exemplary embodiment of the present invention Computer readable storage medium schematic diagram;
Fig. 5 schematically shows the block diagram of cache management system according to an exemplary embodiment of the present invention;
Fig. 6 schematically shows the block diagram of determining module according to an exemplary embodiment of the present invention;
Fig. 7 schematically shows the block diagram of removing module according to an exemplary embodiment of the present invention;
Fig. 8 schematically shows the block diagram of the cache management system according to another exemplary embodiment of the present invention;And
Fig. 9, which is schematically shown, according to an exemplary embodiment of the present invention is adapted to carry out buffer memory management method and system Electronic equipment figure.
In the accompanying drawings, identical or corresponding label indicates identical or corresponding part.
Specific implementation mode
The principle and spirit of the invention are described below with reference to several illustrative embodiments.It should be appreciated that providing this A little embodiments are used for the purpose of making those skilled in the art can better understand that realizing the present invention in turn, and be not with any Mode limits the scope of the invention.On the contrary, these embodiments are provided so that the disclosure is more thorough and complete, and energy It is enough that the scope of the present disclosure is completely communicated to those skilled in the art.
One skilled in the art will appreciate that embodiments of the present invention can be implemented as a kind of system, device, equipment, method Or computer applied algorithm.Therefore, the disclosure can be with specific implementation is as follows, i.e.,:Complete hardware, complete software The form that (including firmware, resident software, microcode etc.) or hardware and software combine.
According to the embodiment of the present invention, it is proposed that a kind of buffer memory management method, system and electronic equipment.
Herein, it is to be understood that any number of elements in attached drawing is used to example and unrestricted and any Name is only used for distinguishing, without any restrictions meaning.
Below with reference to several representative embodiments of the present invention, the principle and spirit of the invention are illustrated in detail.
Summary of the invention
The inventors discovered that the cache policy of existing interface is more basic, it can be cached for idempotent interface, non-idempotent Interface does not cache then, and under many scenes, which can not manage caching well, some fail datas cannot delete in time It removes, causes interface access efficiency relatively low.Method provided in an embodiment of the present invention is by obtaining the access for accessing first interface Request determines at least one second interface associated with the first interface, and deletes at least partly described second interface It is data cached, reach the data cached technique effect for pointedly managing distinct interface.
After the basic principle for describing the present invention, lower mask body introduces the various non-limiting embodiment party of the present invention Formula.
Application scenarios overview
It is referring initially to what Fig. 1, Fig. 1 schematically showed buffer memory management method according to an exemplary embodiment of the present invention System framework 100.It should be noted that being only the example for the system architecture that can apply the embodiment of the present disclosure shown in Fig. 1, to help Those skilled in the art understand that the technology contents of the disclosure, but it is not meant to that the embodiment of the present disclosure may not be usable for other and set Standby, system, environment or scene.
As shown in Figure 1, system architecture 100 may include terminal device 101,102,103, network according to this embodiment 104 and server 105.Network 104 is to the offer communication link between terminal device 101,102,103 and server 105 Medium.Network 104 may include various connection types, such as wired, wireless communication link etc..
User can be interacted by network 104 with server 105 with using terminal equipment 101,102,103, to receive or send out Send message etc..Various applications can be installed on terminal device 101,102,103.Terminal device 101,102,103 can be tool Have display screen and supported web page browsing various electronic equipments, including but not limited to smart mobile phone, tablet computer, it is on knee just Take computer and desktop computer etc..Server 105 for example can be the server that various services are provided by interface.
It should be noted that the buffer memory management method that the embodiment of the present disclosure is provided can generally be executed by server 105. Correspondingly, the cache management system that the embodiment of the present disclosure is provided can be generally set in server 105.The embodiment of the present disclosure The buffer memory management method provided can also by be different from server 105 and can with terminal device 101,102,103 and/or clothes The server or server cluster that business device 105 communicates execute.Correspondingly, the cache management system that the embodiment of the present disclosure is provided It can be set to different from server 105 and the service that can be communicated with terminal device 101,102,103 and/or server 105 In device or server cluster.
It should be understood that the number of the terminal device, network and server in Fig. 1 is only schematical.According to realization need It wants, can have any number of terminal device, network and server.
Illustrative methods
With reference to the application scenarios of Fig. 1, it is described with reference to Figure 2 the cache management according to exemplary embodiment of the invention Method.It should be noted that above application scene is merely for convenience of understanding spirit and principles of the present invention and showing, the present invention Embodiment it is unrestricted in this regard.On the contrary, embodiments of the present invention can be applied to applicable any scene.
As shown in Fig. 2, the method comprising the steps of S210~S230.
In step S210, the access request for accessing first interface is obtained.
In step S220, at least one second interface associated with the first interface is determined.
In step S230, the data cached of at least partly described second interface is deleted.
The cache policy that this method can solve existing interface is more basic, can not manage caching well, some Fail data cannot delete in time, the problem for causing interface access efficiency relatively low, realize and pointedly manage distinct interface Data cached technique effect.
According to an exemplary embodiment of the present, electronic equipment can provide service by interface, and different services can be right Different interfaces is set with answering, for example, when user needs to inquire account balance, it can be by calling inquiry into balance interface, request Inquire account balance.After inquiry, which can store this query result in the buffer, same when receiving again When inquiry request, the data can be directly obtained from caching, without to searching in memory.However, due to the number in memory According to may change, and the data in caching will not correspondingly change.For example, calling another interface to transfer accounts in user When, account balance changes, and inquiry into balance interface still stores the balance amount information that a preceding user queries the balance, in user After carrying out transfer operation, it is clear that the balance amount information of the caching is no longer valid, different from true balance amount information.Therefore, in caching There may be expired problems for data.
According to an exemplary embodiment of the present, in step S210, after obtaining the access request for accessing first interface, Step S220 is executed, determines at least one second interface associated with the first interface.With reference to Fig. 3, the present invention is shown The step S220 of example property embodiment is illustrated.
It is associated with the first interface at least that Fig. 3 schematically shows determination according to an exemplary embodiment of the present invention The method flow diagram of one second interface.
As shown in figure 3, the method comprising the steps of S310 and S320.
In step S310, the configuration information of the first interface is obtained, the configuration information includes and the first interface The information of associated at least one second interface.
In step S320, at least one second interface is determined according to the information of at least one second interface.
According to an exemplary embodiment of the present, each interface is configured for corresponding configuration information, is described and institute State the information of the associated at least one second interface of first interface.In step S310, the configuration of first interface can be obtained Information, and in step S320, at least one second interface associated with the first interface is determined according to the configuration information. When executing subsequent step S230, the data cached of those second interfaces can be deleted.
For example, first interface obtains matching for first interface for interface of transferring accounts when user calls first interface to transfer accounts Confidence ceases, and the information of at least one second interface associated with the interface of transferring accounts has been recorded in the configuration information, such as remaining The information of volume query interface.According to the configuration information of first interface, it may be determined that the inquiry into balance interface is second interface.
According to an exemplary embodiment of the present, the configuration information further includes the deletion priority of the second interface, institute It includes being based on the configuration information to state and delete at least partly described the data cached of second interface, and preferential delete has higher delete Except the second interface of priority.It, can be with for example, there are multiple second interfaces associated with the first interface According to the deletion priority of each second interface described in configuration information, the number of those second interfaces is deleted successively from high to low According to.In computing resource anxiety, deletion sequence can be managed, it is preferential to delete the data cached of important interface, it avoids connecing from those Mouth reads stale data.
According to an exemplary embodiment of the present, second interface it is data cached include multiple subdatas in the case of, institute The identification information that configuration information further includes the subdata of the second interface is stated, at least partly described second interface of deletion It is data cached to include, according to the identification information, delete the second interface it is data cached in part subdata.For example, In the case where second interface includes inquiry into balance interface, the interface cached preceding one query as a result, for example including user The data such as name, account balance.When user calls and transfers accounts interface as first interface, according to the configuration information of the first interface, It can not only determine that above-mentioned inquiry into balance interface is second interface, additionally it is possible to according to the son of the second interface in configuration information The identification information of data, determines whether different subdatas needs to be deleted, for example, determining that account balance data therein are to need Subdata to be deleted, and user name be not required to it is to be deleted, to delete second interface it is data cached in part subnumber According to.
According to an exemplary embodiment of the present, wherein the configuration information includes being stored as being made of multiple key-value pairs Object structure.For example, the configuration information of an interface A can be configured as following form:
Wherein, name fields are interface name, that is, show that the configuration information is the configuration information of interface A;Influence words Section is array, shows that the interface can be associated with the interface influenced, i.e., is included interface B and interface C by the interface A interfaces influenced; Method specifies the interface access mode, wherein POST method is a kind of non-idempotent method;CouldCache is Boolean, When if it is false, do not cache.
According to an exemplary embodiment of the present, may include one or more methods under an interface.
According to an exemplary embodiment of the present, the configuration information further includes the Method type of the first interface, wherein The method type includes idempotent method or non-idempotent method.Idempotent method refers to that identical parameter can be used to repeat to hold Row, and the method that identical result can be obtained.Idempotent method does not interfere with system mode, be arbitrarily performed a plurality of times caused by influence with The primary influence for executing generation is identical.For example, inquiry into balance method execute it is one or many when return it is identical as a result, simultaneously And account data will not be had an impact, this method belongs to idempotent method, and transfer account method is then non-idempotent method.
According to an exemplary embodiment of the present, the configuration information further includes that the data cached of the first interface enables State does not cache the data of the first interface in non-enabled state.For example, the data of some interfaces exist Using failing immediately after primary, there is no need to cache the data of the interface.The embodiment of the present disclosure provide method can without It is configured in the configuration information of the interface of the data of caching, is at non-enabled state, the data are not cached to realize Purpose.
According to an exemplary embodiment of the present, in the case where the method for the first interface is idempotent method, the side Method further includes, if the requested first interface data of the access request are present in caching, in using the caching After data respond access request, the first interface data in the caching are updated.For example, data cached includes access times, though The method so executed is idempotent method, but access times should increase in multiple repeated reference.Therefore, the caching is being used In data response access request after, update the first interface data in the caching.
According to an exemplary embodiment of the present, the data cached of the first interface stores in the way of key-value pair, key Title include request address, request header cookie, required parameter and Method type.For example, an account flowing water inquiry Interface can be stored with multiple data cached, come from different request address, different time, request different periods data etc., also, There may be different methods, the data cached also differences of distinct methods under the same interface.The side that the embodiment of the present disclosure provides Method can distinguish data cached under same interface in the way of key-value pair, and a data cached key for example can be with It is " request address-request header cookie- required parameters-Method type ", wherein request address is the network of requestor Location, request header cookie be for identify this request attribute information, required parameter be with the relevant parameter of request content, Such as the account flowing water or the account flowing water of inquiry last month of inquiry this month, or inquire the account flowing water etc. in half a year Deng, should " this month ", " last month ", " in half a year " be required parameter.The method of the embodiment of the present disclosure can be identified uniquely Difference in same interface is data cached.
The above-mentioned various methods that exemplary embodiment of the present provides, can be according to specific business the case where, flexible configuration Interface management rule, is capable of the data cached of pointedly management interface, is effectively improved access efficiency.
Above-described embodiment disclosed in this invention can be combined arbitrarily, or do simple transformation, the processing strategy needed, To realize preferable technique effect.
Exemplary media
Exemplary embodiment of the invention provides a kind of computer readable storage medium, is stored with the executable finger of computer It enables, above-metioned instruction by processing unit when being executed for realizing the cache management side described in any one of above method embodiment Method.
In some possible embodiments, various aspects of the invention are also implemented as a kind of shape of program product Formula comprising program code, when described program product is run on an electronic device, said program code is for making the electronics Equipment executes the delaying according to the various illustrative embodiments of the present invention described in above-mentioned " illustrative methods " part of this specification The step of depositing management method, for example, the electronic equipment can execute step S210 as shown in Figure 2:It obtains for accessing The access request of first interface;Step S220:Determine at least one second interface associated with the first interface;Step S230:Delete the data cached of at least partly described second interface.
The arbitrary combination of one or more readable mediums may be used in described program product.Readable medium can be readable letter Number medium or readable storage medium storing program for executing.Readable storage medium storing program for executing for example may be-but not limited to-electricity, magnetic, optical, electromagnetic, red The system of outside line or semiconductor, device or device, or the arbitrary above combination.The more specific example of readable storage medium storing program for executing (non exhaustive list) includes:Electrical connection, portable disc with one or more conducting wires, hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc Read memory (CD-ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.
As shown in figure 4, describing the program for realizing buffer memory management method and system according to embodiment of the present invention Product 400 may be used portable compact disc read only memory (CD-ROM) and include program code, and can be set in electronics Standby upper operation.However, the program product of the present invention is without being limited thereto, in this document, readable storage medium storing program for executing, which can be any, includes Or the tangible medium of storage program, which can be commanded execution system, device, and either device uses or in connection makes With.
Readable signal medium may include in a base band or as the data-signal that a carrier wave part is propagated, wherein carrying Readable program code.Diversified forms may be used in the data-signal of this propagation, including --- but being not limited to --- electromagnetism letter Number, optical signal or above-mentioned any appropriate combination.Readable signal medium can also be other than readable storage medium storing program for executing it is any can Read medium, which can send, propagate either transmission for being used by instruction execution system, device or device or Program in connection.
The program code for including on readable medium can transmit with any suitable medium, including --- but being not limited to --- Wirelessly, wired, optical cable, RF etc. or above-mentioned any appropriate combination.
It can be write with any combination of one or more programming languages for executing the program that operates of the present invention Code, described program design language include object oriented program language --- and such as Java, C++ etc. further include routine Procedural programming language --- such as " C " language or similar programming language.Program code can fully exist It is executed on consumer electronic devices, partly part executes in devices in remote electronic or completely remote on consumer electronic devices It is executed on journey electronic equipment or server.In the situation for being related to devices in remote electronic, devices in remote electronic can be by arbitrary The network of type --- consumer electronic devices are connected to including LAN (LAN) or wide area network (WAN) one, alternatively, can connect To external electronic device (such as being connected by internet using ISP).
Exemplary means
After describing the medium of exemplary embodiment of the invention, next, with reference to figure 5 to the exemplary reality of the present invention The cache management system for applying mode is introduced.
Fig. 5 schematically shows the block diagram of cache management system 500 according to an exemplary embodiment of the present invention.
As shown in figure 5, the cache management system 500 includes acquisition module 510, determining module 520 and removing module 530。
Acquisition module 510, such as execute above with reference to S210 is operated described in Fig. 2, for obtaining for accessing first The access request of interface.
Determining module 520, such as execute above with reference to S220 is operated described in Fig. 2, it is connect with described first for obtaining Mouth is associated at least one second interface.
Removing module 530, such as execute above with reference to S230 is operated described in Fig. 2, it is used to delete at least partly described Second interface it is data cached.
Fig. 6 schematically shows the block diagram of determining module 520 according to an exemplary embodiment of the present invention.
As shown in fig. 6, the determining module 520 includes acquisition submodule 610 and determination sub-module 620.
Acquisition submodule, such as execute above with reference to S310 is operated described in Fig. 3, for obtaining the first interface Configuration information, the configuration information include the information of at least one second interface associated with the first interface.
Determination sub-module, such as execute above with reference to operating S320 described in Fig. 3, for according to described at least one the The information of two interfaces determines at least one second interface.
Fig. 7 schematically shows the block diagram of removing module 530 according to an exemplary embodiment of the present invention.
It is deleted in submodule 720 extremely as shown in fig. 7, the removing module 530 includes the first deletion submodule 710 or second Few one kind.
According to an exemplary embodiment of the present, the configuration information further includes the deletion priority of the second interface.The One deletes submodule 710, and for being based on the configuration information, preferential delete has the higher second interface for deleting priority.
According to an exemplary embodiment of the present, second interface it is data cached include multiple subdatas in the case of, institute State the identification information that configuration information further includes the second interface subdata.Second deletes submodule 720, for according to the mark Know information, delete the second interface it is data cached in part subdata.
According to an exemplary embodiment of the present, the configuration information includes the object for being stored as being made of multiple key-value pairs Structure.
According to an exemplary embodiment of the present, the configuration information further includes following at least one, the first interface Method type, wherein the method type includes idempotent method or non-idempotent method, and/or, the first interface Data cached enabled state does not cache the data of the first interface in non-enabled state.
According to an exemplary embodiment of the present, in the case where the method for the first interface is idempotent method, the system System can also include update module.
Fig. 8 schematically shows the block diagram of the cache management system 800 according to another exemplary embodiment of the present invention.
Further include update module as shown in figure 8, on the basis of the embodiment of 800 meaning shown in Fig. 5 of cache management system 810。
Update module 810 makes if being present in caching for the requested first interface data of the access request After the data response access request in the caching, the first interface data in the caching are updated.
According to an exemplary embodiment of the present, the data cached of the first interface stores in the way of key-value pair, key Title include request address, request header cookie, required parameter and Method type.
It is any number of or in which arbitrary more in module according to an embodiment of the present disclosure, submodule, unit, subelement A at least partly function can be realized in a module.It is single according to the module of the embodiment of the present disclosure, submodule, unit, son Any one or more in member can be split into multiple modules to realize.According to the module of the embodiment of the present disclosure, submodule, Any one or more in unit, subelement can at least be implemented partly as hardware circuit, such as field programmable gate Array (FPGA), programmable logic array (PLA), system on chip, the system on substrate, the system in encapsulation, special integrated electricity Road (ASIC), or can be by the hardware or firmware for any other rational method for circuit integrate or encapsulate come real Show, or with any one in three kinds of software, hardware and firmware realization methods or with wherein arbitrary several appropriately combined next reality It is existing.Alternatively, can be at least by part according to one or more of the module of the embodiment of the present disclosure, submodule, unit, subelement Ground is embodied as computer program module, when the computer program module is run, can execute corresponding function.
For example, acquisition module 510, determining module 520, removing module 530, acquisition submodule 610, determination sub-module 620, What the first deletion submodule 710, second was deleted in submodule 720 and update module 810 any number of may be incorporated in one It is realized in module or any one module therein can be split into multiple modules.Alternatively, these moulds it is in the block one or At least partly function of multiple modules can be combined at least partly function of other modules, and be realized in a module. In accordance with an embodiment of the present disclosure, acquisition module 510, determining module 520, removing module 530, acquisition submodule 610, determine submodule Block 620, first deletes submodule 710, second deletion at least one of submodule 720 and update module 810 can be at least It is implemented partly as hardware circuit, such as field programmable gate array (FPGA), programmable logic array (PLA), on piece system System, the system on substrate, the system in encapsulation, application-specific integrated circuit (ASIC), or can be by being integrated or being sealed to circuit The hardware such as any other rational method or firmware of dress realize, or in three kinds of software, hardware and firmware realization methods Any one several appropriately combined is realized with wherein arbitrary.Alternatively, acquisition module 510, determining module 520, deletion mould Block 530, acquisition submodule 610, determination sub-module 620, first delete submodule 710, second and delete submodule 720 and update At least one of module 810 can at least be implemented partly as computer program module, when the computer program module quilt When operation, corresponding function can be executed.
Example electronic device
After method, medium and the device for describing exemplary embodiment of the invention, next, with reference to figure 9 to this The a kind of electronic equipment of invention illustrative embodiments is described.
Person of ordinary skill in the field it is understood that various aspects of the invention can be implemented as system, method or Application program.Therefore, various aspects of the invention can be embodied in the following forms, i.e.,:It is complete hardware embodiment, complete The embodiment combined in terms of full Software Implementation (including firmware, microcode etc.) or hardware and software, can unite here Referred to as " circuit ", " module ", " system " or " unit ".
In some possible embodiments, it is single can to include at least at least one processing for electronic equipment according to the present invention Member and at least one storage unit.Wherein, the storage unit has program stored therein code, when said program code is described Processing unit execute when so that the processing unit execute described in above-mentioned " illustrative methods " part of this specification according to this Invent the step in the buffer memory management method of various illustrative embodiments.For example, the processing unit can be executed as in Fig. 2 Shown step S210:Obtain the access request for accessing first interface;Step S220:Determination is related to the first interface Join at least one second interface;Step S230:Delete the data cached of at least partly described second interface.
The electronic equipment of this embodiment according to the present invention is described referring to Fig. 9.Electronic equipment shown in Fig. 9 900 be only an example, should not bring any restrictions to the function and use scope of the embodiment of the present invention.
As shown in figure 9, electronic equipment 900 is showed in the form of universal electronic device.The component of electronic equipment 900 can wrap It includes but is not limited to:Above-mentioned at least one processing unit 910, above-mentioned at least one storage unit 920, connection different system component The bus 930 of (including storage unit 920 and processing unit 910).
Bus 930 may include data/address bus, address bus and controlling bus.
Storage unit 920 may include volatile memory, for example, random access memory (RAM) 921 and/or high speed it is slow Memory 922 is deposited, read-only memory (ROM) 923 is can further include.
Storage unit 920 can also include program/utility 925 with one group of (at least one) program module 924, Such program module 924 includes but not limited to:Operating system, one or more application program, other program modules and Program data may include the realization of network environment in each or certain combination in these examples.
Electronic equipment 900 can also be with one or more external equipments 940 (such as keyboard, sensing equipment, bluetooth equipment Deng) communicate, this communication can be carried out by input/output (I/O) interface 950.Also, electronic equipment 900 can also pass through Network adapter 960 and one or more network (such as LAN (LAN), wide area network (WAN) and/or public network, such as Internet) communication.As shown, network adapter 960 is communicated by bus 930 with other modules of electronic equipment 900.It should Understand, although not shown in the drawings, other hardware and/or software module can be used in conjunction with electronic equipment 900, including but it is unlimited In:Microcode, device driver, redundant processing unit, external disk drive array, RAID system, tape drive and number According to backup storage system etc..
It should be noted that although being referred to several units/modules of cache management system in above-detailed, this Kind division is only exemplary not enforceable.In fact, according to the embodiment of the present invention, above-described two or The feature and function of more units/modules can embody in a units/modules.Conversely, an above-described unit/ The feature and function of module can be further divided into be embodied by multiple units/modules.
In addition, although the operation of the method for the present invention is described with particular order in the accompanying drawings, this do not require that or Hint must execute these operations according to the particular order, or have to carry out shown in whole operation could realize it is desired As a result.Additionally or alternatively, it is convenient to omit multiple steps are merged into a step and executed by certain steps, and/or by one Step is decomposed into execution of multiple steps.
Although by reference to several spirit and principle that detailed description of the preferred embodimentsthe present invention has been described, it should be appreciated that, this It is not limited to the specific embodiments disclosed for invention, does not also mean that the feature in these aspects cannot to the division of various aspects Combination is this to divide the convenience merely to statement to be benefited.The present invention is directed to cover appended claims spirit and Included various modifications and equivalent arrangements in range.

Claims (10)

1. a kind of buffer memory management method, including:
Obtain the access request for accessing first interface;
Determine at least one second interface associated with the first interface;And
Delete the data cached of at least partly described second interface.
2. according to the method described in claim 1, wherein, the determination associated with the first interface at least one second connects Mouthful include:
The configuration information of the first interface is obtained, the configuration information includes associated with the first interface at least one The information of second interface;And
At least one second interface is determined according to the information of at least one second interface.
3. according to the method described in claim 2, wherein, the configuration information further includes that the deletion of the second interface is preferential Grade, at least partly described the data cached of second interface of deletion include:
Based on the configuration information, preferential delete has the higher second interface for deleting priority.
4. according to the method described in claim 2, wherein, the case where second interface data cached includes multiple subdatas Under, the configuration information further includes the identification information of the subdata of the second interface, described to delete at least partly described second The data cached of interface include:
According to the identification information, delete the second interface it is data cached in part subdata.
5. according to the method described in claim 2, wherein, the configuration information includes being stored as being made of multiple key-value pairs Object structure.
6. according to the method described in claim 2, wherein, the configuration information further includes following at least one:
The Method type of the first interface, wherein the method type includes idempotent method or non-idempotent method;And/ Or
The data cached enabled state of the first interface does not cache described first in non-enabled state The data of interface.
7. according to the method described in claim 6, wherein, in the case where the method for the first interface is idempotent method, institute The method of stating further includes:
If the requested first interface data of access request are present in caching, the data in using the caching are rung After answering access request, the first interface data in the caching are updated.
8. a kind of computer readable storage medium, is stored thereon with executable instruction, the executable instruction is held by processing unit The processing unit is set to execute according to the described method of any one of claim 1-7 when row.
9. a kind of cache management system, including:
Acquisition module, for obtaining the access request for accessing first interface;
Determining module, for obtaining at least one second interface associated with the first interface;And
Removing module, for deleting the data cached of at least partly described second interface.
10. a kind of electronic equipment, including:
Processing unit;And
Storage unit, is stored thereon with executable instruction, and described instruction makes the processing unit when being executed by the processing unit It executes according to the described method of any one of claim 1-7.
CN201810295031.2A 2018-03-30 2018-03-30 Cache management method, medium, system and electronic device Active CN108536617B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810295031.2A CN108536617B (en) 2018-03-30 2018-03-30 Cache management method, medium, system and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810295031.2A CN108536617B (en) 2018-03-30 2018-03-30 Cache management method, medium, system and electronic device

Publications (2)

Publication Number Publication Date
CN108536617A true CN108536617A (en) 2018-09-14
CN108536617B CN108536617B (en) 2021-03-05

Family

ID=63481762

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810295031.2A Active CN108536617B (en) 2018-03-30 2018-03-30 Cache management method, medium, system and electronic device

Country Status (1)

Country Link
CN (1) CN108536617B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110650182A (en) * 2019-08-30 2020-01-03 深圳壹账通智能科技有限公司 Network caching method and device, computer equipment and storage medium
CN110807040A (en) * 2019-10-30 2020-02-18 北京达佳互联信息技术有限公司 Method, device, equipment and storage medium for managing data
CN111563216A (en) * 2020-07-16 2020-08-21 平安国际智慧城市科技股份有限公司 Local data caching method and device and related equipment
CN111984645A (en) * 2020-07-29 2020-11-24 北京字节跳动网络技术有限公司 Data processing method, device, medium and electronic equipment
CN113064551A (en) * 2020-05-15 2021-07-02 华为技术有限公司 Data writing, moving and cleaning information sending method and device and file system

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101557390A (en) * 2008-04-11 2009-10-14 北京闻言科技有限公司 Method for improving system performance by flexibly using cache technology
CN102263822A (en) * 2011-07-22 2011-11-30 北京星网锐捷网络技术有限公司 Distributed cache control method, system and device
CN102411598A (en) * 2011-07-29 2012-04-11 株洲南车时代电气股份有限公司 Method and system for realizing data consistency
CN102436443A (en) * 2010-09-29 2012-05-02 上海粱江通信系统股份有限公司 Method for improving processing performance of database-based service system
CN103490886A (en) * 2012-06-12 2014-01-01 阿里巴巴集团控股有限公司 Permission data validation method, device and system
CN103530349A (en) * 2013-09-30 2014-01-22 乐视致新电子科技(天津)有限公司 Method and equipment for cache updating
CN103645904A (en) * 2013-12-20 2014-03-19 北京京东尚科信息技术有限公司 Cache realization method of interface calling
US20140122809A1 (en) * 2012-10-30 2014-05-01 Nvidia Corporation Control mechanism for fine-tuned cache to backing-store synchronization
CN106453667A (en) * 2016-12-20 2017-02-22 北京小米移动软件有限公司 Method and device for updating cached data
CN106599199A (en) * 2016-12-14 2017-04-26 国云科技股份有限公司 Data caching and synchronization method
CN106815287A (en) * 2016-12-06 2017-06-09 中国银联股份有限公司 A kind of buffer memory management method and device

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101557390A (en) * 2008-04-11 2009-10-14 北京闻言科技有限公司 Method for improving system performance by flexibly using cache technology
CN102436443A (en) * 2010-09-29 2012-05-02 上海粱江通信系统股份有限公司 Method for improving processing performance of database-based service system
CN102263822A (en) * 2011-07-22 2011-11-30 北京星网锐捷网络技术有限公司 Distributed cache control method, system and device
CN102411598A (en) * 2011-07-29 2012-04-11 株洲南车时代电气股份有限公司 Method and system for realizing data consistency
CN103490886A (en) * 2012-06-12 2014-01-01 阿里巴巴集团控股有限公司 Permission data validation method, device and system
US20140122809A1 (en) * 2012-10-30 2014-05-01 Nvidia Corporation Control mechanism for fine-tuned cache to backing-store synchronization
CN103530349A (en) * 2013-09-30 2014-01-22 乐视致新电子科技(天津)有限公司 Method and equipment for cache updating
CN103645904A (en) * 2013-12-20 2014-03-19 北京京东尚科信息技术有限公司 Cache realization method of interface calling
CN106815287A (en) * 2016-12-06 2017-06-09 中国银联股份有限公司 A kind of buffer memory management method and device
CN106599199A (en) * 2016-12-14 2017-04-26 国云科技股份有限公司 Data caching and synchronization method
CN106453667A (en) * 2016-12-20 2017-02-22 北京小米移动软件有限公司 Method and device for updating cached data

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110650182A (en) * 2019-08-30 2020-01-03 深圳壹账通智能科技有限公司 Network caching method and device, computer equipment and storage medium
CN110650182B (en) * 2019-08-30 2023-03-07 深圳壹账通智能科技有限公司 Network caching method and device, computer equipment and storage medium
CN110807040A (en) * 2019-10-30 2020-02-18 北京达佳互联信息技术有限公司 Method, device, equipment and storage medium for managing data
CN110807040B (en) * 2019-10-30 2023-03-24 北京达佳互联信息技术有限公司 Method, device, equipment and storage medium for managing data
CN113064551A (en) * 2020-05-15 2021-07-02 华为技术有限公司 Data writing, moving and cleaning information sending method and device and file system
WO2021227716A1 (en) * 2020-05-15 2021-11-18 华为技术有限公司 Methods for writing and moving data and sending cleanup information, device and file system
CN113064551B (en) * 2020-05-15 2023-09-01 华为技术有限公司 Data writing, moving and cleaning information sending method and device and file system
CN111563216A (en) * 2020-07-16 2020-08-21 平安国际智慧城市科技股份有限公司 Local data caching method and device and related equipment
CN111563216B (en) * 2020-07-16 2020-11-06 平安国际智慧城市科技股份有限公司 Local data caching method and device and related equipment
CN111984645A (en) * 2020-07-29 2020-11-24 北京字节跳动网络技术有限公司 Data processing method, device, medium and electronic equipment
CN111984645B (en) * 2020-07-29 2023-11-24 北京字节跳动网络技术有限公司 Data processing method, device, medium and electronic equipment

Also Published As

Publication number Publication date
CN108536617B (en) 2021-03-05

Similar Documents

Publication Publication Date Title
CN108536617A (en) Buffer memory management method, medium, system and electronic equipment
CN104866383B (en) Interface calling method and device and terminal
CN106104514B (en) Accelerate method, system and the medium of the object in access object repository
CN106095698B (en) Caching write-in, read method and the device of object-oriented
CN110019080B (en) Data access method and device
CN104573068A (en) Information processing method based on megadata
US20210357461A1 (en) Method, apparatus and storage medium for searching blockchain data
WO2020024898A1 (en) Method and apparatus for searching blockchain data, and storage medium
CN109242458A (en) Approaches to IM and relevant device based on block chain
CN108829753A (en) A kind of information processing method and device
EP2933731A1 (en) Method for configuring browser bookmarks, device and terminal thereof
US20240004853A1 (en) Virtual data source manager of data virtualization-based architecture
CN111325552A (en) Data processing method and device, electronic equipment and storage medium
WO2020024899A1 (en) Blockchain data searching method and device, and storage medium
WO2020088681A1 (en) Management method for model files and terminal device
JP6088853B2 (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, AND COMMUNICATION PROGRAM
US9043323B2 (en) Method and apparatus for providing search with contextual processing
CN109408539A (en) Data manipulation method, device, server and storage medium
CN109639801A (en) Back end distribution and data capture method and system
US11960616B2 (en) Virtual data sources of data virtualization-based architecture
US10469575B2 (en) Techniques for contact exporting
KR101899970B1 (en) Mobile terminal and cloud server for mobile cloud computing environment and method of mobile cloud computing using the same
WO2020024902A1 (en) Method, device, and storage medium for searching for blockchain data
US10417296B1 (en) Intelligent bookmarking with URL modification
CN112083914B (en) Method and system for realizing object model embedded operation system soft bus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant