CN115510163A - Synchronization method, device, storage medium and electronic equipment for mirror image files - Google Patents
Synchronization method, device, storage medium and electronic equipment for mirror image files Download PDFInfo
- Publication number
- CN115510163A CN115510163A CN202211202855.3A CN202211202855A CN115510163A CN 115510163 A CN115510163 A CN 115510163A CN 202211202855 A CN202211202855 A CN 202211202855A CN 115510163 A CN115510163 A CN 115510163A
- Authority
- CN
- China
- Prior art keywords
- target
- image file
- file
- container
- image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 81
- 238000003860 storage Methods 0.000 title claims abstract description 14
- 230000001360 synchronised effect Effects 0.000 claims abstract description 46
- 238000012549 training Methods 0.000 claims description 25
- 230000015654 memory Effects 0.000 claims description 18
- 238000004590 computer program Methods 0.000 claims description 16
- 230000004044 response Effects 0.000 claims 1
- 238000005516 engineering process Methods 0.000 abstract description 5
- 230000000694 effects Effects 0.000 abstract description 3
- 230000008569 process Effects 0.000 description 32
- 230000006870 function Effects 0.000 description 7
- 230000010076 replication Effects 0.000 description 7
- 230000005540 biological transmission Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 6
- 238000012546 transfer Methods 0.000 description 6
- 238000013473 artificial intelligence Methods 0.000 description 5
- 238000007726 management method Methods 0.000 description 5
- 238000011161 development Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 230000010354 integration Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000003672 processing method Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 238000012550 audit Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000005096 rolling process Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Computing Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本申请提供了一种镜像文件的同步方法、装置、存储介质及电子设备,该方法包括:响应同步指令,将待同步的镜像文件从第一容器镜像仓库同步至第二容器镜像仓库,第一容器镜像仓库与第二容器镜像仓库属于相同类型的镜像仓库;遍历第二容器镜像仓库的镜像文件及存储推理平台能够识别的镜像文件的目标数据库中的镜像文件,根据遍历结果确定第二容器镜像仓库与目标数据库之间存在差异的镜像文件,得到目标镜像文件;基于目标镜像文件将第二容器镜像仓库的镜像文件同步至目标数据库,以使推理平台使用目标数据库的镜像文件向目标对象提供服务。通过本申请,解决了相关技术中,镜像文件同步效率低的问题,达到了提升镜像文件的同步效率的效果。
The present application provides a method, device, storage medium and electronic equipment for synchronizing mirror files. The method includes: responding to a synchronization command, synchronizing the mirror files to be synchronized from the first container mirror warehouse to the second container mirror warehouse, the first The container image repository and the second container image repository belong to the same type of image repository; traverse the image files of the second container image repository and the image files in the target database that store the image files that can be recognized by the reasoning platform, and determine the second container image according to the traversal results There are differences between the image file between the warehouse and the target database to obtain the target image file; based on the target image file, the image file of the second container image warehouse is synchronized to the target database, so that the reasoning platform uses the image file of the target database to provide services to the target object . Through this application, the problem of low synchronization efficiency of mirrored files in related technologies is solved, and the effect of improving the synchronization efficiency of mirrored files is achieved.
Description
技术领域technical field
本申请实施例涉及计算机领域,具体而言,涉及一种镜像文件的同步方法、装置、存储介质及电子设备。The embodiments of the present application relate to the computer field, and in particular, relate to a method, device, storage medium, and electronic device for synchronizing image files.
背景技术Background technique
目前,镜像仓库可用于存储镜像文件,而多个镜像仓库之间可能存在镜像同步的需求。相关技术中,通常采用如下两种方案来实现不同镜像仓库之间镜像文件的同步:Currently, mirror warehouses can be used to store mirror files, and there may be a need for mirror synchronization among multiple mirror warehouses. In related technologies, the following two solutions are usually adopted to realize the synchronization of mirror files between different mirror warehouses:
第一种方案,使用Linux提供的数据镜像备份工具RSYNC来实现两个镜像仓库之间的镜像文件同步。The first solution is to use the data mirror backup tool RSYNC provided by Linux to realize the synchronization of mirror files between two mirror warehouses.
第二种方案,对于使用IaaS(Infrastructure as a Service,基础设施即服务)服务进行镜像存储的场景,利用IaaS的配置工具来对镜像文件的同步进行配置。In the second solution, for the scenario of using IaaS (Infrastructure as a Service, infrastructure as a service) service for image storage, use the IaaS configuration tool to configure the synchronization of the image file.
由上述内容可知,上述两种方式均需针对镜像仓库所在的存储环境采取不同的工具策略。而在推理平台的镜像仓库与其他平台或环境的镜像仓库的交互场景中,如图1所示,通常需要将其他镜像仓库的镜像文件从服务器端保存到本地,并将本地保存的镜像文件上传至推理平台的镜像仓库(即图1中的镜像转移)中。然后,在将推理平台的镜像仓库中的镜像文件同步到推理平台的镜像数据库中,从而推理平台可从镜像数据库中读取并使用镜像文件。From the above content, we can see that the above two methods need to adopt different tool strategies for the storage environment where the mirror warehouse is located. In the interaction scenario between the mirror warehouse of the inference platform and the mirror warehouse of other platforms or environments, as shown in Figure 1, it is usually necessary to save the mirror files of other mirror warehouses from the server to the local, and upload the locally saved mirror files to the image warehouse of the inference platform (that is, the image transfer in Figure 1). Then, the mirror file in the mirror warehouse of the reasoning platform is synchronized to the mirror database of the reasoning platform, so that the reasoning platform can read and use the mirror file from the mirror database.
通常,训练平台训练出的镜像文件可能达到10G及以上,则镜像文件同步的过程将会很长,镜像文件的同步效率比较低。而且,在将镜像文件同步到本地或者上传到推理平台的过程中,如果出现了任何错误,则需要重新同步,进一步降低了镜像文件的同步效率。Usually, the image files trained by the training platform may reach 10G or more, so the process of image file synchronization will be very long, and the synchronization efficiency of image files is relatively low. Moreover, in the process of synchronizing the image file locally or uploading it to the inference platform, if any error occurs, it needs to be re-synchronized, which further reduces the synchronization efficiency of the image file.
发明内容Contents of the invention
本申请实施例提供了一种镜像文件的同步方法、装置、存储介质及电子设备,以至少解决相关技术中,镜像文件同步效率低的问题。Embodiments of the present application provide a method, device, storage medium, and electronic device for synchronizing mirror files, so as to at least solve the problem of low synchronization efficiency of mirror files in related technologies.
根据本申请的一个实施例,提供了一种镜像文件的同步方法,包括:响应同步指令,将待同步的镜像文件从第一容器镜像仓库同步至第二容器镜像仓库,其中,第一容器镜像仓库用于存储训练平台为预设训练场景所生成的镜像文件,第二容器镜像仓库用于存储推理平台为目标对象提供服务所需的镜像文件,第一容器镜像仓库与第二容器镜像仓库属于相同类型的镜像仓库;遍历第二容器镜像仓库中的镜像文件,并遍历目标数据库中的镜像文件,得到遍历结果,其中,目标数据库用于存储推理平台能够识别的镜像文件;根据遍历结果确定第二容器镜像仓库与目标数据库之间存在差异的镜像文件,得到目标镜像文件;基于目标镜像文件将第二容器镜像仓库中的镜像文件同步至目标数据库中,以使推理平台使用目标数据库中的镜像文件向目标对象提供服务。According to an embodiment of the present application, a method for synchronizing image files is provided, including: responding to a synchronization instruction, synchronizing the image files to be synchronized from the first container image repository to the second container image repository, wherein the first container image The warehouse is used to store the image files generated by the training platform for preset training scenarios. The second container image warehouse is used to store the image files required by the inference platform to provide services for the target objects. The first container image warehouse and the second container image warehouse belong to Mirror warehouses of the same type; traverse the mirror files in the second container mirror warehouse, and traverse the mirror files in the target database to obtain the traverse results, wherein the target database is used to store mirror files that can be recognized by the reasoning platform; determine the first The mirror file in the second container mirror warehouse and the target database are different, and the target mirror file is obtained; based on the target mirror file, the mirror file in the second container mirror warehouse is synchronized to the target database, so that the reasoning platform uses the mirror image in the target database Documentation provides services to target audiences.
在一个示例性实施例中,镜像文件的同步方法还包括:对同步指令进行解析,确定源项目的项目标识、目标项目的项目标识以及目标用户的用户信息,其中,目标用户为发出同步指令的用户;根据源项目的项目标识确定第一容器镜像仓库,根据目标项目的项目标识确定第二容器镜像仓库;根据目标用户的用户信息建立第一容器镜像仓库与第二容器镜像仓库的连接,并确定目标用户的同步权限,其中,同步权限表征目标用户能否访问第一容器镜像仓库中的镜像文件;在目标用户的同步权限达到目标权限时,将待同步的镜像文件从第一容器镜像仓库同步至第二容器镜像仓库。In an exemplary embodiment, the method for synchronizing mirror files further includes: parsing the synchronization instruction, determining the project identifier of the source project, the project identifier of the target project, and the user information of the target user, wherein the target user is the user who issued the synchronization instruction User; determine the first container mirror warehouse according to the project identification of the source project, determine the second container mirror warehouse according to the project identification of the target project; establish the connection between the first container mirror warehouse and the second container mirror warehouse according to the user information of the target user, and Determine the synchronization authority of the target user, wherein the synchronization authority represents whether the target user can access the image file in the first container image warehouse; when the synchronization authority of the target user reaches the target authority, the image file to be synchronized is transferred from the first container image warehouse Synchronize to the second container mirror repository.
在一个示例性实施例中,镜像文件的同步方法还包括:在将待同步的镜像文件从第一容器镜像仓库同步至第二容器镜像仓库之后,在第一容器镜像仓库中的镜像文件发生更新时,将更新后的镜像文件由第一容器镜像仓库同步至第二容器镜像仓库。In an exemplary embodiment, the method for synchronizing image files further includes: after synchronizing the image files to be synchronized from the first container image repository to the second container image repository, updating the image files in the first container image repository , the updated image file is synchronized from the first container image repository to the second container image repository.
在一个示例性实施例中,镜像文件的同步方法还包括:根据所述遍历结果获取所述第二容器镜像仓库中的第一镜像文件的目标文件标识及目标文件大小;在所述目标数据库中不存在文件标识与所述第一镜像文件的目标文件标识相同,并且,文件大小与所述第一镜像文件的目标文件大小相同的镜像文件时,确定所述第一镜像文件为第一目标镜像文件;根据所述遍历结果获取所述目标数据库中的第二镜像文件的目标文件标识及目标文件大小;在所述第二容器镜像仓库中不存在文件标识与所述第二镜像文件的目标文件标识相同,并且,文件大小与所述第二镜像文件的目标文件大小相同的镜像文件时,确定所述第二镜像文件为第二目标镜像文件。In an exemplary embodiment, the method for synchronizing image files further includes: obtaining the target file identifier and target file size of the first image file in the second container mirror repository according to the traversal result; When there is no image file whose file ID is the same as the target file ID of the first image file and whose file size is the same as the target file size of the first image file, it is determined that the first image file is the first target image file; obtain the target file identifier and target file size of the second image file in the target database according to the traversal result; there is no file identifier and the target file of the second image file in the second container mirror warehouse When identifying the image files that are identical and have the same file size as the target file size of the second image file, it is determined that the second image file is the second target image file.
在一个示例性实施例中,镜像文件的同步方法还包括:在所述目标镜像文件为所述第一目标镜像文件时,获取所述推理平台所提供服务的服务信息、所述第一目标镜像文件的文件标识、所述第一目标镜像文件的镜像同步信息;基于所述服务信息、所述第一目标镜像文件的文件标识及所述镜像同步信息生成目标数据;将所述目标数据及所述第一目标镜像文件同步至所述目标数据库中。In an exemplary embodiment, the method for synchronizing image files further includes: when the target image file is the first target image file, acquiring service information of services provided by the reasoning platform, the first target image The file identifier of the file, the mirror synchronization information of the first target mirror file; generate target data based on the service information, the file identifier of the first target mirror file and the mirror synchronization information; The first target image file is synchronized to the target database.
在一个示例性实施例中,镜像文件的同步方法还包括:在所述目标镜像文件为所述第二目标镜像文件时,从所述目标数据库中删除所述第二目标镜像文件。In an exemplary embodiment, the method for synchronizing an image file further includes: when the target image file is the second target image file, deleting the second target image file from the target database.
在一个示例性实施例中,镜像文件的同步方法还包括:在检测到第二容器镜像仓库中的镜像文件存在更新时,获取更新后的镜像文件;将更新后的镜像文件同步至第一容器镜像仓库中。In an exemplary embodiment, the method for synchronizing the image file further includes: when it is detected that there is an update of the image file in the second container mirror repository, obtaining the updated image file; synchronizing the updated image file to the first container in the mirror repository.
在一个示例性实施例中,镜像文件的同步方法还包括:在基于目标镜像文件将第二容器镜像仓库中的镜像文件同步至目标数据库中之后,响应平台同步指令,将第一推理平台所对应的镜像文件同步至第二推理平台所对应的容器镜像仓库中,其中,第一推理平台的容器镜像仓库与第二推理平台的容器镜像仓库相同。In an exemplary embodiment, the method for synchronizing image files further includes: after synchronizing the image files in the second container mirror warehouse to the target database based on the target image files, responding to the platform synchronization instruction, and synchronizing the The image file of the image is synchronized to the container image repository corresponding to the second inference platform, wherein the container image repository of the first inference platform is the same as the container image repository of the second inference platform.
根据本申请的另一个实施例,提供了一种镜像文件的同步装置,包括:第一同步模块,用于响应同步指令,将待同步的镜像文件从第一容器镜像仓库同步至第二容器镜像仓库,其中,第一容器镜像仓库用于存储训练平台为预设训练场景所生成的镜像文件,第二容器镜像仓库用于存储推理平台为目标对象提供服务所需的镜像文件,第一容器镜像仓库与第二容器镜像仓库属于相同类型的镜像仓库;遍历模块,用于遍历第二容器镜像仓库中的镜像文件,并遍历目标数据库中的镜像文件,得到遍历结果,其中,目标数据库用于存储推理平台能够识别的镜像文件;差异确定模块,用于根据遍历结果确定第二容器镜像仓库与目标数据库之间存在差异的镜像文件,得到目标镜像文件;第二同步模块,用于基于目标镜像文件将第二容器镜像仓库中的镜像文件同步至目标数据库中,以使推理平台使用目标数据库中的镜像文件向目标对象提供服务。According to another embodiment of the present application, a device for synchronizing image files is provided, including: a first synchronization module, configured to respond to a synchronization instruction and synchronize the image files to be synchronized from the first container image warehouse to the second container image Warehouse, wherein, the first container image warehouse is used to store the image files generated by the training platform for preset training scenarios, the second container image warehouse is used to store the image files required by the reasoning platform to provide services for target objects, and the first container image The warehouse and the second container mirror warehouse belong to the same type of mirror warehouse; the traversal module is used to traverse the image files in the second container mirror warehouse, and traverse the mirror files in the target database to obtain the traverse results, wherein the target database is used to store The image file that can be identified by the inference platform; the difference determination module is used to determine the image file that is different between the second container image warehouse and the target database according to the traversal result, and obtain the target image file; the second synchronization module is used to obtain the target image file based on the target image file Synchronize the image file in the second container image warehouse to the target database, so that the reasoning platform uses the image file in the target database to provide services to the target object.
根据本申请的又一个实施例,还提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行上述的镜像文件的同步方法。According to yet another embodiment of the present application, a computer-readable storage medium is also provided, and a computer program is stored in the computer-readable storage medium, wherein the computer program is configured to execute the above-mentioned image file when running. synchronous method.
根据本申请的又一个实施例,还提供了一种电子设备,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行上述的镜像文件的同步方法。According to yet another embodiment of the present application, there is also provided an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the above-mentioned image file synchronization method.
通过本申请,由于容器镜像仓库具有“复制”特性,在同步不同容器镜像仓库的镜像文件的过程中,直接基于容器镜像仓库的“复制”特性,即可实现不同容器镜像仓库之间的同步,而无需保存镜像文件到本地,也无需上传镜像文件至推理平台,在镜像文件比较大时,也可快速实现不同容器镜像仓库之间的同步,从而提高了镜像文件的同步效率。另外,在本申请中,在将推理平台的容器镜像仓库中的镜像文件同步至推理平台的镜像数据库的过程中,是基于容器镜像仓库与镜像数据库之间的镜像文件的差异来对镜像数据库进行同步的,而并不会复制容器镜像仓库中的全部镜像文件,因此,在同步推理平台的容器镜像仓库与推理平台的镜像数据库的过程中,仅需对存在差异的镜像文件进行同步即可,进一步提高了镜像文件的同步效率。而且,即使同步过程出现了任何错误,重新同步也不会大幅度降低同步效率。Through this application, due to the "copy" feature of the container mirror warehouse, in the process of synchronizing the image files of different container mirror warehouses, the synchronization between different container mirror warehouses can be realized directly based on the "copy" feature of the container mirror warehouse. There is no need to save the image file locally or upload the image file to the inference platform. When the image file is relatively large, it can also quickly realize the synchronization between different container image warehouses, thereby improving the synchronization efficiency of the image file. In addition, in this application, in the process of synchronizing the image files in the container mirror warehouse of the inference platform to the mirror database of the inference platform, the mirror database is updated based on the difference between the mirror files in the container mirror warehouse and the mirror database. Synchronized, but will not copy all the image files in the container mirror warehouse. Therefore, in the process of synchronizing the container mirror warehouse of the inference platform and the mirror database of the inference platform, only the mirror files with differences need to be synchronized. Further improved the synchronization efficiency of image files. Moreover, even if any errors occur during the synchronization process, resynchronization will not significantly reduce the synchronization efficiency.
由此可见,本申请所提供的方案可以解决相关技术中,镜像文件同步效率低的问题,达到了提高镜像文件的同步效率的效果。It can be seen that the solution provided by the present application can solve the problem of low mirror file synchronization efficiency in related technologies, and achieve the effect of improving the mirror file synchronization efficiency.
附图说明Description of drawings
图1是相关技术中的镜像转移方法的流程图;Fig. 1 is the flowchart of the image transfer method in the related art;
图2是根据本申请实施例的镜像文件的同步方法的移动终端的硬件结构框图;Fig. 2 is the block diagram of the hardware structure of the mobile terminal according to the synchronization method of the image file of the embodiment of the application;
图3是根据本申请实施例的镜像文件的同步方法的流程图;Fig. 3 is the flow chart of the method for synchronizing the image file according to the embodiment of the application;
图4是根据本申请实施例的容器镜像仓库与镜像数据库之间的镜像同步流程图;FIG. 4 is a flow chart of mirror synchronization between a container mirror warehouse and a mirror database according to an embodiment of the present application;
图5是根据本申请实施例的容器镜像仓库与镜像数据库之间的镜像同步流程图;FIG. 5 is a flow chart of mirror synchronization between a container mirror warehouse and a mirror database according to an embodiment of the present application;
图6是根据本申请实施例的容器镜像仓库与镜像数据库之间的镜像同步流程图;FIG. 6 is a flow chart of mirror synchronization between a container mirror warehouse and a mirror database according to an embodiment of the present application;
图7是根据本申请实施例的镜像文件的同步装置的结构框图;Fig. 7 is the structural block diagram of the synchronization device of mirror image file according to the embodiment of the application;
图8是根据本申请实施例的电子设备的结构示意图。Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
具体实施方式detailed description
下文中将参考附图并结合实施例来详细说明本申请的实施例。Embodiments of the present application will be described in detail below with reference to the drawings and in combination with the embodiments.
需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that the terms "first" and "second" in the description and claims of the present application and the above drawings are used to distinguish similar objects, but not necessarily used to describe a specific sequence or sequence.
本申请实施例中所提供的方法实施例可以在移动终端、计算机终端或者类似的运算装置中执行。以运行在移动终端上为例,图2是本申请实施例的一种镜像文件的同步方法的移动终端的硬件结构框图。如图2所示,移动终端可以包括一个或多个(图2中仅示出一个)处理器202(处理器202可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)和用于存储数据的存储器204,其中,上述移动终端还可以包括用于通信功能的传输设备206以及输入输出设备208。本领域普通技术人员可以理解,图2所示的结构仅为示意,其并不对上述移动终端的结构造成限定。例如,移动终端还可包括比图2中所示更多或者更少的组件,或者具有与图2所示不同的配置。The method embodiments provided in the embodiments of the present application may be executed in mobile terminals, computer terminals or similar computing devices. Taking running on a mobile terminal as an example, FIG. 2 is a block diagram of a hardware structure of a mobile terminal according to a method for synchronizing mirror image files according to an embodiment of the present application. As shown in Figure 2, the mobile terminal may include one or more (only one is shown in Figure 2) processors 202 (processor 202 may include but not limited to processing devices such as microprocessor MCU or programmable logic device FPGA, etc.) and a memory 204 for storing data, wherein the above-mentioned mobile terminal may also include a
存储器204可用于存储计算机程序,例如,应用软件的软件程序以及模块,如本申请实施例中的镜像文件的同步方法对应的计算机程序,处理器202通过运行存储在存储器204内的计算机程序,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器204可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器204可进一步包括相对于处理器202远程设置的存储器,这些远程存储器可以通过网络连接至移动终端。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 204 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the mirror file synchronization method in the embodiment of the present application, and the processor 202 runs the computer program stored in the memory 204, thereby Executing various functional applications and data processing is to realize the above-mentioned method. The memory 204 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 204 may further include a memory that is remotely located relative to the processor 202, and these remote memories may be connected to the mobile terminal through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
传输设备206用于经由一个网络接收或者发送数据。上述的网络具体实例可包括移动终端的通信供应商提供的无线网络。在一个实例中,传输设备206包括一个网络适配器(Network Interface Controller,简称为NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输设备206可以为射频(Radio Frequency,简称为RF)模块,其用于通过无线方式与互联网进行通讯。
在本实施例中提供了一种运行于上述移动终端或网络架构的镜像文件的同步方法,图3是根据本申请实施例的镜像文件的同步方法的流程图,如图3所示,该流程包括如下步骤:In this embodiment, a method for synchronizing a mirror image file running on the above-mentioned mobile terminal or network architecture is provided. FIG. 3 is a flowchart of a method for synchronizing a mirror image file according to an embodiment of the present application. As shown in FIG. 3 , the process Including the following steps:
步骤S302,响应同步指令,将待同步的镜像文件从第一容器镜像仓库同步至第二容器镜像仓库。Step S302, responding to the synchronization command, synchronizing the image file to be synchronized from the first container mirror repository to the second container mirror repository.
在步骤S302中,第一容器镜像仓库用于存储训练平台为预设训练场景所生成的镜像文件,第二容器镜像仓库用于存储推理平台为目标对象提供服务所需的镜像文件,第一容器镜像仓库与第二容器镜像仓库属于相同类型的镜像仓库,但第一容器镜像仓库不同于第二容器镜像仓库。其中,镜像文件表征了推理平台所提供服务的逻辑,例如,镜像文件可以为推理平台向购物平台提供购物服务的逻辑。上述的目标对象可以为个人,也可以为企业,在本申请中不做具体限定。In step S302, the first container image warehouse is used to store the image files generated by the training platform for preset training scenarios, the second container image warehouse is used to store the image files required by the inference platform to provide services for the target objects, and the first container The mirror warehouse and the second container mirror warehouse belong to the same type of mirror warehouse, but the first container mirror warehouse is different from the second container mirror warehouse. Wherein, the image file represents the logic of the service provided by the reasoning platform, for example, the image file may be the logic of the shopping service provided by the reasoning platform to the shopping platform. The above-mentioned target object may be an individual or an enterprise, which is not specifically limited in this application.
可选的,在步骤S302中,容器镜像仓库可以为但不限于Harbor。其中,Harbor为一种开源的容器镜像仓库,Harbor在Docker Registry的基础上进行了相应的企业级扩展,从而使得Harbor具有更加广泛的应用,这些新的企业级特性包括但不限于:管理用户界面、基于角色的访问控制、AD(Active Directory,活动目录)/LDAP(Lightweight DirectoryAccess Protocol,轻量目录访问协议)集成以及审计日志等。Optionally, in step S302, the container mirror repository may be, but not limited to, Harbor. Among them, Harbor is an open source container mirror warehouse. Harbor has carried out corresponding enterprise-level extensions on the basis of Docker Registry, so that Harbor has a wider range of applications. These new enterprise-level features include but are not limited to: management user interface , role-based access control, AD (Active Directory, Active Directory)/LDAP (Lightweight Directory Access Protocol, Lightweight Directory Access Protocol) integration and audit logs, etc.
上述的训练平台为用于面向人工智能企业训练场景的人工智能开发的资源平台,其可实现容器化部署、可视化开发、集中化管理等功能,能够为用户提供极致高性能的AI(Artificial Intelligence,人工智能)计算资源,实现高效的计算力支撑、精准的资源管理和调度、敏捷的数据整合及加速、流程化的AI场景及业务整合,有效打通开发环境、计算资源与数据资源,提升开发效率。The above-mentioned training platform is a resource platform for artificial intelligence development for artificial intelligence enterprise training scenarios. It can realize functions such as containerized deployment, visual development, and centralized management, and can provide users with extremely high-performance AI (Artificial Intelligence, Artificial intelligence) computing resources to achieve efficient computing power support, precise resource management and scheduling, agile data integration and acceleration, process-based AI scenarios and business integration, effectively open up the development environment, computing resources and data resources, and improve development efficiency .
上述的推理平台可以为但不限于人工智能推理服务器平台,其主要面向企业AI应用部署及在线服务管理场景,通过统一应用接口、算力弹性伸缩、A/B测试、滚动发布、多模型加权评估等全栈AI能力,为企业提供可靠、易用、灵活的推理服务部署及计算资源管理平台,帮助用户的AI业务快速上线,提高AI计算资源的利用效率,实现AI产业的快速落地。The reasoning platform mentioned above can be, but not limited to, an artificial intelligence reasoning server platform, which is mainly oriented to enterprise AI application deployment and online service management scenarios, through unified application interface, elastic scaling of computing power, A/B testing, rolling release, and multi-model weighted evaluation And other full-stack AI capabilities, providing enterprises with a reliable, easy-to-use, and flexible inference service deployment and computing resource management platform, helping users quickly launch AI services, improving the utilization efficiency of AI computing resources, and realizing the rapid implementation of the AI industry.
在一种可选的实施例中,推理平台在接收到用户发送的同步镜像文件的同步指令之后,根据同步指令即可确定源镜像仓库(即第一容器镜像仓库)以及目标镜像仓库(即第二容器镜像仓库)。然后,推理平台即可使用Harbor所支持的跨数据仓库镜像远程复制功能,来实现源镜像仓库与目标镜像仓库之间的镜像文件的同步。In an optional embodiment, after the inference platform receives the synchronization instruction for synchronizing the image file sent by the user, it can determine the source mirror warehouse (that is, the first container mirror warehouse) and the target mirror warehouse (that is, the first container mirror warehouse) according to the synchronization instruction. Two container mirror warehouses). Then, the inference platform can use the cross-data warehouse mirror remote replication function supported by Harbor to realize the synchronization of mirror files between the source mirror warehouse and the target mirror warehouse.
需要说明的是,在训练平台生成镜像文件的过程中,开发人员需频繁修改镜像文件,一旦训练完成,即会生成稳定的镜像文件。此时,开发人员可将训练好的环境投入到实际的生产环境中,也即推理平台。此时镜像文件的同步需要经过以下几步:将镜像文件从服务器端保存到本地,并从本地将镜像文件上传至推理平台,以供推理平台使用。而通常情况下,训练平台训练出的镜像文件可能会达到10G及以上,则镜像文件的同步过程将会很长,且如果拷贝到本地或者上传到推理平台的过程中出现任何错误,则需重新同步镜像文件,增加了镜像文件的同步时间。It should be noted that during the process of generating image files on the training platform, developers need to frequently modify the image files. Once the training is completed, a stable image file will be generated. At this point, developers can put the trained environment into the actual production environment, which is the inference platform. At this time, the synchronization of the image file needs to go through the following steps: save the image file from the server to the local, and upload the image file from the local to the inference platform for use by the inference platform. Under normal circumstances, the image file trained by the training platform may reach 10G or more, so the synchronization process of the image file will be very long, and if any error occurs during the process of copying to the local or uploading to the inference platform, you need to restart Synchronize mirror files, increase the synchronization time of mirror files.
而在本申请中,由于Harbor支持跨数据仓库镜像远程复制功能,因此,在跨镜像仓库同步镜像文件的过程中,无需保存镜像文件至本地,也无需将本地的镜像拷贝至推理平台,在镜像文件比较大时,也可快速实现不同容器镜像仓库之间的同步,从而提高了镜像文件的同步效率。即使同步过程出现了任何错误,重新同步也不会大幅度降低同步效率。In this application, since Harbor supports the remote copy function of mirroring across data warehouses, during the process of synchronizing mirroring files across mirroring warehouses, there is no need to save the mirroring files locally, nor to copy the local mirroring to the inference platform. When the file is relatively large, it can also quickly realize the synchronization between different container image warehouses, thereby improving the synchronization efficiency of the image file. Even if there are any errors in the synchronization process, resynchronization will not significantly reduce the synchronization efficiency.
步骤S304,遍历第二容器镜像仓库中的镜像文件,并遍历目标数据库中的镜像文件,得到遍历结果,其中,目标数据库用于存储推理平台能够识别的镜像文件。Step S304, traversing the image files in the second container image repository and traversing the image files in the target database to obtain a traversal result, wherein the target database is used to store image files that can be recognized by the reasoning platform.
在步骤S304中,在实现容器镜像仓库的跨仓库同步之后,推理平台需将推理平台的容器镜像仓库中的镜像文件同步至推理平台的镜像数据库(即上述的目标数据库)之后,推理平台才能够使用这些镜像文件为用户或企业提供服务。In step S304, after realizing the cross-warehouse synchronization of the container mirror warehouse, the reasoning platform needs to synchronize the image files in the container mirror warehouse of the reasoning platform to the mirror database of the reasoning platform (that is, the above-mentioned target database), and then the reasoning platform can Use these image files to provide services to users or businesses.
在将第二容器镜像仓库中的镜像文件同步至目标数据库的过程中,推理平台无需第二容器镜像仓库中的镜像文件全部拷贝至目标数据库中,而是对第二容器镜像仓库和目标数据库进行遍历,根据遍历结果来确定第二容器镜像仓库中的镜像文件与目标数据库中的镜像文件的差异,进而根据该差异即可实现第二容器镜像仓库中的镜像文件的同步。In the process of synchronizing the image files in the second container mirror warehouse to the target database, the reasoning platform does not need to copy all the mirror files in the second container mirror warehouse to the target database, but performs a process on the second container mirror warehouse and the target database Traversing, determining the difference between the image file in the second container mirror repository and the mirror file in the target database according to the traverse result, and then realizing the synchronization of the mirror file in the second container mirror repository according to the difference.
步骤S306,根据遍历结果确定第二容器镜像仓库与目标数据库之间存在差异的镜像文件,得到目标镜像文件。Step S306, according to the traversal result, determine the image file that has a difference between the second container image repository and the target database, and obtain the target image file.
在步骤S306中,上述的目标镜像文件可以是第二容器镜像仓库所具有,但目标数据库不具有的镜像文件,也可以是第二容器镜像仓库不具有,但目标数据库具有的镜像文件。In step S306, the above-mentioned target image file may be an image file that the second container image repository has but that the target database does not have, or an image file that the second container image repository does not have but that the target database has.
容易注意到的是,第二容器镜像仓库与目标数据库之间存在差异的镜像文件的文件数量,通常小于第二容器镜像仓库所具有的镜像文件的数量,因此,在同步推理平台的容器镜像仓库与推理平台的镜像数据库的过程中,对存在差异的镜像文件进行同步,可大幅度降低镜像文件的同步效率。It is easy to notice that the number of image files with differences between the second container image warehouse and the target database is usually smaller than the number of image files in the second container image warehouse. Therefore, the container image warehouse of the synchronous reasoning platform In the process of mirroring the database with the inference platform, synchronizing the mirror files with differences can greatly reduce the synchronization efficiency of the mirror files.
步骤S308,基于目标镜像文件将第二容器镜像仓库中的镜像文件同步至目标数据库中,以使推理平台使用目标数据库中的镜像文件向目标对象提供服务。Step S308, based on the target image file, the image file in the second container image repository is synchronized to the target database, so that the reasoning platform uses the image file in the target database to provide services to the target object.
在步骤S308中,推理平台在同步镜像文件的过程中,可根据目标镜像文件所对应的文件类型来确定镜像文件的同步方式,其中,目标镜像文件所对应的文件类型可以包括但不限于第一文件类型和第二文件类型,第一文件类型为第二容器镜像仓库所具有,但目标数据库不具有的镜像文件;第二文件类型为第二容器镜像仓库不具有,但目标数据库具有的镜像文件。即不同的文件类型所对应的同步方式是不同的,例如,对于第一文件类型,其对应的同步方式为将第二容器镜像仓库所具有,但目标数据库不具有的镜像文件复制至目标数据库中;对于第二文件类型,其对应的同步方式为从目标数据库中删除第二容器镜像仓库不具有,但目标数据库具有的镜像文件。In step S308, in the process of synchronizing the image file, the reasoning platform can determine the synchronization method of the image file according to the file type corresponding to the target image file, wherein the file type corresponding to the target image file can include but not limited to the first The file type and the second file type, the first file type is an image file that the second container image repository has but the target database does not have; the second file type is an image file that the second container image repository does not have but the target database has . That is, different file types correspond to different synchronization methods. For example, for the first file type, the corresponding synchronization method is to copy the image files that the second container mirror warehouse has but not the target database to the target database ; For the second file type, the corresponding synchronization method is to delete from the target database the image file that the second container mirror repository does not have but that the target database has.
另外,在将第二容器镜像仓库中的镜像文件同步至目标数据库的过程中,是基于第二容器镜像仓库与目标数据库之间的镜像文件的差异来对目标数据库进行同步的,而并不会复制第二容器镜像仓库中的全部镜像文件,因此,在同步第二容器镜像仓库与目标数据库的过程中,仅需对存在差异的镜像文件进行同步即可,进一步提高了镜像文件的同步效率。而且,即使同步过程出现了任何错误,重新同步也不会大幅度降低同步效率。In addition, in the process of synchronizing the image file in the second container mirror warehouse to the target database, the target database is synchronized based on the difference between the mirror file in the second container mirror warehouse and the target database, and does not All the image files in the second container mirror warehouse are copied. Therefore, in the process of synchronizing the second container mirror warehouse with the target database, only the mirror files with differences need to be synchronized, which further improves the synchronization efficiency of mirror files. Moreover, even if any errors occur during the synchronization process, resynchronization will not significantly reduce the synchronization efficiency.
基于上述步骤S302至步骤S308所限定的内容可知,由于容器镜像仓库具有“复制”特性,在同步不同容器镜像仓库的镜像文件的过程中,直接基于容器镜像仓库的“复制”特性,即可实现不同容器镜像仓库之间的同步,而无需保存镜像文件到本地,也无需上传镜像文件至推理平台,在镜像文件比较大时,也可快速实现不同容器镜像仓库之间的同步,从而提高了镜像文件的同步效率。另外,在本申请中,在将推理平台的容器镜像仓库中的镜像文件同步至推理平台的镜像数据库的过程中,是基于容器镜像仓库与镜像数据库之间的镜像文件的差异来对镜像数据库进行同步的,而并不会复制容器镜像仓库中的全部镜像文件,因此,在同步推理平台的容器镜像仓库与推理平台的镜像数据库的过程中,仅需对存在差异的镜像文件进行同步即可,进一步提高了镜像文件的同步效率。而且,即使同步过程出现了任何错误,重新同步也不会大幅度降低同步效率。Based on the content defined in the above steps S302 to S308, it can be seen that since the container mirror warehouse has the "copy" feature, in the process of synchronizing the image files of different container mirror warehouses, it can be realized directly based on the "copy" feature of the container mirror warehouse. Synchronization between different container mirror repositories does not need to save the mirror file locally, nor upload the mirror file to the inference platform. When the mirror file is relatively large, it can also quickly realize the synchronization between different container mirror warehouses, thereby improving the image quality. File synchronization efficiency. In addition, in this application, in the process of synchronizing the image files in the container mirror warehouse of the inference platform to the mirror database of the inference platform, the mirror database is updated based on the difference between the mirror files in the container mirror warehouse and the mirror database. Synchronized, but will not copy all the image files in the container mirror warehouse. Therefore, in the process of synchronizing the container mirror warehouse of the inference platform and the mirror database of the inference platform, only the mirror files with differences need to be synchronized. Further improved the synchronization efficiency of image files. Moreover, even if any errors occur during the synchronization process, resynchronization will not significantly reduce the synchronization efficiency.
由此可见,本申请所提供的方案可以解决相关技术中,镜像文件同步效率低的问题,达到了提高镜像文件的同步效率的效果。It can be seen that the solution provided by the present application can solve the problem of low mirror file synchronization efficiency in related technologies, and achieve the effect of improving the mirror file synchronization efficiency.
需要说明的是,上述步骤的执行主体可以为推理平台,但不限于此。It should be noted that the execution subject of the above steps may be an inference platform, but is not limited thereto.
此外,还需要说明的是,以下对上述步骤S302至步骤S308进行详细说明。In addition, it should be noted that the above step S302 to step S308 will be described in detail below.
在一种可选的实施例中,镜像文件的同步包括两个阶段,即镜像转移阶段和数据库同步阶段,其中,镜像转移阶段主要实现推理平台的容器镜像仓库与其他平台的容器镜像仓库之间的镜像文件的同步,其他平台可以是其他推理平台,也可以是训练平台;数据库同步阶段主要实现推理平台的容器镜像仓库(即第二容器镜像仓库)与推理平台的镜像数据库(即目标数据库)之间的镜像文件的同步。In an optional embodiment, the synchronization of image files includes two stages, namely the image transfer stage and the database synchronization stage, wherein the image transfer stage mainly realizes the connection between the container mirror warehouse of the inference platform and the container mirror warehouse of other platforms The other platforms can be other inference platforms or training platforms; the database synchronization stage mainly implements the container mirror warehouse of the inference platform (ie, the second container mirror warehouse) and the mirror database of the inference platform (ie, the target database). Synchronization of mirror files between.
在镜像转移阶段,推理平台响应同步指令,将待同步的镜像文件从第一容器镜像仓库同步至第二容器镜像仓库。In the image transfer phase, the reasoning platform responds to the synchronization command and synchronizes the image files to be synchronized from the first container image repository to the second container image repository.
具体的,推理平台对对同步指令进行解析,确定源项目的项目标识、目标项目的项目标识以及目标用户的用户信息,并根据源项目的项目标识确定第一容器镜像仓库,根据目标项目的项目标识确定第二容器镜像仓库。然后,根据目标用户的用户信息建立第一容器镜像仓库与第二容器镜像仓库的连接,并确定目标用户的同步权限。最后,推理平台在目标用户的同步权限达到目标权限时,将待同步的镜像文件从第一容器镜像仓库同步至第二容器镜像仓库。Specifically, the reasoning platform analyzes the synchronization command, determines the project identifier of the source project, the project identifier of the target project, and the user information of the target user, and determines the first container mirror warehouse according to the project identifier of the source project, and determines the first container mirror warehouse according to the project identifier of the target project. The ID identifies the second container registry. Then, establish a connection between the first container mirror repository and the second container mirror repository according to the user information of the target user, and determine the synchronization permission of the target user. Finally, the reasoning platform synchronizes the image file to be synchronized from the first container mirror warehouse to the second container mirror warehouse when the synchronization authority of the target user reaches the target authority.
在上述过程中,目标用户为发出同步指令的用户,同步权限表征目标用户能否访问第一容器镜像仓库中的镜像文件,其中,同步权限表征Harbor的复制策略是否被激活,即在本实施例中,只有具有一定权限的用户在发出同步指令之后,才能激活Harbor的复制策略,实现跨容器镜像仓库的镜像同步。In the above process, the target user is the user who issued the synchronization command, and the synchronization permission indicates whether the target user can access the image file in the first container mirror repository, wherein the synchronization permission indicates whether Harbor's replication strategy is activated, that is, in this embodiment In , only users with certain permissions can activate Harbor's replication strategy after issuing a synchronization command to achieve mirror synchronization across container mirror warehouses.
可选的,目标用户可通过终端设备确定源项目的项目标识、目标项目的项目标识,以及源项目所对应的容器镜像仓库与目标项目所对应的容器镜像仓库之间连接所需的用户名和密码及容器仓库镜像的地址等信息(即上述的用户信息)。在目标用户设置好上述信息之后,终端设备即可基于上述信息生成同步指令,并将上述同步指令发送至推理平台,进而推理平台对同步指令进行解析,得到源项目的项目标识、目标项目的项目标识以及目标用户的用户信息。推理平台根据源项目的项目标识与目标项目的项目标识,即可确定源项目的容器镜像仓库的地址与目标项目的容器镜像仓库的地址,并基于两个容器镜像仓库的地址建立两个容器镜像仓库之间的连接。Optionally, the target user can determine the project ID of the source project, the project ID of the target project, and the user name and password required for the connection between the container mirror warehouse corresponding to the source project and the container mirror warehouse corresponding to the target project through the terminal device And information such as the address of the container warehouse image (that is, the above-mentioned user information). After the target user sets the above information, the terminal device can generate a synchronization command based on the above information, and send the above synchronization command to the reasoning platform, and then the reasoning platform parses the synchronization command to obtain the project ID of the source project and the project of the target project Identification and user information of the target user. The inference platform can determine the address of the source project's container mirror repository and the address of the target project's container mirror repository according to the project identifier of the source project and the project identifier of the target project, and establish two container images based on the addresses of the two container mirror warehouses Links between warehouses.
在两个容器镜像仓库之间的连接之后,推理平台根据目标用户的用户信息进行权限确定,例如,推理平台可根据目标用户的用户名来确定该用户是否能够访问第一容器镜像仓库中的镜像文件。在确定该用户能够访问第一容器镜像仓库中的镜像文件时,推理平台即可确定Harbor的复制策略被激活,此时,推理平台将Harbor的源项目下的所有镜像文件复制到Harbor的目标项目对应的容器镜像仓库中,从而实现了容器镜像文件的跨仓库同步。After the connection between the two container mirror repositories, the reasoning platform determines the authority according to the user information of the target user. For example, the reasoning platform can determine whether the user can access the image in the first container mirror warehouse based on the user name of the target user. document. When it is determined that the user can access the image files in the first container mirror warehouse, the reasoning platform can determine that Harbor’s replication strategy is activated. At this time, the reasoning platform will copy all the image files under Harbor’s source project to Harbor’s target project In the corresponding container image warehouse, the synchronization of container image files across warehouses is realized.
需要说明的是,由于Harbor支持跨数据仓库镜像远程复制功能,因此,在跨镜像仓库同步镜像文件的过程中,无需保存镜像文件至本地,也无需将本地的镜像拷贝至推理平台,在镜像文件比较大时,也可快速实现不同容器镜像仓库之间的同步,从而提高了镜像文件的同步效率。即使同步过程出现了任何错误,重新同步也不会大幅度降低同步效率。It should be noted that since Harbor supports the remote replication function of cross-data warehouse images, there is no need to save the image files locally or copy the local images to the inference platform during the process of synchronizing image files across image warehouses. When it is relatively large, it can also quickly realize the synchronization between different container image warehouses, thereby improving the synchronization efficiency of image files. Even if there are any errors in the synchronization process, resynchronization will not significantly reduce the synchronization efficiency.
进一步的,在将待同步的镜像文件从第一容器镜像仓库同步至第二容器镜像仓库之后,在第一容器镜像仓库中的镜像文件发生更新时,推理平台将更新后的镜像文件由第一容器镜像仓库同步至第二容器镜像仓库。Further, after synchronizing the image file to be synchronized from the first container image repository to the second container image repository, when the image file in the first container image repository is updated, the reasoning platform will update the image file from the first container image repository The container mirror repository is synchronized to the second container mirror repository.
需要说明的是,由于Harbor具有跨数据仓库镜像远程复制的功能,因此,在Harbor的源项目下的镜像文件被添加或删除时,只要复制策略还处于激活状态,则第一容器镜像仓库中镜像文件的变化都会自动同步到第二容器镜像仓库中,而无需用户再手动操作,实现了镜像文件的跨镜像仓库的更新,提高了镜像文件的同步效率。It should be noted that since Harbor has the function of remote replication of images across data warehouses, when image files under Harbor’s source project are added or deleted, as long as the replication strategy is still active, the images in the first container image warehouse The changes of the files will be automatically synchronized to the second container mirror warehouse without manual operation by the user, which realizes the update of mirror files across mirror warehouses and improves the synchronization efficiency of mirror files.
在一种可选的实施例中,在数据库同步阶段,推理平台执行步骤S304至步骤S308,以实现推理平台的容器镜像仓库与镜像数据库之间的镜像同步。在该阶段,推理平台可根据目标镜像文件所对应的文件类型来确定镜像文件的同步方式。In an optional embodiment, during the database synchronization phase, the reasoning platform executes steps S304 to S308 to realize mirror synchronization between the container mirror warehouse of the reasoning platform and the mirror database. At this stage, the inference platform can determine the synchronization method of the image file according to the file type corresponding to the target image file.
在文件类型为第一文件类型(即第二容器镜像仓库所具有,但目标数据库不具有的镜像文件)时,推理平台遍历第二容器镜像仓库中的镜像文件,及目标数据库中的镜像文件,得到遍历结果,并根据遍历结果获取第二容器镜像仓库中的第一镜像文件的目标文件标识及第一镜像文件的目标文件大小。在目标数据库中不存在文件标识与第一镜像文件的目标文件标识相同,并且,文件大小与第一镜像文件的目标文件大小相同的镜像文件时,确定第一镜像文件为第一目标镜像文件。When the file type is the first file type (that is, the image file that the second container image warehouse has, but the target database does not have), the reasoning platform traverses the image files in the second container image warehouse and the image files in the target database, The traversal result is obtained, and the target file identifier of the first image file in the second container mirror repository and the target file size of the first image file are obtained according to the traversal result. When there is no mirror file whose file ID is the same as the target file ID of the first mirror file and whose file size is the same as the target file size of the first mirror file, the first mirror file is determined to be the first target mirror file in the target database.
在确定目标镜像文件为第一目标镜像文件之后,推理平台获取推理平台所提供服务的服务信息、第一目标镜像文件的文件标识、第一目标镜像文件的镜像同步信息,并基于服务信息、第一目标镜像文件的文件标识及镜像同步信息生成目标数据,然后,将目标数据及第一目标镜像文件同步至目标数据库中。After determining that the target image file is the first target image file, the inference platform obtains the service information of the services provided by the inference platform, the file identifier of the first target image file, and the image synchronization information of the first target image file, and based on the service information, the first target image file The file identification of a target mirror image file and the mirror synchronization information generate target data, and then, the target data and the first target mirror file are synchronized to the target database.
可选的,图4示出了在文件类型为第一文件类型(即第二容器镜像仓库所具有,但目标数据库不具有的镜像文件)时,容器镜像仓库与镜像数据库之间的镜像同步过程。如图4所示,推理平台首先遍历第二容器镜像仓库中的镜像文件,并遍历目标数据库中的镜像文件,在检测目标数据库中是否存在文件标识与第一镜像文件的目标文件标识相同,并且文件大小与第一镜像文件的目标文件大小相同的镜像文件。如果存在,则推理平台继续比对第二容器镜像仓库中的下一个镜像文件与目标数据库中的镜像文件,直至第二容器镜像仓库中的镜像文件与目标数据库中的镜像文件完全相同,或者,目标数据库中不存在文件标识与第一镜像文件的目标文件标识相同,或者文件大小与第一镜像文件的目标文件大小相同的镜像文件为止。Optionally, FIG. 4 shows that when the file type is the first file type (that is, the mirror file that the second container mirror warehouse has, but the target database does not have), the image synchronization process between the container mirror warehouse and the mirror database . As shown in Figure 4, the reasoning platform first traverses the image files in the second container image warehouse, and traverses the image files in the target database, and detects whether there is a file ID in the target database that is the same as the target file ID of the first image file, and An image file having the same file size as the target file size of the first image file. If it exists, the reasoning platform continues to compare the next image file in the second container image repository with the image file in the target database until the image file in the second container image repository is exactly the same as the image file in the target database, or, Until there is no mirror file whose file ID is the same as the target file ID of the first mirror file, or whose file size is the same as the target file size of the first mirror file, does not exist in the target database.
另外,如图4所示,在目标数据库中存在文件标识与第一镜像文件的目标文件标识相同,并且文件大小与第一镜像文件的目标文件大小相同的镜像文件时,推理平台按照推理平台能够识别的数据格式对目标镜像文件的文件标识(例如,镜像文件的名称)、推理平台所提供服务的服务信息以及目标镜像文件的镜像同步信息进行组合,得到目标数据,并将该目标数据插入到推理平台的目标数据库中,同时将第一镜像文件同步至推理平台的目标数据库中,从而在推理平台的目标数据库中不仅存储有第一镜像文件,还存储有第一镜像文件的相关信息。In addition, as shown in Figure 4, when there is an image file with the same file ID as the target file ID of the first image file and the same file size as the target file size of the first image file in the target database, the inference platform can The identified data format combines the file identification (for example, the name of the image file) of the target image file, the service information of the service provided by the inference platform, and the image synchronization information of the target image file to obtain the target data, and insert the target data into In the target database of the inference platform, the first image file is simultaneously synchronized to the target database of the inference platform, so that not only the first image file but also related information of the first image file are stored in the target database of the inference platform.
需要说明的是,上述推理平台所提供服务的服务信息可以包括但不限于接收上述服务的对象的对象信息,例如,对象名称、对象所属的用户组等,其中,该对象信息表征该对象所具有的权限,该权限表征了该对象可享有的推理平台所提供的服务,例如,推理平台向对象1提供服务A和B,即对象1可访问服务A和B所对应的镜像文件;推理平台向对象2提供服务A和C,即对象2可访问服务A和C所对应的镜像文件。It should be noted that the service information of the service provided by the above reasoning platform may include but not limited to the object information of the object receiving the above service, for example, the name of the object, the user group to which the object belongs, etc., wherein the object information indicates that the object has The permissions represent the services provided by the inference platform that the object can enjoy. For example, the inference platform provides services A and B to object 1, that is, object 1 can access the image files corresponding to services A and B; the inference platform provides Object 2 provides services A and C, that is, object 2 can access the image files corresponding to services A and C.
另外,上述的镜像同步信息可以包括但不限于第二容器镜像仓库与目标数据库之间同步镜像文件的时间以及目标镜像文件的大小等信息。In addition, the above-mentioned image synchronization information may include but not limited to information such as the time for synchronizing the image file between the second container mirror repository and the target database, the size of the target image file, and the like.
在文件类型为第二文件类型(即第二容器镜像仓库不具有,但目标数据库具有的镜像文件)时,推理平台遍历第二容器镜像仓库中的镜像文件,及目标数据库中的镜像文件,得到遍历结果,并根据遍历结果获取目标数据库中的第二镜像文件的目标文件标识及第二镜像文件的目标文件大小。在第二容器镜像仓库中不存在文件标识与第二镜像文件的目标文件标识相同,并且,文件大小与第二镜像文件的目标文件大小相同的镜像文件时,推理平台确定第二镜像文件为第二目标镜像文件。When the file type is the second file type (that is, the image file that the target database does not have in the second container image repository), the reasoning platform traverses the image files in the second container image repository and the image files in the target database to obtain Traversing the results, and obtaining the target file identifier of the second mirror image file and the target file size of the second mirror image file in the target database according to the traverse results. When there is no image file with the same file ID as the target file ID of the second image file and the same file size as the target file size of the second image file in the second container image warehouse, the reasoning platform determines that the second image file is the first image file Two target image files.
在确定了目标镜像文件之后,推理平台从目标数据库中删除第二目标镜像文件。After the target image file is determined, the reasoning platform deletes the second target image file from the target database.
可选的,图5示出了在文件类型为第二文件类型(即第二容器镜像仓库不具有,但目标数据库具有的镜像文件)时,容器镜像仓库与镜像数据库之间的镜像同步过程。如图5所示,推理平台首先遍历第二容器镜像仓库中的镜像文件,并遍历目标数据库中的镜像文件,在检测第二容器镜像仓库中是否存在文件标识与第二镜像文件的目标文件标识相同,并且,文件大小与第二镜像文件的目标文件大小相同的镜像文件。如果存在,则推理平台继续比对目标数据库中的下一个镜像文件与第二容器镜像仓库中的镜像文件,直至目标数据库中的镜像文件与第二容器镜像仓库中的镜像文件完全相同,或者,第二容器镜像仓库中不存在文件标识与第二镜像文件的目标文件标识相同,并且文件大小与第二镜像文件的目标文件大小相同的镜像文件为止。Optionally, FIG. 5 shows the image synchronization process between the container mirror repository and the mirror database when the file type is the second file type (that is, the image file that the second container mirror repository does not have, but the target database has). As shown in Figure 5, the inference platform first traverses the image files in the second container image warehouse, and traverses the image files in the target database, and detects whether there is a file identifier and the target file identifier of the second image file in the second container image warehouse The image files are the same, and the file size is the same as the target file size of the second image file. If it exists, the reasoning platform continues to compare the next image file in the target database with the image file in the second container image repository until the image file in the target database is exactly the same as the image file in the second container image repository, or, There is no image file whose file ID is the same as the target file ID of the second image file and whose file size is the same as the target file size of the second image file in the second container mirror repository.
另外,如图5所示,在第二容器镜像仓库中不存在文件标识与第二镜像文件的目标文件标识相同,并且,文件大小与第二镜像文件的目标文件大小相同的镜像文件时,推理平台从目标数据库中删除第二目标镜像文件以及与第二目标镜像文件对应的相关数据。In addition, as shown in Figure 5, when there is no image file whose file ID is the same as the target file ID of the second image file in the second container image warehouse, and the file size is the same as the target file size of the second image file, reasoning The platform deletes the second target image file and related data corresponding to the second target image file from the target database.
需要说明的是,上述方法既可以保证用户原先在推理平台中的数据不被删除,又可以保证其他项目的镜像可以被同步过来,从而实现了推理平台的容器镜像仓库与镜像数据库之间的镜像同步。It should be noted that the above method can not only ensure that the user's original data in the inference platform will not be deleted, but also ensure that the mirroring of other projects can be synchronized, thus realizing the mirroring between the container mirror warehouse of the inference platform and the mirror database Synchronize.
此外,还需要说明的是,在实际应用中,推理平台通过容器镜像仓库与镜像数据库之间的镜像文件的过程中,需进行上述第一文件类型和第二文件类型的两种处理方式。上述第一文件类型和第二文件类型的两种处理方式可同时进行,也可以按照需求设定执行顺序,在本实施例中不对两种处理方式的顺序进行具体限定,例如,图6示意性地示出了先执行第一文件类型的处理方式,在执行第二文件类型的处理方式的镜像文件的同步流程。In addition, it should be noted that in practical applications, the reasoning platform needs to perform the above-mentioned two processing methods of the first file type and the second file type during the process of passing the mirror file between the container mirror warehouse and the mirror database. The above-mentioned two processing methods of the first file type and the second file type can be performed simultaneously, and the execution order can also be set according to the requirements. In this embodiment, the order of the two processing methods is not specifically limited. For example, FIG. 6 schematically It shows the synchronization flow of the image file in which the processing mode of the first file type is executed first, and then the processing mode of the second file type is executed.
在一种可选的实施例中,用户可对本实施例所提供的方案稍作修改,即可实现推理平台向其他训练平台之间的镜像同步。In an optional embodiment, the user can slightly modify the solution provided in this embodiment to achieve mirror synchronization between the inference platform and other training platforms.
具体的,在检测到第二容器镜像仓库中的镜像文件存在更新时,获取更新后的镜像文件,并将更新后的镜像文件同步至第一容器镜像仓库中。例如,在实际应用中,推理平台根据实际需求对第二容器镜像仓库中的镜像文件进行了更新(例如,修改、删除或增加),此时,推理平台可将更新的镜像文件同步至训练平台的容器镜像仓库(即第一容器镜像仓库)中,从而实现第一容器镜像仓库与第二容器镜像仓库的镜像同步。Specifically, when it is detected that the image file in the second container image repository is updated, the updated image file is obtained, and the updated image file is synchronized to the first container image repository. For example, in a practical application, the reasoning platform updates (for example, modifies, deletes or adds) the image file in the second container image warehouse according to actual needs, and at this time, the reasoning platform can synchronize the updated image file to the training platform In the container mirror warehouse (that is, the first container mirror warehouse), the image synchronization between the first container mirror warehouse and the second container mirror warehouse is realized.
需要说明的是,推理平台向其他训练平台之间的镜像同步过程,与训练平台向推理平台同步镜像的过程类似,在此不再赘述。It should be noted that the image synchronization process between the inference platform and other training platforms is similar to the process of synchronizing images from the training platform to the inference platform, and will not be repeated here.
在另一种可选的实施例中,本实施例所提供的方案还可应用于推理平台之间的镜像转移。具体的,在基于目标镜像文件将第二容器镜像仓库中的镜像文件同步至目标数据库中之后,推理平台响应平台同步指令,将第一推理平台所对应的镜像文件同步至第二推理平台所对应的容器镜像仓库中,其中,第一推理平台的容器镜像仓库与第二推理平台的容器镜像仓库相同。In another optional embodiment, the solution provided in this embodiment may also be applied to image transfer between inference platforms. Specifically, after synchronizing the image file in the second container image warehouse to the target database based on the target image file, the inference platform responds to the platform synchronization command and synchronizes the image file corresponding to the first inference platform to the image file corresponding to the second inference platform. In the container mirror warehouse of the first reasoning platform, the container mirror warehouse of the first reasoning platform is the same as the container mirror warehouse of the second reasoning platform.
可选的,源推理平台(即第一推理平台)在接收到同步指令之后,对同步指令进行解析,即可确定目标推理平台(即第二推理平台)的相关信息,例如,目标推理平台的地址、名称、镜像访问权限等,然后源推理平台根据目标推理平台的镜像访问权限确定需要同步的镜像文件,并根据目标推理平台的地址、名称等将需要同步的镜像文件同步至目标推理平台的容器镜像仓库中。Optionally, after receiving the synchronization instruction, the source reasoning platform (that is, the first reasoning platform) can analyze the synchronization instruction to determine the relevant information of the target reasoning platform (that is, the second reasoning platform), for example, the target reasoning platform address, name, mirror access rights, etc., and then the source inference platform determines the mirror files that need to be synchronized according to the mirror access rights of the target reasoning platform, and synchronizes the mirror files that need to be synchronized to the target reasoning platform based on the address and name of the target reasoning platform. in the container registry.
由上述内容可知,本实施例所提供的方案可实现训练环境或者用户测试环境向推理平台同步镜像文件,也可实现推理平台之间的镜像文件的同步,操作简单,大大提高了镜像文件的同步速度,且此方案稍作修改即可应用于推理平台向其他训练平台的镜像同步,可移植性强。It can be seen from the above that the solution provided in this embodiment can realize the synchronization of image files from the training environment or the user test environment to the inference platform, and can also realize the synchronization of image files between inference platforms. The operation is simple and the synchronization of image files is greatly improved. Speed, and this scheme can be applied to the mirror synchronization of the inference platform to other training platforms with a slight modification, and the portability is strong.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product in essence or the part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions to enable a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application.
在本实施例中还提供了一种镜像文件的同步装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In this embodiment, there is also provided a device for synchronizing mirror files, which is used to implement the above embodiments and preferred implementation modes, and what has been explained will not be repeated here. As used below, the term "module" may be a combination of software and/or hardware that realizes a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementations in hardware, or a combination of software and hardware are also possible and contemplated.
图7是根据本申请实施例的镜像文件的同步装置的结构框图,如图7所示,该装置包括:第一同步模块701、遍历模块703、差异确定模块705以及第二同步模块707。FIG. 7 is a structural block diagram of an apparatus for synchronizing mirrored files according to an embodiment of the present application. As shown in FIG.
其中,第一同步模块701,用于响应同步指令,将待同步的镜像文件从第一容器镜像仓库同步至第二容器镜像仓库,其中,第一容器镜像仓库用于存储训练平台为预设训练场景所生成的镜像文件,第二容器镜像仓库用于存储推理平台为目标对象提供服务所需的镜像文件,第一容器镜像仓库与第二容器镜像仓库属于相同类型的镜像仓库;遍历模块703,用于遍历第二容器镜像仓库中的镜像文件,并遍历目标数据库中的镜像文件,得到遍历结果,其中,目标数据库用于存储推理平台能够识别的镜像文件;差异确定模块705,用于根据遍历结果确定第二容器镜像仓库与目标数据库之间存在差异的镜像文件,得到目标镜像文件;第二同步模块707,用于基于目标镜像文件将第二容器镜像仓库中的镜像文件同步至目标数据库中,以使推理平台使用目标数据库中的镜像文件向目标对象提供服务。Wherein, the
可选的,第一同步模块包括:第一确定模块、第二确定模块、第三确定模块以及第三同步模块。其中,第一确定模块,用于对同步指令进行解析,确定源项目的项目标识、目标项目的项目标识以及目标用户的用户信息,其中,目标用户为发出同步指令的用户;第二确定模块,用于根据源项目的项目标识确定第一容器镜像仓库,根据目标项目的项目标识确定第二容器镜像仓库;第三确定模块,用于根据目标用户的用户信息建立第一容器镜像仓库与第二容器镜像仓库的连接,并确定目标用户的同步权限,其中,同步权限表征目标用户能否访问第一容器镜像仓库中的镜像文件;第三同步模块,用于在目标用户的同步权限达到目标权限时,将待同步的镜像文件从第一容器镜像仓库同步至第二容器镜像仓库。Optionally, the first synchronization module includes: a first determination module, a second determination module, a third determination module, and a third synchronization module. Wherein, the first determination module is used to analyze the synchronization instruction, determine the project identification of the source project, the project identification of the target project and the user information of the target user, wherein the target user is the user who issued the synchronization instruction; the second determination module, It is used to determine the first container mirror warehouse according to the project identification of the source project, and determine the second container mirror warehouse according to the project identification of the target project; the third determination module is used to establish the first container mirror warehouse and the second container mirror warehouse according to the user information of the target user. The connection of the container mirror warehouse, and determine the synchronization authority of the target user, wherein the synchronization authority represents whether the target user can access the image file in the first container mirror warehouse; the third synchronization module is used to achieve the target authority after the synchronization authority of the target user , the mirror file to be synchronized is synchronized from the first container mirror warehouse to the second container mirror warehouse.
可选的,镜像文件的同步装置还包括:第四同步模块,用于在将待同步的镜像文件从第一容器镜像仓库同步至第二容器镜像仓库之后,在第一容器镜像仓库中的镜像文件发生更新时,将更新后的镜像文件由第一容器镜像仓库同步至第二容器镜像仓库。Optionally, the synchronization device of the image file also includes: a fourth synchronization module, which is used to synchronize the image file in the first container image repository after the image file to be synchronized is synchronized from the first container image repository to the second container image repository. When the file is updated, the updated image file is synchronized from the first container mirror warehouse to the second container mirror warehouse.
可选的,差异确定模块包括:第一获取模块、第四确定模块、第三获取模块以及第五确定模块。其中,第一获取模块,用于根据遍历结果获取第二容器镜像仓库中的第一镜像文件的目标文件标识及目标文件大小;第四确定模块,用于在目标数据库中不存在文件标识与目标文件标识相同,并且,文件大小与目标文件大小相同的镜像文件时,确定第一镜像文件为第一目标镜像文件;第三获取模块以及第五确定模块;第三获取模块,用于根据遍历结果获取目标数据库中的第二镜像文件的目标文件标识及目标文件大小;第五确定模块,用于在第二容器镜像仓库中不存在文件标识与目标文件标识相同,并且,文件大小与目标文件大小相同的镜像文件时,确定第二镜像文件为第二目标镜像文件。Optionally, the difference determining module includes: a first obtaining module, a fourth determining module, a third obtaining module and a fifth determining module. Wherein, the first obtaining module is used to obtain the target file identifier and the target file size of the first image file in the second container mirror warehouse according to the traversal result; the fourth determining module is used for not having the file identifier and the target file size in the target database. The file identification is the same, and when the image file with the same file size and the target file size, determine that the first image file is the first target image file; the third acquisition module and the fifth determination module; the third acquisition module, for according to the traversal result Obtain the target file identifier and the target file size of the second mirror image file in the target database; the fifth determination module is used for not having the same file identifier and the target file identifier in the second container image warehouse, and the file size is the same as the target file size When the image files are the same, it is determined that the second image file is the second target image file.
可选的,第二同步模块包括:第二获取模块、生成模块以及第五同步模块。其中,第二获取模块,用于在目标镜像文件为第一目标镜像文件时,获取推理平台所提供服务的服务信息、目标镜像文件的文件标识、目标镜像文件的镜像同步信息;生成模块,用于基于服务信息、目标镜像文件的文件标识及镜像同步信息生成目标数据;第五同步模块,用于将目标数据及目标镜像文件同步至目标数据库中。Optionally, the second synchronization module includes: a second acquisition module, a generation module and a fifth synchronization module. Wherein, the second obtaining module is used to obtain the service information of the service provided by the reasoning platform, the file identification of the target mirror file, and the mirror synchronization information of the target mirror file when the target mirror file is the first target mirror file; the generation module uses The target data is generated based on the service information, the file identification of the target mirror file and the mirror synchronization information; the fifth synchronization module is used to synchronize the target data and the target mirror file to the target database.
可选的,第二同步模块包括:文件删除模块,用于在目标镜像文件为第二目标镜像文件时,从目标数据库中删除目标镜像文件。Optionally, the second synchronization module includes: a file deletion module, configured to delete the target image file from the target database when the target image file is the second target image file.
可选的,镜像文件的同步装置还包括:第四获取模块以及第六同步模块。其中,第四获取模块,用于在检测到第二容器镜像仓库中的镜像文件存在更新时,获取更新后的镜像文件;第六同步模块,用于将更新后的镜像文件同步至第一容器镜像仓库中。Optionally, the device for synchronizing the image file further includes: a fourth acquiring module and a sixth synchronizing module. Wherein, the fourth obtaining module is used to obtain the updated image file when it is detected that the image file in the second container image warehouse is updated; the sixth synchronization module is used to synchronize the updated image file to the first container in the mirror repository.
可选的,镜像文件的同步装置还包括:第七同步模块,用于在基于目标镜像文件将第二容器镜像仓库中的镜像文件同步至目标数据库中之后,响应平台同步指令,将第一推理平台所对应的镜像文件同步至第二推理平台所对应的容器镜像仓库中,其中,第一推理平台的容器镜像仓库与第二推理平台的容器镜像仓库相同。Optionally, the device for synchronizing the image file also includes: a seventh synchronization module, configured to respond to the platform synchronization instruction after synchronizing the image file in the second container image warehouse to the target database based on the target image file, and convert the first inference The image file corresponding to the platform is synchronized to the container mirror warehouse corresponding to the second reasoning platform, wherein the container mirror warehouse of the first reasoning platform is the same as the container mirror warehouse of the second reasoning platform.
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。It should be noted that the above-mentioned modules can be realized by software or hardware. For the latter, it can be realized by the following methods, but not limited to this: the above-mentioned modules are all located in the same processor; or, the above-mentioned modules can be combined in any combination The forms of are located in different processors.
本申请的实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。Embodiments of the present application also provide a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to perform the steps in any one of the above method embodiments when running.
在一个示例性实施例中,上述计算机可读存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储计算机程序的介质。In an exemplary embodiment, the above-mentioned computer-readable storage medium may include but not limited to: U disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM) , mobile hard disk, magnetic disk or optical disk and other media that can store computer programs.
本申请的实施例还提供了一种电子设备,其中,图8是根据本申请实施例的一种可选的电子设备的示意图,如图8所示,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。The embodiment of the present application also provides an electronic device, wherein, FIG. 8 is a schematic diagram of an optional electronic device according to the embodiment of the present application. As shown in FIG. 8 , it includes a memory and a processor, and the memory stores There is a computer program, and the processor is configured to run the computer program to perform the steps in any one of the above method embodiments.
在一个示例性实施例中,上述电子设备还可以包括传输设备以及输入输出设备(图8未示出),其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。In an exemplary embodiment, the electronic device may further include a transmission device and an input and output device (not shown in FIG. 8 ), wherein the transmission device is connected to the processor, and the input and output device is connected to the processor.
本实施例中的具体示例可以参考上述实施例及示例性实施方式中所描述的示例,本实施例在此不再赘述。For specific examples in this embodiment, reference may be made to the examples described in the foregoing embodiments and exemplary implementation manners, and details will not be repeated here in this embodiment.
显然,本领域的技术人员应该明白,上述的本申请的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本申请不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that each module or each step of the above-mentioned application can be realized by a general-purpose computing device, and they can be concentrated on a single computing device, or distributed in a network composed of multiple computing devices In fact, they can be implemented in program code executable by a computing device, and thus, they can be stored in a storage device to be executed by a computing device, and in some cases, can be executed in an order different from that shown here. Or described steps, or they are fabricated into individual integrated circuit modules, or multiple modules or steps among them are fabricated into a single integrated circuit module for implementation. As such, the present application is not limited to any specific combination of hardware and software.
以上所述仅为本申请的优选实施例而已,并不用于限制本申请,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above descriptions are only preferred embodiments of the present application, and are not intended to limit the present application. For those skilled in the art, there may be various modifications and changes in the present application. Any modifications, equivalent replacements, improvements, etc. made within the principles of this application shall be included within the scope of protection of this application.
Claims (11)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211202855.3A CN115510163A (en) | 2022-09-29 | 2022-09-29 | Synchronization method, device, storage medium and electronic equipment for mirror image files |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211202855.3A CN115510163A (en) | 2022-09-29 | 2022-09-29 | Synchronization method, device, storage medium and electronic equipment for mirror image files |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115510163A true CN115510163A (en) | 2022-12-23 |
Family
ID=84508318
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211202855.3A Pending CN115510163A (en) | 2022-09-29 | 2022-09-29 | Synchronization method, device, storage medium and electronic equipment for mirror image files |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115510163A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116302210A (en) * | 2023-05-17 | 2023-06-23 | 阿里云计算有限公司 | Image file importing method and device, electronic equipment and storage medium |
CN117077218A (en) * | 2023-10-07 | 2023-11-17 | 之江实验室 | A multi-center medical institution mirror synchronization method, device, medium and equipment |
-
2022
- 2022-09-29 CN CN202211202855.3A patent/CN115510163A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116302210A (en) * | 2023-05-17 | 2023-06-23 | 阿里云计算有限公司 | Image file importing method and device, electronic equipment and storage medium |
CN116302210B (en) * | 2023-05-17 | 2023-08-04 | 阿里云计算有限公司 | Image file importing method and device, electronic equipment and storage medium |
CN117077218A (en) * | 2023-10-07 | 2023-11-17 | 之江实验室 | A multi-center medical institution mirror synchronization method, device, medium and equipment |
CN117077218B (en) * | 2023-10-07 | 2024-01-26 | 之江实验室 | Synchronization method, device, medium and equipment for mirror images of multi-center medical institution |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10769113B2 (en) | Attribute-based dependency identification for operation ordering | |
CN1988535B (en) | Synchronous method, system for file storage and customer terminal | |
CN107526626A (en) | A kind of Docker containers thermomigration process and system based on CRIU | |
US20150248466A1 (en) | Data transfer between storage systems using data fingerprints | |
CN107861686A (en) | File memory method, service end and computer-readable recording medium | |
CN110704296B (en) | Calling method and device | |
CN103902410B (en) | The data backup accelerated method of cloud storage system | |
CN115510163A (en) | Synchronization method, device, storage medium and electronic equipment for mirror image files | |
WO2017088705A1 (en) | Data processing method and device | |
CN108563440A (en) | The automatic adding method of List Controller code, device and readable storage medium storing program for executing | |
CN104935634A (en) | Data Sharing Method for Mobile Devices Based on Distributed Shared Storage | |
CN103457979A (en) | Distribution type file storage system and method | |
CN111182060A (en) | Message detection method and device | |
CN111176706A (en) | Terminal upgrading method and device, electronic equipment and storage medium | |
CN105827740A (en) | A contact information backup method, device and system | |
CN116974948A (en) | Service system testing method, system, equipment and medium | |
CN115357198A (en) | Storage volume mounting method and device, storage medium and electronic equipment | |
CN114546725A (en) | Cross-cluster backup method, system, medium and electronic device for stateful application | |
CN110018875B (en) | Desktop synchronization implementation method based on IDV | |
CN111522688B (en) | Data backup method and device for distributed system | |
CN103685497A (en) | On-line storing and sharing method and system | |
CN111596953A (en) | Version management system, development data transmission control method and related device | |
CN114422538B (en) | Multi-cloud storage system, multi-cloud data reading and writing method and electronic equipment | |
CN106407320B (en) | File processing method, device and system | |
CN113297158B (en) | Cloud security product management method, device, equipment and storage medium |
Legal Events
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 |