Dynamic scheduling method and device for object storage, equipment and storage medium
By dynamically calculating the backup policy weight of object storage and combining client and website security levels and capacity information, the problem of difficult balance between cost and security in object storage technology is solved, achieving both security and cost satisfaction.
Patent Information
- Application Number
- CN202311550797.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-20
- Publication Date
- 2024-10-22
AI Technical Summary
Existing object storage technology is difficult to find a balance between meeting enterprise business security needs and controlling costs. Multi-copy redundant backup has high security but high cost, while erasure code redundant backup has low cost but high probability of data loss.
By receiving the security level of the user's resource storage request and the website security level, and combining it with the real-time capacity information of the object storage, it dynamically calculates the weight of the double copy backup and erasure code backup strategy, determines the target backup strategy, and enables the object storage server to operate according to the target strategy. Perform data storage and backup.
It achieves dynamic scheduling of redundant backup technology while ensuring enterprise business security requirements, reducing object storage costs, and the backup strategy selection is more in line with actual conditions.
Smart Images

Figure CN118819946A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of object storage technology, and in particular to a dynamic scheduling method, device, equipment and storage medium for object storage. Background Art
[0002] With the rapid development of the Internet, network users have an increasing demand for streaming services such as audio and video, and the object storage costs of related enterprises are also very high. At present, object storage vendors mainly provide two redundant backup strategies, multi-copy backup and erasure code backup, for enterprise users who use object storage to choose from. The multi-copy redundant backup strategy is more secure, but when storing the same data, enterprise users need to purchase more object storage capacity, which is more expensive; the erasure code redundant backup strategy is less expensive, but the probability of data loss is greater. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide a dynamic scheduling method, device, equipment and storage medium for object storage, which dynamically schedules two redundant backup technologies, namely erasure code backup and double copy backup, according to the security level of the user-side resource storage request, the website security level and the capacity information of the object storage, so as to achieve the purpose of meeting the security requirements of the enterprise business while controlling costs.
[0004] In order to achieve the above object, an embodiment of the present invention provides a dynamic scheduling method for object storage, including:
[0005] Receive a resource storage request sent by a user terminal, and obtain a request security level corresponding to the resource storage request;
[0006] Get website security level and real-time capacity information of object storage;
[0007] Calculate the weight of the dual-copy backup strategy and the weight of the erasure code backup strategy according to the request security level, the website security level, and the real-time capacity information;
[0008] According to the weight of the dual-copy backup strategy and the weight of the erasure code backup strategy, a target backup strategy is determined, so that the object storage server stores and backs up data according to the target backup strategy.
[0009] As an improvement of the above solution, the weight of the double copy backup strategy and the weight of the erasure code backup strategy are calculated according to the request security level, the website security level and the real-time capacity information, specifically including:
[0010] Determine a first dual replica coefficient and a first erasure code coefficient according to the requested security level;
[0011] Determining a second dual replica coefficient and a second erasure code coefficient according to the website security level;
[0012] Calculating a weight of the dual-copy backup strategy according to the real-time capacity information, the first dual-copy coefficient, and the second dual-copy coefficient;
[0013] A weight of the erasure code backup strategy is calculated according to the real-time capacity information, the first erasure code coefficient, and the second erasure code coefficient.
[0014] As an improvement of the above solution, the weight of the dual-copy backup strategy is calculated according to the real-time capacity information, the first dual-copy coefficient, and the second dual-copy coefficient, specifically including:
[0015] The weight of the dual-copy backup strategy is calculated according to the current remaining space ratio of the object storage in the real-time capacity information, the first dual-copy coefficient, and the second dual-copy coefficient; wherein the calculation formula of the weight of the dual-copy backup strategy is:
[0016] The weight of the dual-copy backup strategy = the current remaining space ratio of the object storage * (the first dual-copy coefficient + the second dual-copy coefficient).
[0017] As an improvement of the above solution, calculating the weight of the erasure code backup strategy according to the real-time capacity information, the first erasure code coefficient, and the second erasure code coefficient specifically includes:
[0018] The weight of the erasure code backup strategy is calculated according to the current used space ratio of the object storage in the real-time capacity information, the first erasure code coefficient, and the second erasure code coefficient; wherein the calculation formula of the weight of the erasure code backup strategy is:
[0019] The weight of the erasure code backup strategy = the current used space ratio of the object storage * (first erasure code coefficient + second erasure code coefficient).
[0020] As an improvement of the above solution, determining the target backup strategy according to the weight of the dual-copy backup strategy and the weight of the erasure code backup strategy specifically includes:
[0021] If the weight of the dual-copy backup strategy is greater than the weight of the erasure code backup strategy, the dual-copy backup strategy is used as the target backup strategy;
[0022] If the weight of the dual-copy backup strategy is equal to the weight of the erasure code backup strategy, then the erasure code backup strategy is used as the target backup strategy;
[0023] If the weight of the dual-copy backup strategy is less than the weight of the erasure code backup strategy, the erasure code backup strategy is used as the target backup strategy.
[0024] As an improvement of the above scheme, the first dual copy coefficient is proportional to the requested security level, and the first erasure code coefficient is inversely proportional to the requested security level; at the same requested security level, the sum of the first dual copy coefficient and the first erasure code coefficient is equal to 1.
[0025] As an improvement of the above scheme, the second dual-copy coefficient is proportional to the website security level, and the second erasure code coefficient is inversely proportional to the website security level; at the same website security level, the sum of the second dual-copy coefficient and the second erasure code coefficient is equal to 1.
[0026] The embodiment of the present invention further provides a dynamic scheduling device for object storage, including:
[0027] A receiving module, used to receive a resource storage request sent by a user terminal, and obtain a request security level corresponding to the resource storage request;
[0028] The acquisition module is used to obtain the website security level and real-time capacity information of the object storage;
[0029] A calculation module, configured to calculate a weight of a dual-copy backup strategy and a weight of an erasure code backup strategy according to the request security level, the website security level, and the real-time capacity information;
[0030] The scheduling module is used to determine the target backup strategy according to the weight of the dual-copy backup strategy and the weight of the erasure code backup strategy, so that the object storage server stores and backs up data according to the target backup strategy.
[0031] An embodiment of the present invention also provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the dynamic scheduling method of object storage described in any one of the above when executing the computer program.
[0032] An embodiment of the present invention further provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned methods for dynamically scheduling object storage.
[0033] Compared with the prior art, the beneficial effects of a dynamic scheduling method, device, equipment and storage medium for object storage provided by the embodiment of the present invention are: by receiving a resource storage request sent by a user end, and obtaining the request security level corresponding to the resource storage request; obtaining the website security level and the real-time capacity information of the object storage; according to the request security level, the website security level and the real-time capacity information, calculating the weight of the double copy backup strategy and the weight of the erasure code backup strategy; according to the weight of the double copy backup strategy and the weight of the erasure code backup strategy, determining the target backup strategy, so that the object storage server stores and backs up data according to the target backup strategy. The embodiment of the present invention dynamically schedules the two redundant backup technologies of erasure code backup and double copy backup according to the security level of the resource storage request of the user end, the website security level and the capacity information of the object storage, so as to achieve the purpose of meeting the security requirements of the enterprise business and controlling the cost at the same time. In addition, the security level corresponding to the request itself and the global security level of the website can be actively configured, and different security levels give different weight coefficients to the two redundant backup technologies, so that the selection of the backup technology strategy can achieve the purpose of overall controllability. By taking the real-time object storage space usage as a key part of the decision algorithm, the redundant backup technology ultimately decided is more in line with the actual situation. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is a flow chart of a preferred embodiment of a dynamic scheduling method for object storage provided by the present invention;
[0035] Figure 2 It is a timing diagram of a preferred embodiment of a dynamic scheduling method for object storage provided by the present invention;
[0036] Figure 3 It is a structural schematic diagram of a preferred embodiment of a dynamic scheduling device for object storage provided by the present invention;
[0037] Figure 4 It is a structural schematic diagram of a preferred embodiment of a terminal device provided by the present invention. DETAILED DESCRIPTION
[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] See also Figure 1 , Figure 1The following is a flow chart of a preferred embodiment of a dynamic scheduling method for object storage provided by the present invention. The dynamic scheduling method for object storage includes:
[0040] S1, receiving a resource storage request sent by a user terminal, and obtaining a request security level corresponding to the resource storage request;
[0041] S2, obtains the website security level and real-time capacity information of object storage;
[0042] S3, calculating the weight of the dual-copy backup strategy and the weight of the erasure code backup strategy according to the request security level, the website security level, and the real-time capacity information;
[0043] S4: Determine a target backup strategy according to the weight of the dual-copy backup strategy and the weight of the erasure code backup strategy, so that the object storage server stores and backs up data according to the target backup strategy.
[0044] Specifically, the dynamic scheduling method of object storage provided by the embodiment of the present invention is applied to the website side, and the website receives the resource storage request sent by the user end, and queries the security level corresponding to the request through the user information attached to the resource storage request. For example, if the current request belongs to the key data storage of large enterprise users, government unit users, and high-paying users, the request security level is higher; conversely, if the current user belongs to the general data storage of free individual users, the request security level is lower. The website administrator adjusts the data security level and data storage efficiency of the website itself in accordance with its actual needs. For example, the website security level needs to be increased during sensitive periods, and the storage efficiency is reduced accordingly; when the data storage demand is large but the key data is small, the website security level can be reduced to improve the storage efficiency. The website sends a request to the object storage service provider (i.e., the object storage server) to obtain the real-time capacity usage, i.e., the real-time capacity information, and the object storage service provider returns the real-time capacity information of the object storage package purchased by the website to the website. According to the request security level, the website security level, and the real-time capacity information, the weight of the double copy backup strategy and the weight of the erasure code backup strategy are calculated. According to the weight of the dual-copy backup strategy and the weight of the erasure code backup strategy, a target backup strategy is determined, and the target backup strategy is sent to the object storage server, so that the object storage server stores and backs up data according to the target backup strategy.
[0045] In order to solve the problem that when enterprises use object storage services provided by third-party manufacturers, the embodiments of the present invention combine the actual needs of the business, flexibly schedule and select the most appropriate storage backup strategy based on two redundant backup technologies, namely erasure coding and dual copies, so as to meet the security requirements required by the business and reduce the cost of object storage.
[0046] In another preferred embodiment, the weight of the double copy backup strategy and the weight of the erasure code backup strategy are calculated according to the request security level, the website security level and the real-time capacity information, specifically including:
[0047] Determine a first dual replica coefficient and a first erasure code coefficient according to the requested security level;
[0048] Determining a second dual replica coefficient and a second erasure code coefficient according to the website security level;
[0049] Calculating a weight of the dual-copy backup strategy according to the real-time capacity information, the first dual-copy coefficient, and the second dual-copy coefficient;
[0050] A weight of the erasure code backup strategy is calculated according to the real-time capacity information, the first erasure code coefficient, and the second erasure code coefficient.
[0051] Specifically, when calculating the weight of the dual-copy backup strategy and the weight of the erasure code backup strategy, the embodiment of the present invention first determines the first dual-copy coefficient and the first erasure code coefficient of the request itself according to the request security level corresponding to the resource storage request sent by the user end; and determines the second dual-copy coefficient and the second erasure code coefficient of the website globally according to the website security level. Then, according to the real-time capacity information of the object storage, the first dual-copy coefficient and the second dual-copy coefficient, the weight of the dual-copy backup strategy is calculated. According to the real-time capacity information of the object storage, the first erasure code coefficient and the second erasure code coefficient, the weight of the erasure code backup strategy is calculated.
[0052] It should be noted that in the embodiment of the present invention, the first dual replica coefficient is proportional to the requested security level, and the first erasure code coefficient is inversely proportional to the requested security level; at the same requested security level, the sum of the first dual replica coefficient and the first erasure code coefficient is equal to 1, as shown in Table 1 below.
[0053] User requested security level Double copy coefficient Erasure Code Coefficient 1 1 0 2 0.75 0.25 3 0.5 0.5 4 0.25 0.75
[0054] Table 1 User request security level corresponding to double copy, erasure code coefficient table
[0055] Among them, the security level of user requests from 1 to 4 indicates that the security requirements are gradually reduced. The security level of 1 indicates that the security requirements are very high, which is a critical data request for critical users. The security level of 2 indicates that the security requirements are relatively high, which is a non-critical data request for critical users or a critical data request for non-critical users. The security level of 3 indicates that the security requirements are general, which is non-critical data for non-critical users. The security level of 4 indicates that the security requirements are low, which is a temporary file. The higher the security requirements, the greater the double copy coefficient, and the safer the data storage; when the security requirements are low, the erasure code coefficient is higher, the storage efficiency is higher, and the cost is lower.
[0056] The second double copy coefficient is proportional to the website security level, and the second erasure code coefficient is inversely proportional to the website security level; under the same website security level, the sum of the second double copy coefficient and the second erasure code coefficient is equal to 1, as shown in Table 2 below.
[0057] Global security level of the website Double copy coefficient Erasure Code Coefficient 1 1 0 2 0.75 0.25 3 0.5 0.5 4 0.25 0.75
[0058] Table 2. Double copy and erasure code coefficient table corresponding to the global security level of the website
[0059] Among them, the global security level of the website ranges from 1 to 4, indicating that the security requirements are gradually reduced. It is configured by the website administrator according to actual needs. For example, during special sensitive periods, periods with high data failure rates, and periods of object storage service version updates, the global security level of the website needs to be set to a higher level. At this time, the dual copy coefficient is higher, and more dual copy strategies are adopted to improve the security of data storage. The daily security level can be reduced accordingly. At this time, the erasure code coefficient is higher, which can improve the efficiency of data storage and reduce costs.
[0060] In another preferred embodiment, the calculating the weight of the dual-copy backup strategy according to the real-time capacity information, the first dual-copy coefficient, and the second dual-copy coefficient specifically includes:
[0061] The weight of the dual-copy backup strategy is calculated according to the current remaining space ratio of the object storage in the real-time capacity information, the first dual-copy coefficient, and the second dual-copy coefficient; wherein the calculation formula of the weight of the dual-copy backup strategy is:
[0062] The weight of the dual-copy backup strategy = the current remaining space ratio of the object storage * (the first dual-copy coefficient + the second dual-copy coefficient).
[0063] In another preferred embodiment, calculating the weight of the erasure code backup strategy according to the real-time capacity information, the first erasure code coefficient, and the second erasure code coefficient specifically includes:
[0064] The weight of the erasure code backup strategy is calculated according to the current used space ratio of the object storage in the real-time capacity information, the first erasure code coefficient, and the second erasure code coefficient; wherein the calculation formula of the weight of the erasure code backup strategy is:
[0065] The weight of the erasure code backup strategy = the current used space ratio of the object storage * (first erasure code coefficient + second erasure code coefficient).
[0066] Specifically, the embodiment of the present invention calculates the weight of the dual copy backup strategy according to the current remaining space ratio of the object storage in the real-time capacity information, the first dual copy coefficient, and the second dual copy coefficient; wherein the calculation formula of the weight of the dual copy backup strategy is:
[0067] The weight of the dual-copy backup strategy = the current remaining space ratio of the object storage * (the first dual-copy coefficient + the second dual-copy coefficient).
[0068] The weight of the erasure code backup strategy is calculated according to the current used space ratio of the object storage in the real-time capacity information, the first erasure code coefficient, and the second erasure code coefficient. The calculation formula of the weight of the erasure code backup strategy is:
[0069] The weight of the erasure code backup strategy = the current used space ratio of the object storage * (first erasure code coefficient + second erasure code coefficient).
[0070] It should be noted that the sum of the current remaining space ratio of the object storage and the current used space ratio of the object storage is equal to 1, and the more remaining space there is, the less used space there is.
[0071] In another preferred embodiment, determining the target backup strategy according to the weight of the dual-copy backup strategy and the weight of the erasure code backup strategy specifically includes:
[0072] If the weight of the dual-copy backup strategy is greater than the weight of the erasure code backup strategy, the dual-copy backup strategy is used as the target backup strategy;
[0073] If the weight of the dual-copy backup strategy is equal to the weight of the erasure code backup strategy, then the erasure code backup strategy is used as the target backup strategy;
[0074] If the weight of the dual-copy backup strategy is less than the weight of the erasure code backup strategy, the erasure code backup strategy is used as the target backup strategy.
[0075] Specifically, when the embodiment of the present invention determines the target backup strategy based on the weight of the dual-copy backup strategy and the weight of the erasure code backup strategy, if the weight of the dual-copy backup strategy is greater than the weight of the erasure code backup strategy, the dual-copy backup strategy is used as the target backup strategy. If the weight of the dual-copy backup strategy is equal to the weight of the erasure code backup strategy, the erasure code backup strategy is used as the target backup strategy. Considering cost control, when the dual-copy weight is equal to the erasure code weight, the erasure code storage strategy is also selected. If the weight of the dual-copy backup strategy is less than the weight of the erasure code backup strategy, the erasure code backup strategy is used as the target backup strategy.
[0076] For example, during a period of time, the object storage service version is upgraded, and data loss may occur during the upgrade. Therefore, the website administrator adjusts the global security level of the website to a higher level 2, with a corresponding dual-copy coefficient of 0.75 and an erasure code coefficient of 0.25. At this time, a high-cost user sends a storage request for critical data. According to the corresponding rules, the security level of the request is level 1, the dual-copy coefficient is 1, and the erasure code coefficient is 0. At this time, the real-time remaining space ratio of the object storage capacity is 30%. Therefore:
[0077] Dual copy strategy ratio = 0.3*(0.75+1) = 0.525
[0078] Erasure code strategy weight = 0.7*(0.25+0) = 0.175
[0079] The proportion of the dual-copy strategy is greater than the proportion of the erasure code strategy, so this request adopts the dual-copy redundant backup strategy.
[0080] For example, during a period of time, the website business is stable and the data loss rate is low. Therefore, the website administrator adjusts the global security level of the website to a lower level 4, with a corresponding dual copy coefficient of 0.25 and an erasure code coefficient of 0.75. At this time, an ordinary user sends a storage request for its critical data. According to the corresponding rules, the security level of the request is level 2, the dual copy coefficient is 0.5, and the erasure code coefficient is 0.5. At this time, the real-time remaining space ratio of the object storage capacity is 50%. Therefore:
[0081] Dual copy strategy ratio = 0.5*(0.25+0.5) = 0.375
[0082] Erasure code strategy ratio = 0.5*(0.75+0.5) = 0.625
[0083] The proportion of the erasure code strategy is greater than the proportion of the dual replica strategy, so this request adopts the redundant backup strategy of the erasure code.
[0084] See also Figure 2 , Figure 2 This is a timing diagram of a preferred embodiment of a dynamic scheduling method for object storage provided by the present invention. When the dynamic scheduling method for object storage provided by the embodiment of the present invention is applied, the specific steps are as follows:
[0085] 1. The website administrator adjusts the website's own data security level and data storage efficiency based on its actual needs.
[0086] 2. The user sends a request to the website for storage resources.
[0087] 3. After receiving the user request, the website queries the security level of the request through the user information attached to the request.
[0088] 4. The website sends a request to the object storage service provider to obtain real-time capacity usage.
[0089] 5. The object storage service provider returns the real-time capacity usage data of the object storage package purchased by the website to the website.
[0090] 6. Combine the website security level, request security level, and object storage real-time capacity information, and input the decision algorithm to select between dual replicas and erasure coding as the backup strategy for the current request data.
[0091] 7. According to the backup strategy obtained in the previous step, the website sends a data storage request to the object storage service provider.
[0092] 8. The object storage service provider performs data storage backup according to the received backup strategy and data.
[0093] 9. The object storage service provider returns a successful storage response to the website.
[0094] 10. The website returns a successful request to the user.
[0095] Correspondingly, the present invention also provides a dynamic scheduling device for object storage, which can implement all the processes of the dynamic scheduling method for object storage in the above embodiment.
[0096] See also Figure 3 , Figure 3 The structure diagram of a preferred embodiment of a dynamic scheduling device for object storage provided by the present invention is as follows. The dynamic scheduling device for object storage includes:
[0097] The receiving module 301 is used to receive a resource storage request sent by a user terminal and obtain a request security level corresponding to the resource storage request;
[0098] An acquisition module 302 is used to acquire the website security level and real-time capacity information of the object storage;
[0099] A calculation module 303 is used to calculate the weight of the double copy backup strategy and the weight of the erasure code backup strategy according to the request security level, the website security level and the real-time capacity information;
[0100] The scheduling module 304 is used to determine the target backup strategy according to the weight of the dual copy backup strategy and the weight of the erasure code backup strategy, so that the object storage server stores and backs up data according to the target backup strategy.
[0101] Preferably, the calculation module 303 specifically includes:
[0102] A first determining unit 313, configured to determine a first dual replica coefficient and a first erasure code coefficient according to the requested security level;
[0103] A second determining unit 323, configured to determine a second dual replica coefficient and a second erasure code coefficient according to the website security level;
[0104] A first calculation unit 333, configured to calculate a weight of the dual-copy backup strategy according to the real-time capacity information, the first dual-copy coefficient, and the second dual-copy coefficient;
[0105] The second calculation unit 343 is configured to calculate a weight of the erasure code backup strategy according to the real-time capacity information, the first erasure code coefficient, and the second erasure code coefficient.
[0106] Preferably, the first calculating unit 333 is specifically used for:
[0107] The weight of the dual-copy backup strategy is calculated according to the current remaining space ratio of the object storage in the real-time capacity information, the first dual-copy coefficient, and the second dual-copy coefficient; wherein the calculation formula of the weight of the dual-copy backup strategy is:
[0108] The weight of the dual-copy backup strategy = the current remaining space ratio of the object storage * (the first dual-copy coefficient + the second dual-copy coefficient).
[0109] Preferably, the second calculating unit 343 is specifically used for:
[0110] The weight of the erasure code backup strategy is calculated according to the current used space ratio of the object storage in the real-time capacity information, the first erasure code coefficient, and the second erasure code coefficient; wherein the calculation formula of the weight of the erasure code backup strategy is:
[0111] The weight of the erasure code backup strategy = the current used space ratio of the object storage * (first erasure code coefficient + second erasure code coefficient).
[0112] Preferably, determining the target backup strategy according to the weight of the dual-copy backup strategy and the weight of the erasure code backup strategy specifically includes:
[0113] If the weight of the dual-copy backup strategy is greater than the weight of the erasure code backup strategy, the dual-copy backup strategy is used as the target backup strategy;
[0114] If the weight of the dual-copy backup strategy is equal to the weight of the erasure code backup strategy, then the erasure code backup strategy is used as the target backup strategy;
[0115] If the weight of the dual-copy backup strategy is less than the weight of the erasure code backup strategy, the erasure code backup strategy is used as the target backup strategy.
[0116] Preferably, the first dual-copy coefficient is proportional to the requested security level, and the first erasure code coefficient is inversely proportional to the requested security level; at the same requested security level, the sum of the first dual-copy coefficient and the first erasure code coefficient is equal to 1.
[0117] Preferably, the second dual-copy coefficient is proportional to the website security level, and the second erasure code coefficient is inversely proportional to the website security level; at the same website security level, the sum of the second dual-copy coefficient and the second erasure code coefficient is equal to 1.
[0118] In the specific implementation, the working principle, control process and technical effect achieved by the dynamic scheduling device for object storage provided in the embodiment of the present invention are the same as those of the dynamic scheduling method for object storage in the above embodiment, and will not be repeated here.
[0119] See also Figure 4 , Figure 4 4 is a schematic diagram of a preferred embodiment of a terminal device provided by the present invention. The terminal device includes a processor 401, a memory 402, and a computer program stored in the memory 402 and configured to be executed by the processor 401. When the processor 401 executes the computer program, the dynamic scheduling method for object storage described in any of the above embodiments is implemented.
[0120] Preferably, the computer program can be divided into one or more modules / units (such as computer program 1, computer program 2, ...), and the one or more modules / units are stored in the memory 402 and executed by the processor 401 to complete the present invention. The one or more modules / units can be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in the terminal device.
[0121] The processor 401 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor, or the processor 401 can be any conventional processor. The processor 401 is the control center of the terminal device, and various parts of the terminal device are connected using various interfaces and lines.
[0122] The memory 402 mainly includes a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function, etc., and the data storage area can store related data, etc. In addition, the memory 402 can be a high-speed random access memory, or a non-volatile memory, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, and a flash card (Flash Card), etc., or the memory 402 can also be other volatile solid-state storage devices.
[0123] It should be noted that the above terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art will understand that Figure 4 The structural diagram is only an example of the above-mentioned terminal device and does not constitute a limitation of the above-mentioned terminal device. It may include more or less components than shown in the figure, or combine certain components, or different components.
[0124] An embodiment of the present invention further provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the dynamic scheduling method for object storage described in any of the above embodiments.
[0125] The embodiment of the present invention provides a dynamic scheduling method, device, equipment and storage medium for object storage, which receives a resource storage request sent by a user end and obtains the request security level corresponding to the resource storage request; obtains the website security level and the real-time capacity information of the object storage; calculates the weight of the double copy backup strategy and the weight of the erasure code backup strategy according to the request security level, the website security level and the real-time capacity information; determines the target backup strategy according to the weight of the double copy backup strategy and the weight of the erasure code backup strategy, so that the object storage server stores and backs up data according to the target backup strategy. The embodiment of the present invention dynamically schedules the two redundant backup technologies of erasure code backup and double copy backup according to the security level of the resource storage request of the user end, the website security level and the capacity information of the object storage, so as to achieve the purpose of meeting the security requirements of the enterprise business and controlling the cost at the same time. In addition, the security level corresponding to the request itself and the global security level of the website can be actively configured, and different security levels are assigned different weight coefficients to the two redundant backup technologies, so that the selection of the backup technology strategy can achieve the purpose of overall controllability. By taking the usage of the real-time object storage space as the key part of the decision algorithm, the redundant backup technology obtained by the final decision is more in line with the actual situation.
[0126] It should be noted that the system embodiment described above is merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the system embodiment provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.
[0127] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A dynamic scheduling method for object storage, characterized in that: include: Receive a resource storage request sent by a user terminal, and obtain a request security level corresponding to the resource storage request; Get website security level and real-time capacity information of object storage; Calculate the weight of the dual-copy backup strategy and the weight of the erasure code backup strategy according to the request security level, the website security level, and the real-time capacity information; According to the weight of the dual-copy backup strategy and the weight of the erasure code backup strategy, a target backup strategy is determined, so that the object storage server stores and backs up data according to the target backup strategy.
2. The object storage dynamic scheduling method according to claim 1, characterized in that: The calculating the weight of the double copy backup strategy and the weight of the erasure code backup strategy according to the request security level, the website security level and the real-time capacity information specifically includes: Determine a first dual replica coefficient and a first erasure code coefficient according to the requested security level; Determining a second dual replica coefficient and a second erasure code coefficient according to the website security level; Calculating a weight of the dual-copy backup strategy according to the real-time capacity information, the first dual-copy coefficient, and the second dual-copy coefficient; A weight of the erasure code backup strategy is calculated according to the real-time capacity information, the first erasure code coefficient, and the second erasure code coefficient.
3. The object storage dynamic scheduling method according to claim 2, characterized in that: The calculating the weight of the dual-copy backup strategy according to the real-time capacity information, the first dual-copy coefficient, and the second dual-copy coefficient specifically includes: The weight of the dual-copy backup strategy is calculated according to the current remaining space ratio of the object storage in the real-time capacity information, the first dual-copy coefficient, and the second dual-copy coefficient; wherein the calculation formula of the weight of the dual-copy backup strategy is: The weight of the dual-copy backup strategy = the current remaining space ratio of the object storage * (the first dual-copy coefficient + the second dual-copy coefficient).
4. The object storage dynamic scheduling method according to claim 3, characterized in that: The calculating the weight of the erasure code backup strategy according to the real-time capacity information, the first erasure code coefficient, and the second erasure code coefficient specifically includes: The weight of the erasure code backup strategy is calculated according to the current used space ratio of the object storage in the real-time capacity information, the first erasure code coefficient, and the second erasure code coefficient; wherein the calculation formula of the weight of the erasure code backup strategy is: The weight of the erasure code backup strategy = the current used space ratio of the object storage * (first erasure code coefficient + second erasure code coefficient).
5. The object storage dynamic scheduling method according to claim 4, characterized in that: The determining of the target backup strategy according to the weight of the dual-copy backup strategy and the weight of the erasure code backup strategy specifically includes: If the weight of the dual-copy backup strategy is greater than the weight of the erasure code backup strategy, the dual-copy backup strategy is used as the target backup strategy; If the weight of the dual-copy backup strategy is equal to the weight of the erasure code backup strategy, then the erasure code backup strategy is used as the target backup strategy; If the weight of the dual-copy backup strategy is less than the weight of the erasure code backup strategy, the erasure code backup strategy is used as the target backup strategy.
6. The object storage dynamic scheduling method according to claim 2, characterized in that: The first dual-copy coefficient is proportional to the requested security level, and the first erasure code coefficient is inversely proportional to the requested security level; at the same requested security level, the sum of the first dual-copy coefficient and the first erasure code coefficient is equal to 1.
7. The object storage dynamic scheduling method according to claim 6, characterized in that: The second dual-copy coefficient is proportional to the website security level, and the second erasure code coefficient is inversely proportional to the website security level; at the same website security level, the sum of the second dual-copy coefficient and the second erasure code coefficient is equal to 1.
8. A dynamic scheduling device for object storage, characterized in that: include: A receiving module, used to receive a resource storage request sent by a user terminal, and obtain a request security level corresponding to the resource storage request; The acquisition module is used to obtain the website security level and real-time capacity information of the object storage; A calculation module, configured to calculate a weight of a dual-copy backup strategy and a weight of an erasure code backup strategy according to the request security level, the website security level, and the real-time capacity information; The scheduling module is used to determine the target backup strategy according to the weight of the dual-copy backup strategy and the weight of the erasure code backup strategy, so that the object storage server stores and backs up data according to the target backup strategy.
9. A terminal device, characterized in that: It includes a processor and a memory, wherein a computer program is stored in the memory, and the computer program is configured to be executed by the processor, and when the processor executes the computer program, the dynamic scheduling method for object storage as described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the device where the computer-readable storage medium is located executes the computer program, the dynamic scheduling method for object storage according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Data migration method and device, storage medium and electronic equipment
CN120045126A
Data migration method and apparatus, storage medium, and electronic device
CN120045126B
Cloud mobile phone resource scheduling method and related equipment
CN121173870A
