WO2019047875A1 - 一种数据存储、读取方法及装置 - Google Patents

一种数据存储、读取方法及装置 Download PDF

Info

Publication number
WO2019047875A1
WO2019047875A1 PCT/CN2018/104255 CN2018104255W WO2019047875A1 WO 2019047875 A1 WO2019047875 A1 WO 2019047875A1 CN 2018104255 W CN2018104255 W CN 2018104255W WO 2019047875 A1 WO2019047875 A1 WO 2019047875A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
stored
information
local access
access server
Prior art date
Application number
PCT/CN2018/104255
Other languages
English (en)
French (fr)
Inventor
汪渭春
夏伟强
王伟
林起芊
Original Assignee
杭州海康威视系统技术有限公司
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 杭州海康威视系统技术有限公司 filed Critical 杭州海康威视系统技术有限公司
Publication of WO2019047875A1 publication Critical patent/WO2019047875A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • G06F3/0611Improving I/O performance in relation to response time
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Definitions

  • the present application relates to the field of cloud storage technologies, and in particular, to a data storage and reading method and apparatus.
  • the process of storing data to the cloud storage system by the client is generally: the client sends the data to be stored to the cloud storage system, and the cloud storage system receives the data to be stored, and stores the data to be stored in an erasure code encoding manner. After the storage is successful, the information about the storage success is sent to the client, and the client displays the information of the storage success to enable the user to know that the data to be stored has been successfully stored.
  • the process of storing the stored data by using the erasure code encoding method is: dividing the data to be stored into data segments, encoding each data segment, and then storing the encoded data segments in different locations of the cloud storage system. For example: stored in different storage nodes of the cloud storage system.
  • An object of the embodiments of the present application is to provide a data storage and reading method and device to improve user experience.
  • the specific technical solutions are as follows:
  • an embodiment of the present application provides a data storage method, which is applied to a local access server, where the method includes:
  • Target information sent by the first client where the target information includes data to be stored
  • the information about the storage success is sent to the first client, so that the first client displays the information that the storage is successful;
  • the data to be stored that has been successfully stored is sent to the cloud storage system, so that the cloud storage system stores the data to be stored.
  • the step of storing the data to be stored locally includes:
  • the data to be stored is sent to the local access server corresponding to the first destination address, so that the local access server corresponding to the first destination address stores the data to be stored.
  • the step of storing the to-be-stored data to the local access server includes:
  • the data to be stored is stored in a solid state hard disk of the local access server.
  • the load access cluster includes multiple sets of local access servers, and after storing the data to be stored successfully, sending information that the storage succeeds to the first client to enable the first client to display the location After the step of storing the successfully stored information, before the step of transmitting the successfully stored data to be stored to the cloud storage system, the method further includes:
  • the data to be stored is copied to the determined other local access servers.
  • the method further includes:
  • the target information further includes request information, after the step of sending the stored data to be stored to the cloud storage system, so that the cloud storage system stores the data to be stored, the method Also includes:
  • the public key request information is sent to the local access server, and after receiving the preset public key fed back by the local access server, the preset public key pair is used.
  • the encrypted data to be stored stores the success information for decryption.
  • the embodiment of the present application provides a data storage device, which is applied to a local access server, where the device includes:
  • a first receiving module configured to receive target information sent by the first client, where the target information includes data to be stored
  • a storage module configured to store the data to be stored locally
  • a sending module configured to: after the data to be stored locally is successfully stored, send information that is successfully stored to the first client, so that the first client displays the information that the storage is successful;
  • a dumping module configured to send the stored data to be stored to the cloud storage system, so that the cloud storage system stores the data to be stored.
  • the storage module includes:
  • a first destination address determining unit configured to determine, according to the identifier information of the to-be-stored data, a first destination address corresponding to the to-be-stored data
  • a determining unit configured to determine whether the first destination address is an address of the local access server, if yes, triggering the first storage unit, and if not, triggering the second storage unit;
  • the first storage unit is configured to store the to-be-stored data to the local access server
  • the second storage unit is configured to send the data to be stored to a local access server corresponding to the first destination address, so that the local access server corresponding to the first destination address stores the data to be stored. .
  • the first storage unit is specifically configured to:
  • the data to be stored is stored in a solid state hard disk of the local access server.
  • the load access cluster includes multiple groups of local access servers, and the device further includes:
  • the other local access server determining module is configured to: after the storing the data to be stored is successful, send the information that the storage succeeds to the first client, so that the first client displays the information that the storage is successful, Before the data to be stored that has been successfully stored is sent to the cloud storage system, the other local access servers in the same group as the local access server are determined according to the identification information of the local access server and the pre-stored group information.
  • a copying module configured to copy the to-be-stored data to the determined other local access servers.
  • the device further includes:
  • a deleting module configured to send, to the cloud storage system, the stored data to be stored, so that the cloud storage system stores the data to be stored, and receives the storage success information sent by the cloud storage system, and deletes the The load accesses the to-be-stored data stored in the cluster.
  • the target information further includes request information
  • the device further includes:
  • the feedback request information judging module is configured to: after the data to be stored is sent to the cloud storage system, to enable the cloud storage system to store the data to be stored, determine whether the request information is feedback request information, if Yes, triggering the second destination address determining module;
  • the second destination address determining module is configured to determine a second destination address from the request information
  • the encryption module is configured to encrypt the storage data storage success information by using the preset private key, and send the encrypted data storage success information to the second client corresponding to the second destination address, so that the second client After receiving the encrypted data storage success information to be stored, the terminal sends the public key request information to the local access server, and after receiving the preset public key fed back by the local access server, using the The preset public key decrypts the encrypted data storage success information to be stored.
  • the embodiment of the present application provides a data reading method, which is applied to a local access server, and the method includes:
  • the index information table stores a correspondence between the identifier information and the dump information
  • the method further includes:
  • the step of determining whether the data to be read has been transferred to the cloud storage system is performed according to the identification information and the pre-stored index information table.
  • the method further includes:
  • the data to be read is sent, and the found data to be read is sent to the client.
  • the embodiment of the present application provides a data reading apparatus, which is applied to a local access server, where the apparatus includes:
  • a second receiving module configured to receive a data read request sent by the client, where the data read request includes identifier information of the data to be read;
  • a determining module configured to determine, according to the identifier information and a pre-stored index information table, whether the data to be read has been transferred to a cloud storage system, where the index information table stores identifier information and dump information Correspondence relationship;
  • a reading module configured to send the identification information to the cloud storage system, receive the to-be-read data fed back by the cloud storage system, and receive the received Read data is sent to the client.
  • the device further includes:
  • the destination address determining module is configured to determine, according to the identifier information, the determining, according to the identifier information, before determining whether the to-be-read data has been transferred to the cloud storage system according to the identifier information and the pre-stored index information table. Read the destination address corresponding to the data;
  • the self address determination module is configured to determine whether the destination address is an address of the local access server, and if yes, trigger the determining module.
  • the device further includes:
  • a locating module configured to send the identifier information to a local access server corresponding to the destination address, if the destination address is not the address of the local access server, so that the The local access server corresponding to the destination address searches for the data to be read according to the identifier information, and sends the found data to be read to the client.
  • an embodiment of the present application provides an electronic device, including a processor and a memory, where the memory is configured to store a program code.
  • the processor when executed to execute the program code stored on the memory, implements the data storage method steps of any of the above, and/or implements the data reading method steps of any of the above.
  • the embodiment of the present application provides a computer readable storage medium, where the computer readable storage medium stores a computer program, and when the computer program is executed by a processor, the data storage method of any one of the foregoing is implemented.
  • the embodiment of the present application provides a computer program, which is configured to perform the data storage method steps of any of the above described at runtime, and/or perform data reading according to any of the foregoing Method steps.
  • the target information sent by the first client is received, where the target information includes data to be stored, and the data to be stored is stored in the load access cluster where the local access server is located, and after the data to be stored is successfully stored,
  • the first client sends the information that the storage is successful, so that the first client displays the information that the storage is successful, and sends the stored data to be stored to the cloud storage system, so that the cloud storage system stores the data to be stored.
  • the information about the storage success is sent to the first client, and then the data to be stored that has been successfully stored is transferred to the cloud storage system, and the cloud storage system is stored again. Storing data. Since the time to store the data to be stored locally is much less than the time stored in the cloud storage system, the waiting time for the user to view the information stored successfully through the client is reduced, and the user experience is improved.
  • FIG. 1 is a schematic structural diagram of a load access cluster provided by an implementation of the present application.
  • FIG. 2 is a schematic diagram of a first process of a data storage method provided by an implementation of the present application
  • FIG. 3 is a second schematic flowchart of a data storage method provided by an implementation of the present application.
  • FIG. 4 is a schematic diagram of a third process of the data storage method provided by the implementation of the present application.
  • FIG. 5 is a schematic structural diagram of a local access server provided by the implementation of the present application.
  • FIG. 6 is a fourth schematic flowchart of a data storage method provided by an implementation of the present application.
  • FIG. 7 is a schematic flowchart diagram of a fifth method of data storage provided by the implementation of the present application.
  • FIG. 8 is a schematic structural diagram of a data storage device provided by an implementation of the present application.
  • FIG. 9 is a schematic diagram of a first structure of an electronic device provided by an implementation of the present application.
  • FIG. 10 is a schematic diagram of a first flow of a data reading method provided by an implementation of the present application.
  • FIG. 11 is a second schematic flowchart diagram of a data reading method provided by an implementation of the present application.
  • FIG. 12 is a schematic diagram of a third process of the data reading method provided by the implementation of the present application.
  • FIG. 13 is a schematic structural diagram of a data reading apparatus provided by an implementation of the present application.
  • FIG. 14 is a schematic diagram of a second structure of an electronic device provided by the implementation of the present application.
  • the embodiment of the present application provides a data storage and reading method and device.
  • the embodiment of the present application pre-sets multiple load access clusters locally, and each local load access cluster is provided with multiple sets of local connections. Entering the server, the number of local access servers in each group is the same, and data synchronization is performed between each group.
  • a data storage method provided by the embodiment of the present application is first introduced.
  • a data storage method provided by an embodiment of the present application which is applied to a local access server, may include:
  • S101 Receive target information sent by the first client, where the target information includes data to be stored.
  • the target information including the data to be stored is sent to a local access server in the target load access cluster, where the local The access server receives the target information.
  • the process of sending the target information to the local access server by the first client is:
  • the first client determines the address of the local access server corresponding to the target load access cluster according to the domain name of the target load access cluster and the correspondence between the domain name of the pre-stored load access cluster and the address of the local access server, and The target information is sent to the local access server corresponding to the determined address.
  • the domain name of the pre-stored load access cluster has a one-to-one correspondence with the address of the local access server. Therefore, only the local access server of the unique corresponding access server can be obtained only when the domain name of the target load access cluster is obtained.
  • the address that is, each load access cluster only provides a unique access entry.
  • the optimal local access server is first determined, and then the optimal local access server is used as an access portal. In this way, the speed of accessing the load access cluster is improved.
  • the first client may directly determine the address of the local access server corresponding to the target load access cluster.
  • the first client needs to access the domain name and local access of the load access cluster.
  • the load access cluster corresponding to the address of the server sends the request information including the domain name of the target load access cluster to obtain the address of the local access server corresponding to the target load access cluster.
  • S102 Store data to be stored locally.
  • the local access server After receiving the target information sent by the first client, the local access server stores the data to be stored included in the target information locally, where the local is the load access cluster where the local access server is located.
  • the information about the storage success is sent to the first client immediately.
  • the first client can display the information that the storage is successful, so that the user knows the storage to be stored. The data was stored successfully.
  • S104 Send the stored data to be stored to the cloud storage system, so that the cloud storage system stores the data to be stored.
  • the storage of the data to be stored is successful only when the data to be stored is stored in the local load access cluster.
  • the stored data needs to be successfully stored.
  • the data to be stored is sent to the cloud storage system.
  • the cloud storage system may store the data to be stored by using an erasure code encoding method.
  • the process of storing the data to be stored by using the erasure code encoding method in the cloud storage system is: dividing the data to be stored into data. Fragments, encoding individual pieces of data, and then storing the encoded pieces of data in different locations in the cloud storage system.
  • the hierarchical storage means that the data is first stored in a local load access cluster and then transferred to the cloud storage system.
  • the data to be stored may be sent to the cloud storage system immediately after the data to be stored in the load access cluster is successfully stored, or the data to be stored may be sent to the cloud when the load access cluster is idle. Storage systems, this is all reasonable.
  • the target information sent by the first client is received, where the target information includes data to be stored, and the data to be stored is stored in the load access cluster where the local access server is located, and after the data to be stored is successfully stored,
  • the first client sends the information that the storage is successful, so that the first client displays the information that the storage is successful, and sends the stored data to be stored to the cloud storage system, so that the cloud storage system stores the data to be stored.
  • the information about the storage success is sent to the first client, and then the data to be stored that has been successfully stored is transferred to the cloud storage system, and the cloud storage system is stored again. Storing data. Since the time to store the data to be stored locally is much less than the time stored in the cloud storage system, the waiting time for the user to view the information stored successfully through the client is reduced, and the user experience is improved.
  • steps S101, S103 and S104 are the same as FIG. 2, and step S102 in FIG. 3 may include:
  • S1021 Determine, according to the identifier information of the data to be stored, a first destination address corresponding to the data to be stored.
  • the local access server that receives the target information sent by the first client is not necessarily the location where the data to be stored is to be stored, so that when the local access server receives the first After the target information sent by the client, the first destination address corresponding to the data to be stored needs to be determined.
  • the method for determining the first destination address corresponding to the data to be stored is different according to the identifier information of the data to be stored, including but not limited to the following manners:
  • the first way determining the first destination address by using the correspondence between the identification information and the storage address.
  • the local access server may The identifier information of the data to be stored, and the correspondence between the pre-stored identifier information and the storage address, and the first destination address corresponding to the data to be stored is determined, where the identifier information may be type information.
  • the second way use the hash value to determine the first destination address.
  • the mapping between the hash value and the address of the local access server is stored in each of the local access servers in the load access cluster. Therefore, after the local access server receives the target information sent by the first client, The hash value of the data to be stored is calculated by using a hash algorithm according to the identification information of the data to be stored.
  • a destination address that is, a first destination address corresponding to the data to be stored.
  • step S1022 Determine whether the first destination address is an address of the local access server, if yes, go to step S1023, if no, go to step S1024.
  • the first destination address corresponding to the data to be stored After the first destination address corresponding to the data to be stored is determined, it is determined whether the location to be stored is the local access server according to the first destination address. Therefore, it is required to determine whether the first destination address is local access. The address of the server, and according to the judgment result, perform the next steps.
  • S1023 Store the data to be stored to the local access server.
  • the location where the data to be stored is to be stored is itself, that is, the local access server that receives the target information sent by the first client, and then Store data to a local access server.
  • the storing the data to be stored to the local access server may include:
  • the data to be stored can be stored in the solid state hard disk of the local access server.
  • S1024 Send the data to be stored to the local access server corresponding to the first destination address, so that the local access server corresponding to the first destination address stores the data to be stored.
  • the location where the data to be stored is not stored is itself, that is, the local access server that does not receive the target information sent by the first client.
  • the data to be stored needs to be sent to the local access server corresponding to the first destination address.
  • the local access server corresponding to the first destination address After receiving the data to be stored, the local access server corresponding to the first destination address stores the data to be stored.
  • the local access server corresponding to the first destination address, after receiving the data to be stored, and storing the data to be stored, may include:
  • the local access server corresponding to the first destination address After receiving the data to be stored, the local access server corresponding to the first destination address stores the data to be stored in the SSD of the local access server corresponding to the first destination address.
  • the data storage speed is improved by storing the data to be stored to the solid state hard disk.
  • the data to be stored when the first destination address is the address of the local access server, the data to be stored is stored in the local access server, and when the first destination address is not the address of the local access server, the data to be stored is to be stored.
  • the local access server corresponding to the first destination address is stored, and the data to be stored is stored in the local load access cluster.
  • the load access cluster includes a plurality of sets of local access servers. Based on the method shown in FIG. 3, as shown in FIG. 4, steps S101-S104 are the same as FIG. 3, after step S103 of FIG. 4, before step S104. Can also include:
  • S103A Determine other local access servers in the same group as the local access server according to the identification information of the local access server and the pre-stored group information.
  • the data to be stored is lost, and the data to be stored may be stored in a copy.
  • Each of the load access clusters has multiple sets of local access servers. Therefore, the method of replicating the data to be stored may be the same group replication, that is, the data to be stored is copied to other local accesses in the same group. server.
  • the group information is stored in each local access server, wherein the group information includes identification information and groups of all local access servers.
  • the group information includes identification information and groups of all local access servers.
  • local access servers 1, 2, and 3 correspond to group A
  • local access servers 4 and 5 correspond to group B.
  • other local access servers in the same group as the local access server may be determined according to the identification information of the local access server and the pre-stored group information.
  • S103B Copy the data to be stored to the determined other local access servers.
  • the data to be stored may be copied to the determined other local access servers, and after the other local access servers receive the copied data to be stored, respectively Store the copied data to be stored.
  • the copy storage of the data to be stored is completed, so that the data to be stored can be obtained from other local access servers in the same group and transferred to the cloud storage system even if the data to be stored in the local access server is lost. .
  • the identification information of the local access server is 1, and the pre-stored group information is: the local access servers 1, 2, and 3 correspond to the group A, and the local access servers 4 and 5 correspond to the group B, and the data to be stored is M;
  • Determining, according to the identification information 1 of the local access server and the pre-stored group information, other local access servers in the same group as the local access server 1 are: local access servers 2 and 3;
  • the local access server 2 receives the copied data M to be stored, stores the copied data M to be stored, and the local access server 3 receives the copied data M to be stored, and stores the copied data M to be stored.
  • the local access server includes a PS module, a DSS module, a DDS module, a replicator module, and a GMS module.
  • the PS module is a proxy service module, and is used to provide a cloud storage protocol service, for example, an Ali OSS object storage. Protocol service, Amazon S3 object storage protocol service.
  • the DSS module is a data storage/read service module for storing/reading data; the DDS module is a data dump service module for transferring data from the local to the cloud storage system; the replicator module is a data copy module for The local data is copied to other local access servers; the GMS module is an access group management service module, configured to perform a Haxi calculation according to the identification information of the data to be stored, and determine a location to be stored in the data to be stored.
  • the first client sends the target information to the PS module
  • the PS module sends the identification information of the data to be stored to the GMS module
  • the GMS module uses the hash algorithm to calculate the hash value of the data to be stored according to the received identification information, according to the The calculated hash value and the correspondence between the pre-stored hash value and the address of the local access server determine the first destination address of the local access server corresponding to the calculated hash value, that is, the data to be stored corresponds to The first destination address. And sending the determined first destination address to the PS module.
  • the PS module determines whether the first destination address is its own address. If yes, the data to be stored is sent to the DSS module, the DSS module stores the received data to be stored, and sends the data to be stored to the replicator module, and the replicator module sends the data to the GMS module.
  • the GMS module sends the address of the other local access servers in the same group to the replicator module.
  • the replicator module copies the data to be stored to other local access servers in the same group to enable other local access.
  • the incoming server stores the copied data to be stored separately.
  • the PS module determines that the first destination address is not the address of the local access server, the data to be stored is sent to the DSS module, and the DSS module sends the received data to the local access server corresponding to the first destination address.
  • the local access server corresponding to the first destination address stores data to be stored.
  • the DSS module After the data to be stored is successfully stored locally, the DSS module sends a message indicating that the storage is successful to the PS module, and the PS module sends the information of the storage success to the first client to enable the first client to display the information that the storage is successful, and then the DSS module will be stored.
  • the successfully stored data is sent to the DDS module, and the DDS module transfers the received stored data to be stored to the cloud storage system.
  • the steps S101-S104 are the same as those of FIG. 2, and after step S104 of FIG. 6, the method may further include:
  • S105 Receive storage success information sent by the cloud storage system, and delete the data to be stored stored in the load access cluster.
  • the cloud storage system After the data to be stored in the load access cluster is transferred to the cloud storage system, the cloud storage system stores the data to be stored, and after the storage is successful, sends the storage success information to the local access server.
  • the local access server can delete the data to be stored stored in the load access cluster after receiving the storage success information sent by the cloud storage system.
  • the data to be stored stored in the local access server is deleted; if the data to be stored is stored in the local access server corresponding to the first destination address, the deletion is stored in the first The data to be stored in the local access server corresponding to the destination address.
  • the target information may further include the request information. Therefore, based on the method shown in FIG. 2, as shown in FIG. 7, steps S101-S104 are the same as FIG. 2, After step S104 of FIG. 7, the method may further include:
  • step S106 It is judged whether the request information is feedback request information, if yes, step S107 is performed, and if not, no processing is performed.
  • the request information includes the second destination address of the second client.
  • the request information is the feedback request information
  • S108 encrypt the storage data storage success information by using the preset private key, and send the encrypted data storage success information to the second client corresponding to the second destination address, so that the second client receives the encrypted waiting
  • the public key request information is sent to the local access server, and after receiving the preset public key fed back by the local access server, the encrypted public data storage success information is decrypted by using the preset public key.
  • the stored data storage success information needs to be encrypted.
  • the local access server generates a preset private key and a preset public key according to a preset encryption rule, and the preset private key is used for encryption, and the preset public key is used for decryption. Therefore, before sending the data storage success information to be stored.
  • the storage data storage success information may be encrypted by using the preset private key, and the encrypted data storage success information to be sent to the second client corresponding to the second destination address is sent.
  • the second client After receiving the encrypted data storage success information to be stored, the second client needs to send the public key request information to the local access server in order to open the received information, and the local access server receives the public key request information after receiving the public key request information.
  • the preset public key is sent to the second client, and after receiving the preset public key fed back by the local access server, the second client decrypts the encrypted data storage success information to be stored by using the preset public key, thereby It is known that the data to be stored has been successfully stored.
  • the local access server regenerates the preset private key and the preset public key, and replaces the leaked preset private key or the preset public key. Thereby, the security of the encrypted information is guaranteed.
  • the embodiment of the present application further provides a data storage device, which is applied to a local access server, where the device includes:
  • the first receiving module 201 is configured to receive target information sent by the first client, where the target information includes data to be stored;
  • the storage module 202 is configured to store the to-be-stored data in a load access cluster where the local access server is located;
  • the sending module 203 is configured to: after the storing the data to be stored, send the information that is successfully stored to the first client, so that the first client displays the information that the storage is successful;
  • the dumping module 204 is configured to send the stored data to be stored to the cloud storage system, so that the cloud storage system stores the to-be-stored data.
  • the target information sent by the first client is received, where the target information includes data to be stored, and the data to be stored is stored in the load access cluster where the local access server is located, and after the data to be stored is successfully stored,
  • the first client sends the information that the storage is successful, so that the first client displays the information that the storage is successful, and sends the stored data to be stored to the cloud storage system, so that the cloud storage system stores the data to be stored.
  • the information about the storage success is sent to the first client, and then the data to be stored that has been successfully stored is transferred to the cloud storage system, and the cloud storage system is stored again. Storing data. Since the time to store the data to be stored locally is much less than the time stored in the cloud storage system, the waiting time for the user to view the information stored successfully through the client is reduced, and the user experience is improved.
  • the storage module 202 may include:
  • a first destination address determining unit configured to determine, according to the identifier information of the to-be-stored data, a first destination address corresponding to the to-be-stored data
  • a determining unit configured to determine whether the first destination address is an address of the local access server, if yes, triggering the first storage unit, and if not, triggering the second storage unit;
  • the first storage unit is configured to store the to-be-stored data to the local access server
  • the second storage unit is configured to send the data to be stored to a local access server corresponding to the first destination address, so that the local access server corresponding to the first destination address stores the data to be stored. .
  • the first storage unit may be specifically configured to:
  • the data to be stored is stored in a solid state hard disk of the local access server.
  • the load access cluster includes multiple sets of local access servers, and the device may further include:
  • the other local access server determining module is configured to: after the storing the data to be stored is successful, send the information that the storage succeeds to the first client, so that the first client displays the information that the storage is successful, Before the data to be stored that has been successfully stored is sent to the cloud storage system, the other local access servers in the same group as the local access server are determined according to the identification information of the local access server and the pre-stored group information.
  • a copying module configured to copy the to-be-stored data to the determined other local access servers.
  • the device may further include:
  • a deleting module configured to send, to the cloud storage system, the stored data to be stored, so that the cloud storage system stores the data to be stored, and receives the storage success information sent by the cloud storage system, and deletes the The load accesses the to-be-stored data stored in the cluster.
  • the target information further includes request information
  • the device may further include:
  • the feedback request information judging module is configured to: after the data to be stored is sent to the cloud storage system, to enable the cloud storage system to store the data to be stored, determine whether the request information is feedback request information, if Yes, triggering the second destination address determining module;
  • the second destination address determining module is configured to determine a second destination address from the request information
  • the encryption module is configured to encrypt the storage data storage success information by using the preset private key, and send the encrypted data storage success information to the second client corresponding to the second destination address, so that the second client After receiving the encrypted data storage success information to be stored, the terminal sends the public key request information to the local access server, and after receiving the preset public key fed back by the local access server, using the The preset public key decrypts the encrypted data storage success information to be stored.
  • the embodiment of the present application further provides an electronic device, as shown in FIG. 9, including: a processor 901 and a memory 902, wherein the memory 902 is configured to store a program code;
  • the processor 90 when used to execute the program code stored on the memory 902, implements the following steps:
  • Target information sent by the first client where the target information includes data to be stored
  • the information that the storage is successful is sent to the first client, so that the first client displays the information that the storage is successful;
  • the data to be stored that has been successfully stored is sent to the cloud storage system, so that the cloud storage system stores the data to be stored.
  • the target information sent by the first client is received, where the target information includes data to be stored, and the data to be stored is stored in the load access cluster where the local access server is located, and after the data to be stored is successfully stored,
  • the first client sends the information that the storage is successful, so that the first client displays the information that the storage is successful, and sends the stored data to be stored to the cloud storage system, so that the cloud storage system stores the data to be stored.
  • the information about the storage success is sent to the first client, and then the data to be stored that has been successfully stored is transferred to the cloud storage system, and the cloud storage system is stored again. Storing data. Since the time to store the data to be stored locally is much less than the time stored in the cloud storage system, the waiting time for the user to view the information stored successfully through the client is reduced, and the user experience is improved.
  • the step of storing the data to be stored in the load access cluster where the local access server is located includes:
  • the data to be stored is sent to the local access server corresponding to the first destination address, so that the local access server corresponding to the first destination address stores the data to be stored.
  • the step of storing the data to be stored to the local access server includes:
  • the data to be stored is stored in a solid state hard disk of the local access server.
  • the load access cluster includes multiple sets of local access servers, and after storing the data to be stored successfully, sending information about successful storage to the first client to enable the After the step of the first client displaying the information about the successful storage, the method further includes: before the step of transmitting the successfully stored data to be stored to the cloud storage system, the method further includes:
  • the data to be stored is copied to the determined other local access servers.
  • the method further includes:
  • the target information further includes request information, where the to-be-stored data that has been successfully stored is sent to the cloud storage system, so that the cloud storage system stores the to-be-stored data.
  • the method further includes:
  • the public key request information is sent to the local access server, and after receiving the preset public key fed back by the local access server, the preset public key pair is used.
  • the encrypted data to be stored stores the success information for decryption.
  • the memory mentioned in the above electronic device may include a random access memory (RAM), and may also include a non-volatile memory (NVM), such as at least one disk storage.
  • NVM non-volatile memory
  • the memory may also be at least one storage device located away from the aforementioned processor.
  • the above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; or may be a digital signal processing (DSP), dedicated integration.
  • CPU central processing unit
  • NP network processor
  • DSP digital signal processing
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • the embodiment of the present application further provides a computer readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by the processor, the following steps are implemented:
  • Target information sent by the first client where the target information includes data to be stored
  • the information that the storage is successful is sent to the first client, so that the first client displays the information that the storage is successful;
  • the data to be stored that has been successfully stored is sent to the cloud storage system, so that the cloud storage system stores the data to be stored.
  • the target information sent by the first client is received, where the target information includes data to be stored, and the data to be stored is stored in the load access cluster where the local access server is located, and after the data to be stored is successfully stored,
  • the first client sends the information that the storage is successful, so that the first client displays the information that the storage is successful, and sends the stored data to be stored to the cloud storage system, so that the cloud storage system stores the data to be stored.
  • the information about the storage success is sent to the first client, and then the data to be stored that has been successfully stored is transferred to the cloud storage system, and the cloud storage system is stored again. Storing data. Since the time to store the data to be stored locally is much less than the time stored in the cloud storage system, the waiting time for the user to view the information stored successfully through the client is reduced, and the user experience is improved.
  • the step of storing the data to be stored in the load access cluster where the local access server is located includes:
  • the data to be stored is sent to the local access server corresponding to the first destination address, so that the local access server corresponding to the first destination address stores the data to be stored.
  • the step of storing the data to be stored to the local access server includes:
  • the data to be stored is stored in a solid state hard disk of the local access server.
  • the load access cluster includes multiple sets of local access servers, and after storing the data to be stored successfully, sending information about successful storage to the first client to enable the After the step of the first client displaying the information about the successful storage, the method further includes: before the step of transmitting the successfully stored data to be stored to the cloud storage system, the method further includes:
  • the data to be stored is copied to the determined other local access servers.
  • the method further includes:
  • the target information further includes request information, where the to-be-stored data that has been successfully stored is sent to the cloud storage system, so that the cloud storage system stores the to-be-stored data.
  • the method further includes:
  • the public key request information is sent to the local access server, and after receiving the preset public key fed back by the local access server, the preset public key pair is used.
  • the encrypted data to be stored stores the success information for decryption.
  • Target information sent by the first client where the target information includes data to be stored
  • the information that the storage is successful is sent to the first client, so that the first client displays the information that the storage is successful;
  • the data to be stored that has been successfully stored is sent to the cloud storage system, so that the cloud storage system stores the data to be stored.
  • the target information sent by the first client is received, where the target information includes data to be stored, and the data to be stored is stored in the load access cluster where the local access server is located, and after the data to be stored is successfully stored,
  • the first client sends the information that the storage is successful, so that the first client displays the information that the storage is successful, and sends the stored data to be stored to the cloud storage system, so that the cloud storage system stores the data to be stored.
  • the information about the storage success is sent to the first client, and then the data to be stored that has been successfully stored is transferred to the cloud storage system, and the cloud storage system is stored again. Storing data. Since the time to store the data to be stored locally is much less than the time stored in the cloud storage system, the waiting time for the user to view the information stored successfully through the client is reduced, and the user experience is improved.
  • the step of storing the data to be stored in the load access cluster where the local access server is located includes:
  • the data to be stored is sent to the local access server corresponding to the first destination address, so that the local access server corresponding to the first destination address stores the data to be stored.
  • the step of storing the data to be stored to the local access server includes:
  • the data to be stored is stored in a solid state hard disk of the local access server.
  • the load access cluster includes multiple sets of local access servers, and after storing the data to be stored successfully, sending information about successful storage to the first client to enable the After the step of the first client displaying the information about the successful storage, the method further includes: before the step of transmitting the successfully stored data to be stored to the cloud storage system, the method further includes:
  • the data to be stored is copied to the determined other local access servers.
  • the method further includes:
  • the target information further includes request information, where the to-be-stored data that has been successfully stored is sent to the cloud storage system, so that the cloud storage system stores the to-be-stored data.
  • the method further includes:
  • the public key request information is sent to the local access server, and after receiving the preset public key fed back by the local access server, the preset public key pair is used.
  • the encrypted data to be stored stores the success information for decryption.
  • a data reading method provided by the embodiment of the present application is introduced below.
  • a data reading method provided by an embodiment of the present application which is applied to a local access server, may include:
  • S301 Receive a data read request sent by the client, where the data read request includes identifier information of the data to be read.
  • a data read request including the identification information of the data to be read is sent to the target load access.
  • a local access server in the cluster that receives data read requests.
  • the process of sending a data read request by the client to the local access server is:
  • the client determines the address of the local access server corresponding to the target load access cluster according to the domain name of the target load accessing the cluster, and the correspondence between the domain name of the pre-stored load access cluster and the address of the local access server, and the data is obtained.
  • the read request is sent to the local access server corresponding to the determined address.
  • the domain name of the pre-stored load access cluster has a one-to-one correspondence with the address of the local access server. Therefore, only the local access server of the unique corresponding access server can be obtained only when the domain name of the target load access cluster is obtained.
  • the address that is, each load access cluster only provides a unique access entry.
  • the optimal local access server is first determined, and then the optimal local access server is used as an access portal. In this way, the speed of accessing the load access cluster is improved.
  • the client can directly determine the address of the local access server corresponding to the target load access cluster.
  • the first client needs to access the domain name and local access of the load access cluster.
  • the load access cluster corresponding to the address of the server sends the request information including the domain name of the target load access cluster to obtain the address of the local access server corresponding to the target load access cluster.
  • S302 Determine, according to the identifier information and the pre-stored index information table, whether the data to be read has been transferred to the cloud storage system, where the index information table stores the correspondence between the identifier information and the dump information.
  • the load access cluster When storing data, although the data is transferred to the cloud storage system through the load access cluster, when receiving the data read request sent by the client, the load access cluster does not necessarily have to transfer the data to the cloud storage system. After receiving the data read request sent by the client, it is necessary to determine whether the data to be read has been transferred to the cloud storage system.
  • the local access server stores the identifier information of the data and the corresponding dump information in the index information table. Therefore, the method for determining whether the data to be read has been transferred to the cloud storage system may be: according to the identifier information and pre-stored.
  • the index information table finds the dump information corresponding to the identifier information, and determines whether the data to be read has been transferred to the cloud storage server according to the found dump information.
  • the identifier information of the data to be read is sent to the cloud storage system, and the cloud storage system according to the received identification information and the pre-stored identification information and the storage location. Finding a storage location corresponding to the identification information, and then obtaining data to be read from the storage location, and feeding back the obtained data to be read to the local access server.
  • the local access server receives the data to be read fed back by the cloud storage system, and sends the received data to be read to the client, thereby completing the reading of the data to be read.
  • the data to be read is not transferred to the cloud storage system, the data to be read is found from itself according to the identification information, and the found data to be read is sent to the client.
  • the data read request sent by the client is received, and the data read request includes the identifier information of the data to be read, and according to the identifier information and the pre-stored index information table, it is determined whether the data to be read has been dumped.
  • the cloud storage system wherein the index information table stores the correspondence between the identifier information and the dump information, and if the data is transferred to the cloud storage system, the identifier information is sent to the cloud storage system, and the data to be read fed back by the cloud storage system is received. And send the received data to be read to the client.
  • the client after receiving the data read request sent by the client, determining whether the data to be read has been transferred to the cloud storage system, and if yes, requesting the cloud storage system to read the data, and receiving After the data to be read is fed back to the cloud storage system, the received data to be read is sent to the client, thereby completing reading the data to be read from the cloud storage system.
  • the steps S301-S303 are the same as those of FIG. 10, and before the step S302 of FIG. 10, the method may further include:
  • S302A Determine, according to the identifier information, a destination address corresponding to the data to be read.
  • the local access server that receives the data read request sent by the client and includes the identification information of the data to be read is not necessarily the data to be read.
  • the local access server is stored in the cloud storage system, so that after receiving the data read request sent by the client, the local access server needs to determine the target address corresponding to the data to be read, that is, determine to convert the data to be read.
  • the address of the local access server stored to the cloud storage system.
  • each local access server in the load access cluster stores a correspondence between a hash value and an address of the local access server. Therefore, the local access server receives the data read by the client. After the request is fetched, the hash value of the data to be read needs to be calculated according to the identification information of the data to be read.
  • step S302 After determining the destination address corresponding to the data to be read, it is necessary to further determine, according to the destination address, whether the local access server that transfers the data to be read to the cloud storage system is itself. Therefore, it is necessary to determine whether the destination address is local. The address of the access server is accessed, and if yes, step S302 is performed.
  • the data to be read is read by the local access server from the cloud storage system.
  • the steps S301-S303 are the same as those in FIG. 11, and after the determination in step S302B of FIG. 12 is negative, the method may further include:
  • S304 Send the identifier information to the local access server corresponding to the destination address, so that the local access server corresponding to the destination address searches for the data to be read according to the identifier information, and sends the found data to be read to the client.
  • the local access server that transfers the data to be read to the cloud storage system is not itself. In this case, the identification information needs to be sent to the local access server corresponding to the destination address. .
  • the local access server corresponding to the destination address After receiving the identification information, the local access server corresponding to the destination address can find the data to be read according to the identification information, and send the found data to be read to the client.
  • the process of the local access server corresponding to the destination address searching for the data to be read according to the identifier information, and sending the found data to be read to the client may be:
  • the local access server corresponding to the destination address determines, according to the identifier information and the pre-stored index information table, whether the data to be read has been transferred to the cloud storage system, where the index information table stores the correspondence between the identifier information and the dumped information. .
  • the identifier information is sent to the cloud storage system, and the data to be read fed back by the cloud storage system is received, and the received data to be read is sent to the client.
  • the data to be read is found from itself according to the identification information, and the found data to be read is sent to the client.
  • the identifier information is sent to the local access server corresponding to the destination address, and the local access server corresponding to the destination address is read from the cloud storage system. Read the data.
  • the process of reading data to be read by each module of the local access server is:
  • the client sends a data read request to the PS module
  • the PS module sends the identification information of the data to be read to the GMS module
  • the GMS module uses the hash algorithm to calculate the hash value of the data to be read according to the received identification information. Determining, according to the calculated hash value and the correspondence between the pre-stored hash value and the address of the local access server, the destination address of the local access server corresponding to the calculated hash value, that is, the data to be read Corresponding destination address. And the determined destination address is sent to the PS module.
  • the PS module determines whether the destination address is its own address. If it is its own address, the identification information of the data to be read is sent to the DSS module, and the DSS module determines whether the data to be read has been dumped according to the identification information and the pre-stored index information table. To the cloud storage system.
  • the DSS module sends the identification information to the DDS module, and the DDS module sends the identification information to the cloud storage system.
  • the cloud storage system finds the data to be read and will read the data.
  • the data is fed back to the DDS module, and the DDS module receives the data to be read fed back by the cloud storage system, and sends the data to be read to the DSS module, and the DSS module sends the data to be read to the PS module, and then the PS module is to be read.
  • the data is sent to the client.
  • the DSS module searches for the data to be read from itself according to the identification information, and sends the found data to be read to the PS module, and then the PS module sends the data to be read to the client. end.
  • the identifier information of the data to be read is sent to the DSS module, and the DSS module sends the received identifier information to the local access server corresponding to the destination address, so that the destination address corresponds to the local address.
  • the access server searches for the data to be read according to the identification information, and sends the found data to be read to the client.
  • the embodiment of the present application further provides a data reading device, which is applied to a local access server, and the device may include:
  • the second receiving module 1301 is configured to receive a data read request sent by the client, where the data read request includes identifier information of the data to be read;
  • the determining module 1302 is configured to determine, according to the identifier information and the pre-stored index information table, whether the data to be read has been transferred to the cloud storage system, where the index information table stores the identifier information and the rollover Correspondence of information;
  • the reading module 1303 is configured to send the identification information to the cloud storage system, receive the information to be read fed back by the cloud storage system, and receive the received data if the data is transferred to the cloud storage system.
  • the data to be read is sent to the client.
  • the data read request sent by the client is received, and the data read request includes the identifier information of the data to be read, and according to the identifier information and the pre-stored index information table, it is determined whether the data to be read has been dumped.
  • the cloud storage system wherein the index information table stores the correspondence between the identifier information and the dump information, and if the data is transferred to the cloud storage system, the identifier information is sent to the cloud storage system, and the data to be read fed back by the cloud storage system is received. And send the received data to be read to the client.
  • the client after receiving the data read request sent by the client, determining whether the data to be read has been transferred to the cloud storage system, and if yes, requesting the cloud storage system to read the data, and receiving After the data to be read is fed back to the cloud storage system, the received data to be read is sent to the client, thereby completing reading the data to be read from the cloud storage system.
  • the device may further include:
  • the destination address determining module is configured to determine, according to the identifier information, the determining, according to the identifier information, before determining whether the to-be-read data has been transferred to the cloud storage system according to the identifier information and the pre-stored index information table. Read the destination address corresponding to the data;
  • the self address determination module is configured to determine whether the destination address is an address of the local access server, and if yes, trigger the determining module.
  • the device may further include:
  • a locating module configured to send the identifier information to a local access server corresponding to the destination address, if the destination address is not the address of the local access server, so that the The local access server corresponding to the destination address searches for the data to be read according to the identifier information, and sends the found data to be read to the client.
  • the embodiment of the present application further provides an electronic device, as shown in FIG. 14, comprising: a processor 1401 and a memory 1402, wherein the memory 1402 is configured to store a program code;
  • the processor 1401 is configured to: when executing the program code stored on the memory, implement the following steps:
  • the index information table stores a correspondence between the identifier information and the dump information
  • the data read request sent by the client is received, and the data read request includes the identifier information of the data to be read, and according to the identifier information and the pre-stored index information table, it is determined whether the data to be read has been dumped.
  • the cloud storage system wherein the index information table stores the correspondence between the identifier information and the dump information, and if the data is transferred to the cloud storage system, the identifier information is sent to the cloud storage system, and the data to be read fed back by the cloud storage system is received. And send the received data to be read to the client.
  • the client after receiving the data read request sent by the client, determining whether the data to be read has been transferred to the cloud storage system, and if yes, requesting the cloud storage system to read the data, and receiving After the data to be read is fed back to the cloud storage system, the received data to be read is sent to the client, thereby completing reading the data to be read from the cloud storage system.
  • the method before the step of determining whether the data to be read has been transferred to the cloud storage system according to the identifier information and the pre-stored index information table, the method further includes :
  • the step of determining whether the data to be read has been transferred to the cloud storage system is performed according to the identification information and the pre-stored index information table.
  • the method further includes:
  • the data to be read is sent, and the found data to be read is sent to the client.
  • processor 1401 when the processor 1401 is further configured to execute a computer program stored on the memory 1402, the following data storage method steps are implemented:
  • Target information sent by the first client where the target information includes data to be stored
  • the information that the storage is successful is sent to the first client, so that the first client displays the information that the storage is successful;
  • the data to be stored that has been successfully stored is sent to the cloud storage system, so that the cloud storage system stores the data to be stored.
  • the step of storing the data to be stored in the load access cluster where the local access server is located includes:
  • the data to be stored is sent to the local access server corresponding to the first destination address, so that the local access server corresponding to the first destination address stores the data to be stored.
  • the step of storing the data to be stored to the local access server includes:
  • the data to be stored is stored in a solid state hard disk of the local access server.
  • the load access cluster includes multiple sets of local access servers, and after storing the data to be stored successfully, sending information about successful storage to the first client to enable the After the step of the first client displaying the information about the successful storage, the method further includes: before the step of transmitting the successfully stored data to be stored to the cloud storage system, the method further includes:
  • the data to be stored is copied to the determined other local access servers.
  • the method further includes:
  • the target information further includes request information, where the to-be-stored data that has been successfully stored is sent to the cloud storage system, so that the cloud storage system stores the to-be-stored data.
  • the method further includes:
  • the public key request information is sent to the local access server, and after receiving the preset public key fed back by the local access server, the preset public key pair is used.
  • the encrypted data to be stored stores the success information for decryption.
  • the memory mentioned in the above electronic device may include a random access memory (RAM), and may also include a non-volatile memory (NVM), such as at least one disk storage.
  • NVM non-volatile memory
  • the memory may also be at least one storage device located away from the aforementioned processor.
  • the above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; or may be a digital signal processing (DSP), dedicated integration.
  • CPU central processing unit
  • NP network processor
  • DSP digital signal processing
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • the embodiment of the present application further provides a computer readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by the processor, the following steps are implemented:
  • the index information table stores a correspondence between the identifier information and the dump information
  • the data read request sent by the client is received, and the data read request includes the identifier information of the data to be read, and according to the identifier information and the pre-stored index information table, it is determined whether the data to be read has been dumped.
  • the cloud storage system wherein the index information table stores the correspondence between the identifier information and the dump information, and if the data is transferred to the cloud storage system, the identifier information is sent to the cloud storage system, and the data to be read fed back by the cloud storage system is received. And send the received data to be read to the client.
  • the client after receiving the data read request sent by the client, determining whether the data to be read has been transferred to the cloud storage system, and if yes, requesting the cloud storage system to read the data, and receiving After the data to be read is fed back to the cloud storage system, the received data to be read is sent to the client, thereby completing reading the data to be read from the cloud storage system.
  • the method before the step of determining whether the data to be read has been transferred to the cloud storage system according to the identifier information and the pre-stored index information table, the method further includes :
  • the step of determining whether the data to be read has been transferred to the cloud storage system is performed according to the identification information and the pre-stored index information table.
  • the method further includes:
  • the data to be read is sent, and the found data to be read is sent to the client.
  • Target information sent by the first client where the target information includes data to be stored
  • the information that the storage is successful is sent to the first client, so that the first client displays the information that the storage is successful;
  • the data to be stored that has been successfully stored is sent to the cloud storage system, so that the cloud storage system stores the data to be stored in an erasure code encoding manner.
  • the step of storing the data to be stored in the load access cluster where the local access server is located includes:
  • the data to be stored is sent to the local access server corresponding to the first destination address, so that the local access server corresponding to the first destination address stores the data to be stored.
  • the step of storing the data to be stored to the local access server includes:
  • the data to be stored is stored in a solid state hard disk of the local access server.
  • the load access cluster includes multiple sets of local access servers, and after storing the data to be stored successfully, sending information about successful storage to the first client to enable the After the step of the first client displaying the information about the successful storage, the method further includes: before the step of transmitting the successfully stored data to be stored to the cloud storage system, the method further includes:
  • the data to be stored is copied to the determined other local access servers.
  • the method further includes:
  • the target information further includes request information, where the to-be-stored data that has been successfully stored is sent to the cloud storage system, so that the cloud storage system stores the to-be-stored data.
  • the method further includes:
  • the public key request information is sent to the local access server, and after receiving the preset public key fed back by the local access server, the preset public key pair is used.
  • the encrypted data to be stored stores the success information for decryption.
  • the index information table stores a correspondence between the identifier information and the dump information
  • the data read request sent by the client is received, and the data read request includes the identifier information of the data to be read, and according to the identifier information and the pre-stored index information table, it is determined whether the data to be read has been dumped.
  • the cloud storage system wherein the index information table stores the correspondence between the identifier information and the dump information, and if the data is transferred to the cloud storage system, the identifier information is sent to the cloud storage system, and the data to be read fed back by the cloud storage system is received. And send the received data to be read to the client.
  • the client after receiving the data read request sent by the client, determining whether the data to be read has been transferred to the cloud storage system, and if yes, requesting the cloud storage system to read the data, and receiving After the data to be read is fed back to the cloud storage system, the received data to be read is sent to the client, thereby completing reading the data to be read from the cloud storage system.
  • the method before the step of determining whether the data to be read has been transferred to the cloud storage system according to the identifier information and the pre-stored index information table, the method further includes :
  • the step of determining whether the data to be read has been transferred to the cloud storage system is performed according to the identification information and the pre-stored index information table.
  • the method further includes:
  • the data to be read is sent, and the found data to be read is sent to the client.
  • Target information sent by the first client where the target information includes data to be stored
  • the information that the storage is successful is sent to the first client, so that the first client displays the information that the storage is successful;
  • the data to be stored that has been successfully stored is sent to the cloud storage system, so that the cloud storage system stores the data to be stored.
  • the step of storing the data to be stored in the load access cluster where the local access server is located includes:
  • the data to be stored is sent to the local access server corresponding to the first destination address, so that the local access server corresponding to the first destination address stores the data to be stored.
  • the step of storing the data to be stored to the local access server includes:
  • the data to be stored is stored in a solid state hard disk of the local access server.
  • the load access cluster includes multiple sets of local access servers, and after storing the data to be stored successfully, sending information about successful storage to the first client to enable the After the step of the first client displaying the information about the successful storage, the method further includes: before the step of transmitting the successfully stored data to be stored to the cloud storage system, the method further includes:
  • the data to be stored is copied to the determined other local access servers.
  • the method further includes:
  • the target information further includes request information, where the to-be-stored data that has been successfully stored is sent to the cloud storage system, so that the cloud storage system stores the to-be-stored data.
  • the method further includes:
  • the public key request information is sent to the local access server, and after receiving the preset public key fed back by the local access server, the preset public key pair is used.
  • the encrypted data to be stored stores the success information for decryption.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种数据存储、读取方法及装置,该方法中,接收第一客户端发送的目标信息,目标信息中包括待存储数据(S101),在本地存储待存储数据(S102),在本地存储待存储数据成功后,向第一客户端发送存储成功的信息以使第一客户端展示存储成功的信息(S103),将已存储成功的待存储数据发送至云存储系统,以使云存储系统存储待存储数据(S104)。该方法在将待存储数据成功存储在本地后,即向第一客户端发送存储成功的信息,然后再将已存储成功的待存储数据转存至云存储系统,云存储系统再存储待存储数据。由于将待存储数据直接存储在本地的时间远远少于存储在云存储系统的时间,因此,减少了用户通过客户端查看到存储成功的信息的等待时间,提高用户的体验。

Description

一种数据存储、读取方法及装置
本申请要求于2017年9月6日提交中国专利局、申请号为201710795265.9发明名称为“一种数据存储、读取方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及云存储技术领域,特别是涉及一种数据存储、读取方法及装置。
背景技术
目前,客户端存储数据至云存储系统的过程一般为:客户端发送待存储数据至云存储系统,云存储系统接收该待存储数据,对该待存储数据采用纠删码编码的方式进行存储,当存储成功后,向客户端发送存储成功的信息,客户端展示该存储成功的信息以使用户获知待存储数据已经存储成功。
其中,采用纠删码编码的方式对待存储数据进行存储的过程为:将待存储数据分割成数据片段,对各个数据片段进行编码,然后将编码后的数据片段存储在云存储系统的不同位置,例如:存储在云存储系统不同的存储节点中。
由于通过纠删码编码的方式进行存储需要对数据进行切片,再分别存储各个切片后的数据片段,由此,需要耗费较长的时间存储数据,使得用户通过客户端查看到存储成功的信息的等待时间较长,导致用户体验较差。
发明内容
本申请实施例的目的在于提供一种数据存储、读取方法及装置,以提高用户体验。具体技术方案如下:
为达上述目的,第一方面,本申请实施例提供了一种数据存储方法,应用于本地接入服务器,所述方法包括:
接收第一客户端发送的目标信息,所述目标信息中包括待存储数据;
在本地存储所述待存储数据;
在本地存储所述待存储数据成功后,向所述第一客户端发送存储成功的信息以使所述第一客户端展示所述存储成功的信息;
将已存储成功的待存储数据发送至云存储系统,以使所述云存储系统存 储所述待存储数据。
可选的,所述在本地存储所述待存储数据的步骤,包括:
根据所述待存储数据的标识信息,确定所述待存储数据对应的第一目的地址;
判断所述第一目的地址是否为所述本地接入服务器的地址;
如果是,将所述待存储数据存储至所述本地接入服务器;
如果否,将所述待存储数据发送至所述第一目的地址对应的本地接入服务器,以使所述第一目的地址对应的本地接入服务器存储所述待存储数据。
可选的,所述将所述待存储数据存储至所述本地接入服务器的步骤,包括:
将所述待存储数据存储至所述本地接入服务器的固态硬盘中。
可选的,所述负载接入集群包括多组本地接入服务器,在存储所述待存储数据成功后,向所述第一客户端发送存储成功的信息以使所述第一客户端展示所述存储成功的信息的步骤之后,在将已存储成功的待存储数据发送至云存储系统的步骤之前,所述方法还包括:
根据所述本地接入服务器的标识信息以及预先存储的分组信息,确定与所述本地接入服务器同组的其它本地接入服务器;
将所述待存储数据复制至所确定的其它本地接入服务器。
可选的,在所述将已存储成功的待存储数据发送至云存储系统,以使所述云存储系统存储所述待存储数据的步骤之后,所述方法还包括:
接收所述云存储系统发送的存储成功信息,删除所述负载接入集群中存储的所述待存储数据。
可选的,所述目标信息还包括请求信息,在所述将已存储成功的待存储数据发送至云存储系统,以使所述云存储系统存储所述待存储数据的步骤之后,所述方法还包括:
判断所述请求信息是否为反馈请求信息;
如果是,从所述请求信息中确定第二目的地址;
使用预设私钥对待存储数据存储成功信息进行加密,并发送加密的待存储数据存储成功信息至所述第二目的地址对应的第二客户端,以使所述第二客户端在接收到所述加密的待存储数据存储成功信息后,向所述本地接入服务器发送公钥请求信息,并在接收到所述本地接入服务器反馈的预设公钥后, 使用所述预设公钥对所述加密的待存储数据存储成功信息进行解密。
第二方面,本申请实施例提供了一种数据存储装置,应用于本地接入服务器,所述装置包括:
第一接收模块,用于接收第一客户端发送的目标信息,所述目标信息中包括待存储数据;
存储模块,用于在本地存储所述待存储数据;
发送模块,用于在本地存储所述待存储数据成功后,向所述第一客户端发送存储成功的信息以使所述第一客户端展示所述存储成功的信息;
转存模块,用于将已存储成功的待存储数据发送至云存储系统,以使所述云存储系统存储所述待存储数据。
可选的,所述存储模块,包括:
第一目的地址确定单元,用于根据所述待存储数据的标识信息,确定所述待存储数据对应的第一目的地址;
判断单元,用于判断所述第一目的地址是否为所述本地接入服务器的地址,如果是,触发第一存储单元,如果否,触发第二存储单元;
所述第一存储单元,用于将所述待存储数据存储至所述本地接入服务器;
所述第二存储单元,用于将所述待存储数据发送至所述第一目的地址对应的本地接入服务器,以使所述第一目的地址对应的本地接入服务器存储所述待存储数据。
可选的,所述第一存储单元,具体用于:
将所述待存储数据存储至所述本地接入服务器的固态硬盘中。
可选的,所述负载接入集群包括多组本地接入服务器,所述装置还包括:
其它本地接入服务器确定模块,用于在存储所述待存储数据成功后,向所述第一客户端发送存储成功的信息以使所述第一客户端展示所述存储成功的信息之后,在将已存储成功的待存储数据发送至云存储系统之前,根据所述本地接入服务器的标识信息以及预先存储的分组信息,确定与所述本地接入服务器同组的其它本地接入服务器;
复制模块,用于将所述待存储数据复制至所确定的其它本地接入服务器。
可选的,所述装置还包括:
删除模块,用于在将已存储成功的待存储数据发送至云存储系统,以使 所述云存储系统存储所述待存储数据后,接收所述云存储系统发送的存储成功信息,删除所述负载接入集群中存储的所述待存储数据。
可选的,所述目标信息还包括请求信息,所述装置还包括:
反馈请求信息判断模块,用于在将已存储成功的待存储数据发送至云存储系统,以使所述云存储系统存储所述待存储数据之后,判断所述请求信息是否为反馈请求信息,如果是,触发第二目的地址确定模块;
所述第二目的地址确定模块,用于从所述请求信息中确定第二目的地址;
加密模块,用于使用预设私钥对待存储数据存储成功信息进行加密,并发送加密的待存储数据存储成功信息至所述第二目的地址对应的第二客户端,以使所述第二客户端在接收到所述加密的待存储数据存储成功信息后,向所述本地接入服务器发送公钥请求信息,并在接收到所述本地接入服务器反馈的预设公钥后,使用所述预设公钥对所述加密的待存储数据存储成功信息进行解密。
第三方面,本申请实施例提供了一种数据读取方法,应用于本地接入服务器,所述方法包括:
接收客户端发送的数据读取请求,所述数据读取请求中包括待读取数据的标识信息;
根据所述标识信息以及预先存储的索引信息表,确定所述待读取数据是否已经转存至云存储系统,其中,所述索引信息表中存储有标识信息与转存信息的对应关系;
如果已转存至云存储系统,发送所述标识信息至所述云存储系统,接收所述云存储系统反馈的所述待读取数据,并将接收到的所述待读取数据发送至所述客户端。
可选的,在所述根据所述标识信息以及预先存储的索引信息表,确定所述待读取数据是否已经转存至云存储系统的步骤之前,所述方法还包括:
根据所述标识信息,确定所述待读取数据对应的目的地址;
判断所述目的地址是否为所述本地接入服务器的地址;
如果是,执行根据所述标识信息以及预先存储的索引信息表,确定所述待读取数据是否已经转存至云存储系统的步骤。
可选的,在所述判断所述目的地址是否为所述本地接入服务器的地址的步骤之后,所述方法还包括:
如果不为所述本地接入服务器的地址,发送所述标识信息至所述目的地址对应的本地接入服务器,以使所述目的地址对应的本地接入服务器根据所述标识信息查找到所述待读取数据,并将查找到的待读取数据发送至所述客户端。
第四方面,本申请实施例提供了一种数据读取装置,应用于本地接入服务器,所述装置包括:
第二接收模块,用于接收客户端发送的数据读取请求,所述数据读取请求中包括待读取数据的标识信息;
确定模块,用于根据所述标识信息以及预先存储的索引信息表,确定所述待读取数据是否已经转存至云存储系统,其中,所述索引信息表中存储有标识信息与转存信息的对应关系;
读取模块,用于如果已转存至云存储系统,发送所述标识信息至所述云存储系统,接收所述云存储系统反馈的所述待读取数据,并将接收到的所述待读取数据发送至所述客户端。
可选的,所述装置还包括:
目的地址确定模块,用于在所述根据所述标识信息以及预先存储的索引信息表,确定所述待读取数据是否已经转存至云存储系统之前,根据所述标识信息,确定所述待读取数据对应的目的地址;
自身地址判断模块,用于判断所述目的地址是否为所述本地接入服务器的地址,如果是,触发所述确定模块。
可选的,所述装置还包括:
查找模块,用于在判断所述目的地址是否为自身地址之后,如果不为所述本地接入服务器的地址,发送所述标识信息至所述目的地址对应的本地接入服务器,以使所述目的地址对应的本地接入服务器根据所述标识信息查找到所述待读取数据,并将查找到的待读取数据发送至所述客户端。
第五方面,本申请实施例提供了一种电子设备,包括处理器和存储器,其中,存储器,用于存放程序代码;
处理器,用于执行存储器上所存放的程序代码时,实现上述任一所述的数据存储方法步骤,和/或,实现上述任一所述的数据读取方法步骤。
第六方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述任一所述的数据存储方法步骤,和/或,实现上述任一所述的数据读取方法 步骤。
第七方面,本申请实施例提供了一种计算机程序,所述计算机程序用于在运行时执行上述任一所述的数据存储方法步骤,和/或,执行上述任一所述的数据读取方法步骤。
本申请实施例中,接收第一客户端发送的目标信息,目标信息中包括待存储数据,在本地接入服务器所在的负载接入集群中存储待存储数据,在存储待存储数据成功后,向第一客户端发送存储成功的信息以使第一客户端展示存储成功的信息,将已存储成功的待存储数据发送至云存储系统,以使云存储系统存储待存储数据。本申请中,在将待存储数据成功存储在本地后,即向第一客户端发送存储成功的信息,然后再将已存储成功的待存储数据转存至云存储系统,云存储系统再存储待存储数据。由于将待存储数据直接存储在本地的时间远远少于存储在云存储系统的时间,因此,减少了用户通过客户端查看到存储成功的信息的等待时间,提高了用户的体验。
附图说明
为了更清楚地说明本申请实施例和现有技术的技术方案,下面对实施例和现有技术中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施提供的负载接入集群的结构示意图;
图2为本申请实施提供的数据存储方法的第一种流程示意图;
图3为本申请实施提供的数据存储方法的第二种流程示意图;
图4为本申请实施提供的数据存储方法的第三种流程示意图;
图5为本申请实施提供的本地接入服务器的结构示意图;
图6为本申请实施提供的数据存储方法的第四种流程示意图;
图7为本申请实施提供的数据存储方法的第五种流程示意图;
图8为本申请实施提供的数据存储装置的结构示意图;
图9为本申请实施提供的电子设备的第一种结构示意图;
图10为本申请实施提供的数据读取方法的第一种流程示意图;
图11为本申请实施提供的数据读取方法的第二种流程示意图;
图12为本申请实施提供的数据读取方法的第三种流程示意图;
图13为本申请实施提供的数据读取装置的结构示意图;
图14为本申请实施提供的电子设备的第二种结构示意图。
具体实施方式
为使本申请的目的、技术方案、及优点更加清楚明白,以下参照附图并举实施例,对本申请进一步详细说明。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
为了解决现有技术问题,本申请实施例提供了一种数据存储、读取方法及装置。
需要说明的是,为了解决相关技术中的问题,如图1所示,本申请实施例预先在本地设置有多个负载接入集群,每个本地的负载接入集群中设置有多组本地接入服务器,每组中本地接入服务器的数量相同,且,各组之间会进行数据同步操作。
下面首先对本申请实施例所提供的一种数据存储方法进行介绍。
如图2所示,本申请实施例提供的一种数据存储方法,应用于本地接入服务器,可以包括:
S101:接收第一客户端发送的目标信息,目标信息中包括待存储数据。
当第一客户端需要通过某一目标负载接入集群存储数据至云存储系统时,会将包括待存储数据的目标信息发送至该目标负载接入集群中的某一本地接入服务器,该本地接入服务器接收该目标信息。
其中,第一客户端发送目标信息至该本地接入服务器的过程为:
第一客户端根据目标负载接入集群的域名,以及预先存储的负载接入集群的域名与本地接入服务器的地址的对应关系,确定目标负载接入集群对应的本地接入服务器的地址,并将目标信息发送至所确定的地址对应的本地接入服务器。
由于预先存储的负载接入集群的域名与本地接入服务器的地址是一一对应的关系,因此,在获知目标负载接入集群的域名的情况下,只可得到唯一对应的本地接入服务器的地址,即每个负载接入集群只提供了唯一的访问入口,相较于相关技术中,先确定出最优的本地接入服务器,然后再将该最优 的本地接入服务器作为访问入口的方式,提高了访问负载接入集群的速度。
另外,当预先存储的负载接入集群的域名与本地接入服务器的地址的对应关系存储在第一客户端时,第一客户端可直接确定目标负载接入集群对应的本地接入服务器的地址。
当预先存储的负载接入集群的域名与本地接入服务器的地址的对应关系存储在某一负载接入集群中时,第一客户端需要向存储有该负载接入集群的域名与本地接入服务器的地址的对应关系的负载接入集群发送包含目标负载接入集群的域名的请求信息,以获得目标负载接入集群对应的本地接入服务器的地址。
S102:在本地存储待存储数据。
当本地接入服务器接收到第一客户端发送的目标信息后,即在本地存储该目标信息中所包括的待存储数据,此处本地即为本地接入服务器所在的负载接入集群。
S103:在本地存储待存储数据成功后,向第一客户端发送存储成功的信息以使第一客户端展示存储成功的信息。
当在本地存储待存储数据成功后,立即向第一客户端发送存储成功的信息,第一客户端接收到该存储成功的信息后,即可展示该存储成功的信息,以使用户获知存储待存储数据成功。
S104:将已存储成功的待存储数据发送至云存储系统,以使云存储系统存储待存储数据。
由于存储待存储数据成功只是将待存储数据存储在本地的负载接入集群中成功,为了将待存储数据存储至云存储系统中,在本地存储待存储数据成功后,还需要将已存储成功的待存储数据发送至云存储系统。
云存储系统接收到待存储数据后,可以采用纠删码编码的方式存储待存储数据,其中,云存储系统采用纠删码编码的方式存储待存储数据的过程为:将待存储数据分割成数据片段,对各个数据片段进行编码,然后将编码后的数据片段存储在云存储系统的不同位置。
由此,实现了数据的分级存储,其中,分级存储是指:数据先存储在本地的负载接入集群中,然后再转存至云存储系统中。
需要说明的是,可以在将待存储数据存储在负载接入集群中成功后,立刻将待存储数据发送至云存储系统,也可以在负载接入集群空闲时,再将待存储数据发送至云存储系统,这都是合理的。
本申请实施例中,接收第一客户端发送的目标信息,目标信息中包括待存储数据,在本地接入服务器所在的负载接入集群中存储待存储数据,在存储待存储数据成功后,向第一客户端发送存储成功的信息以使第一客户端展示存储成功的信息,将已存储成功的待存储数据发送至云存储系统,以使云存储系统存储待存储数据。本申请中,在将待存储数据成功存储在本地后,即向第一客户端发送存储成功的信息,然后再将已存储成功的待存储数据转存至云存储系统,云存储系统再存储待存储数据。由于将待存储数据直接存储在本地的时间远远少于存储在云存储系统的时间,因此,减少了用户通过客户端查看到存储成功的信息的等待时间,提高了用户的体验。
在图2所示方法基础上,如图3所示,其中,步骤S101、S103与S104均与图2相同,图3中的步骤S102可以包括:
S1021:根据待存储数据的标识信息,确定待存储数据对应的第一目的地址。
由于每个负载接入集群提供唯一的访问入口,因此,接收到第一客户端发送的目标信息的本地接入服务器不一定是待存储数据所要存储的位置,使得当本地接入服务器接收到第一客户端发送的目标信息后,需要确定待存储数据对应的第一目的地址。
其中,根据待存储数据的标识信息,确定待存储数据对应的第一目的地址的方式有多种,包括但不限于以下几种方式:
第一种方式:利用标识信息与存储地址的对应关系确定第一目的地址。
负载接入集群中的每个本地接入服务器中均存储有标识信息与本地接入服务器的地址的对应关系,因此,在本地接入服务器接收到第一客户端发送的目标信息后,可以根据待存储数据的标识信息,以及预先存储的标识信息与存储地址的对应关系,确定待存储数据对应的第一目的地址,其中,标识信息可以为类型信息。
第二种方式:利用哈希值确定第一目的地址。
负载接入集群中的每个本地接入服务器中均存储有哈希值与本地接入服务器的地址的对应关系,因此,在本地接入服务器接收到第一客户端发送的目标信息后,可以根据待存储数据的标识信息,利用哈希算法,计算该待存储数据的哈希值。
在计算出哈希值后,根据所计算出的哈希值以及预先存储的哈希值与本地接入服务器的地址的对应关系,确定所计算出的哈希值对应的本地接入服 务器的第一目的地址,即待存储数据对应的第一目的地址。
S1022:判断第一目的地址是否为本地接入服务器的地址,如果是,执行步骤S1023,如果否,执行步骤S1024。
在确定出待存储数据对应的第一目的地址后,需要进一步根据该第一目的地址确定待存储数据所要存储的位置是否为本地接入服务器,因此,需要判断第一目的地址是否为本地接入服务器的地址,并根据判断结果,执行后续步骤。
S1023:将待存储数据存储至本地接入服务器。
当判断第一目的地址为本地接入服务器的地址时,说明待存储数据所要存储的位置为自身,即接收到第一客户端发送的目标信息的本地接入服务器,此时,即可将待存储数据存储至本地接入服务器。
其中,将待存储数据存储至本地接入服务器,可以包括:
将待存储数据存储至本地接入服务器的固态硬盘中。
由于固态硬盘的存储速率高于普通硬盘,因此,为了进一步提高数据存储速度,可以将待存储数据存储至本地接入服务器的固态硬盘中。
S1024:将待存储数据发送至第一目的地址对应的本地接入服务器,以使第一目的地址对应的本地接入服务器存储待存储数据。
当判断第一目的地址不为本地接入服务器的地址时,说明待存储数据所要存储的位置不为自身,即不为接收到第一客户端发送的目标信息的本地接入服务器,此时,需要将待存储数据发送至第一目的地址对应的本地接入服务器。
第一目的地址对应的本地接入服务器接收到待存储数据后,存储待存储数据。
其中,第一目的地址对应的本地接入服务器接收到待存储数据后,存储待存储数据,可以包括:
第一目的地址对应的本地接入服务器接收到待存储数据后,将待存储数据存储至第一目的地址对应的本地接入服务器的固态硬盘中。
由此,通过将待存储数据存储至固态硬盘的方式,提高了数据存储速度。
本申请实施例中,当第一目的地址为本地接入服务器的地址时,将待存储数据存储至本地接入服务器,当第一目的地址不为本地接入服务器的地址时,将待存储数据存储至第一目的地址对应的本地接入服务器,由此,将待 存储数据存储至本地的负载接入集群中。
负载接入集群包括多组本地接入服务器,在图3所示方法基础上,如图4所示,其中,步骤S101-S104均与图3相同,在图4的步骤S103之后,步骤S104之前,还可以包括:
S103A:根据本地接入服务器的标识信息以及预先存储的分组信息,确定与本地接入服务器同组的其它本地接入服务器。
为了防止在将待存储数据存储在本地接入服务器中,还未转存至云存储系统中时,该待存储数据丢失,可对该待存储数据进行副本存储。
由于每个负载接入集群中设置有多组本地接入服务器,因此,对该待存储数据进行副本存储的方式可以为同组复制,即将该待存储数据复制至同组内的其它本地接入服务器。
由于在每个负载接入集群中设置多组本地接入服务器完成后,即会在每个本地接入服务器中存储分组信息,其中,分组信息包括所有的本地接入服务器的标识信息与组别的对应关系,例如:本地接入服务器1、2和3对应组别A,本地接入服务器4和5对应组别B。
因此,在将待存储数据存储至本地接入服务器后,即可根据本地接入服务器的标识信息以及预先存储的分组信息,确定与本地接入服务器同组的其它本地接入服务器。
S103B:将待存储数据复制至所确定的其它本地接入服务器。
在确定了与本地接入服务器同组的其它本地接入服务器后,即可将待存储数据复制至所确定的其它本地接入服务器,其它本地接入服务器接收到复制的待存储数据后,分别存储所复制的待存储数据。
由此,完成了该待存储数据的副本存储,使得即使本地接入服务器中的待存储数据丢失,也可以从同组的其它本地接入服务器中获取该待存储数据并转存至云存储系统。
例如:假设本地接入服务器的标识信息为1,预先存储的分组信息为:本地接入服务器1、2和3对应组别A,本地接入服务器4和5对应组别B,待存储数据为M;
根据本地接入服务器的标识信息1以及预先存储的分组信息,确定与本地接入服务器1同组的其它本地接入服务器为:本地接入服务器2和3;
将待存储数据M复制至所确定的其它本地接入服务器2和3;
本地接入服务器2接收到所复制的待存储数据M,存储所复制的待存储数 据M,本地接入服务器3接收到所复制的待存储数据M,存储所复制的待存储数据M。
由此,通过将该待存储数据复制至与本地接入服务器同组的其它本地接入服务器的方式,防止在将待存储数据存储在本地接入服务器中,还未转存至云存储系统中时,该待存储数据丢失而导致的无法转存至云存储系统的情况的发生。
下面从本地接入服务器所包括的模块组成的角度对本申请实施例进行详细介绍:
如图5所示,本地接入服务器包括PS模块、DSS模块、DDS模块、replicator模块和GMS模块,其中,PS模块为代理服务模块,用于对外提供云存储协议服务,例如:阿里OSS对象存储协议服务、亚马逊S3对象存储协议服务。
DSS模块为数据存储/读取服务模块,用于存储/读取数据;DDS模块为数据转存服务模块,用于将数据从本地转存至云存储系统;replicator模块为数据复制模块,用于将本地的数据复制至其他本地接入服务器中;GMS模块为接入组管理服务模块,用于根据待存储数据的标识信息进行哈西计算,确定待存储数据所要存储的位置。
通过本地接入服务器的各个模块对待存储数据进行存储的过程为:
第一客户端发送目标信息至PS模块,PS模块将待存储数据的标识信息发送至GMS模块,GMS模块根据接收到的标识信息,利用哈希算法,计算出待存储数据的哈希值,根据所计算出的哈希值以及预先存储的哈希值与本地接入服务器的地址的对应关系,确定所计算出的哈希值对应的本地接入服务器的第一目的地址,即待存储数据对应的第一目的地址。并将所确定出的第一目的地址发送至PS模块。
PS模块判断第一目的地址是否为自身地址,如果是,将待存储数据发送至DSS模块,DSS模块存储接收到的待存储数据,并将待存储数据发送至replicator模块,replicator模块向GMS模块发送获取同组其他本地接入服务器的请求,GMS模块将同组其他本地接入服务器的地址发送至replicator模块,replicator模块将待存储数据复制至同组的其它本地接入服务器,以使其它本地接入服务器分别存储所复制的待存储数据。
如果PS模块判断第一目的地址不为本地接入服务器的地址,将待存储数据发送至DSS模块,DSS模块将接收到的待存储数据发送至第一目的地址对应的的本地接入服务器,以使第一目的地址对应的本地接入服务器存储待存储数据。
在本地存储待存储数据成功后,DSS模块向PS模块发送存储成功的消息, PS模块向第一客户端发送存储成功的信息以使第一客户端展示存储成功的信息,然后DSS模块将已存储成功的待存储数据发送至DDS模块,DDS模块将接收到的已存储成功的待存储数据转存至云存储系统。
在图2所示方法基础上,如图6所示,其中,步骤S101-S104均与图2相同,在图6的步骤S104之后,还可以包括:
S105:接收云存储系统发送的存储成功信息,删除负载接入集群中存储的待存储数据。
在将已存储在负载接入集群中的待存储数据转存至云存储系统后,云存储系统存储待存储数据,并在存储成功后,发送存储成功信息至本地接入服务器。
为了节省负载接入集群的存储空间,本地接入服务器在接收到云存储系统发送的存储成功信息后,即可删除负载接入集群中存储的待存储数据。
如果待存储数据存储在本地接入服务器中,则删除存储在本地接入服务器中的待存储数据;如果待存储数据存储在第一目的地址对应的本地接入服务器中,则删除存储在第一目的地址对应的本地接入服务器中的待存储数据。
另外,在待存储数据复制至同组的其它本地接入服务器的情况下,还需要删除复制在其它本地接入服务器中的待存储数据。
由于有时会存在第二客户端委托第一客户端将目标信息通过某一目标负载接入集群存储数据至云存储系统的情况,此时,第二客户端会要求第一客户端在存储待存储数据成功后,通知自身已存储成功,因此,目标信息还可以包括请求信息,因此,在图2所示方法的基础上,如图7所示,其中,步骤S101-S104均与图2相同,在图7的步骤S104之后,还可以包括:
S106:判断请求信息是否为反馈请求信息,如果是,执行步骤S107,如果否,不做任何处理。
为了获知存储待存储数据成功后,是否需要反馈存储成功信息,在将已存储成功的待存储数据转存至云存储系统之后,需要判断请求信息是否为反馈请求信息,并根据判断结果执行后续步骤。
S107:从请求信息中确定第二目的地址。
由于第二客户端委托第一客户端进行数据存储,因此,为了使本地接入服务器获知在存储待存储数据成功后通知哪一个客户端,请求信息中包含第二客户端的第二目的地址。
当判断请求信息为反馈请求信息时,说明存储待存储数据成功后,需要反馈存储成功信息。为了向进行委托的客户端反馈存储成功信息,需要从请求信息中确定进行委托的第二客户端的第二目的地址。
S108:使用预设私钥对待存储数据存储成功信息进行加密,并发送加密的待存储数据存储成功信息至第二目的地址对应的第二客户端,以使第二客户端在接收到加密的待存储数据存储成功信息后,向本地接入服务器发送公钥请求信息,并在接收到本地接入服务器反馈的预设公钥后,使用预设公钥对加密的待存储数据存储成功信息进行解密。
为了防止在向第二客户端反馈待存储数据存储成功信息时被恶意程序截取,需要对待存储数据存储成功信息进行加密。
由于本地接入服务器会根据预设的加密规则生成预设私钥和预设公钥,预设私钥用于加密,预设公钥用于解密,因此,在发送待存储数据存储成功信息之前,可以使用预设私钥对待存储数据存储成功信息进行加密,并发送加密的待存储数据存储成功信息至第二目的地址对应的第二客户端。
第二客户端在接收到加密的待存储数据存储成功信息后,为了打开接收到的信息,需要向本地接入服务器发送公钥请求信息,本地接入服务器在接收到公钥请求信息后,将预设公钥发送至第二客户端,第二客户端在接收到本地接入服务器反馈的预设公钥后,使用预设公钥对加密的待存储数据存储成功信息进行解密,由此,获知待存储数据已存储成功。
需要说明的是,当预设私钥或预设公钥被泄露后,本地接入服务器会重新生成预设私钥和预设公钥,替换已泄露的预设私钥或预设公钥,由此,保证了被加密信息的安全。
相对于上述方法实施例,如图8所示,本申请实施例还提供了一种数据存储装置,应用于本地接入服务器,所述装置包括:
第一接收模块201,用于接收第一客户端发送的目标信息,所述目标信息中包括待存储数据;
存储模块202,用于在所述本地接入服务器所在的负载接入集群中存储所述待存储数据;
发送模块203,用于在存储所述待存储数据成功后,向所述第一客户端发送存储成功的信息以使所述第一客户端展示所述存储成功的信息;
转存模块204,用于将已存储成功的待存储数据发送至云存储系统,以使所述云存储系统存储所述待存储数据。
本申请实施例中,接收第一客户端发送的目标信息,目标信息中包括待 存储数据,在本地接入服务器所在的负载接入集群中存储待存储数据,在存储待存储数据成功后,向第一客户端发送存储成功的信息以使第一客户端展示存储成功的信息,将已存储成功的待存储数据发送至云存储系统,以使云存储系统存储待存储数据。本申请中,在将待存储数据成功存储在本地后,即向第一客户端发送存储成功的信息,然后再将已存储成功的待存储数据转存至云存储系统,云存储系统再存储待存储数据。由于将待存储数据直接存储在本地的时间远远少于存储在云存储系统的时间,因此,减少了用户通过客户端查看到存储成功的信息的等待时间,提高了用户的体验。
在本申请的一种实现方式中,所述存储模块202,可以包括:
第一目的地址确定单元,用于根据所述待存储数据的标识信息,确定所述待存储数据对应的第一目的地址;
判断单元,用于判断所述第一目的地址是否为所述本地接入服务器的地址,如果是,触发第一存储单元,如果否,触发第二存储单元;
所述第一存储单元,用于将所述待存储数据存储至所述本地接入服务器;
所述第二存储单元,用于将所述待存储数据发送至所述第一目的地址对应的本地接入服务器,以使所述第一目的地址对应的本地接入服务器存储所述待存储数据。
在本申请的一种实现方式中,所述第一存储单元,可以具体用于:
将所述待存储数据存储至所述本地接入服务器的固态硬盘中。
在本申请的一种实现方式中,所述负载接入集群包括多组本地接入服务器,所述装置还可以包括:
其它本地接入服务器确定模块,用于在存储所述待存储数据成功后,向所述第一客户端发送存储成功的信息以使所述第一客户端展示所述存储成功的信息之后,在将已存储成功的待存储数据发送至云存储系统之前,根据所述本地接入服务器的标识信息以及预先存储的分组信息,确定与所述本地接入服务器同组的其它本地接入服务器;
复制模块,用于将所述待存储数据复制至所确定的其它本地接入服务器。
在本申请的一种实现方式中,所述装置还可以包括:
删除模块,用于在将已存储成功的待存储数据发送至云存储系统,以使所述云存储系统存储所述待存储数据后,接收所述云存储系统发送的存储成功信息,删除所述负载接入集群中存储的所述待存储数据。
在本申请的一种实现方式中,所述目标信息还包括请求信息,所述装置 还可以包括:
反馈请求信息判断模块,用于在将已存储成功的待存储数据发送至云存储系统,以使所述云存储系统存储所述待存储数据之后,判断所述请求信息是否为反馈请求信息,如果是,触发第二目的地址确定模块;
所述第二目的地址确定模块,用于从所述请求信息中确定第二目的地址;
加密模块,用于使用预设私钥对待存储数据存储成功信息进行加密,并发送加密的待存储数据存储成功信息至所述第二目的地址对应的第二客户端,以使所述第二客户端在接收到所述加密的待存储数据存储成功信息后,向所述本地接入服务器发送公钥请求信息,并在接收到所述本地接入服务器反馈的预设公钥后,使用所述预设公钥对所述加密的待存储数据存储成功信息进行解密。
本申请实施例还提供了一种电子设备,如图9所示,包括:处理器901和存储器902,其中,存储器902,用于存放程序代码;
处理器901,用于执行存储器902上所存放的程序代码时,实现如下步骤:
接收第一客户端发送的目标信息,所述目标信息中包括待存储数据;
在所述本地接入服务器所在的负载接入集群中存储所述待存储数据;
在存储所述待存储数据成功后,向所述第一客户端发送存储成功的信息以使所述第一客户端展示所述存储成功的信息;
将已存储成功的待存储数据发送至云存储系统,以使所述云存储系统存储所述待存储数据。
本申请实施例中,接收第一客户端发送的目标信息,目标信息中包括待存储数据,在本地接入服务器所在的负载接入集群中存储待存储数据,在存储待存储数据成功后,向第一客户端发送存储成功的信息以使第一客户端展示存储成功的信息,将已存储成功的待存储数据发送至云存储系统,以使云存储系统存储待存储数据。本申请中,在将待存储数据成功存储在本地后,即向第一客户端发送存储成功的信息,然后再将已存储成功的待存储数据转存至云存储系统,云存储系统再存储待存储数据。由于将待存储数据直接存储在本地的时间远远少于存储在云存储系统的时间,因此,减少了用户通过客户端查看到存储成功的信息的等待时间,提高了用户的体验。
在本申请的一种实现方式中,所述在所述本地接入服务器所在的负载接入集群中存储所述待存储数据的步骤,包括:
根据所述待存储数据的标识信息,确定所述待存储数据对应的第一目的地址;
判断所述第一目的地址是否为所述本地接入服务器的地址;
如果是,将所述待存储数据存储至所述本地接入服务器;
如果否,将所述待存储数据发送至所述第一目的地址对应的本地接入服务器,以使所述第一目的地址对应的本地接入服务器存储所述待存储数据。
在本申请的一种实现方式中,所述将所述待存储数据存储至所述本地接入服务器的步骤,包括:
将所述待存储数据存储至所述本地接入服务器的固态硬盘中。
在本申请的一种实现方式中,所述负载接入集群包括多组本地接入服务器,在存储所述待存储数据成功后,向所述第一客户端发送存储成功的信息以使所述第一客户端展示所述存储成功的信息的步骤之后,在将已存储成功的待存储数据发送至云存储系统的步骤之前,所述方法还包括:
根据所述本地接入服务器的标识信息以及预先存储的分组信息,确定与所述本地接入服务器同组的其它本地接入服务器;
将所述待存储数据复制至所确定的其它本地接入服务器。
在本申请的一种实现方式中,在所述将已存储成功的待存储数据发送至云存储系统,以使所述云存储系统存储所述待存储数据的步骤之后,所述方法还包括:
接收所述云存储系统发送的存储成功信息,删除所述负载接入集群中存储的所述待存储数据。
在本申请的一种实现方式中,所述目标信息还包括请求信息,在所述将已存储成功的待存储数据发送至云存储系统,以使所述云存储系统存储所述待存储数据的步骤之后,所述方法还包括:
判断所述请求信息是否为反馈请求信息;
如果是,从所述请求信息中确定第二目的地址;
使用预设私钥对待存储数据存储成功信息进行加密,并发送加密的待存储数据存储成功信息至所述第二目的地址对应的第二客户端,以使所述第二客户端在接收到所述加密的待存储数据存储成功信息后,向所述本地接入服务器发送公钥请求信息,并在接收到所述本地接入服务器反馈的预设公钥后,使用所述预设公钥对所述加密的待存储数据存储成功信息进行解密。
上述电子设备提到的存储器可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。
上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital Signal Processing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。
本申请实施例还提供了一种计算机可读存储介质,所述存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现如下步骤:
接收第一客户端发送的目标信息,所述目标信息中包括待存储数据;
在所述本地接入服务器所在的负载接入集群中存储所述待存储数据;
在存储所述待存储数据成功后,向所述第一客户端发送存储成功的信息以使所述第一客户端展示所述存储成功的信息;
将已存储成功的待存储数据发送至云存储系统,以使所述云存储系统存储所述待存储数据。
本申请实施例中,接收第一客户端发送的目标信息,目标信息中包括待存储数据,在本地接入服务器所在的负载接入集群中存储待存储数据,在存储待存储数据成功后,向第一客户端发送存储成功的信息以使第一客户端展示存储成功的信息,将已存储成功的待存储数据发送至云存储系统,以使云存储系统存储待存储数据。本申请中,在将待存储数据成功存储在本地后,即向第一客户端发送存储成功的信息,然后再将已存储成功的待存储数据转存至云存储系统,云存储系统再存储待存储数据。由于将待存储数据直接存储在本地的时间远远少于存储在云存储系统的时间,因此,减少了用户通过客户端查看到存储成功的信息的等待时间,提高了用户的体验。
在本申请的一种实现方式中,所述在本地接入服务器所在的负载接入集群中存储所述待存储数据的步骤,包括:
根据所述待存储数据的标识信息,确定所述待存储数据对应的第一目的地址;
判断所述第一目的地址是否为所述本地接入服务器的地址;
如果是,将所述待存储数据存储至所述本地接入服务器;
如果否,将所述待存储数据发送至所述第一目的地址对应的本地接入服务器,以使所述第一目的地址对应的本地接入服务器存储所述待存储数据。
在本发明的一种实现方式中,所述将所述待存储数据存储至所述本地接入服务器的步骤,包括:
将所述待存储数据存储至所述本地接入服务器的固态硬盘中。
在本申请的一种实现方式中,所述负载接入集群包括多组本地接入服务器,在存储所述待存储数据成功后,向所述第一客户端发送存储成功的信息以使所述第一客户端展示所述存储成功的信息的步骤之后,在将已存储成功的待存储数据发送至云存储系统的步骤之前,所述方法还包括:
根据所述本地接入服务器的标识信息以及预先存储的分组信息,确定与所述本地接入服务器同组的其它本地接入服务器;
将所述待存储数据复制至所确定的其它本地接入服务器。
在本申请的一种实现方式中,在所述将已存储成功的待存储数据发送至云存储系统,以使所述云存储系统存储所述待存储数据的步骤之后,所述方法还包括:
接收所述云存储系统发送的存储成功信息,删除所述负载接入集群中存储的所述待存储数据。
在本申请的一种实现方式中,所述目标信息还包括请求信息,在所述将已存储成功的待存储数据发送至云存储系统,以使所述云存储系统存储所述待存储数据的步骤之后,所述方法还包括:
判断所述请求信息是否为反馈请求信息;
如果是,从所述请求信息中确定第二目的地址;
使用预设私钥对待存储数据存储成功信息进行加密,并发送加密的待存储数据存储成功信息至所述第二目的地址对应的第二客户端,以使所述第二客户端在接收到所述加密的待存储数据存储成功信息后,向所述本地接入服务器发送公钥请求信息,并在接收到所述本地接入服务器反馈的预设公钥后,使用所述预设公钥对所述加密的待存储数据存储成功信息进行解密。
本申请实施例还提供了一种计算机程序,所述计算机程序用于在运行时执行实现如下步骤:
接收第一客户端发送的目标信息,所述目标信息中包括待存储数据;
在所述本地接入服务器所在的负载接入集群中存储所述待存储数据;
在存储所述待存储数据成功后,向所述第一客户端发送存储成功的信息以使所述第一客户端展示所述存储成功的信息;
将已存储成功的待存储数据发送至云存储系统,以使所述云存储系统存储所述待存储数据。
本申请实施例中,接收第一客户端发送的目标信息,目标信息中包括待存储数据,在本地接入服务器所在的负载接入集群中存储待存储数据,在存储待存储数据成功后,向第一客户端发送存储成功的信息以使第一客户端展示存储成功的信息,将已存储成功的待存储数据发送至云存储系统,以使云存储系统存储待存储数据。本申请中,在将待存储数据成功存储在本地后,即向第一客户端发送存储成功的信息,然后再将已存储成功的待存储数据转存至云存储系统,云存储系统再存储待存储数据。由于将待存储数据直接存储在本地的时间远远少于存储在云存储系统的时间,因此,减少了用户通过客户端查看到存储成功的信息的等待时间,提高了用户的体验。
在本申请的一种实现方式中,所述在本地接入服务器所在的负载接入集群中存储所述待存储数据的步骤,包括:
根据所述待存储数据的标识信息,确定所述待存储数据对应的第一目的地址;
判断所述第一目的地址是否为所述本地接入服务器的地址;
如果是,将所述待存储数据存储至所述本地接入服务器;
如果否,将所述待存储数据发送至所述第一目的地址对应的本地接入服务器,以使所述第一目的地址对应的本地接入服务器存储所述待存储数据。
在本发明的一种实现方式中,所述将所述待存储数据存储至所述本地接入服务器的步骤,包括:
将所述待存储数据存储至所述本地接入服务器的固态硬盘中。
在本申请的一种实现方式中,所述负载接入集群包括多组本地接入服务器,在存储所述待存储数据成功后,向所述第一客户端发送存储成功的信息以使所述第一客户端展示所述存储成功的信息的步骤之后,在将已存储成功的待存储数据发送至云存储系统的步骤之前,所述方法还包括:
根据所述本地接入服务器的标识信息以及预先存储的分组信息,确定与所述本地接入服务器同组的其它本地接入服务器;
将所述待存储数据复制至所确定的其它本地接入服务器。
在本申请的一种实现方式中,在所述将已存储成功的待存储数据发送至 云存储系统,以使所述云存储系统存储所述待存储数据的步骤之后,所述方法还包括:
接收所述云存储系统发送的存储成功信息,删除所述负载接入集群中存储的所述待存储数据。
在本申请的一种实现方式中,所述目标信息还包括请求信息,在所述将已存储成功的待存储数据发送至云存储系统,以使所述云存储系统存储所述待存储数据的步骤之后,所述方法还包括:
判断所述请求信息是否为反馈请求信息;
如果是,从所述请求信息中确定第二目的地址;
使用预设私钥对待存储数据存储成功信息进行加密,并发送加密的待存储数据存储成功信息至所述第二目的地址对应的第二客户端,以使所述第二客户端在接收到所述加密的待存储数据存储成功信息后,向所述本地接入服务器发送公钥请求信息,并在接收到所述本地接入服务器反馈的预设公钥后,使用所述预设公钥对所述加密的待存储数据存储成功信息进行解密。
下面对本申请实施例所提供的一种数据读取方法进行介绍。
如图10所示,本申请实施例提供的一种数据读取方法,应用于本地接入服务器,可以包括:
S301:接收客户端发送的数据读取请求,数据读取请求中包括待读取数据的标识信息。
在数据已经通过目标负载接入集群存储到云存储系统之后,当客户端想要读取已存储的数据时,会发送包括待读取数据的标识信息的数据读取请求至该目标负载接入集群中的某一本地接入服务器,该本地接入服务器接收数据读取请求。
其中,客户端发送数据读取请求至该本地接入服务器的过程为:
客户端根据目标负载接入集群的域名,以及预先存储的负载接入集群的域名与本地接入服务器的地址的对应关系,确定目标负载接入集群对应的本地接入服务器的地址,并将数据读取请求发送至所确定的地址对应的本地接入服务器。
由于预先存储的负载接入集群的域名与本地接入服务器的地址是一一对应的关系,因此,在获知目标负载接入集群的域名的情况下,只可得到唯一对应的本地接入服务器的地址,即每个负载接入集群只提供了唯一的访问入 口,相较于相关技术中,先确定出最优的本地接入服务器,然后再将该最优的本地接入服务器作为访问入口的方式,提高了访问负载接入集群的速度。
另外,当预先存储的负载接入集群的域名与本地接入服务器的地址的对应关系存储在客户端时,客户端可直接确定目标负载接入集群对应的本地接入服务器的地址。
当预先存储的负载接入集群的域名与本地接入服务器的地址的对应关系存储在某一负载接入集群中时,第一客户端需要向存储有该负载接入集群的域名与本地接入服务器的地址的对应关系的负载接入集群发送包含目标负载接入集群的域名的请求信息,以获得目标负载接入集群对应的本地接入服务器的地址。
S302:根据标识信息以及预先存储的索引信息表,确定待读取数据是否已经转存至云存储系统,其中,索引信息表中存储有标识信息与转存信息的对应关系。
在存储数据时,虽然是通过负载接入集群转存数据至云存储系统,但是在接收到客户端发送的数据读取请求时,负载接入集群未必已将数据转存至云存储系统,因此,在接收到客户端发送的数据读取请求后,需要确定待读取数据是否已经转存至云存储系统。
由于本地接入服务器会将数据的标识信息以及对应的转存信息存储至索引信息表中,因此,确定待读取数据是否已经转存至云存储系统的方式可以为:根据标识信息以及预先存储的索引信息表,查找到标识信息对应的转存信息,根据查找到的转存信息,确定待读取数据是否已经转存至云存储服务器。
S303:如果已转存至云存储系统,发送标识信息至云存储系统,接收云存储系统反馈的待读取数据,并将接收到的待读取数据发送至客户端。
如果待读取数据已经转存至云存储系统,则将待读取数据的标识信息发送至云存储系统,云存储系统根据接收到的标识信息以及预先存储的标识信息与存储位置的对应关系,查找到标识信息对应的存储位置,然后从该存储位置处获得待读取数据,并将所获得的待读取数据反馈至本地接入服务器。
本地接入服务器接收云存储系统反馈的待读取数据,并将接收到的待读取数据发送至客户端,由此,完成待读取数据的读取。
如果待读取数据未转存至云存储系统,则根据标识信息,从自身中查找到待读取数据,并将查找到的待读取数据发送至客户端。
本申请实施例中,接收客户端发送的数据读取请求,数据读取请求中包 括待读取数据的标识信息,根据标识信息以及预先存储的索引信息表,确定待读取数据是否已经转存至云存储系统,其中,索引信息表中存储有标识信息与转存信息的对应关系,如果已转存至云存储系统,发送标识信息至云存储系统,接收云存储系统反馈的待读取数据,并将接收到的待读取数据发送至客户端。本申请中,在接收到客户端发送的数据读取请求后,判断待读取数据是否已转存至云存储系统,并在是的情况下,向云存储系统请求待读取数据,在接收到云存储系统反馈的待读取数据后,将接收到的待读取数据发送至客户端,由此,完成从云存储系统中读取待读取数据。
在图10所示方法的基础上,如图11所示,其中,步骤S301-S303均与图10相同,在图10的步骤S302之前,还可以包括:
S302A:根据标识信息,确定待读取数据对应的目的地址。
由于每个负载接入集群提供唯一的访问入口,因此,接收到客户端发送的包括待读取数据的标识信息的数据读取请求的本地接入服务器,不一定是将该待读取数据转存至云存储系统的本地接入服务器,使得当本地接入服务器接收到客户端发送的数据读取请求后,需要确定该待读取数据对应的目标地址,即确定将该待读取数据转存至云存储系统的本地接入服务器的地址。
需要说明的是,负载接入集群中的每个本地接入服务器中均存储有哈希值与本地接入服务器的地址的对应关系,因此,在本地接入服务器接收到客户端发送的数据读取请求后,需要根据待读取数据的标识信息计算该待读取数据的哈希值。
在计算出哈希值后,根据所计算出的哈希值以及预先存储的哈希值与本地接入服务器的地址的对应关系,确定所计算出的哈希值对应的本地接入服务器的目的地址,即待读取数据对应的目的地址。
S302B:判断目的地址是否为本地接入服务器的地址,如果是,执行步骤S302。
在确定了待读取数据对应的目的地址后,需要进一步根据该目的地址确定将该待读取数据转存至云存储系统的本地接入服务器是否为自身,因此,需要判断目的地址是否为本地接入服务器的地址,并在是的情况下,执行步骤S302。
本申请实施例中,当目的地址为本地接入服务器的地址时,通过本地接入服务器的从云存储系统中读取待读取数据。
在图11所示方法的基础上,如图12所示,其中,步骤S301-S303均与图11相同,在图12的步骤S302B判断为否之后,还可以包括:
S304:发送标识信息至目的地址对应的本地接入服务器,以使目的地址对应的本地接入服务器根据标识信息查找到待读取数据,并将查找到的待读取数据发送至客户端。
当判断目的地址不为本地接入服务器的时,说明将该待读取数据转存至云存储系统的本地接入服务器不是自身,此时,需要将标识信息至目的地址对应的本地接入服务器。
目的地址对应的本地接入服务器接收到标识信息后,即可根据标识信息查找到待读取数据,并将查找到的待读取数据发送至客户端。
其中,目的地址对应的本地接入服务器根据标识信息查找到待读取数据,并将查找到的待读取数据发送至客户端的过程可以为:
目的地址对应的本地接入服务器根据标识信息以及预先存储的索引信息表,确定待读取数据是否已经转存至云存储系统,其中,索引信息表中存储有标识信息与转存信息的对应关系。
如果已转存至云存储系统,发送标识信息至云存储系统,接收云存储系统反馈的待读取数据,并将接收到的待读取数据发送至客户端。
如果未转存至云存储系统,根据标识信息,从自身中查找到待读取数据,并将查找到的待读取数据发送至客户端。
本申请实施例中,当目的地址不为本地接入服务器的地址时,将标识信息发送至目的地址对应的本地接入服务器,通过目的地址对应的本地接入服务器从云存储系统中读取待读取数据。
下面从本地接入服务器所包括的模块组成的角度对本申请实施例进行详细介绍:
如图5所示,通过本地接入服务器的各个模块读取待读取数据的过程为:
客户端发送数据读取请求至PS模块,PS模块将待读取数据的标识信息发送至GMS模块,GMS模块根据接收到的标识信息,利用哈希算法,计算出待读取数据的哈希值,根据所计算出的哈希值以及预先存储的哈希值与本地接入服务器的地址的对应关系,确定所计算出的哈希值对应的本地接入服务器的目的地址,即待读取数据对应的目的地址。并将所确定出的目的地址发送至PS模块。
PS模块判断目的地址是否为自身地址,如果是自身地址,将待读取数据的标识信息发送至DSS模块,DSS模块根据标识信息以及预先存储的索引信息表,确定待读取数据是否已经转存至云存储系统。
如果已经转存至云存储系统,DSS模块将标识信息发送至DDS模块,DDS模块将标识信息发送至云存储系统,云存储系统接收到标识信息后,查找到待读取数据,并将待读取数据反馈至DDS模块,DDS模块接收云存储系统反馈的待读取数据,并将待读取数据发送至DSS模块,DSS模块将待读取数据发送至PS模块,然后PS模块将待读取数据发送至客户端。
如果未转存至云存储系统,DSS模块根据标识信息,从自身中查找到待读取数据,并将查找到的待读取数据发送至PS模块,然后PS模块将待读取数据发送至客户端。
如果PS模块判断目的地址不为自身地址,将待读取数据的标识信息发送至DSS模块,DSS模块将接收到的标识信息发送至目的地址对应的本地接入服务器,以使目的地址对应的本地接入服务器根据标识信息查找到待读取数据,并将查找到的待读取数据发送至客户端。
相对于上述方法实施例,如图13所示,本申请实施例还提供了一种数据读取装置,应用于本地接入服务器,所述装置可以包括:
第二接收模块1301,用于接收客户端发送的数据读取请求,所述数据读取请求中包括待读取数据的标识信息;
确定模块1302,用于根据所述标识信息以及预先存储的索引信息表,确定所述待读取数据是否已经转存至云存储系统,其中,所述索引信息表中存储有标识信息与转存信息的对应关系;
读取模块1303,用于如果已转存至云存储系统,发送所述标识信息至所述云存储系统,接收所述云存储系统反馈的所述待读取数据,并将接收到的所述待读取数据发送至所述客户端。
本申请实施例中,接收客户端发送的数据读取请求,数据读取请求中包括待读取数据的标识信息,根据标识信息以及预先存储的索引信息表,确定待读取数据是否已经转存至云存储系统,其中,索引信息表中存储有标识信息与转存信息的对应关系,如果已转存至云存储系统,发送标识信息至云存储系统,接收云存储系统反馈的待读取数据,并将接收到的待读取数据发送至客户端。本申请中,在接收到客户端发送的数据读取请求后,判断待读取数据是否已转存至云存储系统,并在是的情况下,向云存储系统请求待读取数据,在接收到云存储系统反馈的待读取数据后,将接收到的待读取数据发送至客户端,由此,完成从云存储系统中读取待读取数据。
在本申请的一种实现方式中,所述装置还可以包括:
目的地址确定模块,用于在所述根据所述标识信息以及预先存储的索引信息表,确定所述待读取数据是否已经转存至云存储系统之前,根据所述标 识信息,确定所述待读取数据对应的目的地址;
自身地址判断模块,用于判断所述目的地址是否为所述本地接入服务器的地址,如果是,触发所述确定模块。
在本申请的一种实现方式中,所述装置还可以包括:
查找模块,用于在判断所述目的地址是否为自身地址之后,如果不为所述本地接入服务器的地址,发送所述标识信息至所述目的地址对应的本地接入服务器,以使所述目的地址对应的本地接入服务器根据所述标识信息查找到所述待读取数据,并将查找到的待读取数据发送至所述客户端。
本申请实施例还提供了一种电子设备,如图14所示,包括:处理器1401和存储器1402,其中,存储器1402,用于存放程序代码;
处理器1401,用于执行存储器上所存放的程序代码时,实现如下步骤:
接收客户端发送的数据读取请求,所述数据读取请求中包括待读取数据的标识信息;
根据所述标识信息以及预先存储的索引信息表,确定所述待读取数据是否已经转存至云存储系统,其中,所述索引信息表中存储有标识信息与转存信息的对应关系;
如果已转存至云存储系统,发送所述标识信息至所述云存储系统,接收所述云存储系统反馈的所述待读取数据,并将接收到的所述待读取数据发送至所述客户端。
本申请实施例中,接收客户端发送的数据读取请求,数据读取请求中包括待读取数据的标识信息,根据标识信息以及预先存储的索引信息表,确定待读取数据是否已经转存至云存储系统,其中,索引信息表中存储有标识信息与转存信息的对应关系,如果已转存至云存储系统,发送标识信息至云存储系统,接收云存储系统反馈的待读取数据,并将接收到的待读取数据发送至客户端。本申请中,在接收到客户端发送的数据读取请求后,判断待读取数据是否已转存至云存储系统,并在是的情况下,向云存储系统请求待读取数据,在接收到云存储系统反馈的待读取数据后,将接收到的待读取数据发送至客户端,由此,完成从云存储系统中读取待读取数据。
在本申请的一种实现方式中,在所述根据所述标识信息以及预先存储的索引信息表,确定所述待读取数据是否已经转存至云存储系统的步骤之前,所述方法还包括:
根据所述标识信息,确定所述待读取数据对应的目的地址;
判断所述目的地址是否为所述本地接入服务器的地址;
如果是,执行根据所述标识信息以及预先存储的索引信息表,确定所述待读取数据是否已经转存至云存储系统的步骤。
在本申请的一种实现方式中,在所述判断所述目的地址是否为所述本地接入服务器的地址的步骤之后,所述方法还包括:
如果不为所述本地接入服务器的地址,发送所述标识信息至所述目的地址对应的本地接入服务器,以使所述目的地址对应的本地接入服务器根据所述标识信息查找到所述待读取数据,并将查找到的待读取数据发送至所述客户端。
另外,需要说明的是,所述处理器1401,还用于执行存储器1402上所存放的计算机程序时,实现如下数据存储方法步骤:
接收第一客户端发送的目标信息,所述目标信息中包括待存储数据;
在所述本地接入服务器所在的负载接入集群中存储所述待存储数据;
在存储所述待存储数据成功后,向所述第一客户端发送存储成功的信息以使所述第一客户端展示所述存储成功的信息;
将已存储成功的待存储数据发送至云存储系统,以使所述云存储系统存储所述待存储数据。
在本申请的一种实现方式中,所述在所述本地接入服务器所在的负载接入集群中存储所述待存储数据的步骤,包括:
根据所述待存储数据的标识信息,确定所述待存储数据对应的第一目的地址;
判断所述第一目的地址是否为所述本地接入服务器的地址;
如果是,将所述待存储数据存储至所述本地接入服务器;
如果否,将所述待存储数据发送至所述第一目的地址对应的本地接入服务器,以使所述第一目的地址对应的本地接入服务器存储所述待存储数据。
在本申请的一种实现方式中,所述将所述待存储数据存储至所述本地接入服务器的步骤,包括:
将所述待存储数据存储至所述本地接入服务器的固态硬盘中。
在本申请的一种实现方式中,所述负载接入集群包括多组本地接入服务器,在存储所述待存储数据成功后,向所述第一客户端发送存储成功的信息以使所述第一客户端展示所述存储成功的信息的步骤之后,在将已存储成功 的待存储数据发送至云存储系统的步骤之前,所述方法还包括:
根据所述本地接入服务器的标识信息以及预先存储的分组信息,确定与所述本地接入服务器同组的其它本地接入服务器;
将所述待存储数据复制至所确定的其它本地接入服务器。
在本申请的一种实现方式中,在所述将已存储成功的待存储数据发送至云存储系统,以使所述云存储系统存储所述待存储数据的步骤之后,所述方法还包括:
接收所述云存储系统发送的存储成功信息,删除所述负载接入集群中存储的所述待存储数据。
在本申请的一种实现方式中,所述目标信息还包括请求信息,在所述将已存储成功的待存储数据发送至云存储系统,以使所述云存储系统存储所述待存储数据的步骤之后,所述方法还包括:
判断所述请求信息是否为反馈请求信息;
如果是,从所述请求信息中确定第二目的地址;
使用预设私钥对待存储数据存储成功信息进行加密,并发送加密的待存储数据存储成功信息至所述第二目的地址对应的第二客户端,以使所述第二客户端在接收到所述加密的待存储数据存储成功信息后,向所述本地接入服务器发送公钥请求信息,并在接收到所述本地接入服务器反馈的预设公钥后,使用所述预设公钥对所述加密的待存储数据存储成功信息进行解密。
上述电子设备提到的存储器可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。
上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital Signal Processing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。
本申请实施例还提供了一种计算机可读存储介质,所述存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现如下步骤:
接收客户端发送的数据读取请求,所述数据读取请求中包括待读取数据 的标识信息;
根据所述标识信息以及预先存储的索引信息表,确定所述待读取数据是否已经转存至云存储系统,其中,所述索引信息表中存储有标识信息与转存信息的对应关系;
如果已转存至云存储系统,发送所述标识信息至所述云存储系统,接收所述云存储系统反馈的所述待读取数据,并将接收到的所述待读取数据发送至所述客户端。
本申请实施例中,接收客户端发送的数据读取请求,数据读取请求中包括待读取数据的标识信息,根据标识信息以及预先存储的索引信息表,确定待读取数据是否已经转存至云存储系统,其中,索引信息表中存储有标识信息与转存信息的对应关系,如果已转存至云存储系统,发送标识信息至云存储系统,接收云存储系统反馈的待读取数据,并将接收到的待读取数据发送至客户端。本申请中,在接收到客户端发送的数据读取请求后,判断待读取数据是否已转存至云存储系统,并在是的情况下,向云存储系统请求待读取数据,在接收到云存储系统反馈的待读取数据后,将接收到的待读取数据发送至客户端,由此,完成从云存储系统中读取待读取数据。
在本申请的一种实现方式中,在所述根据所述标识信息以及预先存储的索引信息表,确定所述待读取数据是否已经转存至云存储系统的步骤之前,所述方法还包括:
根据所述标识信息,确定所述待读取数据对应的目的地址;
判断所述目的地址是否为所述本地接入服务器的地址;
如果是,执行根据所述标识信息以及预先存储的索引信息表,确定所述待读取数据是否已经转存至云存储系统的步骤。
在本申请的一种实现方式中,在所述判断所述目的地址是否为所述本地接入服务器的地址的步骤之后,所述方法还包括:
如果不为所述本地接入服务器的地址,发送所述标识信息至所述目的地址对应的本地接入服务器,以使所述目的地址对应的本地接入服务器根据所述标识信息查找到所述待读取数据,并将查找到的待读取数据发送至所述客户端。
另外,需要说明的是,所述计算机程序被处理器执行时还实现如下数据存储方法步骤:
接收第一客户端发送的目标信息,所述目标信息中包括待存储数据;
在所述本地接入服务器所在的负载接入集群中存储所述待存储数据;
在存储所述待存储数据成功后,向所述第一客户端发送存储成功的信息以使所述第一客户端展示所述存储成功的信息;
将已存储成功的待存储数据发送至云存储系统,以使所述云存储系统采用纠删码编码的方式存储所述待存储数据。
在本申请的一种实现方式中,所述在所述本地接入服务器所在的负载接入集群中存储所述待存储数据的步骤,包括:
根据所述待存储数据的标识信息,确定所述待存储数据对应的第一目的地址;
判断所述第一目的地址是否为所述本地接入服务器的地址;
如果是,将所述待存储数据存储至所述本地接入服务器;
如果否,将所述待存储数据发送至所述第一目的地址对应的本地接入服务器,以使所述第一目的地址对应的本地接入服务器存储所述待存储数据。
在本申请的一种实现方式中,所述将所述待存储数据存储至所述本地接入服务器的步骤,包括:
将所述待存储数据存储至所述本地接入服务器的固态硬盘中。
在本申请的一种实现方式中,所述负载接入集群包括多组本地接入服务器,在存储所述待存储数据成功后,向所述第一客户端发送存储成功的信息以使所述第一客户端展示所述存储成功的信息的步骤之后,在将已存储成功的待存储数据发送至云存储系统的步骤之前,所述方法还包括:
根据所述本地接入服务器的标识信息以及预先存储的分组信息,确定与所述本地接入服务器同组的其它本地接入服务器;
将所述待存储数据复制至所确定的其它本地接入服务器。
在本申请的一种实现方式中,在所述将已存储成功的待存储数据发送至云存储系统,以使所述云存储系统存储所述待存储数据的步骤之后,所述方法还包括:
接收所述云存储系统发送的存储成功信息,删除所述负载接入集群中存储的所述待存储数据。
在本申请的一种实现方式中,所述目标信息还包括请求信息,在所述将已存储成功的待存储数据发送至云存储系统,以使所述云存储系统存储所述待存储数据的步骤之后,所述方法还包括:
判断所述请求信息是否为反馈请求信息;
如果是,从所述请求信息中确定第二目的地址;
使用预设私钥对待存储数据存储成功信息进行加密,并发送加密的待存储数据存储成功信息至所述第二目的地址对应的第二客户端,以使所述第二客户端在接收到所述加密的待存储数据存储成功信息后,向所述本地接入服务器发送公钥请求信息,并在接收到所述本地接入服务器反馈的预设公钥后,使用所述预设公钥对所述加密的待存储数据存储成功信息进行解密。
本申请实施例还提供了一种计算机程序,所述计算机程序用于在运行时执行如下步骤:
接收客户端发送的数据读取请求,所述数据读取请求中包括待读取数据的标识信息;
根据所述标识信息以及预先存储的索引信息表,确定所述待读取数据是否已经转存至云存储系统,其中,所述索引信息表中存储有标识信息与转存信息的对应关系;
如果已转存至云存储系统,发送所述标识信息至所述云存储系统,接收所述云存储系统反馈的所述待读取数据,并将接收到的所述待读取数据发送至所述客户端。
本申请实施例中,接收客户端发送的数据读取请求,数据读取请求中包括待读取数据的标识信息,根据标识信息以及预先存储的索引信息表,确定待读取数据是否已经转存至云存储系统,其中,索引信息表中存储有标识信息与转存信息的对应关系,如果已转存至云存储系统,发送标识信息至云存储系统,接收云存储系统反馈的待读取数据,并将接收到的待读取数据发送至客户端。本申请中,在接收到客户端发送的数据读取请求后,判断待读取数据是否已转存至云存储系统,并在是的情况下,向云存储系统请求待读取数据,在接收到云存储系统反馈的待读取数据后,将接收到的待读取数据发送至客户端,由此,完成从云存储系统中读取待读取数据。
在本申请的一种实现方式中,在所述根据所述标识信息以及预先存储的索引信息表,确定所述待读取数据是否已经转存至云存储系统的步骤之前,所述方法还包括:
根据所述标识信息,确定所述待读取数据对应的目的地址;
判断所述目的地址是否为所述本地接入服务器的地址;
如果是,执行根据所述标识信息以及预先存储的索引信息表,确定所述待读取数据是否已经转存至云存储系统的步骤。
在本申请的一种实现方式中,在所述判断所述目的地址是否为所述本地接入服务器的地址的步骤之后,所述方法还包括:
如果不为所述本地接入服务器的地址,发送所述标识信息至所述目的地址对应的本地接入服务器,以使所述目的地址对应的本地接入服务器根据所述标识信息查找到所述待读取数据,并将查找到的待读取数据发送至所述客户端。
另外,需要说明的是,所述计算机程序被处理器执行时还实现如下数据存储方法步骤:
接收第一客户端发送的目标信息,所述目标信息中包括待存储数据;
在所述本地接入服务器所在的负载接入集群中存储所述待存储数据;
在存储所述待存储数据成功后,向所述第一客户端发送存储成功的信息以使所述第一客户端展示所述存储成功的信息;
将已存储成功的待存储数据发送至云存储系统,以使所述云存储系统存储所述待存储数据。
在本申请的一种实现方式中,所述在本地接入服务器所在的负载接入集群中存储所述待存储数据的步骤,包括:
根据所述待存储数据的标识信息,确定所述待存储数据对应的第一目的地址;
判断所述第一目的地址是否为所述本地接入服务器的地址;
如果是,将所述待存储数据存储至所述本地接入服务器;
如果否,将所述待存储数据发送至所述第一目的地址对应的本地接入服务器,以使所述第一目的地址对应的本地接入服务器存储所述待存储数据。
在本发明的一种实现方式中,所述将所述待存储数据存储至所述本地接入服务器的步骤,包括:
将所述待存储数据存储至所述本地接入服务器的固态硬盘中。
在本申请的一种实现方式中,所述负载接入集群包括多组本地接入服务器,在存储所述待存储数据成功后,向所述第一客户端发送存储成功的信息以使所述第一客户端展示所述存储成功的信息的步骤之后,在将已存储成功的待存储数据发送至云存储系统的步骤之前,所述方法还包括:
根据所述本地接入服务器的标识信息以及预先存储的分组信息,确定与所述本地接入服务器同组的其它本地接入服务器;
将所述待存储数据复制至所确定的其它本地接入服务器。
在本申请的一种实现方式中,在所述将已存储成功的待存储数据发送至云存储系统,以使所述云存储系统存储所述待存储数据的步骤之后,所述方法还包括:
接收所述云存储系统发送的存储成功信息,删除所述负载接入集群中存储的所述待存储数据。
在本申请的一种实现方式中,所述目标信息还包括请求信息,在所述将已存储成功的待存储数据发送至云存储系统,以使所述云存储系统存储所述待存储数据的步骤之后,所述方法还包括:
判断所述请求信息是否为反馈请求信息;
如果是,从所述请求信息中确定第二目的地址;
使用预设私钥对待存储数据存储成功信息进行加密,并发送加密的待存储数据存储成功信息至所述第二目的地址对应的第二客户端,以使所述第二客户端在接收到所述加密的待存储数据存储成功信息后,向所述本地接入服务器发送公钥请求信息,并在接收到所述本地接入服务器反馈的预设公钥后,使用所述预设公钥对所述加密的待存储数据存储成功信息进行解密。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上所述仅为本申请的较佳实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本申请的保护范围内。

Claims (21)

  1. 一种数据存储方法,其特征在于,应用于本地接入服务器,所述方法包括:
    接收第一客户端发送的目标信息,所述目标信息中包括待存储数据;
    在本地存储所述待存储数据;
    在本地存储所述待存储数据成功后,向所述第一客户端发送存储成功的信息以使所述第一客户端展示所述存储成功的信息;
    将已存储成功的待存储数据发送至云存储系统,以使所述云存储系统存储所述待存储数据。
  2. 根据权利要求1所述的方法,其特征在于,所述在本地存储所述待存储数据的步骤,包括:
    根据所述待存储数据的标识信息,确定所述待存储数据对应的第一目的地址;
    判断所述第一目的地址是否为所述本地接入服务器的地址;
    如果是,将所述待存储数据存储至所述本地接入服务器;
    如果否,将所述待存储数据发送至所述第一目的地址对应的本地接入服务器,以使所述第一目的地址对应的本地接入服务器存储所述待存储数据。
  3. 根据权利要求2所述的方法,其特征在于,所述将所述待存储数据存储至所述本地接入服务器的步骤,包括:
    将所述待存储数据存储至所述本地接入服务器的固态硬盘中。
  4. 根据权利要求2所述的方法,其特征在于,所述负载接入集群包括多组本地接入服务器,在存储所述待存储数据成功后,向所述第一客户端发送存储成功的信息以使所述第一客户端展示所述存储成功的信息的步骤之后,在将已存储成功的待存储数据发送至云存储系统的步骤之前,所述方法还包括:
    根据所述本地接入服务器的标识信息以及预先存储的分组信息,确定与所述本地接入服务器同组的其它本地接入服务器;
    将所述待存储数据复制至所确定的其它本地接入服务器。
  5. 根据权利要求1所述的方法,其特征在于,在所述将已存储成功的待存储数据发送至云存储系统,以使所述云存储系统存储所述待存储数据的步骤之后,所述方法还包括:
    接收所述云存储系统发送的存储成功信息,删除所述负载接入集群中存储的所述待存储数据。
  6. 根据权利要求1所述的方法,其特征在于,所述目标信息还包括请求信息,在所述将已存储成功的待存储数据发送至云存储系统,以使所述云存储系统存储所述待存储数据的步骤之后,所述方法还包括:
    判断所述请求信息是否为反馈请求信息;
    如果是,从所述请求信息中确定第二目的地址;
    使用预设私钥对待存储数据存储成功信息进行加密,并发送加密的待存储数据存储成功信息至所述第二目的地址对应的第二客户端,以使所述第二客户端在接收到所述加密的待存储数据存储成功信息后,向所述本地接入服务器发送公钥请求信息,并在接收到所述本地接入服务器反馈的预设公钥后,使用所述预设公钥对所述加密的待存储数据存储成功信息进行解密。
  7. 一种数据存储装置,其特征在于,应用于本地接入服务器,所述装置包括:
    第一接收模块,用于接收第一客户端发送的目标信息,所述目标信息中包括待存储数据;
    存储模块,用于在本地存储所述待存储数据;
    发送模块,用于在本地存储所述待存储数据成功后,向所述第一客户端发送存储成功的信息以使所述第一客户端展示所述存储成功的信息;
    转存模块,用于将已存储成功的待存储数据发送至云存储系统,以使所述云存储系统存储所述待存储数据。
  8. 根据权利要求7所述的装置,其特征在于,所述存储模块,包括:
    第一目的地址确定单元,用于根据所述待存储数据的标识信息,确定所述待存储数据对应的第一目的地址;
    判断单元,用于判断所述第一目的地址是否为所述本地接入服务器的地址,如果是,触发第一存储单元,如果否,触发第二存储单元;
    所述第一存储单元,用于将所述待存储数据存储至所述本地接入服务器;
    所述第二存储单元,用于将所述待存储数据发送至所述第一目的地址对应的本地接入服务器,以使所述第一目的地址对应的本地接入服务器存储所述待存储数据。
  9. 根据权利要求8所述的装置,其特征在于,所述第一存储单元,具体 用于:
    将所述待存储数据存储至所述本地接入服务器的固态硬盘中。
  10. 根据权利要求8所述的装置,其特征在于,所述负载接入集群包括多组本地接入服务器,所述装置还包括:
    其它本地接入服务器确定模块,用于在存储所述待存储数据成功后,向所述第一客户端发送存储成功的信息以使所述第一客户端展示所述存储成功的信息之后,在将已存储成功的待存储数据发送至云存储系统之前,根据所述本地接入服务器的标识信息以及预先存储的分组信息,确定与所述本地接入服务器同组的其它本地接入服务器;
    复制模块,用于将所述待存储数据复制至所确定的其它本地接入服务器。
  11. 根据权利要求7所述的装置,其特征在于,所述装置还包括:
    删除模块,用于在将已存储成功的待存储数据发送至云存储系统,以使所述云存储系统存储所述待存储数据后,接收所述云存储系统发送的存储成功信息,删除所述负载接入集群中存储的所述待存储数据。
  12. 根据权利要求7所述的装置,其特征在于,所述目标信息还包括请求信息,所述装置还包括:
    反馈请求信息判断模块,用于在将已存储成功的待存储数据发送至云存储系统,以使所述云存储系统存储所述待存储数据之后,判断所述请求信息是否为反馈请求信息,如果是,触发第二目的地址确定模块;
    所述第二目的地址确定模块,用于从所述请求信息中确定第二目的地址;
    加密模块,用于使用预设私钥对待存储数据存储成功信息进行加密,并发送加密的待存储数据存储成功信息至所述第二目的地址对应的第二客户端,以使所述第二客户端在接收到所述加密的待存储数据存储成功信息后,向所述本地接入服务器发送公钥请求信息,并在接收到所述本地接入服务器反馈的预设公钥后,使用所述预设公钥对所述加密的待存储数据存储成功信息进行解密。
  13. 一种数据读取方法,其特征在于,应用于本地接入服务器,所述方法包括:
    接收客户端发送的数据读取请求,所述数据读取请求中包括待读取数据的标识信息;
    根据所述标识信息以及预先存储的索引信息表,确定所述待读取数据是否已经转存至云存储系统,其中,所述索引信息表中存储有标识信息与转存 信息的对应关系;
    如果已转存至云存储系统,发送所述标识信息至所述云存储系统,接收所述云存储系统反馈的所述待读取数据,并将接收到的所述待读取数据发送至所述客户端。
  14. 根据权利要求13所述的方法,其特征在于,在所述根据所述标识信息以及预先存储的索引信息表,确定所述待读取数据是否已经转存至云存储系统的步骤之前,所述方法还包括:
    根据所述标识信息,确定所述待读取数据对应的目的地址;
    判断所述目的地址是否为所述本地接入服务器的地址;
    如果是,执行根据所述标识信息以及预先存储的索引信息表,确定所述待读取数据是否已经转存至云存储系统的步骤。
  15. 根据权利要求14所述的方法,其特征在于,在所述判断所述目的地址是否为所述本地接入服务器的地址的步骤之后,所述方法还包括:
    如果不为所述本地接入服务器的地址,发送所述标识信息至所述目的地址对应的本地接入服务器,以使所述目的地址对应的本地接入服务器根据所述标识信息查找到所述待读取数据,并将查找到的待读取数据发送至所述客户端。
  16. 一种数据读取装置,其特征在于,应用于本地接入服务器,所述装置包括:
    第二接收模块,用于接收客户端发送的数据读取请求,所述数据读取请求中包括待读取数据的标识信息;
    确定模块,用于根据所述标识信息以及预先存储的索引信息表,确定所述待读取数据是否已经转存至云存储系统,其中,所述索引信息表中存储有标识信息与转存信息的对应关系;
    读取模块,用于如果已转存至云存储系统,发送所述标识信息至所述云存储系统,接收所述云存储系统反馈的所述待读取数据,并将接收到的所述待读取数据发送至所述客户端。
  17. 根据权利要求16所述的装置,其特征在于,所述装置还包括:
    目的地址确定模块,用于在所述根据所述标识信息以及预先存储的索引信息表,确定所述待读取数据是否已经转存至云存储系统之前,根据所述标识信息,确定所述待读取数据对应的目的地址;
    自身地址判断模块,用于判断所述目的地址是否为所述本地接入服务器的地址,如果是,触发所述确定模块。
  18. 根据权利要求17所述的装置,其特征在于,所述装置还包括:
    查找模块,用于在判断所述目的地址是否为自身地址之后,如果不为所述本地接入服务器的地址,发送所述标识信息至所述目的地址对应的本地接入服务器,以使所述目的地址对应的本地接入服务器根据所述标识信息查找到所述待读取数据,并将查找到的待读取数据发送至所述客户端。
  19. 一种电子设备,其特征在于,包括处理器和存储器,
    其中,存储器,用于存放程序代码;
    处理器,用于执行存储器上所存放的程序代码时,实现权利要求1-6任一所述的方法步骤,和/或,实现权利要求13-15任一所述的方法步骤。
  20. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-6任一所述的方法步骤,和/或,实现权利要求13-15任一所述的方法步骤。
  21. 一种计算机程序,其特征在于,所述计算机程序用于在运行时执行权利要求1-6任一所述的方法步骤,和/或,执行权利要求13-15任一所述的方法步骤。
PCT/CN2018/104255 2017-09-06 2018-09-06 一种数据存储、读取方法及装置 WO2019047875A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710795265.9 2017-09-06
CN201710795265.9A CN109460182B (zh) 2017-09-06 2017-09-06 一种数据存储、读取方法及装置

Publications (1)

Publication Number Publication Date
WO2019047875A1 true WO2019047875A1 (zh) 2019-03-14

Family

ID=65605958

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/104255 WO2019047875A1 (zh) 2017-09-06 2018-09-06 一种数据存储、读取方法及装置

Country Status (2)

Country Link
CN (1) CN109460182B (zh)
WO (1) WO2019047875A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111125030B (zh) * 2019-12-18 2023-09-22 北京数衍科技有限公司 数据存储方法、装置及服务器
CN118069611A (zh) * 2020-01-17 2024-05-24 华为技术有限公司 一种文件系统的克隆方法及装置
CN114760356A (zh) * 2020-12-29 2022-07-15 北京金山云网络技术有限公司 数据读取请求处理方法、装置及数据读取请求处理系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110167221A1 (en) * 2010-01-06 2011-07-07 Gururaj Pangal System and method for efficiently creating off-site data volume back-ups
CN102694860A (zh) * 2012-05-25 2012-09-26 北京邦诺存储科技有限公司 一种云存储的数据处理方法、设备及系统
CN105791353A (zh) * 2014-12-23 2016-07-20 深圳市腾讯计算机系统有限公司 基于纠删码的分布式数据存储方法及系统
CN106161637A (zh) * 2016-07-21 2016-11-23 广州杰赛科技股份有限公司 一种云备份方法及装置

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104966023A (zh) * 2015-03-10 2015-10-07 深圳市腾讯计算机系统有限公司 数据保护系统、方法和装置
CN106484322A (zh) * 2016-09-12 2017-03-08 华为技术有限公司 一种挂载文件系统的方法、装置及设备
CN106921648A (zh) * 2016-11-15 2017-07-04 阿里巴巴集团控股有限公司 数据存储方法、应用服务器及远程存储服务器

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110167221A1 (en) * 2010-01-06 2011-07-07 Gururaj Pangal System and method for efficiently creating off-site data volume back-ups
CN102694860A (zh) * 2012-05-25 2012-09-26 北京邦诺存储科技有限公司 一种云存储的数据处理方法、设备及系统
CN105791353A (zh) * 2014-12-23 2016-07-20 深圳市腾讯计算机系统有限公司 基于纠删码的分布式数据存储方法及系统
CN106161637A (zh) * 2016-07-21 2016-11-23 广州杰赛科技股份有限公司 一种云备份方法及装置

Also Published As

Publication number Publication date
CN109460182B (zh) 2020-10-30
CN109460182A (zh) 2019-03-12

Similar Documents

Publication Publication Date Title
US10402579B2 (en) Systems, methods, and apparatus to provide private information retrieval
WO2019119929A1 (zh) 区块链共识方法、装置和系统、标识信息处理方法和装置
EP3062261B1 (en) Community-based de-duplication for encrypted data
US20180076960A1 (en) System and method for rotating client security keys
US20190132120A1 (en) Data Encrypting System with Encryption Service Module and Supporting Infrastructure for Transparently Providing Encryption Services to Encryption Service Consumer Processes Across Encryption Service State Changes
US9122882B2 (en) Method and apparatus of securely processing data for file backup, de-duplication, and restoration
US20130290733A1 (en) Systems and methods for caching security information
WO2019010101A1 (en) SECURE DETECTION AND MANAGEMENT OF COMPROMISED IDENTITY SUPPORTERS
KR20180131056A (ko) 클라우드 서비스를 위한 암호화 키 관리 시스템
US20190238560A1 (en) Systems and methods to provide secure storage
WO2019047875A1 (zh) 一种数据存储、读取方法及装置
WO2020253380A1 (zh) 数据加密方法、装置及终端设备
EP4073673A1 (en) Encrypted search with a public key
WO2016005355A1 (en) Device, system and method for storing data
US11909861B2 (en) Privately querying a database with private set membership using succinct filters
US11645103B2 (en) Method and system for securing the movement of virtual machines between hosts
US11394562B2 (en) Automatic elevation of system security
US11818264B2 (en) Zero-knowledge key escrow
CN117493026B (zh) 一种多主机与多计算快速链接内存设备系统及其应用设备
CN112995285B (zh) 基于区块技术的分布式kv存储系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18854742

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18854742

Country of ref document: EP

Kind code of ref document: A1