技术领域Technical Field
本发明实施例涉及数据存储技术领域,尤其涉及一种数据迁移方法、装置、计算机设备和存储介质。Embodiments of the present invention relate to the technical field of data storage, and in particular to a data migration method, apparatus, computer equipment, and storage medium.
背景技术Background technique
数据存储是当前软件开发的重要组成部分,软件开发过程中往往离不开数据存储的支持。常见存储服务的使用方法为使用各厂商提供的软件开发工具集合(SoftwareDevelopment Kit,SDK),不同厂商提供的SDK可以基于不同的开发语言以及开发逻辑生成。而在云存储服务用户往往会根据业务需要将存储服务从一个厂商迁移到另一个厂商,由于各厂商支持的存储服务不同,导致上层业务程序需要根据新的厂商的存储服务进行修改。而上层业务程序规模往往较为庞大,极大影响了存储服务的迁移,甚至导致用户不得不放弃更换存储服务。在云存储服务领域,目前急需一种数据迁移方法,屏蔽不同厂商之间的存储服务差异,减少存储服务迁移对上层业务程序的影响,提高存储数据迁移效率。Data storage is an important part of current software development, and the software development process is often inseparable from the support of data storage. The common method of using storage services is to use the software development kit (SDK) provided by various vendors. The SDKs provided by different vendors can be generated based on different development languages and development logics. In cloud storage service users often migrate storage services from one vendor to another according to business needs. Since the storage services supported by various vendors are different, the upper-level business programs need to be modified according to the storage services of the new vendor. The scale of upper-level business programs is often large, which greatly affects the migration of storage services, and even causes users to give up changing storage services. In the field of cloud storage services, there is an urgent need for a data migration method to shield the differences in storage services between different vendors, reduce the impact of storage service migration on upper-level business programs, and improve the efficiency of storage data migration.
发明内容Summary of the invention
本发明提供一种数据迁移方法、装置、计算机设备和存储介质,以实现跨厂商的存储服务迁移,减少数据迁移对上层业务程序的影响,提高数据迁移效率。The present invention provides a data migration method, device, computer equipment and storage medium to realize storage service migration across vendors, reduce the impact of data migration on upper-level business programs, and improve data migration efficiency.
第一方面,本发明实施例提供了一种数据迁移方法,其中,该方法包括:In a first aspect, an embodiment of the present invention provides a data migration method, wherein the method includes:
获取存储服务切换信息,并根据所述存储服务切换信息确定运营商;Acquire storage service switching information, and determine the operator according to the storage service switching information;
根据所述运营商对应的操作接口库处理所述存储服务器切换信息以完成所述存储服务切换信息对应的数据迁移。The storage server switching information is processed according to the operation interface library corresponding to the operator to complete the data migration corresponding to the storage service switching information.
第二方面,本发明实施例还提供了一种数据迁移装置,该装置包括:In a second aspect, an embodiment of the present invention further provides a data migration device, the device comprising:
信息获取模块,用于获取存储服务切换信息,并根据所述存储服务切换信息确定运营商;An information acquisition module, used to acquire storage service switching information and determine an operator according to the storage service switching information;
迁移执行模块,用于根据所述运营商对应的操作接口库处理所述存储服务器切换信息以完成所述存储服务切换信息对应的数据迁移。The migration execution module is used to process the storage server switching information according to the operation interface library corresponding to the operator to complete the data migration corresponding to the storage service switching information.
第三方面,本发明实施例提供了一种计算机设备,该计算机设备包括:In a third aspect, an embodiment of the present invention provides a computer device, the computer device comprising:
一个或多个处理器;one or more processors;
存储器,用于存储一个或多个程序,a memory for storing one or more programs,
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如本发明实施例中任一所述的数据迁移方法。When the one or more programs are executed by the one or more processors, the one or more processors implement the data migration method as described in any one of the embodiments of the present invention.
第四方面,本发明实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如本发明实施例中任一所述的数据迁移方法。In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a data migration method as described in any one of the embodiments of the present invention.
本发明实施例,通过接收存储服务切换信息,并确定所述存储服务切换信息对应的运营商,按照运营商对应的操作接口库实现存储服务切换信息对应的数据迁移,根据操作接口库屏蔽不同存储服务运营商之间的存储差异,运维人员无需对上层业务程序进行更改,可减少存储服务迁移对上层业务程序的影响,可提高存储数据的迁移效率。An embodiment of the present invention receives storage service switching information and determines the operator corresponding to the storage service switching information, implements data migration corresponding to the storage service switching information according to the operation interface library corresponding to the operator, shields storage differences between different storage service operators according to the operation interface library, and operation and maintenance personnel do not need to make changes to upper-level business programs, which can reduce the impact of storage service migration on upper-level business programs and improve the migration efficiency of storage data.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是本发明实施例提供的一种数据迁移方法的流程图;FIG1 is a flow chart of a data migration method provided by an embodiment of the present invention;
图2是本发明实施例提供的另一种数据迁移方法的流程图;FIG2 is a flow chart of another data migration method provided by an embodiment of the present invention;
图3是本发明实施例提供的一种数据迁移装置的结构示意图;FIG3 is a schematic diagram of the structure of a data migration device provided by an embodiment of the present invention;
图4本发明实施例提供的一种计算机设备的结构示意图。FIG. 4 is a schematic diagram of the structure of a computer device provided by an embodiment of the present invention.
具体实施方式Detailed ways
下面结合附图和实施例对本发明作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本发明,而非对本发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本发明相关的部分而非全部结构,此外,在不冲突的情况下,本发明中的实施例及实施例中的特征可以相互组合。The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention are shown in the accompanying drawings, rather than all structures. In addition, the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.
实施例一Embodiment 1
图1是本发明实施例提供的一种数据迁移方法的流程图,本实施例可适用于云存储情况下不同运营商之间的存储服务切换的情况,该方法可以由数据迁移装置来执行,该装置可以采用硬件和/或软件的方式来实现,参见图1,本发明实施例提供的方法具体包括如下步骤:FIG1 is a flow chart of a data migration method provided by an embodiment of the present invention. This embodiment is applicable to the case of switching storage services between different operators in the case of cloud storage. The method can be executed by a data migration device, which can be implemented in hardware and/or software. Referring to FIG1 , the method provided by an embodiment of the present invention specifically includes the following steps:
步骤110、获取存储服务切换信息,并根据存储服务切换信息确定运营商。Step 110: Obtain storage service switching information, and determine the operator according to the storage service switching information.
其中,存储服务切换信息可以是用于控制切换存储服务的信息,该存储服务可以由一种存储服务切换到另一种存储服务,切换前后的存储服务的运营商可以相同,也可以不同,存储服务切换信息可以包括存储服务切换前后的运营商以及数据标识等信息。存储服务切换信息可以由用户输入或者由预设程序自动触发。运行商可以是提供存储服务的厂商,运行商可以使用唯一标识号或者名称标识,一家运营商可以具有一种或者多种存储服务。The storage service switching information may be information used to control the switching of the storage service. The storage service may be switched from one storage service to another. The operators of the storage services before and after the switching may be the same or different. The storage service switching information may include information such as the operators before and after the storage service switching and data identifiers. The storage service switching information may be input by a user or automatically triggered by a preset program. An operator may be a manufacturer that provides storage services. An operator may be identified by a unique identification number or name. An operator may have one or more storage services.
在本发明实施例中,可以接收自动触发或者用户发送的存储服务切换信息,该存储服务切换信息可以由用户客户端发送到远程服务器,可以确定出存储服务切换信息对应的运营商,例如,存储服务切换信息中可以包括存储服务切换前后分别所属的运营商,或者,存储服务切换信息的格式可以隐含指示运营商。In an embodiment of the present invention, storage service switching information that is automatically triggered or sent by a user can be received. The storage service switching information can be sent by a user client to a remote server, and the operator corresponding to the storage service switching information can be determined. For example, the storage service switching information can include the operators to which the storage service belongs before and after the switching, respectively, or the format of the storage service switching information can implicitly indicate the operator.
步骤120、根据运营商对应的操作接口库处理存储服务切换信息以完成存储服务切换信息对应的数据迁移。Step 120: Process the storage service switching information according to the operation interface library corresponding to the operator to complete the data migration corresponding to the storage service switching information.
其中,操作接口库可以是用于进行存储服务切换的接口库,操作接口库中可以包括一个或多个与存储服务切换相关的接口,操作接口库的数量可以为多个,每个操作接口库可以对应不同的运营商,不同运营商的操作接口库中包括接口的作用可以相同,例如,均可以实现存储数据的增删改查等操作,可以理解的是,每个运营商各自对应的接口库可以按照各自的开发标准生成。Among them, the operation interface library can be an interface library for performing storage service switching. The operation interface library can include one or more interfaces related to the storage service switching. The number of operation interface libraries can be multiple, and each operation interface library can correspond to a different operator. The functions of the interfaces included in the operation interface libraries of different operators can be the same. For example, all operations such as adding, deleting, modifying and querying storage data can be implemented. It can be understood that the interface library corresponding to each operator can be generated according to their own development standards.
具体的,可以根据运营商查找预先下载或者预先编辑的操作接口库,可以调用操作接口库中的一个或者多个接口实现存储服务切换信息对应的数据迁移。例如,可以按照获取到迁移前的运营商的读取操作接口获取存储的数据,并按照迁移后的运营商的写入操作接口将数据迁移到目标存储空间进行存储。Specifically, the pre-downloaded or pre-edited operation interface library can be searched according to the operator, and one or more interfaces in the operation interface library can be called to implement data migration corresponding to the storage service switching information. For example, the stored data can be obtained according to the read operation interface of the operator before the migration, and the data can be migrated to the target storage space for storage according to the write operation interface of the operator after the migration.
本发明实施例,通过接收存储服务切换信息,并确定所述存储服务切换信息对应的运营商,按照运营商对应的操作接口库实现存储服务切换信息对应的数据迁移,根据操作接口库屏蔽不同存储服务运营商之间的存储差异,运维人员无需对上层业务程序进行更改,可减少存储服务迁移对上层业务程序的影响,可提高存储数据的迁移效率。An embodiment of the present invention receives storage service switching information and determines the operator corresponding to the storage service switching information, implements data migration corresponding to the storage service switching information according to the operation interface library corresponding to the operator, shields storage differences between different storage service operators according to the operation interface library, and operation and maintenance personnel do not need to make changes to upper-level business programs, which can reduce the impact of storage service migration on upper-level business programs and improve the migration efficiency of storage data.
进一步的,在上述申请实施例的基础上,所述操作接口库至少包括存储操作处理接口和存储服务处理接口,其中,存储服务处理接口实例化存储操作接口。Further, based on the above-mentioned application embodiment, the operation interface library at least includes a storage operation processing interface and a storage service processing interface, wherein the storage service processing interface instantiates the storage operation interface.
在本发明实施例中,各运营商对应的操作接口库至少包括存储操作处理接口和存储服务处理接口,其中,存储操作处理接口可以用于实现数据操作的数据接口,该数据接口可以通过软件和/或硬件的方式实现,存储操作接口中可以包括用于对数据进行操作的方法。存储服务处理接口可以是针对存储服务对象进行操作的数据接口,存储服务处理接口中可以对不同存储服务的对象进行处理,例如,某一用户的存储服务或者某一厂商的存储服务等,存储服务接口中可以包括一个或多个方法,该方法中可以通过实例化存储操作接口对服务对象的数据进行操作。操作接口库中的存储操作处理接口和存储服务处理接口可以向业务层暴露统一接口,用户通过调用操作接口库中的接口实现数据迁移,无需关心不同厂商中接口内部的具体处理逻辑,可以屏蔽数据迁移过程中不同运营商的存储服务的处理逻辑差异,降低用户使用难度。In an embodiment of the present invention, the operation interface library corresponding to each operator includes at least a storage operation processing interface and a storage service processing interface, wherein the storage operation processing interface can be used to implement a data interface for data operations, and the data interface can be implemented by software and/or hardware, and the storage operation interface may include methods for operating data. The storage service processing interface may be a data interface for operating storage service objects, and the storage service processing interface may process objects of different storage services, for example, a storage service of a certain user or a storage service of a certain manufacturer, etc. The storage service interface may include one or more methods, and the method may operate on the data of the service object by instantiating the storage operation interface. The storage operation processing interface and the storage service processing interface in the operation interface library can expose a unified interface to the business layer, and users can implement data migration by calling the interface in the operation interface library, without having to care about the specific processing logic inside the interface of different manufacturers, and can shield the processing logic differences of storage services of different operators during data migration, thereby reducing the difficulty of user use.
进一步的,在上述发明实施例的基础上,所述存储操作处理接口包括以下至少一种方法:Further, based on the above-mentioned embodiments of the invention, the storage operation processing interface includes at least one of the following methods:
操作输出方法,操作输出方法的处理逻辑用于格式化输出存储操作处理接口的属性信息;Operation output method, the processing logic of the operation output method is used to format and output the attribute information of the storage operation processing interface;
操作创建方法,操作创建方法的处理逻辑用于接收给定路径并为给定路径的存储数据创建一个对象;An operation creation method, the processing logic of the operation creation method is used to receive a given path and create an object for the storage data of the given path;
操作删除方法,操作删除方法的处理逻辑用于接收给定路径并删除给定路径的对象;The operation deletion method, the processing logic of the operation deletion method is used to receive a given path and delete the object of the given path;
操作列表方法,操作列表方法的处理逻辑用于接收给定路径并获取给定路径的对象的信息列表;Operation list method, the processing logic of the operation list method is used to receive a given path and obtain an information list of the object of the given path;
操作元数据方法,所述操作元数据方法的处理逻辑用于返回所述存储操作处理接口的元数据;An operation metadata method, wherein the processing logic of the operation metadata method is used to return metadata of the storage operation processing interface;
操作读方法,操作读方法的处理逻辑用于读取给定路径的对象的内容;Operation read method, the processing logic of the operation read method is used to read the content of the object of the given path;
操作开始方法,操作开始方法的处理逻辑用于获取给定路径的对象的元数据;An operation start method, the processing logic of which is used to obtain metadata of an object with a given path;
操作写方法,写方法的处理逻辑用于向给定路径的对象写入数据。Operation write method, the processing logic of the write method is used to write data to the object of the given path.
在本发明实施例中,存储操作处理接口可以包括操作输出方法、操作创建方法、操作删除方法、操作列表方法、操作元数据方法、操作读方法、操作开始方法、操作写方法等,其中,存储操作处理接口可以基于G o语言、Python语言、Java语言等方式实现,操作输出方法可以对存储操作处理接口输出的属性信息进行操作,例如,可以定义接口的输出格式、输出类型等属性信息,操作创建方法可以用于接收给定路径,该给定路径可以是上层业务程序传输的参数,可以为存储数据的逻辑存储路径或者物理存储路径,操作创建方法可以按照该给定路径生成对象,该对象可以对存储数据进行操作。操作删除方法,可以接收给定路径,并按照给定路径删除其中存储的对象。操作列表方法可以是接收给定路径,并按照给定路径中的对象生成信息列表,该信息列表可以包括给定路径下所有用于数据操作的对象。操作元数据方法,该方法可以返回存储操作处理接口的元数据。操作读取方法可以是按照给定路径获取对象中的内容,该内容可以是被操作的存储数据。操作开始方法可以获取给定路径的对象的元数据。操作写方法可以是接收待存储数据,并将待存储数据写入给定路径的对象,可以理解的是,给定路径除了是上层业务程序传输的参数外,还可以是开发者预先设定的默认存储路径。In an embodiment of the present invention, the storage operation processing interface may include an operation output method, an operation creation method, an operation deletion method, an operation list method, an operation metadata method, an operation read method, an operation start method, an operation write method, etc., wherein the storage operation processing interface may be implemented based on Go language, Python language, Java language, etc. The operation output method may operate on the attribute information output by the storage operation processing interface, for example, the output format, output type, and other attribute information of the interface may be defined. The operation creation method may be used to receive a given path, which may be a parameter transmitted by an upper-layer business program, or may be a logical storage path or a physical storage path for storing data. The operation creation method may generate an object according to the given path, and the object may operate on the stored data. The operation deletion method may receive a given path and delete the object stored therein according to the given path. The operation list method may receive a given path and generate an information list according to the object in the given path, and the information list may include all objects used for data operations under the given path. The operation metadata method may return the metadata of the storage operation processing interface. The operation read method may obtain the content in the object according to the given path, and the content may be the storage data being operated. The operation start method may obtain the metadata of the object of the given path. The operation write method may be to receive data to be stored and write the data to be stored into an object of a given path. It is understandable that the given path may be a default storage path preset by the developer in addition to being a parameter transmitted by the upper-layer business program.
进一步的,在上述发明实施例的基础上,所述存储服务处理接口包括以下至少一种方法:Further, based on the above-mentioned embodiments of the invention, the storage service processing interface includes at least one of the following methods:
服务输出方法,所述服务输出方法的处理逻辑用于格式化输出所述存储服务处理接口的属性信息;A service output method, wherein the processing logic of the service output method is used to format and output the attribute information of the storage service processing interface;
服务创建方法,所述服务创建方法的处理逻辑用于创建所述存储操作处理接口的实例;A service creation method, wherein the processing logic of the service creation method is used to create an instance of the storage operation processing interface;
服务删除方法,所述服务传输方法的处理逻辑用于删除所述存储操作处理接口的实例;A service deletion method, wherein the processing logic of the service transmission method is used to delete an instance of the storage operation processing interface;
服务获取方法,所述服务获取方法的处理逻辑用于至少一个所述存储操作处理接口的实例;A service acquisition method, wherein the processing logic of the service acquisition method is used for at least one instance of the storage operation processing interface;
服务列表方法,所述服务列表方法的处理逻辑用于获取所有存储操作处理接口的实例的列表。A service list method, the processing logic of which is used to obtain a list of instances of all storage operation processing interfaces.
具体的,存储服务处理接口中可以包括服务创建方法、服务删除方法、服务获取方以及服务列表方法,存储服务处理接口可以使用不同的开发语言开发,其中,服务创建方法可以创建存储操作处理接口类型的实例,该实例可以用于实现数据的处理操作,服务传输方法的处理逻辑用于删除所述存储操作处理接口的实例,服务获取方法的处理逻辑用于至少一个所述存储操作处理接口的实例,服务列表方法的处理逻辑用于获取所有存储操作处理接口的实例的列表。Specifically, the storage service processing interface may include a service creation method, a service deletion method, a service acquisition method, and a service list method. The storage service processing interface can be developed using different development languages. The service creation method can create an instance of a storage operation processing interface type, which can be used to implement data processing operations. The processing logic of the service transmission method is used to delete the instance of the storage operation processing interface. The processing logic of the service acquisition method is used for at least one instance of the storage operation processing interface. The processing logic of the service list method is used to obtain a list of instances of all storage operation processing interfaces.
进一步的,在上述发明实施例的基础上,存储操作处理接口和/或所述存储服务处理接口还包括上下文控制方法,所述上下文控制方法用于接收和保存应用层传输的上下文信息。Further, based on the above-mentioned embodiments of the invention, the storage operation processing interface and/or the storage service processing interface also includes a context control method, and the context control method is used to receive and save context information transmitted by the application layer.
在本发明实施例中,操作接口库中每个接口中的方法均可以包括上下文控制方法,该方法可以用于接收和保存应用层传输参数时的上下文信息,例如,在存储操作处理接口的操作删除方法可以生成一个删除上下文控制方法,可以接收应用层传输参数时的上下文信息。In an embodiment of the present invention, the methods in each interface in the operation interface library may include a context control method, which can be used to receive and save context information when the application layer transmits parameters. For example, the operation deletion method in the storage operation processing interface can generate a deletion context control method, which can receive context information when the application layer transmits parameters.
进一步的,在上述发明实施例的基础上,所述操作接口库还包括:Further, based on the above-mentioned embodiment of the invention, the operation interface library further includes:
追加写接口,所述追加写接口包括提交方法、创建方法和写操作方法,其中,所述提交方法的处理逻辑用于提交并完成追加写操作,所述创建方法的处理逻辑用于创建一个追加写的对象,所述写操作方法用于对指定的对象进行追加写操作;An append write interface, the append write interface includes a submit method, a create method and a write operation method, wherein the processing logic of the submit method is used to submit and complete the append write operation, the processing logic of the create method is used to create an append write object, and the write operation method is used to perform an append write operation on a specified object;
块存储接口,所述块存储接口包括块合并方法、块创建方法、块列表方法以及块写入方法,其中,所述块合并方法的处理逻辑用于将至少两个存储块合并为一个对象,所述块创建方法的处理逻辑用于创建一个存储块的对象,所述块列表方法的处理逻辑用于获取给定对象的所有存储块的列表,所述块写入方法,所述块写入方法的处理逻辑用于将数据写入指定的存储块;A block storage interface, the block storage interface includes a block merging method, a block creation method, a block list method and a block writing method, wherein the processing logic of the block merging method is used to merge at least two storage blocks into one object, the processing logic of the block creation method is used to create an object of a storage block, the processing logic of the block list method is used to obtain a list of all storage blocks of a given object, and the processing logic of the block writing method is used to write data into a specified storage block;
服务端拷贝接口,所述服务端拷贝接口包括拷贝方法,所述拷贝方法的处理逻辑用于为给定的对象进行服务端拷贝;A server-side copy interface, the server-side copy interface including a copy method, the processing logic of the copy method is used to perform a server-side copy for a given object;
目录操作接口,所述目录操作接口包括目标创建方法,所述目标创建方法的处理逻辑用于创建给定类型的目录对象;A directory operation interface, the directory operation interface including a target creation method, the processing logic of the target creation method is used to create a directory object of a given type;
抓取器接口,所述抓取器接口包括抓取方法,所述抓取方法的处理逻辑用于按照指定统一资源标识获取数据并保存到指定路径;A grabber interface, the grabber interface including a grabber method, the processing logic of the grabber method being used to obtain data according to a specified uniform resource identifier and save it to a specified path;
移动操作接口,所述移动操作接口包括移动方法,所述移动方法的处理逻辑用于获取指定对象,并将所述指定对象进行服务端移动操作;A mobile operation interface, the mobile operation interface including a mobile method, the processing logic of the mobile method is used to obtain a specified object and perform a server-side mobile operation on the specified object;
分段上传接口,所述分段上传接口包括操作完成方法、分段开启方法、分段列表方法、分段写入方法,其中,所述操作完成方法的处理逻辑用于完成分段操作以生成对应的分段对象,所述分段开启方法的处理逻辑用于开启分段上传操作,所述分段列表方法的处理逻辑用于获取指定分段对象的所有分段列表,所述分段写入方法,用于将数据写入指定分段;A segment upload interface, the segment upload interface includes an operation completion method, a segment opening method, a segment list method, and a segment writing method, wherein the processing logic of the operation completion method is used to complete the segment operation to generate a corresponding segment object, the processing logic of the segment opening method is used to open the segment upload operation, the processing logic of the segment list method is used to obtain a list of all segments of a specified segment object, and the segment writing method is used to write data into a specified segment;
页操作接口,所述页操作接口包括页创建方法和页写入方法,其中,所述页操作方法的处理逻辑用于创建指定类型的页对象,所述页写入方法的处理逻辑用于将数据写入指定页;A page operation interface, the page operation interface includes a page creation method and a page writing method, wherein the processing logic of the page operation method is used to create a page object of a specified type, and the processing logic of the page writing method is used to write data into a specified page;
链接操作接口,所述连接操作接口包括链接读操作,其中,所述链接读操作的处理逻辑用于获取给定路径的对象的链接。A link operation interface, wherein the link operation interface includes a link read operation, wherein the processing logic of the link read operation is used to obtain a link of an object of a given path.
具体的,各运营商的操作接口库为了在存储服务切换时实现独特的数据操作,还可以设置有追加写接口、块存储接口、服务端拷贝接口、目录操作接口、抓取器接口、移动操作接口、分段上传接口、页操作接口以及链接操作接口中的一种或者多种。Specifically, in order to realize unique data operations when switching storage services, the operation interface library of each operator can also be provided with one or more of an append write interface, a block storage interface, a server copy interface, a directory operation interface, a grabber interface, a move operation interface, a segmented upload interface, a page operation interface and a link operation interface.
其中,追加写接口可以由提交方法、创建方法和写操作方法组成,提交方法用于提交并完成追加写操作,创建方法用于创建一个追加写的对象,写操作方法用于对指定的对象进行追加写操作。Among them, the append write interface can be composed of a submission method, a creation method and a write operation method. The submission method is used to submit and complete the append write operation, the creation method is used to create an append write object, and the write operation method is used to perform an append write operation on the specified object.
块存储接口可以由块合并方法、块创建方法、块列表方法以及块写入方法组成,块合并方法用于将多个存储块合并为一个对象,块创建对象方法可以创建一个存储块的对象,块列表方法可以用于生成给定对象对应的所有存储块的信息列表,块写入方法可以包括获取数据并写入到指定的存储块。The block storage interface can be composed of a block merging method, a block creating method, a block list method and a block writing method. The block merging method is used to merge multiple storage blocks into one object. The block creating object method can create an object of a storage block. The block list method can be used to generate an information list of all storage blocks corresponding to a given object. The block writing method can include obtaining data and writing it to a specified storage block.
服务端拷贝接口包括拷贝方法,该拷贝方法用于接收给定对象,并为给定对象进行服务端拷贝。目录操作接口,目录操作接口包括目标创建方法,目标创建方法用于创建给定类型的目录对象;抓取器接口包括抓取方法,抓取方法用于按照指定统一资源标识获取数据并保存到指定路径;移动操作接口包括移动方法,该移动方法可以获取指定对象,并将指定对象进行服务端移动操作。The server-side copy interface includes a copy method, which is used to receive a given object and perform a server-side copy of the given object. The directory operation interface includes a target creation method, which is used to create a directory object of a given type; the grabber interface includes a grab method, which is used to obtain data according to a specified uniform resource identifier and save it to a specified path; the move operation interface includes a move method, which can obtain a specified object and perform a server-side move operation on the specified object.
分段上传接口可以用于处理数据分段上传,具体包括操作完成方法、分段开启方法、分段列表方法、分段写入方法,其中,操作完成方法可以用于完成分段上传操作以获得相应的对象,分段开启方法可以用于开启分段上传操作,分段列表方法可以获取自定分段对象的所有分段信息列表,分段写入方法可以用于将数据写入指定的分段。The multipart upload interface can be used to process multipart data upload, specifically including the operation completion method, the segment opening method, the segment list method, and the segment writing method. Among them, the operation completion method can be used to complete the multipart upload operation to obtain the corresponding object, the segment opening method can be used to open the multipart upload operation, the segment list method can obtain a list of all segment information of a custom segment object, and the segment writing method can be used to write data to a specified segment.
页操作接口可以用于数据也相关随机写操作,页操作接口包括页创建方法和页写入方法,页创建方法可以用于创建指定类型的页对象,页写入方法可以接收数据,并将数据写入指定的数据页。The page operation interface can be used for data-related random write operations. The page operation interface includes a page creation method and a page write method. The page creation method can be used to create a page object of a specified type. The page write method can receive data and write the data to a specified data page.
连接操作可以处理对象中的链接,具体包括链接读取方法,该方法可以读取给定路径的对象中包括的链接。The connection operation can process the links in the object, specifically including a link reading method, which can read the links included in the object of a given path.
图2是本发明实施例提供的另一种数据迁移方法的流程图,本发明实施例是在上述发明实施例基础上的具体化,参见图2,本发明实施例提供的方法具体包括如下步骤:FIG. 2 is a flow chart of another data migration method provided by an embodiment of the present invention. The embodiment of the present invention is a specific implementation of the above-mentioned embodiment of the present invention. Referring to FIG. 2 , the method provided by the embodiment of the present invention specifically includes the following steps:
步骤210、获取存储服务切换信息,并根据存储服务切换信息确定运营商。Step 210: Obtain storage service switching information, and determine the operator according to the storage service switching information.
步骤220、根据运营商对应的操作接口库处理存储服务切换信息以完成存储服务切换信息对应的数据迁移。Step 220: Process the storage service switching information according to the operation interface library corresponding to the operator to complete the data migration corresponding to the storage service switching information.
步骤230、获取接口更新信息,并根据接口更新信息更新运营商对应的操作接口库。Step 230: Obtain interface update information, and update the operation interface library corresponding to the operator according to the interface update information.
其中,接口更新信息可以用于更新接口的处理逻辑的信息,可以为开发人员编辑的代码文件或者代码文件的存储地址,接口更新信息还可以包括待替换的原有接口的信息,例如,接口更新信息可以包括需要更新的运营商、操作接口库、接口名以及方法名中的一种或者多种信息。Among them, the interface update information can be used to update the information of the processing logic of the interface, which can be a code file edited by the developer or the storage address of the code file. The interface update information can also include information of the original interface to be replaced. For example, the interface update information can include one or more of the operator that needs to be updated, the operation interface library, the interface name, and the method name.
在本发明实施例中,可以接收用户输入的接口更新信息,可以按照该信息更新一个或者多个运营商的接口操作库,可以更新接口操控库中包括的接口或者是操作接口库中接口内的方法。可以理解的是,操作接口库可以针对使用者设计,可以根据使用者的实际情况对操作接口库进行扩充,通过更新操作接口库的方式实现存储服务数据迁移的兼容性。In the embodiment of the present invention, the interface update information input by the user can be received, the interface operation library of one or more operators can be updated according to the information, and the interface included in the interface control library or the method in the interface in the operation interface library can be updated. It can be understood that the operation interface library can be designed for the user, and the operation interface library can be expanded according to the actual situation of the user, and the compatibility of the storage service data migration can be achieved by updating the operation interface library.
在一个示例性的实施方式中,本发明实施例中的操作接口库可以是基于GO语言设计的接口库,可以针对不同服务以及存储的相关基础操作设计接口,操作接口库中可以包括Storager接口,该接口用于管理具体的存储相关的基础操作,该接口定义了以下方法:In an exemplary embodiment, the operation interface library in the embodiment of the present invention may be an interface library designed based on the GO language, and interfaces may be designed for different services and basic operations related to storage. The operation interface library may include a Storager interface, which is used to manage specific basic operations related to storage. The interface defines the following methods:
·String方法,用于格式化输出Storager的相关信息;String method, used to format and output Storager related information;
·Create方法,用于根据给定路径创建一个Object;Create method, used to create an Object based on a given path;
·Delete方法,用于根据给定路径删除一个Object;Delete method, used to delete an object according to a given path;
·List方法,用于根据给定的路径获取相应的Object列表;List method, used to obtain the corresponding Object list according to the given path;
·Metadata方法,用于返回Storager的元数据;Metadata method, used to return the metadata of Storager;
·Read方法,用于读取某个给定路径的Object的内容;The Read method is used to read the content of an Object at a given path;
·Stat方法,用于获取某个给定路径的Object的元数据;Stat method, used to obtain metadata of an object with a given path;
·Write方法,用于向某个给定路径的Object写入数据。The Write method is used to write data to an object with a given path.
操作接口库中还可以包括Serbicer接口,该接口从服务的角度管理多个Storager接口,该接口定义了以下方法:The operation interface library can also include the Serbicer interface, which manages multiple Storager interfaces from the perspective of services. The interface defines the following methods:
·String方法,用于格式化输出Servicer的相关信息;String method, used to format and output Servicer related information;
·Create方法,用于创建一个新的Storager实例;Create method, used to create a new Storager instance;
·Delete方法,用于删除一个Storager实例;Delete method, used to delete a Storager instance;
·Get方法,用于从Servicer中获取一个可用的Storager实例;Get method, used to obtain an available Storager instance from Servicer;
·List方法,用于从Servicer中获取所有的Storager列表。List method is used to obtain a list of all Storagers from Servicer.
进一步的,操作接口库还可以包括Appender接口,该接口支持追加写操作,并定义了以下方法:Furthermore, the operation interface library may also include an Appender interface, which supports append write operations and defines the following methods:
·CommitAppend方法,用于提交并且完成追加写操作过程;CommitAppend method, used to commit and complete the append write operation process;
·CreateAppend方法,用于创建一个可追加写的Object;CreateAppend method, used to create an Object that can be appended;
·WriteAppend方法,用于对指定Object进行追加写操作。WriteAppend method is used to perform additional write operations on the specified Object.
进一步的,操作接口库还可以包括Blocker接口,用于实现块存储相关操作,定义的方法包括:Furthermore, the operation interface library may also include a Blocker interface for implementing block storage related operations, and the defined methods include:
·CombineBlock方法,用于将块组成一个Object;CombineBlock method, used to combine blocks into an Object;
·CreateBlock方法,用于创建一个块对象Object;·CreateBlock method, used to create a block object Object;
·ListBlock方法,用于获取属于某个Object的所有块列表;ListBlock method, used to obtain a list of all blocks belonging to an Object;
·WriteBlock方法,用于将数据写入某一个块。WriteBlock method is used to write data to a block.
进一步的,操作接口库还可以包括Copier接口,该接口支持服务端拷贝操作,定义的方法包括:Furthermore, the operation interface library may also include a Copier interface, which supports server-side copy operations, and the defined methods include:
·Copy方法,用于将一个Object进行服务端拷贝操作。The Copy method is used to copy an Object to the server.
进一步的,操作接口库还可以包括Direr接口,Direr接口是对目录操作的接口,定义了CreateDir方法,用于创建一个类型为目录的Object。Furthermore, the operation interface library may also include a Direr interface, which is an interface for directory operations and defines a CreateDir method for creating an Object of a directory type.
进一步的,操作接口库还可以包括Fetcher接口,支持通过统一资源定位系统(Uniform Resource Locator,URL)获取数据,定义了:Furthermore, the operation interface library may also include a Fetcher interface, which supports obtaining data through a Uniform Resource Locator (URL), and defines:
·Fetch方法,用于从指定URL获取数据并存到指定的路径。The Fetch method is used to obtain data from the specified URL and store it in the specified path.
进一步的,操作接口库还可以包括Mover接口,可以支持服务端移动操作,定义了:Furthermore, the operation interface library can also include a Mover interface, which can support server-side mobile operations and defines:
·Move方法,用于将一个Object进行服务端移动操作。The Move method is used to move an Object to the server.
进一步的,操作接口库还可以包括Multiparter接口,可以是支持分段上传相关操作的接口,定义了:Furthermore, the operation interface library may also include a Multiparter interface, which may be an interface supporting multipart upload related operations, defining:
·CompleteMultipart方法,用于完成分段上传操作以获得相应的Object;CompleteMultipart method, used to complete the multipart upload operation to obtain the corresponding object;
·CreateMultipart方法,用于开启分段上传操作;CreateMultipart method, used to start multipart upload operation;
·ListMultipart方法,用于获取某一分段上传Object的所有分段列表;The ListMultipart method is used to obtain a list of all parts of a multipart upload object.
·WriteMultipart方法,用于将数据写入某一个分段。WriteMultipart method, used to write data to a segment.
进一步的,操作接口库还可以包括Pager,可以是支持页相关随机写操作的接口,定义了:Furthermore, the operation interface library may also include Pager, which may be an interface supporting page-related random write operations, defining:
·CreatePage方法,用于创建一个页类型的Object;CreatePage method, used to create an Object of page type;
·WritePage方法,用于将数据写入某一个页。WritePage method is used to write data to a page.
进一步的,操作接口库还可以包括Reacher接口,该接口支持获取某个可用Object的链接操作,定义了:Furthermore, the operation interface library may also include a Reacher interface, which supports the operation of obtaining a link to an available Object and defines:
·Reach方法,用于获取可以访问给定路径Object的链接。The Reach method is used to obtain a link that can access the given path object.
在每个接口中,除了上述提到的方法之外,每个方法都还会自动生成一个相应的XXXWithContext方法(如DeleteWithContext方法),方便上层应用传入相应的Context来进行上下文控制。In each interface, in addition to the methods mentioned above, each method will automatically generate a corresponding XXXWithContext method (such as the DeleteWithContext method) to facilitate the upper-level application to pass in the corresponding Context for context control.
其中,Object为统一定义的最小的对象单元抽象,比如文件系统(File System,FS)服务中的文件,云存储服务中的对象等,我们都可以认为是一个Object对象。Among them, Object is the smallest object unit abstraction with a unified definition. For example, files in the file system (FS) service and objects in the cloud storage service can all be considered as an Object.
图3是本发明实施例提供的一种数据迁移装置的结构示意图,可执行本发明任意实施例所提供的数据迁移方法,具备执行方法相应的功能模块和有益效果。该装置可以由软件和/或硬件实现,具体包括:信息获取模块301和迁移执行模块302。3 is a schematic diagram of the structure of a data migration device provided by an embodiment of the present invention, which can execute the data migration method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. The device can be implemented by software and/or hardware, and specifically includes: an information acquisition module 301 and a migration execution module 302.
信息获取模块301,用于获取存储服务切换信息,并根据所述存储服务切换信息确定运营商。The information acquisition module 301 is used to acquire storage service switching information and determine the operator according to the storage service switching information.
迁移执行模块302,用于根据所述运营商对应的操作接口库处理所述存储服务切换信息以完成所述存储服务切换信息对应的数据迁移。The migration execution module 302 is used to process the storage service switching information according to the operation interface library corresponding to the operator to complete the data migration corresponding to the storage service switching information.
本发明实施例,通过信息获取模块接收存储服务切换信息,并确定所述存储服务切换信息对应的运营商,迁移执行模块按照运营商对应的操作接口库实现存储服务切换信息对应的数据迁移,根据操作接口库屏蔽不同存储服务运营商之间的存储差异,运维人员无需对上层业务程序进行更改,可减少存储服务迁移对上层业务程序的影响,可提高存储数据的迁移效率。In an embodiment of the present invention, storage service switching information is received through an information acquisition module, and the operator corresponding to the storage service switching information is determined. The migration execution module implements data migration corresponding to the storage service switching information according to the operation interface library corresponding to the operator. The storage differences between different storage service operators are shielded according to the operation interface library. Operation and maintenance personnel do not need to make changes to the upper-level business programs, which can reduce the impact of the storage service migration on the upper-level business programs and improve the migration efficiency of the storage data.
进一步的,在上述发明实施例的基础上,所述装置中操作接口库至少包括:存储操作处理接口和存储服务处理接口,其中,所述存储服务处理接口实例化所述存储操作接口。Further, based on the above-mentioned embodiments of the invention, the operation interface library in the device at least includes: a storage operation processing interface and a storage service processing interface, wherein the storage service processing interface instantiates the storage operation interface.
进一步的,在上述发明实施例的基础上,所述装置中存储操作处理接口包括以下至少一种方法:Further, based on the above-mentioned embodiments of the invention, the storage operation processing interface in the device includes at least one of the following methods:
操作输出方法,所述操作输出方法的处理逻辑用于格式化输出所述存储操作处理接口的属性信息;An operation output method, wherein the processing logic of the operation output method is used to format and output the attribute information of the storage operation processing interface;
操作创建方法,所述操作创建方法的处理逻辑用于接收给定路径并为所述给定路径的存储数据创建一个对象;An operation creation method, wherein the processing logic of the operation creation method is used to receive a given path and create an object for the storage data of the given path;
操作删除方法,所述操作删除方法的处理逻辑用于接收给定路径并删除所述给定路径的对象;An operation deletion method, wherein the processing logic of the operation deletion method is used to receive a given path and delete an object of the given path;
操作列表方法,所述操作列表方法的处理逻辑用于接收给定路径并获取所述给定路径的对象的信息列表;An operation list method, wherein the processing logic of the operation list method is used to receive a given path and obtain an information list of objects of the given path;
操作元数据方法,所述操作元数据方法的处理逻辑用于返回所述存储操作处理接口的元数据;An operation metadata method, wherein the processing logic of the operation metadata method is used to return metadata of the storage operation processing interface;
操作读方法,所述操作读方法的处理逻辑用于读取给定路径的对象的内容;An operation read method, wherein the processing logic of the operation read method is used to read the content of an object with a given path;
操作开始方法,所述操作开始方法的处理逻辑用于获取给定路径的对象的元数据;An operation start method, wherein the processing logic of the operation start method is used to obtain metadata of an object of a given path;
操作写方法,所述写方法的处理逻辑用于向给定路径的对象写入数据。Operation write method, the processing logic of the write method is used to write data to the object of the given path.
进一步的,在上述发明实施例的基础上,所述装置中存储服务处理接口包括以下至少一种方法:Further, based on the above-mentioned embodiments of the invention, the storage service processing interface in the device includes at least one of the following methods:
服务输出方法,所述服务输出方法的处理逻辑用于格式化输出所述存储服务处理接口的属性信息;A service output method, wherein the processing logic of the service output method is used to format and output the attribute information of the storage service processing interface;
服务创建方法,所述服务创建方法的处理逻辑用于创建所述存储操作处理接口的实例;A service creation method, wherein the processing logic of the service creation method is used to create an instance of the storage operation processing interface;
服务删除方法,所述服务传输方法的处理逻辑用于删除所述存储操作处理接口的实例;A service deletion method, wherein the processing logic of the service transmission method is used to delete an instance of the storage operation processing interface;
服务获取方法,所述服务获取方法的处理逻辑用于至少一个所述存储操作处理接口的实例;A service acquisition method, wherein the processing logic of the service acquisition method is used for at least one instance of the storage operation processing interface;
服务列表方法,所述服务列表方法的处理逻辑用于获取所有存储操作处理接口的实例的列表。A service list method, the processing logic of which is used to obtain a list of instances of all storage operation processing interfaces.
进一步的,在上述发明实施例的基础上,所述装置中存储操作处理接口和/或所述存储服务处理接口还包括上下文控制方法,所述上下文控制方法用于接收和保存应用层传输的上下文信息。Further, based on the above-mentioned embodiments of the invention, the storage operation processing interface and/or the storage service processing interface in the device also includes a context control method, and the context control method is used to receive and save context information transmitted by the application layer.
进一步的,在上述发明实施例的基础上,所述装置中操作接口库还包括:Further, based on the above-mentioned embodiment of the invention, the operation interface library in the device further includes:
追加写接口,所述追加写接口包括提交方法、创建方法和写操作方法,其中,所述提交方法的处理逻辑用于提交并完成追加写操作,所述创建方法的处理逻辑用于创建一个追加写的对象,所述写操作方法用于对指定的对象进行追加写操作;An append write interface, the append write interface includes a submit method, a create method and a write operation method, wherein the processing logic of the submit method is used to submit and complete the append write operation, the processing logic of the create method is used to create an append write object, and the write operation method is used to perform an append write operation on a specified object;
块存储接口,所述块存储接口包括块合并方法、块创建方法、块列表方法以及块写入方法,其中,所述块合并方法的处理逻辑用于将至少两个存储块合并为一个对象,所述块创建方法的处理逻辑用于创建一个存储块的对象,所述块列表方法的处理逻辑用于获取给定对象的所有存储块的列表,所述块写入方法,所述块写入方法的处理逻辑用于将数据写入指定的存储块;A block storage interface, the block storage interface includes a block merging method, a block creation method, a block list method and a block writing method, wherein the processing logic of the block merging method is used to merge at least two storage blocks into one object, the processing logic of the block creation method is used to create an object of a storage block, the processing logic of the block list method is used to obtain a list of all storage blocks of a given object, and the processing logic of the block writing method is used to write data into a specified storage block;
服务端拷贝接口,所述服务端拷贝接口包括拷贝方法,所述拷贝方法的处理逻辑用于为给定的对象进行服务端拷贝;A server-side copy interface, the server-side copy interface including a copy method, the processing logic of the copy method is used to perform a server-side copy for a given object;
目录操作接口,所述目录操作接口包括目标创建方法,所述目标创建方法的处理逻辑用于创建给定类型的目录对象;A directory operation interface, the directory operation interface including a target creation method, the processing logic of the target creation method is used to create a directory object of a given type;
抓取器接口,所述抓取器接口包括抓取方法,所述抓取方法的处理逻辑用于按照指定统一资源标识获取数据并保存到指定路径;A grabber interface, the grabber interface including a grabber method, the processing logic of the grabber method being used to obtain data according to a specified uniform resource identifier and save it to a specified path;
移动操作接口,所述移动操作接口包括移动方法,所述移动方法的处理逻辑用于获取指定对象,并将所述指定对象进行服务端移动操作;A mobile operation interface, the mobile operation interface including a mobile method, the processing logic of the mobile method is used to obtain a specified object and perform a server-side mobile operation on the specified object;
分段上传接口,所述分段上传接口包括操作完成方法、分段开启方法、分段列表方法、分段写入方法,其中,所述操作完成方法的处理逻辑用于完成分段操作以生成对应的分段对象,所述分段开启方法的处理逻辑用于开启分段上传操作,所述分段列表方法的处理逻辑用于获取指定分段对象的所有分段列表,所述分段写入方法,用于将数据写入指定分段;A segment upload interface, the segment upload interface includes an operation completion method, a segment opening method, a segment list method, and a segment write method, wherein the processing logic of the operation completion method is used to complete the segment operation to generate a corresponding segment object, the processing logic of the segment opening method is used to open the segment upload operation, the processing logic of the segment list method is used to obtain a list of all segments of a specified segment object, and the segment write method is used to write data into a specified segment;
页操作接口,所述页操作接口包括页创建方法和页写入方法,其中,所述页操作方法的处理逻辑用于创建指定类型的页对象,所述页写入方法的处理逻辑用于将数据写入指定页;A page operation interface, the page operation interface includes a page creation method and a page writing method, wherein the processing logic of the page operation method is used to create a page object of a specified type, and the processing logic of the page writing method is used to write data into a specified page;
链接操作接口,所述连接操作接口包括链接读操作,其中,所述链接读操作的处理逻辑用于获取给定路径的对象的链接。A link operation interface, wherein the link operation interface includes a link read operation, wherein the processing logic of the link read operation is used to obtain a link of an object of a given path.
进一步的,在上述发明实施例的基础上,所述装置中还包括:Further, based on the above-mentioned embodiment of the invention, the device further includes:
接口更新模块,用于获取接口更新信息,并根据所述接口更新信息更新所述运营商对应的操作接口库。The interface update module is used to obtain interface update information and update the operation interface library corresponding to the operator according to the interface update information.
图4本发明实施例提供的一种计算机设备的结构示意图,图4示出了适于用来实现本发明实施方式的计算机设备312的框图。图4显示的计算机设备312仅仅是一个示例,不应对本发明实施例的功能和使用范围带来任何限制。设备312是典型的智能机器人地图的更新功能的计算设备。FIG4 is a block diagram of a computer device provided by an embodiment of the present invention, and FIG4 shows a block diagram of a computer device 312 suitable for implementing an embodiment of the present invention. The computer device 312 shown in FIG4 is only an example and should not limit the functions and scope of use of the embodiment of the present invention. Device 312 is a typical computing device for updating the map of an intelligent robot.
如图4所示,计算机设备312以通用计算设备的形式表现。计算机设备312的组件可以包括但不限于:一个或者多个处理器316,存储装置328,连接不同系统组件(包括存储装置328和处理器316)的总线318。As shown in Fig. 4, computer device 312 is in the form of a general-purpose computing device. Components of computer device 312 may include, but are not limited to: one or more processors 316, storage device 328, and bus 318 connecting various system components (including storage device 328 and processor 316).
总线318表示几类总线结构中的一种或多种,包括存储器总线或者存储器控制器,外围总线,图形加速端口,处理器或者使用多种总线结构中的任意总线结构的局域总线。举例来说,这些体系结构包括但不限于工业标准体系结构(Industry StandardArchitecture,ISA)总线,微通道体系结构(Micro Channel Architecture,MCA)总线,增强型ISA总线、视频电子标准协会(Video Electronics Standards Association,VESA)局域总线以及外围组件互连(Peripheral Component Interconnect,PCI)总线。Bus 318 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.
计算机设备312典型地包括多种计算机系统可读介质。这些介质可以是任何能够被计算机设备312访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。The computer device 312 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 312, including volatile and non-volatile media, removable and non-removable media.
存储装置328可以包括易失性存储器形式的计算机系统可读介质,例如随机存取存储器(Random Access Memory,RAM)330和/或高速缓存存储器332。计算机设备312可以进一步包括其它可移动/不可移动的、易失性/非易失性计算机系统存储介质。仅作为举例,存储系统334可以用于读写不可移动的、非易失性磁介质(图4未显示,通常称为“硬盘驱动器”)。尽管图4中未示出,可以提供用于对可移动非易失性磁盘(例如“软盘”)读写的磁盘驱动器,以及对可移动非易失性光盘(例如只读光盘(Compact Disc-Read Only Memory,CD-ROM)、数字视盘(Digital Video Disc-Read Only Memory,DVD-ROM)或者其它光介质)读写的光盘驱动器。在这些情况下,每个驱动器可以通过一个或者多个数据介质接口与总线318相连。存储装置328可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块,这些程序模块被配置以执行本发明各实施例的功能。The storage device 328 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 330 and/or cache memory 332. The computer device 312 may further include other removable/non-removable, volatile/non-volatile computer system storage media. By way of example only, the storage system 334 may be used to read and write non-removable, non-volatile magnetic media (not shown in FIG. 4 , commonly referred to as a “hard drive”). Although not shown in FIG. 4 , a disk drive for reading and writing removable non-volatile disks (such as “floppy disks”) and an optical disk drive for reading and writing removable non-volatile optical disks (such as compact disc-read only memory (CD-ROM), digital video discs (DVD-ROM) or other optical media) may be provided. In these cases, each drive may be connected to the bus 318 via one or more data media interfaces. The storage device 328 may include at least one program product having a set (eg, at least one) of program modules configured to perform the functions of various embodiments of the present invention.
具有一组(至少一个)程序模块326的程序336,可以存储在例如存储装置328中,这样的程序模块326包括但不限于操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。程序模块326通常执行本发明所描述的实施例中的功能和/或方法。A program 336 having a set (at least one) of program modules 326 may be stored, for example, in a storage device 328, such program modules 326 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 326 generally perform the functions and/or methods of the embodiments described herein.
计算机设备312也可以与一个或多个外部设备314(例如键盘、指向设备、摄像头、显示器324等)通信,还可与一个或者多个使得用户能与该计算机设备312交互的设备通信,和/或与使得该计算机设备312能与一个或多个其它计算设备进行通信的任何设备(例如网卡,调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口322进行。并且,计算机设备312还可以通过网络适配器320与一个或者多个网络(例如局域网(Local AreaNetwork,LAN),广域网Wide Area Network,WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器320通过总线318与计算机设备312的其它模块通信。应当明白,尽管图中未示出,可以结合计算机设备312使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、磁盘阵列(Redundant Arrays of IndependentDisks,RAID)系统、磁带驱动器以及数据备份存储系统等。The computer device 312 may also communicate with one or more external devices 314 (e.g., keyboard, pointing device, camera, display 324, etc.), may also communicate with one or more devices that enable a user to interact with the computer device 312, and/or may communicate with any device that enables the computer device 312 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed via an input/output (I/O) interface 322. Furthermore, the computer device 312 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN) and/or a public network, such as the Internet) via a network adapter 320. As shown, the network adapter 320 communicates with other modules of the computer device 312 via a bus 318. It should be understood that although not shown in the figure, other hardware and/or software modules can be used in conjunction with the computer device 312, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, disk arrays (Redundant Arrays of Independent Disks, RAID) systems, tape drives, and data backup storage systems.
处理器316通过运行存储在存储装置328中的程序,从而执行各种功能应用以及数据处理,例如实现本发明上述实施例所提供的数据迁移方法。The processor 316 executes various functional applications and data processing by running the programs stored in the storage device 328, such as implementing the data migration method provided in the above embodiment of the present invention.
本发明实施例提供了一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该程序被处理装置执行时实现如本发明实施例中的数据迁移方法。本发明上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。The embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processing device, a data migration method as in the embodiment of the present invention is implemented. The above-mentioned computer-readable medium of the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText TransferProtocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
上述计算机可读介质可以是上述计算机设备中所包含的;也可以是单独存在,而未装配入该计算机设备中。The computer-readable medium may be included in the computer device, or may exist independently without being incorporated into the computer device.
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该计算机设备执行时,使得该计算机设备:获取存储服务切换信息,并根据所述存储服务切换信息确定运营商;根据所述运营商对应的操作接口库处理所述存储服务切换信息以完成所述存储服务切换信息对应的数据迁移。The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the computer device, the computer device: obtains storage service switching information, and determines the operator based on the storage service switching information; processes the storage service switching information according to the operation interface library corresponding to the operator to complete the data migration corresponding to the storage service switching information.
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and/or flow chart, and the combination of the square boxes in the block diagram and/or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定。The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, constitute a limitation on the unit itself.
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
注意,上述仅为本发明的较佳实施例及所运用技术原理。本领域技术人员会理解,本发明不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本发明的保护范围。因此,虽然通过以上实施例对本发明进行了较为详细的说明,但是本发明不仅仅限于以上实施例,在不脱离本发明构思的情况下,还可以包括更多其他等效实施例,而本发明的范围由所附的权利要求范围决定。Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110924125.3ACN113485981B (en) | 2021-08-12 | 2021-08-12 | Data migration method, device, computer equipment and storage medium |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110924125.3ACN113485981B (en) | 2021-08-12 | 2021-08-12 | Data migration method, device, computer equipment and storage medium |
| Publication Number | Publication Date |
|---|---|
| CN113485981A CN113485981A (en) | 2021-10-08 |
| CN113485981Btrue CN113485981B (en) | 2024-06-21 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202110924125.3AActiveCN113485981B (en) | 2021-08-12 | 2021-08-12 | Data migration method, device, computer equipment and storage medium |
| Country | Link |
|---|---|
| CN (1) | CN113485981B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112190951A (en)* | 2020-10-28 | 2021-01-08 | 网易(杭州)网络有限公司 | Operation data migration method, device, equipment and storage medium |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2009043030A (en)* | 2007-08-09 | 2009-02-26 | Hitachi Ltd | Storage system |
| JP6520448B2 (en)* | 2015-06-18 | 2019-05-29 | 富士通株式会社 | INFORMATION PROCESSING SYSTEM, INFORMATION PROCESSING DEVICE, AND INFORMATION PROCESSING DEVICE CONTROL METHOD |
| US10083199B1 (en)* | 2016-05-23 | 2018-09-25 | Sprint Communications Company L.P. | Data migration in active data store |
| CN108268501B (en)* | 2016-12-30 | 2020-09-18 | 中国移动通信集团北京有限公司 | Service processing method and device in online data migration process |
| CN109067823A (en)* | 2018-06-11 | 2018-12-21 | 中国平安人寿保险股份有限公司 | A kind of data migration method, device, computer equipment and storage medium |
| US11010258B2 (en)* | 2018-11-27 | 2021-05-18 | Commvault Systems, Inc. | Generating backup copies through interoperability between components of a data storage management system and appliances for data storage and deduplication |
| CN110175211B (en)* | 2019-05-05 | 2021-10-19 | 中国银行股份有限公司 | Data synchronization method and device |
| CN110580246B (en)* | 2019-07-30 | 2023-10-20 | 平安科技(深圳)有限公司 | Method, device, computer equipment and storage medium for migrating data |
| CN111736945B (en)* | 2019-08-07 | 2024-05-17 | 北京京东尚科信息技术有限公司 | Virtual machine thermomigration method, device, equipment and medium based on intelligent network card |
| US10965752B1 (en)* | 2019-09-13 | 2021-03-30 | Google Llc | Live migration of clusters in containerized environments |
| JP7344739B2 (en)* | 2019-10-03 | 2023-09-14 | 株式会社くすりの窓口 | Data migration system and relay server |
| CN113127413B (en)* | 2021-05-12 | 2024-03-01 | 北京红山信息科技研究院有限公司 | Operator data processing method, device, server and storage medium |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112190951A (en)* | 2020-10-28 | 2021-01-08 | 网易(杭州)网络有限公司 | Operation data migration method, device, equipment and storage medium |
| Publication number | Publication date |
|---|---|
| CN113485981A (en) | 2021-10-08 |
| Publication | Publication Date | Title |
|---|---|---|
| WO2020119485A1 (en) | Page display method and device, apparatus, and storage medium | |
| US10146671B2 (en) | Testing of software upgrade | |
| US9940066B2 (en) | Snapshot management in hierarchical storage infrastructure | |
| WO2023160327A1 (en) | Container image management | |
| CN112965761B (en) | Data processing method, system, electronic equipment and storage medium | |
| US11829814B2 (en) | Resolving data location for queries in a multi-system instance landscape | |
| CN112988583A (en) | Method and device for testing syntax compatibility of database | |
| CN115757400A (en) | Data table processing method and device, electronic equipment and computer readable medium | |
| US11675772B2 (en) | Updating attributes in data | |
| CN118132204A (en) | A container management method, device, equipment and medium | |
| CN118132203A (en) | Container management method, device, equipment and medium | |
| US20250165297A1 (en) | Sharing Method and Apparatus | |
| CN113742321A (en) | Data updating method and device | |
| CN109614383B (en) | Data copying method and device, electronic equipment and storage medium | |
| CN114090124A (en) | Data processing method, apparatus, computer equipment and storage medium | |
| US20230099501A1 (en) | Masking shard operations in distributed database systems | |
| CN113485981B (en) | Data migration method, device, computer equipment and storage medium | |
| US11243932B2 (en) | Method, device, and computer program product for managing index in storage system | |
| CN113220237B (en) | Distributed storage method, device, equipment and storage medium | |
| CN113806327B (en) | A database design method, device and related equipment | |
| CN117519814A (en) | A sharing method and device | |
| CN113760349A (en) | Image upgrade method and device | |
| CN112115154A (en) | Data processing and data query method, device, equipment and computer readable medium | |
| CN115422131B (en) | Business review knowledge base retrieval method, device, equipment and computer-readable medium | |
| CN112925795A (en) | Order data processing method and device |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| CB02 | Change of applicant information | Address after:100000 Unit 501A, Floor 5, 101, Building 1, Yard 5, Laiguangying West Road, Chaoyang District, Beijing Applicant after:Beijing Qingyun Science and Technology Co.,Ltd. Address before:100020 601, 6 floor, 16 building, No. 36 Chuang Yuan Road, Chaoyang District, Beijing. Applicant before:Beijing Qingyun Science and Technology Co.,Ltd. | |
| CB02 | Change of applicant information | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CP03 | Change of name, title or address | Address after:100000 Unit 501A, Floor 5, 101, Building 1, Yard 5, Laiguangying West Road, Chaoyang District, Beijing Patentee after:Beijing Qingyun Technology Group Co.,Ltd. Country or region after:China Address before:100000 Unit 501A, Floor 5, 101, Building 1, Yard 5, Laiguangying West Road, Chaoyang District, Beijing Patentee before:Beijing Qingyun Science and Technology Co.,Ltd. Country or region before:China | |
| CP03 | Change of name, title or address | ||
| CP03 | Change of name, title or address | Address after:Room 1101, 11th Floor, Building 9, No. 6 Jiuxianqiao Road, Chaoyang District, Beijing 100015, China Patentee after:Beijing Qingyun Technology Group Co.,Ltd. Country or region after:China Address before:100000 Unit 501A, Floor 5, 101, Building 1, Yard 5, Laiguangying West Road, Chaoyang District, Beijing Patentee before:Beijing Qingyun Technology Group Co.,Ltd. Country or region before:China | |
| CP03 | Change of name, title or address |