CN111371891B - Service processing method, device, equipment and storage medium - Google Patents

Service processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN111371891B
CN111371891B CN202010140564.0A CN202010140564A CN111371891B CN 111371891 B CN111371891 B CN 111371891B CN 202010140564 A CN202010140564 A CN 202010140564A CN 111371891 B CN111371891 B CN 111371891B
Authority
CN
China
Prior art keywords
cloud
terminal
processing instruction
storage
cloud storage
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
Application number
CN202010140564.0A
Other languages
Chinese (zh)
Other versions
CN111371891A (en
Inventor
熊建刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Cloud Computing Beijing Co Ltd
Original Assignee
Tencent Cloud Computing Beijing Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Tencent Cloud Computing Beijing Co Ltd filed Critical Tencent Cloud Computing Beijing Co Ltd
Priority to CN202010140564.0A priority Critical patent/CN111371891B/en
Publication of CN111371891A publication Critical patent/CN111371891A/en
Application granted granted Critical
Publication of CN111371891B publication Critical patent/CN111371891B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a service processing method, a service processing device, service processing equipment and a storage medium, and belongs to the technical field of cloud storage. The method comprises the following steps: a cloud storage gateway deployed in a first terminal acquires a first processing instruction for a target directory, the target directory is obtained by mapping according to a storage bucket corresponding to the first terminal in cloud object storage, and the target directory is mounted in the first terminal; performing protocol conversion on the first processing instruction to obtain a second processing instruction, wherein a transmission protocol of the second processing instruction is a transmission protocol supported by cloud object storage; sending the second processing instruction to the cloud object storage; the cloud object storage receives a second processing instruction sent by the cloud storage gateway; and executing the processing operation corresponding to the second processing instruction in the bucket corresponding to the first terminal. The service processing process only relates to terminal and cloud object storage, the logic of service processing is simple, redundant fault points are not introduced, the stability of the service processing process is high, and the service processing effect is good.

Description

Service processing method, device, equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of cloud storage, in particular to a service processing method, a service processing device, service processing equipment and a storage medium.
Background
The cloud storage technology is an emerging network storage technology which emerges under the background of continuous increase of data in the information age. Cloud storage is a technology expanded on the basis of cloud computing, and is a system which centralizes different storage devices through technologies such as machine clusters, networks and distributed file systems to cooperatively work and provides data storage and service access for the outside. The cloud storage technology is in a period of high-speed development, and is one of the main technologies for solving the problem of data growth in the future.
The cloud storage gateway is proposed for solving the problem of interface mismatch between cloud storage and traditional storage. Most cloud storage services use an interface formulated based on a REST (representational state transfer) protocol or a SOAP (simple object access protocol) protocol, instead of providing a conventional transport protocol interface. For a large number of mature and stable traditional applications, the cloud storage interface cannot be directly used. The cloud storage gateway can translate the REST or SOAP form cloud storage interface into a traditional transport protocol. The cloud storage gateway completes a function of protocol conversion between a cloud storage interface and traditional storage, and seamlessly integrates cloud storage service into the existing software and hardware system to meet the capacity expansion requirement of traditional application.
At present, a cloud storage gateway is deployed in a single virtual machine, and a terminal interacts with cloud object storage through the cloud storage gateway in the virtual machine to complete a processing process of cloud storage related services. The service processing process relates to storage of a terminal, a virtual machine and a cloud object, the service processing process is complicated, the service processing efficiency is low, the phenomenon of service processing failure caused by virtual machine failure is easy to occur, and the service processing effect is poor.
Disclosure of Invention
The embodiment of the application provides a service processing method, a service processing device, service processing equipment and a storage medium, which can be used for improving the service processing effect. The technical scheme is as follows:
in one aspect, an embodiment of the present application provides a service processing method, where the method is applied to a first terminal, and the first terminal is deployed with a cloud storage gateway, and the method includes:
the cloud storage gateway acquires a first processing instruction for a target directory, the target directory is obtained according to mapping of a storage bucket corresponding to the first terminal in cloud object storage, and the target directory is mounted in the first terminal;
the cloud storage gateway performs protocol conversion on the first processing instruction to obtain a second processing instruction, wherein a transmission protocol of the second processing instruction is a transmission protocol supported by the cloud object storage;
and the cloud storage gateway sends the second processing instruction to the cloud object storage, and the cloud object storage is used for executing the processing operation corresponding to the second processing instruction in the storage bucket.
The business processing method is applied to cloud object storage and comprises the following steps:
receiving a target processing instruction sent by a cloud storage gateway deployed in a target terminal, wherein a transmission protocol of the target processing instruction is a transmission protocol supported by the cloud object storage;
and executing the processing operation corresponding to the target processing instruction in the bucket corresponding to the target terminal.
In another aspect, a service processing apparatus is provided, where the apparatus is applied to a first terminal, and the first terminal is deployed with a cloud storage gateway, and the apparatus includes:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a first processing instruction for a target directory, the target directory is obtained according to mapping of a storage bucket corresponding to a first terminal in cloud object storage, and the target directory is mounted in the first terminal;
the conversion unit is used for performing protocol conversion on the first processing instruction to obtain a second processing instruction, and a transmission protocol of the second processing instruction is a transmission protocol supported by the cloud object storage;
a sending unit, configured to send the second processing instruction to the cloud object storage, where the cloud object storage is configured to execute a processing operation corresponding to the second processing instruction in the bucket.
In a possible implementation manner, the obtaining unit is further configured to obtain a mount instruction, where the mount instruction carries an identifier of a bucket corresponding to the first terminal in the cloud object storage and an identifier of a mount position used for mounting a target directory in the first terminal; obtaining an identification of an object in the bucket based on the identification of the bucket;
the device further comprises:
the mapping unit is used for mapping to obtain a target directory based on the identification of the object in the storage bucket and the identification of the mounting position;
and the mounting unit is used for mounting the target directory to the mounting position.
In one possible implementation, the apparatus further includes:
the receiving unit is used for receiving a first execution result fed back by the cloud object storage;
the conversion unit is further configured to perform protocol conversion on the first execution result to obtain a second execution result, where a transmission protocol of the second execution result is a transmission protocol supported by the first terminal;
and the feedback unit is used for feeding back the second execution result to the first terminal.
In a possible implementation manner, the target directory is mapped according to at least two buckets corresponding to the first terminal in the cloud object storage.
In a possible implementation manner, the cloud storage gateway includes a first interface module, a conversion module, and a second interface module, and the obtaining unit is configured to obtain, by using the first interface module, a first processing instruction for a target directory;
the conversion unit is used for performing protocol conversion on the first processing instruction by using the conversion module to obtain a second processing instruction;
the sending unit is configured to send the second processing instruction to the cloud object storage by using the second interface module.
In one possible implementation manner, the cloud storage gateway further includes a server function module; the obtaining unit is further configured to obtain, by using the first interface module, a first processing instruction of a second terminal for a target directory, where the second terminal is connected to the cloud storage gateway through the server function module based on a sharing protocol.
In one possible implementation manner, the cloud storage gateway stores metadata of the target directory; the device further comprises:
an updating unit, configured to update the metadata of the target directory based on the first processing instruction.
In a possible implementation manner, the first processing instruction is a file writing instruction, and the file writing instruction carries data of a file to be written; the second processing instruction is an instruction for writing an object converted according to the instruction for writing the file, and the instruction for writing the object carries data of the object to be written; the device further comprises:
the recording unit is used for recording the data of the file to be written;
the receiving unit is further configured to receive a writing result, fed back by the cloud object storage, of writing the data of the object to be written into the bucket;
and the deleting unit is used for responding to the writing result to indicate that the data of the object to be written has been written into the storage bucket and deleting the data of the file to be written from the record.
The business processing device is applied to cloud object storage and comprises:
the cloud storage gateway is used for storing a cloud object, and comprises a receiving unit and a processing unit, wherein the receiving unit is used for receiving a target processing instruction sent by a cloud storage gateway deployed in a target terminal, and the transmission protocol of the target processing instruction is a transmission protocol supported by the cloud object storage;
and the execution unit is used for executing the processing operation corresponding to the target processing instruction in the bucket corresponding to the target terminal.
In one possible implementation, the apparatus further includes:
an acquisition unit configured to acquire a target execution result of executing a processing operation corresponding to the target processing instruction;
and the feedback unit is used for feeding back the target execution result to the cloud storage gateway.
In a possible implementation manner, the number of the buckets corresponding to the target terminal is at least two, and the execution unit is configured to execute the processing operation corresponding to the target processing data in at least one bucket corresponding to the target terminal.
In another aspect, a computer device is provided, which includes a processor and a memory, where at least one program code is stored in the memory, and the at least one program code is loaded and executed by the processor to implement any of the above-mentioned service processing methods.
In another aspect, a computer-readable storage medium is provided, where at least one program code is stored, and the at least one program code is loaded and executed by a processor to implement any of the above-mentioned service processing methods.
The technical scheme provided by the embodiment of the application at least has the following beneficial effects:
the cloud storage gateway is deployed in the terminal, and the target directory obtained by mapping the storage bucket corresponding to the terminal in the cloud object storage is mounted in the terminal, so that the terminal can directly interact with the cloud object storage through the cloud storage gateway to complete the processing process of related services of the cloud storage. The service processing process only relates to terminal and cloud object storage, the logic of service processing is simple, redundant fault points are not introduced, the stability of the service processing process is high, and the service processing effect is good.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram of an implementation environment of a service processing method provided in an embodiment of the present application;
fig. 2 is a flowchart of a service processing method according to an embodiment of the present application;
fig. 3 is a schematic diagram of a relationship between a cloud storage gateway, a console of the cloud storage gateway, and a cloud object storage in a first terminal according to an embodiment of the present application;
fig. 4 is a schematic diagram of a logical structure of a cloud storage gateway according to an embodiment of the present application;
fig. 5 is a schematic diagram of a logical structure of a cloud storage gateway according to an embodiment of the present application;
fig. 6 is a schematic diagram of a relationship between a cloud storage gateway in a first terminal and a bucket in a cloud object storage according to an embodiment of the present application;
fig. 7 is a schematic diagram of a logical structure of a cloud storage gateway according to an embodiment of the present application;
fig. 8 is a schematic diagram of a logical structure of a cloud storage gateway according to an embodiment of the present application;
fig. 9 is a schematic diagram of a service processing apparatus according to an embodiment of the present application;
fig. 10 is a schematic diagram of a service processing apparatus according to an embodiment of the present application;
fig. 11 is a schematic diagram of a service processing apparatus according to an embodiment of the present application;
fig. 12 is a schematic diagram of a service processing apparatus according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
First, several terms referred to in the present application will be explained.
Cloud storage: the distributed cloud storage system (hereinafter referred to as a cloud storage system) refers to a storage system which integrates a large number of storage devices (storage devices are also referred to as storage nodes) of different types in a network through application software or application interfaces to cooperatively work through functions of cluster application, grid technology, distributed storage file systems and the like, and provides data storage and service access functions to the outside.
At present, a storage method of a cloud storage system is as follows: logical volumes are created, and when created, each logical volume is allocated physical storage space, which may be the disk composition of a certain storage device or of several storage devices. The client stores data on a certain logical volume, namely, the data is stored on a file system, the file system divides the data into a plurality of parts, each part is an object, the object not only contains the data but also contains additional information such as data identification, the file system writes each object into a physical storage space of the logical volume respectively, and the file system records storage location information of each object, so that when the client requests to access the data, the file system can enable the client to access the data according to the storage location information of each object.
The process of allocating the physical storage space for the logical volume by the cloud storage system specifically includes: physical storage space is divided into stripes in advance according to a group of capacity measures of objects stored in a logical volume (the measures often have a large margin with respect to the capacity of the actual objects to be stored) and RAID (Redundant Array of Independent disks), and one logical volume can be understood as one stripe, thereby allocating physical storage space to the logical volume.
Thermal data: data that is frequently accessed by the terminal is required.
POSIX (Portable Operating System Interface) Standard: is a generic name of a series of interrelated standards that define an API (Application Programming Interface) for the IEEE (Institute of Electrical and Electronics Engineers) to run software on various UNIX operating systems.
NAS (Network Attached Storage): a device having a data storage function connected to a network is also referred to as a "network storage". NAS is a dedicated data storage server. The NAS takes data as a center, completely separates the storage device from the server, and centrally manages the data, thereby releasing bandwidth, improving performance, and reducing cost. NAS is far less costly than using server storage, but far more efficient than server storage.
Referring to fig. 1, a schematic diagram of an implementation environment of a service processing method provided in an embodiment of the present application is shown. The implementation environment may include: a terminal 11 and a cloud object store 12.
The terminal 11 is deployed with a cloud storage gateway, and the cloud storage gateway is used for supporting cloud storage related services of the terminal 11. The cloud storage gateway may map the buckets corresponding to the terminals 11 in the cloud object storage 12 into the target directory, and mount the target directory in the terminals 11. The terminal 11 may interact with the cloud object storage 12 through the cloud storage gateway to complete a processing process of a cloud storage related service. The cloud object storage 12 may manage data uploaded to the cloud, and a bucket corresponding to the terminal 11 is stored in the cloud object storage 12, and a plurality of objects are stored in the bucket.
In one possible implementation, the terminal 11 may refer to a virtual machine or a physical machine, but is not limited thereto. It should be noted that the terminal 11 in the embodiment of the present application refers to a Client terminal in a Client/Server (Client/service) structure. The cloud object storage 12 is a distributed storage service that has no directory hierarchy, no data format restrictions, can accommodate mass data, and supports internet protocol access. The storage space of the cloud object storage 12 has no capacity upper limit and does not need partition management.
It should be understood by those skilled in the art that the terminal 11 and the cloud object storage 12 are only examples, and other existing or future terminal or cloud object storage may be suitable for the present application, and are included within the scope of the present application and are herein incorporated by reference.
Based on the implementation environment shown in fig. 1, an embodiment of the present application provides a service processing method, taking an example that the method is applied to an interaction process between a first terminal and cloud object storage, where the first terminal is deployed with a cloud storage gateway, and the first terminal performs interaction with the cloud object storage through the cloud storage gateway. As shown in fig. 2, the method provided by the embodiment of the present application may include the following steps:
in step 201, a cloud storage gateway deployed in a first terminal obtains a first processing instruction for a target directory, where the target directory is obtained by mapping a storage bucket corresponding to the first terminal in cloud object storage, and the target directory is mounted in the first terminal.
The first terminal is deployed with a cloud storage gateway, and the cloud storage gateway is used for supporting cloud storage related services in the first terminal, wherein the cloud storage related services include but are not limited to storing data in a cloud object storage, reading data from the cloud object storage, and the like. The target directory is obtained by mapping a bucket corresponding to the first terminal in the cloud object storage, wherein the bucket corresponding to the first terminal is a bucket used for managing data uploaded by the first terminal in the cloud object storage, and the bucket comprises a plurality of objects stored in a cloud object storage mode.
Since the target directory is obtained according to the bucket mapping, and the buckets are stored in the cloud object storage, the target directory is displayed in the first terminal in a mounted manner. After the target directory is mounted on the first terminal, the target directory is displayed in the first terminal under the condition that the cloud object storage is normally connected; and if the cloud object storage is disconnected, the target directory is not displayed in the first terminal any more.
The first processing instruction aiming at the target directory is generated according to the operation of the user in the target directory. The operation in the target directory may refer to selecting a certain file in the target directory, adding a certain file in the target directory, deleting a certain file in the target directory, and the like. When it is detected that the user performs any one of the above operations in the target directory in the first terminal, the first terminal may obtain the first processing instruction for the target directory, and then send the first processing instruction for the target directory to the cloud storage gateway. Thus, the cloud storage gateway obtains a first processing instruction for the target directory.
It should be noted that the first processing instruction is different according to the operation of the user in the target directory detected by the first terminal. Illustratively, when the first terminal detects that the operation of the user in the target directory is to select the first file, the first processing instruction may be an instruction to read the file, where the instruction to read the file is used to read an object corresponding to the first file in the bucket; when the first terminal detects that the operation of the user in the target directory is to add a second file, the first processing instruction may refer to a file writing instruction, where the file writing instruction is used to write the second file into the bucket in the form of an object; when the first terminal detects that the operation of the user in the target directory is to delete the third file, the first processing instruction may be an instruction to delete the file, where the instruction to delete the file is used to delete an object corresponding to the third file in the bucket.
In a possible implementation manner, the first terminal may store a corresponding relationship between the processing instruction and the user operation, and the processing instruction corresponding to the user operation may be determined according to the corresponding relationship. For example, the correspondence between the processing instruction and the user operation may include a double-click operation corresponding to an instruction to read a file, a right-key addition operation and a drag operation corresponding to an instruction to write a file, a right-key deletion operation corresponding to an instruction to delete a file, and the like.
In one possible implementation, the first processing instruction carries processing data. It should be noted that, depending on the first processing instruction, the processing data carried by the first processing instruction is also different. Exemplarily, when the first processing instruction is an instruction for reading a file, the first processing instruction may carry an identifier of the file to be read, where the identifier of the file to be read may be a corresponding complete path of the file to be read in the target directory; when the first processing instruction is an instruction for writing a file, the first processing instruction can carry data of the file to be written; when the first processing instruction is an instruction to delete a file, the first processing instruction may carry an identifier of the file to be deleted, and the identifier of the file to be deleted may be a corresponding complete path of the file to be deleted in the target directory.
It should be noted that, since the target directory is obtained according to the bucket mapping, each directory in the target directory corresponds to one object in the bucket. A directory herein refers to a directory that includes a complete path.
Before step 201 is executed, the cloud storage gateway needs to be deployed in the first terminal and the target directory needs to be mounted in the first terminal. Next, procedures of deploying the cloud storage gateway in the first terminal and mounting the target directory in the first terminal are respectively described.
1. And deploying the cloud storage gateway in the first terminal.
The cloud storage gateway is used for supporting cloud storage related services in the first terminal. In one possible implementation manner, the process of deploying the cloud storage gateway in the first terminal includes the following steps 1 and 2.
Step 1: and the third terminal displays the control page of the cloud storage gateway based on the login instruction of the control page of the cloud storage gateway.
The third terminal may refer to any terminal having a page display function. The third terminal may refer to the first terminal, or may refer to another terminal other than the first terminal, which is not limited in this embodiment of the application.
The control page of the cloud storage gateway refers to a page for managing and controlling the cloud storage gateway. The control page of the cloud storage gateway is controlled by a console of the cloud storage gateway. When a login account and a login password in a login page of a control page of the cloud storage gateway are detected, the third terminal can send the login account and the login password to a console of the cloud storage gateway for verification; and when the verification result fed back by the console of the cloud storage gateway indicates that the login account number is matched with the login password, the third terminal acquires a login instruction of the control page of the cloud storage gateway. At this time, the third terminal may display a control page of the cloud storage gateway, so that the user may input relevant parameters for managing and controlling the cloud storage gateway on the control page of the cloud storage gateway.
Step 2: the third terminal acquires a deployment instruction in a control page of the cloud storage gateway; the third terminal sends the deployment instruction to a console of the cloud storage gateway; and the console of the cloud storage gateway installs the deployment file of the cloud storage gateway into the first terminal based on the deployment instruction.
The user can input deployment parameters for controlling the deployment process of the cloud storage gateway on a control page of the cloud storage gateway. The deployment parameters include, but are not limited to, an identifier of the first terminal, an identifier of a deployment location of a deployment file in the first terminal for installing the cloud storage gateway, and the like. The identifier of the first terminal is used to uniquely identify the first terminal, and may refer to an IP (Internet Protocol) address of the first terminal, an account password of the first terminal, and the like. The identifier of the deployment location is used to identify the deployment location of the deployment file for installing the cloud storage gateway in the first terminal, and may refer to a path of the deployment location in the first terminal, a name of the deployment location, and the like.
When the confirmation instruction of the deployment parameters is detected on the control page of the cloud storage gateway, the third terminal obtains the deployment instruction in the control page of the cloud storage gateway. The deployment instruction carries deployment parameters (an identifier of the first terminal, an identifier of a deployment position of a deployment file for installing the cloud storage gateway in the first terminal, and the like).
After the third terminal obtains the deployment instruction, the deployment instruction is sent to the console of the cloud storage gateway, and the console of the cloud storage gateway installs the deployment file of the cloud storage gateway to the first terminal based on the deployment instruction. In one possible implementation manner, the process of installing, by the console of the cloud storage gateway, the deployment file of the cloud storage gateway to the first terminal based on the deployment instruction is as follows: the control console of the cloud storage gateway determines a cloud storage gateway corresponding to the identifier of the first terminal carried by the deployment instruction; and installing the deployment file of the cloud storage gateway at a deployment position carried by the deployment instruction. It should be noted that, because the cloud storage gateway in the embodiment of the present application is in a terminal form, different terminals may correspond to different cloud storage gateways, and a console of the cloud storage gateway may determine, according to an identifier of the first terminal carried by the deployment instruction, the cloud storage gateway corresponding to the first terminal, and then install the cloud storage gateway in the first terminal.
After the deployment file of the cloud storage gateway is installed in the first terminal, the cloud storage gateway is successfully deployed in the first terminal in response to the completion of installation of the deployment file. After being deployed in the first terminal, the cloud storage gateway can be regarded as pure software deployed on an operating system where the first terminal application system is located. Compared with the cloud storage gateway which needs to be deployed in the virtual machine in the related technology, the cloud storage gateway in the embodiment of the application has the advantages that the deployment file is relatively simple, one-click deployment is realized, the deployment process is extremely simple, the cloud storage gateway can be used after being installed, the installation and use are realized, the deployment can be completed in a minute level, the use is simple and easy, the learning time is not needed, and the deployment efficiency and the success rate are relatively high.
The cloud storage gateway is a cloud object storage product, the cloud storage gateway is controlled by a console of the cloud storage gateway, and a user can call the console of the cloud storage gateway to manage and control the cloud storage gateway by inputting parameters on a control page of the cloud storage gateway. That is to say, a control flow connection is established between the console of the cloud storage gateway and the cloud storage gateway, so as to control and manage the cloud storage gateway. In a possible implementation manner, the console of the cloud storage gateway can also establish control flow connection with the cloud object storage, so that one console can control both the cloud storage gateway and the cloud object storage.
It should be noted that, besides the deployment parameters, configuration parameters may also be input in the control page of the cloud storage gateway, so that the console of the cloud storage gateway controls and manages the cloud storage gateway according to the configuration parameters. The embodiment of the present application does not limit the type of the configuration parameter, and the configuration parameter may include, for example, a flow monitoring parameter, a cost monitoring parameter, a transmission speed limiting parameter, an authority parameter (read only, read/write, etc.), a charging parameter, a control parameter (a pause parameter, a continuation parameter, a deletion parameter), and the like.
It should be noted that step 1 and step 2 above are only an exemplary description of deploying the cloud storage gateway in the first terminal. In a possible implementation manner, the cloud storage gateway may also be deployed in the first terminal directly based on an interface or a command line, which is not limited in this embodiment of the application.
2. And mounting the target directory in the first terminal.
The process may be performed by a cloud storage gateway in the first terminal, and in one possible implementation, the process of mounting the target directory in the first terminal may include the following steps a to c:
step a: the cloud storage gateway obtains a mounting instruction, and the mounting instruction carries an identifier of a storage bucket corresponding to the first terminal in the cloud object storage and an identifier of a mounting position used for mounting the target directory in the first terminal.
After the first terminal deploys the cloud storage gateway, the user may input the mount parameters in a control page of the cloud storage gateway in the third terminal. The mounting parameters include, but are not limited to, an identifier of a bucket corresponding to the first terminal in the cloud object storage, authority information of a bucket corresponding to the first terminal in the cloud object storage, an identifier of a mounting position for mounting the target directory in the first terminal, and the like. The identification of the bucket is used for uniquely identifying the bucket corresponding to the first terminal in the cloud object storage, and may refer to the name of the bucket, the storage address of the bucket, the authority of the bucket, and the like; the authority information of the bucket is used for indicating the operation authority of the bucket; the identifier of the mount location is used to identify a mount location in the first terminal for mounting the target directory, and may refer to a path of the mount location in the first terminal, a mount location name, and the like. The mount location may refer to any storage location where there is no existing data in the first terminal.
When the confirmation instruction of the mounting parameters is detected on the control page of the cloud storage gateway, the third terminal obtains the mounting instruction in the control page of the cloud storage gateway. The mounting instruction carries an identifier of a bucket corresponding to the first terminal in the cloud object storage and an identifier of a mounting position for mounting the target directory in the first terminal.
For the case that the third terminal is the first terminal, the third terminal may directly send a mount instruction to the cloud storage gateway; for the case that the third terminal is other than the first terminal, the third terminal may send the mount instruction to the first terminal, and then the first terminal sends the mount instruction to the cloud storage gateway. Whether the third terminal is the first terminal or not, the cloud storage gateway can obtain the mounting instruction.
Step b: and the cloud storage gateway acquires the identification of the object in the storage bucket based on the identification of the storage bucket.
The identification of the bucket is used for uniquely identifying the bucket corresponding to the first terminal, and the cloud storage gateway can send the identification of the bucket to the cloud object storage and then acquire the identification of the object in the bucket fed back by the cloud object storage. In one possible implementation manner, the identification of the object in the bucket may be stored in the cloud storage gateway in advance, and in this case, the cloud storage gateway may directly extract the identification of the object in the bucket based on the identification of the bucket.
Step c: and the cloud storage gateway maps the target directory to obtain the target directory based on the identifier of the object in the storage bucket and the identifier of the mounting position, and mounts the target directory to the mounting position.
The cloud storage gateway has a function of mapping the identification of the object to a directory. In the mapping process, the cloud storage gateway may map the identifier of each object to a directory related to the mount location according to the identifier of the mount location. And mapping all the identifiers of the objects needing mapping in the storage bucket into the directory to obtain the target directory. The root directory in the target directory is used to represent the mount location. It should be noted that, in the embodiment of the present application, an object that needs to be mapped may refer to all objects in a bucket, or may refer to a part of objects in the bucket. After the target directory is obtained, each directory in the target directory uniquely corresponds to one object in the bucket. In one possible implementation, the name of the target directory may default to the name of the bucket or the name of the bucket sharing path, and the user may modify the name of the bucket sharing path in a control page of the cloud storage gateway.
In obtaining the target directory, the target directory is mounted at a mounting position in the first terminal. Thus, the process of mounting the target directory in the first terminal is completed.
It should be noted that the number of the buckets corresponding to the first terminal may be at least two, and the objects stored in the at least two buckets are the same and are all the objects corresponding to the data uploaded by the first terminal. In this case, the target directory may be obtained according to the mapping of the at least two buckets. That is, the target directory is mapped according to at least two buckets corresponding to the first terminal in the cloud object storage. In this case, each directory in the target directory corresponds to an object in each bucket.
After the cloud storage gateway is deployed in the first terminal and the target directory is mounted in the first terminal, the first terminal may interact with the cloud object storage by using the cloud storage gateway based on the target directory. The application system of the first terminal may read and write the target directory, and a process of reading and writing the target directory may be regarded as a process of reading and writing an object in a bucket in the cloud object storage. In a possible implementation manner, the application System of the first terminal may read and write the target directory based on a POSIX (Portable Operating System Interface) standard, and completely comply with the usage habit of the application program in the first terminal, just like reading and writing a general directory in the first terminal.
The relationship between the cloud storage gateway in the first terminal, the console of the cloud storage gateway, and the cloud object storage may be as shown in fig. 3. Establishing a data stream between a cloud storage gateway 31 and a cloud object storage 32 in a first terminal 30 for transmitting data; a control flow is established between the console 33 of the cloud storage gateway and the cloud storage gateway 31 in the first terminal 30, and between the console 33 of the cloud storage gateway and the cloud object storage 32, so that the console 33 of the cloud storage gateway controls the cloud storage gateway 31 and the cloud object storage 32 according to the control flow.
In one possible implementation manner, the cloud storage gateway includes a first interface module, and the manner of the cloud storage gateway acquiring the first processing instruction for the target directory is as follows: the cloud storage gateway acquires a first processing instruction aiming at the target directory by utilizing the first interface module. The first interface module is used for interfacing an operating system of the first terminal. The operating system of the first terminal can call the first interface module and send the first processing instruction to the cloud storage gateway. In one possible implementation, the operating system of the first terminal calls the first interface module based on the POSIX standard.
The first interface module is used for providing file access semantics for the outside and supporting main file semantics, such as deletion of files, reading and writing of files and the like. Because the main purpose of the cloud storage gateway is protocol conversion, and data is stored in buckets in the cloud object storage, the first interface module does not support complex file semantics. The operating system of the first terminal may send a processing instruction corresponding to the file semantics supported by the first interface module to the first interface module.
In a possible implementation manner, metadata of the target directory is stored in the cloud storage gateway, and after the cloud storage gateway acquires the first processing instruction, the metadata of the target directory may be updated based on the first processing instruction. The metadata of the target directory refers to data for describing the target directory, and when the target directory is changed, the metadata of the target directory should naturally be changed accordingly. Exemplarily, when the first processing instruction is a file writing instruction, the cloud storage gateway may obtain metadata of a new directory according to data of a file to be written carried by the file writing instruction, and then add the metadata of the new directory to the metadata of the target directory; assuming that the first processing instruction is an instruction for deleting a file, the cloud storage gateway may obtain metadata of a directory to be deleted according to an identifier of the file to be deleted carried by the instruction for deleting the file, and then delete the metadata of the directory to be deleted in the metadata of the target directory, where the identifier of the file to be deleted may refer to a corresponding complete path of the file to be deleted in the target directory.
In one possible implementation, the cloud storage gateway may further include a directory metadata management module. The cloud storage gateway updates the metadata of the target directory based on the first processing instruction by using the directory metadata management module. The directory metadata management module is used for managing metadata of the target directory, supporting the first interface module to access the metadata of the target directory, and updating the metadata of the target directory according to the operations of adding, deleting, modifying and checking the target directory. The metadata of the target directory is generally managed by a large table, and is locally stored in the cloud storage gateway and is not uploaded to a bucket in the cloud object storage.
In one possible implementation, the cloud storage gateway may further include a directory metadata storage module for storing metadata of the target directory. And after the directory metadata management directory updates the metadata of the target directory, the directory metadata storage module stores the updated metadata of the target directory. The directory metadata storage module is responsible for elastically storing metadata of the target directory locally in the cloud storage gateway, and can expand the storage space of a local hard disk of the cloud storage gateway as required; if the maximum value of the storage space set by the user is reached, the directory metadata storage module can feed back reminding information that the metadata storage of the target directory is about to be full, and creation of a new directory in the target directory is limited. When the first terminal deploys the cloud storage gateway, the cloud storage gateway generates metadata of the target directory in the process of mapping the objects in the storage bucket into the target directory, and stores the metadata of the target directory. In a possible implementation manner, the target directory may be represented in a directory tree form, and the cloud storage gateway may construct the target tree of the target directory as needed in the process of constructing the directory tree of the target directory, which is not limited in this embodiment of the present application.
In a possible implementation manner, when the first processing instruction is a file writing instruction, and the file writing instruction carries data of a file to be written, the cloud storage gateway may record the data of the file to be written. This process may be accomplished by a data black box module included by the cloud storage gateway. The data black box module is used for temporarily recording data needing cloud storage, and deleting the recorded data when certain data is uploaded to a cloud object for storage; and when determining that certain data is not uploaded to the cloud object storage, timely reminding a user that the data needs to be uploaded again. That is, the data black box module may record which data are dirty data that are not synchronized to the cloud in time under an abnormal condition; when the fault is recovered, the cloud storage gateway can feed back the dirty data to the first terminal, and informs a user of the first terminal that the data needs to be uploaded again.
In one possible implementation manner, the cloud storage gateway may further include a data cache management module, where the data cache management module is configured to cache the hot data to speed up access to the hot data and smooth network jitter. For the condition that the data of the file to be written is hot data, the data of the file to be written needs to be frequently accessed, and the data cache management module caches the data of the file to be written so as to directly read the data from the cache when the data of the file to be written needs to be read, and the data does not need to be remotely read from the cloud object storage, so that the reading process of the hot data is accelerated, and smooth network jitter is facilitated.
In summary, the logical structure of the cloud storage gateway can be as shown in fig. 4. In fig. 4, the cloud storage gateway includes a first interface module 41, a catalog metadata management module 42, a catalog metadata storage module 43, a data cache management module 44, a data black box module 45, a monitoring module 46, a billing module 47, a conversion module 48, and a second interface module 49. The first interface module 41, the catalog metadata management module 42, the catalog metadata storage module 43, the data cache management module 44, and the data black box module 45 are already described in the above description, and are not described herein again. The monitoring module 46 is configured to monitor a usage process of the cloud storage gateway, and the monitoring module 46 may generate a log of the usage process of the cloud storage gateway, and may also monitor various usage parameters (transmission speed, flow rate, and the like) of the cloud storage gateway, and then send out warning information in time when the usage parameters exceed a standard. The charging module 47 is configured to count usage charges of the cloud storage gateway, and charge the usage amount according to a mode of the cloud service, the charging according to needs, and the charging module 47 may generate a charge bill and feed the charge bill back to the first terminal. The conversion module 48 and the second interface module 49 will be described in the following steps, which are not described herein again.
In a possible implementation manner, the obtaining, by the cloud storage gateway, the first processing instruction for the target directory in step 201 may be that the cloud storage gateway obtains the first processing instruction for the target directory by the first terminal. Under the condition, the cloud storage gateway only has the function of terminal shape and is used for supporting cloud storage related services of the terminal.
In a possible implementation manner, the cloud storage gateway may further include a server-side function module, and a second terminal except the first terminal may be connected to the cloud storage gateway in the first terminal through the server-side function module based on a sharing protocol. In one possible implementation, the server function module may be a NAS (Network Attached Storage) module. At this time, the cloud storage gateway in step 201 acquires the first processing instruction for the target directory, which may be that the cloud storage gateway acquires the first processing instruction for the target directory by the second terminal. In this case, the cloud storage gateway has a function of a server-side form, and is not only used for supporting cloud storage related services of the terminal, but also used for supporting the second terminal to share the target directory in the first terminal and the data in the bucket corresponding to the first terminal. It should be noted that the number of the second terminals may be one or more, and this is not limited in the embodiment of the present application.
When the cloud storage gateway has a function of a server-side modality, a logical structure of the cloud storage gateway may be as shown in fig. 5. The cloud storage gateway in fig. 5 includes a server function module 50. The second terminal may be connected to the cloud storage gateway in the first terminal through the Server function module 50 based on a sharing protocol such as NFS (Network File System) and SMB (Server Message Block), and may then call the first interface module 41 in the cloud storage gateway. The first terminal may directly call the first interface module 41 based on the POSIX standard. In this case, the cloud storage gateway functions in a server-side form, and can be used by both the local terminal (first terminal) and the shared terminal (second terminal).
In step 202, the cloud storage gateway deployed in the first terminal performs protocol conversion on the first processing instruction to obtain a second processing instruction, where a transmission protocol of the second processing instruction is a transmission protocol supported by the cloud object storage.
The cloud storage gateway has the main function of protocol conversion, and the transmission protocol of the first processing instruction is a transmission protocol supported by the first terminal; the transport protocol of the second processing instruction is a transport protocol supported by the cloud object storage. The process of converting the first processing instruction into the second processing instruction by the cloud storage gateway is a process of converting a transmission protocol supported by the first terminal into a transmission protocol supported by the cloud object storage. After the first processing instruction is converted into the second processing instruction, the types of data carried by the first processing instruction and the second processing instruction may be different. Illustratively, the type of the data carried by the first processing instruction is a directory, and the type of the data carried by the second processing instruction is an identifier of an object corresponding to the directory. The identification of an object is used to uniquely identify an object in the bucket, and may refer to the name of the object, etc.
The cloud storage gateway may include a conversion module that may convert a transport protocol supported by the first terminal into a transport protocol supported by the cloud object storage. That is to say, the cloud storage gateway performs protocol conversion on the first processing instruction by using the conversion module to obtain a second processing instruction. For example, the logical structure of the cloud storage gateway including the conversion module may be as shown in fig. 4 or fig. 5, and the conversion module 48 is included in each of the cloud storage gateways shown in fig. 4 and fig. 5. The conversion module 48 may convert the first processing instruction acquired from the first interface module 41 into a second processing instruction, and then transmit the second processing instruction to the cloud object storage through the second interface module 49.
It should be noted that the second processing instruction differs according to the first processing instruction. Illustratively, when the first processing instruction is an instruction to read a file, the second processing instruction is an instruction to read an object; when the first processing instruction is an instruction for writing a file, the second processing instruction is an instruction for writing an object; and when the first processing instruction is an instruction for deleting the file, the second processing instruction is an instruction for deleting the object.
In step 203, the cloud storage gateway deployed in the first terminal sends the second processing instruction to the cloud object storage.
And the cloud storage gateway sends the second processing instruction to the cloud object storage so that the cloud object storage can execute corresponding processing operation.
In one possible implementation manner, the cloud storage gateway includes a second interface module, and the process of sending the second processing instruction to the cloud object storage by the cloud storage gateway is: and the cloud storage gateway sends the second processing instruction to the cloud object storage by using the second interface module. The second interface module is used for interfacing the cloud object storage, and the cloud storage gateway is deployed in the first terminal, so that the second interface module is used for interfacing a bucket corresponding to the first terminal in the cloud object storage.
Illustratively, the logical structure of the cloud storage gateway including the second interface module may be as shown in fig. 4 or fig. 5, and the second interface module 49 is included in each of the cloud storage gateways shown in fig. 4 and fig. 5. The second interface module 49 is configured to send the second processing instruction obtained by the conversion module 48 to the cloud object storage.
In step 204, the cloud object storage receives a second processing instruction sent by a cloud storage gateway deployed in the first terminal.
After the cloud storage gateway sends the second processing instruction to the cloud object storage, the cloud object storage may receive the second processing instruction. In one possible implementation manner, the cloud object storage receives a second processing instruction sent by a second interface module of the cloud storage gateway.
In step 205, the cloud object is stored in a bucket corresponding to the first terminal to perform a processing operation corresponding to the second processing instruction.
Since the cloud storage gateway is deployed in the first terminal, after receiving the second processing instruction sent by the cloud storage gateway, the cloud object storage executes the processing operation corresponding to the second processing instruction in the bucket corresponding to the first terminal.
According to the difference of the second processing instruction, the processing operation corresponding to the second processing instruction executed by the cloud object stored in the bucket corresponding to the first terminal is also different. Illustratively, when the second processing instruction is an instruction to read an object, the processing operation performed corresponding to the second processing instruction refers to reading the object in the bucket; when the second processing instruction is an instruction for writing an object, the executed processing operation corresponding to the second processing instruction refers to writing the object in the bucket; when the second processing instruction is an instruction to delete a file, the processing operation performed corresponding to the second processing instruction refers to deleting an object in the bucket.
In one possible implementation manner, after the cloud object stores the processing operation corresponding to the second processing instruction executed in the bucket corresponding to the first terminal, the first execution result of executing the processing operation corresponding to the second processing instruction may be obtained. The first execution result is used for indicating the result of the processing operation execution, and may include specific execution information in addition to the conclusion of whether the execution is successful. Illustratively, when the processing operation refers to reading an object in the bucket, the conclusion that the reading is successful and the data of the read object may be included in the first execution result; when the processing operation refers to writing an object in the bucket, the first execution result may include a conclusion that the writing is successful and an identification of the newly written object; when the processing operation refers to deleting an object in the bucket, the first execution result may include a conclusion that the deletion is successful and an identification of the deleted object.
The cloud object storage sends the first execution result to a cloud storage gateway; the cloud storage gateway receives a first execution result fed back by cloud object storage; the cloud storage gateway performs protocol conversion on the first execution result to obtain a second execution result, wherein a transmission protocol of the second execution result is a transmission protocol supported by the first terminal; and the cloud storage gateway feeds the second execution result back to the first terminal.
The second execution result is a result for the first terminal to view. According to the difference of the data included in the first execution result, the data included in the second execution result is also different. Exemplarily, when the first execution result includes a conclusion that the reading is successful and the data of the read object, the cloud storage gateway converts the data of the read object into the data of the read file, and at this time, the second execution result includes a conclusion that the reading is successful and the data of the read file; when the first execution result comprises a conclusion that the writing is successful and an identifier of a newly written object, the cloud storage gateway converts the identifier of the newly written object into a newly written directory, and at the moment, the second execution result comprises a conclusion that the writing is successful and the newly written directory; when the first execution result comprises a conclusion that the deletion is successful and the identification of the deleted object, the cloud storage gateway converts the identification of the deleted object into a deleted directory, and the second execution result comprises a conclusion that the deletion is successful and the deleted directory.
After receiving the second execution result, the first terminal may execute a corresponding operation according to the second execution result. Exemplarily, when the second execution result includes a conclusion that reading is successful and data of the read file, the first terminal displays the file; when the second execution result comprises a conclusion that the writing is successful and a newly written directory, the first terminal adds the newly written directory in the target directory; and when the second execution result comprises a conclusion that the deletion is successful and the deleted directory, the first terminal deletes the corresponding directory in the target directory.
In a possible implementation manner, for a case that the first processing instruction is a file writing instruction, the file writing instruction includes data of a file to be written, the cloud storage gateway records the data of the file to be written, the second processing instruction is a target writing instruction converted according to the file writing instruction, and the target writing instruction carries the data of the target to be written. At this time, the storing of the cloud object in the bucket corresponding to the first terminal to execute the processing operation corresponding to the second processing instruction means: and the cloud object storage writes the data of the object to be written into a storage bucket corresponding to the first terminal. After the data of the object to be written is written into the bucket corresponding to the first terminal, the cloud object storage may feed back a writing result of writing the data of the object to be written into the bucket to the cloud storage gateway.
The cloud storage gateway receives a writing result of writing data of an object to be written into a storage bucket, wherein the writing result is fed back by cloud object storage; the written results can then be analyzed. In response to the writing result indicating that the data of the object to be written has been written into the bucket, the cloud storage gateway may delete the data of the file to be written from the record; in response to the fact that the writing result indicates that the data of the object to be written is not written into the bucket, the cloud storage gateway can send prompt information to the first terminal to prompt a user of the first terminal to upload the data of the file to be written again in time. The above process may be performed by a data black box module in the cloud storage gateway.
In one possible implementation, the number of buckets corresponding to the target terminal is at least two. At this time, the process of storing the cloud object in the bucket corresponding to the first terminal and executing the processing operation corresponding to the second processing instruction is as follows: the cloud object is stored in at least one bucket corresponding to the first terminal to execute processing operation corresponding to the second processing instruction. Under the condition, the cloud storage gateway can have a high availability function, at least two storage buckets are mapped to one target directory, and therefore when any one storage bucket fails, the service processing process is uninterrupted, and data uploaded to the cloud object by the first terminal is not lost.
For example, when the cloud storage gateway has a high availability function, the relationship between the cloud storage gateway in the first terminal and the bucket in the cloud object storage may be as shown in fig. 6. In fig. 6, a cloud storage gateway 61 in a first terminal 60 establishes a data stream with a first bucket 62 in a cloud object storage for transmitting data with the first bucket 62; the cloud storage gateway 61 in the first terminal 60 simultaneously establishes a data stream with the second bucket 63 in the cloud object storage for data transmission with the second bucket 63.
When the number of the buckets corresponding to the target terminal is at least two, replacing a second interface module in the cloud storage gateway with a high-availability interface module, wherein the high-availability interface module can be used for connecting at least two buckets in the cloud object storage. The high-availability interface module is used for processing high-availability logic and enabling the cloud object storage to write data into the at least two buckets when the data need to be written; the cloud object storage can also write data into one storage bucket, and then the cloud object storage copies the written data to other storage buckets across regions, so that the broadband of the first terminal is saved, and the I/O (Input/Output) pressure of the cloud storage gateway is reduced. When data needs to be read, the cloud object storage can preferentially read the data from the buckets in close distance, and when the buckets in close distance fail, the cloud object storage can read the data from other buckets. The whole read-write process is transparent to the first terminal.
Illustratively, when the cloud storage gateway has a high availability function, the logical structure of the cloud storage gateway may be as shown in fig. 7. In fig. 7, the cloud storage gateway includes a high availability interface module 70, and the high availability interface module 70 may interface a first bucket and a second bucket corresponding to a first terminal in the cloud object storage.
In one possible implementation, the cloud storage gateway may have both the functionality of the server-side modality and the highly available functionality. In this case, the second terminal may share data in at least two buckets corresponding to the first terminal. Illustratively, when the cloud storage gateway has a function of a server-side modality and a high availability function, the logical structure of the cloud storage gateway may be as shown in fig. 8. In fig. 8, the cloud storage gateway includes both the server function module 50 and the high availability interface module 70.
Next, advantages of the cloud storage gateway utilized in the embodiment of the present application are described by comparing with the cloud storage gateway in the related art:
1. the cloud storage gateway in the related art is in a server-side form, is deployed in a virtual machine, is relatively thick and heavy, supports a plurality of terminal services, and when the virtual machine fails, influences that all terminals cannot work normally, and the recovery process is complicated; the cloud storage gateway utilized in the embodiment of the application is in a terminal form, is deployed in the terminal and is extremely light in weight, even if the terminal breaks down, only a single terminal is affected, and the single terminal can be recovered after being restarted.
2. In the related art, the cloud storage gateway is complex to deploy, and operations such as virtual machine preparation, virtual machine image deployment, cloud storage gateway starting, client authority configuration and the like are required; the cloud storage gateway utilized in the embodiment of the application is extremely simple to deploy, one-click deployment is achieved, a virtual machine does not need to be prepared, a virtual machine image does not need to be deployed, the cloud storage gateway does not need to be started, and client permission does not need to be configured.
3. The cloud storage gateway in the related technology has long installation and use time period, and needs learning time and trial and error cost; the cloud storage gateway used in the embodiment of the application has a short installation and use time period, namely, the cloud storage gateway is installed and used, and available in a minute level, the storage bucket is mounted into the local target directory, the read-write process of reading the target directory is the same as the experience of reading and writing the local directory, the user operation or configuration is not needed, and the learning time and trial and error cost are not needed.
4. The cloud storage gateway in the related art does not support a high availability function; the cloud storage gateway utilized in the embodiment of the application can support a high availability function, and the service processing effect is improved.
The terminal is connected to the cloud end through the cloud storage gateway, so that the first terminal can conveniently use abundant products on the cloud. Illustratively, using multimedia processing capabilities on the cloud, uploading sensitive information is denied; the cross-region replication capacity of cloud object storage is used for realizing cross-region high availability, two storage buckets configured with cross-region replication are mapped to a mounted target directory, a terminal uploads primary data to a main storage bucket and automatically replicates the primary data to a standby storage bucket, terminal host resources are not occupied, network bandwidth is not occupied, any storage bucket fails, and continuous data of a service is not lost.
In the embodiment of the application, the cloud storage gateway is deployed in the terminal, and the target directory obtained by mapping the storage bucket corresponding to the terminal in the cloud object storage is mounted in the terminal, so that the terminal can directly interact with the cloud object storage through the cloud storage gateway to complete the processing process of the cloud storage related service. The service processing process only relates to terminal and cloud object storage, the logic of service processing is simple, redundant fault points are not introduced, the stability of the service processing process is high, and the service processing effect is good.
Referring to fig. 9, an embodiment of the present application provides a service processing apparatus, where the apparatus is applied to a first terminal, and the first terminal is deployed with a cloud storage gateway, and the apparatus includes:
an obtaining unit 901, configured to obtain a first processing instruction for a target directory, where the target directory is obtained according to mapping of a bucket corresponding to a first terminal in cloud object storage, and the target directory is mounted in the first terminal;
a conversion unit 902, configured to perform protocol conversion on the first processing instruction to obtain a second processing instruction, where a transmission protocol of the second processing instruction is a transmission protocol supported by the cloud object storage;
a sending unit 903, configured to send the second processing instruction to a cloud object storage, where the cloud object storage is used to execute a processing operation corresponding to the second processing instruction in a bucket.
In a possible implementation manner, the obtaining unit 901 is further configured to obtain a mount instruction, where the mount instruction carries an identifier of a bucket corresponding to the first terminal in the cloud object storage and an identifier of a mount position used for mounting the target directory in the first terminal; acquiring an identifier of an object in the bucket based on the identifier of the bucket;
referring to fig. 10, the apparatus further comprises:
a mapping unit 904, configured to map to obtain a target directory based on the identifier of the object in the bucket and the identifier of the mount location;
a mounting unit 905 is configured to mount the target directory to a mounting position.
In one possible implementation, referring to fig. 10, the apparatus further includes:
a receiving unit 906, configured to receive a first execution result fed back by the cloud object storage;
a converting unit 902, further configured to perform protocol conversion on the first execution result to obtain a second execution result, where a transmission protocol of the second execution result is a transmission protocol supported by the first terminal;
a feedback unit 907, configured to feed back the second execution result to the first terminal.
In one possible implementation manner, the target directory is mapped according to at least two buckets corresponding to the first terminal in the cloud object storage.
In one possible implementation manner, the cloud storage gateway includes a first interface module, a conversion module, and a second interface module, and the obtaining unit 901 is configured to obtain a first processing instruction for a target directory by using the first interface module;
a conversion unit 902, configured to perform protocol conversion on the first processing instruction by using a conversion module to obtain a second processing instruction;
a sending unit 903, configured to send the second processing instruction to the cloud object storage by using the second interface module.
In one possible implementation manner, the cloud storage gateway further includes a server function module; the obtaining unit 901 is further configured to obtain, by using the first interface module, a first processing instruction of the second terminal for the target directory, where the second terminal is connected to the cloud storage gateway through the server function module based on the sharing protocol.
In one possible implementation manner, metadata of the target directory is stored in the cloud storage gateway; referring to fig. 10, the apparatus further comprises:
an updating unit 908 is configured to update the metadata of the target directory based on the first processing instruction.
In a possible implementation manner, the first processing instruction is an instruction for writing a file, and the instruction for writing the file carries data of the file to be written; the second processing instruction is an instruction for writing an object converted according to the instruction for writing the file, and the instruction for writing the object carries data of the object to be written; referring to fig. 10, the apparatus further comprises:
a recording unit 909 for recording data of a file to be written;
the receiving unit 906 is further configured to receive a write result, fed back by the cloud object storage, of writing data of an object to be written into a bucket;
and a deleting unit 910, configured to delete the data of the file to be written from the record in response to the writing result indicating that the data of the object to be written has been written into the bucket.
In the embodiment of the application, the cloud storage gateway is deployed in the terminal, and the target directory obtained by mapping the storage bucket corresponding to the terminal in the cloud object storage is mounted in the terminal, so that the terminal can directly interact with the cloud object storage through the cloud storage gateway to complete the processing process of the cloud storage related service. The service processing process only relates to terminal and cloud object storage, the logic of service processing is simple, redundant fault points are not introduced, the stability of the service processing process is high, and the service processing effect is good.
Referring to fig. 11, an embodiment of the present application provides a service processing apparatus, where the apparatus is applied to cloud object storage, and the apparatus includes:
a receiving unit 1101, configured to receive a target processing instruction sent by a cloud storage gateway deployed in a target terminal, where a transmission protocol of the target processing instruction is a transmission protocol supported by cloud object storage;
an execution unit 1102 configured to execute a processing operation corresponding to the target processing instruction in a bucket corresponding to the target terminal.
In one possible implementation, referring to fig. 12, the apparatus further includes:
an acquisition unit 1103 configured to acquire a target execution result of executing a processing operation corresponding to a target processing instruction;
a feedback unit 1104, configured to feed back the target execution result to the cloud storage gateway.
In a possible implementation manner, the number of buckets corresponding to the target terminal is at least two, and the execution unit 1102 is configured to execute the processing operation corresponding to the target processing data in at least one bucket corresponding to the target terminal.
In the embodiment of the application, the cloud storage gateway is deployed in the terminal, and the target directory obtained by mapping the storage bucket corresponding to the terminal in the cloud object storage is mounted in the terminal, so that the terminal can directly interact with the cloud object storage through the cloud storage gateway to complete the processing process of the cloud storage related service. The service processing process only relates to terminal and cloud object storage, the logic of service processing is simple, redundant fault points are not introduced, the stability of the service processing process is high, and the service processing effect is good.
It should be noted that, when the apparatus provided in the foregoing embodiment implements the functions thereof, only the division of the functional modules is illustrated, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the apparatus may be divided into different functional modules to implement all or part of the functions described above. In addition, the apparatus and method embodiments provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
In an exemplary embodiment, a computer device is also provided, as shown in fig. 13, comprising a processor 1301 and a memory 1302, the memory 1302 having at least one program code stored therein. The at least one program code is loaded and executed by one or more processors 1301 to implement any of the above-described business processing methods.
In an exemplary embodiment, there is also provided a computer readable storage medium having at least one program code stored therein, the at least one program code being loaded and executed by a processor of a computer device to implement any of the above-mentioned business processing methods.
Alternatively, the computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a Compact Disc Read-Only Memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
It should be understood that reference to "a plurality" herein means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The above description is only exemplary of the present application and should not be taken as limiting the present application, and any modifications, equivalents, improvements and the like that are made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (13)

1. A service processing method is applied to a first terminal, the first terminal is deployed with a cloud storage gateway, and the method comprises the following steps:
the cloud storage gateway acquires a first processing instruction for a target directory, the target directory is obtained by mapping at least two storage buckets corresponding to the first terminal in cloud object storage, the target directory is mounted in the first terminal, the objects stored in the at least two storage buckets are the same, and each directory in the target directory corresponds to one object in each of the at least two storage buckets;
the cloud storage gateway performs protocol conversion on the first processing instruction to obtain a second processing instruction, wherein a transmission protocol of the second processing instruction is a transmission protocol supported by the cloud object storage;
and the cloud storage gateway sends the second processing instruction to the cloud object storage, and the cloud object storage is used for executing processing operation corresponding to the second processing instruction in a non-failure storage bucket of the at least two storage buckets.
2. The method of claim 1, wherein before the cloud storage gateway obtains the first processing instruction for the target directory, the method further comprises:
the cloud storage gateway acquires a mounting instruction, wherein the mounting instruction carries an identifier of a storage bucket corresponding to the first terminal in the cloud object storage and an identifier of a mounting position for mounting a target directory in the first terminal;
the cloud storage gateway acquires the identification of the object in the storage bucket based on the identification of the storage bucket;
and the cloud storage gateway maps the object identifier in the storage bucket and the mounting position identifier to obtain a target directory, and mounts the target directory to the mounting position.
3. The method of claim 1, wherein after the cloud storage gateway sends the second processing instruction to the cloud object storage, the method further comprises:
the cloud storage gateway receives a first execution result fed back by the cloud object storage;
the cloud storage gateway performs protocol conversion on the first execution result to obtain a second execution result, wherein a transmission protocol of the second execution result is a transmission protocol supported by the first terminal;
and the cloud storage gateway feeds the second execution result back to the first terminal.
4. The method of claim 1, wherein the cloud storage gateway comprises a first interface module, a conversion module, and a second interface module, and wherein the cloud storage gateway obtains a first processing instruction for a target directory, comprising:
the cloud storage gateway acquires a first processing instruction aiming at a target directory by utilizing the first interface module;
the cloud storage gateway performs protocol conversion on the first processing instruction to obtain a second processing instruction, and the method comprises the following steps:
the cloud storage gateway performs protocol conversion on the first processing instruction by using the conversion module to obtain a second processing instruction;
the cloud storage gateway sends the second processing instruction to the cloud object storage, including:
and the cloud storage gateway sends the second processing instruction to the cloud object storage by using the second interface module.
5. The method of claim 4, wherein the cloud storage gateway further comprises a server function module; the cloud storage gateway acquires a first processing instruction for a target directory by using the first interface module, and the method includes:
the cloud storage gateway acquires a first processing instruction of a second terminal aiming at a target directory by using the first interface module, and the second terminal is connected with the cloud storage gateway through the server function module based on a sharing protocol.
6. The method of claim 1, wherein the cloud storage gateway stores metadata of the target directory; the method further comprises the following steps:
the cloud storage gateway updates the metadata of the target directory based on the first processing instruction.
7. The method according to claim 1, wherein the first processing instruction is a file writing instruction, and the file writing instruction carries data of a file to be written; the second processing instruction is an instruction for writing an object converted according to the instruction for writing the file, and the instruction for writing the object carries data of the object to be written; before the cloud storage gateway sends the second processing instruction to the cloud object storage, the method further includes:
the cloud storage gateway records the data of the file to be written;
after the cloud storage gateway sends the second processing instruction to the cloud object storage, the method further includes:
the cloud storage gateway receives a writing result of writing the data of the object to be written into the non-fault storage bucket fed back by the cloud object storage;
and in response to the writing result indicating that the data of the object to be written has been written into the non-failed bucket, the cloud storage gateway deletes the data of the file to be written from the record.
8. A business processing method is applied to cloud object storage and comprises the following steps:
receiving a second processing instruction sent by a cloud storage gateway deployed in a first terminal, where a transmission protocol of the second processing instruction is a transmission protocol supported by the cloud object storage, the second processing instruction is obtained by the cloud storage gateway performing protocol conversion on a first processing instruction for a target directory, the target directory is obtained by mapping at least two buckets corresponding to the first terminal in the cloud object storage, the target directory is mounted in the first terminal, objects stored in the at least two buckets are the same, and each directory in the target directory corresponds to one object in each of the at least two buckets;
performing a processing operation corresponding to the second processing instruction in a non-failed bucket of the at least two buckets corresponding to the first terminal.
9. The method of claim 8, wherein after performing the processing operation corresponding to the second processing instruction in a non-failed bucket of the at least two buckets corresponding to the first terminal, the method further comprises:
acquiring a first execution result of executing the processing operation corresponding to the second processing instruction;
and feeding back the first execution result to the cloud storage gateway.
10. The service processing device is applied to a first terminal, the first terminal is deployed with a cloud storage gateway, and the device comprises:
an obtaining unit, configured to obtain a first processing instruction for a target directory, where the target directory is obtained by mapping at least two buckets corresponding to the first terminal in cloud object storage, the target directory is mounted in the first terminal, the objects stored in the at least two buckets are the same, and each directory in the target directory corresponds to one object in each of the at least two buckets;
the conversion unit is used for performing protocol conversion on the first processing instruction to obtain a second processing instruction, and a transmission protocol of the second processing instruction is a transmission protocol supported by the cloud object storage;
a sending unit, configured to send the second processing instruction to the cloud object storage, where the cloud object storage is configured to execute a processing operation corresponding to the second processing instruction in a non-failed bucket of the at least two buckets.
11. A business processing apparatus, wherein the apparatus is applied to cloud object storage, and the apparatus comprises:
a receiving unit, configured to receive a second processing instruction sent by a cloud storage gateway deployed in a first terminal, where a transmission protocol of the second processing instruction is a transmission protocol supported by the cloud object storage, the second processing instruction is obtained by the cloud storage gateway performing protocol conversion on a first processing instruction for a target directory, the target directory is obtained by mapping at least two buckets corresponding to the first terminal in the cloud object storage, the target directory is mounted in the first terminal, objects stored in the at least two buckets are the same, and each directory in the target directory corresponds to one object in each of the at least two buckets;
an execution unit to execute a processing operation corresponding to the second processing instruction in a non-failed bucket of the at least two buckets corresponding to the first terminal.
12. A computer device, characterized in that it comprises a processor and a memory, in which at least one program code is stored, which is loaded and executed by the processor to implement a business process method according to any one of claims 1 to 7, or a business process method according to any one of claims 8 to 9.
13. A computer-readable storage medium, having stored therein at least one program code, which is loaded and executed by a processor, to implement a business process method according to any one of claims 1 to 7, or a business process method according to any one of claims 8 to 9.
CN202010140564.0A 2020-03-03 2020-03-03 Service processing method, device, equipment and storage medium Active CN111371891B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010140564.0A CN111371891B (en) 2020-03-03 2020-03-03 Service processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010140564.0A CN111371891B (en) 2020-03-03 2020-03-03 Service processing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111371891A CN111371891A (en) 2020-07-03
CN111371891B true CN111371891B (en) 2022-08-05

Family

ID=71211655

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010140564.0A Active CN111371891B (en) 2020-03-03 2020-03-03 Service processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111371891B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112035709A (en) * 2020-08-25 2020-12-04 上海中通吉网络技术有限公司 Arranging method, high-speed reading method, device and equipment of resource directory
CN114629921B (en) * 2020-12-14 2023-11-17 华为云计算技术有限公司 Cloud platform and bucket management method for object storage service provided by cloud platform
CN113918100A (en) * 2021-11-15 2022-01-11 深圳潮数软件科技有限公司 Multi-protocol multifunctional cloud storage gateway

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108076090A (en) * 2016-11-11 2018-05-25 华为技术有限公司 Data processing method and storage management system
CN110677441A (en) * 2018-07-02 2020-01-10 ***通信集团有限公司 Access method and device of object storage cluster

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140115182A1 (en) * 2012-10-24 2014-04-24 Brocade Communications Systems, Inc. Fibre Channel Storage Area Network to Cloud Storage Gateway
US20160098769A1 (en) * 2014-10-02 2016-04-07 Cloudian Holdings, Inc. System and Method for Providing Centralized Usage and Billing Information

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108076090A (en) * 2016-11-11 2018-05-25 华为技术有限公司 Data processing method and storage management system
CN110677441A (en) * 2018-07-02 2020-01-10 ***通信集团有限公司 Access method and device of object storage cluster

Also Published As

Publication number Publication date
CN111371891A (en) 2020-07-03

Similar Documents

Publication Publication Date Title
CN111371891B (en) Service processing method, device, equipment and storage medium
JP5502999B2 (en) Distributed management monitoring system and monitoring method and construction method thereof
US7406473B1 (en) Distributed file system using disk servers, lock servers and file servers
US8499191B2 (en) Failure recovery method for information processing service and virtual machine image generation apparatus
US20230409381A1 (en) Management and orchestration of microservices
JP5118243B2 (en) Realization of reliable access to non-local block data storage by executing programs
CN107797767A (en) One kind is based on container technique deployment distributed memory system and its storage method
CN106331075B (en) Method for storing file, metadata server and manager
CN101594256A (en) Disaster recovery method, device and system
CN109407975B (en) Data writing method, computing node and distributed storage system
CN112416892A (en) Emergency video data cloud storage system
CN106790403B (en) Method for realizing mobile cloud computing intermediate platform and method for realizing distribution
CN114564339A (en) Disk image file cross-platform migration method and system
CN110119308B (en) System for managing large-scale container applications
CN104517067A (en) Method, device and system for data access
US20150381727A1 (en) Storage functionality rule implementation
CN113032356B (en) Cabin distributed file storage system and implementation method
CN117632374A (en) Container mirror image reading method, medium, device and computing equipment
US11079960B2 (en) Object storage system with priority meta object replication
CN105022779A (en) Method for realizing HDFS file access by utilizing Filesystem API
US20230205638A1 (en) Active-active storage system and data processing method thereof
US7188213B2 (en) Management computer and method of managing data storage apparatus
CN111752892A (en) Distributed file system, method for implementing the same, management system, device, and medium
US11093465B2 (en) Object storage system with versioned meta objects
US11074002B2 (en) Object storage system with meta object replication

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40025912

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant