CN115858413A - Storage management method and related assembly - Google Patents

Storage management method and related assembly Download PDF

Info

Publication number
CN115858413A
CN115858413A CN202211582359.5A CN202211582359A CN115858413A CN 115858413 A CN115858413 A CN 115858413A CN 202211582359 A CN202211582359 A CN 202211582359A CN 115858413 A CN115858413 A CN 115858413A
Authority
CN
China
Prior art keywords
data
access request
cache
external memory
accessed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211582359.5A
Other languages
Chinese (zh)
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.)
Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Original Assignee
Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center 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 Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd filed Critical Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Priority to CN202211582359.5A priority Critical patent/CN115858413A/en
Publication of CN115858413A publication Critical patent/CN115858413A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a storage management method and a related component, which are applied to the field of storage, and are used for judging whether data required by an access request is in a cache or not when the access request is received; if the data is in the cache, operating the data in the cache according to the access request; and if the data is not in the cache, operating the data in the external memory according to the access request, and performing position replacement on the data corresponding to the access request in the external memory and the data which is not accessed in the cache for the longest time. The existing data in the cache can be directly operated in the cache, if the data does not exist in the cache, the data can be operated from the external memory, meanwhile, the data which is not accessed for the longest time in the cache and the data are subjected to position replacement, the data with higher access times are stored in the cache, the core unit can conveniently obtain the data, and the operation stability of the AI chip is improved.

Description

Storage management method and related assembly
Technical Field
The present invention relates to the field of storage, and in particular, to a storage management method and related components.
Background
An AI (Artificial Intelligence) chip is one of the technical cores of the Artificial Intelligence era, and currently, most AI chips adopt a parallel architecture of a plurality of computational core units. Because a plurality of computation core units are arranged, a large amount of data needs to be stored for AI computation or similar computation needing a large amount of data, the cache integrated on the chip in the prior art continuously covers old data with new data to realize data storage, and partial data may be lost in the storage process, so that the data cannot be stored better only by the cache integrated on the chip by the chip, and the working stability of the AI chip is influenced.
Disclosure of Invention
The invention aims to provide a storage management method and related components, which can ensure that data with higher access times are stored in a cache, are convenient for a core unit to obtain and improve the operation stability of an AI chip.
In order to solve the above technical problem, the present invention provides a storage management method, including:
when an access request is received, judging whether data required by the access request is in a cache or not;
if the data is in the cache, operating the data in the cache according to the access request;
if the data is not in the cache, operating the data in the external memory according to the access request, and performing position replacement on the data corresponding to the access request in the external memory and the data which is not accessed in the cache for the longest time.
Preferably, the operating the data in the cache according to the access request includes:
if the access request is read operation, sending data required by the access request to a core unit corresponding to the access request;
if the access request is write operation, storing data contained in the access request to the cache, and sending a write operation success signal to a core unit corresponding to the access request.
Preferably, before receiving the access request, the method further includes:
dividing data operation into data transmission, data multicast, data temporary storage and data cooperation; the data transmission is that one core carries out transmission write operation, and the other core carries out transmission read operation; the data multicast is that one core performs multicast write operation, and a plurality of cores perform multicast read operation; the data temporary storage is a core which is used for temporary storage writing operation and temporary storage reading operation; the data collaboration is that the cores only perform collaborative write operation, the cores only perform collaborative read operation, and the cores can perform collaborative read operation and write operation;
prioritizing the data operation categories;
the priority is from low to high according to the sequence of data temporary storage, data transmission, data multicast and data cooperation, and the priority of the write operation is higher than that of the read operation.
Preferably, before performing location replacement on the data corresponding to the access request in the external memory and the data that has not been accessed for the longest time in the cache, the method further includes:
judging whether the data operation type is a transfer read operation or a temporary storage read operation;
if not, the step of replacing the position of the data corresponding to the access request in the external memory and the data which is not accessed in the cache for the longest time is carried out.
Preferably, before performing location replacement on the data corresponding to the access request in the external memory and the data that has not been accessed for the longest time in the cache, the method further includes:
judging whether the cache comprises a data operation type with a priority lower than that of the data operation type corresponding to the current access request;
if so, selecting the data which is not accessed for the longest time in the data operation types with lower priorities as the data to be replaced, and performing position replacement on the data corresponding to the access request in the external memory and the data which is not accessed for the longest time in the cache;
if not, the data position is kept unchanged.
Preferably, after performing location replacement on the data corresponding to the access request in the external memory and the data that has not been accessed for the longest time in the cache, the method further includes:
judging whether the operation type of the replaced data is write operation or not;
and if the operation is a write operation, storing the replaced data to the external memory.
Preferably, after performing location replacement on the data corresponding to the access request in the external memory and the data that has not been accessed for the longest time in the cache, the method further includes:
and updating the access sequence of the data in the cache.
In order to solve the above technical problem, the present invention further provides a storage management system, including:
the device comprises a judging unit, a cache unit and a processing unit, wherein the judging unit is used for judging whether data required by an access request is in a cache or not when the access request is received; if yes, triggering a first operation unit; if not, triggering a second operation unit;
the first operation unit is used for operating the data in the cache according to the access request;
a second operation unit for operating the data in the external memory according to the access request;
and the position replacing unit is used for replacing the position of the data corresponding to the access request in the external memory and the data which is not accessed in the cache for the longest time.
In order to solve the above technical problem, the present invention further provides a storage management apparatus, including:
a memory for storing a computer program;
and the processor is used for realizing the steps of the stored management method when executing the computer program.
In order to solve the above technical problem, the present invention further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the above stored management method.
The application provides a storage management method and related components, which are applied to the field of storage and used for judging whether data required by an access request is in a cache or not when the access request is received; if the data is in the cache, operating the data in the cache according to the access request; and if the data is not in the cache, operating the data in the external memory according to the access request, and performing position replacement on the data corresponding to the access request in the external memory and the data which is not accessed in the cache for the longest time. The existing data in the cache can be directly operated in the cache, if the data does not exist in the cache, the data can be operated from an external memory, meanwhile, the data which does not have access for the longest time in the cache and the data can be subjected to position replacement, the data with higher access times are stored in the cache, the core unit can conveniently obtain the data, and the operation stability of the AI chip is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed in the prior art and the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a flow chart of a storage management method according to the present invention;
FIG. 2 is a schematic structural diagram of a storage management system according to the present invention;
fig. 3 is a schematic structural diagram of a storage management device according to the present invention.
Detailed Description
The core of the invention is to provide a storage management method and related components, which ensure that data with higher access times are stored in a cache, are convenient for a core unit to obtain and improve the operation stability of an AI chip.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
An AI (Artificial Intelligence) chip is one of the technical cores of the Artificial Intelligence era, and currently, most AI chips adopt a parallel architecture of a plurality of computational core units. Because a plurality of computation core units are arranged, a large amount of data needs to be stored for AI computation or similar computation needing a large amount of data, the cache integrated on the chip in the prior art continuously covers old data with new data to realize data storage, and partial data may be lost in the storage process, so that the data cannot be stored better only by the cache integrated on the chip by the chip, and the working stability of the AI chip is influenced.
Fig. 1 is a flowchart of a storage management method provided in the present invention, where the method includes:
s11: when an access request is received, judging whether data required by the access request is in a cache or not; if yes, go to step S12; if not, the step S13 is carried out;
in consideration of the shortage of the memory of the cache, the external memory is arranged to assist the cache to store data, and the cache is integrated on a chip, so that the core can acquire data from the cache more conveniently and quickly, and the time for acquiring data from the external memory is slower than that for acquiring data from the cache. Therefore, whether the data required by the received access request is in the cache or not is judged in advance, and then the data is read from the cache or the external memory subsequently.
S12: operating the data in the cache according to the access request;
the access request can be read operation or write operation, and is written in the cache or searched from the cache according to the data required by the request and returned to the core unit sending the access request.
S13: and operating the data in the external memory according to the access request, and performing position replacement on the data corresponding to the access request in the external memory and the data which is not accessed in the cache for the longest time.
Considering that data which needs to be read or written by an access request is in an external memory, if the data is always stored in the external memory, the data is still slow to be read by a core unit, so the data in the external memory is stored in a cache after being operated according to the access request. Similarly, in consideration of the fact that the remaining memory in the cache cannot store data, the data which is not accessed for the longest time in the cache is stored in the external memory, so that the position replacement of the data corresponding to the access request in the external memory and the data which is not accessed for the longest time in the cache is realized. After the position is replaced, the data stored in the cache is the data which is accessed most often, and the core unit can acquire the data more conveniently and rapidly, so that the calculation speed is improved.
The application provides a storage management method, which is applied to the field of storage and is used for judging whether data required by an access request is in a cache or not when the access request is received; if the data is in the cache, operating the data in the cache according to the access request; and if the data is not in the cache, operating the data in the external memory according to the access request, and performing position replacement on the data corresponding to the access request in the external memory and the data which is not accessed in the cache for the longest time. The existing data in the cache can be directly operated in the cache, if the data does not exist in the cache, the data can be operated from the external memory, meanwhile, the data which is not accessed for the longest time in the cache and the data are subjected to position replacement, the data with higher access times are stored in the cache, the core unit can conveniently obtain the data, and the operation stability of the AI chip is improved.
On the basis of the above-described embodiment:
in a preferred embodiment, the operating on the data in the cache according to the access request includes:
if the access request is a read operation, sending data required by the access request to a core unit corresponding to the access request;
and if the access request is write operation, storing data contained in the access request into a cache, and sending a write operation success signal to a core unit corresponding to the access request.
There may be data transfer between core units, so one core unit sends an access request to another core unit. And the core unit receiving the access request stores the data carried by the access request to a cache according to the access request, or sends the data in the cache to the core unit sending the access request.
In order to ensure successful data transmission, after the data in the access request is stored in the cache, a write operation success signal is also sent to the core unit sending the access request, so that the core unit determines that the data transmission is successful.
As a preferred embodiment, before receiving the access request, the method further includes:
dividing data operation into data transmission, data multicast, data temporary storage and data cooperation; data transfer is that one core does transfer write operation, another core does transfer read operation; data multicasting is that one core does multicasting writing operation, and a plurality of cores do multicasting reading operation; the data temporary storage is a core which is used for performing temporary storage writing operation and temporary storage reading operation; the data collaboration is that the multiple cores only perform collaborative write operation, the multiple cores only perform collaborative read operation, and the multiple cores can perform collaborative read operation and collaborative write operation;
prioritizing the data operation categories;
the priority of the write operation is higher than that of the read operation from low to high according to the sequence of data temporary storage, data transmission, data multicast and data cooperation.
Data is prioritized in view of the fact that it is not accurate enough to determine whether the data needs to be replaced by a location based on access time alone.
Data transfer, i.e. unidirectional movement of data from one core to another; data multicasting, namely, data is carried from one core to a plurality of cores in a unidirectional way; data temporary storage, namely, a single core temporarily stores the intermediate result of calculation; data collaboration, where several cores operate on the same data.
Meanwhile, a write operation is to save new data into a cache or an external memory, so the priority of the write operation is higher than that of read data. Therefore, the data is divided into eight types, which are respectively a transfer read operation, a transfer write operation, a multicast read operation, a multicast write operation, a temporary storage read operation, a temporary storage write operation, a cooperative read operation and a cooperative write operation.
By prioritizing the data, better storage management of the data may be achieved.
As a preferred embodiment, before performing location replacement on data corresponding to an access request in an external memory and data that has not been accessed for the longest time in a cache, the method further includes:
judging whether the data operation type is a transfer read operation or a temporary storage read operation;
if not, the method proceeds to the step of replacing the position of the data corresponding to the access request in the external memory and the data which is not accessed in the cache for the longest time.
Considering that the transfer read operation is intermediate data of serial operation, the data is one-time data, only the data is transmitted between the core units, and the core units are not accessed subsequently, so the transfer read operation does not perform position replacement with the data in the cache.
The temporary storage read operation is considered as temporary storage and waits for subsequent processing, so that the temporary storage read operation is not frequently used, and the temporary storage read operation does not perform position replacement with data in the cache.
Therefore, when the data operation type is not the transfer read operation or the temporary storage read operation, the position replacement can be carried out, and the accuracy of data management is improved.
As a preferred embodiment, before performing location replacement on data corresponding to an access request in an external memory and data that has not been accessed for the longest time in a cache, the method further includes:
judging whether the cache comprises a data operation type with a priority lower than that of the data operation type corresponding to the current access request;
if so, selecting the data which is not accessed for the longest time in the data operation type with lower priority as the data to be replaced, and performing position replacement on the data corresponding to the access request in the external memory and the data which is not accessed for the longest time in the cache;
if not, the data position is kept unchanged.
And after the priority is set for the data operation type, performing position replacement on the data according to the priority. The priority is respectively temporary storage write operation, transmission write operation, multicast read operation, multicast write operation, cooperative read operation and cooperative write operation according to the sequence from low to high. And if the data operation type corresponding to the current access request is the temporary storage write operation, not performing position replacement. If the data operation type corresponding to the current access request is multicast read operation, but the temporary storage write operation or the transfer write operation is not included in the cache, the position replacement is not performed. And if the data operation type corresponding to the current access request is multicast read operation and the cache comprises temporary storage write operation, performing position replacement on the data written by the temporary storage write operation and the operation read by the multicast read operation.
By setting the priority of the data operation types, the position of the data is convenient to adjust, and the operation speed of the core unit is improved.
In addition, if the priorities are the same, an LRU (Least recently used) replacement strategy is adopted to select the cache with the longest last access time from the current time in the same priority for replacement.
As a preferred embodiment, after performing location replacement on data corresponding to an access request in an external memory and data that has not been accessed for the longest time in a cache, the method further includes:
judging whether the operation type of the replaced data is write operation or not;
and if the operation is a write operation, the replaced data is saved in the external memory.
Considering that although data is not accessed for a long time, deleting the data may affect the calculation speed of the core unit when the core unit is used again, even if the data is replaced by a position, the data needs to be saved to an external memory, and the data still needs to be saved to a cache when being read next time, so that subsequent reading is facilitated.
In conclusion, the data is stored through the external memory, data loss is prevented, and the computing speed of the core unit is improved.
The preferred embodiment is that after the location replacement of the data corresponding to the access request in the external memory and the data that has not been accessed for the longest time in the cache, the method further includes:
and updating the access sequence of the data in the cache.
Considering that the current access request stores the data in the cache after possibly performing a write operation on the data in the cache or performing a write operation on the external memory, when the current access request is a write operation, the access sequence of the cache needs to be updated so as to perform data location replacement again when receiving the next access request.
Fig. 2 is a schematic structural diagram of a storage management system provided in the present invention, where the system includes:
a judging unit 21, configured to, when receiving an access request, judge whether data required by the access request is in a cache; if yes, triggering a first operation unit; if not, triggering a second operation unit;
a first operation unit 22, configured to operate on data in the cache according to the access request;
a second operation unit 23 for operating data in the external memory according to the access request;
and a location replacement unit 24, configured to perform location replacement on data corresponding to the access request in the external memory and data that has not been accessed in the cache for the longest time.
The first operation unit 22 is specifically configured to, if the access request is a read operation, send data required by the access request to a core unit corresponding to the access request;
and if the access request is write operation, storing data contained in the access request into a cache, and sending a write operation success signal to a core unit corresponding to the access request.
The system also comprises a first dividing unit, a second dividing unit and a third dividing unit, wherein the first dividing unit is used for dividing data operation into data transmission, data multicast, data temporary storage and data cooperation before receiving the access request; data transfer is that one core does transfer write operation, another core does transfer read operation; data multicasting is that one core does multicasting writing operation, and a plurality of cores do multicasting reading operation; the data temporary storage is a core which is used for temporary storage writing operation and temporary storage reading operation; the data collaboration is that the multiple cores only perform collaborative write operation, the multiple cores only perform collaborative read operation, and the multiple cores can perform collaborative read operation and collaborative write operation;
the second dividing unit is used for dividing the priority for the data operation category; the priority of the write operation is higher than that of the read operation from low to high according to the sequence of data temporary storage, data transmission, data multicast and data cooperation.
The second judging unit is used for judging whether the data operation type is a transfer read operation or a temporary storage read operation; if not, the position replacement unit 24 is triggered;
the third judging unit is used for judging whether the cache comprises a data operation type with lower priority than the data operation type corresponding to the current access request; if yes, triggering the selection unit and the position replacement unit 24;
the selection unit is used for selecting data which is not accessed for the longest time in the data operation types with lower priority as the data to be replaced;
a fourth judging unit operable to judge whether the operation type of the replaced data is a write operation; if yes, triggering a storage unit;
and a saving unit for saving the replaced data to the external memory.
And the thinning unit is used for updating the access sequence of the data in the cache.
For introduction of the storage management system provided in the present application, please refer to the above embodiments, which are not described herein again.
Fig. 3 is a schematic structural diagram of a storage management device provided in the present invention, where the storage management device includes:
a memory 31 for storing a computer program;
a processor 32 for implementing the steps of the stored management method when executing the computer program.
Specifically, the steps of the computer program executed by the processor 32 are as follows:
when an access request is received, judging whether data required by the access request is in a cache or not;
if the data is in the cache, operating the data in the cache according to the access request;
and if the data is not in the cache, operating the data in the external memory according to the access request, and performing position replacement on the data corresponding to the access request in the external memory and the data which is not accessed in the cache for the longest time.
And operating the data in the cache according to the access request, wherein the operation comprises the following steps:
if the access request is read operation, sending data required by the access request to a core unit corresponding to the access request;
and if the access request is write operation, storing the data contained in the access request to a cache, and sending a write operation success signal to a core unit corresponding to the access request.
Before receiving the access request, the method further comprises the following steps:
dividing data operation into data transmission, data multicast, data temporary storage and data cooperation; data transfer is that one core does transfer write operation, another core does transfer read operation; the data multicast is that one core carries out multicast write operation, and a plurality of cores carry out multicast read operation; the data temporary storage is a core which is used for performing temporary storage writing operation and temporary storage reading operation; the data collaboration is that the multiple cores only perform collaborative write operation, the multiple cores only perform collaborative read operation, and the multiple cores can perform collaborative read operation and collaborative write operation;
prioritizing the data operation categories;
the priority of the write operation is higher than that of the read operation from low to high according to the sequence of data temporary storage, data transmission, data multicast and data cooperation.
Before performing location replacement on data corresponding to the access request in the external memory and data that has not been accessed for the longest time in the cache, the method further includes:
judging whether the data operation type is a transfer read operation or a temporary storage read operation;
if not, the method proceeds to a step of carrying out position replacement on the data corresponding to the access request in the external memory and the data which is not accessed in the cache for the longest time.
Before performing location replacement on data corresponding to the access request in the external memory and data that has not been accessed for the longest time in the cache, the method further includes:
judging whether the cache comprises a data operation type with a priority lower than that of the data operation type corresponding to the current access request;
if so, selecting data which is not accessed for the longest time in the data operation types with lower priorities as data to be replaced, and performing position replacement on the data corresponding to the access request in the external memory and the data which is not accessed for the longest time in the cache;
if not, the data position is kept unchanged.
After the data corresponding to the access request in the external memory and the data which is not accessed in the cache for the longest time are subjected to position replacement, the method further comprises the following steps:
judging whether the operation type of the replaced data is write operation;
and if the operation is a write operation, the replaced data is saved to the external memory.
After the data corresponding to the access request in the external memory and the data which is not accessed in the cache for the longest time are subjected to position replacement, the method further comprises the following steps:
and updating the access sequence of the data in the cache.
For the introduction of the storage management apparatus provided in the present application, please refer to the above embodiments, which are not described herein again.
The present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the stored management method.
Specifically, the computer program stored on the computer-readable storage medium performs the steps of:
when an access request is received, judging whether data required by the access request is in a cache or not;
if the data is in the cache, operating the data in the cache according to the access request;
and if the data is not in the cache, operating the data in the external memory according to the access request, and performing position replacement on the data corresponding to the access request in the external memory and the data which is not accessed in the cache for the longest time.
And operating the data in the cache according to the access request, wherein the operation comprises the following steps:
if the access request is a read operation, sending data required by the access request to a core unit corresponding to the access request;
and if the access request is write operation, storing the data contained in the access request to a cache, and sending a write operation success signal to a core unit corresponding to the access request.
Before receiving the access request, the method further comprises the following steps:
dividing data operation into data transmission, data multicast, data temporary storage and data cooperation; data transfer is that one core does transfer write operation, another core does transfer read operation; data multicasting is that one core does multicasting writing operation, and a plurality of cores do multicasting reading operation; the data temporary storage is a core which is used for temporary storage writing operation and temporary storage reading operation; the data collaboration is that the multiple cores only perform collaborative write operation, the multiple cores only perform collaborative read operation, and the multiple cores can perform collaborative read operation and collaborative write operation;
prioritizing the data operation categories;
the priority of the write operation is higher than that of the read operation from low to high according to the sequence of data temporary storage, data transmission, data multicast and data cooperation.
Before performing location replacement on data corresponding to the access request in the external memory and data that has not been accessed for the longest time in the cache, the method further includes:
judging whether the data operation type is a transfer read operation or a temporary storage read operation;
if not, the method proceeds to the step of replacing the position of the data corresponding to the access request in the external memory and the data which is not accessed in the cache for the longest time.
Before performing location replacement on data corresponding to the access request in the external memory and data that has not been accessed for the longest time in the cache, the method further includes:
judging whether the cache comprises a data operation type with a priority lower than that of the data operation type corresponding to the current access request;
if so, selecting the data which is not accessed for the longest time in the data operation type with lower priority as the data to be replaced, and performing position replacement on the data corresponding to the access request in the external memory and the data which is not accessed for the longest time in the cache;
if not, the data position is kept unchanged.
After the data corresponding to the access request in the external memory and the data which is not accessed in the cache for the longest time are subjected to position replacement, the method further comprises the following steps:
judging whether the operation type of the replaced data is write operation or not;
and if the operation is a write operation, the replaced data is saved to the external memory.
After the data corresponding to the access request in the external memory and the data which is not accessed in the cache for the longest time are subjected to position replacement, the method further comprises the following steps:
and updating the access sequence of the data in the cache.
For the introduction of the computer-readable storage medium provided in the present application, reference is made to the above embodiments, which are not repeated herein.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for managing storage, comprising:
when an access request is received, judging whether data required by the access request is in a cache or not;
if the data is in the cache, operating the data in the cache according to the access request;
if the data is not in the cache, operating the data in the external memory according to the access request, and performing position replacement on the data corresponding to the access request in the external memory and the data which is not accessed in the cache for the longest time.
2. The storage management method according to claim 1, wherein the performing an operation on the data in the cache according to the access request comprises:
if the access request is read operation, sending data required by the access request to a core unit corresponding to the access request;
if the access request is write operation, storing data contained in the access request to the cache, and sending a write operation success signal to a core unit corresponding to the access request.
3. A method of managing storage according to claim 1, further comprising, before receiving the access request:
dividing data operation into data transmission, data multicast, data temporary storage and data cooperation; the data transmission is that one core carries out transmission write operation, and the other core carries out transmission read operation; the data multicast is that one core performs multicast write operation, and a plurality of cores perform multicast read operation; the data temporary storage is a core which is used for temporary storage writing operation and temporary storage reading operation; the data collaboration is that the multiple cores only perform collaborative write operation, the multiple cores only perform collaborative read operation, and the multiple cores can perform collaborative read operation and collaborative write operation;
prioritizing the data operation categories;
the priority is from low to high according to the sequence of data temporary storage, data transmission, data multicast and data cooperation, and the priority of the write operation is higher than that of the read operation.
4. The storage management method according to claim 3, wherein before performing the location replacement of the data corresponding to the access request in the external memory with the data that has not been accessed in the cache for the longest time, the method further comprises:
judging whether the data operation type is a transfer read operation or a temporary storage read operation;
if not, the step of replacing the position of the data corresponding to the access request in the external memory and the data which is not accessed in the cache for the longest time is carried out.
5. The storage management method according to any one of claims 1 to 4, wherein before performing location replacement on the data corresponding to the access request in the external memory and the data that has not been accessed in the cache for the longest time, the method further comprises:
judging whether the cache comprises a data operation type with a priority lower than that of the data operation type corresponding to the current access request;
if so, selecting the data which is not accessed for the longest time in the data operation types with lower priorities as the data to be replaced, and performing position replacement on the data corresponding to the access request in the external memory and the data which is not accessed for the longest time in the cache;
if not, the data position is kept unchanged.
6. The storage management method according to claim 5, wherein after performing location replacement on the data corresponding to the access request in the external memory and the data that has not been accessed in the cache for the longest time, the method further comprises:
judging whether the operation type of the replaced data is write operation;
and if the operation is a write operation, storing the replaced data to the external memory.
7. The storage management method according to claim 5, wherein after performing location replacement on the data corresponding to the access request in the external memory and the data that has not been accessed in the cache for the longest time, the method further comprises:
and updating the access sequence of the data in the cache.
8. A system for managing storage, comprising:
the device comprises a judging unit, a cache unit and a processing unit, wherein the judging unit is used for judging whether data required by an access request is in a cache or not when the access request is received; if yes, triggering a first operation unit; if not, triggering a second operation unit;
the first operation unit is used for operating the data in the cache according to the access request;
a second operation unit for operating the data in the external memory according to the access request;
and the position replacing unit is used for replacing the position of the data corresponding to the access request in the external memory and the data which is not accessed in the cache for the longest time.
9. A storage management apparatus, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the management method of storage according to any one of claims 1 to 7 when executing said computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the management method stored according to any one of claims 1 to 7.
CN202211582359.5A 2022-12-09 2022-12-09 Storage management method and related assembly Pending CN115858413A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211582359.5A CN115858413A (en) 2022-12-09 2022-12-09 Storage management method and related assembly

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211582359.5A CN115858413A (en) 2022-12-09 2022-12-09 Storage management method and related assembly

Publications (1)

Publication Number Publication Date
CN115858413A true CN115858413A (en) 2023-03-28

Family

ID=85671674

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211582359.5A Pending CN115858413A (en) 2022-12-09 2022-12-09 Storage management method and related assembly

Country Status (1)

Country Link
CN (1) CN115858413A (en)

Similar Documents

Publication Publication Date Title
US8452842B2 (en) Controlling retention of publications
US7337275B2 (en) Free list and ring data structure management
US8615635B2 (en) Database management methodology
US7673105B2 (en) Managing memory pages
CN111949568B (en) Message processing method, device and network chip
CN110555001B (en) Data processing method, device, terminal and medium
CN111427859B (en) Message processing method and device, electronic equipment and storage medium
US10140020B2 (en) Data queue having an unlimited depth
EP2219114A1 (en) Method and apparatus for allocating storage addresses
CN109446225B (en) Data caching method and device, computer equipment and storage medium
CN109842621A (en) A kind of method and terminal reducing token storage quantity
CN115878027A (en) Storage object processing method and device, terminal and storage medium
CN116755635B (en) Hard disk controller cache system, method, hard disk device and electronic device
CN115858413A (en) Storage management method and related assembly
CN110413689B (en) Multi-node data synchronization method and device for memory database
CN114489502B (en) Parallel RAM-based data array management method and device and storage equipment
JP2006350633A (en) Data management method and data management system
CN111930642A (en) Cache management method, electronic equipment and cache management device
CN108874560B (en) Method and communication device for communication
CN114463162A (en) Image cache processing method and device, electronic equipment and storage medium
CN111176573A (en) Data reading and writing method and device, storage medium and electronic equipment
CN112764908B (en) Network data acquisition processing method and device and electronic equipment
CN116800692B (en) Scheduling method and device of active queue and storage medium
CN116303125B (en) Request scheduling method, cache, device, computer equipment and storage medium
CN117556088A (en) Data management method and device for memory multidimensional database

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