Cloud provider replacement method and device, storage medium and electronic equipment

By updating the correspondence and authentication information in the general cloud business storage system when the cloud business is replaced, efficient development of cloud business replacement is achieved, the problem of low development efficiency during cloud business replacement is solved, and the data transmission process between cloud business is simplified .

CN118916426AInactive Publication Date: 2024-11-08广州三七极耀网络科技有限公司
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411150975.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-20
Publication Date
2024-11-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When changing cloud providers, developers need to redesign and adjust the code, resulting in low development efficiency and different service products of different cloud providers have differences in functions, configuration and authentication mechanisms, which increases development complexity.

Method used

The pre-established general cloud commerce storage system is adopted to determine the target storage cloud commerce through the transmission identifier in the data transmission request, and update the corresponding relationship to realize the data transmission service between the business system and the storage cloud commerce, and support ordinary upload and shard upload. , simplify the process of replacing cloud vendors.

Benefits of technology

It improves the development efficiency of cloud providers when replacing them, simplifies the interactive logic between business systems and storage cloud providers, adapts to the functional structure of data transmission of different cloud providers, and reduces the complexity of development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118916426A_ABST
    Figure CN118916426A_ABST
Patent Text Reader

Abstract

The invention discloses a cloud provider replacement method and device, a storage medium and electronic equipment, a universal cloud provider storage system is pre-established, and the universal cloud provider storage system is provided with a function interface for transmitting data with different cloud providers and is used for storing data when a data transmission request sent by a service system is received. And determining a storage cloud provider used by the service system according to the transmission identifier in the data transmission request, and executing a data transmission service between the service system and the storage cloud provider. And when the cloud provider is replaced, the universal cloud provider storage system determines a target cloud provider to be replaced based on the cloud provider replacement request, changes a pre-stored corresponding relationship between the cloud provider to be replaced and the transmission identifier into correspondence between the transmission identifier and the target cloud provider, and executes a data transmission service according to the changed corresponding relationship. According to the method, the universal cloud provider storage system capable of adapting to function interfaces of different cloud providers for data transmission is constructed, the corresponding relation pre-stored in the universal cloud provider storage system is changed, the cloud providers are replaced, and the development efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computers, and more particularly to a cloud business replacement method, device, storage medium, and electronic device. Background Art

[0002] Object Storage Service (OSS) is a cloud storage solution that can store and retrieve large amounts of data in the form of objects, such as unstructured data such as pictures, videos, and documents. Uploading and downloading data in the form of objects means that data is not organized in the traditional file system hierarchy, such as directories and subdirectories, but is managed as independent entities (i.e. objects).

[0003] In the OSS scenario, each cloud service provider, i.e., cloud vendor, usually provides its own software development kit (SDK) and development libraries to simplify the development process for developers. However, as needs change, developers may need to change cloud vendors, which means that the SDK and related libraries used need to be replaced, which may involve changes to a large number of calls in the code. For example, due to functional differences in the service products provided by different cloud vendors, even if they seem similar, there may be differences in specific functions, configuration options or performance. Such differences may cause some logic or configuration in the original code to no longer apply. For another example, due to different authentication and authorization mechanisms of different cloud vendors, this means that when changing cloud service providers, the authentication logic in the code also needs to be adjusted accordingly. For another example, due to differences in operating environment and configuration, if the business system is deployed in a specific operating environment provided by the cloud vendor or uses its specific service configuration, changing the cloud vendor may require redesigning the deployment architecture and configuration method of the business system.

[0004] In short, when changing cloud providers, developers are required to redevelop the system, which makes development efficiency extremely low.

[0005] Based on this, this specification provides a cloud merchant replacement method. Summary of the invention

[0006] This specification provides a cloud business replacement method, device, storage medium and electronic device to partially solve the above-mentioned problems existing in the prior art.

[0007] This manual adopts the following technical solutions:

[0008] This specification provides a cloud provider replacement method, the method is applied to a pre-established universal cloud provider storage system, the universal cloud provider storage system has a functional interface for transmitting data with different cloud providers, the universal cloud provider storage system is used to determine the storage cloud provider used by the business system according to the transmission identifier in the data transmission request when receiving a data transmission request sent by a business system, and execute the data transmission service between the business system and the storage cloud provider, the method comprising:

[0009] Receiving a cloud business replacement request sent by the business system;

[0010] According to the cloud vendor replacement request, determine a target business system from a plurality of business systems; and determine a target cloud vendor for the target business system;

[0011] Determine a pre-stored correspondence between the target business system's to-be-replaced cloud provider and the transmission identifier;

[0012] Changing the cloud vendor to be replaced corresponding to the transmission identifier to the target cloud vendor to obtain an updated corresponding relationship;

[0013] Based on the updated corresponding relationship, the data transmission service between the target service system and the target storage cloud provider is executed.

[0014] Optionally, before executing the data transmission service between the target service system and the target storage cloud provider, the method further includes:

[0015] The authentication information of the target storage cloud provider is sent to the target business system.

[0016] Optionally, based on the updated corresponding relationship, executing a data transmission service between the target service system and the target storage cloud provider specifically includes:

[0017] Receiving a data transmission request sent by the target business system;

[0018] Determining a target storage cloud provider for the target business system based on the transmission identifier in the data transmission request and the updated corresponding relationship;

[0019] Performing cloud vendor authentication on the target storage cloud vendor according to the authentication information in the data transmission request;

[0020] Based on the cloud vendor authentication result, a data transmission service between the target service system and the target storage cloud vendor is executed.

[0021] Optionally, the data transmission request includes information of files to be stored;

[0022] Based on the cloud vendor authentication result, executing the data transmission service between the target business system and the target storage cloud vendor, specifically including:

[0023] When the cloud merchant authentication result is authentication passed, judging whether to execute instant transmission according to the file identifier in the file information to be stored;

[0024] If not, determining the file size of the file to be stored in the file information to be stored;

[0025] Determine the upload type according to the file size;

[0026] The file to be stored is uploaded according to the upload type.

[0027] Optionally, the upload type includes normal upload;

[0028] According to the upload type, uploading the file to be stored specifically includes:

[0029] When the upload type is a normal upload, the function interface of the target storage cloud provider is called to upload the file to be stored to the target storage cloud provider, and a file access link is displayed.

[0030] Optionally, the upload type includes multi-part upload;

[0031] According to the upload type, uploading the file to be stored specifically includes:

[0032] When the upload type is multi-segment upload, determining whether the file to be stored has completed segment initialization;

[0033] If not, the file to be stored is initialized for slicing according to a preset slicing rule to obtain a slicing result of the file to be stored, and an initialization identifier of the file to be stored is determined, and the initialization identifier is sent to the target business system;

[0034] If so, obtain the fragmentation result of the file to be stored, and upload the fragments according to the fragmentation result.

[0035] Optionally, performing segmented uploading according to the segmentation result specifically includes:

[0036] In the stored sharding information, determining whether there is a sharding index that matches the sharding index in the sharding result;

[0037] If yes, then perform breakpoint resume according to the fragment index in the fragment result;

[0038] If not, then according to the sharding result, the functional interface of the target storage cloud provider is called to store each shard of the file to be stored in the target storage cloud provider, and the sharding index of each shard in the sharding result is stored.

[0039] Optionally, the method further comprises:

[0040] When the number of shards of the file to be stored reaches a preset number, the function interface of the target storage cloud provider is called to merge the shards;

[0041] According to the preset callback rules, the file upload completion information is returned to the preset callback address.

[0042] The present specification provides a cloud provider replacement device, which is applied to a pre-established universal cloud provider storage system, which has a functional interface for transmitting data with different cloud providers, and is used for determining the storage cloud provider used by the business system according to the transmission identifier in the data transmission request when receiving a data transmission request sent by a business system, and executing the data transmission service between the business system and the storage cloud provider, and the device includes:

[0043] A request receiving module, used to receive a cloud business replacement request sent by the business system;

[0044] A target cloud vendor determining module is used to determine a target business system from a plurality of business systems according to the cloud vendor replacement request; and determine a target cloud vendor of the target business system;

[0045] A correspondence determination module, used to determine a pre-stored correspondence between the target business system's to-be-replaced cloud vendor and the transmission identifier;

[0046] A corresponding relationship updating module, used for changing the cloud vendor to be replaced corresponding to the transmission identifier to the target cloud vendor, and obtaining an updated corresponding relationship;

[0047] The service execution module is used to execute the data transmission service between the target service system and the target storage cloud provider based on the updated corresponding relationship.

[0048] Optionally, the device further comprises:

[0049] The authentication information sending module is used to send the authentication information of the target storage cloud provider to the target business system before executing the data transmission service between the target business system and the target storage cloud provider.

[0050] Optionally, the business execution module is specifically used to receive a data transmission request sent by the target business system; determine the target storage cloud provider of the target business system based on the transmission identifier in the data transmission request and the updated corresponding relationship; perform cloud provider authentication on the target storage cloud provider according to the authentication information in the data transmission request; and execute the data transmission service between the target business system and the target storage cloud provider based on the cloud provider authentication result.

[0051] Optionally, the data transmission request includes information of files to be stored;

[0052] The business execution module is specifically used to, when the cloud merchant authentication result is authentication passed, determine whether to execute instant transmission according to the file identifier in the file information to be stored; if not, determine the file size of the file to be stored in the file information to be stored; determine the upload type according to the file size; and upload the file to be stored according to the upload type.

[0053] Optionally, the upload type includes normal upload;

[0054] The business execution module is specifically used to, when the upload type is a common upload, call the function interface of the target storage cloud provider, upload the file to be stored to the target storage cloud provider, and display a file access link.

[0055] Optionally, the upload type includes multi-part upload;

[0056] The business execution module is specifically used to, when the upload type is multi-segment upload, determine whether the file to be stored has completed segment initialization; if not, perform segment initialization on the file to be stored according to a preset segment rule, obtain the segment result of the file to be stored, determine the initialization identifier of the file to be stored, and send the initialization identifier to the target business system; if so, obtain the segment result of the file to be stored, and perform segment upload according to the segment result.

[0057] Optionally, the business execution module is specifically used to determine whether there is a shard index matching the shard index in the shard result in the stored shard information; if so, perform breakpoint resume according to the shard index in the shard result; if not, call the functional interface of the target storage cloud provider according to the shard result, store each shard of the file to be stored in the target storage cloud provider, and store the shard index of each shard in the shard result.

[0058] Optionally, the device further comprises:

[0059] The merge callback module is used to call the function interface of the target storage cloud provider to merge the fragments when the number of fragments of the file to be stored for uploading reaches a preset number; according to the preset callback rules, the file upload completion information is returned to the preset callback address.

[0060] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned cloud merchant replacement method is implemented.

[0061] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned cloud vendor replacement method when executing the program.

[0062] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects:

[0063] It can be seen from the cloud merchant replacement method provided in this specification that this method pre-establishes a universal cloud merchant storage system, which has a functional interface for transmitting data with different cloud merchants, and is used to determine the storage cloud merchant used by the business system according to the transmission identifier in the data transmission request when receiving a data transmission request sent by the business system, and execute the data transmission service between the business system and the storage cloud merchant. When replacing a cloud merchant, the universal cloud merchant storage system determines the target cloud merchant to be replaced based on the cloud merchant replacement request, and changes the pre-stored correspondence between the cloud merchant to be replaced and the transmission identifier in the data transmission request to the correspondence between the transmission identifier and the target cloud merchant, so as to execute the data transmission service according to the changed correspondence. This method improves development efficiency by constructing a universal cloud merchant storage system with a functional structure that can adapt to the transmission data of different cloud merchants, changing the pre-stored correspondence in the universal cloud merchant storage system, and replacing cloud merchants. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings:

[0065] Figure 1 A flowchart of a cloud business replacement method provided in this specification;

[0066] Figure 2 A data transmission flow chart provided in this manual;

[0067] Figure 3 Another data transmission service flow chart provided for this specification;

[0068] Figure 4A schematic diagram of file upload provided for this manual;

[0069] Figure 5 A schematic diagram of a cloud business replacement device provided in this manual;

[0070] Figure 6 A method corresponding to the Figure 1 Schematic diagram of the structure of an electronic device. DETAILED DESCRIPTION

[0071] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.

[0072] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.

[0073] In the OSS scenario, in order to simplify the development process of the business system and the cloud vendor's transmission business, developers usually use the SDK and development library provided by the cloud vendor. However, when the cloud vendor service expires or other cloud vendors need to be replaced, due to differences in the calling logic and other aspects of the transmission business execution between the cloud vendor before and after the replacement, developers need to redesign the business system and the transmission business process of the replaced cloud vendor, and write the corresponding code, which makes the development efficiency extremely low. Therefore, this manual provides a cloud vendor replacement method, and the executor of this manual is a pre-built general cloud vendor storage system.

[0074] Figure 1 The following is a flowchart of a cloud business replacement method provided in this specification, including the following steps:

[0075] S100: receiving a cloud business replacement request sent by the business system.

[0076] The universal cloud merchant storage system is obtained based on the logical abstraction of each cloud merchant during data transmission. The data transmission process includes ordinary upload, shard initialization in shard upload, breakpoint return, progress rollback, shard merging, etc. You can first obtain the API documents and development guides of each cloud merchant, determine the various services, endpoints, request / response formats, authentication mechanisms, error handling, etc. provided by each cloud merchant, and determine the commonalities and differences of these features. According to the commonalities and differences of the aforementioned features, determine the functions of the universal cloud merchant storage system, including request construction, authentication, error handling, logging and monitoring, etc. Design according to the determined functions. It is also necessary to configure an adapter for each cloud merchant, which is used to handle details related to a specific cloud merchant, such as URL format, authentication method, exception handling, etc. The universal cloud merchant storage system has a functional interface for transmitting data with different cloud merchants, and the universal cloud merchant storage system adapts to the APIs of each cloud merchant.

[0077] Figure 2 A data transmission flow chart provided in this manual, such as Figure 2 shown.

[0078] The user uploads data through the business system, and the business system sends a data transmission request to the general cloud vendor storage system based on the user's upload operation. When the general cloud vendor storage system receives a data transmission request sent by the business system, it determines the storage cloud vendor used by the business system based on the transmission identifier in the data transmission request, and executes the data transmission service between the business system and the storage cloud vendor. Of course, the user may also obtain data through the business system, and the business system sends a data transmission request to the general cloud vendor storage system based on the user's download operation. In other words, the data transmission service includes uploading data from the business system to the storage cloud vendor, and also includes forwarding data from the storage cloud vendor to the business system.

[0079] After the user completes the upload, the general cloud merchant storage system usually returns a file access link to the user through the business system for the user to query the uploaded data. Therefore, when the user obtains the data, the user's download operation includes clicking on the returned data query link. Of course, other methods can also be used to enable the user to complete the download operation, and this manual does not limit this. For example, in a game scenario, the business system can be a game system, which triggers a download operation based on the user's login operation, and obtains the game archive process stored by the user in the storage cloud merchant through the general cloud merchant storage system.

[0080] After obtaining the pre-built universal cloud provider storage system, when the cloud provider needs to be replaced, the business system can send a cloud provider replacement request to the universal cloud provider storage system, and the universal cloud provider storage system receives the cloud provider replacement request sent by the business system, and performs a cloud provider replacement operation based on the cloud provider replacement request. The business system can determine whether its own storage cloud provider has changed according to a preset period, for example, the name of the storage cloud provider of the storage business system itself, and determine whether the name of the storage cloud provider stored by itself has changed according to a preset period. If so, a cloud provider replacement request is sent to the universal cloud provider storage system, and if not, the data transmission service is performed normally.

[0081] S102: Determine a target business system from a plurality of business systems according to the cloud vendor replacement request; and determine a target cloud vendor of the target business system.

[0082] In one or more embodiments of the present description, the universal cloud merchant storage system may correspond to several business systems. Therefore, after receiving the cloud merchant replacement request, the universal cloud merchant storage system may first determine the target business system among several business systems based on the cloud merchant replacement request. When a business system interacts with the universal cloud merchant storage system, it usually carries its own identification information in the interaction information. This identification information may be an ID, name, address, universally unique identifier (Universally Unique Identifier, UUID) or any other information that can uniquely identify the business system itself. Taking ID as an example, the cloud merchant replacement request includes the ID of the business system itself, so the universal cloud merchant storage system can determine the target business system based on the ID.

[0083] In addition, the cloud vendor replacement request also includes the cloud vendor information of the target business system to be replaced. Then, the general cloud vendor storage system can determine the target cloud vendor of the target business system according to the cloud vendor replacement request. The target cloud vendor refers to the name of the storage cloud vendor after the target business system is replaced. For example, the name of the storage cloud vendor of the target business system before the replacement is A, and the target cloud vendor is B. Then, after the replacement, the name of the storage cloud vendor of the target business system is changed to B. It should be noted that the name change of the storage cloud vendor means that the storage cloud vendor corresponding to the business system is changed.

[0084] S104: Determine a pre-stored correspondence between the cloud provider to be replaced of the target business system and the transmission identifier.

[0085] The general cloud vendor storage system usually stores the relationship between the name of the storage cloud vendor of each business system and the transmission identifier. For example, the transmission identifier is 1, and the corresponding storage cloud vendor's name is C. Therefore, when the cloud vendor is replaced, it is also necessary to determine the correspondence between the pre-stored cloud vendor to be replaced of the target business system and the transmission identifier. The cloud vendor to be replaced refers to the name of the storage cloud vendor to be replaced. Then, the cloud vendor to be replaced of the target business system refers to the name of the storage cloud vendor to be replaced of the target business system. Using the above example, the cloud vendor to be replaced is A.

[0086] S106: Changing the cloud vendor to be replaced corresponding to the transmission identifier to the target cloud vendor to obtain an updated corresponding relationship.

[0087] In one or more embodiments of the present specification, after determining the cloud merchant to be replaced, the cloud merchant to be replaced corresponding to the transmission identifier can be changed to the target cloud merchant to obtain an updated corresponding relationship. For example, the transmission identifier is 1, the cloud merchant to be replaced is A, and the target cloud merchant is B. Before the update, the corresponding relationship is 1 corresponding to A, then, after the update, 1 corresponds to B. For the business system, the update of the cloud merchant is imperceptible, that is, when the data is transmitted, the transmission identifier sent to the universal cloud merchant storage system by the target business system before and after the cloud merchant is replaced does not change. For the universal cloud merchant storage system, it is only necessary to modify the pre-stored corresponding relationship to complete the cloud merchant replacement. This is because the universal cloud merchant storage system has a functional interface for transmitting data with different cloud merchants. After the corresponding relationship is replaced, since the functional interface corresponding to each cloud merchant is fixed, and the name of the storage cloud merchant is replaced, the replacement of the storage cloud merchant is completed, that is, the replacement of the functional interface is completed. For developers, they only need to determine whether the cloud provider needs to be changed. If so, the name of the replaced storage cloud provider is stored in the business system so that the business system can perceive the need to change the cloud provider and send a cloud provider change request to the general cloud provider storage system, thereby improving the development efficiency of developers.

[0088] S108: Based on the updated corresponding relationship, execute the data transmission service between the target service system and the target storage cloud provider.

[0089] Specifically, after the corresponding relationship is updated, the data transmission service between the target business system and the target storage cloud provider can be executed.

[0090] based on Figure 1The cloud merchant replacement method shown in the figure pre-establishes a universal cloud merchant storage system, which has a functional interface for transmitting data with different cloud merchants, and is used to determine the storage cloud merchant used by the business system based on the transmission identifier in the data transmission request when receiving a data transmission request sent by the business system, and execute the data transmission service between the business system and the storage cloud merchant. When replacing a cloud merchant, the universal cloud merchant storage system determines the target cloud merchant to be replaced based on the cloud merchant replacement request, and changes the pre-stored correspondence between the cloud merchant to be replaced and the transmission identifier in the data transmission request to the correspondence between the transmission identifier and the target cloud merchant, so as to execute the data transmission service according to the changed correspondence. The method improves development efficiency by constructing a universal cloud merchant storage system with a functional structure that can adapt to the transmission of data from different cloud merchants, changing the pre-stored correspondence in the universal cloud merchant storage system, and replacing cloud merchants.

[0091] Before executing step S108, since the target business system has changed the storage cloud provider, the cloud provider's authentication information also needs to be changed. Therefore, the general cloud provider storage system sends the authentication information of the target storage cloud provider to the target business system based on the updated corresponding relationship, wherein the target storage cloud provider is the storage cloud provider of the target business system after the update, and the target cloud provider is the name of the target storage cloud provider.

[0092] It should be noted that the correspondence provided in this specification is the correspondence between the transmission identifier and the name of the storage cloud provider, but this specification does not limit this correspondence, that is, the correspondence can also be the correspondence between the transmission identifier and other information, as long as the other information can determine the unique storage cloud provider.

[0093] Further, with respect to step S108, Figure 3 Another data transmission service flow chart provided for this specification is as follows: Figure 3 shown.

[0094] After the corresponding relationship is updated, before executing the data transmission service between the target storage cloud provider and the target business system, cloud provider authentication is required first, that is, to determine whether the target business system has the authority to transmit to the target storage cloud provider. If so, the target business system interacts with the corresponding storage cloud provider through the general cloud provider storage system. The authentication information may include cloud provider secret keys, signatures, etc., which can be used to determine the credentials of the unique storage cloud provider. The authentication information can also be used to encrypt the file information to be stored to reduce the risk of data theft. Then, when the user performs data transmission based on the target business system, the target business system can first use the authentication information to encrypt the file to be stored, and then send a data transmission request to the general cloud provider storage system. The general cloud provider storage system receives the data transmission request sent by the target business system, which includes a transmission identifier, file information to be stored, authentication information, etc. The general cloud provider storage system determines the target storage cloud provider of the target business system based on the transmission identifier in the data transmission request and the updated corresponding relationship. According to the authentication information in the data transmission request, the target storage cloud provider is authenticated, and based on the cloud provider authentication result, the data transmission service between the target business system and the target storage cloud provider is executed.

[0095] When the cloud merchant authentication result is authentication failure, the general cloud merchant storage system can return the transmission failure information to the target business system. When the cloud merchant authentication result is authentication success, it is determined whether to perform instant transmission based on the file identifier in the file information to be stored. Specifically, the general cloud merchant storage system can determine whether there is a file identifier that matches the file identifier of the file to be stored in the file information to be stored in the stored file identifier library. If so, it means that the file to be stored has been uploaded, then the file access link is returned to the target business system to complete the instant transmission. The instant transmission avoids storing redundant data and saves cloud storage space. Among them, the file identifier can be an MD5 value. An important feature of MD5 is that even a small change in data will result in a significant change in the output hash value. Therefore, the probability that the MD5 values ​​of two different files are the same is extremely low. Of course, the file identifier can also be other information types that can uniquely represent files, and this manual does not limit this.

[0096] If there is no file identifier that matches the file identifier of the file to be stored in the file information to be stored, determine the file size of the file to be stored in the file information to be stored, determine the upload type based on the file size, and upload the file to be stored based on the upload type.

[0097] Specifically, Figure 4 The file upload diagram provided for this manual is as follows: Figure 4 shown.

[0098] The general cloud business storage system first determines whether the size of the file to be stored is greater than the preset file size. If so, the upload type of the file to be stored is multi-part upload. If not, the upload type of the file to be stored is ordinary upload. For example, if the preset file size is 10MB, if the file to be stored is 5MB, the upload type of the file to be stored is ordinary upload. If the file to be stored is 11MB, the upload type of the file to be stored is multi-part upload.

[0099] When the upload type of the file to be stored is a normal upload, the functional interface of the target storage cloud provider is called to upload the file to be stored to the target storage cloud provider and display the file access link. The general cloud provider storage system sends the file access link to the target business system to display the file access link to the user through the target business system.

[0100] When the upload type of the file to be stored is multi-slice upload, it is also necessary to determine whether the file to be stored has executed the multi-slice initialization process to avoid repeated initialization of the slices. For the general cloud storage system, no matter what the upload type is, the file identifier of the file to be stored will be recorded only after the file to be stored is completely stored in the corresponding storage cloud. However, during the process of storing files, the file to be stored may not be stored completely due to network failure or other reasons. In this case, the general cloud storage system will not store the file identifier of the file to be stored. If the upload type of the file to be stored that has not been completely stored is multi-slice upload, the file to be stored may have executed the multi-slice initialization process. In this case, there is no need to perform multi-slice initialization the next time it is uploaded again.

[0101] The general cloud business storage system can determine whether the file to be stored has completed the shard initialization by determining whether the file to be stored has an initialization mark. If the file to be stored does not have an initialization mark, the file to be stored has not completed the shard initialization. If the file to be stored has an initialization mark, the file to be stored has completed the shard initialization, wherein, if the file to be stored has completed the shard initialization, the initialization mark of the file to be stored is usually in the file information to be stored. Therefore, the general cloud business storage system can search for the initialization mark of the file to be stored in the acquired file information to be stored.

[0102] If the file to be stored has not completed the sharding initialization, the general cloud business storage system can perform sharding initialization on the file to be stored according to the preset sharding rules, and obtain the sharding result of the file to be stored, which includes several shards of the file to be stored and the sharding index corresponding to each shard. And determine the initialization identifier of the file to be stored, and send the initialization identifier to the target business system. The initialization identifier is sent to the target business system in order to avoid repeated initialization when the shards are uploaded again in the event of network failures and other problems in the future. This manual does not limit the specific sharding rules, which can be set as needed.

[0103] Of course, the information of incomplete shard initialization of the file to be stored can also be sent to the target business system so that the target business system can complete the process of shard initialization of the file to be stored, and send the shard results of the file to be stored to the general cloud business storage system so that the general cloud business storage system can upload the file to be stored in segments.

[0104] If the file to be stored completes the sharding initialization, the file to be stored information also includes the sharding result of the file to be stored. The general cloud business storage system can obtain the sharding result of the file to be stored, and then upload the shards according to the sharding result. The sharding index can be an MD5 value, and the MD5 value of the file to be stored is different from the MD5 value of the shard of the file to be stored.

[0105] Since the file to be stored has completed the initialization sharding before this storage, the file to be stored may have been uploaded in pieces, but due to network failure and other reasons, the file to be stored has not been fully uploaded. In order to determine whether the file to be stored is uploaded in pieces for the first time, the general cloud business storage system can also determine whether there is a shard index matching the shard index in the shard result in the stored shard information. If so, it means that the file to be stored is not uploaded in pieces for the first time, and the breakpoint resume is performed according to the shard index in the shard result. Among them, the shard information refers to the collection of shard indexes of the uploaded shards.

[0106] According to the shard index in the shard result, when performing breakpoint resume, the general cloud merchant storage system can obtain the stored shard index of the file to be stored according to the initialization identifier of the file to be stored, and return the stored shard index of the file to be stored to the target business system. The target business system determines the unstored shard index and shard of the file to be stored based on the returned stored shard index of the file to be stored. The unstored shard index and shard of the file to be stored are sent to the general cloud merchant storage system. The general cloud merchant storage system uploads the unstored shard of the file to be stored to the target storage cloud by calling the functional interface of the target storage cloud, and stores the shard index of each shard. By resuming the breakpoint transfer, there is no need to start storage from the beginning during the subsequent transmission process.

[0107] In addition, if there is a shard index that matches the shard index in the shard result, the general cloud business storage system can also roll back the progress according to the shard index in the shard result.

[0108] If there is no shard index matching the shard index in the shard result in the stored shard information, it means that the file to be stored is uploaded for the first time. The general cloud vendor storage system calls the function interface of the target storage cloud vendor based on the shard result, stores each shard of the file to be stored to the target storage cloud vendor, and stores the shard index of each shard in the shard result.

[0109] When the number of shards uploaded by the file to be stored reaches the preset number, the function interface of the target storage cloud provider is called to merge the shards. If the number of shards uploaded by the file to be stored reaches the preset number, it means that each shard of the file to be stored is stored in the target storage cloud provider, and the shards can be merged to obtain a complete file to be stored. If the preset number of shards is not reached, a request to obtain shards can be sent to the target business system to obtain the shards that have not been uploaded. The preset number of shards matches the preset sharding rule.

[0110] For example, the preset fragmentation rule is to split one fragment for every 1MB. If the file size of the file to be stored is 10MB, the file to be stored has 10 fragments, and the preset number of fragments is 10.

[0111] When the file to be stored is uploaded, the general cloud business storage system stores the file identifier of the file to be stored so that it can be uploaded in seconds next time, and returns the file access link to the target business system. The general cloud business storage system can also return the file upload completion information to the preset callback address according to the preset callback rules. The preset callback rules include judging whether to call back based on the file type of the file to be stored. For example, if the file type of the file to be stored is an image type, the callback is not executed. If the file type of the file to be stored is a non-image type, the callback is executed. The callback can avoid the problem of the target business system being aware of the user's operation, that is, not knowing what kind of file the user uploaded and the problem of business file records being lost.

[0112] This specification simplifies the logical complexity of the interaction between the business system and the storage cloud provider by establishing a universal cloud provider storage system, thereby improving the development efficiency of developers.

[0113] The above is one or more implementation methods of this specification, based on Figure 1 The flowchart of the cloud business replacement method shown in FIG. 1 is also provided in this specification. The corresponding cloud business replacement device is provided, such as Figure 5 shown.

[0114] Figure 5 This is a schematic diagram of a cloud provider replacement device provided in this specification, the device is applied to a pre-established universal cloud provider storage system, the universal cloud provider storage system has a functional interface for transmitting data with different cloud providers, the universal cloud provider storage system is used to determine the storage cloud provider used by the business system according to the transmission identifier in the data transmission request when receiving a data transmission request sent by the business system, and execute the data transmission service between the business system and the storage cloud provider, including:

[0115] A request receiving module 500, configured to receive a cloud business replacement request sent by the business system;

[0116] The target cloud vendor determining module 502 is used to determine a target business system from a plurality of business systems according to the cloud vendor replacement request; and determine a target cloud vendor of the target business system;

[0117] A correspondence determination module 504, configured to determine a pre-stored correspondence between the target business system's to-be-replaced cloud vendor and the transmission identifier;

[0118] A corresponding relationship updating module 506, configured to change the cloud vendor to be replaced corresponding to the transmission identifier to the target cloud vendor, and obtain an updated corresponding relationship;

[0119] The service execution module 508 is used to execute the data transmission service between the target service system and the target storage cloud provider based on the updated corresponding relationship.

[0120] Optionally, the device further comprises:

[0121] The authentication information sending module 510 is used to send the authentication information of the target storage cloud provider to the target business system before executing the data transmission service between the target business system and the target storage cloud provider.

[0122] Optionally, the business execution module 508 is specifically used to receive a data transmission request sent by the target business system; determine the target storage cloud provider of the target business system based on the transmission identifier in the data transmission request and the updated corresponding relationship; perform cloud provider authentication on the target storage cloud provider according to the authentication information in the data transmission request; and execute the data transmission service between the target business system and the target storage cloud provider based on the cloud provider authentication result.

[0123] Optionally, the data transmission request includes information of files to be stored;

[0124] The business execution module 508 is specifically used to, when the cloud merchant authentication result is authentication passed, determine whether to execute instant transmission according to the file identifier in the file information to be stored; if not, determine the file size of the file to be stored in the file information to be stored; determine the upload type according to the file size; and upload the file to be stored according to the upload type.

[0125] Optionally, the upload type includes normal upload;

[0126] The service execution module 508 is specifically configured to, when the upload type is a common upload, call the function interface of the target storage cloud provider, upload the file to be stored to the target storage cloud provider, and display a file access link.

[0127] Optionally, the upload type includes multi-part upload;

[0128] The business execution module 508 is specifically used to, when the upload type is multi-part upload, determine whether the file to be stored has completed the multi-part initialization; if not, perform multi-part initialization on the file to be stored according to the preset multi-part rule, obtain the multi-part result of the file to be stored, determine the initialization identifier of the file to be stored, and send the initialization identifier to the target business system; if so, obtain the multi-part result of the file to be stored, and perform multi-part upload according to the multi-part result.

[0129] Optionally, the business execution module 508 is specifically used to determine whether there is a shard index matching the shard index in the shard result in the stored shard information; if so, perform breakpoint resume according to the shard index in the shard result; if not, call the functional interface of the target storage cloud provider according to the shard result, store each shard of the file to be stored in the target storage cloud provider, and store the shard index of each shard in the shard result.

[0130] Optionally, the device further comprises:

[0131] The merge callback module 512 is used to call the function interface of the target storage cloud provider to merge the fragments when the number of fragments of the file to be stored for uploading reaches a preset number; according to the preset callback rules, the file upload completion information is returned to the preset callback address.

[0132] This specification also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 A method for replacing cloud providers is provided.

[0133] This manual also provides Figure 6 The one shown corresponds to Figure 1 Schematic diagram of the structure of an electronic device. Figure 6 As shown, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 The cloud vendor replacement method.

[0134] Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the executor of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0135] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0136] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0137] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0138] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0139] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification may 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.) that contain computer-usable program code.

[0140] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0141] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0142] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0143] In a typical configuration, a computing device includes one or more processors (first chips), input / output interfaces, network interfaces, and memory.

[0144] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0145] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0146] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0147] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may 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.

[0148] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0149] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0150] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.

Claims

1. A cloud business replacement method, characterized in that: The method is applied to a pre-established universal cloud vendor storage system, the universal cloud vendor storage system having a functional interface for transmitting data with different cloud vendors, the universal cloud vendor storage system being used to determine the storage cloud vendor used by the business system according to the transmission identifier in the data transmission request when receiving a data transmission request sent by the business system, and executing a data transmission service between the business system and the storage cloud vendor, the method comprising: Receiving a cloud business replacement request sent by the business system; According to the cloud vendor replacement request, determine a target business system from a plurality of business systems; and determine a target cloud vendor for the target business system; Determine a pre-stored correspondence between the target business system's to-be-replaced cloud provider and the transmission identifier; Changing the cloud vendor to be replaced corresponding to the transmission identifier to the target cloud vendor to obtain an updated corresponding relationship; Based on the updated corresponding relationship, the data transmission service between the target service system and the target storage cloud provider is executed.

2. The method according to claim 1, characterized in that Before executing the data transmission service between the target service system and the target storage cloud provider, the method further includes: The authentication information of the target storage cloud provider is sent to the target business system.

3. The method according to claim 2, characterized in that Based on the updated corresponding relationship, executing the data transmission service between the target business system and the target storage cloud provider specifically includes: Receiving a data transmission request sent by the target business system; Determining a target storage cloud provider for the target business system based on the transmission identifier in the data transmission request and the updated corresponding relationship; Performing cloud vendor authentication on the target storage cloud vendor according to the authentication information in the data transmission request; Based on the cloud vendor authentication result, a data transmission service between the target service system and the target storage cloud vendor is executed.

4. The method according to claim 3, characterized in that The data transmission request includes information of the file to be stored; Based on the cloud vendor authentication result, executing the data transmission service between the target business system and the target storage cloud vendor, specifically including: When the cloud merchant authentication result is authentication passed, judging whether to execute instant transmission according to the file identifier in the file information to be stored; If not, determining the file size of the file to be stored in the file information to be stored; Determine the upload type according to the file size; The file to be stored is uploaded according to the upload type.

5. The method according to claim 4, characterized in that The upload type includes ordinary upload; According to the upload type, uploading the file to be stored specifically includes: When the upload type is a normal upload, the function interface of the target storage cloud provider is called to upload the file to be stored to the target storage cloud provider, and a file access link is displayed.

6. The method according to claim 4, characterized in that The upload type includes multi-part upload; According to the upload type, uploading the file to be stored specifically includes: When the upload type is multi-segment upload, determining whether the file to be stored has completed segment initialization; If not, the file to be stored is initialized for slicing according to a preset slicing rule to obtain a slicing result of the file to be stored, and an initialization identifier of the file to be stored is determined, and the initialization identifier is sent to the target business system; If so, obtain the fragmentation result of the file to be stored, and upload the fragments according to the fragmentation result.

7. The method according to claim 6, characterized in that According to the fragmentation result, the fragmentation uploading is performed, which specifically includes: In the stored sharding information, determining whether there is a sharding index that matches the sharding index in the sharding result; If yes, then perform breakpoint resume according to the fragment index in the fragment result; If not, then according to the sharding result, the functional interface of the target storage cloud provider is called to store each shard of the file to be stored in the target storage cloud provider, and the sharding index of each shard in the sharding result is stored.

8. The method according to claim 6, characterized in that The method further comprises: When the number of shards of the file to be stored reaches a preset number, the function interface of the target storage cloud provider is called to merge the shards; According to the preset callback rules, the file upload completion information is returned to the preset callback address.

9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Multi-cloud resource data processing method and device, equipment and storage medium

    CN116723246A

  • Interface processing method, device and system based on multi-cloud management and storage medium

    CN116795548A

  • Locally Connected Cloud Storage Device

    US20130117337A1