Method and device for adjusting storage capacity of cloud storage service, medium and program

By creating symbolic links and modifying data read/write paths in the new cloud storage service, the problem of user application availability interruption during the scaling up and down of the cloud storage service was solved, achieving low-cost and seamless storage capacity adjustment.

CN120848787APending Publication Date: 2025-10-28ALIBABA CLOUD COMPUTING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410524345.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-28
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

Existing technologies cause prolonged interruptions to user application availability and incur high costs during the scaling up and down of cloud storage services, making it difficult to adjust storage capacity at low cost while ensuring no data loss.

Method used

By creating a symbolic link in the new cloud storage service corresponding to the data files in the old cloud storage service, modifying the data read and write paths of the user application, and disconnecting the symbolic link after successfully copying the data in the old cloud storage service, the user application can switch seamlessly.

Benefits of technology

This ensures that normal data read and write operations of user applications are not affected during the transition from old cloud storage services to new cloud storage services. Furthermore, the transition process is completed by decoupled scaling components, reducing intrusive modifications and costs to user applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120848787A_ABST
    Figure CN120848787A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a storage capacity adjustment method and device for a cloud storage service, a medium and a program, and the method comprises the steps: responding to a change instruction from an old cloud storage service to a new cloud storage service by a capacity expansion and contraction processing assembly which is decoupled with a user application; and creating a soft connection corresponding to the data file in the old cloud storage service in the new cloud storage service, and modifying a data read-write path of the user application from the old cloud storage service to the new cloud storage service, so that the user application performs data read-write in the new cloud storage service. And after the data file is copied from the old cloud storage service to the new cloud storage service, disconnecting the flexible connection corresponding to the data file in the old cloud storage service, and pointing the data read-write path to the data file in the new cloud storage service. According to the technical scheme of the invention, the availability of the user application is not affected in the process of changing the old cloud storage service to the new cloud storage service through the peripheral capacity expansion and contraction processing component and the flexible connection mode, and the implementation is simple.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cloud computing technology, and in particular to a method, device, medium, and program for adjusting the storage capacity of a cloud storage service. Background Technology

[0002] Major cloud vendors currently offer various types of cloud storage services, such as Elastic Block Store (EBS). Storage capacity is typically one of their selling points, and data generated by various upper-layer user applications (such as video applications, e-commerce applications, etc.) during service delivery can be stored using cloud storage services. In practice, user applications' storage capacity needs change dynamically. For example, when user applications experience high traffic, they may require more storage capacity, while during periods of low traffic, they require less. This necessitates that cloud vendors possess the ability to scale cloud storage services (i.e., increase or decrease storage capacity).

[0003] Currently, the common method for adjusting storage capacity is "changing the data disk". Here, the data disk is an abstract description of the storage capacity of cloud storage services. Changing the data disk means replacing the old cloud storage service (such as the old EBS service) with a new cloud storage service (such as the new EBS service) with a smaller or larger storage capacity. Here, "old" and "new" only indicate that the storage capacity is decreasing.

[0004] During scaling up or down, all data files stored in the old cloud storage service need to be completely copied to the new cloud storage service. When the data volume is large, the copying time can be lengthy, potentially impacting the stable operation of upper-layer user applications. Since user applications often have high requirements for service availability and quality of service, scaling up or down the underlying cloud storage service should avoid adverse effects on the availability of these applications, such as causing prolonged interruptions.

[0005] Therefore, providing a low-cost and secure solution to ensure that data is not lost during the switch between old and new cloud storage services and to minimize the impact on the normal operation of user applications is an urgent problem to be solved. Summary of the Invention

[0006] This invention provides a method, device, medium, and program for adjusting the storage capacity of cloud storage services, which can perform scaling up and down of cloud storage services at a low cost while ensuring the service availability of upper-layer user applications.

[0007] In a first aspect, embodiments of the present invention provide a method for adjusting the storage capacity of a cloud storage service, applied to a scaling-up / scaling processing component decoupled from user applications using the cloud storage service, the method comprising:

[0008] In response to a change instruction from an old cloud storage service to a new cloud storage service, a soft link is created in the new cloud storage service corresponding to a data file stored in the old cloud storage service. The soft link is used to read the data file. The storage capacity of the new cloud storage service is different from the storage capacity of the old cloud storage service.

[0009] The data read / write path corresponding to the user application is changed from the old cloud storage service to the new cloud storage service, so that the user application can perform data read / write in the new cloud storage service based on the modified data read / write path.

[0010] Copy the data file from the old cloud storage service to the new cloud storage service;

[0011] In response to the successful copying of the data file to the new cloud storage service, the symbolic link corresponding to the data file in the old cloud storage service is disconnected, and the data read path of the user application is redirected to the data file in the new cloud storage service.

[0012] Secondly, embodiments of the present invention provide a storage capacity adjustment device for cloud storage services, applied to a scaling processing component decoupled from user applications using cloud storage services, the device comprising:

[0013] A creation module is used to respond to a change instruction from an old cloud storage service to a new cloud storage service, and to create a soft link in the new cloud storage service that corresponds to a data file stored in the old cloud storage service. The soft link is used to read the data file. The storage capacity of the new cloud storage service is different from the storage capacity of the old cloud storage service.

[0014] The modification module is used to modify the data read / write path corresponding to the user application from the old cloud storage service to the new cloud storage service, so that the user application can perform data read / write in the new cloud storage service based on the modified data read / write path.

[0015] The copy module is used to copy the data file from the old cloud storage service to the new cloud storage service. In response to the successful copying of the data file to the new cloud storage service, the soft link corresponding to the data file in the old cloud storage service is disconnected, and the data reading path of the user application is pointed to the data file in the new cloud storage service.

[0016] Thirdly, embodiments of the present invention provide a method for adjusting the storage capacity of a cloud storage service, applied to user applications using cloud storage services, the method comprising:

[0017] It is determined that the scaling processing component has changed the data read / write path corresponding to the user application from the old cloud storage service to the new cloud storage service. The scaling processing component is decoupled from the user application. The modification is performed by the scaling processing component after creating a soft link in the new cloud storage service corresponding to the data file stored in the old cloud storage service. The storage capacity of the new cloud storage service is different from the storage capacity of the old cloud storage service. The soft link is used to read the data file.

[0018] Data read and write operations are performed in the new cloud storage service based on the modified data read and write path; wherein, after the scaling processing component successfully copies the data file from the old cloud storage service to the new cloud storage service, the soft link corresponding to the data file in the old cloud storage service is disconnected, and the data read path of the user application is pointed to the data file in the new cloud storage service.

[0019] Fourthly, embodiments of the present invention provide a storage capacity adjustment device for cloud storage services, applied to user applications using cloud storage services, the device comprising:

[0020] The determination module is used to determine that the scaling processing component has modified the data read / write path corresponding to the user application from the old cloud storage service to the new cloud storage service. The scaling processing component is decoupled from the user application. The modification is performed by the scaling processing component after creating a soft link in the new cloud storage service corresponding to the data file stored in the old cloud storage service. The storage capacity of the new cloud storage service is different from the storage capacity of the old cloud storage service. The soft link is used to read the data file.

[0021] The read / write module is used to perform data read / write operations in the new cloud storage service based on the modified data read / write path; wherein, after the scaling processing component successfully copies the data file from the old cloud storage service to the new cloud storage service, it disconnects the soft connection corresponding to the data file in the old cloud storage service and points the data read path of the user application to the data file in the new cloud storage service.

[0022] Fifthly, embodiments of the present invention provide an electronic device, including: a memory, a processor, and a communication interface; wherein, the memory stores executable code, and when the executable code is executed by the processor, the processor can at least implement the cloud storage service storage capacity adjustment method as described in the first or third aspect.

[0023] In a sixth aspect, embodiments of the present invention provide a non-transitory machine-readable storage medium storing executable code, wherein when the executable code is executed by a processor of an electronic device, the processor is able to at least implement the storage capacity adjustment method for cloud storage services as described in the first or third aspect.

[0024] In a seventh aspect, embodiments of the present invention provide a computer program product comprising a computer program that, when executed by a processor of an electronic device, enables the processor to at least implement the storage capacity adjustment method for cloud storage services as described in the first or third aspect.

[0025] In the cloud storage capacity adjustment scheme provided by this invention, a scaling-up / scaling processing component is decoupled from the user application using the cloud storage service. This component allows the user application to switch from an old cloud storage service with a certain storage capacity to a new cloud storage service with a different storage capacity. This scaling-up / scaling process can be completed at low cost without intrusive development of the user application. Specifically, in response to a change instruction from the old cloud storage service to the new cloud storage service, the scaling-up / scaling processing component creates soft links in the new cloud storage service corresponding to the data files stored in the old cloud storage service. Then, it modifies the data read / write path corresponding to the user application from the old cloud storage service to the new cloud storage service, enabling the user application to read and write data in the new cloud storage service based on the modified data read / write path. Next, the data files are copied from the old cloud storage service to the new cloud storage service. After successful copying, the soft links corresponding to the data files in the old cloud storage service are disconnected, and the user application's data read path is redirected to the data files in the new cloud storage service. In short, the copied data files overwrite the corresponding soft links (which are also files), thus completing the change from the old cloud storage service to the new cloud storage service for the user application.

[0026] In the above solution, by using soft connections, during the transition from the old cloud storage service to the new cloud storage service, the upper-layer user application only needs to operate the new cloud storage service to perform normal data read and write operations, which will not adversely affect the availability of the user application. Moreover, the change process is completed by the scaling component that is decoupled from the user application, making it simple to implement. Attached Figure Description

[0027] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0028] Figure 1 A flowchart illustrating a method for adjusting the storage capacity of a cloud storage service, as provided in an embodiment of the present invention;

[0029] Figure 2 This is a schematic diagram illustrating different reduction processing stages provided in embodiments of the present invention;

[0030] Figure 3 A schematic diagram illustrating the execution process of the replication phase provided in an embodiment of the present invention;

[0031] Figure 4 A flowchart illustrating a method for adjusting the storage capacity of a cloud storage service, as provided in an embodiment of the present invention;

[0032] Figure 5 A flowchart illustrating a method for adjusting the storage capacity of a cloud storage service, as provided in an embodiment of the present invention;

[0033] Figure 6 A schematic diagram of the structure of a cloud storage service storage capacity adjustment device provided in an embodiment of the present invention;

[0034] Figure 7 A schematic diagram of the structure of another cloud storage service storage capacity adjustment device provided in an embodiment of the present invention;

[0035] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0036] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0037] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in the embodiments of the present invention are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0038] The following detailed description of some embodiments of the present invention is provided in conjunction with the accompanying drawings. Where there is no conflict between the embodiments, the following embodiments and features can be combined with each other. Furthermore, the timing of the steps in the following method embodiments is merely an example and not a strict limitation.

[0039] Currently, when adjusting the storage capacity of cloud storage services used by user applications using the "data disk change" method, taking downsizing as an example, one approach involves pausing the user application when switching from a large-capacity old cloud storage service to a smaller-capacity new one. Then, the new cloud storage service is configured, and all data files stored in the old cloud storage service are copied to the new one. Afterward, the old cloud storage service is uninstalled, and the user application is restarted to enable data reading and writing using the new service. However, when the data files stored in the old cloud storage service are large, the copying process can be lengthy, leading to prolonged interruptions to the user application and significantly impacting its availability.

[0040] Based on this, embodiments of the present invention provide a low-cost and secure solution to ensure that data is not lost during the switching between old and new cloud storage services, and to minimize the impact on the normal operation of user applications.

[0041] In summary, the solution provided in this embodiment of the invention uses soft connections, so that during the change from the old cloud storage service to the new cloud storage service, the upper-layer user application only needs to operate the new cloud storage service to perform normal data read and write operations, without adversely affecting the availability of the user application. Moreover, the change process is completed by an additional scaling processing component that is decoupled from the user application, without requiring intrusive modifications to the user application, making it simple to implement.

[0042] The following details the storage capacity adjustment scheme for cloud storage services provided in this embodiment of the invention. This scheme can be executed by a scaling-up / scaling-down processing component that is decoupled from the user application using the cloud storage service. This scaling-up / scaling-down processing component can be deployed in a cloud server, and its specific implementation form can be a plugin, a software development kit (SDK), etc.

[0043] Figure 1 A flowchart illustrating a method for adjusting the storage capacity of a cloud storage service provided in an embodiment of the present invention is shown below. Figure 1 As shown, the method may include the following steps:

[0044] 101. The scaling processing component responds to the change command from the old cloud storage service to the new cloud storage service, and creates a soft link in the new cloud storage service that corresponds to the data file stored in the old cloud storage service. The soft link is used to read the data file. The storage capacity of the new cloud storage service is different from that of the old cloud storage service.

[0045] 102. The scaling up / down processing component modifies the data read / write path corresponding to the user application from the old cloud storage service to the new cloud storage service, enabling the user application to read and write data in the new cloud storage service based on the modified data read / write path.

[0046] 103. The scaling up / down processing component copies data files from the old cloud storage service to the new cloud storage service.

[0047] 104. When the data file is successfully copied to the new cloud storage service, the scaling processing component disconnects the soft link corresponding to the data file in the old cloud storage service and points the user application's data read path to the data file in the new cloud storage service.

[0048] The capacity adjustment scheme provided in this embodiment of the invention can be applied to user applications that read and write data in an append-only manner, and basically does not modify historical data.

[0049] Understandably, in practical applications, users typically utilize cloud storage services by purchasing storage capacity. In this embodiment of the invention, the cloud storage service previously used by a user application is referred to as the old cloud storage service, and it is assumed that the storage capacity corresponding to the old cloud storage service is A. Since the amount of data generated by the user application during actual operation may continuously decrease, storage capacity A becomes wasteful; conversely, the amount of data generated may continuously increase, making storage capacity A insufficient. Therefore, there is a need to change to a smaller or larger storage capacity B. Thus, the cloud storage service corresponding to storage capacity B is referred to as the new cloud storage service. Therefore, it can be seen that the new cloud storage service and the old cloud storage service corresponding to a user application are not two different types of cloud storage services, but rather differ in their corresponding storage capacities.

[0050] When a user triggers a change command from the old cloud storage service to the new cloud storage service based on changes in the user application's data traffic, the scaling processing component, decoupled from the user application settings, receives the change command and executes the change process from the old cloud storage service to the new cloud storage service.

[0051] As mentioned above, the scaling / shrinking processing component can reside on a cloud server maintained by a cloud storage provider, and be offered to users as a service. The scaling / shrinking processing component is decoupled from the user application; simply put, it is not located within the user application, and only simple interactions with the user application are required during the aforementioned changes.

[0052] To execute the above change process, the new cloud storage service must first be mounted onto the computer device where the user application resides, so that the operating system on that computer device becomes aware of the new cloud storage service's existence. Simply put, mounting involves configuring the new cloud storage service on that computer device, just as mounting the old cloud storage service previously.

[0053] Subsequently, during the change execution process, the scaling component first needs to create symbolic links in the new cloud storage service corresponding to each data file stored in the old cloud storage service. These symbolic links are used to read the corresponding data files from the old cloud storage service. Symbolic links, also known as soft links, are used to connect files and directories in different file systems. In this embodiment, symbolic links are used to connect data files stored in the old cloud storage service to the new cloud storage service.

[0054] As you can understand, a symbolic link is actually a special type of file (which can be called a symbolic link file). A symbolic link corresponding to a data file has the same filename as the data file, but the content stored in the symbolic link is different from the content stored in its corresponding data file. Simply put, the content stored in the symbolic link is the storage address of its corresponding data file in the old cloud storage service, while the content stored in the data file is the data written by the user application.

[0055] In practical applications, prior to the aforementioned change process, all data read and write operations performed by user applications were directed to the legacy cloud storage service. For example, when data needed to be written, the legacy cloud storage service would identify a data file that was not yet full and write data to that file. Once that data file was full, it would generate a new data file to write any further data from the user application. When data needed to be read, the user application would specify the data file to be read, so that the legacy cloud storage service would provide that data file to the user application. A data file capacity was pre-configured, and each data file could only contain data up to that capacity.

[0056] Therefore, during the above change process, multiple data files are actually stored in the old cloud storage service. In order for user applications to still be able to read these data files during the change process, the scaling processing component will create a one-to-one soft link for each data file in the new cloud storage service. This allows user applications to read data from these data files stored in the old cloud storage service through these soft links during the change process.

[0057] In addition, after creating the aforementioned multiple soft connections, the scaling processing component will also modify the data read / write path corresponding to the user application from the old cloud storage service to the new cloud storage service, enabling the user application to read and write data in the new cloud storage service based on the modified data read / write path.

[0058] In fact, before the change process is executed, the data read and write paths configured in the user application point to the old cloud storage service. During the change process, it is necessary to switch to the new cloud storage service. Therefore, the scaling up and down processing component will modify the configuration information in the user application.

[0059] For example, suppose the old cloud storage service stores four data files named file1, file2, file3, and file4. The parent path for these data files in the old cloud storage service is represented as `old_disk`. Therefore, the data read / write path for the old cloud storage service can be represented as: `old_disk / file1 / file2 / file3 / file4`, which is equivalent to having four subdirectories (i.e., file names) under the parent directory `old_disk`. If the parent path for the data read / write path in the new cloud storage service is `new_disk`, then the modification result of the scaling component on the data read / write path can be represented as: `new_disk / file1 / file2 / file3 / file4`. It's important to note that at this point, the new cloud storage service doesn't actually store the four data files mentioned above; it only stores four symbolic links with the same filenames. Therefore, in the new cloud storage service, the four subdirectories actually correspond to these four symbolic links. In other words, if a user application reads the four data files based on this data read / write path, it's actually reading the four symbolic links, and then reading the data files still stored in the old cloud storage service through these four symbolic links. However, the user application won't perceive this reading process; it will only perceive the presence of the four data files in the new cloud storage service. In other words, the data reading process doesn't require any other modifications to the user application; only the user application's data read / write path needs to be modified.

[0060] Here's a brief overview: When a user application reads or writes data in the new cloud storage service based on the modified data read / write path, on the one hand, for data writing, a new data file will be generated in the new cloud storage service, and the data to be written will be written to this newly generated data file. On the other hand, for data reading, if the data file to be read is stored in the old cloud storage service, data reading is implemented based on the corresponding soft link; if the data file to be read is generated in the new cloud storage service, then it can be read directly in the new cloud storage service.

[0061] After modifying the data read / write paths as described above, the scaling component begins copying multiple data files from the old cloud storage service to the new cloud storage service. Upon successful copying, the symbolic links corresponding to the data files in the old cloud storage service are disconnected, and the user application's data read path is redirected to the data files in the new cloud storage service. In simpler terms, the successfully copied data files in the new cloud storage service overwrite the corresponding symbolic links (i.e., symbolic link files). This overwriting can be understood as replacing the data content of the data files in the symbolic link file, since the data files and corresponding symbolic links have the same filename; only the data content needs to be replaced.

[0062] In one alternative embodiment, overwriting the corresponding symbolic link with a data file that has been successfully copied to the new cloud storage service can be done by: in response to any one of the multiple data files being successfully copied to the new cloud storage service, overwriting its corresponding symbolic link with that data file.

[0063] In another alternative embodiment, overwriting the corresponding symbolic link with the data file that has been successfully copied to the new cloud storage service can be done by: overwriting multiple symbolic links with multiple data files after multiple data files have been successfully copied to the new cloud storage service.

[0064] In other words, you can either overwrite the corresponding symbolic link with the data file each time it is successfully copied from the old cloud storage service to the new cloud storage service, or you can overwrite the corresponding symbolic links as a whole after all the data files have been successfully copied to the new cloud storage service. The latter method is more stable.

[0065] After all data files in the old cloud storage service have been successfully copied to the new cloud storage service, the scaling component can uninstall the old cloud storage service for the user application, and the user application will then use the new cloud storage service.

[0066] To facilitate understanding of the above change process, combined with Figure 2 and Figure 3 Provide a illustrative illustration.

[0067] like Figure 2 As shown, the change process of cloud storage services can be abstracted into three stages: before data replication, during data replication, and after data replication is completed.

[0068] Before data replication, the upper-layer user applications and the old cloud storage service have normal data read and write behavior.

[0069] In this stage of data replication, such as Figure 3 As shown, the scaling component creates symbolic links (symbolic links to old data files) for each of the multiple data files stored in the old cloud storage service (shown as old data files in the diagram) in the new cloud storage service, and modifies the user application's data read / write paths. From the user application's perspective, it doesn't actually distinguish between the new and old cloud storage services; it simply performs data read / write operations based on the data read / write paths. Therefore, the user application is unaware of this data replication change. At this stage, symbolic links are used to link the old data files in the old cloud storage service to the new cloud storage service. The user application can then read the old data files from the old cloud storage service through these symbolic links and write newly generated data to the new data files generated in the new cloud storage service. Of course, as... Figure 3 As shown, user applications can also trigger read operations on the aforementioned new data files. Additionally, as... Figure 3 As shown, the scaling component also copies old data files from the old cloud storage service to the new cloud storage service. When there are many old data files, this copying process is relatively lengthy. During this process, the upper-layer user application is unaware of the copying and can continue writing and reading data normally, ensuring high availability. Once all the old data files have been successfully copied to the new cloud storage service, the original symbolic links to the old data files are overwritten using the old data files from the new cloud storage service. At this point, all data files for the upper-layer user application reside in the new cloud storage service.

[0070] Once data replication is complete, the scaling-up / scaling-down processing component can unload the old cloud storage service, thus completing the replacement of the old and new cloud storage services. For example, replacing a large-capacity old cloud storage service with a new cloud storage service with a smaller capacity achieves the scaling-down of the cloud storage service used by the user application.

[0071] In the above-described solution provided in the embodiments of the present invention, by using soft connections, during the process of changing from the old cloud storage service to the new cloud storage service, the upper-layer user application only needs to operate the new cloud storage service to perform normal data read and write operations, which will not adversely affect the availability of the user application. Moreover, the change process is completed by an additional scaling processing component that is decoupled from the user application, without the need for intrusive modifications to the user application, making it simple to implement and low in cost.

[0072] Since storage capacity adjustments can include both expansion and contraction, in the case of contraction (where the storage capacity of the new cloud storage service is less than that of the old cloud storage service), to avoid the new storage service being unable to accommodate the data stored in the old cloud storage service, in response to the aforementioned change instruction, the expansion / contraction processing component, upon determining that the storage capacity of the new cloud storage service is less than that of the old cloud storage service, checks whether the data volume of the data files stored in the old cloud storage service is less than that of the new cloud storage service. If it is less, a corresponding soft link is created in the new cloud storage service, and the subsequent processing continues; otherwise, an alarm is issued.

[0073] Figure 4 A flowchart illustrating a method for adjusting the storage capacity of a cloud storage service provided in an embodiment of the present invention is shown below. Figure 4 As shown, the method may include the following steps:

[0074] 401. The scaling up / down processing component responds to a change instruction from the old cloud storage service to the new cloud storage service and determines the first integrity parameter value corresponding to the data file stored in the old cloud storage service.

[0075] 402. The scaling up / down processing component creates symbolic links in the new cloud storage service to the data files stored in the old cloud storage service.

[0076] 403. The scaling up / down processing component modifies the data read / write path corresponding to the user application from the old cloud storage service to the new cloud storage service, enabling the user application to read and write data in the new cloud storage service based on the modified data read / write path.

[0077] 404. The scaling up / down processing component determines the upper limit of data replication traffic for the replication task based on the user application's data read and write traffic to the new cloud storage service. Under the constraint of the upper limit of data replication traffic, the data file is copied from the old cloud storage service to the new cloud storage service.

[0078] 405. In response to the successful replication of the data file to the new cloud storage service, the scaling processing component disconnects the soft link corresponding to the data file in the old cloud storage service and points the user application's data reading path to the data file in the new cloud storage service.

[0079] 406. The scaling up / down processing component determines the second integrity parameter value corresponding to the data file stored in the new cloud storage service, and determines the integrity of the data file stored in the new cloud storage service based on the first integrity parameter value and the second integrity parameter value.

[0080] 407. Uninstall the old cloud storage service for scaling up and down processing components.

[0081] In this embodiment, for system security, during the aforementioned change process, the scaling-up / scaling processing component can verify the integrity of data files to determine whether data loss occurred during the copying of data files from the old cloud storage service to the new cloud storage service. Specifically, at the start of the change process, the first integrity parameter value corresponding to multiple data files stored in the old cloud storage service is determined. Then, after these multiple data files are successfully copied to the new cloud storage service, the second integrity parameter value corresponding to these multiple data files stored in the new cloud storage service is determined again. If the two values ​​match, it indicates that no data loss occurred during the copying process, and the data files were copied completely. Conversely, if the two values ​​do not match, the change process is determined to have failed. In practical applications, optionally, a message digest algorithm (MD5) can be used to calculate the first and second integrity parameter values ​​for the multiple data files as a whole, but this is not a limitation.

[0082] In addition, in this embodiment, a "rate-limited replication" strategy is adopted during the process of copying multiple data files from the old cloud storage service to the new cloud storage service. Rate-limited replication refers to limiting the replication speed to avoid affecting the read and write operations of user applications.

[0083] In practice, during the data file copying process by the scaling-down processing component, the new cloud storage service may also experience data read / write traffic from user applications. The priority of data read / write tasks is set higher than that of data copying tasks. Therefore, given the set traffic capacity (e.g., 100MB / s) that the new cloud storage service can provide, the scaling-down processing component determines the upper limit of the data copying traffic for each task based on the user application's data read / write traffic to the new cloud storage service. Under this upper limit constraint, multiple data files are copied from the old cloud storage service to the new cloud storage service. Simply put, if there is currently a large amount of data read / write traffic, the bandwidth used for data copying will be lower.

[0084] Figure 5 A flowchart illustrating a method for adjusting the storage capacity of a cloud storage service provided in an embodiment of the present invention is shown below. Figure 5 As shown, the method may include the following steps:

[0085] 501. The user application has determined that the scaling processing component has changed the data read / write path corresponding to the user application from the old cloud storage service to the new cloud storage service. The scaling processing component is decoupled from the user application. This modification is performed by the scaling processing component after creating a soft link in the new cloud storage service corresponding to the data file stored in the old cloud storage service.

[0086] 502. User applications read and write data in the new cloud storage service based on the modified data read and write path. After the scaling processing component successfully copies the data file from the old cloud storage service to the new cloud storage service, it disconnects the soft link corresponding to the data file in the old cloud storage service and points the user application's data read path to the data file in the new cloud storage service.

[0087] Specifically, user applications perform data read and write operations in the new cloud storage service based on the modified data read and write paths. This includes: reading data from corresponding data files stored in the old storage service through symbolic links in the new cloud storage service, and writing data in the new cloud storage service. In other words, during the data file copying process, data read operations triggered by user applications targeting existing data files stored in the old cloud storage service need to be implemented through corresponding symbolic links, while data write operations will generate corresponding new data files in the new cloud storage service and write the data to be written to these new data files.

[0088] Specifically, user applications perform data read and write operations in the new cloud storage service based on the modified data read and write paths. This includes reading data from data files successfully copied to the new cloud storage service based on the modified data read and write paths. In other words, after successfully copying data files from the old cloud storage service to the new cloud storage service, the symbolic links corresponding to the data files in the old cloud storage service are disconnected, and the user application's data read path is redirected to the data files in the new cloud storage service. That is, after the copying is complete, i.e., after all data files in the old cloud storage service have been successfully copied to the new cloud storage service, the previously created symbolic links (symbolic link files) are overwritten by the corresponding copied data files. At this point, the user application's data read operations will directly target these copied data files.

[0089] The following will describe in detail one or more embodiments of the cloud storage service storage capacity adjustment apparatus of the present invention. Those skilled in the art will understand that these apparatuses can be configured using commercially available hardware components through the steps taught in this solution.

[0090] Figure 6 This is a schematic diagram of a storage capacity adjustment device for a cloud storage service provided in an embodiment of the present invention. The cloud storage service's scaling-down processing device is applied to a scaling-down processing component that is decoupled from user applications using the cloud storage service, such as... Figure 6 As shown, the device includes: a creation module 11, a modification module 12, and a copy module 13.

[0091] Module 11 is created in response to a change instruction from an old cloud storage service to a new cloud storage service. In the new cloud storage service, a soft link is created that corresponds to a data file stored in the old cloud storage service. The soft link is used to read the data file. The storage capacity of the new cloud storage service is different from the storage capacity of the old cloud storage service.

[0092] Modification module 12 is used to modify the data read / write path corresponding to the user application from the old cloud storage service to the new cloud storage service, so that the user application can perform data read / write in the new cloud storage service based on the modified data read / write path.

[0093] The copy module 13 is used to copy the data file from the old cloud storage service to the new cloud storage service. In response to the successful copying of the data file to the new cloud storage service, the soft link corresponding to the data file in the old cloud storage service is disconnected, and the data reading path of the user application is pointed to the data file in the new cloud storage service.

[0094] Figure 6 The device shown can perform the steps executed by the scaling processing component in the foregoing embodiments. For detailed execution process and technical effects, please refer to the description in the foregoing embodiments, which will not be repeated here.

[0095] Figure 7 This is a schematic diagram of another cloud storage service storage capacity adjustment device provided in an embodiment of the present invention. This cloud storage service capacity reduction processing device is applied to user applications using the cloud storage service, such as... Figure 7 As shown, the device includes: a determination module 21 and a read / write module 22.

[0096] The determination module 21 is used to determine that the scaling processing component has changed the data read / write path corresponding to the user application from the old cloud storage service to the new cloud storage service. The scaling processing component is decoupled from the user application. The modification is performed by the scaling processing component after creating a soft link in the new cloud storage service corresponding to the data file stored in the old cloud storage service. The storage capacity of the new cloud storage service is different from the storage capacity of the old cloud storage service. The soft link is used to read the data file.

[0097] The read / write module 22 is used to perform data read / write operations in the new cloud storage service based on the modified data read / write path; wherein, after the scaling processing component successfully copies the data file from the old cloud storage service to the new cloud storage service, it disconnects the soft connection corresponding to the data file in the old cloud storage service and points the data read path of the user application to the data file in the new cloud storage service.

[0098] Figure 7 The device shown can execute the steps performed by the user application in the foregoing embodiments. For detailed execution process and technical effects, please refer to the description in the foregoing embodiments, which will not be repeated here.

[0099] In one possible design, the above Figure 6 , Figure 7 The structure of the device shown can be implemented as an electronic device. For example... Figure 8 As shown, the electronic device may include: a processor 31, a memory 32, and a communication interface 33. The memory 32 stores executable code, which, when executed by the processor 31, enables the processor 31 to at least implement the cloud storage service storage capacity adjustment method provided in the foregoing embodiments.

[0100] In addition, embodiments of the present invention provide a non-transitory machine-readable storage medium storing executable code, which, when executed by a processor of an electronic device, enables the processor to at least implement the cloud storage service storage capacity adjustment method provided in the foregoing embodiments.

[0101] The device embodiments described above are merely illustrative. The network elements described as separate components may or may not be physically separate. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0102] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of a necessary general-purpose hardware platform, or by a combination of hardware and software. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a computer product. The present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0103] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for adjusting the storage capacity of a cloud storage service, characterized in that, The method, applied to a scaling processing component decoupled from user applications using cloud storage services, includes: In response to a change instruction from an old cloud storage service to a new cloud storage service, a soft link is created in the new cloud storage service corresponding to a data file stored in the old cloud storage service. The soft link is used to read the data file. The storage capacity of the new cloud storage service is different from the storage capacity of the old cloud storage service. The data read / write path corresponding to the user application is changed from the old cloud storage service to the new cloud storage service, so that the user application can perform data read / write in the new cloud storage service based on the modified data read / write path. Copy the data file from the old cloud storage service to the new cloud storage service; In response to the successful copying of the data file to the new cloud storage service, the symbolic link corresponding to the data file in the old cloud storage service is disconnected, and the data read path of the user application is redirected to the data file in the new cloud storage service.

2. The method according to claim 1, characterized in that, The step of copying the data file from the old cloud storage service to the new cloud storage service includes: The upper limit of data replication traffic for the replication task is determined based on the data read and write traffic of the user application to the new cloud storage service. Under the constraint of the data replication traffic limit, the data file is copied from the old cloud storage service to the new cloud storage service.

3. The method according to claim 1, characterized in that, The method further includes: In response to the change instruction, determine the first integrity parameter value corresponding to the data file stored in the old cloud storage service; In response to the successful copying of the data file to the new cloud storage service, the second integrity parameter value corresponding to the data file stored in the new cloud storage service is determined; The integrity of the data files stored in the new cloud storage service is determined based on the first integrity parameter value and the second integrity parameter value.

4. The method according to claim 1, characterized in that, The old cloud storage service contains multiple data files; the step of disconnecting the soft link corresponding to the data file in the old cloud storage service and pointing the user application's data read path to the data file in the new cloud storage service in response to the successful copying of the data file to the new cloud storage service includes: In response to the successful copying of any data file from the plurality of data files to the new cloud storage service, the symbolic link corresponding to any data file in the old cloud storage service is disconnected, and the data read path of the user application is redirected to any data file in the new cloud storage service; or... In response to the successful copying of the multiple data files to the new cloud storage service, the soft links corresponding to the multiple data files in the old cloud storage service are disconnected, and the data reading path of the user application is redirected to the multiple data files in the new cloud storage service.

5. The method according to any one of claims 1-4, characterized in that, The step of responding to a change instruction from an old cloud storage service to a new cloud storage service, and creating a symbolic link in the new cloud storage service corresponding to the data file stored in the old cloud storage service, includes: In response to the change instruction, if it is determined that the storage capacity corresponding to the new cloud storage service is less than the storage capacity corresponding to the old cloud storage service, then it is detected whether the data volume of the data file stored in the old cloud storage service is less than the storage capacity corresponding to the new cloud storage service. If the value is less than the specified value, then the symbolic link is created in the new cloud storage service.

6. The method according to any one of claims 1-4, characterized in that, The method further includes: In response to the successful copying of the data files to the new cloud storage service, the old cloud storage service is uninstalled.

7. The method according to any one of claims 1-4, characterized in that, The user application reads and writes data in an append-only manner.

8. A method for adjusting the storage capacity of a cloud storage service, characterized in that, Applied to user applications using cloud storage services, the method includes: It is determined that the scaling processing component has changed the data read / write path corresponding to the user application from the old cloud storage service to the new cloud storage service. The scaling processing component is decoupled from the user application. The modification is performed by the scaling processing component after creating a soft link in the new cloud storage service corresponding to the data file stored in the old cloud storage service. The storage capacity of the new cloud storage service is different from the storage capacity of the old cloud storage service. The soft link is used to read the data file. Data read and write operations are performed in the new cloud storage service based on the modified data read and write path; wherein, after the scaling processing component successfully copies the data file from the old cloud storage service to the new cloud storage service, the soft link corresponding to the data file in the old cloud storage service is disconnected, and the data read path of the user application is pointed to the data file in the new cloud storage service.

9. The method according to claim 8, characterized in that, The data read and write operations based on the modified data read and write path in the new cloud storage service include: Based on the modified data read / write path, data is read from the data file stored in the old cloud storage service through the soft link in the new cloud storage service, and data is written to the new cloud storage service.

10. The method according to claim 8, characterized in that, The data read and write operations based on the modified data read and write path in the new cloud storage service include: Based on the modified data read / write path, data is read from the data file that was successfully copied to the new cloud storage service.

11. The method according to any one of claims 8-10, characterized in that, The user application reads and writes data in an append-only manner.

12. An electronic device, characterized in that, include: The system includes a memory, a processor, and a communication interface; wherein the memory stores executable code, and when the executable code is executed by the processor, the processor performs the storage capacity adjustment method for the cloud storage service as described in any one of claims 1 to 11.

13. A non-transitory machine-readable storage medium, characterized in that, The non-transitory machine-readable storage medium stores executable code, which, when executed by a processor of an electronic device, causes the processor to perform the storage capacity adjustment method for the cloud storage service as described in any one of claims 1 to 11.

14. A computer program product, characterized in that, include: A computer program, when executed by a processor of an electronic device, causes the processor to perform the storage capacity adjustment method for a cloud storage service as described in any one of claims 1 to 11.