CN112486926B - Adapter, method, system and device suitable for multiple file storage systems - Google Patents
Adapter, method, system and device suitable for multiple file storage systems Download PDFInfo
- Publication number
- CN112486926B CN112486926B CN202011479845.5A CN202011479845A CN112486926B CN 112486926 B CN112486926 B CN 112486926B CN 202011479845 A CN202011479845 A CN 202011479845A CN 112486926 B CN112486926 B CN 112486926B
- Authority
- CN
- China
- Prior art keywords
- data
- file storage
- interface
- upload
- file
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 42
- 238000010276 construction Methods 0.000 claims abstract description 21
- 230000006978 adaptation Effects 0.000 claims description 23
- 238000004590 computer program Methods 0.000 claims description 12
- 238000011161 development Methods 0.000 abstract description 16
- 238000013473 artificial intelligence Methods 0.000 abstract description 4
- 238000005516 engineering process Methods 0.000 abstract description 3
- 238000012217 deletion Methods 0.000 description 17
- 230000037430 deletion Effects 0.000 description 17
- 230000005540 biological transmission Effects 0.000 description 4
- 238000012544 monitoring process Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 238000013459 approach Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 1
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 1
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 1
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
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/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/172—Caching, prefetching or hoarding of files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/16—File or folder operations, e.g. details of user interfaces specifically adapted to file systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/1734—Details of monitoring file system events, e.g. by the use of hooks, filter drivers, logs
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Stored Programmes (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本申请涉及人工智能技术领域,揭示了一种适用于多个文件存储系统的适配器、方法、系统及设备,适配器用于对多个文件存储系统进行数据操作,文件存储系统是采用JAVA SDK进行管理;对象构建模块用于基于工厂类创建对象,得到存储服务对象,存储服务对象用于与文件存储系统的对象适配;通用接口模块用于提供统一的服务接口,服务接口用于向目标应用提供文件服务;适配模块,用于根据存储服务对象,生成服务接口;配置模块用于获取配置数据,配置数据用于对象构建模块创建存储服务对象;控制模块用于控制配置模块、适配模块、对象构建模块响应目标应用通过服务接口发送的数据操作请求。从而节约了目标应用的开发成本,有利于新的文件存储系统的引入。
The present application relates to the field of artificial intelligence technology, and discloses an adapter, method, system and device applicable to multiple file storage systems, wherein the adapter is used to perform data operations on multiple file storage systems, and the file storage system is managed using JAVA SDK; the object construction module is used to create objects based on factory classes to obtain storage service objects, and the storage service objects are used to adapt to objects of the file storage system; the general interface module is used to provide a unified service interface, and the service interface is used to provide file services to target applications; the adapter module is used to generate a service interface based on the storage service object; the configuration module is used to obtain configuration data, and the configuration data is used for the object construction module to create a storage service object; the control module is used to control the configuration module, the adapter module, and the object construction module to respond to data operation requests sent by the target application through the service interface. This saves the development cost of the target application and is conducive to the introduction of new file storage systems.
Description
技术领域Technical Field
本申请涉及到人工智能技术领域,特别是涉及到一种适用于多个文件存储系统的适配器、方法、系统及设备。The present application relates to the field of artificial intelligence technology, and in particular to an adapter, method, system and device applicable to multiple file storage systems.
背景技术Background Art
为了满足不同使用习惯的用户的需求,文件存储系统的形式多种多样,对于采用JAVA SDK进行管理的文件存储系统,因为不同的文件存储系统的JAVA SDK不同,所以导致应用系统需要为每个文件存储系统做兼容定制,增加了开发成本;而且在增加新的文件存储系统时,需要所有应用系统都做兼容定制,不利于新的文件存储系统的引入。In order to meet the needs of users with different usage habits, file storage systems come in various forms. For file storage systems managed using JAVA SDK, because different file storage systems have different JAVA SDKs, the application system needs to be customized for compatibility with each file storage system, increasing development costs. Moreover, when adding a new file storage system, all application systems need to be customized for compatibility, which is not conducive to the introduction of the new file storage system.
发明内容Summary of the invention
本申请的主要目的为提供一种适用于多个文件存储系统的适配器、方法、系统及设备,旨在解决现有技术中不同的文件存储系统的JAVA SDK不同时需要为每个文件存储系统做兼容定制,不利于新的文件存储系统的引入的技术问题。The main purpose of this application is to provide an adapter, method, system and device suitable for multiple file storage systems, aiming to solve the technical problem in the prior art that the JAVA SDKs of different file storage systems need to be compatible and customized for each file storage system at the same time, which is not conducive to the introduction of new file storage systems.
为了实现上述发明目的,本申请提出一种适用于多个文件存储系统的适配器,所述适用于多个文件存储系统的适配器用于对多个文件存储系统进行数据操作,所述文件存储系统是采用JAVA SDK进行管理;In order to achieve the above-mentioned invention object, the present application proposes an adapter applicable to multiple file storage systems, wherein the adapter applicable to multiple file storage systems is used to perform data operations on multiple file storage systems, and the file storage systems are managed using JAVA SDK;
所述适用于多个文件存储系统的适配器包括:对象构建模块、通用接口模块、适配模块、配置模块、控制模块;The adapter applicable to multiple file storage systems includes: an object construction module, a general interface module, an adaptation module, a configuration module, and a control module;
所述对象构建模块,用于基于工厂类创建对象,得到存储服务对象,所述存储服务对象用于与所述文件存储系统的对象适配;The object construction module is used to create an object based on the factory class to obtain a storage service object, and the storage service object is used to adapt to the object of the file storage system;
所述通用接口模块,用于提供统一的服务接口,所述服务接口用于向目标应用提供文件服务;The universal interface module is used to provide a unified service interface, and the service interface is used to provide file services to the target application;
所述适配模块,用于根据所述存储服务对象,生成所述服务接口;The adaptation module is used to generate the service interface according to the storage service object;
所述配置模块,用于获取配置数据,所述配置数据用于所述对象构建模块创建所述存储服务对象;The configuration module is used to obtain configuration data, and the configuration data is used by the object construction module to create the storage service object;
所述控制模块,用于控制所述配置模块、所述适配模块、对象构建模块响应所述目标应用通过所述服务接口发送的数据操作请求。The control module is used to control the configuration module, the adaptation module, and the object construction module to respond to the data operation request sent by the target application through the service interface.
进一步的,所述多个文件存储系统包括:至少一个OBS文件存储系统、至少一个IOBS文件存储系统;Further, the multiple file storage systems include: at least one OBS file storage system and at least one IOBS file storage system;
所述存储服务对象用于与所述OBS文件存储系统的对象及所述IOBS文件存储系统的对象适配。The storage service object is used to adapt to the objects of the OBS file storage system and the objects of the IOBS file storage system.
进一步的,所述存储服务对象包括:文件上传服务对象;Further, the storage service object includes: a file upload service object;
所述文件上传服务对象,用于获取数据上传请求,当所述数据上传请求是向所述IOBS文件存储系统上传数据时,根据所述数据上传请求,获取目标文件名参数,根据所述数据上传请求、所述目标文件名参数,生成调用IOBS上传接口指令,所述调用IOBS上传接口指令用于调用所述IOBS文件存储系统的数据上传接口。The file upload service object is used to obtain a data upload request. When the data upload request is to upload data to the IOBS file storage system, a target file name parameter is obtained according to the data upload request. According to the data upload request and the target file name parameter, an instruction for calling an IOBS upload interface is generated. The instruction for calling an IOBS upload interface is used to call the data upload interface of the IOBS file storage system.
进一步的,所述存储服务对象还包括:文件下载服务对象;Furthermore, the storage service object also includes: a file download service object;
所述文件下载服务对象,用于获取数据下载请求,根据所述数据下载请求获取目标公私属性,根据所述数据下载请求、所述目标公私属性,生成调用下载接口指令,所述调用下载接口指令用于调用所述文件存储系统的数据下载接口。The file download service object is used to obtain a data download request, obtain the target public and private attributes according to the data download request, and generate a download interface call instruction according to the data download request and the target public and private attributes. The download interface call instruction is used to call the data download interface of the file storage system.
进一步的,所述文件下载服务对象,还用于根据所述数据下载请求,确定目标存储桶;Furthermore, the file download service object is also used to determine a target storage bucket according to the data download request;
所述配置模块,还用于根据所述目标存储桶,从存储桶公私对应数据获取所述目标公私属性。The configuration module is further configured to obtain the target public and private attributes from the public and private corresponding data of the storage bucket according to the target storage bucket.
进一步的,所述适配器启动时,通过所述配置模块获取租户标识及密匙,根据所述租户标识及所述密匙进行初始化;Furthermore, when the adapter is started, the tenant identifier and key are obtained through the configuration module, and initialization is performed according to the tenant identifier and the key;
所述租户标识及所述密匙用于适配器与目标文件存储系统进行鉴权,其中,所述目标文件存储系统为任意一个所述文件存储系统,所述租户标识及所述密匙是由所述目标文件存储系统发布的。The tenant identifier and the key are used for authentication between the adapter and the target file storage system, wherein the target file storage system is any one of the file storage systems, and the tenant identifier and the key are issued by the target file storage system.
进一步的,所述适配器还包括:日志模块;Furthermore, the adapter also includes: a log module;
所述对象构建模块基于工厂类创建对象时,在对象中进行数据埋点;When the object building module creates an object based on the factory class, data points are buried in the object;
所述日志模块根据所述数据埋点,生成日志数据。The log module generates log data according to the data embedding point.
本申请还提出了一种适用于多个文件存储系统的适配方法,所述方法应用于上述任一项所述的适用于多个文件存储系统的适配器;The present application also proposes an adaptation method applicable to multiple file storage systems, the method being applied to any of the above-mentioned adapters applicable to multiple file storage systems;
所述方法包括:The method comprises:
通过服务接口接收目标应用发送的数据操作请求;Receive a data operation request sent by a target application through a service interface;
当所述数据操作请求是数据上传请求时,通过存储服务对象根据所述传数据指令,生成调用上传接口指令,所述调用上传接口指令用于调用文件存储系统的数据上传接口;When the data operation request is a data upload request, a call upload interface instruction is generated according to the data transfer instruction by the storage service object, and the call upload interface instruction is used to call the data upload interface of the file storage system;
当所述数据操作请求是数据下载请求时,通过存储服务对象根据所述数据下载请求,获取目标公私属性,根据所述数据下载请求、所述目标公私属性,生成调用下载接口指令,所述调用下载接口指令用于调用所述文件存储系统的数据下载接口。When the data operation request is a data download request, the storage service object obtains the target public and private attributes according to the data download request, and generates a download interface call instruction according to the data download request and the target public and private attributes. The download interface call instruction is used to call the data download interface of the file storage system.
本申请还提出了一种文件存储服务系统,所述文件存储服务系统包括:多个文件存储系统、上述任一项所述的适用于多个文件存储系统的适配器;The present application also proposes a file storage service system, the file storage service system comprising: a plurality of file storage systems, and any of the above-mentioned adapters applicable to the plurality of file storage systems;
所述适用于多个文件存储系统的适配器,用于通过服务接口接收目标应用发送的数据操作请求,当所述数据操作请求是数据上传请求时,通过存储服务对象根据所述传数据指令,生成调用上传接口指令,所述调用上传接口指令用于调用文件存储系统的数据上传接口,当所述数据操作请求是数据下载请求时,通过存储服务对象根据所述数据下载请求,获取目标公私属性,根据所述数据下载请求、所述目标公私属性,生成调用下载接口指令,所述调用下载接口指令用于调用所述文件存储系统的数据下载接口。The adapter applicable to multiple file storage systems is used to receive a data operation request sent by a target application through a service interface. When the data operation request is a data upload request, the storage service object generates a call upload interface instruction according to the data transmission instruction, and the call upload interface instruction is used to call the data upload interface of the file storage system. When the data operation request is a data download request, the storage service object obtains the target public and private attributes according to the data download request, and generates a call download interface instruction according to the data download request and the target public and private attributes. The call download interface instruction is used to call the data download interface of the file storage system.
本申请还提出了一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现上述所述方法的步骤。The present application also proposes a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
本申请的适用于多个文件存储系统的适配器、方法、系统及设备,通过对象构建模块基于工厂类创建对象,得到存储服务对象,存储服务对象用于与文件存储系统的对象适配,通过通用接口模块提供统一的服务接口,服务接口用于向目标应用提供文件服务,通过适配模块根据存储服务对象,生成服务接口,通过配置模块获取配置数据,配置数据用于对象构建模块创建存储服务对象,通过控制模块控制配置模块、适配模块、对象构建模块响应目标应用通过服务接口发送的数据操作请求,从而使目标应用不需关注文件存储系统的JAVA SDK的细节,只需要跟适用于多个文件存储系统的适配器进行对接,从而节约了目标应用的开发成本;而且在增加新的文件存储系统时,只需要将适用于多个文件存储系统的适配器与新的文件存储系统进行对接实现兼容,从而减少了新的文件存储系统引入的开发工作量,有利于新的文件存储系统的引入。The adapter, method, system and device applicable to multiple file storage systems of the present application create objects based on factory classes through an object construction module to obtain storage service objects, the storage service objects are used to adapt to objects of the file storage system, a unified service interface is provided through a general interface module, the service interface is used to provide file services to a target application, a service interface is generated according to the storage service object through an adaptation module, configuration data is obtained through a configuration module, the configuration data is used to create the storage service object through an object construction module, and the configuration module, the adaptation module and the object construction module are controlled by a control module to respond to data operation requests sent by a target application through a service interface, so that the target application does not need to pay attention to the details of the JAVA SDK of the file storage system, but only needs to be connected with the adapter applicable to multiple file storage systems, thereby saving the development cost of the target application; and when adding a new file storage system, it is only necessary to connect the adapter applicable to multiple file storage systems with the new file storage system to achieve compatibility, thereby reducing the development workload of introducing a new file storage system, which is conducive to the introduction of a new file storage system.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本申请一实施例的适用于多个文件存储系统的适配器的流程示意图;FIG1 is a schematic diagram of a process flow of an adapter applicable to multiple file storage systems according to an embodiment of the present application;
图2为本申请一实施例的适用于多个文件存储系统的适配方法的结构示意框图;FIG2 is a schematic block diagram of a structure of an adaptation method applicable to multiple file storage systems according to an embodiment of the present application;
图3为本申请一实施例的计算机设备的结构示意框图。FIG3 is a schematic block diagram of the structure of a computer device according to an embodiment of the present application.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings.
具体实施方式DETAILED DESCRIPTION
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
为了解决现有技术中不同的文件存储系统的JAVA SDK不同时需要为每个文件存储系统做兼容定制,不利于新的文件存储系统的引入的技术问题。本申请提出了一种适用于多个文件存储系统的适配器,所述适用于多个文件存储系统的适配器适用于人工智能的分布式人工智能技术领域,本申请可用于众多通用或专用的计算机系统环境或配置中。例如:个人计算机、服务器计算机、手持设备或便携式设备、平板型设备、多处理器系统、基于微处理器的系统、置顶盒、可编程的消费电子设备、网络PC、小型计算机、大型计算机、包括以上任何系统或设备的分布式计算环境等等。本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。通过适用于多个文件存储系统的适配器,使目标应用不需关注文件存储系统的JAVASDK的细节,只需要跟适用于多个文件存储系统的适配器进行对接,从而节约了目标应用的开发成本。In order to solve the technical problem that the JAVA SDK of different file storage systems in the prior art does not need to be compatible and customized for each file storage system at the same time, which is not conducive to the introduction of new file storage systems. The present application proposes an adapter suitable for multiple file storage systems, and the adapter suitable for multiple file storage systems is suitable for the field of distributed artificial intelligence technology of artificial intelligence. The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices. By using adapters applicable to multiple file storage systems, the target application does not need to pay attention to the details of the JAVASDK of the file storage system, but only needs to connect with the adapters applicable to multiple file storage systems, thereby saving the development cost of the target application.
参照图1,本申请实施例中提供一种适用于多个文件存储系统的适配器,所述适用于多个文件存储系统的适配器用于对多个文件存储系统进行数据操作,所述文件存储系统是采用JAVA SDK进行管理;1 , an adapter applicable to multiple file storage systems is provided in an embodiment of the present application. The adapter applicable to multiple file storage systems is used to perform data operations on multiple file storage systems. The file storage systems are managed using JAVA SDK.
所述适用于多个文件存储系统的适配器包括:对象构建模块100、通用接口模块200、适配模块300、配置模块400、控制模块500;The adapter applicable to multiple file storage systems includes: an object construction module 100, a general interface module 200, an adaptation module 300, a configuration module 400, and a control module 500;
所述对象构建模块100,用于基于工厂类创建对象,得到存储服务对象,所述存储服务对象用于与所述文件存储系统的对象适配;The object construction module 100 is used to create an object based on the factory class to obtain a storage service object, and the storage service object is used to adapt to the object of the file storage system;
所述通用接口模块200,用于提供统一的服务接口,所述服务接口用于向目标应用600提供文件服务;The universal interface module 200 is used to provide a unified service interface, and the service interface is used to provide file services to the target application 600;
所述适配模块300,用于根据所述存储服务对象,生成所述服务接口;The adaptation module 300 is used to generate the service interface according to the storage service object;
所述配置模块400,用于获取配置数据,所述配置数据用于所述对象构建模块100创建所述存储服务对象;The configuration module 400 is used to obtain configuration data, and the configuration data is used by the object construction module 100 to create the storage service object;
所述控制模块500,用于控制所述配置模块400、所述适配模块300、对象构建模块100响应所述目标应用600通过所述服务接口发送的数据操作请求。The control module 500 is used to control the configuration module 400, the adaptation module 300, and the object construction module 100 to respond to the data operation request sent by the target application 600 through the service interface.
本实施例通过对象构建模块100基于工厂类创建对象,得到存储服务对象,存储服务对象用于与文件存储系统的对象适配,通过通用接口模块200提供统一的服务接口,服务接口用于向目标应用600提供文件服务,通过适配模块300根据存储服务对象,生成服务接口,通过配置模块400获取配置数据,配置数据用于对象构建模块100创建存储服务对象,通过控制模块500控制配置模块400、适配模块300、对象构建模块100响应目标应用600通过服务接口发送的数据操作请求,从而使目标应用600不需关注文件存储系统的JAVA SDK的细节,只需要跟适用于多个文件存储系统的适配器进行对接,从而节约了目标应用600的开发成本;而且在增加新的文件存储系统时,只需要将适用于多个文件存储系统的适配器与新的文件存储系统进行对接实现兼容,从而减少了新的文件存储系统引入的开发工作量,有利于新的文件存储系统的引入。In this embodiment, the object building module 100 creates an object based on the factory class to obtain a storage service object, which is used to adapt to the object of the file storage system. The universal interface module 200 provides a unified service interface, which is used to provide file services to the target application 600. The adapter module 300 generates a service interface according to the storage service object, obtains configuration data through the configuration module 400, and the configuration data is used by the object building module 100 to create the storage service object. The control module 500 controls the configuration module 400, the adapter module 300, and the object building module 100 to respond to the data operation request sent by the target application 600 through the service interface, so that the target application 600 does not need to pay attention to the details of the JAVA SDK of the file storage system, but only needs to connect with the adapter applicable to multiple file storage systems, thereby saving the development cost of the target application 600; and when adding a new file storage system, it is only necessary to connect the adapter applicable to multiple file storage systems with the new file storage system to achieve compatibility, thereby reducing the development workload of introducing the new file storage system, which is conducive to the introduction of the new file storage system.
JAVA SDK是JAVA的软件开发工具包。JAVA SDK is a software development kit for JAVA.
基于工厂类创建对象,得到存储服务对象,也就是说,存储服务对象是工厂类对象。所述存储服务对象用于与所述文件存储系统的对象适配,也就是说,存储服务对象与管理所述文件存储系统的JAVA SDK的对象适配。The storage service object is obtained by creating an object based on the factory class, that is, the storage service object is a factory class object. The storage service object is used to adapt to the object of the file storage system, that is, the storage service object is adapted to the object of the JAVA SDK that manages the file storage system.
JAVA中一般的类对象是通过new函数来创建的,但是有一部分类必须通过其getInstance方法来创建,这种类叫做工厂类。In JAVA, general class objects are created through the new function, but some classes must be created through their getInstance method. This type of class is called a factory class.
基于工厂类创建对象,也就是采用了工厂方法模式。工厂方法模式定义一个用于创建对象的接口,让子类决定实例化哪一个类,在工厂里面可以对对象的创建做严格的定义,客户端直接通过工厂创建出来就可以使用了。Creating objects based on factory classes is the factory method pattern. The factory method pattern defines an interface for creating objects, allowing subclasses to decide which class to instantiate. The factory can strictly define the creation of objects, and clients can use them directly after creating them through the factory.
所述服务接口是API,目标应用600根据API的调用要求调用API,从而对目标应用600屏蔽了管理文件存储系统的JAVA SDK的差异。The service interface is an API, and the target application 600 calls the API according to the API calling requirement, thereby shielding the target application 600 from the differences in the JAVA SDK for managing the file storage system.
优选的,所述服务接口包括数据上传服务接口、数据下载服务接口、数据删除服务接口。所述数据上传服务接口用于为目标应用600提供数据上传服务。所述数据下载服务接口用于为目标应用600提供数据下载服务。所述数据删除服务接口用于为目标应用600提供数据删除服务。Preferably, the service interface includes a data upload service interface, a data download service interface, and a data deletion service interface. The data upload service interface is used to provide data upload service for the target application 600. The data download service interface is used to provide data download service for the target application 600. The data deletion service interface is used to provide data deletion service for the target application 600.
目标应用600,是指需要从文件存储系统上传数据、下载数据的软件系统。The target application 600 refers to a software system that needs to upload and download data from a file storage system.
所述适配模块300,根据存储服务对象,生成所述服务接口,也就是将存储服务对象封装成服务接口。The adaptation module 300 generates the service interface according to the storage service object, that is, encapsulates the storage service object into the service interface.
所述配置模块400,从配置中心获取配置数据。The configuration module 400 obtains configuration data from a configuration center.
配置中心用于存放配置数据,可以理解的是,配置中心可以是所述适用于多个文件存储系统的适配器的功能模块,也可以不是所述适用于多个文件存储系统的适配器的功能模块。The configuration center is used to store configuration data. It is understandable that the configuration center may be a functional module of the adapter applicable to multiple file storage systems, or may not be a functional module of the adapter applicable to multiple file storage systems.
优选的,所述配置中心不是所述适用于多个文件存储系统的适配器的功能模块。从而使配置中心可以用于管理整个云平台的所有微服务组件的配置数据。Preferably, the configuration center is not a functional module of the adapter applicable to multiple file storage systems, so that the configuration center can be used to manage the configuration data of all microservice components of the entire cloud platform.
所述控制模块500控制所述配置模块400、所述适配模块300、对象构建模块100响应所述目标应用600通过所述服务接口发送的数据操作请求,也就是说,在响应数据操作请求和根据数据操作请求进行数据操作的过程中,所述控制模块500起到了路由的作用。The control module 500 controls the configuration module 400, the adaptation module 300, and the object construction module 100 to respond to the data operation request sent by the target application 600 through the service interface. That is to say, in the process of responding to the data operation request and performing data operation according to the data operation request, the control module 500 plays a routing role.
所述适用于多个文件存储系统的适配器通过所述服务接口接收所述目标应用600的发送的数据操作请求,所述数据操作请求包括:数据上传请求、数据下载请求、数据删除请求;通过所述控制模块500调用所述配置模块400、所述适配模块300、对象构建模块100响应所述数据操作请求,并且根据数据操作请求进行数据操作。The adapter suitable for multiple file storage systems receives data operation requests sent by the target application 600 through the service interface, and the data operation requests include: data upload request, data download request, and data deletion request; calls the configuration module 400, the adaptation module 300, and the object construction module 100 through the control module 500 to respond to the data operation request, and performs data operations according to the data operation request.
所述目标应用600通过所述数据上传服务接口向所述适配器发送数据上传请求,通过所述数据下载服务接口向所述适配器发送数据下载请求,通过所述数据删除服务接口向所述适配器发送数据删除请求。The target application 600 sends a data upload request to the adapter through the data upload service interface, sends a data download request to the adapter through the data download service interface, and sends a data deletion request to the adapter through the data deletion service interface.
在一个实施例中,上述多个文件存储系统包括:至少一个OBS文件存储系统、至少一个IOBS文件存储系统;In one embodiment, the plurality of file storage systems include: at least one OBS file storage system and at least one IOBS file storage system;
所述存储服务对象用于与所述OBS文件存储系统的对象及所述IOBS文件存储系统的对象适配。也就是说,所述存储服务对象与管理所述OBS文件存储系统的JAVA SDK的对象适配,以及与管理所述IOBS文件存储系统的JAVA SDK的对象适配。The storage service object is used to adapt to the objects of the OBS file storage system and the objects of the IOBS file storage system. In other words, the storage service object is adapted to the objects of the JAVA SDK that manages the OBS file storage system and the objects of the JAVA SDK that manages the IOBS file storage system.
管理OBS文件存储系统、IOBS文件存储系统的JAVA SDK不同。The Java SDKs for managing the OBS and IOBS file storage systems are different.
OBS文件存储系统是基于对象存储服务的文件存储系统。The OBS file storage system is a file storage system based on the object storage service.
所述对象存储,也叫做基于对象的存储,是用来描述解决和处理离散单元的方法的通用术语,这些离散单元被称作为对象。就像文件一样,对象包含数据,但是和文件不同的是,对象在一个层结构中不会再有层级结构。每个对象都在一个被称作存储池的扁平地址空间的同一级别里,一个对象不会属于另一个对象的下一级。文件和对象都有与它们所包含的数据相关的元数据,但是对象是以扩展元数据为特征的。每个对象都被分配一个唯一的标识符,允许一个服务器或者最终用户来检索对象,而不必知道数据的物理地址。这种方法对于在云计算环境中自动化和简化数据存储有帮助。Object storage, also called object-based storage, is a general term used to describe an approach to addressing and processing discrete units, which are called objects. Like files, objects contain data, but unlike files, objects are not hierarchical in a hierarchy. Each object is at the same level in a flat address space called a storage pool, and one object does not belong to another object at a lower level. Both files and objects have metadata related to the data they contain, but objects are characterized by extended metadata. Each object is assigned a unique identifier, allowing a server or end user to retrieve the object without having to know the physical address of the data. This approach helps to automate and simplify data storage in cloud computing environments.
IOBS就是Internet Object Based Storage,IOBS文件存储系统是面向互联网的云存储系统。IOBS stands for Internet Object Based Storage. The IOBS file storage system is an Internet-oriented cloud storage system.
可以理解的是,所述多个文件存储系统还包括其他采用JAVA SDK管理的文件存储系统,在此举例不做具体限定。It is understandable that the multiple file storage systems also include other file storage systems managed by JAVA SDK, which is not specifically limited in this example.
在一个实施例中,上述存储服务对象包括:文件上传服务对象;In one embodiment, the storage service object includes: a file upload service object;
所述文件上传服务对象,用于获取数据上传请求,当所述数据上传请求是向所述IOBS文件存储系统上传数据时,根据所述数据上传请求,获取目标文件名参数,根据所述数据上传请求、所述目标文件名参数,生成调用IOBS上传接口指令,所述调用IOBS上传接口指令用于调用所述IOBS文件存储系统的数据上传接口。The file upload service object is used to obtain a data upload request. When the data upload request is to upload data to the IOBS file storage system, a target file name parameter is obtained according to the data upload request. According to the data upload request and the target file name parameter, an instruction for calling an IOBS upload interface is generated. The instruction for calling an IOBS upload interface is used to call the data upload interface of the IOBS file storage system.
所述根据所述数据上传请求,获取目标文件名参数的步骤,包括:所述所述存储服务对象根据所述数据上传请求确定文件标识,根据所述文件标识从所述文件名对应数据中获取所述目标文件名参数。The step of obtaining target file name parameters according to the data upload request includes: the storage service object determines a file identifier according to the data upload request, and obtains the target file name parameters from data corresponding to the file name according to the file identifier.
所述文件名对应数据包括文件标识、文件名参数,所述文件名对应数据中的文件标识与文件名参数一一对应。The file name corresponding data includes a file identifier and a file name parameter, and the file identifier in the file name corresponding data corresponds to the file name parameter in a one-to-one manner.
优选的,所述文件名对应数据存储在配置中心。所述配置中心用于管理整个云平台的所有微服务组件的配置数据。可以理解的是,所述文件名对应数据也可以存储在所述适配器中。Preferably, the data corresponding to the file name is stored in a configuration center. The configuration center is used to manage the configuration data of all microservice components of the entire cloud platform. It is understandable that the data corresponding to the file name can also be stored in the adapter.
所述IOBS文件存储系统的数据上传接口是uploadEncrypt(),所述OBS文件存储系统的数据上传接口是putObject(),uploadEncrypt()相对putObject()多了一个fileName参数(也就是文件名参数)。因此在调用uploadEncrypt()向所述IOBS文件存储系统上传数据之前,根据所述数据上传请求、所述目标文件名参数生成所述调用IOBS上传接口指令,从而满足调用uploadEncrypt()接口的要求;而对适用于多个文件存储系统的适配器的外部来看,不需要提供fileName参数,只需要提供文件标识即可。The data upload interface of the IOBS file storage system is uploadEncrypt(), and the data upload interface of the OBS file storage system is putObject(). Compared with putObject(), uploadEncrypt() has an additional fileName parameter (i.e., file name parameter). Therefore, before calling uploadEncrypt() to upload data to the IOBS file storage system, the calling IOBS upload interface instruction is generated according to the data upload request and the target file name parameter, thereby satisfying the requirement of calling the uploadEncrypt() interface; and from the outside of the adapter applicable to multiple file storage systems, it is not necessary to provide the fileName parameter, only the file identifier is required.
所述数据上传请求包括文件标识、文件大小。可以理解的是,所述数据上传请求还可以包括用户标识。The data upload request includes a file identifier and a file size. It is understandable that the data upload request may also include a user identifier.
所述文件标识可以是文件名称、全局唯一标识、统一资源定位符(URL)等唯一标识一个文件的标识。The file identifier may be a file name, a globally unique identifier, a uniform resource locator (URL), or other identifier that uniquely identifies a file.
所述用户标识可以是用户名称、用户ID、用户账号等唯一标识一个用户的标识。The user identifier may be an identifier that uniquely identifies a user, such as a user name, a user ID, or a user account.
在一个实施例中,上述存储服务对象还包括:文件下载服务对象;In one embodiment, the storage service object further includes: a file download service object;
所述文件下载服务对象,用于获取数据下载请求,根据所述数据下载请求获取目标公私属性,根据所述数据下载请求、所述目标公私属性,生成调用下载接口指令,所述调用下载接口指令用于调用所述文件存储系统的数据下载接口。The file download service object is used to obtain a data download request, obtain the target public and private attributes according to the data download request, and generate a download interface call instruction according to the data download request and the target public and private attributes. The download interface call instruction is used to call the data download interface of the file storage system.
本实施例实现了对数据下载的公有桶属性和私有桶属性的屏蔽,从而使目标应用600不用关心公有桶和私有桶属性,进一步节约了目标应用600的开发成本。This embodiment implements shielding of the public bucket attributes and private bucket attributes of data download, so that the target application 600 does not need to care about the public bucket and private bucket attributes, further saving the development cost of the target application 600.
所述数据下载请求包括:文件标识。The data download request includes: a file identifier.
其中,数据下载要分为从公有桶下载和私有桶下载,在调用所述OBS文件存储系统或所述IOBS文件存储系统的数据下载接口之前,通过根据所述数据下载请求、所述目标公私属性,生成调用下载接口指令,从而满足文件存储系统的数据下载接口的调用要求;而对所述适用于多个文件存储系统的适配器的外部来看,不需了解数据下载是从公有桶下载还是从私有桶下载。Among them, data downloading is divided into downloading from a public bucket and downloading from a private bucket. Before calling the data download interface of the OBS file storage system or the IOBS file storage system, a download interface calling instruction is generated according to the data download request and the public and private attributes of the target, thereby satisfying the calling requirements of the data download interface of the file storage system; and from the outside of the adapter applicable to multiple file storage systems, there is no need to understand whether the data download is downloaded from a public bucket or a private bucket.
在一个实施例中,上述文件下载服务对象,还用于根据所述数据下载请求,确定目标存储桶;In one embodiment, the file download service object is further used to determine a target storage bucket according to the data download request;
所述配置模块400,还用于根据所述目标存储桶,从存储桶公私对应数据获取所述目标公私属性。The configuration module 400 is further configured to obtain the target public and private attributes from the public and private corresponding data of the bucket according to the target bucket.
所述存储桶公私对应数据存储在配置中心,比如,配置中心的config-service组件记录所述存储桶公私对应数据。可以理解的是,所述存储桶公私对应数据也可以存储在所述适用于多个文件存储系统的适配器中。The public and private corresponding data of the storage bucket is stored in the configuration center, for example, the config-service component of the configuration center records the public and private corresponding data of the storage bucket. It is understandable that the public and private corresponding data of the storage bucket can also be stored in the adapter applicable to multiple file storage systems.
在一个实施例中,上述存储服务对象还包括:文件删除服务对象;In one embodiment, the storage service object further includes: a file deletion service object;
所述文件下载服务对象,用于获取数据删除请求,根据所述数据删除请求,生成调用删除接口指令,所述调用删除接口指令用于调用所述文件存储系统的数据删除接口。The file download service object is used to obtain a data deletion request, and generate a call deletion interface instruction according to the data deletion request, wherein the call deletion interface instruction is used to call the data deletion interface of the file storage system.
在一个实施例中,上述适配器启动时,通过所述配置模块400获取租户标识及密匙,根据所述租户标识及所述密匙进行初始化;In one embodiment, when the adapter is started, the configuration module 400 obtains the tenant identifier and the key, and initializes the adapter according to the tenant identifier and the key;
所述租户标识及所述密匙用于适配器与目标文件存储系统进行鉴权,其中,所述目标文件存储系统为任意一个所述文件存储系统,所述租户标识及所述密匙是由所述目标文件存储系统发布的。The tenant identifier and the key are used for authentication between the adapter and the target file storage system, wherein the target file storage system is any one of the file storage systems, and the tenant identifier and the key are issued by the target file storage system.
优选的,所述租户标识及所述密匙存储在配置中心。可以理解的是,所述租户标识及所述密匙也可以存储在所述适用于多个文件存储系统的适配器中。Preferably, the tenant identifier and the key are stored in a configuration center. It is understandable that the tenant identifier and the key may also be stored in the adapter applicable to multiple file storage systems.
所述租户标识及所述密匙是文件存储系统(比如,所述OBS文件存储系统、所述IOBS文件存储系统)提供的。The tenant identifier and the key are provided by a file storage system (eg, the OBS file storage system, the IOBS file storage system).
在一个实施例中,上述适配器还包括:日志模块;In one embodiment, the adapter further comprises: a log module;
所述对象构建模块100基于工厂类创建对象时,在对象中进行数据埋点;When the object construction module 100 creates an object based on the factory class, data points are buried in the object;
所述日志模块根据所述数据埋点,生成日志数据。The log module generates log data according to the data embedding point.
优选的,所述服务接口还包括监控服务接口;所述日志模块根据所述数据埋点发送异步事件给所述监控服务接口。Preferably, the service interface also includes a monitoring service interface; the log module sends asynchronous events to the monitoring service interface according to the data embedding point.
所述监控服务接口监控的内容包括但不限于:上传频率、上传文件大小监控。The monitoring service interface monitors the following contents, including but not limited to: upload frequency and upload file size monitoring.
本申请还提出了一种适用于多个文件存储系统的适配方法,所述方法应用于上述任一项所述的适用于多个文件存储系统的适配器;The present application also proposes an adaptation method applicable to multiple file storage systems, the method being applied to any of the above-mentioned adapters applicable to multiple file storage systems;
所述方法包括:The method comprises:
S1:通过服务接口接收目标应用发送的数据操作请求;S1: Receive a data operation request sent by the target application through a service interface;
S2:当所述数据操作请求是数据上传请求时,通过存储服务对象根据所述传数据指令,生成调用上传接口指令,所述调用上传接口指令用于调用文件存储系统的数据上传接口;S2: when the data operation request is a data upload request, generating a call upload interface instruction according to the data transfer instruction through the storage service object, wherein the call upload interface instruction is used to call the data upload interface of the file storage system;
S3:当所述数据操作请求是数据下载请求时,通过存储服务对象根据所述数据下载请求,获取目标公私属性,根据所述数据下载请求、所述目标公私属性,生成调用下载接口指令,所述调用下载接口指令用于调用所述文件存储系统的数据下载接口。S3: When the data operation request is a data download request, the target public and private attributes are obtained according to the data download request through the storage service object, and a download interface calling instruction is generated according to the data download request and the target public and private attributes. The download interface calling instruction is used to call the data download interface of the file storage system.
本实施例适用于多个文件存储系统的适配器使目标应用不需关注文件存储系统的JAVA SDK的细节,只需要跟适用于多个文件存储系统的适配器进行对接,从而节约了目标应用的开发成本;而且在增加新的文件存储系统时,只需要将适用于多个文件存储系统的适配器与新的文件存储系统进行对接实现兼容,从而减少了新的文件存储系统引入的开发工作量,有利于新的文件存储系统的引入。The adapters applicable to multiple file storage systems in this embodiment enable the target application to not pay attention to the details of the JAVA SDK of the file storage system, but only need to connect with the adapters applicable to multiple file storage systems, thereby saving the development cost of the target application; and when adding a new file storage system, it is only necessary to connect the adapters applicable to multiple file storage systems with the new file storage system to achieve compatibility, thereby reducing the development workload of introducing the new file storage system and facilitating the introduction of the new file storage system.
在一个实施例中,所述通过服务接口接收目标应用发送的数据操作请求的步骤之后,还包括:In one embodiment, after the step of receiving the data operation request sent by the target application through the service interface, the method further includes:
当所述数据操作请求是数据删除请求时,根据所述数据删除请求,生成调用删除接口指令,所述调用删除接口指令用于调用所述文件存储系统的数据删除接口。When the data operation request is a data deletion request, a call deletion interface instruction is generated according to the data deletion request, and the call deletion interface instruction is used to call the data deletion interface of the file storage system.
本申请还提出了一种文件存储服务系统,所述文件存储服务系统包括:多个文件存储系统、上述任一项所述的适用于多个文件存储系统的适配器;The present application also proposes a file storage service system, the file storage service system comprising: a plurality of file storage systems, and any of the above-mentioned adapters applicable to the plurality of file storage systems;
所述适用于多个文件存储系统的适配器,用于通过服务接口接收目标应用发送的数据操作请求,当所述数据操作请求是数据上传请求时,通过存储服务对象根据所述传数据指令,生成调用上传接口指令,所述调用上传接口指令用于调用文件存储系统的数据上传接口,当所述数据操作请求是数据下载请求时,通过存储服务对象根据所述数据下载请求,获取目标公私属性,根据所述数据下载请求、所述目标公私属性,生成调用下载接口指令,所述调用下载接口指令用于调用所述文件存储系统的数据下载接口。The adapter applicable to multiple file storage systems is used to receive a data operation request sent by a target application through a service interface. When the data operation request is a data upload request, the storage service object generates a call upload interface instruction according to the data transmission instruction, and the call upload interface instruction is used to call the data upload interface of the file storage system. When the data operation request is a data download request, the storage service object obtains the target public and private attributes according to the data download request, and generates a call download interface instruction according to the data download request and the target public and private attributes. The call download interface instruction is used to call the data download interface of the file storage system.
本实施例通过适用于多个文件存储系统的适配器使目标应用不需关注文件存储系统的JAVA SDK的细节,只需要跟适用于多个文件存储系统的适配器进行对接,从而节约了目标应用的开发成本;而且在增加新的文件存储系统时,只需要将适用于多个文件存储系统的适配器与新的文件存储系统进行对接实现兼容,从而减少了新的文件存储系统引入的开发工作量,有利于新的文件存储系统的引入。This embodiment uses adapters applicable to multiple file storage systems so that the target application does not need to pay attention to the details of the JAVA SDK of the file storage system, and only needs to connect with the adapters applicable to multiple file storage systems, thereby saving the development cost of the target application; and when adding a new file storage system, it is only necessary to connect the adapters applicable to multiple file storage systems with the new file storage system to achieve compatibility, thereby reducing the development workload of introducing the new file storage system, which is conducive to the introduction of the new file storage system.
参照图3,本申请实施例中还提供一种计算机设备,该计算机设备可以是服务器,其内部结构可以如图3所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设计的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于储存适用于多个文件存储系统的适配方法等数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种适用于多个文件存储系统的适配方法。所述适用于多个文件存储系统的适配方法,所述方法应用于上述任一项所述的适用于多个文件存储系统的适配器;所述方法包括:通过服务接口接收目标应用发送的数据操作请求;当所述数据操作请求是数据上传请求时,通过存储服务对象根据所述传数据指令,生成调用上传接口指令,所述调用上传接口指令用于调用文件存储系统的数据上传接口;当所述数据操作请求是数据下载请求时,通过存储服务对象根据所述数据下载请求,获取目标公私属性,根据所述数据下载请求、所述目标公私属性,生成调用下载接口指令,所述调用下载接口指令用于调用所述文件存储系统的数据下载接口。Referring to Figure 3, a computer device is also provided in an embodiment of the present application. The computer device can be a server, and its internal structure can be as shown in Figure 3. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. Among them, the processor designed by the computer is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as adaptation methods applicable to multiple file storage systems. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an adaptation method applicable to multiple file storage systems is implemented. The adaptation method applicable to multiple file storage systems is applied to the adapter applicable to multiple file storage systems described in any one of the above items; the method includes: receiving a data operation request sent by a target application through a service interface; when the data operation request is a data upload request, generating a call upload interface instruction according to the data transmission instruction through the storage service object, and the call upload interface instruction is used to call the data upload interface of the file storage system; when the data operation request is a data download request, obtaining the target public and private attributes according to the data download request through the storage service object, and generating a call download interface instruction according to the data download request and the target public and private attributes, and the call download interface instruction is used to call the data download interface of the file storage system.
本实施例通过适用于多个文件存储系统的适配器使目标应用不需关注文件存储系统的JAVA SDK的细节,只需要跟适用于多个文件存储系统的适配器进行对接,从而节约了目标应用的开发成本;而且在增加新的文件存储系统时,只需要将适用于多个文件存储系统的适配器与新的文件存储系统进行对接实现兼容,从而减少了新的文件存储系统引入的开发工作量,有利于新的文件存储系统的引入。This embodiment uses adapters applicable to multiple file storage systems so that the target application does not need to pay attention to the details of the JAVA SDK of the file storage system, and only needs to connect with the adapters applicable to multiple file storage systems, thereby saving the development cost of the target application; and when adding a new file storage system, it is only necessary to connect the adapters applicable to multiple file storage systems with the new file storage system to achieve compatibility, thereby reducing the development workload of introducing the new file storage system, which is conducive to the introduction of the new file storage system.
本申请一实施例还提供一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现一种适用于多个文件存储系统的适配方法,所述方法应用于上述任一项所述的适用于多个文件存储系统的适配器;所述方法包括:通过服务接口接收目标应用发送的数据操作请求;当所述数据操作请求是数据上传请求时,通过存储服务对象根据所述传数据指令,生成调用上传接口指令,所述调用上传接口指令用于调用文件存储系统的数据上传接口;当所述数据操作请求是数据下载请求时,通过存储服务对象根据所述数据下载请求,获取目标公私属性,根据所述数据下载请求、所述目标公私属性,生成调用下载接口指令,所述调用下载接口指令用于调用所述文件存储系统的数据下载接口。An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, an adaptation method applicable to multiple file storage systems is implemented, and the method is applied to the adapter applicable to multiple file storage systems described in any of the above items; the method includes: receiving a data operation request sent by a target application through a service interface; when the data operation request is a data upload request, generating a call upload interface instruction according to the data transmission instruction through the storage service object, and the call upload interface instruction is used to call the data upload interface of the file storage system; when the data operation request is a data download request, obtaining the target public and private attributes according to the data download request through the storage service object, and generating a call download interface instruction according to the data download request and the target public and private attributes, and the call download interface instruction is used to call the data download interface of the file storage system.
上述执行的适用于多个文件存储系统的适配方法,通过适用于多个文件存储系统的适配器使目标应用不需关注文件存储系统的JAVA SDK的细节,只需要跟适用于多个文件存储系统的适配器进行对接,从而节约了目标应用的开发成本;而且在增加新的文件存储系统时,只需要将适用于多个文件存储系统的适配器与新的文件存储系统进行对接实现兼容,从而减少了新的文件存储系统引入的开发工作量,有利于新的文件存储系统的引入。The above-mentioned adaptation method applicable to multiple file storage systems, through the adapter applicable to multiple file storage systems, makes the target application not need to pay attention to the details of the JAVA SDK of the file storage system, but only needs to connect with the adapter applicable to multiple file storage systems, thereby saving the development cost of the target application; and when adding a new file storage system, it is only necessary to connect the adapter applicable to multiple file storage systems with the new file storage system to achieve compatibility, thereby reducing the development workload of introducing the new file storage system, which is conducive to the introduction of the new file storage system.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的和实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可以包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双速据率SDRAM(SSRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments may include non-volatile and/or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、装置、物品或者方法不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、装置、物品或者方法所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、装置、物品或者方法中还存在另外的相同要素。It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, device, article or method including the element.
以上所述仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above description is only a preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011479845.5A CN112486926B (en) | 2020-12-15 | 2020-12-15 | Adapter, method, system and device suitable for multiple file storage systems |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011479845.5A CN112486926B (en) | 2020-12-15 | 2020-12-15 | Adapter, method, system and device suitable for multiple file storage systems |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112486926A CN112486926A (en) | 2021-03-12 |
CN112486926B true CN112486926B (en) | 2024-10-29 |
Family
ID=74917072
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011479845.5A Active CN112486926B (en) | 2020-12-15 | 2020-12-15 | Adapter, method, system and device suitable for multiple file storage systems |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112486926B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104156216A (en) * | 2014-08-14 | 2014-11-19 | 浪潮(北京)电子信息产业有限公司 | Heterogeneous storage management system and method oriented to cloud computing |
CN106970854A (en) * | 2017-03-30 | 2017-07-21 | 无锡华云数据技术服务有限公司 | A kind of logical process server in object storage system |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102750324A (en) * | 2012-05-28 | 2012-10-24 | 华为技术有限公司 | File storage system, device and file access method |
US20170249331A1 (en) * | 2016-02-25 | 2017-08-31 | Netapp, Inc. | Adapting to heterogeneous backend targets in a storage system |
-
2020
- 2020-12-15 CN CN202011479845.5A patent/CN112486926B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104156216A (en) * | 2014-08-14 | 2014-11-19 | 浪潮(北京)电子信息产业有限公司 | Heterogeneous storage management system and method oriented to cloud computing |
CN106970854A (en) * | 2017-03-30 | 2017-07-21 | 无锡华云数据技术服务有限公司 | A kind of logical process server in object storage system |
Also Published As
Publication number | Publication date |
---|---|
CN112486926A (en) | 2021-03-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110287709B (en) | User operation authority control method, device, equipment and medium | |
CN102413022B (en) | Application debugging method and system | |
CN108170740B (en) | Data migration method, system and computer readable storage medium | |
US8631424B2 (en) | Method and system of mapping at least one web service to at least one OSGi service and exposing at least one local service as at least one web service | |
CN102427480B (en) | Application access method in a plurality of application service platform systems | |
US10866841B2 (en) | Communication system and method for accessing and deploying temporary microservices on a heterogeneous platform | |
CN112632566B (en) | Vulnerability scanning method and device, storage medium and electronic equipment | |
CN101924798B (en) | Transparent Android component loading method and system based on file types | |
CN108510389A (en) | Intelligent contract call method, equipment and readable storage medium storing program for executing based on block chain | |
CN1620653A (en) | Dynamic arrangement of service in computing network | |
CN111045833A (en) | Interface calling method and device | |
CN110222500A (en) | Method for edition management, device, equipment and computer readable storage medium | |
JP2003288280A (en) | System and method for providing context information | |
CN102209111A (en) | Open cross-platform system for cloud computing mobile network terminal equipment | |
US10581993B2 (en) | Method for forwarding traffic in application on mobile intelligent terminal | |
CN102523308B (en) | Application development method and development and application platform system for operating method | |
CN112068818A (en) | Service interaction method and device, computer equipment and storage medium | |
CN114168179A (en) | Micro-service management method, device, computer equipment and storage medium | |
CN112486926B (en) | Adapter, method, system and device suitable for multiple file storage systems | |
CN113469735A (en) | Resource processing method and device, electronic equipment and storage medium | |
CN108804711A (en) | A kind of method, apparatus and computer readable storage medium of data processing | |
CN100407145C (en) | Accessing Characteristic Objects Based on Uniform Resource Locators | |
CN112769975A (en) | Data integration method and device, server and storage medium | |
US20040015540A1 (en) | Modular, extendible application server that is distributed across an electronic data network and method of making same | |
CN100372299C (en) | A Network Management Method Supporting Distributed Management Information Tree |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |