Method, apparatus, program product, storage medium, and electronic device for resource allocation

By obtaining the target application's runtime information, determining the second resource pool, and storing the target resources in the first resource pool, the problem of low resource allocation efficiency in the resource pool is solved, thereby improving the application's running speed and user experience.

CN122220104APending Publication Date: 2026-06-16VIRTAI TECH BEIJING CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
VIRTAI TECH BEIJING CO LTD
Filing Date
2026-04-10
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

In existing technologies, the low resource allocation efficiency of resource pools leads to slow application operation and reduces user experience.

Method used

By obtaining the runtime information of the target application, a second resource pool is determined, and the target resources are stored in the first resource pool to supplement the first resource pool, thereby improving resource allocation efficiency.

Benefits of technology

By supplementing the first resource pool with the second resource pool, the efficiency of resource allocation is improved, and the running speed of the application and the user experience are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122220104A_ABST
    Figure CN122220104A_ABST
Patent Text Reader

Abstract

The present disclosure relates to a resource allocation method, device, program product, storage medium and electronic device; an application resource requested by a target application is acquired; in a case where a first resource stored in a first resource pool is less than the application resource, a target resource is determined from a second resource stored in a second resource pool; the second resource pool is a backup resource pool of the first resource pool; the target resource is stored in the first resource pool; and the target application is allocated resources according to the first resource and the target resource in the first resource pool. Through the above technical solution, the first resource pool can be supplemented by the second resource of the second resource pool, the efficiency of resource allocation is improved, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of artificial intelligence technology, and more specifically, to a method, apparatus, program product, storage medium, and electronic device for resource allocation. Background Technology

[0002] With the development of artificial intelligence, a large number of related applications have emerged. These applications often use multi-round iterative training and prediction to improve prediction accuracy. However, due to factors such as code structure, developer skill level, or framework structure, some applications need to frequently request and release storage resources during multi-round iterations, which affects the performance of the application.

[0003] In related technologies, storage resources can be allocated to applications through resource pools. However, due to limitations in code structure or application type, the resource allocation efficiency of resource pools is relatively low, resulting in slow application operation and a degraded user experience. Summary of the Invention

[0004] The purpose of this disclosure is to provide a method, apparatus, program product, storage medium, and electronic device for resource allocation.

[0005] To achieve the above objectives, in a first aspect, this disclosure provides a method for resource allocation, the method comprising: Obtain the application resources requested by the target application; If it is determined that the first resource stored in the first resource pool is less than the application resource, the target resource is determined from the second resource stored in the second resource pool; the second resource pool is a backup resource pool for the first resource pool. Store the target resource into the first resource pool; Based on the first resource in the first resource pool and the target resource, allocate resources to the target application.

[0006] Optionally, the second resource pool is determined in the following way: Obtain the runtime information of the target application; Based on the operational information, the second resource pool is determined.

[0007] Optionally, determining the second resource pool based on the operational information includes: Obtain the storage resources occupied by the aforementioned runtime information; The second resource pool is determined based on the storage resources.

[0008] Optionally, determining the second resource pool based on the storage resources includes: Determine the number of times each piece of operational information appears within a preset time period; The storage resources corresponding to the running information whose occurrence frequency is greater than or equal to a preset threshold number are used as the storage resources of the second resource pool.

[0009] Optionally, storing the target resource into the first resource pool includes: The target resource is determined from a plurality of second resources in the second resource pool; The target resource is stored in the first resource pool.

[0010] Optionally, determining the target resource from a plurality of second resources in the second resource pool includes: Determine the resource size and the number of times each of the second resources is used; Based on the resource size, the second resource is written and written on the storage device according to the number of times the resource is used; Determine the number of successful write-write operations; The product of the number of successes and the size of the resource is taken as the target resource.

[0011] Optionally, determining the target resource from the second resources stored in the second resource pool when it is determined that the first resource stored in the first resource pool is less than the application resource includes: If it is determined that the first resource stored in the first resource pool is less than the application resource, the application resource is sent to the storage device; If it is determined that the third resource of the storage device is greater than or equal to the application resource, the second storage resource in the second resource pool is stored in the first resource pool.

[0012] Optionally, the method further includes: If it is determined that the third resource of the storage device is less than the application resource, a first resource to be deleted is determined from the first resources of the first resource pool; and the first resource to be deleted is deleted.

[0013] Optionally, determining the first resource to be deleted from the first resources in the first resource pool includes: Determine the usage frequency of each of the first resources; The first resource whose usage frequency is less than or equal to a preset frequency threshold is designated as the first resource to be deleted.

[0014] Secondly, this disclosure provides a resource allocation apparatus, the apparatus comprising: The acquisition module is used to acquire the application resources requested by the target application. The determination module is used to determine a target resource from the second resources stored in the second resource pool when it is determined that the first resource stored in the first resource pool is less than the application resource; the second resource pool is a backup resource pool of the first resource pool. The storage module is used to store the target resource into the first resource pool; The allocation module is used to allocate resources to the target application based on the first resource in the first resource pool and the target resource.

[0015] Optionally, the second resource pool is determined in the following way: Obtain the runtime information of the target application; Based on the operational information, the second resource pool is determined.

[0016] Optionally, determining the second resource pool based on the operational information includes: Obtain the storage resources occupied by the aforementioned runtime information; The second resource pool is determined based on the storage resources.

[0017] Optionally, determining the second resource pool based on the storage resources includes: Determine the number of times each piece of operational information appears within a preset time period; The storage resources corresponding to the running information whose occurrence frequency is greater than or equal to a preset threshold number are used as the storage resources of the second resource pool.

[0018] Optionally, the storage module is configured to determine the target resource from a plurality of second resources in the second resource pool and store the target resource into the first resource pool.

[0019] Optionally, the storage module is configured to determine the resource size and resource usage count of each of the second resources; perform write-write operations on the storage device according to the resource size and the resource usage count; determine the number of successful write-write operations; and use the product of the number of successful operations and the resource size as the target resource.

[0020] Optionally, the determining module is configured to send the application resource to the storage device if it is determined that the first resource stored in the first resource pool is less than the application resource; and to store the second storage resource in the second resource pool into the first resource pool if it is determined that the third resource in the storage device is greater than or equal to the application resource.

[0021] Optionally, the determining module is configured to, when determining that the third resource of the storage device is less than the application resource, determine a first resource to be deleted from the first resources of the first resource pool; and delete the first resource to be deleted.

[0022] Optionally, the determining module is used to determine the usage frequency of each of the first resources; and to designate the first resources whose usage frequency is less than or equal to a preset frequency threshold as the first resources to be deleted.

[0023] Thirdly, this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the resource allocation method described in the first aspect above.

[0024] Fourthly, this disclosure provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the resource allocation method described in the first aspect above.

[0025] Fifthly, this disclosure provides an electronic device, comprising: A memory on which computer programs are stored; A processor for executing the computer program in the memory to implement the steps of the resource allocation method described in the first aspect above.

[0026] The above technical solution allows the second resource pool to supplement the first resource pool, avoiding the need for the first resource pool to compensate, thus improving the efficiency of resource allocation and enhancing the user experience.

[0027] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description

[0028] The accompanying drawings are provided to further illustrate the present disclosure and form part of the specification. They are used together with the following detailed description to explain the present disclosure, but do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart illustrating a method for resource allocation according to an exemplary embodiment.

[0029] Figure 2 It is based on Figure 1 The exemplary embodiment illustrates a flowchart of a resource allocation method.

[0030] Figure 3 This is a flowchart illustrating another method of resource allocation according to an exemplary embodiment.

[0031] Figure 4This is a block diagram illustrating a resource allocation apparatus according to an exemplary embodiment.

[0032] Figure 5 This is a block diagram illustrating a resource allocation system according to an exemplary embodiment.

[0033] Figure 6 This is a block diagram illustrating an electronic device according to an exemplary embodiment.

[0034] Figure 7 This is a block diagram illustrating another electronic device according to an exemplary embodiment. Detailed Implementation

[0035] The specific embodiments of this disclosure will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit this disclosure.

[0036] First, the application scenario of this disclosure is introduced, which is applied in the context of application resource allocation. With the development of artificial intelligence, a large number of related applications have emerged. These applications often use multi-round iterative training and prediction to improve prediction accuracy. However, due to factors such as code structure, developer skill level, or framework structure, some applications need to frequently request and release storage resources during multi-round iterations, which affects the performance of the application.

[0037] In related technologies, storage resources can be allocated to applications through resource pools. However, due to limitations in code structure or application type, the resource allocation efficiency of resource pools is relatively low, resulting in slow application operation and a degraded user experience.

[0038] To address the aforementioned issues, this disclosure provides a method, apparatus, program product, storage medium, and electronic device for resource allocation; it obtains application resources requested by a target application; when it is determined that the first resource stored in a first resource pool is less than the application resource, it determines a target resource from the second resources stored in a second resource pool; the second resource pool serves as a backup resource pool for the first resource pool; it stores the target resource in the first resource pool; and it allocates resources to the target application based on the first resource in the first resource pool and the target resource. Through this technical solution, the first resource pool can be supplemented by the second resource in the second resource pool, improving the efficiency of resource allocation and enhancing the user experience.

[0039] Figure 1 This is a flowchart illustrating a resource allocation method according to an exemplary embodiment. Figure 2 As shown, the method may include the following steps.

[0040] S101. Obtain the application resources requested by the target application.

[0041] For example, the target application could be an application that includes artificial intelligence capabilities. The application resource could be the storage resource requested by the target application; the storage resource could include its size.

[0042] In some embodiments, upon receiving a resource allocation request from the target application, the application resources corresponding to the resource allocation request can be obtained.

[0043] S102. If it is determined that the first resource stored in the first resource pool is less than the application resource, the target resource is determined from the second resource stored in the second resource pool.

[0044] The second resource pool serves as a backup resource pool for the first resource pool.

[0045] For example, if it is determined that the size of the first resource is smaller than the size of the application resource, the target resource can be determined from the second resources stored in the second resource pool. In this way, it can be determined whether the first resource pool contains a first resource corresponding to the size of the application resource based on the resource size.

[0046] In some embodiments, the second resource pool can be determined by: obtaining the runtime information of the target application; and determining the second resource pool based on the runtime information. For example, the runtime information may be a sequence of resource operations of the target application, which may be records generated by the target application during its operation of requesting and releasing storage resources. The second resource pool may be a virtual storage device.

[0047] In other embodiments, determining the second resource pool based on the operational information may include: acquiring the storage resources occupied by the operational information; and determining the second resource pool based on the storage resources. For example, each piece of operational information may include one or more of the following: the size of the storage resource, the number of times the resource is used, the request time, and the release time; this is not limited here. The storage resources corresponding to the operational information can be determined based on the resource size and the number of times the resource is used. Thus, a second resource pool can be determined based on the storage resources, thereby supplementing the storage resources of the first resource pool.

[0048] In some embodiments, determining the second resource pool based on the storage resource may include: determining the number of times each piece of running information appears within a preset time period; and using the storage resource corresponding to the running information whose number of appearances is greater than or equal to a preset threshold as the storage resource of the second resource pool.

[0049] For example, the preset time period can be determined based on the runtime of the target application. For instance, it could be the time period between the application's startup time and the current time; this is not limited here. The preset frequency threshold can be set by the user; this is not limited here either. Since frequently occurring runtime information is used more often, the runtime information can be filtered using the above method, and the storage resources corresponding to the more frequently used runtime information can be stored in the second resource pool as storage resources for the second resource pool.

[0050] Alternatively, in other embodiments, a preset detection algorithm can be used to determine the target running information from multiple running information sources; and the storage resources corresponding to the target running information can be used as the storage resources of the second resource pool. For example, the preset detection algorithm can be an extreme value detection method and a statistical analysis method. For instance, the resource operation sequence between two minimum values ​​can be used as an iteration sequence, and then a statistical analysis method can be used to identify the resource operation sequences that are repeatedly used in multiple iterations, and the storage resources corresponding to these resource operation sequences can be used as the storage resources of the second resource pool.

[0051] It should be noted that storage resources corresponding to runtime information that occurs less than the preset threshold number can be excluded from the second resource pool. Since storage resources with fewer occurrences are used less frequently, they do not need to be stored in the second resource pool, thus reducing the resource consumption of the second resource pool.

[0052] S103. Store the target resource into the first resource pool.

[0053] S104. Allocate resources to the target application based on the first resource in the first resource pool and the target resource.

[0054] In some embodiments, allocating resources to the target application based on the first resource in the first resource pool and the target resource may include: determining a storage resource of the same size as the application resource from the first resource in the first resource pool and the target resource; and allocating the storage resource to the target application. This allows for the determination of a storage resource of the same size as the application resource from the adjusted first resource pool and its allocation to the target application, improving resource allocation efficiency, thereby increasing application speed and enhancing user experience.

[0055] In other embodiments, if it is determined that the first resource stored in the first resource pool is greater than or equal to the application resource, resources can be allocated to the target application based on the first resource in the first resource pool. For example, a storage resource of the same size as the application resource can be determined from the first resource; this storage resource can then be allocated to the target application. In this way, storage resources can be directly allocated to the target application from the first resource pool, improving work efficiency.

[0056] The above technical solution allows the second resource pool to supplement the first resource pool, improving the efficiency of resource allocation and enhancing the user experience.

[0057] Figure 2 It is based on Figure 1 An exemplary embodiment illustrates a flowchart of a resource allocation method. For example... Figure 2 As shown, the above S103 may include: S1031. Determine the target resource from among the multiple second resources in the second resource pool.

[0058] S1032, Store the target resource into the first resource pool.

[0059] In some embodiments, determining the target resource from a plurality of second resources in the second resource pool may include: determining the resource size and the number of times the resource is used for each second resource; performing write-write operations on the second resource on the storage device according to the resource size and the number of times the resource is used; determining the number of successful write-write operations; and using the product of the number of successful operations and the resource size as the target resource.

[0060] For example, the storage device can be a physical storage device, such as display memory, memory, controller, processor (CPU), graphics processor (GPU), etc., without limitation.

[0061] For example, suppose the second resource is 1MB in size and is used 10 times. The 1MB second resource can be used for 10 write-write operations on the storage device. If 8 of these write-write operations are successful, the product of the 1MB resource size and the 8 usage times (i.e., 8MB) is taken as the target resource, and this 8MB target resource is stored in the first resource pool. This allows for the verification of the second resource, and the verified second resource is stored in the first resource pool, thereby improving the utilization efficiency of the first resource pool.

[0062] In other embodiments, the number of write / write operation failures can be determined; and the second resource corresponding to the number of failures can be used as the runtime information of the target application. In this way, new runtime information can be continuously determined during operation, and the second resource pool can be identified based on this new runtime information.

[0063] In some embodiments, S102 may include: if it is determined that the first resource stored in the first resource pool is less than the application resource, sending the application resource to the storage device; if it is determined that the third resource of the storage device is greater than or equal to the application resource, storing the second storage resource in the second resource pool into the first resource pool. This allows for adjustment of the first resource pool when it is determined that the storage device has idle resources, improving work efficiency.

[0064] In other embodiments, the method may further include: if it is determined that the third resource of the storage device is smaller than the application resource, determining a first resource to be deleted from the first resources of the first resource pool; and deleting the first resource to be deleted. In this way, a portion of the first resources in the first resource pool can be deleted, thereby freeing up resource space of the corresponding resource size in the storage device, thus enabling resource allocation.

[0065] In other embodiments, determining the first resource to be deleted from the first resources of the first resource pool includes: determining the usage frequency of each first resource; and selecting the first resource whose usage frequency is less than or equal to a preset frequency threshold as the first resource to be deleted. For example, the preset frequency threshold can be set by the user and is not limited here. Alternatively, in some embodiments, a preset eviction algorithm can be used to determine the first resource to be deleted from the first resources of the first resource pool. For example, the preset eviction algorithm can be an LRU (Least Recently Used) algorithm. This allows determining the first resource to be deleted based on usage frequency, freeing up storage device resource space while improving work efficiency.

[0066] Figure 3 This is a flowchart illustrating another method of resource allocation according to an exemplary embodiment. For example... Figure 3 As shown, the method may include the following steps.

[0067] S301. Obtain the application resources requested by the target application.

[0068] S302. Determine whether the first resource stored in the first resource pool is less than the application resource.

[0069] If it is determined that the first resource stored in the first resource pool is less than the application resource, proceed to steps S304-307. If it is determined that the first resource stored in the first resource pool is greater than or equal to the application resource, step S303 is executed.

[0070] S303. From the first resource in the first resource pool, determine a storage resource of the same size as the application resource.

[0071] S304. Determine whether the third resource of the storage device is greater than or equal to the application resource.

[0072] If it is determined that the third resource of the storage device is greater than or equal to the application resource, proceed to steps S305-307; If it is determined that the third resource of the storage device is less than the application resource, step S309 is executed.

[0073] S305. Determine the target resource from among the multiple second resources in the second resource pool.

[0074] S306. Store the target resource into the first resource pool.

[0075] S307. Determine a storage resource of the same size as the application resource from the first resource and the target resource in the first resource pool.

[0076] S308. Allocate the storage resource to the target application.

[0077] S309. Determine the first resource to be deleted from the first resource in the first resource pool; and delete the first resource to be deleted.

[0078] The above technical solution allows the second resource pool to supplement the first resource pool, improving the efficiency of resource allocation and enhancing the user experience.

[0079] Figure 4 This is a block diagram illustrating a resource allocation apparatus according to an exemplary embodiment. Figure 4 As shown, the device 400 may include an acquisition module 410, a determination module 420, a storage module 430, and an allocation module 440; The acquisition module 410 is used to acquire the application resources requested by the target application. The determining module 420 is used to determine a target resource from the second resources stored in the second resource pool when it is determined that the first resource stored in the first resource pool is less than the application resource; the second resource pool is a backup resource pool for the first resource pool. The storage module 430 is used to store the target resource into the first resource pool; The allocation module 440 is used to allocate resources to the target application based on the first resource in the first resource pool and the target resource.

[0080] The above technical solution allows the second resource pool to supplement the first resource pool, improving the efficiency of resource allocation and enhancing the user experience.

[0081] Optionally, the second resource pool is determined in the following way: Obtain the runtime information of the target application; Based on this operational information, the second resource pool is determined.

[0082] Optionally, based on the operational information, the second resource pool is determined to include: Obtain the storage resources used by this runtime information; Based on this storage resource, the second resource pool is determined.

[0083] Optionally, the second resource pool, determined based on the storage resource, includes: Determine the number of times each piece of information appears within a preset time period; The storage resources corresponding to the running information whose occurrence frequency is greater than or equal to a preset threshold number are used as the storage resources of the second resource pool.

[0084] Optionally, the storage module 430 is used to determine the target resource from a plurality of second resources in the second resource pool and store the target resource into the first resource pool.

[0085] Optionally, the storage module 430 is used to determine the resource size and the number of times the resource is used for each of the second resources; according to the resource size, to perform write and write operations on the storage device according to the number of times the resource is used; to determine the number of successful write and write operations; and to use the product of the number of successful operations and the resource size as the target resource.

[0086] Optionally, the determining module 420 is configured to send the application resource to the storage device when it is determined that the first resource stored in the first resource pool is less than the application resource; and to store the second storage resource in the second resource pool into the first resource pool when it is determined that the third resource in the storage device is greater than or equal to the application resource.

[0087] Optionally, the determining module 420 is configured to determine a first resource to be deleted from the first resources of the first resource pool when it is determined that the third resource of the storage device is less than the application resource; and delete the first resource to be deleted.

[0088] Optionally, the determining module 420 is used to determine the usage frequency of each of the first resources; and to designate the first resources whose usage frequency is less than or equal to a preset frequency threshold as the first resources to be deleted.

[0089] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0090] Figure 5 This is a block diagram illustrating a resource allocation system according to an exemplary embodiment. For example... Figure 5 As shown, the system 500 may include a virtual device 510 and a storage device 520. The virtual device 510 may include a detection module 511, a second resource pool 512, a verification module 513, a first resource pool 514, and an elimination module 515. The detection module 511 is connected to the second resource pool 512; the second resource pool 512 is connected to the verification module 513; the verification module 513 is connected to both the first resource pool 514 and the storage device 520; and the first resource pool 514 is connected to both the elimination module 515 and the storage device 520.

[0091] The detection module 511 can be used to detect the running information of the target application, and store the storage resources corresponding to the detected running information into the second resource pool 512 as storage resources of the second resource pool 512. Specifically, the detection module 511 can determine the number of times each piece of running information appears within a preset time period; and the storage resources corresponding to running information whose appearance frequency is greater than or equal to a preset threshold number are used as storage resources of the second resource pool 512.

[0092] The verification module 513 can be used to verify the second resources in the second resource pool 512, so as to use the verified second resources as target resources; and store the target resources in the first resource pool 514. Specifically, the verification module 513 can determine the resource size and usage count of each second resource in the second resource pool 512; based on the resource size, perform write-write operations on the storage device 520 according to the resource usage count; determine the number of successful write-write operations; multiply the number of successful operations by the resource size as the target resource; and store the target resource in the first resource pool 514.

[0093] The first resource pool 514 can be used to allocate application resources according to the target application's request, determine storage resources of the same size as the application resources from the first resources and the target resources in the first resource pool, and allocate the storage resources to the target application.

[0094] The elimination module 515 can be used to eliminate some of the first resources in the first resource pool 514. Specifically, the elimination module 515 can determine the usage frequency of each of the first resources in the first resource pool 514; identify the first resources whose usage frequency is less than or equal to a preset frequency threshold as first resources to be deleted; and delete the first resources to be deleted.

[0095] The above technical solution allows the second resource pool to supplement the first resource pool, improving the efficiency of resource allocation and enhancing the user experience.

[0096] In summary, this disclosure provides a method, apparatus, program product, storage medium, and electronic device for resource allocation; it obtains application resources requested by a target application; when it is determined that the first resource stored in a first resource pool is less than the application resource, it determines the target resource from the second resource stored in a second resource pool; the second resource pool serves as a backup resource pool for the first resource pool; it stores the target resource in the first resource pool; and it allocates resources to the target application based on the first resource in the first resource pool and the target resource. Through the above technical solution, the first resource pool can be supplemented by the second resource in the second resource pool, thereby improving the efficiency of resource allocation and enhancing the user experience.

[0097] Figure 6 This is a block diagram illustrating an electronic device 600 according to an exemplary embodiment. For example... Figure 6 As shown, the electronic device 600 may include a processor 601 and a memory 602. The electronic device 600 may also include one or more of a multimedia component 603, an input / output interface 604, and a communication component 605.

[0098] The processor 601 controls the overall operation of the electronic device 600 to complete all or part of the steps in the resource allocation method described above. The memory 602 stores various types of data to support the operation of the electronic device 600. This data may include, for example, instructions for any application or method operating on the electronic device 600, and application-related data such as contact data, sent and received messages, pictures, audio, video, etc. The memory 602 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The multimedia component 603 may include a screen and audio components. The screen may be, for example, a touchscreen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in memory 602 or transmitted via communication component 605. The audio component also includes at least one speaker for outputting audio signals. I / O interface 604 provides an interface between processor 601 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual or physical buttons. Communication component 605 is used for wired or wireless communication between the electronic device 600 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IoT, eMTC, or other 5G technologies, or combinations thereof, is not limited here. Therefore, the corresponding communication component 605 may include: a Wi-Fi module, a Bluetooth module, an NFC module, etc.

[0099] In an exemplary embodiment, the electronic device 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the resource allocation method described above.

[0100] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, which, when executed by a processor, implement the steps of the resource allocation method described above. For example, the computer-readable storage medium may be the memory 602 including the program instructions described above, which may be executed by the processor 601 of the electronic device 600 to complete the resource allocation method described above.

[0101] Figure 7 This is a block diagram illustrating another electronic device 700 according to an exemplary embodiment. For example, the electronic device 700 may be provided as a server. (Refer to...) Figure 7 The electronic device 700 includes a processor 722, which may be one or more, and a memory 732 for storing computer programs executable by the processor 722. The computer program stored in the memory 732 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processor 722 may be configured to execute the computer program to perform the resource allocation method described above.

[0102] Additionally, the electronic device 700 may also include a power supply component 726 and a communication component 750. The power supply component 726 can be configured to perform power management of the electronic device 700, and the communication component 750 can be configured to enable communication of the electronic device 700, such as wired or wireless communication. Furthermore, the electronic device 700 may also include an input / output interface 758. The electronic device 700 can operate on an operating system stored in a memory 732.

[0103] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, which, when executed by a processor, implement the steps of the resource allocation method described above. For example, the non-transitory computer-readable storage medium may be the memory 732 including the program instructions described above, which may be executed by the processor 722 of the electronic device 700 to complete the resource allocation method described above.

[0104] In another exemplary embodiment, a computer program product is also provided, the computer program product comprising a computer program executable by a programmable device, the computer program having a code portion for performing the above-described resource allocation method when executed by the programmable device.

[0105] The preferred embodiments of this disclosure have been described in detail above with reference to the accompanying drawings. However, this disclosure is not limited to the specific details of the above embodiments. Within the scope of the technical concept of this disclosure, various simple modifications can be made to the technical solutions of this disclosure, and these simple modifications all fall within the protection scope of this disclosure.

[0106] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, this disclosure will not describe the various possible combinations separately.

[0107] Furthermore, various different embodiments of this disclosure can be combined in any way, as long as they do not violate the spirit of this disclosure, they should also be regarded as the content disclosed in this disclosure.

Claims

1. A method for resource allocation, characterized in that, The method includes: Obtain the application resources requested by the target application; If it is determined that the first resource stored in the first resource pool is less than the application resource, the target resource is determined from the second resource stored in the second resource pool; the second resource pool is a backup resource pool for the first resource pool. Store the target resource into the first resource pool; Based on the first resource in the first resource pool and the target resource, allocate resources to the target application.

2. The method according to claim 1, characterized in that, The second resource pool is determined in the following way: Obtain the runtime information of the target application; Based on the operational information, the second resource pool is determined.

3. The method according to claim 2, characterized in that, The step of determining the second resource pool based on the operational information includes: Obtain the storage resources occupied by the aforementioned runtime information; The second resource pool is determined based on the storage resources.

4. The method according to claim 3, characterized in that, Determining the second resource pool based on the storage resources includes: Determine the number of times each piece of operational information appears within a preset time period; The storage resources corresponding to the running information whose occurrence frequency is greater than or equal to a preset threshold number are used as the storage resources of the second resource pool.

5. The method according to claim 1, characterized in that, The step of storing the target resource into the first resource pool includes: The target resource is determined from a plurality of second resources in the second resource pool; The target resource is stored in the first resource pool.

6. The method according to claim 5, characterized in that, Determining the target resource from a plurality of second resources in the second resource pool includes: Determine the resource size and the number of times each of the second resources is used; Based on the resource size, the second resource is written and written on the storage device according to the number of times the resource is used; Determine the number of successful write-write operations; The product of the number of successes and the size of the resource is taken as the target resource.

7. The method according to claim 1, characterized in that, The step of determining the target resource from the second resources stored in the second resource pool when it is determined that the first resource stored in the first resource pool is less than the application resource includes: If it is determined that the first resource stored in the first resource pool is less than the application resource, the application resource is sent to the storage device; If it is determined that the third resource of the storage device is greater than or equal to the application resource, the second storage resource in the second resource pool is stored in the first resource pool.

8. The method according to claim 7, characterized in that, The method further includes: If it is determined that the third resource of the storage device is less than the application resource, a first resource to be deleted is determined from the first resources of the first resource pool; and the first resource to be deleted is deleted.

9. The method according to claim 8, characterized in that, The step of determining the first resource to be deleted from the first resources in the first resource pool includes: Determine the usage frequency of each of the first resources; The first resource whose usage frequency is less than or equal to a preset frequency threshold is designated as the first resource to be deleted.

10. A resource allocation apparatus, characterized in that, The device includes: The acquisition module is used to acquire the application resources requested by the target application. The determination module is used to determine a target resource from the second resources stored in the second resource pool when it is determined that the first resource stored in the first resource pool is less than the application resource; the second resource pool is a backup resource pool of the first resource pool. The storage module is used to store the target resource into the first resource pool; The allocation module is used to allocate resources to the target application based on the first resource in the first resource pool and the target resource.

11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-9.

12. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the method described in any one of claims 1-9.

13. An electronic device, characterized in that, include: A memory on which computer programs are stored; A processor for executing the computer program in the memory to implement the steps of the method according to any one of claims 1-9.