Storage resource adjustment method and device, electronic equipment and storage medium

By automatically acquiring and calculating cloud desktop storage resource data and adjusting the resource quantity in real time, the problem of time-consuming and labor-intensive manual determination of storage resource quantity is solved, achieving efficient and accurate resource adjustment and reducing costs.

CN116126246BActive Publication Date: 2025-11-04SHENZHEN WEIKE SOFTWARE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310091029.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-28
Publication Date
2025-11-04
Estimated Expiration
2043-01-28

AI Technical Summary

Technical Problem

Manually determining the number of storage resources on cloud desktop servers is time-consuming and has low accuracy, resulting in high costs and time consumption for adjusting storage resources. Existing technologies cannot adjust them in real time.

Method used

By automatically acquiring existing and planned storage resource data, calculating resource adjustment amounts in real time, including the difference between released and buffered resources and the total difference, the amount of resource adjustment is determined, thus achieving automatic adjustment of storage resources.

Benefits of technology

It improves the accuracy and speed of storage resource adjustment, reduces manpower and time costs, and reduces the cost of resource acquisition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116126246B_ABST
    Figure CN116126246B_ABST
Patent Text Reader

Abstract

The application discloses a kind of storage resource adjustment method, device, electronic equipment and storage medium, the method includes: obtaining existing storage resource data and predetermined storage resource data, based on existing storage resource data and predetermined storage resource data determine resource adjustment amount, according to resource adjustment amount storage resource adjustment.It is that the technical scheme of the present application, can automatically obtain existing storage resource data and predetermined storage resource data, without artificial determination predetermined storage resource data, then based on existing storage resource data and predetermined storage resource data real-time, accurately determine resource adjustment amount, improve the accuracy and speed of determining resource adjustment amount, shorten the determination time of resource adjustment amount, can faster storage resource adjustment according to resource adjustment amount, to improve the accuracy and speed of storage resource adjustment, reduce the time of storage resource adjustment.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to computer technology, and particularly relate to a storage resource adjustment method and device, an electronic device and a storage medium. BACKGROUND

[0002] When a user uses a cloud desktop, the cloud desktop needs the storage resource of a server to support operation.

[0003] At present, the number of storage resources of a server to be reserved is determined by an artificial according to the use of the cloud desktop, and then the server manufacturer reserves the storage resources of the server required by the cloud desktop to be run according to the number of storage resources of the server to be reserved.

[0004] However, the number of storage resources of the server to be reserved cannot be determined by the artificial in real time, which consumes a long time and leads to low accuracy of the number of storage resources of the server to be determined, and further, the accuracy of the artificial to adjust the storage resources of the server is low, which consumes additional time cost and labor cost, and the cost of obtaining the storage resources of the server is also high. SUMMARY

[0005] Embodiments of the present application provide a storage resource adjustment method and device, an electronic device and a storage medium, which can improve the accuracy and speed of storage resource adjustment, reduce the time of storage resource adjustment, reduce the labor cost and time cost consumed by storage resource adjustment, and also reduce the cost of obtaining the storage resources.

[0006] In a first aspect, embodiments of the present application provide a storage resource adjustment method, and the method comprises:

[0007] obtaining existing storage resource data and predetermined storage resource data;

[0008] determining a resource adjustment amount based on the existing storage resource data and the predetermined storage resource data;

[0009] performing storage resource adjustment according to the resource adjustment amount.

[0010] In a second aspect, embodiments of the present application provide a storage resource adjustment device, and the device comprises:

[0011] a data acquisition module configured to obtain existing storage resource data and predetermined storage resource data;

[0012] a resource adjustment amount determination module configured to determine a resource adjustment amount based on the existing storage resource data and the predetermined storage resource data;

[0013] a storage resource adjustment module configured to perform storage resource adjustment according to the resource adjustment amount.

[0014] In a third aspect, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the storage resource adjustment method according to any of the embodiments of the present application when executing the program.

[0015] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program, and the program is executable on a processor to implement the storage resource adjustment method according to any of the embodiments of the present application.

[0016] In the embodiments of the present application, the existing storage resource data and the predetermined storage resource data are acquired, the resource adjustment amount is determined based on the existing storage resource data and the predetermined storage resource data, and the storage resource adjustment is performed according to the resource adjustment amount. That is, the technical solution of the present application can automatically acquire the existing storage resource data and the predetermined storage resource data, without manually determining the predetermined storage resource data, and then determine the resource adjustment amount in real time and accurately based on the existing storage resource data and the predetermined storage resource data, thereby improving the accuracy and speed of determining the resource adjustment amount, shortening the determination time of the resource adjustment amount, and enabling the storage resource adjustment to be performed more quickly according to the resource adjustment amount, thereby improving the accuracy and speed of the storage resource adjustment, reducing the time of the storage resource adjustment, reducing the labor cost and time cost consumed by the storage resource adjustment, and also reducing the acquisition cost of the storage resource. The problem that the accuracy of the determined resource adjustment amount (for example, the amount of storage resources collected by the storage resource collection platform) is low due to the inability of manual determination of the predetermined server resource number or the returned server resource number is solved. BRIEF DESCRIPTION OF DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be considered as a limitation to the scope. For those skilled in the art, other related drawings can also be obtained without creative labor.

[0018] Figure 1 is a flowchart of the storage resource adjustment method provided by the embodiments of the present application;

[0019] Figure 2 is a schematic diagram of the storage resource adjustment method provided by the embodiments of the present application;

[0020] Figure 3 is another flowchart of the storage resource adjustment method provided by the embodiments of the present application;

[0021] Figure 4 is another schematic diagram of the storage resource adjustment method provided by the embodiments of the present application;

[0022] Figure 5 is a structural schematic diagram of a storage resource adjustment device provided by an embodiment of the present application;

[0023] Figure 6 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0024] The present application will be further described below in conjunction with the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application. In addition, it should be noted that, for the convenience of description, only the parts related to the present application are shown in the drawings, but not all the structures.

[0025] Figure 1 is a flowchart of a storage resource adjustment method provided by an embodiment of the present application. The method can be executed by a storage resource adjustment device provided by an embodiment of the present application. The device can be realized in the form of software and / or hardware. In a specific embodiment, the device can be integrated in an electronic device, which can be a computer or a server. The following embodiments will be described by taking the device integrated in the electronic device as an example. Referring to Figure 1 , the method can specifically include the following steps:

[0026] Step 101, obtaining existing storage resource data and predetermined storage resource data.

[0027] The storage resource can be obtained from a storage resource acquisition platform. The existing storage resource data can be understood as the data of all the storage resources that can actually be used. The existing storage resource data can include a released resource amount and an existing resource total amount. The released resource amount can be understood as the released storage resource that has been used up. The existing resource total amount can be understood as the total amount of all the storage resources of the storage resource acquisition platform. The predetermined storage resource data can be understood as the data of the storage resource predetermined to the storage resource acquisition platform. The predetermined storage resource data can include a buffer resource amount, a predetermined resource total amount and a temporarily increased resource amount. As shown in Figure 2 , the buffer resource amount can be obtained by customizing the storage resource amount of the storage resource acquisition platform. The predetermined resource total amount can be obtained by reporting the total amount of storage resources to the storage resource acquisition platform in advance by the storage resource user. The temporarily increased resource amount can be obtained by temporarily increasing the amount of storage resources in the process of using the storage resources by the storage resource user.

[0028] In an alternative embodiment, the existing storage resource data can be obtained from the storage resource acquisition platform. Before using the cloud desktop, the required storage resource of each cloud desktop can be obtained, and then the total amount of the required storage resource of each cloud desktop is calculated to obtain the predetermined storage resource.

[0029] For example, the storage resource acquisition platform can be a server acquisition platform (e.g., a server lease platform), the existing storage resource data can be data of existing storage resources that can be acquired from the server lease platform; before using the cloud desktop, the amount of storage resources required by each cloud desktop can be acquired, and then the total amount of storage resources required by the cloud desktops is calculated to obtain the predetermined storage resources.

[0030] In step 102, the resource adjustment amount is determined based on the existing storage resource data and the predetermined storage resource data.

[0031] The resource adjustment amount can be understood as an adjustment number of storage resources, and can include the amount of storage resources that need to be added to the storage resource acquisition platform / the amount of storage resources that need to be withdrawn from the storage resource acquisition platform.

[0032] In an optional embodiment, the released resource amount and the buffer resource amount are subtracted to obtain a first adjustment amount; a second adjustment amount is determined according to the existing total resource amount, the predetermined total resource amount, the released resource amount, and the temporarily increased resource amount; and the resource adjustment amount is determined based on the first adjustment amount and the second adjustment amount. The first adjustment amount can be understood as a resource amount difference between the released resource amount and the buffer resource amount; and the second adjustment amount can be understood as an adjustment number of storage resources determined according to the existing total resource amount, the predetermined total resource amount, the released resource amount, and the temporarily increased resource amount. The first adjustment amount can be understood as a resource difference between the released resource amount and the buffer resource amount; and the second adjustment amount can be understood as an adjustment amount of storage resources determined according to the existing total resource amount, the predetermined total resource amount, the released resource amount, and the temporarily increased resource amount.

[0033] For example, if the predetermined total resource amount is 1000G, the buffer resource amount is 200G, the existing total resource amount is 800G, the released resource amount is 800G, and the temporarily increased resource amount is 100G, the released resource amount and the buffer resource amount are subtracted to obtain a first adjustment amount of -200G; a second adjustment amount of 600G is determined according to the existing total resource amount, the predetermined total resource amount, the released resource amount, and the temporarily increased resource amount; and the resource adjustment amount is determined based on the first adjustment amount and the second adjustment amount.

[0034] In step 103, the storage resources are adjusted according to the resource adjustment amount.

[0035] In an optional embodiment, the storage resource adjustment can be performed according to the type of the resource adjustment amount and the resource adjustment amount. The type of the resource adjustment amount can include an expansion amount or a contraction amount. The expansion amount can be understood as a negative resource adjustment amount, and the contraction amount can be understood as a positive resource adjustment amount. When it is determined that the resource adjustment amount is positive, it is determined that the type of the resource adjustment amount is the contraction amount, and the storage resource is reduced by the same amount as the resource adjustment amount based on the predetermined total amount of resources. When it is determined that the resource adjustment amount is negative, it is determined that the type of the resource adjustment amount is the expansion amount, and the storage resource is increased by the same amount as the absolute value of the resource adjustment amount.

[0036] For example, if the resource adjustment amount is 200G, it is determined that the resource adjustment amount is positive, and the type of the resource adjustment amount is the contraction amount. The resource adjustment amount can be sent to the storage resource acquisition platform, so that the storage resource acquisition platform reduces 200G of storage resource based on the predetermined total amount of resources.

[0037] In this embodiment, the existing storage resource data and the predetermined storage resource data can be automatically acquired, and the predetermined storage resource data does not need to be manually determined. Then, the resource adjustment amount is determined in real time and accurately based on the existing storage resource data and the predetermined storage resource data, the accuracy and speed of determining the resource adjustment amount are improved, the determination time of the resource adjustment amount is shortened, the storage resource adjustment can be performed faster according to the resource adjustment amount, the accuracy and speed of the storage resource adjustment are improved, the time of the storage resource adjustment is reduced, the human cost and time cost consumed by the storage resource adjustment are reduced, the acquisition cost of the storage resource is also reduced, and the problem that the accuracy of the determined resource adjustment amount (for example, the amount of storage resource returned by the storage resource acquisition platform) is low because the predetermined server resource number or the returned server resource number cannot be determined in real time by manual operation is solved.

[0038] The storage resource adjustment method provided by the embodiment of the application will be further described below. As shown in Figure 3 Figure 3 is another flowchart of the storage resource adjustment method provided by the embodiment of the application, which can specifically include the following steps:

[0039] In step 201, the existing storage resource data and the predetermined storage resource data are acquired.

[0040] Optionally, before the existing storage resource data and the predetermined storage resource data are acquired, the existing total amount of resources and the released resource amount in the existing storage resource data can be calculated in advance, as shown in Figure 4

[0041] In step 202, the released resource amount and the buffer resource amount are subtracted to obtain a first adjustment amount.

[0042] ​​Specifically, in actual application, in order to have the buffer resource as the standby storage resource at any time, it is necessary to ensure that the size of the buffer resource amount remains unchanged at any time, and therefore the storage resource of the same size as the buffer resource amount in the released resource can be used as the buffer resource. Then, in order to avoid a high acquisition cost due to the remaining storage resource in the unused state, the storage resource in the unused state in the released resource needs to be released. In this process, two cases can occur. The first case is that the released resource amount does not exceed the buffer resource amount, at which time it is indicated that the usable released resource amount cannot guarantee that the buffer resource amount remains unchanged, and the storage resource needs to be increased. The second case is that the released resource amount exceeds the buffer resource amount, at which time it is indicated that the usable released resource amount is sufficient to guarantee that the buffer resource amount remains unchanged, and there is also the storage resource in the unused state, and therefore the storage resource in the unused state needs to be returned. That is, as shown in Figure 4 , the released resource amount and the buffer resource amount are subtracted to obtain a first adjustment amount.

[0043] For example, if the released resource amount is 100G and the buffer resource amount is 200G, the released resource amount and the buffer resource amount are subtracted to obtain a first adjustment amount of -100G, at which time the released resource amount is insufficient to guarantee that the buffer resource amount remains unchanged, and the storage resource of 100G needs to be increased.

[0044] For another example, if the released resource amount is 300G and the buffer resource amount is 200G, the released resource amount and the buffer resource amount are subtracted to obtain a first adjustment amount of 100G, at which time the released resource amount is sufficient to guarantee that the buffer resource amount remains unchanged, and there is also the storage resource of 100G in the unused state, and therefore the storage resource of 100G in the unused state needs to be returned.

[0045] In step 203, a second adjustment amount is determined according to the total amount of existing resources, the total amount of predetermined resources, the released resource amount, and the temporarily increased resource amount.

[0046] In an optional embodiment, as shown in Figure 4 , after the first adjustment amount is obtained, the total amount of existing resources and the total amount of predetermined resources are subtracted to obtain a first resource difference value, and the released resource amount and the temporarily increased resource amount are subtracted to obtain a second resource difference value. Then, the second adjustment amount is determined based on the first resource difference value and the second resource difference value.

[0047] The first resource difference value can be understood as the resource difference value of the total amount of existing resources and the total amount of predetermined resources, and the second resource difference value can be understood as the resource difference value of the released resource amount and the temporarily increased resource amount.

[0048] Specifically, when the first resource difference and the second resource difference are both not zero, the larger one of the first resource difference and the second resource difference is determined as the second adjustment amount; when any one of the first resource difference and the second resource difference is zero, the non-zero one of the first resource difference and the second resource difference is determined as the second adjustment amount.

[0049] For example, if the existing total resource amount is 800G, the predetermined total resource amount is 1000G, the released resource amount is 800G, and the temporarily increased resource amount is 100G, the first resource difference is obtained by subtracting the existing total resource amount from the predetermined total resource amount, which is -200G, and the second resource difference is obtained by subtracting the released resource amount from the temporarily increased resource amount, which is 700G; it is determined that the first resource difference and the second resource difference are both not zero, and the larger one (700G) of the first resource difference and the second resource difference is determined as the second adjustment amount.

[0050] For example, if the existing total resource amount is 1000G, the predetermined total resource amount is 1000G, the released resource amount is 800G, and the temporarily increased resource amount is 100G, the first resource difference is obtained by subtracting the existing total resource amount from the predetermined total resource amount, which is 0G, and the second resource difference is obtained by subtracting the released resource amount from the temporarily increased resource amount, which is 700G; it is determined that the first resource difference is zero, and the second resource difference 700G is determined as the second adjustment amount.

[0051] In step 204, the resource adjustment amount is determined based on the first adjustment amount and the second adjustment amount.

[0052] In an optional embodiment, as shown in FIG. 2B, the type of the first adjustment amount and the type of the second adjustment amount are determined; and the resource adjustment amount is determined according to the first adjustment amount, the type of the first adjustment amount, the second adjustment amount, and the type of the second adjustment amount. Figure 4

[0053] For example, the type of the first adjustment amount can include an expansion amount or a contraction amount; and the type of the second adjustment amount can include an expansion amount or a contraction amount.

[0054] ​Specifically, when the first adjustment is of type shrinking capacity and the second adjustment is of type expanding capacity, or when the first adjustment is of type expanding capacity and the second adjustment is of type shrinking capacity, in order to ensure sufficient storage resource utilization as much as possible, the adjustment of type expanding capacity can be determined as the resource adjustment amount. When both the first and second adjustment are of type expanding capacity, in order to ensure sufficient storage resource utilization as much as possible, the first and second adjustment amounts can be summed to obtain the maximum resource adjustment amount. When both the first and second adjustment are of type shrinking capacity, in order to avoid excessive storage resource return as much as possible, the smaller of the first and second adjustment amounts can be determined as the resource adjustment amount.

[0055] For example, if the first adjustment amount is -300G and the second adjustment amount is 200G, it can be determined that the type of the first adjustment amount is capacity expansion and the type of the second adjustment amount is capacity reduction. The adjustment amount of type expansion (-300G) is determined as the resource adjustment amount. If the first adjustment amount is 300G and the second adjustment amount is -200G, it can be determined that the type of the first adjustment amount is capacity reduction and the type of the second adjustment amount is capacity expansion. The adjustment amount of type expansion (-200G) is determined as the resource adjustment amount.

[0056] For another example, if the first adjustment amount is -300G and the second adjustment amount is -200G, it can be determined that the type of the first adjustment amount and the type of the second adjustment amount are both capacity expansion. Summing the first adjustment amount and the second adjustment amount, we get the resource adjustment amount as -500G.

[0057] For example, if the first adjustment amount is 300G and the second adjustment amount is 200G, it can be determined that the type of the first adjustment amount and the type of the second adjustment amount are both capacity reduction, and the smaller of the first adjustment amount and the second adjustment amount (200G) is determined as the resource adjustment amount.

[0058] Step 205: Determine whether the type of resource adjustment is capacity reduction or capacity expansion. If the type of resource adjustment is capacity reduction, proceed to step 206; if the type of resource adjustment is capacity expansion, proceed to step 207.

[0059] The types of resource adjustments can include expanding or shrinking capacity.

[0060] In one alternative implementation, the type of resource adjustment amount can be determined based on whether the resource adjustment amount is positive or negative. That is, for example... Figure 4 As shown, when the resource adjustment amount is negative, the type of resource adjustment amount can be determined as capacity expansion; when the resource adjustment amount is positive, the type of resource adjustment amount can be determined as capacity reduction. Then, the resource adjustment amount is fed back to the storage resource acquisition platform, so that the storage resource acquisition platform can expand / shrink the storage resources according to the resource adjustment amount.

[0061] In step 206, the storage resource return information is generated according to the resource adjustment amount, and the storage resource return information is fed back to the storage resource acquisition platform, so that the storage resource acquisition platform withdraws the same amount of existing storage resources as the resource adjustment amount.

[0062] The storage resource return information can be understood as release information of the storage resource sent to the storage resource acquisition platform.

[0063] For example, if the resource adjustment amount is 200G, the storage resource acquisition platform is a server rental platform, and the server rental platform needs to withdraw 200G of storage resources, the storage resource return information including the resource adjustment amount 200G can be generated, and the storage resource return information is fed back to the server rental platform, so that the server rental platform withdraws 200G of existing storage resources.

[0064] In step 207, the storage resource addition information is generated according to the resource adjustment amount, and the storage resource addition information is fed back to the storage resource acquisition platform, so that the storage resource acquisition platform adds the same amount of new storage resources as the absolute value of the resource adjustment amount.

[0065] The storage resource addition information can be understood as data information of the added storage resource.

[0066] For example, if the resource adjustment amount is -200G, the storage resource acquisition platform is a server rental platform, and the server rental platform needs to add 200G of storage resources, the storage resource addition information including the resource adjustment amount -200G can be generated, and the storage resource addition information is fed back to the server rental platform, so that the server rental platform adds 200G of new storage resources.

[0067] In this embodiment, the existing storage resource data and the predetermined storage resource data can be automatically obtained, and the predetermined storage resource data does not need to be manually determined. Then, the resource adjustment amount is determined in real time and accurately based on the existing storage resource data and the predetermined storage resource data, the accuracy and speed of determining the resource adjustment amount are improved, the determination time of the resource adjustment amount is shortened, the storage resource adjustment can be faster according to the resource adjustment amount, the accuracy and speed of the storage resource adjustment are further improved, the time of the storage resource adjustment is reduced, the human cost and time cost consumed by the storage resource adjustment are reduced, the acquisition cost of the storage resource is also reduced, and the problem that the accuracy of the determined resource adjustment amount (for example, the amount of storage resources withdrawn by the storage resource acquisition platform) is low due to the inability of manual to determine the predetermined server resource number or the returned server resource number in real time is solved.

[0068] Figure 5is a structural schematic diagram of a storage resource adjustment device provided by an embodiment of the present application, and the device is applicable to performing a storage resource adjustment method provided by the embodiment of the present application. As shown in the figure, the device can specifically include: Figure 5

[0069] a data acquisition module 401, configured to acquire existing storage resource data and predetermined storage resource data;

[0070] a resource adjustment amount determination module 402, configured to determine a resource adjustment amount based on the existing storage resource data and the predetermined storage resource data;

[0071] a storage resource adjustment module 403, configured to perform storage resource adjustment according to the resource adjustment amount.

[0072] Optionally, the existing storage resource data includes a released resource amount and an existing resource total amount, and the predetermined storage resource data includes a buffer resource amount, a predetermined resource total amount and a temporary increase resource amount. The resource adjustment amount determination module 402 is specifically configured to:

[0073] obtain a first adjustment amount by subtracting the buffer resource amount from the released resource amount;

[0074] determine a second adjustment amount according to the existing resource total amount, the predetermined resource total amount, the released resource amount and the temporary increase resource amount;

[0075] determine the resource adjustment amount based on the first adjustment amount and the second adjustment amount.

[0076] Optionally, the resource adjustment amount determination module 402 determines the second adjustment amount according to the existing resource total amount, the predetermined resource total amount, the released resource amount and the temporary increase resource amount, and the method includes:

[0077] obtaining a first resource difference value by subtracting the predetermined resource total amount from the existing resource total amount;

[0078] obtaining a second resource difference value by subtracting the temporary increase resource amount from the released resource amount;

[0079] determining the second adjustment amount based on the first resource difference value and the second resource difference value.

[0080] Optionally, the resource adjustment amount determination module 402 determines the second adjustment amount based on the first resource difference value and the second resource difference value, and the method includes:

[0081] when the first resource difference value and the second resource difference value are both not zero, determining the larger one of the first resource difference value and the second resource difference value as the second adjustment amount;

[0082] ​When any one of the first resource difference and the second resource difference is zero, the non-zero one of the first resource difference and the second resource difference is determined as the second adjustment amount.

[0083] Optionally, the resource adjustment amount determination module 402 determines the resource adjustment amount based on the first adjustment amount and the second adjustment amount, including:

[0084] determining the type of the first adjustment amount and determining the type of the second adjustment amount;

[0085] determining the resource adjustment amount according to the first adjustment amount, the type of the first adjustment amount, the second adjustment amount and the type of the second adjustment amount.

[0086] Optionally, the type of the first adjustment amount includes an expansion amount or a contraction amount, the type of the second adjustment amount includes an expansion amount or a contraction amount, and the resource adjustment amount determination module 402 determines the resource adjustment amount according to the first adjustment amount, the type of the first adjustment amount, the second adjustment amount and the type of the second adjustment amount, including:

[0087] when the type of the first adjustment amount is the contraction amount and the type of the second adjustment amount is the expansion amount, or when the type of the first adjustment amount is the expansion amount and the type of the second adjustment amount is the contraction amount, determining the adjustment amount of the expansion type as the resource adjustment amount;

[0088] when the type of the first adjustment amount and the type of the second adjustment amount are both the expansion amount, summing the first adjustment amount and the second adjustment amount to obtain the resource adjustment amount;

[0089] when the type of the first adjustment amount and the type of the second adjustment amount are both the contraction amount, determining the smaller one of the first adjustment amount and the second adjustment amount as the resource adjustment amount.

[0090] Optionally, the type of the resource adjustment amount includes an expansion amount or a contraction amount, and the storage resource adjustment module 403 is specifically configured to:

[0091] when the type of the resource adjustment amount is the contraction amount, generating storage resource return information according to the resource adjustment amount, and feeding back the storage resource return information to a storage resource acquisition platform, so that the storage resource acquisition platform withdraws the same number of existing storage resources as the resource adjustment amount;

[0092] When the type of the resource adjustment amount is the expansion amount, storage resource addition information is generated according to the resource adjustment amount, and the storage resource addition information is fed back to the storage resource acquisition platform, so that the storage resource acquisition platform adds a same number of new storage resources as the absolute value of the resource adjustment amount.

[0093] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional modules is exemplified, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the above described functions. The specific working process of the above described functional modules can refer to the corresponding process in the foregoing method embodiments, which will not be described here.

[0094] The device of the embodiment can automatically acquire existing storage resource data and predetermined storage resource data, without manually determining the predetermined storage resource data, and then determine the resource adjustment amount in real time and accurately based on the existing storage resource data and the predetermined storage resource data, thereby improving the accuracy and speed of determining the resource adjustment amount, shortening the determination time of the resource adjustment amount, and more quickly adjusting the storage resource according to the resource adjustment amount, thereby improving the accuracy and speed of the storage resource adjustment, reducing the time of the storage resource adjustment, reducing the human cost and time cost consumed by the storage resource adjustment, and also reducing the acquisition cost of the storage resource, and solving the problem that manual determination of the predetermined server resource number or the returned server resource number cannot be determined in real time, resulting in low accuracy of the determined resource adjustment amount (for example, the amount of storage resources returned by the storage resource acquisition platform).

[0095] The embodiment of the application further provides an electronic device, including a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements the storage resource adjustment method provided in any of the above embodiments when executing the program.

[0096] The embodiment of the application further provides a computer readable medium having a computer program stored thereon, and the program is executed by a processor to implement the storage resource adjustment method provided in any of the above embodiments.

[0097] Reference will be made to the following description Figure 6 which shows a structural schematic diagram of a computer system 500 suitable for implementing the electronic device of the embodiment of the application. Figure 6 The electronic device shown is only an example, and should not impose any limitation on the functions and use range of the embodiment of the application.

[0098] As Figure 6As shown, the computer system 500 includes a central processing unit (CPU) 501 which can perform various appropriate actions and processes in accordance with programs stored in a read only memory (ROM) 502 or loaded from a storage section 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the computer system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0099] Connected to the I / O interface 505 are an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a display such as a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as necessary. A removable recording medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is attached to the drive 510 as necessary, so that a computer program read therefrom is installed into the storage section 508 as necessary.

[0100] In particular, the processes described above with reference to the flowcharts can be implemented as a computer software program in accordance with the embodiments disclosed herein. For example, the embodiments disclosed herein include a computer program product comprising a computer program carried on a computer readable medium, the computer program comprising program code for performing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via the communication section 509 and / or installed from the removable recording medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-described functions defined in the system of the present application are performed.

[0101] It should be noted that the computer-readable medium shown in the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or component. In the present application, the computer-readable signal medium can include a data signal carried in a baseband or as a part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take various forms, including but not limited to an electromagnetic signal, an optical signal or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, which can send, propagate or transmit a program for use by or in conjunction with an instruction execution system, device or component. The program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0102] The flowcharts and block diagrams in the drawings illustrate the possible implementation architectures, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowcharts or block diagrams can represent a module, a program segment, or a portion of code that contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in different orders than that shown in the figures. For example, two blocks that are shown in succession can actually be executed substantially concurrently, or they can sometimes be executed in reverse order, depending on the functionality involved. It should also be noted that each block in the block diagrams or flowcharts, and combinations of blocks in the block diagrams or flowcharts, can be implemented by a dedicated hardware-based system that performs specified functions or operations, or can be implemented by a combination of special-purpose hardware and computer instructions.

[0103] The modules and / or units described in the embodiments of the present application can be implemented by software, or by hardware, or by a combination of software and hardware. The described modules and / or units can be arranged in a processor, for example, can be described as a processor includes a data acquisition module, a resource adjustment amount determination module and a storage resource adjustment module. In some cases, the names of these modules do not constitute a limitation on the modules themselves.

[0104] As another aspect, the present application also provides a computer readable medium, which can be included in the device described in the above embodiments, or can exist independently without being assembled into the device. The computer readable medium carries one or more programs, when the one or more programs are executed by the device, the device includes:

[0105] Obtaining existing storage resource data and predetermined storage resource data, determining the resource adjustment amount based on the existing storage resource data and the predetermined storage resource data, and adjusting the storage resource according to the resource adjustment amount.

[0106] According to the technical solution of the present embodiment, the existing storage resource data and the predetermined storage resource data can be automatically obtained, without manually determining the predetermined storage resource data. Then, the resource adjustment amount can be determined in real time and accurately based on the existing storage resource data and the predetermined storage resource data, which improves the accuracy and speed of determining the resource adjustment amount, shortens the determination time of the resource adjustment amount, and enables faster storage resource adjustment according to the resource adjustment amount, thereby improving the accuracy and speed of storage resource adjustment, reducing the time of storage resource adjustment, reducing the labor cost and time cost of storage resource adjustment, and reducing the cost of obtaining storage resource. The problem that the accuracy of the determined resource adjustment amount (for example, the amount of storage resource collected by the storage resource collection platform) is low due to the inability of manual determination of the predetermined server resource number or the returned server resource number is solved.

[0107] The above detailed description does not constitute a limitation on the scope of protection of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made depending on design requirements and other factors. Any modification, equivalent replacement and improvement within the spirit and principles of the present application should be included in the scope of protection of the present application.

Claims

1. A method for adjusting storage resources, characterized in that, The method comprises: acquiring existing storage resource data and predetermined storage resource data; determining a resource adjustment amount based on the existing storage resource data and the predetermined storage resource data; adjusting storage resources according to the resource adjustment amount; wherein the existing storage resource data comprises a released resource amount and an existing resource total amount, and the predetermined storage resource data comprises a buffer resource amount, a predetermined resource total amount, and a temporarily increased resource amount; the determination of the resource adjustment amount based on the existing storage resource data and the predetermined storage resource data comprises: obtaining a first adjustment amount by subtracting the buffer resource amount from the released resource amount; determining a second adjustment amount according to the existing resource total amount, the predetermined resource total amount, the released resource amount, and the temporarily increased resource amount; determining the type of the first adjustment amount and determining the type of the second adjustment amount, wherein the type of the first adjustment amount comprises an expansion amount or a contraction amount, and the type of the second adjustment amount comprises an expansion amount or a contraction amount; when the type of the first adjustment amount is the contraction amount and the type of the second adjustment amount is the expansion amount, or when the type of the first adjustment amount is the expansion amount and the type of the second adjustment amount is the contraction amount, determining an adjustment amount of the expansion type as the resource adjustment amount; when the type of the first adjustment amount and the type of the second adjustment amount are both the expansion amount, summing the first adjustment amount and the second adjustment amount to obtain the resource adjustment amount; when the type of the first adjustment amount and the type of the second adjustment amount are both the contraction amount, determining the smaller one of the first adjustment amount and the second adjustment amount as the resource adjustment amount.

2. The method of claim 1, wherein, the determination of the second adjustment amount according to the existing resource total amount, the predetermined resource total amount, the released resource amount, and the temporarily increased resource amount comprises: obtaining a first resource difference value by subtracting the predetermined resource total amount from the existing resource total amount; obtaining a second resource difference value by subtracting the temporarily increased resource amount from the released resource amount; determining the second adjustment amount based on the first resource difference value and the second resource difference value.

3. The method of claim 2, wherein, the determination of the second adjustment amount based on the first resource difference value and the second resource difference value comprises: when both the first resource difference value and the second resource difference value are not zero, determining the larger one of the first resource difference value and the second resource difference value as the second adjustment amount; when any one of the first resource difference value and the second resource difference value is zero, determining the non-zero one of the first resource difference value and the second resource difference value as the second adjustment amount.

4. The method of claim 1, wherein, the type of the resource adjustment amount comprises an expansion amount or a contraction amount, and the adjustment of the storage resources according to the resource adjustment amount comprises: when the type of the resource adjustment amount is the contraction amount, generating storage resource return information according to the resource adjustment amount, and feeding back the storage resource return information to a storage resource acquisition platform, so that the storage resource acquisition platform recovers an existing storage resource in an amount same as the resource adjustment amount; When the type of the resource adjustment amount is the expansion amount, storage resource addition information is generated according to the resource adjustment amount, and the storage resource addition information is fed back to the storage resource acquisition platform, so that the storage resource acquisition platform adds the same number of new storage resources as the absolute value of the resource adjustment amount.

5. A storage resource adjustment apparatus characterized by comprising: The device comprises: a data acquisition module configured to acquire existing storage resource data and predetermined storage resource data; a resource adjustment amount determination module configured to determine a resource adjustment amount based on the existing storage resource data and the predetermined storage resource data; a storage resource adjustment module configured to adjust storage resources according to the resource adjustment amount; wherein the existing storage resource data comprises a released resource amount and an existing resource total amount, and the predetermined storage resource data comprises a buffer resource amount, a predetermined resource total amount, and a temporarily increased resource amount; the resource adjustment amount determination module is specifically configured to: obtain a first adjustment amount by subtracting the buffer resource amount from the released resource amount; determine a second adjustment amount according to the existing resource total amount, the predetermined resource total amount, the released resource amount, and the temporarily increased resource amount; determine the type of the first adjustment amount and the type of the second adjustment amount, wherein the type of the first adjustment amount comprises an expansion amount or a contraction amount, and the type of the second adjustment amount comprises an expansion amount or a contraction amount; when the type of the first adjustment amount is the contraction amount and the type of the second adjustment amount is the expansion amount, or when the type of the first adjustment amount is the expansion amount and the type of the second adjustment amount is the contraction amount, determine an adjustment amount of the expansion type as the resource adjustment amount; when the type of the first adjustment amount and the type of the second adjustment amount are both the expansion amount, sum the first adjustment amount and the second adjustment amount to obtain the resource adjustment amount; when the type of the first adjustment amount and the type of the second adjustment amount are both the contraction amount, determine the smaller one of the first adjustment amount and the second adjustment amount as the resource adjustment amount.

6. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to implement the storage resource adjustment method of any one of claims 1 to 4.

7. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the storage resource adjustment method of any one of claims 1 to 4.

Citation Information

Patent Citations

  • Resource adjustment method and device, electronic equipment and computer readable storage medium

    CN113904940A