CN109614347B - Processing method and device for multi-level cache data, storage medium and server - Google Patents

Processing method and device for multi-level cache data, storage medium and server Download PDF

Info

Publication number
CN109614347B
CN109614347B CN201811231430.9A CN201811231430A CN109614347B CN 109614347 B CN109614347 B CN 109614347B CN 201811231430 A CN201811231430 A CN 201811231430A CN 109614347 B CN109614347 B CN 109614347B
Authority
CN
China
Prior art keywords
service
cache
level
service data
data
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.)
Active
Application number
CN201811231430.9A
Other languages
Chinese (zh)
Other versions
CN109614347A (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.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China 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 Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN201811231430.9A priority Critical patent/CN109614347B/en
Publication of CN109614347A publication Critical patent/CN109614347A/en
Application granted granted Critical
Publication of CN109614347B publication Critical patent/CN109614347B/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/0806Multiuser, multiprocessor or multiprocessing cache systems
    • G06F12/0811Multiuser, multiprocessor or multiprocessing cache systems with multilevel cache hierarchies
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention relates to the field of data processing, in particular to a method and a device for processing multi-level cache data, a storage medium and a server, wherein the method comprises the following steps: receiving a service request, acquiring a service attribute of a service corresponding to the service request, and judging the magnitude of the service according to the service attribute; according to the magnitude, the cache identification of the business data of the business is matched, and according to the cache identification, the cache level of the business data storage is determined; converting the service request into a service request containing a service data structure of the cache hierarchy; processing the converted service request, and acquiring the service data in the cache hierarchy according to the service data structure; and returning the service data to the service requester. The invention can efficiently acquire the data required by the service from the multi-level cache.

Description

Processing method and device for multi-level cache data, storage medium and server
Technical Field
The present invention relates to the field of data processing, and in particular, to a method and apparatus for processing multi-level cache data, a storage medium, and a server.
Background
With the development of internet technology, the number of users of a client is increased, the functions of the client are also increased, each function corresponds to a specific service, the access amount of different services is different, especially hot services such as active services, the access amount is higher when the active services are performed than other services, most of data required by different services are stored in the same location area at present, when the access amount of one service is too large in a short time, the processing capacity of a server cannot complete an excessive request in a short time, so that the server cannot respond timely, the data required by the service request cannot be obtained, and further, other services cannot respond normally, so that how to distinguish different services and process the services efficiently is a problem which is needed to be solved in the industry at present.
Disclosure of Invention
In order to solve the above technical problems, especially the problem that the prior art cannot efficiently process the data in the multi-level cache, the following technical scheme is specifically proposed:
in a first aspect, the present invention provides a method for processing multi-level cache data, including:
receiving a service request, acquiring a service attribute of a service corresponding to the service request, and judging the magnitude of the service according to the service attribute;
according to the magnitude, the cache identification of the business data of the business is matched, and according to the cache identification, the cache level of the business data storage is determined;
converting the service request into a service request containing a service data structure of the cache hierarchy;
processing the converted service request, and acquiring the service data in the cache hierarchy according to the service data structure;
and returning the service data to the service requester.
Further, the converting the service request into a service request including the service data structure of the cache hierarchy includes:
acquiring a key value in the service request;
constructing a business data structure according to the cache hierarchy and the keywords;
and converting the service request into a service request containing the service data structure of the cache hierarchy.
Further, the cache levels comprise a first cache level, a second cache level and a third cache level; the obtaining the service data in the cache hierarchy according to the service data structure includes:
if the cache level determined by the cache identifier is a first cache level, acquiring the service data in the first cache level according to the service data structure; or alternatively, the first and second heat exchangers may be,
if the cache level determined by the cache identifier is a second cache level, acquiring the service data in the second cache level according to the service data structure; or alternatively, the first and second heat exchangers may be,
and if the cache level determined by the cache identifier is a third cache level, acquiring the service data in the third cache level according to the service data structure.
Further, after the service data is obtained in the third cache hierarchy according to the service data structure, the method further includes:
writing the service data into a second cache level and a first cache level;
after the service data is acquired in the second cache hierarchy according to the service data structure, the method further includes:
and writing the service data into a first cache hierarchy.
Further, the obtaining the service attribute of the service corresponding to the service request includes:
acquiring the update frequency of the service corresponding to the service request;
and determining service attributes according to the updating frequency.
Further, the obtaining the service attribute of the service corresponding to the service request includes:
acquiring historical service attributes of a plurality of time periods of the service corresponding to the service request;
and acquiring the historical service attribute with the same historical service attribute and the largest frequency as the service attribute of the service.
In a second aspect, the present invention provides a processing apparatus for multi-level cache data, including:
and a receiving module: the method comprises the steps of receiving a service request, acquiring a service attribute of a service corresponding to the service request, and judging the magnitude of the service according to the service attribute;
and a determination module: the caching identification is used for matching the business data of the business according to the magnitude, and the caching level of the business data storage is determined according to the caching identification;
and a conversion module: for converting the service request into a service request comprising a service data structure of the cache hierarchy;
the processing module is used for: the service data processing module is used for processing the converted service request and acquiring the service data in the cache hierarchy according to the service data structure;
and a feedback module: for returning the service data to the service requester.
Further, the conversion module performs conversion of the service request into a service request including a service data structure of the cache hierarchy, including:
acquiring a key value in the service request;
constructing a business data structure according to the cache hierarchy and the keywords;
and converting the service request into a service request containing the service data structure of the cache hierarchy.
In a third aspect, the present invention further provides a computer readable storage medium, where a computer program is stored, where the computer program is executed by a processor to implement the method for processing multi-level cache data described above.
In a fourth aspect, the present invention also provides a server comprising one or more processors, a memory, one or more computer programs, wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method for processing multi-level cache data as described above.
Compared with the prior art, the invention has the following beneficial effects:
the invention provides a processing method for acquiring service required data from a multi-level cache, which comprises the steps of determining the magnitude of service corresponding to the service request after receiving the service request, then matching the cache level of service data storage required by the service according to the magnitude, converting the service request into the service request comprising a service data structure of the cache level, subsequently processing the converted service request in the corresponding cache level to know the service data required by the service request or the operation required to be executed on the service data, returning the acquired service data to a service requester, acquiring the required service from different cache levels by configuring parameters of the data required by the service, and rapidly feeding back the data required by the service or the latest data required by the service from different cache levels according to the actual requirements of the service without sequentially judging whether the corresponding cache level has the required service data according to the priority of the cache level, thereby improving the processing efficiency of the service data and improving the service request response capability in high concurrency.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
The foregoing and/or additional aspects and advantages of the invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
FIG. 1 is a flow chart illustrating a method for processing multi-level cache data according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for processing multi-level cache data according to another embodiment of the present invention;
FIG. 3 is a diagram illustrating an embodiment of a multi-level cache data processing apparatus according to the present invention;
fig. 4 is a schematic structural diagram of an embodiment of a server according to the present invention.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative only and are not to be construed as limiting the invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless expressly stated otherwise, as understood by those skilled in the art. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, but do not preclude the presence or addition of one or more other features, integers, steps, operations.
It will be understood by those skilled in the art that all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs unless defined otherwise. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
It will be appreciated by those skilled in the art that references to "application," "application program," "computer program," and similar concepts herein are intended to refer to computer software, organically constructed from a series of computer instructions and related data resources, suitable for electronic execution, as the same concepts are known to those skilled in the art. Unless specifically specified, such naming is not limited by the type, level of programming language, nor by the operating system or platform on which it operates. Of course, such concepts are not limited by any form of terminal.
The embodiment of the invention provides a processing method of multi-level cache data, as shown in fig. 1, the method comprises the following steps:
s10: receiving a service request, acquiring a service attribute of a service corresponding to the service request, and judging the magnitude of the service according to the service attribute.
The client comprises a plurality of modules with different functions, each module has a plurality of different functions, the different functions correspond to different services executed by the client, as the user quantity of the client increases gradually, a plurality of users access and use the same service in a short time, the server responding to the client request is taken as an execution main body, the server comprises a plurality of layers of servers, a receiving layer server receives a disease processing service request, when the server receives the service request of the client, the service request is analyzed to obtain service attributes of the service corresponding to the service request, for example, the service of the client comprises a plurality of services such as a service A, a service B, a service C, a service D and the like, and the service attributes of each service are preset and specified, wherein the service attributes are distinguished by real-time requirements of the service; and judging the magnitude of the service according to the service attributes, wherein each service attribute indicates the magnitude corresponding to the service, for example, the magnitude of the service A is 1, the magnitude of the service B is 2, the magnitude of the service C is 2, the magnitude of the service D is 3, and data required by the services of different magnitudes are stored in different positions, so that how to acquire the data required by the different services is described below.
S20: and according to the cache identification of the business data of the magnitude matching business, determining a cache level of the business data storage according to the cache identification.
After the magnitude of the service is determined, the cache identification of the service data required by the service can be determined according to the magnitude of the service, and then the cache level of the service data storage is determined according to the cache identification. For example, the cache identifier corresponding to the service a with the level 1 is 1, the cache identifier corresponding to the service B with the level 2 is 2, the cache identifier corresponding to the service D with the level 3 is 3, and the cache hierarchy corresponding to the cache identifier 1 is one level, and the cache hierarchy corresponding to the cache identifier 2 or 3 is two levels.
S30: and converting the service request into a service request containing the service data structure of the cache hierarchy.
After determining the storage hierarchy of the service data required by the service, converting the service request into a service request containing a service data structure of the cache hierarchy, wherein the service data structure contains the service data of which cache hierarchy is required by the service, specific service data and an operation to be performed on the service data, for example, the converted service data structure contains the following information: the data to be acquired is business a, the data to be acquired is cached in the second level, the data to be acquired is commodity name of commodity id=100, and the operation to be performed on the data is to change commodity name of commodity id=100 to be XXX.
S40: and processing the converted service request, and acquiring the service data in the cache hierarchy according to the service data structure.
The above-mentioned servers include servers of different layers, the above steps are executed and completed by the receiving layer server, when the receiving layer server converts the service request into a service request including a service data structure of the cache hierarchy, the receiving layer server transmits the processed service request to the server of the corresponding cache hierarchy, and in this embodiment, the servers are defined as cache servers, such as a first-level cache server, for responding to a request for processing service data stored in the first-level cache, and a second-level cache server, for responding to a request for processing service data stored in the second-level cache, when the cache server receives the converted service request, processes the converted service request, and obtains the service data in the cache hierarchy according to the service data structure, for example, the second-level cache server determines to change the commodity name of commodity id=100 into XXX according to the service data structure.
S50: and returning the service data to the service requester.
And then returning the service data after processing the service request to the service requester, wherein in the embodiment, the service requester is the client, and when the server changes the commodity name of commodity ID=100 into XXX, the service data is returned to the client, and the client can intuitively and clearly know the change of the corresponding commodity name.
An application scenario of the embodiment includes an activity introduction display service and an activity query service in an activity module of a client, where an update frequency of data of the activity query service is faster, data required by the activity introduction service is stored in a first-level cache hierarchy, data required by the activity query service is stored in a second-level cache hierarchy, and when a server receives a service request of the client for the activity introduction service, the server acquires the service data of the activity introduction service from the first-level cache hierarchy and returns the service data to the client according to the embodiment; when the server receives the service request of the client for the active query service, the service data of the active query service is obtained from the second-level cache hierarchy according to the embodiment and then returned to the client.
The embodiment provides a processing method for acquiring service required data from a multi-level cache, after a service request is received, determining the magnitude of service corresponding to the service request, then matching the cache level of service data storage required by the service according to the magnitude, converting the service request into a service request containing a service data structure of the cache level, subsequently processing the converted service request in the corresponding cache level to know service data required to be acquired by the service request or operation required to be executed on the service data, then returning the acquired service data to a service requester, acquiring required service from different cache levels by configuring parameters of the data required by the service, and rapidly feeding back the data required by the service or the latest data required by the service from different cache levels according to the actual requirements of the service.
In one embodiment of the present invention, as shown in fig. 2, the converting the service request into a service request including the service data structure of the cache hierarchy includes:
s31: acquiring a key value in the service request; constructing a business data structure according to the cache hierarchy and the keywords; and converting the service request into a service request containing the service data structure of the cache hierarchy.
When a cache hierarchy of service data storage is determined, converting the service request into a service request containing a service data structure of the cache hierarchy, acquiring a key value in the service request, wherein the key value is specific information of service data to be acquired, including class names, data types, instance objects, executed operations and the like of the service data to be acquired, constructing a service data structure according to the cache hierarchy and the key words, reading and analyzing the service data structure in the cache server, converting the service request into the service request containing the service data structure of the cache hierarchy, and subsequently processing the converted service request after the cache server receives the converted service request to acquire data required by the service.
In one embodiment of the present invention, the cache levels include a first cache level, a second cache level, and a third cache level; the obtaining the service data in the cache hierarchy according to the service data structure includes:
if the cache level determined by the cache identifier is a first cache level, acquiring the service data in the first cache level according to the service data structure; or alternatively, the first and second heat exchangers may be,
if the cache level determined by the cache identifier is a second cache level, acquiring the service data in the second cache level according to the service data structure; or alternatively, the first and second heat exchangers may be,
and if the cache level determined by the cache identifier is a third cache level, acquiring the service data in the third cache level according to the service data structure.
In this embodiment, the cache levels include a first cache level, a second cache level, and a third cache level, where the first cache level may be a local cache, the second cache level may be an external cache, the third cache level may be a database cache, the processing response speed of the first cache level is the fastest, the processing response speed of the second cache level is inferior, and the processing response speed of the third cache level is slower; when the cache level determined by the cache identifier is a first cache level, acquiring the service data in the first cache level according to the service data structure; when the cache level determined by the cache identifier is a second cache level, acquiring the service data in the second cache level according to the service data structure; and when the cache level determined by the cache identifier is a third cache level, acquiring the service data in the third cache level according to the service data structure. When the service data is acquired from the first cache level, the first cache level can quickly acquire the required data, such as the data of the activity introduction from the first cache level, because the response processing speed of the first cache level is the fastest.
In one embodiment of the present invention, after the service data is acquired in the third cache hierarchy according to the service data structure, the method further includes:
writing the service data into a second cache level and a first cache level;
after the service data is acquired in the second cache hierarchy according to the service data structure, the method further includes:
and writing the service data into a first cache hierarchy.
On the basis of the above embodiment, if the service data is obtained from the third cache level, it is indicated that the service data in the first cache level and the second cache level cannot meet the requirements at this time, in this embodiment, after the service data is obtained from the third cache level, the service data is written into the second cache level and the first cache level, when the timeliness of the data requirement of the subsequent service request is reduced, the service data in the second cache level or the first cache level can meet the requirements, and then the required service data is obtained from the second cache level or the first cache level, so as to quickly respond to the service request; further, if the service data is acquired in the second cache hierarchy, it is indicated that the service data does not need to be acquired from the third cache hierarchy at this time, but the service data in the first cache hierarchy at this time cannot meet the requirement.
In one embodiment of the present invention, the obtaining the service attribute of the service corresponding to the service request includes:
acquiring the update frequency of the service corresponding to the service request;
and determining service attributes according to the updating frequency.
The update frequency of different services is different, for example, the duration of the activity A is one month, and the activity A is updated once a month; the update frequency of activity B is once per day; when the service attribute of the service corresponding to the service request needs to be determined after the service request is received, in this embodiment, the update frequency of the service corresponding to the service request is obtained, then the service attribute is determined according to the update frequency of the service, preferably, the update frequency of the service is counted from the release frequency of the background service, if the service increases in recent release frequency, the service attribute of the service can be dynamically adjusted according to the release frequency, so that the service data corresponding to the service can be obtained from different cache levels in the following process, and thus the requirement of actual service dynamic change can be met.
In one embodiment of the present invention, the obtaining the service attribute of the service corresponding to the service request includes:
acquiring historical service attributes of a plurality of time periods of the service corresponding to the service request;
and acquiring the historical service attribute with the same historical service attribute and the largest frequency as the service attribute of the service.
Because the actual service is continuously changed, the service attribute is also changed continuously, in a certain time period, the service attribute of one service is M, in another time period, the service attribute of the service is N, in this embodiment, the service attribute of the current time period is determined according to the historical service attribute of the service in a plurality of past time periods, specifically, when the service attribute of the service corresponding to the service request is obtained, the historical service attribute of the service corresponding to the service request in a plurality of time periods is obtained, if the historical service attributes of the plurality of time periods are different, the historical service attribute with the same historical service attribute with the largest frequency is obtained and is used as the current service attribute of the service, for example, the historical service attribute of the service A in a plurality of time periods is counted, the frequency of the service attribute is M is 5 times, the frequency of the service attribute is N is 2 times, and the service attribute is M is used as the current service attribute of the service A.
In another embodiment, as shown in fig. 3, the present invention provides a processing apparatus for multi-level cache data, including:
the receiving module 10: the method comprises the steps of receiving a service request, acquiring a service attribute of a service corresponding to the service request, and judging the magnitude of the service according to the service attribute;
determination module 20: the caching identification is used for matching the business data of the business according to the magnitude, and the caching level of the business data storage is determined according to the caching identification;
conversion module 30: for converting the service request into a service request comprising a service data structure of the cache hierarchy;
processing module 40: the service data processing module is used for processing the converted service request and acquiring the service data in the cache hierarchy according to the service data structure;
feedback module 50: for returning the service data to the service requester.
In one embodiment of the present invention, the conversion module 30 performs the conversion of the service request into a service request containing the service data structure of the cache hierarchy, including:
acquiring a key value in the service request;
constructing a business data structure according to the cache hierarchy and the keywords;
and converting the service request into a service request containing the service data structure of the cache hierarchy.
In one embodiment of the present invention, the cache levels include a first cache level, a second cache level, and a third cache level; the processing module 40 performs the obtaining of the service data in the cache hierarchy according to the service data structure, including:
if the cache level determined by the cache identifier is a first cache level, acquiring the service data in the first cache level according to the service data structure; or alternatively, the first and second heat exchangers may be,
if the cache level determined by the cache identifier is a second cache level, acquiring the service data in the second cache level according to the service data structure; or alternatively, the first and second heat exchangers may be,
and if the cache level determined by the cache identifier is a third cache level, acquiring the service data in the third cache level according to the service data structure.
In one embodiment of the present invention, after the processing module 40 executes to obtain the service data in the third cache hierarchy according to the service data structure, the processing module further includes executing:
writing the service data into a second cache level and a first cache level;
after the service data is acquired in the second cache hierarchy according to the service data structure, the method further includes:
and writing the service data into a first cache hierarchy.
In one embodiment of the present invention, the receiving module 10 performs obtaining a service attribute of a service corresponding to the service request, including:
acquiring the update frequency of the service corresponding to the service request;
and determining service attributes according to the updating frequency.
In one embodiment of the present invention, the receiving module 10 performs obtaining a service attribute of a service corresponding to the service request, including:
acquiring historical service attributes of a plurality of time periods of the service corresponding to the service request;
and acquiring the historical service attribute with the same historical service attribute and the largest frequency as the service attribute of the service.
In another embodiment, the present invention provides a computer readable storage medium, where a computer program is stored, where the computer program is executed by a processor to implement the method for processing multi-level cache data according to the foregoing embodiment. The computer readable storage medium includes, but is not limited to, any type of disk including floppy disks, hard disks, optical disks, CD-ROMs, and magneto-optical disks, ROMs (Read-Only memories), RAMs (Random AcceSS Memory, random access memories), EPROMs (EraSable Programmable Read-Only memories), EEPROMs (Electrically EraSable Programmable Read-Only memories), flash memories, magnetic cards, or optical cards. That is, a storage device includes any medium that stores or transmits information in a form readable by a device (e.g., computer, cell phone), and may be read-only memory, magnetic or optical disk, etc.
The computer readable storage medium provided by the embodiment of the invention can be used for receiving a service request, acquiring the service attribute of the service corresponding to the service request, and judging the magnitude of the service according to the service attribute; according to the magnitude, the cache identification of the business data of the business is matched, and according to the cache identification, the cache level of the business data storage is determined; converting the service request into a service request containing a service data structure of the cache hierarchy; processing the converted service request, and acquiring the service data in the cache hierarchy according to the service data structure; and returning the service data to the service requester. After a service request is received, determining the magnitude of service corresponding to the service request, matching the cache hierarchy of service data storage required by the service according to the magnitude, converting the service request into a service request containing a service data structure of the cache hierarchy, subsequently processing the converted service request in the corresponding cache hierarchy to know service data required to be obtained by the service request or operation required to be executed on the service data, returning the obtained service data to a service requester, obtaining required service from different cache hierarchies by configuring parameters of the data required by the service, and rapidly feeding back the data required by the service or the latest data required by the feedback service according to the actual requirements of the service.
The embodiment of the method for processing multi-level cache data can be implemented by the computer readable storage medium provided by the embodiment of the invention, and specific function implementation is shown in the description of the method embodiment and will not be repeated here.
In addition, in another embodiment, the present invention further provides a server, as shown in fig. 4, where the server includes a processor 403, a memory 405, an input unit 407, and a display unit 409. Those skilled in the art will appreciate that the structural elements shown in fig. 4 do not constitute a limitation on all servers, and may include more or fewer components than shown, or may combine certain components. The memory 405 may be used to store a computer program 401 and various functional modules, and the processor 403 runs the computer program 401 stored in the memory 405, thereby executing various functional applications of the device and data processing. The memory 405 may be or include both internal memory and external memory. The internal memory may include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), flash memory, or random access memory. The external memory may include a hard disk, floppy disk, ZIP disk, U-disk, tape, etc. The disclosed memory includes, but is not limited to, these types of memory. The memory 405 disclosed herein is by way of example only and not by way of limitation.
The input unit 407 is configured to receive input of a signal and receive input of a user, and the input unit 407 may include a touch panel and other input devices, where the touch panel may collect touch operations (such as operations of a user using any suitable object or accessory such as a finger, a stylus, etc. on or near the touch panel) thereon or nearby by the user, and drive the corresponding connection device according to a preset program; other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., play control keys, switch keys, etc.), a trackball, mouse, joystick, etc. The display unit 409 may be used to display information input by a user or information provided to the user as well as various menus of the computer device. The display unit 409 may take the form of a liquid crystal display, an organic light emitting diode, or the like. The processor 403 is a control center of the computer device, connects various parts of the entire computer using various interfaces and lines, performs various functions and processes data by running or executing software programs and/or modules stored in the memory 403, and invoking data stored in the memory.
In one embodiment, the server comprises one or more processors 403, and one or more memories 405, one or more computer programs 401, wherein the one or more computer programs 401 are stored in the memory 405 and configured to be executed by the one or more processors 403, the one or more computer programs 401 configured to perform the overload protection method described in the above embodiments. The one or more processors 403 shown in fig. 4 are capable of performing, implementing the functions of the receiving module 10, determining module 20, converting module 30, processing module 40, feedback module 50 shown in fig. 3.
The server provided by the embodiment of the invention can receive the service request, acquire the service attribute of the service corresponding to the service request, and judge the magnitude of the service according to the service attribute; according to the magnitude, the cache identification of the business data of the business is matched, and according to the cache identification, the cache level of the business data storage is determined; converting the service request into a service request containing a service data structure of the cache hierarchy; processing the converted service request, and acquiring the service data in the cache hierarchy according to the service data structure; and returning the service data to the service requester. After a service request is received, determining the magnitude of service corresponding to the service request, matching the cache hierarchy of service data storage required by the service according to the magnitude, converting the service request into a service request containing a service data structure of the cache hierarchy, subsequently processing the converted service request in the corresponding cache hierarchy to know service data required to be obtained by the service request or operation required to be executed on the service data, returning the obtained service data to a service requester, obtaining required service from different cache hierarchies by configuring parameters of the data required by the service, and rapidly feeding back the data required by the service or the latest data required by the feedback service according to the actual requirements of the service.
The server provided by the embodiment of the present invention can implement the embodiment of the method for processing multi-level cache data provided above, and specific function implementation is described in the method embodiment, and is not repeated herein.
The foregoing is only a partial embodiment of the present invention, and it should be noted that it will be apparent to those skilled in the art that modifications and adaptations can be made without departing from the principles of the present invention, and such modifications and adaptations are intended to be comprehended within the scope of the present invention.

Claims (8)

1. A method for processing multi-level cache data, comprising:
receiving a service request, acquiring a service attribute of a service corresponding to the service request, and judging the magnitude of the service according to the service attribute;
according to the magnitude, the cache identification of the business data of the business is matched, and according to the cache identification, the cache level of the business data storage is determined;
converting the service request into a service request containing a service data structure of the cache hierarchy;
processing the converted service request, and acquiring the service data in the cache hierarchy according to the service data structure;
returning the service data to a service requester;
wherein said converting said service request into a service request comprising a service data structure of said cache hierarchy comprises:
acquiring a key value in the service request;
constructing a business data structure according to the cache hierarchy and the key value;
converting the service request into a service request containing a service data structure of the cache hierarchy;
the cache hierarchy includes at least one cache hierarchy; the obtaining the service data in the cache hierarchy according to the service data structure includes:
and determining a cache level of a corresponding category according to the cache identification, and acquiring the service data from the cache level of the corresponding category according to the service data result.
2. The method of claim 1, wherein the cache levels comprise a first cache level, a second cache level, and a third cache level; the obtaining the service data in the cache hierarchy according to the service data structure includes:
if the cache level determined by the cache identifier is a first cache level, acquiring the service data in the first cache level according to the service data structure; or alternatively, the first and second heat exchangers may be,
if the cache level determined by the cache identifier is a second cache level, acquiring the service data in the second cache level according to the service data structure; or alternatively, the first and second heat exchangers may be,
and if the cache level determined by the cache identifier is a third cache level, acquiring the service data in the third cache level according to the service data structure.
3. The method of claim 2, wherein after the service data is obtained in the third cache hierarchy according to the service data structure, further comprising:
writing the service data into a second cache level and a first cache level;
after the service data is acquired in the second cache hierarchy according to the service data structure, the method further includes:
and writing the service data into a first cache hierarchy.
4. The method of claim 1, wherein the obtaining the service attribute of the service corresponding to the service request comprises:
acquiring the update frequency of the service corresponding to the service request;
and determining service attributes according to the updating frequency.
5. The method of claim 1, wherein the obtaining the service attribute of the service corresponding to the service request comprises:
acquiring historical service attributes of a plurality of time periods of the service corresponding to the service request;
and acquiring the historical service attribute with the same historical service attribute and the largest frequency as the service attribute of the service.
6. A processing apparatus for multi-level caching of data, comprising:
and a receiving module: the method comprises the steps of receiving a service request, acquiring a service attribute of a service corresponding to the service request, and judging the magnitude of the service according to the service attribute;
and a determination module: the caching identification is used for matching the business data of the business according to the magnitude, and the caching level of the business data storage is determined according to the caching identification;
and a conversion module: for converting the service request into a service request comprising a service data structure of the cache hierarchy;
the processing module is used for: the service data processing module is used for processing the converted service request and acquiring the service data in the cache hierarchy according to the service data structure;
and a feedback module: the service data is used for returning the service data to a service requester;
wherein the conversion module performs conversion of the service request into a service request including a service data structure of the cache hierarchy, including:
acquiring a key value in the service request;
constructing a business data structure according to the cache hierarchy and the key value;
converting the service request into a service request containing a service data structure of the cache hierarchy;
the cache hierarchy includes at least one cache hierarchy; the processing module obtains the service data in the cache hierarchy according to the service data structure, including:
and determining a cache level of a corresponding category according to the cache identification, and acquiring the service data from the cache level of the corresponding category according to the service data result.
7. A computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, which when executed by a processor, implements the method for processing multi-level cache data according to any one of claims 1 to 5.
8. A server, comprising:
one or more processors;
a memory;
one or more computer programs, wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors, the one or more computer programs configured to perform the method of processing multi-level cache data according to any one of claims 1 to 5.
CN201811231430.9A 2018-10-22 2018-10-22 Processing method and device for multi-level cache data, storage medium and server Active CN109614347B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811231430.9A CN109614347B (en) 2018-10-22 2018-10-22 Processing method and device for multi-level cache data, storage medium and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811231430.9A CN109614347B (en) 2018-10-22 2018-10-22 Processing method and device for multi-level cache data, storage medium and server

Publications (2)

Publication Number Publication Date
CN109614347A CN109614347A (en) 2019-04-12
CN109614347B true CN109614347B (en) 2023-07-21

Family

ID=66001915

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811231430.9A Active CN109614347B (en) 2018-10-22 2018-10-22 Processing method and device for multi-level cache data, storage medium and server

Country Status (1)

Country Link
CN (1) CN109614347B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110471900A (en) * 2019-07-10 2019-11-19 平安科技(深圳)有限公司 Data processing method and terminal device
CN110673831B (en) * 2019-08-22 2023-02-03 深圳联友科技有限公司 Cache calculation method for request parameters
CN111104406A (en) * 2019-12-10 2020-05-05 深圳市金蝶天燕云计算股份有限公司 Hierarchical service data storage method and device, computer equipment and storage medium
CN111083219A (en) * 2019-12-11 2020-04-28 深信服科技股份有限公司 Request processing method, device, equipment and computer readable storage medium
CN111882286A (en) * 2020-06-19 2020-11-03 五八到家有限公司 Method, device, equipment and storage medium for processing extracted data
CN111723115A (en) * 2020-06-24 2020-09-29 深圳前海微众银行股份有限公司 Data statistics method, device, terminal and storage medium based on multi-level cache
CN113347039B (en) * 2021-06-11 2022-12-30 山石网科通信技术股份有限公司 Data processing method for virtualized network function
CN113986976B (en) * 2021-10-29 2023-02-10 重庆大学 Class processing method and device based on intelligent multi-cache chain processor

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2012258406A1 (en) * 2012-11-27 2014-06-12 Canon Kabushiki Kaisha Heuristic image caching
CN104063274A (en) * 2014-06-17 2014-09-24 广州长嘉电子有限公司 Multi-service processing method based on quad-core processor and tablet computer
CN105187521A (en) * 2015-08-25 2015-12-23 努比亚技术有限公司 Service processing device and method
CN105630889A (en) * 2015-12-18 2016-06-01 北京奇虎科技有限公司 Method and device for realizing generic cache
CN105653473A (en) * 2015-12-31 2016-06-08 中国科学院信息工程研究所 Cache data access method and device based on binary identification
CN107220266A (en) * 2016-03-22 2017-09-29 阿里巴巴集团控股有限公司 It is a kind of to create Service Database, business datum storage and the method and device for determining business datum
CN107704573A (en) * 2017-09-30 2018-02-16 山东浪潮通软信息科技有限公司 A kind of intelligent buffer method coupled with business
CN108259563A (en) * 2017-12-12 2018-07-06 平安普惠企业管理有限公司 Data cache method, device, server and storage medium
CN108319598A (en) * 2017-01-16 2018-07-24 腾讯科技(北京)有限公司 data cache method, device and system
US10075551B1 (en) * 2016-06-06 2018-09-11 Amazon Technologies, Inc. Request management for hierarchical cache
CN108628891A (en) * 2017-03-21 2018-10-09 北京京东尚科信息技术有限公司 Realize method, apparatus, electronic equipment and the readable storage medium storing program for executing of data buffer storage layer

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080147974A1 (en) * 2006-12-18 2008-06-19 Yahoo! Inc. Multi-level caching system
EP2887618B1 (en) * 2012-09-12 2018-10-17 Huawei Technologies Co., Ltd. Service data caching processing method, device and system
US10404823B2 (en) * 2016-05-27 2019-09-03 Home Box Office, Inc. Multitier cache framework

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2012258406A1 (en) * 2012-11-27 2014-06-12 Canon Kabushiki Kaisha Heuristic image caching
CN104063274A (en) * 2014-06-17 2014-09-24 广州长嘉电子有限公司 Multi-service processing method based on quad-core processor and tablet computer
CN105187521A (en) * 2015-08-25 2015-12-23 努比亚技术有限公司 Service processing device and method
CN105630889A (en) * 2015-12-18 2016-06-01 北京奇虎科技有限公司 Method and device for realizing generic cache
CN105653473A (en) * 2015-12-31 2016-06-08 中国科学院信息工程研究所 Cache data access method and device based on binary identification
CN107220266A (en) * 2016-03-22 2017-09-29 阿里巴巴集团控股有限公司 It is a kind of to create Service Database, business datum storage and the method and device for determining business datum
US10075551B1 (en) * 2016-06-06 2018-09-11 Amazon Technologies, Inc. Request management for hierarchical cache
CN108319598A (en) * 2017-01-16 2018-07-24 腾讯科技(北京)有限公司 data cache method, device and system
CN108628891A (en) * 2017-03-21 2018-10-09 北京京东尚科信息技术有限公司 Realize method, apparatus, electronic equipment and the readable storage medium storing program for executing of data buffer storage layer
CN107704573A (en) * 2017-09-30 2018-02-16 山东浪潮通软信息科技有限公司 A kind of intelligent buffer method coupled with business
CN108259563A (en) * 2017-12-12 2018-07-06 平安普惠企业管理有限公司 Data cache method, device, server and storage medium

Also Published As

Publication number Publication date
CN109614347A (en) 2019-04-12

Similar Documents

Publication Publication Date Title
CN109614347B (en) Processing method and device for multi-level cache data, storage medium and server
CN107480198B (en) Distributed NewSQL database system and full-text retrieval method
CN108363602B (en) Intelligent UI (user interface) layout method and device, terminal equipment and storage medium
RU2380748C2 (en) Registration and receiving information about database table change which can be used to invalidate cache elements
US9948531B2 (en) Predictive prefetching to reduce document generation times
US20190324608A1 (en) Method and apparatus for homepage cluster system management based on tree structure
US20110055202A1 (en) Predictive data caching
CN105550206B (en) The edition control method and device of structured query sentence
CN101216840A (en) Data enquiry method and data enquiry system
US20120079009A1 (en) Method and apparatus for choosing resources based on context and inheritance
US11080068B2 (en) Adaptive user-interface assembling and rendering
EP3251013B1 (en) Monitoring application loading
CN111488492B (en) Method and device for searching graph database
US20120079367A1 (en) Method and apparatus for defining an application to allow polymorphic serialization
US20190265851A1 (en) Platform for third-party supplied calls-to-action
RU2643466C1 (en) Method and system for generating search results
CN111125128A (en) Cache updating method, device and system
US10235158B2 (en) Optimizing feature deployment based on usage pattern
US9965812B2 (en) Generating a supplemental description of an entity
CN103944935A (en) Method and device for releasing web site information
US10503823B2 (en) Method and apparatus providing contextual suggestion in planning spreadsheet
Lee et al. Spotlake: Diverse spot instance dataset archive service
US10831511B2 (en) Customized application programming interface presentation
US7685147B2 (en) Automatic management method and system with category-based correlations
CN114153438A (en) API automatic generation system

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