Resource allocation and recovery method, device, equipment and medium
The control unit obtains interrupt information and allocates or recycles resources according to its type, which solves the problem that the resource cache memory cannot replenish and releases resources in a timely manner, and improves resource utilization and processing performance.
Patent Information
- Application Number
- CN202311434028.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-31
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2043-10-31
AI Technical Summary
In the prior art, resource cache memory cannot replenish resources automatically in time, and the released resources cannot be recycled in time, resulting in waste of resources and reduced processing performance.
The interrupt information is obtained through the control unit, and resource allocation or resource recycling is performed according to the type of interrupt information. The specific steps include allocating resources to the cache memory when the interrupt information of the resource allocation type is interrupted, obtaining the resource identifier to be deleted when the interrupt information of the resource deletes the type and recycling the resources stored in the temporary memory.
Timely resource allocation and recycling is realized according to the interrupt information type, improving resource utilization and improving processing performance.
Smart Images

Figure CN117331701B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a resource allocation and recovery method, device, equipment and medium. Background Art
[0002] Current processors can complete many large-scale computing tasks through multiple processing cores. The processing cores need to occupy certain resources when performing computing tasks. The processing cores can obtain corresponding resources from the resource cache memory and release the corresponding resources after occupying them.
[0003] In the related art, the resource cache memory cannot automatically replenish resources in a timely manner, and the released resources cannot be recovered in a timely manner, resulting in resource waste and reduced processing performance. Summary of the invention
[0004] In order to solve the above technical problems, the present disclosure provides a resource allocation and recovery method, device, equipment and medium.
[0005] In a first aspect, the present disclosure provides a resource allocation and recovery method, comprising:
[0006] Obtain interrupt information through the control unit;
[0007] When the type of the interrupt information is a resource allocation type, allocating corresponding first resource data to the cache memory;
[0008] When the type of the interrupt information is a resource deletion type, obtaining an identifier of the resource to be deleted;
[0009] Resource recovery is performed on the second resource data corresponding to the resource identifier to be deleted stored in the temporary storage device.
[0010] In a second aspect, the present disclosure provides a resource allocation and recovery device, comprising:
[0011] A first acquisition module, used for acquiring interruption information through a control unit;
[0012] A resource allocation module, configured to allocate corresponding first resource data to a cache memory when the type of the interrupt information is a resource allocation type;
[0013] A second acquisition module, used for acquiring an identifier of a resource to be deleted when the type of the interruption information is a resource deletion type;
[0014] The resource recovery module is used to recover the second resource data corresponding to the resource identifier to be deleted stored in the temporary storage device.
[0015] In a third aspect, the present disclosure provides a resource allocation and recovery device, comprising:
[0016] processor;
[0017] A memory for storing executable instructions;
[0018] The processor is used to read executable instructions from the memory and execute the executable instructions to implement the resource allocation and recovery method of the first aspect.
[0019] In a fourth aspect, the present disclosure provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor implements the resource allocation and recovery method of the first aspect.
[0020] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:
[0021] The resource allocation and recovery method, apparatus, device and medium of the disclosed embodiments can obtain interruption information through a control unit, and then allocate corresponding first resource data to a cache memory when the type of the interruption information is a resource allocation type, and then obtain a to-be-deleted resource identifier when the type of the interruption information is a resource deletion type, and finally perform resource recovery on the second resource data corresponding to the to-be-deleted resource identifier stored in the temporary memory, thereby being able to perform resource allocation or resource recovery according to the type of the interruption information, thereby performing resource allocation and recovery in a timely manner, improving resource utilization, and enhancing processing performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0023] Figure 1 A schematic diagram of a process of resource allocation and recovery method provided by an embodiment of the present disclosure;
[0024] Figure 2 A flowchart of another resource allocation and recovery method provided by an embodiment of the present disclosure;
[0025] Figure 3 A flowchart of another resource allocation and recovery method provided by an embodiment of the present disclosure;
[0026] Figure 4 A schematic diagram of the structure of a resource allocation and recovery device provided in an embodiment of the present disclosure;
[0027] Figure 5 A schematic diagram of the structure of a resource allocation and recovery device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0028] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0029] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0030] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0031] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0032] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0033] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0034] In order to solve the above problems, the present disclosure provides a resource allocation and recovery method, device, equipment and medium. Figures 1 to 3 The resource allocation and recovery method provided in the embodiment of the present disclosure is described in detail.
[0035] Figure 1 A schematic diagram of a process of a resource allocation and recovery method provided in an embodiment of the present disclosure is shown.
[0036] In the embodiment of the present disclosure, the resource allocation and recovery method may be executed by an electronic device. For example, the electronic device may be a device including a DPU device card.
[0037] like Figure 1 As shown, the resource allocation and recovery method may include the following steps.
[0038] S110, obtaining interruption information through a control unit.
[0039] In the embodiment of the present disclosure, the electronic device can obtain the interruption information through the control unit.
[0040] Optionally, the control unit may be a unit for performing resource control, for example, a microcontroller unit (MCU).
[0041] Optionally, the interruption information may be information for implementing a specific function.
[0042] Specifically, the electronic device can obtain the interrupt information through a control unit (MCU).
[0043] S120: When the type of the interrupt information is a resource allocation type, allocate corresponding first resource data to the cache memory.
[0044] In the embodiment of the present disclosure, when the type of the interrupt information is a resource allocation type, the corresponding first resource data is allocated to the cache memory.
[0045] Optionally, the resource allocation type may be used to characterize the need for resource allocation.
[0046] Optionally, the cache memory may be a memory for storing cache resources. For example, the cache memory may be a FIFO (First Input First Output) memory.
[0047] Optionally, the first resource data may be resources to be allocated.
[0048] Specifically, after acquiring the interruption information, the electronic device may determine the type of the interruption information. When the type of the interruption information is a resource allocation type, the electronic device may allocate corresponding first resource data to the cache memory.
[0049] S130: When the type of the interruption information is a resource deletion type, obtain an identifier of a resource to be deleted.
[0050] In an embodiment of the present disclosure, when the type of the interruption information is a resource deletion type, the electronic device may obtain an identifier of a resource to be deleted.
[0051] Optionally, the resource deletion type may be used to indicate that resource deletion is required.
[0052] Optionally, the resource identifier to be deleted may be an identifier name of the resource to be deleted. For example, the resource identifier to be deleted may be an ID (Identity document).
[0053] Specifically, after obtaining the interruption information, the electronic device may determine the type of the interruption information. When the type of the interruption information is a resource identifier to be deleted, the electronic device may obtain the resource identifier to be deleted.
[0054] S140: Reclaim the second resource data corresponding to the resource identifier to be deleted stored in the temporary storage device.
[0055] In an embodiment of the present disclosure, the electronic device may recycle the second resource data corresponding to the resource identifier to be deleted stored in the temporary memory.
[0056] Optionally, the temporary memory may be a memory for temporarily storing resources, for example, a random access memory (RAM).
[0057] Optionally, the second resource data may be resources to be recycled.
[0058] Specifically, after obtaining the identifier of the resource to be deleted, the electronic device may recycle the second resource data corresponding to the identifier of the resource to be deleted stored in the temporary memory.
[0059] Therefore, in the embodiment of the present disclosure, interrupt information can be obtained through the control unit, and then when the type of the interrupt information is a resource allocation type, the corresponding first resource data is allocated to the cache memory, and then when the type of the interrupt information is a resource deletion type, the resource identifier to be deleted is obtained, and finally the second resource data corresponding to the resource identifier to be deleted stored in the temporary memory is recycled. In this way, resource allocation or resource recycling can be performed according to the type of interrupt information, thereby performing resource allocation and recycling in a timely manner, improving resource utilization, and enhancing processing performance.
[0060] Optionally, the resource allocation type may include a unit resource allocation type and an index resource allocation type.
[0061] Optionally, the unit resource allocation type may be a type used to characterize the need to allocate unit resources.
[0062] Optionally, the index resource allocation type may be a type used to characterize the need to allocate index resources.
[0063] Optionally, the cache memory may include a unit resource cache memory and an index resource cache memory, and the first resource data may include a first unit resource and a first index resource.
[0064] Optionally, the unit resource cache memory may be a cache memory for storing unit resources.
[0065] Optionally, the index resource cache memory may be a cache memory used to store index resources.
[0066] Optionally, the first unit resource may be a unit resource to be allocated. For example, the unit resource may be a pre-configured preset minimum storage unit (Page) resource.
[0067] Optionally, the first index resource may be an index resource to be allocated. For example, the index resource may be a pre-configured index (Line) resource.
[0068] Optionally, S120 may specifically include: when the type of the interrupt information is a unit resource allocation type, allocating a corresponding first unit resource to a unit resource cache memory.
[0069] In the embodiment of the present disclosure, when the type of the interruption information is a unit resource allocation type, the electronic device may allocate the corresponding first unit resource to the unit resource cache memory.
[0070] Specifically, when the unit resource cache memory (dispatch_Page_FiFo) is almost empty, the level interrupt will be pulled high, and the electronic device can receive the interrupt information through the control unit (MCU), and when it is determined that the type of the interrupt information is the unit resource allocation type, it is determined that the resources of the unit resource cache memory (dispatch_Page_FiFo) are less, then the electronic device can allocate the corresponding first unit resource (Page resource) to the unit resource cache memory (dispatch_Page_FiFo) through the control unit (MCU).
[0071] Optionally, S120 may further specifically include: when the type of the interruption information is an index resource allocation type, allocating a corresponding first index resource to the index resource cache memory.
[0072] In an embodiment of the present disclosure, when the type of the interruption information is an index resource allocation type, the electronic device may allocate a corresponding first index resource to the index resource cache memory.
[0073] Specifically, when the index resource cache memory (dispatch_Line_FiFo) is almost empty, the level interrupt will be pulled high, and the electronic device can receive the interrupt information through the control unit (MCU), and when it is determined that the type of the interrupt information is the index resource allocation type, it is determined that the resources of the index resource cache memory (dispatch_Line_FiFo) are less, then the electronic device can allocate the corresponding first index resource (Line resource) to the index resource cache memory (dispatch_Line_FiFo) through the control unit (MCU).
[0074] Therefore, different resources can be allocated in time according to different types of interrupt information, thereby improving resource utilization and processing performance.
[0075] Optionally, the temporary storage includes a unit resource temporary storage and an index resource temporary storage, and the second resource data includes a second unit resource and a second index resource.
[0076] Optionally, the unit resource temporary storage may be a storage for temporarily storing unit resources.
[0077] Optionally, the index resource temporary storage may be a storage for temporarily storing index resources.
[0078] Optionally, the second unit resource may be a unit resource to be recycled.
[0079] Optionally, the second index resource may be an index resource to be recycled.
[0080] Optionally, S140 may specifically include: accessing the unit resource temporary storage and the index resource temporary storage according to the resource identifier to be deleted; recovering the second unit resource stored in the first data link of the unit resource temporary storage and the second index resource stored in the second data link of the index resource temporary storage; deleting the first data link and the second data link.
[0081] In an embodiment of the present disclosure, the electronic device may access the unit resource temporary storage and the index resource temporary storage according to the resource identifier to be deleted.
[0082] Specifically, after obtaining the to-be-deleted resource identifier (ID), the electronic device can access the unit resource temporary memory (Page_Line_RAM) and the index resource temporary memory (ID_Line_RAM) through the to-be-deleted resource identifier.
[0083] Furthermore, the electronic device may recycle the second unit resource stored in the first data link of the unit resource temporary memory and the second index resource stored in the second data link of the index resource temporary memory.
[0084] Optionally, the first data link may be a data link storing the second unit resource in the unit resource temporary storage.
[0085] Optionally, the second data link may be a data link storing the second index resource in the index resource temporary storage.
[0086] Specifically, after accessing the unit resource temporary memory (Page_Line_RAM) and the index resource temporary memory (ID_Line_RAM), the electronic device can recycle the second unit resource (Page) stored in the first data chain in the unit resource temporary memory (Page_Line_RAM), and recycle the second index resource (Line) stored in the second data chain in the index resource temporary memory (ID_Line_RAM), and store the second unit resource (Page) and the second index resource (Line) in the cache of the control unit (MCU).
[0087] Furthermore, the electronic device may delete the first data link and the second data link.
[0088] As a result, resources can be recycled in a timely manner, resource utilization can be improved, and processing performance can be enhanced.
[0089] Figure 2 A flow chart of another resource allocation and recovery method provided in an embodiment of the present disclosure is shown.
[0090] like Figure 2 As shown, the electronic device can obtain interrupt information through the control unit (MCU). When the type of the interrupt information is a unit resource allocation type, it is determined that the resources of the unit resource cache memory (dispatch_Page_FiFo) are less, and the electronic device can allocate the corresponding first unit resource (Page resource) to the unit resource cache memory (dispatch_Page_FiFo) through the control unit (MCU) via the bus (APB); when the type of the interrupt information is an index resource allocation type, it is determined that the resources of the index resource cache memory (dispatch_Line_FiFo) are less, and the electronic device can allocate the corresponding first index resource (Line resource) to the index resource cache memory (dispatch_Line_FiFo) through the control unit (MCU) via the bus (APB).
[0091] Furthermore, when the type of interrupt information is a resource deletion type, the electronic device can obtain the resource identifier (ID) to be deleted through the control unit (MCU), and access the unit resource temporary memory (Page_Line_RAM) and the index resource temporary memory (ID_Line_RAM) through the bus (APB) based on the obtained resource identifier (ID) to be deleted, and then recycle the second unit resource (Page) stored in the first data chain in the unit resource temporary memory (Page_Line_RAM), and recycle the second index resource (Line) stored in the second data chain in the index resource temporary memory (ID_Line_RAM), and store the second unit resource (Page) and the second index resource (Line) in the cache of the control unit (MCU), and delete the first data chain and the second data chain.
[0092] Figure 3 A flow chart of another resource allocation and recovery method provided in an embodiment of the present disclosure is shown.
[0093] like Figure 3 As shown, the electronic device obtains interrupt information through the control unit (MCU), first determines whether the interrupt information is a resource allocation type, and when the interrupt information is a resource allocation type, continues to determine whether the interrupt information is a unit resource allocation type. When the interrupt information is a unit resource allocation type, the electronic device allocates the corresponding first unit resource (Page resource) to the unit resource cache memory (dispatch_Page_FiFo) through the control unit (MCU) via the bus (APB); when the interrupt information is not a unit resource allocation type but an index resource allocation type, the electronic device allocates the corresponding first index resource (Line resource) to the index resource cache memory (dispatch_Line_FiFo) through the control unit (MCU) via the bus (APB); when the interrupt information is not a resource allocation type, Type, but when it is a resource deletion type, the electronic device obtains the identification (ID) of the resource to be deleted through the control unit (MCU), and accesses the unit resource temporary memory (Page_Line_RAM) and the index resource temporary memory (ID_Line_RAM) through the bus (APB) according to the identification (ID) of the resource to be deleted, and then recycles the second unit resource (Page) stored in the first data link in the unit resource temporary memory (Page_Line_RAM), and recycles the second index resource (Line) stored in the second data link in the index resource temporary memory (ID_Line_RAM), and stores the second unit resource (Page) and the second index resource (Line) in the cache of the control unit (MCU), and deletes the first data link and the second data link.
[0094] Figure 4A schematic diagram of the structure of a resource allocation and recovery device provided by an embodiment of the present disclosure is shown.
[0095] like Figure 4 As shown, the resource allocation and recovery device 400 may include a first acquisition module 410 , a resource allocation module 420 , a second acquisition module 430 and a resource recovery module 440 .
[0096] The first acquisition module 410 may be configured to acquire interruption information through a control unit.
[0097] The resource allocation module 420 may be configured to allocate corresponding first resource data to the cache memory when the type of the interrupt information is a resource allocation type.
[0098] The second acquisition module 430 can be used to acquire the identifier of the resource to be deleted when the type of the interruption information is a resource deletion type.
[0099] The resource recovery module 440 may be used to recover the second resource data corresponding to the resource identifier to be deleted stored in the temporary memory.
[0100] Therefore, in the embodiment of the present disclosure, interrupt information can be obtained through the control unit, and then when the type of the interrupt information is a resource allocation type, the corresponding first resource data is allocated to the cache memory, and then when the type of the interrupt information is a resource deletion type, the resource identifier to be deleted is obtained, and finally the second resource data corresponding to the resource identifier to be deleted stored in the temporary memory is recycled. In this way, resource allocation or resource recycling can be performed according to the type of interrupt information, thereby performing resource allocation and recycling in a timely manner, improving resource utilization, and enhancing processing performance.
[0101] In some embodiments of the present disclosure, the resource allocation type may include a unit resource allocation type and an index resource allocation type.
[0102] In some embodiments of the present disclosure, the cache memory may include a unit resource cache memory and an index resource cache memory, and the first resource data may include a first unit resource and a first index resource.
[0103] In some embodiments of the present disclosure, the resource allocation module 420 may specifically include a first allocation unit.
[0104] The first allocation unit may be configured to allocate the corresponding first unit resource to the unit resource cache memory when the type of the interrupt information is a unit resource allocation type.
[0105] In some embodiments of the present disclosure, the resource allocation module 420 may specifically include a second allocation unit.
[0106] The second allocation unit may be configured to allocate the corresponding first index resource to the index resource cache memory when the type of the interruption information is an index resource allocation type.
[0107] In some embodiments of the present disclosure, the temporary storage includes a unit resource temporary storage and an index resource temporary storage, and the second resource data includes a second unit resource and a second index resource.
[0108] In some embodiments of the present disclosure, the resource recovery module 440 may specifically include a resource access unit, a resource recovery unit and a resource deletion unit.
[0109] The resource access unit may be used to access the unit resource temporary storage and the index resource temporary storage according to the resource identifier to be deleted.
[0110] The resource recovery unit can be used to recover the second unit resource stored in the first data link of the unit resource temporary memory and the second index resource stored in the second data link of the index resource temporary memory.
[0111] The resource deletion unit can be used to delete the first data link and the second data link.
[0112] It should be noted that Figure 4 The resource allocation and recovery device 400 shown can execute Figures 1 to 3 The various steps in the method embodiment shown in the figure are implemented Figures 1 to 3 The various processes and effects in the method embodiment shown are not described in detail here.
[0113] Figure 5 A schematic diagram of the structure of a resource allocation and recovery device provided by an embodiment of the present disclosure is shown.
[0114] In some embodiments of the present disclosure, Figure 5 The resource allocation and recovery device shown may be an electronic device. For example, the electronic device may be a device including a DPU device card.
[0115] like Figure 5 As shown, the resource allocation and recovery device may include a processor 501 and a memory 502 storing computer program instructions.
[0116] Specifically, the processor 501 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0117] The memory 502 may include a large capacity memory for information or instructions. By way of example and not limitation, the memory 502 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 502 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 502 may be inside or outside the integrated gateway device. In a particular embodiment, the memory 502 is a non-volatile solid-state memory. In a particular embodiment, the memory 502 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (Electrically Erasable Programmable ROM, EEPROM), an electrically rewritable ROM (EAROM) or a flash memory, or a combination of two or more of these.
[0118] The processor 501 reads and executes the computer program instructions stored in the memory 502 to perform the steps of the resource allocation and recovery method provided in the embodiment of the present disclosure.
[0119] In one example, the resource allocation and recovery device may further include a transceiver 503 and a bus 504. Figure 5 As shown, the processor 501, the memory 502 and the transceiver 503 are connected via a bus 504 and communicate with each other.
[0120] The bus 504 includes hardware, software, or both. For example, but not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 504 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.
[0121] The embodiment of the present disclosure further provides a non-volatile computer-readable storage medium, which can store a computer program. When the computer program is executed by a processor, the processor implements the resource allocation and recovery method provided by the embodiment of the present disclosure.
[0122] The above-mentioned storage medium may, for example, include a memory 502 of computer program instructions, and the above-mentioned instructions may be executed by the processor 501 of the resource allocation and recovery device to complete the resource allocation and recovery method provided by the embodiment of the present disclosure. Optionally, the storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a ROM, a random access memory (Random Access Memory, RAM), a compact disc read-only memory (Compact Disc ROM, CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0123] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising" is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0124] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A resource allocation and recovery method, characterized in that: include: Obtain interrupt information through the control unit; When the type of the interrupt information is a resource allocation type, allocating corresponding first resource data to the cache memory; When the type of the interruption information is a resource deletion type, obtaining an identifier of a resource to be deleted; Reclaiming resources for the second resource data corresponding to the resource identifier to be deleted stored in the temporary storage device, wherein the resource allocation type includes a unit resource allocation type and an index resource allocation type, the cache storage device includes a unit resource cache storage device and an index resource cache storage device, the first resource data includes a first unit resource and a first index resource, the temporary storage device includes a unit resource temporary storage device and an index resource temporary storage device, and the second resource data includes a second unit resource and a second index resource; Wherein, when the type of the interrupt information is a resource allocation type, allocating corresponding first resource data to the cache memory includes: When the type of the interrupt information is the unit resource allocation type, allocating the corresponding first unit resource to the unit resource cache memory; Wherein, when the type of the interrupt information is a resource allocation type, allocating corresponding first resource data to the cache memory includes: When the type of the interruption information is the index resource allocation type, allocating the corresponding first index resource to the index resource cache memory; The step of reclaiming the second resource data corresponding to the resource identifier to be deleted stored in the temporary storage device includes: Access the unit resource temporary storage and the index resource temporary storage according to the to-be-deleted resource identifier; Reclaiming the second unit resource stored in the first data link of the unit resource temporary memory and the second index resource stored in the second data link of the index resource temporary memory; Delete the first data link and the second data link.
2. A resource allocation and recovery device, characterized in that: include: A first acquisition module, used for acquiring interruption information through a control unit; A resource allocation module, configured to allocate corresponding first resource data to a cache memory when the type of the interrupt information is a resource allocation type; A second acquisition module, used for acquiring an identifier of a resource to be deleted when the type of the interruption information is a resource deletion type; A resource recovery module, used for recovering the second resource data corresponding to the resource identifier to be deleted stored in the temporary storage device, wherein the resource allocation type includes a unit resource allocation type and an index resource allocation type, the cache storage device includes a unit resource cache storage device and an index resource cache storage device, the first resource data includes a first unit resource and a first index resource, the temporary storage device includes a unit resource temporary storage device and an index resource temporary storage device, and the second resource data includes a second unit resource and a second index resource; Wherein, the resource allocation module includes: A first allocation unit, configured to allocate the corresponding first unit resource to the unit resource cache memory when the type of the interrupt information is the unit resource allocation type; Wherein, the resource allocation module includes: A second allocation unit, configured to allocate the corresponding first index resource to the index resource cache memory when the type of the interruption information is the index resource allocation type; Wherein, the resource recovery module includes: A resource access unit, used for accessing the unit resource temporary storage and the index resource temporary storage according to the to-be-deleted resource identifier; A resource recovery unit, used for recovering the second unit resource stored in the first data link of the unit resource temporary memory and the second index resource stored in the second data link of the index resource temporary memory; A resource deletion unit is used to delete the first data link and the second data link.
3. A resource allocation and recovery device, characterized in that: include: processor; A memory for storing executable instructions; Wherein, the processor is used to read the executable instructions from the memory and execute the executable instructions to implement the resource allocation and recovery method described in claim 1 above.
4. A non-volatile computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the resource allocation and recovery method described in claim 1 above.
Citation Information
Patent Citations
Resource configuration method and device and computer architecture
CN113485789A