WO2019214694A1 - Method for storing data, and method, device, and system for reading data - Google Patents

Method for storing data, and method, device, and system for reading data Download PDF

Info

Publication number
WO2019214694A1
WO2019214694A1 PCT/CN2019/086285 CN2019086285W WO2019214694A1 WO 2019214694 A1 WO2019214694 A1 WO 2019214694A1 CN 2019086285 W CN2019086285 W CN 2019086285W WO 2019214694 A1 WO2019214694 A1 WO 2019214694A1
Authority
WO
WIPO (PCT)
Prior art keywords
block unit
virtual
data
file
storage
Prior art date
Application number
PCT/CN2019/086285
Other languages
French (fr)
Chinese (zh)
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 WO2019214694A1 publication Critical patent/WO2019214694A1/en

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/0614Improving the reliability 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
    • 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/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • 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/0662Virtualisation aspects
    • G06F3/0664Virtualisation aspects at device level, e.g. emulation of a storage device or system

Definitions

  • the present application relates to the field of communications, and in particular, to a method for storing data, a method, device, and system for reading data.
  • the terminal can manage at least one camera device, and each camera device can transmit the captured data to its corresponding terminal.
  • the storage space in the terminal is limited. For this reason, relatively inexpensive block devices are currently deployed on the server side to store data in the terminal.
  • the block device is provided with a large-capacity disk, and the terminal can send the data to be stored to the block device connected to the server, and the block device stores the data and stores the data on the local disk. Since the reliability of the block device is not high, the data storage block device causes the storage reliability of the data to be low.
  • the embodiment of the present application provides a method for storing data, a method, device, and system for reading data.
  • the technical solution is as follows:
  • the present application provides a method of storing data, the method comprising:
  • the connection Receiving, by the connection corresponding to the first virtual file, a storage command sent by the terminal, where the storage command includes data to be stored and a starting address of the to-be-stored data in the first virtual disk, where the first virtual file is in the server a virtual file, the first virtual disk is a virtual disk corresponding to the first virtual file in the terminal, and the connection is a connection between the terminal and the server;
  • the determining, according to the start address and the first virtual file, the offset addresses of the first storage block unit and the to-be-stored data in the first storage block unit including:
  • the method further includes:
  • the second virtual file corresponding to the second virtual disk is created in the server.
  • the method further includes:
  • the present application provides a method of reading data, the method comprising:
  • a read command sent by the terminal, where the read command includes a data amount of data to be read and a start address of the data to be read in the first virtual disk, where A virtual file is a virtual file in the server, the first virtual disk is a virtual disk corresponding to the first virtual file in the terminal, and the connection is a connection between the terminal and the server. ;
  • the determining, according to the starting address and the first virtual file, the offset addresses of the first storage block unit and the to-be-read data in the first storage block unit including:
  • the method further includes:
  • the second virtual file corresponding to the second virtual disk is created in the server.
  • the method further includes:
  • the present application provides an apparatus for storing data, the apparatus comprising:
  • a receiving module configured to receive, by using a connection corresponding to the first virtual file, a storage command sent by the terminal, where the storage command includes data to be stored and a starting address of the to-be-stored data in the first virtual disk, the first virtual
  • the file is a virtual file in the server, and the first virtual disk is a virtual disk corresponding to the first virtual file in the terminal;
  • a determining module configured to determine, according to the starting address and the first virtual file, an offset address of the first storage block unit and the to-be-stored data in the first storage block unit, the first virtual
  • the disk corresponds to at least one storage block unit in the cloud storage platform, and the first storage block unit is one of the at least one storage block unit;
  • a storage module configured to store the to-be-stored data in the first storage block unit according to the offset address.
  • the determining module includes:
  • An obtaining unit configured to acquire, according to the file identifier of the first virtual file, at least one unit identifier corresponding to the first virtual disk from a correspondence between a file identifier and a unit identifier stored in the cloud storage platform;
  • a determining unit configured to determine, according to the starting address and a capacity of the storage block unit, a first storage block unit and the to-be-stored data in the first storage block unit from a corresponding storage block unit of each unit identifier Offset address.
  • the device further includes:
  • a creating module configured to create a second virtual file corresponding to the second virtual disk in the server when the terminal creates the second virtual disk.
  • the device further includes:
  • An application module configured to apply, in the cloud storage platform, at least one storage block unit corresponding to the second virtual disk, and identify a file identifier of the second virtual file and each storage block in the at least one storage unit
  • the unit identifier of the unit corresponds to the correspondence between the file identifier and the unit identifier stored in the cloud storage platform.
  • the present application provides an apparatus for reading data, the apparatus comprising:
  • a receiving module configured to receive, by using a connection corresponding to the first virtual file, a read command sent by the terminal, where the read command includes an amount of data of the data to be read and a start of the data to be read in the first virtual disk
  • the first virtual file is a virtual file in the server
  • the first virtual disk is a virtual disk corresponding to the first virtual file in the terminal
  • a determining module configured to determine, according to the starting address and the first virtual file, an offset address of the first storage block unit and the to-be-read data in the first storage block unit, the first The virtual disk corresponds to at least one storage block unit in the cloud storage platform, and the first storage block unit is one of the at least one storage block unit;
  • a reading module configured to read the data to be read from the first storage block unit according to the offset address and the data amount
  • a sending module configured to send the to-be-read data to the terminal.
  • the determining module includes:
  • an obtaining unit configured to acquire, according to the file identifier of the first virtual file, the at least one unit identifier corresponding to the first virtual disk from the correspondence between the file identifier and the unit identifier stored in the cloud storage platform;
  • a determining unit configured to determine, according to the starting address and a capacity of the storage block unit, a first storage block unit from the corresponding storage block unit and a data to be read in the first storage block unit The offset address in .
  • the device further includes:
  • a creating module configured to create a second virtual file corresponding to the second virtual disk in the server when the terminal creates the second virtual disk.
  • the device further includes:
  • An application module configured to apply, in the cloud storage platform, at least one storage block unit corresponding to the second virtual disk, and store the file identifier of the second virtual file and each of the at least one storage block unit
  • the unit identifier of the block unit corresponds to the correspondence between the file identifier and the unit identifier stored in the cloud storage platform.
  • the application provides a system for storing data, the system comprising:
  • the server is configured to receive, by using a connection corresponding to the first virtual file, a storage command sent by the terminal, where the storage command includes data to be stored and a starting address of the to-be-stored data in the first virtual disk,
  • the first virtual file is a virtual file in the server, and the first virtual disk is a virtual disk corresponding to the first virtual file in the terminal;
  • the server is further configured to determine, according to the start address and the first virtual file, an offset address of the first storage block unit and the to-be-stored data in the first storage block unit, where a virtual disk corresponding to at least one memory block unit in the cloud storage platform, the first memory block unit being one of the at least one memory block unit; storing the data to be stored according to the offset address In the first memory block unit.
  • the application provides a system for reading data, the system comprising:
  • the server is configured to receive, by using a connection corresponding to the first virtual file, a read command sent by the terminal, where the read command includes an amount of data to be read data and the to-be-read data is in the first virtual disk a starting address, the first virtual file is a virtual file in the server, and the first virtual disk is a virtual disk corresponding to the first virtual file in the terminal;
  • the server is further configured to determine, according to the start address and the first virtual file, an offset address of the first storage block unit and the to-be-read data in the first storage block unit,
  • the first virtual disk corresponds to at least one storage block unit in the cloud storage platform, the first storage block unit is one of the at least one storage block unit; according to the offset address and the data amount, Reading the data to be read in the first storage block unit; and sending the data to be read to the terminal.
  • the present application provides a computer readable storage medium having stored therein a computer program, the computer program being executed by a processor to implement any of the first aspect or the first aspect
  • An exemplary method step or the computer program is executed by a processor to implement any of the exemplary method steps of the first aspect or the first aspect.
  • the first virtual file corresponds to the connection of the terminal
  • determining the cloud storage platform according to the first virtual file and the starting address in the storage command And an offset address of the first storage block unit for storing data to be stored and the data to be stored in the first storage block unit, according to the offset address, storing the data to be stored in the first storage block unit.
  • the data to be stored is stored in the cloud storage platform, and the reliability of the storage data of the cloud storage platform is high, thereby improving the reliability of the data storage.
  • FIG. 1 is a schematic structural diagram of a system provided by an embodiment of the present application.
  • FIG. 2 is a flowchart of a method for storing data according to an embodiment of the present application
  • FIG. 3 is a flowchart of another method for storing data according to an embodiment of the present application.
  • FIG. 5 is a flowchart of another method for reading data according to an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of an apparatus for reading data according to an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of an apparatus for reading data according to an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a system according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram of a device according to an embodiment of the present application.
  • an embodiment of the present application provides a storage system, where the storage system includes:
  • Terminal 1 server 2 and cloud storage platform 3.
  • the terminal 1 includes at least one virtual disk.
  • the server 2 includes a kernel layer and a user layer.
  • the kernel layer includes at least one virtual kernel device
  • the user layer includes at least one virtual user device
  • each virtual user device corresponds to one virtual file.
  • Each virtual core device corresponds to one virtual user device in the user layer and one virtual disk in the corresponding terminal 1. Therefore, each virtual user device also corresponds to a virtual disk on the terminal 1, and the virtual file of each virtual user device corresponds to a virtual disk on the terminal 1.
  • the cloud storage platform 3 includes at least one storage block unit corresponding to each of the at least one virtual disk.
  • At least one connection is established between the terminal 1 and the server 2, and the at least one connection is a long connection.
  • the virtual disk corresponds to a connection between the terminal 1 and the server 2, and a virtual kernel device, a virtual user device, and a virtual file corresponding to the virtual disk in the server 2, the virtual core
  • the device, the virtual user device, and the virtual file all correspond to the one connection.
  • the virtual disk is not the physical disk actually existing in the terminal 1, and the actual storage space corresponding to the virtual disk is located in the cloud storage platform 3, that is, the actual storage space corresponding to the virtual disk is the virtual disk in the cloud storage platform 3.
  • mapping between the file identifier and the unit identifier is saved in the cloud storage platform 3, and the correspondence is used to save the correspondence between the file identifier of the virtual file corresponding to the virtual disk and the unit identifier of each storage block unit corresponding to the virtual disk. relationship.
  • the cloud storage platform 3 includes a metadata cluster 31 and a storage cluster 32.
  • the metadata cluster 31 stores a correspondence between a file identifier and a unit identifier.
  • the storage cluster 32 includes at least one storage block unit corresponding to each virtual disk. .
  • the embodiment of the present application provides a method for storing data, which may be applied to the system shown in FIG. 1 , and the execution of the method may be a server in the system, including:
  • Step 201 Receive a storage command sent by the terminal by using a connection corresponding to the first virtual file, where the storage command includes a data to be stored and a starting address of the data to be stored in the first virtual disk.
  • the first virtual file is a virtual file in the server
  • the first virtual disk is a virtual disk corresponding to the first virtual file in the terminal
  • the connection is a connection between the terminal and the server.
  • Step 202 Determine, according to the start address and the first virtual file, an offset address of the first storage block unit and the data to be stored in the first storage block unit.
  • the first virtual disk corresponds to at least one storage block unit in the cloud storage platform, and the first storage block unit is one of the at least one storage block unit.
  • Step 203 Store the data to be stored in the first storage block unit according to the offset address.
  • the first virtual file corresponds to the connection of the terminal
  • determining the cloud storage platform according to the first virtual file and the starting address in the storage command And an offset address of the first storage block unit for storing data to be stored and the data to be stored in the first storage block unit, according to the offset address, storing the data to be stored in the first storage block unit.
  • the data to be stored is stored in the cloud storage platform, and the reliability of the storage data of the cloud storage platform is high, thereby improving the reliability of the data storage.
  • an embodiment of the present application provides a method for storing data, which may be applied to the system shown in FIG. 1, including:
  • Step 301 The terminal creates a second virtual disk, establishes a connection corresponding to the second virtual disk with the server, and sends a create command to the server, where the create command includes the capacity of the second virtual disk.
  • the user can trigger the terminal to create a second virtual disk and set the capacity of the second virtual disk in the terminal.
  • the terminal can obtain the capacity of the second virtual disk set by the user, create a second virtual disk, establish a connection corresponding to the second virtual disk with the server, and send a create command to the server through the connection, the creation command includes the second The capacity of the virtual disk.
  • the second virtual disk created by the terminal is not the physical disk actually existing on the terminal. Therefore, in this embodiment, the terminal may not include a disk.
  • Step 302 The server receives the creation command, creates a second virtual file corresponding to the second virtual disk, and sets a second virtual file corresponding to the connection.
  • the server can receive the creation command through the connection, create a virtual kernel device corresponding to the second virtual disk at the kernel layer thereof, and create a virtual user device corresponding to the second virtual disk and the second virtual file at the user layer thereof, and associate the connection with the virtual device.
  • the virtual kernel device associates the virtual kernel device with the virtual user device and associates the virtual user device with the second virtual file.
  • the operating system installed by the server may be a Linux system, and the virtual kernel device and the virtual user device may be created by using the provided targetcli command.
  • the virtual kernel device can be used as a lun device, and the lun device is a block device, and the virtual user device acts as a UIO device.
  • the second virtual file created by the server is not the file actually existing on the server.
  • the server only the file identifier of the second virtual file can be used as the second virtual file.
  • the disk may not be included in the server.
  • Step 303 The server applies for at least one storage block unit corresponding to the second virtual disk in the cloud storage platform according to the capacity of the second virtual disk.
  • the cloud storage platform includes a metadata cluster and a storage cluster.
  • the storage cluster includes a large number of storage block units, and each storage block unit has the same capacity.
  • the memory block unit can be an object.
  • the method may be: the server calculates the number of the storage block units corresponding to the second virtual disk according to the capacity of the second virtual disk and the capacity of the storage block unit, and applies the storage block unit from the storage cluster of the cloud storage platform according to the number.
  • the applied storage block unit is a storage block unit corresponding to the second virtual disk.
  • the capacity of the second virtual disk is 30G
  • the capacity of each storage block unit in the storage cluster of the cloud storage platform is 5G
  • the second is calculated according to the capacity 30G of the second virtual disk and the capacity 5G of the storage block unit.
  • the number of the storage block units corresponding to the virtual disk is six, and six storage block units are applied from the storage cluster of the cloud storage platform, and the six storage block units are the storage block units corresponding to the second virtual disk.
  • Step 304 The server saves the file identifier of the second virtual file and the unit identifier of each storage block unit corresponding to the second virtual disk in the corresponding relationship between the file identifier and the unit identifier of the cloud storage platform.
  • the metadata cluster of the cloud storage platform stores the correspondence between the file identifier and the unit identifier. Therefore, in this step, the server may save the file identifier of the second virtual file and the unit identifier of each storage block unit corresponding to the second virtual disk in the correspondence between the file identifier and the unit identifier in the metadata cluster.
  • the steps of 301 to 304 above may be repeatedly performed, creating a plurality of virtual disks on the terminal and creating a virtual file corresponding to each virtual disk at the server.
  • the user can store data to a virtual disk of the terminal.
  • the virtual disk is called the first virtual disk, and the data is called data to be stored. Then store the data to be stored in the first virtual disk as follows.
  • Step 305 The terminal acquires a starting address of the data to be stored and the data to be stored in the first virtual disk, and sends a storage command to the server by using a connection corresponding to the first virtual disk, where the storage command includes data to be stored and the starting address.
  • the user may input the data to be stored to the terminal, and may also input the starting address of the data to be stored in the first virtual disk to the terminal.
  • the terminal may save the occupied space capacity of the first virtual disk.
  • the data to be stored may be determined according to the occupied space capacity. The starting address in the first virtual disk.
  • Step 306 The server receives, by using the connection, a storage command sent by the terminal, where the storage command includes a data to be stored and a starting address of the data to be stored in the first virtual disk, and determines a first virtual file corresponding to the connection.
  • the first virtual file is a virtual file corresponding to the first virtual disk in the server. And the first virtual file has a corresponding file identifier.
  • the server receives the storage command via a virtual kernel device associated with the connection, the virtual kernel device entering the storage command into the virtual user device.
  • the server then retrieves the storage command from the virtual user device.
  • the command sent by the terminal to the server is first received by the virtual kernel device of the kernel layer, and the server does not know whether the command is a read command or a storage command.
  • the virtual core device enters the command into its corresponding virtual user device.
  • the server can obtain the command from the virtual user device, and identify whether the command is a read command or a storage command, and obtain a virtual file corresponding to the virtual user device as the first virtual file.
  • Step 307 The server determines, according to the start address and the first virtual file, an offset address of the first storage block unit and the data to be stored in the first storage block unit.
  • the server acquires, according to the file identifier of the first virtual file, the at least one unit identifier corresponding to the first virtual disk from the correspondence between the file identifier and the unit identifier stored by the cloud storage platform; according to the start address and the storage block unit
  • the capacity determines an offset address of the first memory block unit and the data to be stored in the first memory block unit from the memory block unit corresponding to each unit identifier.
  • the capacity of each memory block unit in the cloud storage platform may be equal. It is assumed that the starting address of the data to be stored in the first virtual disk is at the position of 7G, and the capacity of each storage block unit is 5G. Thus, according to the start address and the capacity of the storage block unit, the determined first storage block unit is the second storage block unit corresponding to the first virtual disk and the offset address of the data to be stored in the first storage block unit is 2G. s position.
  • Step 308 The server stores the data to be stored in the first storage block unit according to the offset address.
  • the server may store the data to be stored in the second storage block unit corresponding to the first virtual disk according to the location of the 2G.
  • the server passes the first
  • the virtual kernel device corresponding to the virtual disk receives the storage command, and the virtual kernel device inputs the storage command to the corresponding virtual user device, and the server obtains the storage command from the virtual user device, according to the first virtual file corresponding to the virtual user device.
  • Determining, in the storage command, a first storage block unit for storing data to be stored in the cloud storage platform and an offset address of the data to be stored in the first storage block unit, according to the offset address The data to be stored is stored in the first memory block unit. In this way, the data to be stored is stored in the cloud storage platform, and the reliability of the storage data of the cloud storage platform is high, thereby improving the reliability of the data storage.
  • the embodiment of the present application provides a method for reading data, which may be applied to the system shown in FIG. 1 , and the execution of the method may be a server in the system, including:
  • Step 401 The read command sent by the terminal is received by the connection corresponding to the first virtual file, where the read command includes the data amount of the data to be read and the start address of the data to be read in the first virtual disk.
  • the first virtual file is a virtual file in the server
  • the first virtual disk is a virtual disk corresponding to the first virtual file in the terminal
  • the connection is a connection between the terminal and the server.
  • Step 402 Determine an offset address of the first memory block unit and the data to be read in the first memory block unit according to the start address and the first virtual file.
  • the first virtual disk corresponds to at least one storage block unit in the cloud storage platform, and the first storage block unit is one of the at least one storage block unit.
  • Step 403 Read data to be read from the first storage block unit according to the offset address and the data amount.
  • Step 404 Send data to be read to the terminal.
  • the first virtual file corresponds to the connection of the terminal
  • determining the cloud storage according to the first virtual file and the starting address in the read command And a offset address of the first memory block unit for storing data to be read and the data to be read in the first memory block unit in the platform, and reading data in the first memory block unit according to the offset address.
  • This can support the storage of data in the cloud storage platform, and the storage reliability of the cloud storage platform is higher, thereby improving the reliability of the data storage.
  • an embodiment of the present application provides a method for reading data, which may be applied to the system shown in FIG. 1, including:
  • Steps 501 to 504 are the same as steps 301 to 304, respectively, and will not be described in detail herein.
  • the user may input the starting address of the data to be read in the first virtual disk and the data amount of the data to be read to the terminal, where the first virtual disk is a terminal. Any of the virtual disks in .
  • Step 505 The terminal acquires a starting address of the data to be read in the first virtual disk and a data amount of the data to be read, and sends a read command to the server by using a connection corresponding to the first virtual disk, where the read command includes a to-be-read Take the starting address and amount of data.
  • the user can directly input the starting address and the amount of data of the data to be read in the first virtual disk to the terminal.
  • the terminal receives the start address of the data to be read input by the user in the first virtual disk and the data amount of the data to be read, determines a connection corresponding to the first virtual disk, and sends a read to the server through the determined connection.
  • the read command includes a start address and a data amount of data to be stored.
  • Step 506 The server receives, by using the connection, a read command sent by the terminal, where the read command includes a start address and a data amount of the data to be read in the first virtual disk, and determines a first virtual file corresponding to the connection.
  • the first virtual file is a virtual file corresponding to the first virtual disk in the server. And the first virtual file has a corresponding file identifier.
  • the server receives the read command via a virtual core device associated with the connection, and the virtual kernel device then inputs the read command to the virtual user device. The server then obtains the read command from the virtual user device.
  • the command sent by the terminal to the server is first received by the virtual kernel device of the kernel layer, and the server does not know whether the command is a read command or a storage command.
  • the virtual core device enters the command into its corresponding virtual user device.
  • the server can obtain the command from the virtual user device, and identify whether the command is a read command or a storage command, and obtain a virtual file corresponding to the virtual user device as the first virtual file.
  • Step 507 The server determines, according to the start address and the first virtual file, an offset address of the first storage block unit and the data to be read in the first storage block unit.
  • the server acquires, according to the file identifier of the first virtual file, the at least one unit identifier corresponding to the first virtual disk from the correspondence between the file identifier and the unit identifier stored by the cloud storage platform; according to the start address and the storage block unit
  • the capacity determines an offset address of the first memory block unit and the data to be read in the first memory block unit from the corresponding memory block unit of each unit identifier.
  • the capacity of each memory block unit in the cloud storage platform may be equal. It is assumed that the starting address of the data to be stored in the first virtual disk is at the position of 7G, and the capacity of each storage block unit is 5G. Thus, according to the start address and the capacity of the storage block unit, the determined first storage block unit is the second storage block unit corresponding to the first virtual disk and the offset address of the data to be read in the first storage block unit is 2G location.
  • Step 508 The server reads the data to be read from the first storage block unit according to the offset address and the data amount of the data to be read, and sends the data to be read to the terminal.
  • the server can read 2M of data to be read from the second storage block unit corresponding to the first virtual disk according to the location of the 2G, and send the to-be-readed to the terminal through the connection. data.
  • the first virtual file corresponds to the connection of the terminal
  • determining the cloud storage according to the first virtual file and the starting address in the read command And a offset address of the first memory block unit for storing data to be read and the data to be read in the first memory block unit in the platform, and reading data in the first memory block unit according to the offset address.
  • This can support the storage of data in the cloud storage platform, and the storage reliability of the cloud storage platform is higher, thereby improving the reliability of the data storage.
  • an embodiment of the present application provides an apparatus 600 for storing data, where the apparatus 600 includes:
  • the receiving module 601 is configured to receive, by using a connection corresponding to the first virtual file, a storage command sent by the terminal, where the storage command includes data to be stored and a starting address of the to-be-stored data in the first virtual disk, where the first The virtual file is a virtual file in the server, and the first virtual disk is a virtual disk corresponding to the first virtual file in the terminal;
  • a determining module 602 configured to determine, according to the starting address and the first virtual file, an offset address of the first storage block unit and the to-be-stored data in the first storage block unit, the first The virtual disk corresponds to at least one storage block unit in the cloud storage platform, and the first storage block unit is one of the at least one storage block unit;
  • the storage module 603 is configured to store the to-be-stored data in the first storage block unit according to the offset address.
  • the determining module 602 includes:
  • An obtaining unit configured to acquire, according to the file identifier of the first virtual file, at least one unit identifier corresponding to the first virtual disk from a correspondence between a file identifier and a unit identifier stored in the cloud storage platform;
  • a determining unit configured to determine, according to the starting address and a capacity of the storage block unit, a first storage block unit and the to-be-stored data in the first storage block unit from a corresponding storage block unit of each unit identifier Offset address.
  • the device 600 further includes:
  • a creating module configured to create a second virtual file corresponding to the second virtual disk in the server when the terminal creates the second virtual disk.
  • the device 600 further includes:
  • An application module configured to apply, in the cloud storage platform, at least one storage block unit corresponding to the second virtual disk, and identify a file identifier of the second virtual file and each storage block in the at least one storage unit
  • the unit identifier of the unit corresponds to the correspondence between the file identifier and the unit identifier stored in the cloud storage platform.
  • the first virtual file corresponds to the connection of the terminal
  • determining the cloud storage platform according to the first virtual file and the starting address in the storage command And an offset address of the first storage block unit for storing data to be stored and the data to be stored in the first storage block unit, according to the offset address, storing the data to be stored in the first storage block unit.
  • the data to be stored is stored in the cloud storage platform, and the reliability of the storage data of the cloud storage platform is high, thereby improving the reliability of the data storage.
  • an embodiment of the present application provides an apparatus 700 for reading data, where the apparatus 700 includes:
  • the receiving module 701 is configured to receive, by using a connection corresponding to the first virtual file, a read command sent by the terminal, where the read command includes an amount of data of the data to be read and the data to be read in the first virtual disk a first virtual file is a virtual file in the server, and the first virtual disk is a virtual disk corresponding to the first virtual file in the terminal;
  • a determining module 702 configured to determine, according to the starting address and the first virtual file, an offset address of the first storage block unit and the to-be-read data in the first storage block unit, where a virtual disk corresponding to at least one memory block unit in the cloud storage platform, the first memory block unit being one of the at least one memory block unit;
  • the reading module 703 is configured to read the data to be read from the first storage block unit according to the offset address and the data amount;
  • the sending module 704 is configured to send the to-be-read data to the terminal.
  • the determining module 702 includes:
  • An obtaining unit configured to acquire, according to the file identifier of the first virtual file, at least one unit identifier corresponding to the first virtual disk from a correspondence between a file identifier and a unit identifier stored in the cloud storage platform;
  • a determining unit configured to determine, according to the starting address and a capacity of the storage block unit, a first storage block unit from the corresponding storage block unit and a data to be read in the first storage block unit The offset address in .
  • the device 700 further includes:
  • a creating module configured to create a second virtual file corresponding to the second virtual disk in the server when the terminal creates the second virtual disk.
  • the device 700 further includes:
  • An application module configured to apply, in the cloud storage platform, at least one storage block unit corresponding to the second virtual disk, and store the file identifier of the second virtual file and each of the at least one storage block unit
  • the unit identifier of the block unit corresponds to the correspondence between the file identifier and the unit identifier stored in the cloud storage platform.
  • the first virtual file corresponds to the connection of the terminal
  • determining the cloud storage according to the first virtual file and the starting address in the read command And a offset address of the first memory block unit for storing data to be read and the data to be read in the first memory block unit in the platform, and reading data in the first memory block unit according to the offset address.
  • This can support the storage of data in the cloud storage platform, and the storage reliability of the cloud storage platform is higher, thereby improving the reliability of the data storage.
  • the foregoing apparatus 600 and the foregoing apparatus 700 may be located in the same device.
  • the two may be located in the server in the embodiment shown in FIG. 1.
  • an embodiment of the present application provides a system 800, where the system 800 includes:
  • the server 803 is configured to receive, by using a connection corresponding to the first virtual file, a storage command sent by the terminal, where the storage command includes data to be stored and a starting address of the to-be-stored data in the first virtual disk.
  • the first virtual file is a virtual file in the server
  • the first virtual disk is a virtual disk corresponding to the first virtual file in the terminal
  • the server 803 is further configured to Determining, by the start address and the first virtual file, an offset address of the first storage block unit and the to-be-stored data in the first storage block unit, where the first virtual disk is in the cloud storage platform Corresponding to at least one memory block unit, the first memory block unit being one of the at least one memory block unit; storing the to-be-stored data in the first memory block unit according to the offset address .
  • the server 803 is configured to receive, by using a connection corresponding to the first virtual file, a read command sent by the terminal, where the read command includes an amount of data to be read data and the to-be-read data is in the first virtual disk.
  • a starting address in the first virtual file is a virtual file in the server
  • the first virtual disk is a virtual disk corresponding to the first virtual file in the terminal; and the server 803.
  • the method is further configured to determine, according to the start address and the first virtual file, an offset address of the first storage block unit and the to-be-read data in the first storage block unit, where the first a virtual disk corresponding to at least one memory block unit in the cloud storage platform, the first memory block unit being one of the at least one memory block unit; according to the offset address and the data amount, from the Reading the data to be read in the first storage block unit; and transmitting the data to be read to the terminal.
  • FIG. 9 is a block diagram showing the structure of an apparatus 900 provided by an exemplary embodiment of the present invention.
  • the device 900 includes a processor 901 and a memory 902.
  • Processor 901 can include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like.
  • the processor 901 can be implemented by at least one of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). achieve.
  • the processor 901 may also include a main processor and a coprocessor.
  • the main processor is a processor for processing data in an awake state, which is also called a CPU (Central Processing Unit); the coprocessor is A low-power processor for processing data in standby.
  • the processor 901 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and rendering of content that needs to be displayed on the display screen.
  • the processor 901 may further include an AI (Artificial Intelligence) processor for processing computational operations related to machine learning.
  • AI Artificial Intelligence
  • Memory 902 can include one or more computer readable storage media, which can be non-transitory. Memory 902 can also include high speed random access memory, as well as non-volatile memory, such as one or more disk storage devices, flash storage devices. In some embodiments, the non-transitory computer readable storage medium in the memory 902 is configured to store at least one instruction for execution by the processor 901 to implement one of the methods provided by the method embodiments of the present application. A method of storing data or a method of reading data.
  • apparatus 900 can also optionally include: a peripheral device interface 903 and at least one peripheral device.
  • the processor 901, the memory 902, and the peripheral device interface 903 can be connected by a bus or a signal line.
  • Each peripheral device can be connected to the peripheral device interface 903 via a bus, signal line or circuit board.
  • the peripheral device includes at least one of a radio frequency circuit 904, a touch display screen 905, a camera 906, an audio circuit 907, a positioning component 908, and a power source 909.
  • the peripheral device interface 903 can be used to connect at least one peripheral device associated with an I/O (Input/Output) to the processor 901 and the memory 902.
  • processor 901, memory 902, and peripheral interface 903 are integrated on the same chip or circuit board; in some other embodiments, any of processor 901, memory 902, and peripheral interface 903 or The two can be implemented on a separate chip or circuit board, which is not limited in this embodiment.
  • the radio frequency circuit 904 is configured to receive and transmit an RF (Radio Frequency) signal, also called an electromagnetic signal. Radio frequency circuit 904 communicates with the communication network and other communication devices via electromagnetic signals. The radio frequency circuit 904 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 904 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and the like. Radio frequency circuit 904 can communicate with other devices via at least one wireless communication protocol.
  • RF Radio Frequency
  • the wireless communication protocols include, but are not limited to, the World Wide Web, a metropolitan area network, an intranet, generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (Wireless Fidelity) networks.
  • the radio frequency circuit 904 may also include NFC (Near Field Communication) related circuits, which is not limited in this application.
  • the display screen 905 is used to display a UI (User Interface).
  • the UI can include graphics, text, icons, video, and any combination thereof.
  • display 905 is a touch display
  • display 905 also has the ability to acquire touch signals over the surface or surface of display 905.
  • the touch signal can be input to the processor 901 as a control signal for processing.
  • the display screen 905 can also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards.
  • the display screen 905 can be one, setting the front panel of the device 900; in other embodiments, the display screen 905 can be at least two, respectively disposed on different surfaces of the device 900 or in a folded design; In still other embodiments, display screen 905 can be a flexible display screen disposed on a curved surface or folded surface of device 900. Even the display screen 905 can be set to a non-rectangular irregular pattern, that is, a profiled screen.
  • the display screen 905 can be prepared by using an LCD (Liquid Crystal Display) or an OLED (Organic Light-Emitting Diode).
  • Camera component 906 is used to capture images or video.
  • camera assembly 906 includes a front camera and a rear camera.
  • the front camera is placed on the front panel of the unit and the rear camera is placed on the back of the unit.
  • the rear camera is at least two, which are respectively a main camera, a depth camera, a wide-angle camera, and a telephoto camera, so as to realize the background blur function of the main camera and the depth camera, and the main camera Combine with a wide-angle camera for panoramic shooting and VR (Virtual Reality) shooting or other integrated shooting functions.
  • camera assembly 906 can also include a flash.
  • the flash can be a monochrome temperature flash or a two-color temperature flash.
  • the two-color temperature flash is a combination of a warm flash and a cool flash that can be used for light compensation at different color temperatures.
  • the audio circuit 907 can include a microphone and a speaker.
  • the microphone is used to collect sound waves of the user and the environment, and convert the sound waves into electrical signals for input to the processor 901 for processing, or to the radio frequency circuit 904 for voice communication.
  • the microphones may be plural, and are respectively disposed at different parts of the device 900.
  • the microphone can also be an array microphone or an omnidirectional acquisition microphone.
  • the speaker is then used to convert electrical signals from processor 901 or radio frequency circuit 904 into sound waves.
  • the speaker can be a conventional film speaker or a piezoelectric ceramic speaker.
  • audio circuit 907 can also include a headphone jack.
  • the location component 908 is used to locate the current geographic location of the device 900 to implement navigation or LBS (Location Based Service).
  • the positioning component 908 can be a positioning component based on a GPS (Global Positioning System) of the United States, a Beidou system of China, or a Galileo system of Russia.
  • Power source 909 is used to power various components in device 900.
  • the power source 909 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery.
  • the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery.
  • a wired rechargeable battery is a battery that is charged by a wired line
  • a wireless rechargeable battery is a battery that is charged by a wireless coil.
  • the rechargeable battery can also be used to support fast charging technology.
  • device 900 also includes one or more sensors 910.
  • the one or more sensors 910 include, but are not limited to, an acceleration sensor 911, a gyro sensor 912, a pressure sensor 913, a fingerprint sensor 914, an optical sensor 915, and a proximity sensor 916.
  • the acceleration sensor 911 can detect the magnitude of the acceleration on the three coordinate axes of the coordinate system established by the device 900.
  • the acceleration sensor 911 can be used to detect components of gravity acceleration on three coordinate axes.
  • the processor 901 can control the touch display screen 905 to display the user interface in a landscape view or a portrait view according to the gravity acceleration signal collected by the acceleration sensor 911.
  • the acceleration sensor 911 can also be used for the acquisition of game or user motion data.
  • the gyro sensor 912 can detect the body direction and the rotation angle of the device 900, and the gyro sensor 912 can cooperate with the acceleration sensor 911 to collect the user's 3D motion on the device 900.
  • the processor 901 can implement functions such as motion sensing (such as changing the UI according to the user's tilting operation), image stabilization at the time of shooting, game control, and inertial navigation, based on the data collected by the gyro sensor 912.
  • the pressure sensor 913 can be disposed on a side border of the device 900 and/or a lower layer of the touch display screen 905.
  • the pressure sensor 913 When the pressure sensor 913 is disposed on the side frame of the device 900, the user's holding signal to the device 900 can be detected, and the processor 901 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 913.
  • the operability control on the UI interface is controlled by the processor 901 according to the user's pressure on the touch display screen 905.
  • the operability control includes at least one of a button control, a scroll bar control, an icon control, and a menu control.
  • the fingerprint sensor 914 is configured to collect the fingerprint of the user, and the processor 901 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 914, or the fingerprint sensor 914 identifies the identity of the user according to the collected fingerprint. Upon identifying that the identity of the user is a trusted identity, the processor 901 authorizes the user to perform related sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying and changing settings, and the like.
  • Fingerprint sensor 914 can be provided with the front, back or side of device 900. When the device 900 is provided with a physical button or vendor logo, the fingerprint sensor 914 can be integrated with a physical button or vendor logo.
  • Optical sensor 915 is used to collect ambient light intensity.
  • the processor 901 can control the display brightness of the touch display screen 905 according to the ambient light intensity collected by the optical sensor 915. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 905 is raised; when the ambient light intensity is low, the display brightness of the touch display screen 905 is lowered.
  • the processor 901 can also dynamically adjust the shooting parameters of the camera assembly 906 according to the ambient light intensity collected by the optical sensor 915.
  • Proximity sensor 916 also referred to as a distance sensor, is typically disposed on the front panel of device 900. Proximity sensor 916 is used to capture the distance between the user and the front of device 900. In one embodiment, when the proximity sensor 916 detects that the distance between the user and the front side of the device 900 is gradually decreasing, the touch screen 905 is controlled by the processor 901 to switch from the bright screen state to the screen state; when the proximity sensor 916 detects When the distance between the user and the front side of the device 900 gradually becomes larger, the processor 901 controls the touch display screen 905 to switch from the state of the screen to the bright state.
  • FIG. 9 does not constitute a limitation to device 900, and may include more or fewer components than those illustrated, or some components may be combined, or different component arrangements may be employed.

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

The present application relates to a method for storing data, and a method, a device, and a system for reading data, and belongs to the field of communications. The method comprises: receiving a storage instruction sent by a terminal by means of a connection corresponding to a first virtual file, wherein the storage instruction comprises data to be stored and a start address, the first virtual file is in a server, and a first virtual disk corresponds to the first virtual file in the terminal; determining, according to the start address and the first virtual file, a first storage block unit and an offset address in the first storage block unit, wherein the first virtual disk corresponds to at least one storage block unit on a cloud storage platform, and the first storage block unit is one of the at least one storage block units; and storing, according to the offset address, the data in the first storage block unit. The present application can improve reliability of data storage.

Description

存储数据的方法、读取数据的方法、装置及系统Method for storing data, method, device and system for reading data
本申请要求于2018年5月9日提交的申请号为201810437833.2、发明名称为“存储数据的方法、读取数据的方法、装置及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims the priority of the Chinese Patent Application No. 201810437833.2 filed on May 9, 2018, entitled "Method of Storing Data, Method, Apparatus and System for Reading Data", the entire contents of which are incorporated by reference. In this application.
技术领域Technical field
本申请涉及通信领域,特别涉及一种存储数据的方法、读取数据的方法、装置及系统。The present application relates to the field of communications, and in particular, to a method for storing data, a method, device, and system for reading data.
背景技术Background technique
在监控领域,终端可以管理至少一个摄像设备,每个摄像设备可以向其对应的终端发送拍摄得到的数据。但终端内的存储空间有限,为此目前在服务端部署了相对廉价的块设备来存储终端中的数据。In the field of monitoring, the terminal can manage at least one camera device, and each camera device can transmit the captured data to its corresponding terminal. However, the storage space in the terminal is limited. For this reason, relatively inexpensive block devices are currently deployed on the server side to store data in the terminal.
块设备中设置有容量较大的磁盘,终端可以将需要存储的数据发送到服务端中与其相连的块设备,块设备接收该数据后将该数据存储本地的磁盘上。由于块设备的可靠性不高,所以将数据存储块设备上,导致数据的存储可靠性也较低。The block device is provided with a large-capacity disk, and the terminal can send the data to be stored to the block device connected to the server, and the block device stores the data and stores the data on the local disk. Since the reliability of the block device is not high, the data storage block device causes the storage reliability of the data to be low.
发明内容Summary of the invention
为了解决相关技术中的问题,本申请实施例提供了一种存储数据的方法、读取数据的方法、装置及系统。所述技术方案如下:In order to solve the problems in the related art, the embodiment of the present application provides a method for storing data, a method, device, and system for reading data. The technical solution is as follows:
第一方面,本申请提供了一种存储数据的方法,所述方法包括:In a first aspect, the present application provides a method of storing data, the method comprising:
通过第一虚拟文件对应的连接接收终端发送的存储命令,所述存储命令包括待存储数据和所述待存储数据在第一虚拟磁盘中的起始地址,所述第一虚拟文件是服务器中的一个虚拟文件,所述第一虚拟磁盘是所述第一虚拟文件在所述终端中对应的虚拟磁盘,所述连接为所述终端与所述服务器之间的一条连接;Receiving, by the connection corresponding to the first virtual file, a storage command sent by the terminal, where the storage command includes data to be stored and a starting address of the to-be-stored data in the first virtual disk, where the first virtual file is in the server a virtual file, the first virtual disk is a virtual disk corresponding to the first virtual file in the terminal, and the connection is a connection between the terminal and the server;
根据所述起始地址和所述第一虚拟文件,确定第一存储块单元和所述待存 储数据在所述第一存储块单元中的偏移地址,所述第一虚拟磁盘在云存储平台中对应至少一个存储块单元,所述第一存储块单元是所述至少一个存储块单元中的一个;Determining, by the start address and the first virtual file, an offset address of the first storage block unit and the to-be-stored data in the first storage block unit, where the first virtual disk is in a cloud storage platform Corresponding to at least one memory block unit, the first memory block unit being one of the at least one memory block unit;
根据所述偏移地址,将所述待存储数据存储在所述第一存储块单元中。And storing the to-be-stored data in the first storage block unit according to the offset address.
示例性的,所述根据所述起始地址和所述第一虚拟文件,确定第一存储块单元和所述待存储数据在所述第一存储块单元中的偏移地址,包括:Illustratively, the determining, according to the start address and the first virtual file, the offset addresses of the first storage block unit and the to-be-stored data in the first storage block unit, including:
根据所述第一虚拟文件的文件标识,从云存储平台存储的文件标识与单元标识的对应关系中获取所述第一虚拟磁盘对应的至少一个单元标识;Obtaining, according to the file identifier of the first virtual file, the at least one unit identifier corresponding to the first virtual disk from the correspondence between the file identifier and the unit identifier stored in the cloud storage platform;
根据所述起始地址和存储块单元的容量,从每个单元标识对应的存储块单元中确定第一存储块单元和所述待存储数据在所述第一存储块单元中的偏移地址。And determining, according to the starting address and the capacity of the storage block unit, an offset address of the first storage block unit and the to-be-stored data in the first storage block unit from the corresponding storage block unit.
示例性的,所述方法还包括:Exemplarily, the method further includes:
当所述终端创建第二虚拟磁盘时,在所述服务器中创建所述第二虚拟磁盘对应的第二虚拟文件。When the terminal creates the second virtual disk, the second virtual file corresponding to the second virtual disk is created in the server.
示例性的,所述在所述服务器中创建所述第二虚拟磁盘对应的第二虚拟文件之后,还包括:Illustratively, after the creating the second virtual file corresponding to the second virtual disk in the server, the method further includes:
在所述云存储平台中申请所述第二虚拟磁盘对应的至少一个存储块单元,将所述第二虚拟文件的文件标识和所述至少一个存储单元中的每个存储块单元的单元标识对应保存在所述云存储平台中的文件标识与单元标识的对应关系中。Applying, in the cloud storage platform, at least one storage block unit corresponding to the second virtual disk, and correspondingly, a file identifier of the second virtual file and a unit identifier of each storage block unit in the at least one storage unit The correspondence between the file identifier and the unit identifier in the cloud storage platform is saved.
第二方面,本申请提供了一种读取数据的方法,所述方法包括:In a second aspect, the present application provides a method of reading data, the method comprising:
通过第一虚拟文件对应的连接接收终端发送的读取命令,所述读取命令包括待读取数据的数据量和所述待读取数据在第一虚拟磁盘中的起始地址,所述第一虚拟文件是服务器中的一个虚拟文件,所述第一虚拟磁盘是所述第一虚拟文件在所述终端中对应的虚拟磁盘,所述连接为所述终端与所述服务器之间的一条连接;Receiving, by the connection corresponding to the first virtual file, a read command sent by the terminal, where the read command includes a data amount of data to be read and a start address of the data to be read in the first virtual disk, where A virtual file is a virtual file in the server, the first virtual disk is a virtual disk corresponding to the first virtual file in the terminal, and the connection is a connection between the terminal and the server. ;
根据所述起始地址和所述第一虚拟文件,确定第一存储块单元和所述待读取数据在所述第一存储块单元中的偏移地址,所述第一虚拟磁盘在云存储平台中对应至少一个存储块单元,所述第一存储块单元是所述至少一个存储块单元中的一个;Determining, according to the start address and the first virtual file, an offset address of the first storage block unit and the to-be-read data in the first storage block unit, the first virtual disk being in a cloud storage Corresponding to at least one memory block unit in the platform, the first memory block unit being one of the at least one memory block unit;
根据所述偏移地址和所述数据量,从所述第一存储块单元中读取所述待读取数据;Reading the data to be read from the first storage block unit according to the offset address and the data amount;
向所述终端发送所述待读取数据。Sending the data to be read to the terminal.
示例性的,所述根据所述起始地址和所述第一虚拟文件,确定第一存储块单元和所述待读取数据在所述第一存储块单元中的偏移地址,包括:Illustratively, the determining, according to the starting address and the first virtual file, the offset addresses of the first storage block unit and the to-be-read data in the first storage block unit, including:
根据所述第一虚拟文件的文件标识,从云存储平台存储的文件标识与单元标识的对应关系中获取所述第一虚拟磁盘对应的至少一个单元标识;Obtaining, according to the file identifier of the first virtual file, the at least one unit identifier corresponding to the first virtual disk from the correspondence between the file identifier and the unit identifier stored in the cloud storage platform;
根据所述起始地址和存储块单元的容量,从每个单元标识对应的存储块单元中确定第一存储块单元和所述待读取数据在所述第一存储块单元中的偏移地址。Determining, according to the starting address and a capacity of the storage block unit, a first memory block unit and an offset address of the data to be read in the first memory block unit from a corresponding memory block unit .
示例性的,所述方法还包括:Exemplarily, the method further includes:
当所述终端创建第二虚拟磁盘时,在所述服务器中创建所述第二虚拟磁盘对应的第二虚拟文件。When the terminal creates the second virtual disk, the second virtual file corresponding to the second virtual disk is created in the server.
示例性的,所述在所述服务器中创建所述第二虚拟磁盘对应的第二虚拟文件之后,还包括:Illustratively, after the creating the second virtual file corresponding to the second virtual disk in the server, the method further includes:
在所述云存储平台中申请所述第二虚拟磁盘对应的至少一个存储块单元,将所述第二虚拟文件的文件标识和所述至少一个存储块单元中的每个存储块单元的单元标识对应保存在所述云存储平台中的文件标识与单元标识的对应关系中。Applying, in the cloud storage platform, at least one storage block unit corresponding to the second virtual disk, and identifying a file identifier of the second virtual file and a unit identifier of each storage block unit in the at least one storage block unit Corresponding to the correspondence between the file identifier and the unit identifier stored in the cloud storage platform.
第三方面,本申请提供了一种存储数据的装置,所述装置包括:In a third aspect, the present application provides an apparatus for storing data, the apparatus comprising:
接收模块,用于通过第一虚拟文件对应的连接接收终端发送的存储命令,所述存储命令包括待存储数据和所述待存储数据在第一虚拟磁盘中的起始地址,所述第一虚拟文件是服务器中的一个虚拟文件,所述第一虚拟磁盘是所述第一虚拟文件在所述终端中对应的虚拟磁盘;a receiving module, configured to receive, by using a connection corresponding to the first virtual file, a storage command sent by the terminal, where the storage command includes data to be stored and a starting address of the to-be-stored data in the first virtual disk, the first virtual The file is a virtual file in the server, and the first virtual disk is a virtual disk corresponding to the first virtual file in the terminal;
确定模块,用于根据所述起始地址和所述第一虚拟文件,确定第一存储块单元和所述待存储数据在所述第一存储块单元中的偏移地址,所述第一虚拟磁盘在云存储平台中对应至少一个存储块单元,所述第一存储块单元是所述至少一个存储块单元中的一个;a determining module, configured to determine, according to the starting address and the first virtual file, an offset address of the first storage block unit and the to-be-stored data in the first storage block unit, the first virtual The disk corresponds to at least one storage block unit in the cloud storage platform, and the first storage block unit is one of the at least one storage block unit;
存储模块,用于根据所述偏移地址,将所述待存储数据存储在所述第一存储块单元中。And a storage module, configured to store the to-be-stored data in the first storage block unit according to the offset address.
示例性的,所述确定模块包括:Exemplarily, the determining module includes:
获取单元,用于根据所述第一虚拟文件的文件标识,从云存储平台存储的文件标识与单元标识的对应关系中获取所述第一虚拟磁盘对应的至少一个单元标识;An obtaining unit, configured to acquire, according to the file identifier of the first virtual file, at least one unit identifier corresponding to the first virtual disk from a correspondence between a file identifier and a unit identifier stored in the cloud storage platform;
确定单元,用于根据所述起始地址和存储块单元的容量,从每个单元标识对应的存储块单元中确定第一存储块单元和所述待存储数据在所述第一存储块单元中的偏移地址。a determining unit, configured to determine, according to the starting address and a capacity of the storage block unit, a first storage block unit and the to-be-stored data in the first storage block unit from a corresponding storage block unit of each unit identifier Offset address.
示例性的,所述装置还包括:Exemplarily, the device further includes:
创建模块,用于当所述终端创建第二虚拟磁盘时,在所述服务器中创建所述第二虚拟磁盘对应的第二虚拟文件。And a creating module, configured to create a second virtual file corresponding to the second virtual disk in the server when the terminal creates the second virtual disk.
示例性的,所述装置还包括:Exemplarily, the device further includes:
申请模块,用于在所述云存储平台中申请所述第二虚拟磁盘对应的至少一个存储块单元,将所述第二虚拟文件的文件标识和所述至少一个存储单元中的每个存储块单元的单元标识对应保存在所述云存储平台中的文件标识与单元标识的对应关系中。An application module, configured to apply, in the cloud storage platform, at least one storage block unit corresponding to the second virtual disk, and identify a file identifier of the second virtual file and each storage block in the at least one storage unit The unit identifier of the unit corresponds to the correspondence between the file identifier and the unit identifier stored in the cloud storage platform.
第四方面,本申请提供了一种读取数据的装置,所述装置包括:In a fourth aspect, the present application provides an apparatus for reading data, the apparatus comprising:
接收模块,用于通过第一虚拟文件对应的连接接收终端发送的读取命令,所述读取命令包括待读取数据的数据量和所述待读取数据在第一虚拟磁盘中的起始地址,所述第一虚拟文件是服务器中的一个虚拟文件,所述第一虚拟磁盘是所述第一虚拟文件在所述终端中对应的虚拟磁盘;a receiving module, configured to receive, by using a connection corresponding to the first virtual file, a read command sent by the terminal, where the read command includes an amount of data of the data to be read and a start of the data to be read in the first virtual disk An address, the first virtual file is a virtual file in the server, and the first virtual disk is a virtual disk corresponding to the first virtual file in the terminal;
确定模块,用于根据所述起始地址和所述第一虚拟文件,确定第一存储块单元和所述待读取数据在所述第一存储块单元中的偏移地址,所述第一虚拟磁盘在云存储平台中对应至少一个存储块单元,所述第一存储块单元是所述至少一个存储块单元中的一个;a determining module, configured to determine, according to the starting address and the first virtual file, an offset address of the first storage block unit and the to-be-read data in the first storage block unit, the first The virtual disk corresponds to at least one storage block unit in the cloud storage platform, and the first storage block unit is one of the at least one storage block unit;
读取模块,用于根据所述偏移地址和所述数据量,从所述第一存储块单元中读取所述待读取数据;a reading module, configured to read the data to be read from the first storage block unit according to the offset address and the data amount;
发送模块,用于向所述终端发送所述待读取数据。And a sending module, configured to send the to-be-read data to the terminal.
示例性的,所述确定模块包括:Exemplarily, the determining module includes:
获取单元,用于根据所述第一虚拟文件的文件标识,从云存储平台存储的文件标识与单元标识的对应关系中获取所述第一虚拟磁盘对应的至少一个单 元标识;And an obtaining unit, configured to acquire, according to the file identifier of the first virtual file, the at least one unit identifier corresponding to the first virtual disk from the correspondence between the file identifier and the unit identifier stored in the cloud storage platform;
确定单元,用于根据所述起始地址和存储块单元的容量,从每个单元标识对应的存储块单元中确定第一存储块单元和所述待读取数据在所述第一存储块单元中的偏移地址。a determining unit, configured to determine, according to the starting address and a capacity of the storage block unit, a first storage block unit from the corresponding storage block unit and a data to be read in the first storage block unit The offset address in .
示例性的,所述装置还包括:Exemplarily, the device further includes:
创建模块,用于当所述终端创建第二虚拟磁盘时,在所述服务器中创建所述第二虚拟磁盘对应的第二虚拟文件。And a creating module, configured to create a second virtual file corresponding to the second virtual disk in the server when the terminal creates the second virtual disk.
示例性的,所述装置还包括:Exemplarily, the device further includes:
申请模块,用于在所述云存储平台中申请所述第二虚拟磁盘对应的至少一个存储块单元,将所述第二虚拟文件的文件标识和所述至少一个存储块单元中的每个存储块单元的单元标识对应保存在所述云存储平台中的文件标识与单元标识的对应关系中。An application module, configured to apply, in the cloud storage platform, at least one storage block unit corresponding to the second virtual disk, and store the file identifier of the second virtual file and each of the at least one storage block unit The unit identifier of the block unit corresponds to the correspondence between the file identifier and the unit identifier stored in the cloud storage platform.
第五方面,本申请提供了一种存储数据的系统,所述系统包括:In a fifth aspect, the application provides a system for storing data, the system comprising:
终端、服务器和云存储平台;Terminal, server and cloud storage platforms;
所述服务器,用于通过第一虚拟文件对应的连接接收所述终端发送的存储命令,所述存储命令包括待存储数据和所述待存储数据在第一虚拟磁盘中的起始地址,所述第一虚拟文件是所述服务器中的一个虚拟文件,所述第一虚拟磁盘是所述第一虚拟文件在所述终端中对应的虚拟磁盘;The server is configured to receive, by using a connection corresponding to the first virtual file, a storage command sent by the terminal, where the storage command includes data to be stored and a starting address of the to-be-stored data in the first virtual disk, The first virtual file is a virtual file in the server, and the first virtual disk is a virtual disk corresponding to the first virtual file in the terminal;
所述服务器,还用于根据所述起始地址和所述第一虚拟文件,确定第一存储块单元和所述待存储数据在所述第一存储块单元中的偏移地址,所述第一虚拟磁盘在所述云存储平台中对应至少一个存储块单元,所述第一存储块单元是所述至少一个存储块单元中的一个;根据所述偏移地址,将所述待存储数据存储在所述第一存储块单元中。The server is further configured to determine, according to the start address and the first virtual file, an offset address of the first storage block unit and the to-be-stored data in the first storage block unit, where a virtual disk corresponding to at least one memory block unit in the cloud storage platform, the first memory block unit being one of the at least one memory block unit; storing the data to be stored according to the offset address In the first memory block unit.
第六方面,本申请提供了一种读取数据的系统,所述系统包括:In a sixth aspect, the application provides a system for reading data, the system comprising:
终端、服务器和云存储平台;Terminal, server and cloud storage platforms;
所述服务器,用于通过第一虚拟文件对应的连接接收所述终端发送的读取命令,所述读取命令包括待读取数据的数据量和所述待读取数据在第一虚拟磁盘中的起始地址,所述第一虚拟文件是所述服务器中的一个虚拟文件,所述第一虚拟磁盘是所述第一虚拟文件在所述终端中对应的虚拟磁盘;The server is configured to receive, by using a connection corresponding to the first virtual file, a read command sent by the terminal, where the read command includes an amount of data to be read data and the to-be-read data is in the first virtual disk a starting address, the first virtual file is a virtual file in the server, and the first virtual disk is a virtual disk corresponding to the first virtual file in the terminal;
所述服务器,还用于根据所述起始地址和所述第一虚拟文件,确定第一存储块单元和所述待读取数据在所述第一存储块单元中的偏移地址,所述第一虚拟磁盘在所述云存储平台中对应至少一个存储块单元,所述第一存储块单元是所述至少一个存储块单元中的一个;根据所述偏移地址和所述数据量,从所述第一存储块单元中读取所述待读取数据;向所述终端发送所述待读取数据。The server is further configured to determine, according to the start address and the first virtual file, an offset address of the first storage block unit and the to-be-read data in the first storage block unit, The first virtual disk corresponds to at least one storage block unit in the cloud storage platform, the first storage block unit is one of the at least one storage block unit; according to the offset address and the data amount, Reading the data to be read in the first storage block unit; and sending the data to be read to the terminal.
第七方面,本申请提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现如第一方面或第一方面中的任一种示例性的方法步骤或所述计算机程序被处理器执行时实现如第一方面或第一方面中的任一种示例性的方法步骤。In a seventh aspect, the present application provides a computer readable storage medium having stored therein a computer program, the computer program being executed by a processor to implement any of the first aspect or the first aspect An exemplary method step or the computer program is executed by a processor to implement any of the exemplary method steps of the first aspect or the first aspect.
在本申请实施例中,由于第一虚拟文件与终端的连接对应,这样在通过该连接接收到终端的存储命令后,根据第一虚拟文件和该存储命令中的起始地址,确定云存储平台中用于存储待存储数据的第一存储块单元和待存储数据在第一存储块单元中的偏移地址,根据该偏移地址,将待存储数据存储在第一存储块单元中。这样实现将待存储数据存储在云存储平台中,而云存储平台的存储数据的可靠性较高,从而提高数据存储的可靠性。In the embodiment of the present application, since the first virtual file corresponds to the connection of the terminal, after receiving the storage command of the terminal through the connection, determining the cloud storage platform according to the first virtual file and the starting address in the storage command And an offset address of the first storage block unit for storing data to be stored and the data to be stored in the first storage block unit, according to the offset address, storing the data to be stored in the first storage block unit. In this way, the data to be stored is stored in the cloud storage platform, and the reliability of the storage data of the cloud storage platform is high, thereby improving the reliability of the data storage.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本申请。The above general description and the following detailed description are intended to be illustrative and not restrictive.
附图说明DRAWINGS
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并与说明书一起用于解释本申请的原理。The drawings herein are incorporated in and constitute a part of the specification,
图1是本申请实施例提供的一种系统架构示意图;1 is a schematic structural diagram of a system provided by an embodiment of the present application;
图2是本申请实施例提供的一种存储数据的方法流程图;2 is a flowchart of a method for storing data according to an embodiment of the present application;
图3是本申请实施例提供的另一种存储数据的方法流程图;FIG. 3 is a flowchart of another method for storing data according to an embodiment of the present application;
图4是本申请实施例提供的一种读取数据的方法流程图;4 is a flowchart of a method for reading data according to an embodiment of the present application;
图5是本申请实施例提供的另一种读取数据的方法流程图;FIG. 5 is a flowchart of another method for reading data according to an embodiment of the present application;
图6是本申请实施例提供的一种读取数据的装置结构示意图;6 is a schematic structural diagram of an apparatus for reading data according to an embodiment of the present application;
图7是本申请实施例提供的一种读取数据的装置结构示意图;7 is a schematic structural diagram of an apparatus for reading data according to an embodiment of the present application;
图8是本申请实施例提供的一种系统结构示意图;FIG. 8 is a schematic structural diagram of a system according to an embodiment of the present disclosure;
图9是本申请实施例提供的一种装置结构示意图。FIG. 9 is a schematic structural diagram of a device according to an embodiment of the present application.
通过上述附图,已示出本申请明确的实施例,后文中将有更详细的描述。这些附图和文字描述并不是为了通过任何方式限制本申请构思的范围,而是通过参考特定实施例为本领域技术人员说明本申请的概念。The embodiments of the present application have been illustrated by the above-described figures, which will be described in more detail hereinafter. The drawings and the written description are not intended to limit the scope of the present invention in any way, and the concept of the present application will be described by those skilled in the art by referring to the specific embodiments.
具体实施方式detailed description
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. The following description refers to the same or similar elements in the different figures unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are merely examples of devices and methods consistent with aspects of the present application as detailed in the appended claims.
参见图1,本申请实施例提供了一种存储系统,该存储系统包括:Referring to FIG. 1, an embodiment of the present application provides a storage system, where the storage system includes:
终端1、服务器2和云存储平台3。Terminal 1, server 2 and cloud storage platform 3.
终端1中包括至少一个虚拟磁盘。服务器2中包括内核层和用户层,内核层包括至少一个虚拟内核设备,用户层包括至少一个虚拟用户设备,每个虚拟用户设备对应一个虚拟文件。每个虚拟内核设备对应用户层中的一个虚拟用户设备以及对应终端1中的一个虚拟磁盘。所以每个虚拟用户设备也与终端1上一个虚拟磁盘对应,同理每个虚拟用户设备的虚拟文件与与终端1上的一个虚拟磁盘对应。The terminal 1 includes at least one virtual disk. The server 2 includes a kernel layer and a user layer. The kernel layer includes at least one virtual kernel device, and the user layer includes at least one virtual user device, and each virtual user device corresponds to one virtual file. Each virtual core device corresponds to one virtual user device in the user layer and one virtual disk in the corresponding terminal 1. Therefore, each virtual user device also corresponds to a virtual disk on the terminal 1, and the virtual file of each virtual user device corresponds to a virtual disk on the terminal 1.
云存储平台3中包括该至少一个虚拟磁盘中的每个虚拟磁盘对应的至少一个存储块单元。The cloud storage platform 3 includes at least one storage block unit corresponding to each of the at least one virtual disk.
终端1与服务器2之间建立有至少一个连接,该至少一个连接均为长连接。对于终端1中的每个虚拟磁盘,该虚拟磁盘对应终端1与服务器2之间的一个连接,对于该虚拟磁盘在服务器2中对应的一个虚拟内核设备、虚拟用户设备和虚拟文件,该虚拟内核设备、该虚拟用户设备和该虚拟文件均与该一个连接相对应。At least one connection is established between the terminal 1 and the server 2, and the at least one connection is a long connection. For each virtual disk in the terminal 1, the virtual disk corresponds to a connection between the terminal 1 and the server 2, and a virtual kernel device, a virtual user device, and a virtual file corresponding to the virtual disk in the server 2, the virtual core The device, the virtual user device, and the virtual file all correspond to the one connection.
示例性的,虚拟磁盘不是终端1中实际存在的物理磁盘,该虚拟磁盘对应的实际存储空间位于云存储平台3中,即该虚拟磁盘对应的实际存储空间为该虚拟磁盘在云存储平台3中对应的至少一个存储块单元。Exemplarily, the virtual disk is not the physical disk actually existing in the terminal 1, and the actual storage space corresponding to the virtual disk is located in the cloud storage platform 3, that is, the actual storage space corresponding to the virtual disk is the virtual disk in the cloud storage platform 3. Corresponding at least one memory block unit.
云存储平台3中保存有文件标识与单元标识的对应关系,该对应关系用于保存该虚拟磁盘对应的虚拟文件的文件标识与该虚拟磁盘对应的每个存储块 单元的单元标识之间的对应关系。The mapping between the file identifier and the unit identifier is saved in the cloud storage platform 3, and the correspondence is used to save the correspondence between the file identifier of the virtual file corresponding to the virtual disk and the unit identifier of each storage block unit corresponding to the virtual disk. relationship.
参见图1,云存储平台3包括元数据集群31和存储集群32,元数据集群31中保存有文件标识与单元标识的对应关系,存储集群32中包括每个虚拟磁盘对应的至少一个存储块单元。Referring to FIG. 1 , the cloud storage platform 3 includes a metadata cluster 31 and a storage cluster 32. The metadata cluster 31 stores a correspondence between a file identifier and a unit identifier. The storage cluster 32 includes at least one storage block unit corresponding to each virtual disk. .
参见图2,本申请实施例提供了一种存储数据的方法,该方法可以应用于图1所示的系统,且该方法的执行主可以为该系统中的服务器,包括:Referring to FIG. 2, the embodiment of the present application provides a method for storing data, which may be applied to the system shown in FIG. 1 , and the execution of the method may be a server in the system, including:
步骤201:通过第一虚拟文件对应的连接接收终端发送的存储命令,该存储命令包括待存储数据和待存储数据在第一虚拟磁盘中的起始地址。Step 201: Receive a storage command sent by the terminal by using a connection corresponding to the first virtual file, where the storage command includes a data to be stored and a starting address of the data to be stored in the first virtual disk.
示例性的,第一虚拟文件是服务器中的一个虚拟文件,第一虚拟磁盘是第一虚拟文件在终端中对应的虚拟磁盘,该连接为终端与服务器之间的一条连接。Exemplarily, the first virtual file is a virtual file in the server, and the first virtual disk is a virtual disk corresponding to the first virtual file in the terminal, and the connection is a connection between the terminal and the server.
步骤202:根据该起始地址和第一虚拟文件,确定第一存储块单元和待存储数据在第一存储块单元中的偏移地址。Step 202: Determine, according to the start address and the first virtual file, an offset address of the first storage block unit and the data to be stored in the first storage block unit.
示例性的,第一虚拟磁盘在云存储平台中对应至少一个存储块单元,第一存储块单元是该至少一个存储块单元中的一个。Exemplarily, the first virtual disk corresponds to at least one storage block unit in the cloud storage platform, and the first storage block unit is one of the at least one storage block unit.
步骤203:根据该偏移地址,将待存储数据存储在第一存储块单元中。Step 203: Store the data to be stored in the first storage block unit according to the offset address.
在本申请实施例中,由于第一虚拟文件与终端的连接对应,这样在通过该连接接收到终端的存储命令后,根据第一虚拟文件和该存储命令中的起始地址,确定云存储平台中用于存储待存储数据的第一存储块单元和待存储数据在第一存储块单元中的偏移地址,根据该偏移地址,将待存储数据存储在第一存储块单元中。这样实现将待存储数据存储在云存储平台中,而云存储平台的存储数据的可靠性较高,从而提高数据存储的可靠性。In the embodiment of the present application, since the first virtual file corresponds to the connection of the terminal, after receiving the storage command of the terminal through the connection, determining the cloud storage platform according to the first virtual file and the starting address in the storage command And an offset address of the first storage block unit for storing data to be stored and the data to be stored in the first storage block unit, according to the offset address, storing the data to be stored in the first storage block unit. In this way, the data to be stored is stored in the cloud storage platform, and the reliability of the storage data of the cloud storage platform is high, thereby improving the reliability of the data storage.
参见图3,本申请实施例提供了一种存储数据的方法,该方法可以应用于图1所示的系统,包括:Referring to FIG. 3, an embodiment of the present application provides a method for storing data, which may be applied to the system shown in FIG. 1, including:
步骤301:终端创建第二虚拟磁盘,在其与服务器之间建立第二虚拟磁盘对应的连接,向服务器发送创建命令,该创建命令包括第二虚拟磁盘的容量。Step 301: The terminal creates a second virtual disk, establishes a connection corresponding to the second virtual disk with the server, and sends a create command to the server, where the create command includes the capacity of the second virtual disk.
用户可以触发终端创建第二虚拟磁盘,并在终端中设置第二虚拟磁盘的容量。这样终端可以获取用户设置的第二虚拟磁盘的容量,创建第二虚拟磁盘,在其与服务器之间建立第二虚拟磁盘对应的连接,通过该连接向服务器发送创 建命令,该创建命令包括第二虚拟磁盘的容量。The user can trigger the terminal to create a second virtual disk and set the capacity of the second virtual disk in the terminal. The terminal can obtain the capacity of the second virtual disk set by the user, create a second virtual disk, establish a connection corresponding to the second virtual disk with the server, and send a create command to the server through the connection, the creation command includes the second The capacity of the virtual disk.
终端创建的第二虚拟磁盘并不是实际存在于终端上的物理磁盘。所以在本实施例中,终端可以不包括磁盘。The second virtual disk created by the terminal is not the physical disk actually existing on the terminal. Therefore, in this embodiment, the terminal may not include a disk.
步骤302:服务器接收该创建命令,创建第二虚拟磁盘对应的第二虚拟文件,设置第二虚拟文件与该连接对应。Step 302: The server receives the creation command, creates a second virtual file corresponding to the second virtual disk, and sets a second virtual file corresponding to the connection.
服务器可以通过该连接接收该创建命令,在其内核层创建第二虚拟磁盘对应的虚拟内核设备,以及在其用户层创建第二虚拟磁盘对应的虚拟用户设备和第二虚拟文件,关联该连接与该虚拟内核设备,关联该虚拟内核设备和该虚拟用户设备,以及关联该虚拟用户设备和第二虚拟文件。The server can receive the creation command through the connection, create a virtual kernel device corresponding to the second virtual disk at the kernel layer thereof, and create a virtual user device corresponding to the second virtual disk and the second virtual file at the user layer thereof, and associate the connection with the virtual device. The virtual kernel device associates the virtual kernel device with the virtual user device and associates the virtual user device with the second virtual file.
示例性的,服务器安装的操作系统可以为linux系统,可以通过提供的targetcli命令创建虚拟内核设备和虚拟用户设备。虚拟内核设备可以充当lun设备使用,lun设备是一种块设备,虚拟用户设备充当UIO设备使用。Exemplarily, the operating system installed by the server may be a Linux system, and the virtual kernel device and the virtual user device may be created by using the provided targetcli command. The virtual kernel device can be used as a lun device, and the lun device is a block device, and the virtual user device acts as a UIO device.
服务器创建的第二虚拟文件并不是实际存在于服务器上的文件,在服务器中可以只用第二虚拟文件的文件标识作为第二虚拟文件。在本实施例中,服务器中也可以不包括磁盘。The second virtual file created by the server is not the file actually existing on the server. In the server, only the file identifier of the second virtual file can be used as the second virtual file. In this embodiment, the disk may not be included in the server.
步骤303:服务器根据第二虚拟磁盘的容量,在云存储平台中申请第二虚拟磁盘对应的至少一个存储块单元。Step 303: The server applies for at least one storage block unit corresponding to the second virtual disk in the cloud storage platform according to the capacity of the second virtual disk.
云存储平台包括元数据集群和存储集群,存储集群中包括大量的存储块单元,每个存储块单元的容量相等。The cloud storage platform includes a metadata cluster and a storage cluster. The storage cluster includes a large number of storage block units, and each storage block unit has the same capacity.
示例性的,存储块单元可以为object。Exemplarily, the memory block unit can be an object.
本步骤可以为:服务器根据第二虚拟磁盘的容量和存储块单元的容量,计算出该第二虚拟磁盘对应的存储块单元的数目,根据该数目从云存储平台的存储集群中申请存储块单元,申请的存储块单元为第二虚拟磁盘对应的存储块单元。The method may be: the server calculates the number of the storage block units corresponding to the second virtual disk according to the capacity of the second virtual disk and the capacity of the storage block unit, and applies the storage block unit from the storage cluster of the cloud storage platform according to the number. The applied storage block unit is a storage block unit corresponding to the second virtual disk.
例如,假设第二虚拟磁盘的容量为30G,云存储平台的存储集群中的每个存储块单元的容量为5G,这样根据第二虚拟磁盘的容量30G和存储块单元的容量5G,计算第二虚拟磁盘对应的存储块单元的数目为6,从云存储平台的存储集群中申请6个存储块单元,该6个存储块单元为第二虚拟磁盘对应的存储块单元。For example, assuming that the capacity of the second virtual disk is 30G, the capacity of each storage block unit in the storage cluster of the cloud storage platform is 5G, so that the second is calculated according to the capacity 30G of the second virtual disk and the capacity 5G of the storage block unit. The number of the storage block units corresponding to the virtual disk is six, and six storage block units are applied from the storage cluster of the cloud storage platform, and the six storage block units are the storage block units corresponding to the second virtual disk.
步骤304:服务器将第二虚拟文件的文件标识和第二虚拟磁盘对应的各存储块单元的单元标识对应保存在云存储平台的文件标识与单元标识的对应关 系中。Step 304: The server saves the file identifier of the second virtual file and the unit identifier of each storage block unit corresponding to the second virtual disk in the corresponding relationship between the file identifier and the unit identifier of the cloud storage platform.
云存储平台的元数据集群中存储有文件标识与单元标识的对应关系。所以在本步骤中服务器可以将第二虚拟文件的文件标识和第二虚拟磁盘对应的各存储块单元的单元标识对应保存在元数据集群中的文件标识与单元标识的对应关系中。The metadata cluster of the cloud storage platform stores the correspondence between the file identifier and the unit identifier. Therefore, in this step, the server may save the file identifier of the second virtual file and the unit identifier of each storage block unit corresponding to the second virtual disk in the correspondence between the file identifier and the unit identifier in the metadata cluster.
示例性的,可以重复执行上述301至304的步骤,在终端上创建多个虚拟磁盘以及在服务器创建每个虚拟磁盘对应的虚拟文件。Exemplarily, the steps of 301 to 304 above may be repeatedly performed, creating a plurality of virtual disks on the terminal and creating a virtual file corresponding to each virtual disk at the server.
在终端上创建了一个或多个虚拟磁盘后,用户可以向终端的某个虚拟磁盘存储数据,为了便于说明称该虚拟磁盘为第一虚拟磁盘,称该数据为待存储数据。然后按如下步骤将待存储数据存储在第一虚拟磁盘中。After one or more virtual disks are created on the terminal, the user can store data to a virtual disk of the terminal. For convenience of description, the virtual disk is called the first virtual disk, and the data is called data to be stored. Then store the data to be stored in the first virtual disk as follows.
步骤305:终端获取待存储数据和待存储数据在第一虚拟磁盘中的起始地址,通过第一虚拟磁盘对应的连接向服务器发送存储命令,该存储命令包括待存储数据和该起始地址。Step 305: The terminal acquires a starting address of the data to be stored and the data to be stored in the first virtual disk, and sends a storage command to the server by using a connection corresponding to the first virtual disk, where the storage command includes data to be stored and the starting address.
示例性的,用户可以向终端输入待存储数据,还可以向终端输入待存储数据在第一虚拟磁盘中的起始地址。或者,终端中可以保存第一虚拟磁盘中已被占用的空间容量,当接收到需要存储到第一虚拟磁盘中的待存储数据时,可以根据已被占用的该空间容量,确定待存储数据在第一虚拟磁盘中的起始地址。Exemplarily, the user may input the data to be stored to the terminal, and may also input the starting address of the data to be stored in the first virtual disk to the terminal. Alternatively, the terminal may save the occupied space capacity of the first virtual disk. When receiving the data to be stored that needs to be stored in the first virtual disk, the data to be stored may be determined according to the occupied space capacity. The starting address in the first virtual disk.
步骤306:服务器通过该连接接收终端发送的存储命令,该存储命令包括待存储数据和待存储数据在第一虚拟磁盘中的起始地址,确定该连接对应的第一虚拟文件。Step 306: The server receives, by using the connection, a storage command sent by the terminal, where the storage command includes a data to be stored and a starting address of the data to be stored in the first virtual disk, and determines a first virtual file corresponding to the connection.
示例性的,第一虚拟文件是第一虚拟磁盘在服务器中对应的一个虚拟文件。且第一虚拟文件存在对应的文件标识。Exemplarily, the first virtual file is a virtual file corresponding to the first virtual disk in the server. And the first virtual file has a corresponding file identifier.
示例性的,服务器通过与该连接关联的虚拟内核设备接收该存储命令,该虚拟内核设备将该存储命令输入到虚拟用户设备。然后服务器从该虚拟用户设备中获取该存储命令。Illustratively, the server receives the storage command via a virtual kernel device associated with the connection, the virtual kernel device entering the storage command into the virtual user device. The server then retrieves the storage command from the virtual user device.
示例性的,终端向服务器发送的命令,首先被内核层的虚拟内核设备接收到,此时服务器并不知道该命令是读取命令,还是存储命令。虚拟内核设备将该命令输入到其对应的虚拟用户设备。在用户层,服务器可以从该虚拟用户设备中获取到该命令,并识别出该命令是读取命令,还是存储命令,并获取该虚拟用户设备对应的虚拟文件作为第一虚拟文件。Exemplarily, the command sent by the terminal to the server is first received by the virtual kernel device of the kernel layer, and the server does not know whether the command is a read command or a storage command. The virtual core device enters the command into its corresponding virtual user device. At the user layer, the server can obtain the command from the virtual user device, and identify whether the command is a read command or a storage command, and obtain a virtual file corresponding to the virtual user device as the first virtual file.
步骤307:服务器根据该起始地址和第一虚拟文件,确定第一存储块单元 和待存储数据在第一存储块单元中的偏移地址。Step 307: The server determines, according to the start address and the first virtual file, an offset address of the first storage block unit and the data to be stored in the first storage block unit.
具体的,服务器根据第一虚拟文件的文件标识,从云存储平台存储的文件标识与单元标识的对应关系中获取第一虚拟磁盘对应的至少一个单元标识;根据该起始地址和存储块单元的容量,从每个单元标识对应的存储块单元中确定第一存储块单元和待存储数据在第一存储块单元中的偏移地址。Specifically, the server acquires, according to the file identifier of the first virtual file, the at least one unit identifier corresponding to the first virtual disk from the correspondence between the file identifier and the unit identifier stored by the cloud storage platform; according to the start address and the storage block unit The capacity determines an offset address of the first memory block unit and the data to be stored in the first memory block unit from the memory block unit corresponding to each unit identifier.
示例性的,云存储平台中的每个存储块单元的容量可以相等。假设待存储数据在第一虚拟磁盘中的起始地址为在7G的位置,而每个存储块单元的容量为5G。这样根据该起始地址和存储块单元的容量,确定的第一存储块单元是第一虚拟磁盘对应的第二个存储块单元以及待存储数据在第一存储块单元中的偏移地址为2G的位置。Exemplarily, the capacity of each memory block unit in the cloud storage platform may be equal. It is assumed that the starting address of the data to be stored in the first virtual disk is at the position of 7G, and the capacity of each storage block unit is 5G. Thus, according to the start address and the capacity of the storage block unit, the determined first storage block unit is the second storage block unit corresponding to the first virtual disk and the offset address of the data to be stored in the first storage block unit is 2G. s position.
步骤308:服务器根据该偏移地址,将待存储数据存储在第一存储块单元中。Step 308: The server stores the data to be stored in the first storage block unit according to the offset address.
例如,服务器可以根据该2G的位置,将待存储的数据存储在第一虚拟磁盘对应的第二个存储块单元中。For example, the server may store the data to be stored in the second storage block unit corresponding to the first virtual disk according to the location of the 2G.
在本申请实施例中,由于在服务器中创建了与终端的虚拟磁盘对应的虚拟内核设备、虚拟用户设备和虚拟文件,这样当在终端的第一虚拟磁盘上存储待存储数据时,服务器通过第一虚拟磁盘对应的虚拟内核设备接收存储命令,该虚拟内核设备向其对应的虚拟用户设备输入该存储命令,服务器从该虚拟用户设备中获取该存储命令,根据虚拟用户设备对应的第一虚拟文件和该存储命令中的起始地址,确定云存储平台中用于存储待存储数据的第一存储块单元和待存储数据在第一存储块单元中的偏移地址,根据该偏移地址,将待存储数据存储在第一存储块单元中。这样实现将待存储数据存储在云存储平台中,而云存储平台的存储数据的可靠性较高,从而提高数据存储的可靠性。In the embodiment of the present application, since the virtual kernel device, the virtual user device, and the virtual file corresponding to the virtual disk of the terminal are created in the server, when the data to be stored is stored on the first virtual disk of the terminal, the server passes the first The virtual kernel device corresponding to the virtual disk receives the storage command, and the virtual kernel device inputs the storage command to the corresponding virtual user device, and the server obtains the storage command from the virtual user device, according to the first virtual file corresponding to the virtual user device. Determining, in the storage command, a first storage block unit for storing data to be stored in the cloud storage platform and an offset address of the data to be stored in the first storage block unit, according to the offset address, The data to be stored is stored in the first memory block unit. In this way, the data to be stored is stored in the cloud storage platform, and the reliability of the storage data of the cloud storage platform is high, thereby improving the reliability of the data storage.
参见图4,本申请实施例提供了一种读取数据的方法,该方法可以应用于图1所示的系统,且该方法的执行主可以为该系统中的服务器,包括:Referring to FIG. 4, the embodiment of the present application provides a method for reading data, which may be applied to the system shown in FIG. 1 , and the execution of the method may be a server in the system, including:
步骤401:通过第一虚拟文件对应的连接接收终端发送的读取命令,该读取命令包括待读取数据的数据量和待读取数据在第一虚拟磁盘中的起始地址。Step 401: The read command sent by the terminal is received by the connection corresponding to the first virtual file, where the read command includes the data amount of the data to be read and the start address of the data to be read in the first virtual disk.
示例性的,第一虚拟文件是服务器中的一个虚拟文件,第一虚拟磁盘是第一虚拟文件在终端中对应的虚拟磁盘,连接为终端与服务器之间的一条连接。Exemplarily, the first virtual file is a virtual file in the server, and the first virtual disk is a virtual disk corresponding to the first virtual file in the terminal, and the connection is a connection between the terminal and the server.
步骤402:根据该起始地址和第一虚拟文件,确定第一存储块单元和待读 取数据在第一存储块单元中的偏移地址。Step 402: Determine an offset address of the first memory block unit and the data to be read in the first memory block unit according to the start address and the first virtual file.
示例性的,第一虚拟磁盘在云存储平台中对应至少一个存储块单元,第一存储块单元是至少一个存储块单元中的一个。Exemplarily, the first virtual disk corresponds to at least one storage block unit in the cloud storage platform, and the first storage block unit is one of the at least one storage block unit.
步骤403:根据该偏移地址和该数据量,从第一存储块单元中读取待读取数据。Step 403: Read data to be read from the first storage block unit according to the offset address and the data amount.
步骤404:向终端发送待读取数据。Step 404: Send data to be read to the terminal.
在本申请实例中,由于第一虚拟文件与终端的连接对应,这样在通过该连接接收到终端的读取命令后,根据第一虚拟文件和该读取命令中的起始地址,确定云存储平台中用于存储待读取数据的第一存储块单元和待读取数据在第一存储块单元中的偏移地址,根据该偏移地址,在第一存储块单元中读取数据。这样可以支持将数据存储在云存储平台中,而云存储平台的存储数据的可靠性较高,从而提高数据存储的可靠性。In the example of the present application, since the first virtual file corresponds to the connection of the terminal, after receiving the read command of the terminal through the connection, determining the cloud storage according to the first virtual file and the starting address in the read command And a offset address of the first memory block unit for storing data to be read and the data to be read in the first memory block unit in the platform, and reading data in the first memory block unit according to the offset address. This can support the storage of data in the cloud storage platform, and the storage reliability of the cloud storage platform is higher, thereby improving the reliability of the data storage.
参见图5,本申请实施例提供了一种读取数据的方法,该方法可以应用于图1所示的系统,包括:Referring to FIG. 5, an embodiment of the present application provides a method for reading data, which may be applied to the system shown in FIG. 1, including:
步骤501至504:分别为与步骤301至304相同,在此不再详细说明。 Steps 501 to 504 are the same as steps 301 to 304, respectively, and will not be described in detail herein.
示例性的,当用户需要第一虚拟磁盘中的数据时,用户可以向终端输入待读取数据在第一虚拟磁盘中的起始地址和待读取数据的数据量,第一虚拟磁盘是终端中的任一虚拟磁盘。Exemplarily, when the user needs data in the first virtual disk, the user may input the starting address of the data to be read in the first virtual disk and the data amount of the data to be read to the terminal, where the first virtual disk is a terminal. Any of the virtual disks in .
步骤505:终端获取待读取数据在第一虚拟磁盘中的起始地址和待读取数据的数据量,通过第一虚拟磁盘对应的连接向服务器发送读取命令,该读取命令包括待读取数据的起始地址和数据量。Step 505: The terminal acquires a starting address of the data to be read in the first virtual disk and a data amount of the data to be read, and sends a read command to the server by using a connection corresponding to the first virtual disk, where the read command includes a to-be-read Take the starting address and amount of data.
示例性的,用户可以向终端直接输入待读取数据在第一虚拟磁盘中的起始地址和数据量。Exemplarily, the user can directly input the starting address and the amount of data of the data to be read in the first virtual disk to the terminal.
相应的,终端接收用户输入的待读取数据在第一虚拟磁盘中的起始地址和待读取数据的数据量,确定与第一虚拟磁盘相对应的连接,通过确定的连接向服务器发送读取命令,该读取命令包括待存储数据的起始地址和数据量。Correspondingly, the terminal receives the start address of the data to be read input by the user in the first virtual disk and the data amount of the data to be read, determines a connection corresponding to the first virtual disk, and sends a read to the server through the determined connection. Taking a command, the read command includes a start address and a data amount of data to be stored.
步骤506:服务器通过该连接接收终端发送的读取命令,该读取命令包括待读取数据在第一虚拟磁盘中的起始地址和数据量,确定该连接对应的第一虚拟文件。Step 506: The server receives, by using the connection, a read command sent by the terminal, where the read command includes a start address and a data amount of the data to be read in the first virtual disk, and determines a first virtual file corresponding to the connection.
示例性的,第一虚拟文件是第一虚拟磁盘在服务器中对应的一个虚拟文 件。且第一虚拟文件存在对应的文件标识。Exemplarily, the first virtual file is a virtual file corresponding to the first virtual disk in the server. And the first virtual file has a corresponding file identifier.
示例性的,服务器通过与该连接关联的虚拟内核设备接收该读取命令,然后该虚拟内核设备将该读取命令输入到虚拟用户设备。然后服务器从该虚拟用户设备中获取该读取命令。Illustratively, the server receives the read command via a virtual core device associated with the connection, and the virtual kernel device then inputs the read command to the virtual user device. The server then obtains the read command from the virtual user device.
示例性的,终端向服务器发送的命令,首先被内核层的虚拟内核设备接收到,此时服务器并不知道该命令是读取命令,还是存储命令。虚拟内核设备将该命令输入到其对应的虚拟用户设备。在用户层,服务器可以从该虚拟用户设备中获取到该命令,并识别出该命令是读取命令,还是存储命令,并获取该虚拟用户设备对应的虚拟文件作为第一虚拟文件。Exemplarily, the command sent by the terminal to the server is first received by the virtual kernel device of the kernel layer, and the server does not know whether the command is a read command or a storage command. The virtual core device enters the command into its corresponding virtual user device. At the user layer, the server can obtain the command from the virtual user device, and identify whether the command is a read command or a storage command, and obtain a virtual file corresponding to the virtual user device as the first virtual file.
步骤507:服务器根据该起始地址和第一虚拟文件,确定第一存储块单元和待读取数据在第一存储块单元中的偏移地址。Step 507: The server determines, according to the start address and the first virtual file, an offset address of the first storage block unit and the data to be read in the first storage block unit.
具体的,服务器根据第一虚拟文件的文件标识,从云存储平台存储的文件标识与单元标识的对应关系中获取第一虚拟磁盘对应的至少一个单元标识;根据该起始地址和存储块单元的容量,从每个单元标识对应的存储块单元中确定第一存储块单元和待读取数据在第一存储块单元中的偏移地址。Specifically, the server acquires, according to the file identifier of the first virtual file, the at least one unit identifier corresponding to the first virtual disk from the correspondence between the file identifier and the unit identifier stored by the cloud storage platform; according to the start address and the storage block unit The capacity determines an offset address of the first memory block unit and the data to be read in the first memory block unit from the corresponding memory block unit of each unit identifier.
示例性的,云存储平台中的每个存储块单元的容量可以相等。假设待存储数据在第一虚拟磁盘中的起始地址为在7G的位置,而每个存储块单元的容量为5G。这样根据该起始地址和存储块单元的容量,确定的第一存储块单元是第一虚拟磁盘对应的第二个存储块单元以及待读取数据在第一存储块单元中的偏移地址为2G的位置。Exemplarily, the capacity of each memory block unit in the cloud storage platform may be equal. It is assumed that the starting address of the data to be stored in the first virtual disk is at the position of 7G, and the capacity of each storage block unit is 5G. Thus, according to the start address and the capacity of the storage block unit, the determined first storage block unit is the second storage block unit corresponding to the first virtual disk and the offset address of the data to be read in the first storage block unit is 2G location.
步骤508:服务器根据该偏移地址和待读取数据的数据量,从第一存储块单元中读取待读取数据,向终端发送待读取数据。Step 508: The server reads the data to be read from the first storage block unit according to the offset address and the data amount of the data to be read, and sends the data to be read to the terminal.
例如,假设待读取数据的2M,服务器可以根据该2G的位置,从第一虚拟磁盘对应的第二个存储块单元中读取2M的待读取数据,通过该连接向终端发送待读取数据。For example, assuming 2M of the data to be read, the server can read 2M of data to be read from the second storage block unit corresponding to the first virtual disk according to the location of the 2G, and send the to-be-readed to the terminal through the connection. data.
在本申请实例中,由于第一虚拟文件与终端的连接对应,这样在通过该连接接收到终端的读取命令后,根据第一虚拟文件和该读取命令中的起始地址,确定云存储平台中用于存储待读取数据的第一存储块单元和待读取数据在第一存储块单元中的偏移地址,根据该偏移地址,在第一存储块单元中读取数据。这样可以支持将数据存储在云存储平台中,而云存储平台的存储数据的可靠性较高,从而提高数据存储的可靠性。In the example of the present application, since the first virtual file corresponds to the connection of the terminal, after receiving the read command of the terminal through the connection, determining the cloud storage according to the first virtual file and the starting address in the read command And a offset address of the first memory block unit for storing data to be read and the data to be read in the first memory block unit in the platform, and reading data in the first memory block unit according to the offset address. This can support the storage of data in the cloud storage platform, and the storage reliability of the cloud storage platform is higher, thereby improving the reliability of the data storage.
下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。The following is an embodiment of the apparatus of the present application, which may be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
参见图6,本申请实施例提供了一种存储数据的装置600,所述装置600包括:Referring to FIG. 6, an embodiment of the present application provides an apparatus 600 for storing data, where the apparatus 600 includes:
接收模块601,用于通过第一虚拟文件对应的连接接收终端发送的存储命令,所述存储命令包括待存储数据和所述待存储数据在第一虚拟磁盘中的起始地址,所述第一虚拟文件是服务器中的一个虚拟文件,所述第一虚拟磁盘是所述第一虚拟文件在所述终端中对应的虚拟磁盘;The receiving module 601 is configured to receive, by using a connection corresponding to the first virtual file, a storage command sent by the terminal, where the storage command includes data to be stored and a starting address of the to-be-stored data in the first virtual disk, where the first The virtual file is a virtual file in the server, and the first virtual disk is a virtual disk corresponding to the first virtual file in the terminal;
确定模块602,用于根据所述起始地址和所述第一虚拟文件,确定第一存储块单元和所述待存储数据在所述第一存储块单元中的偏移地址,所述第一虚拟磁盘在云存储平台中对应至少一个存储块单元,所述第一存储块单元是所述至少一个存储块单元中的一个;a determining module 602, configured to determine, according to the starting address and the first virtual file, an offset address of the first storage block unit and the to-be-stored data in the first storage block unit, the first The virtual disk corresponds to at least one storage block unit in the cloud storage platform, and the first storage block unit is one of the at least one storage block unit;
存储模块603,用于根据所述偏移地址,将所述待存储数据存储在所述第一存储块单元中。The storage module 603 is configured to store the to-be-stored data in the first storage block unit according to the offset address.
示例性的,所述确定模块602包括:Exemplarily, the determining module 602 includes:
获取单元,用于根据所述第一虚拟文件的文件标识,从云存储平台存储的文件标识与单元标识的对应关系中获取所述第一虚拟磁盘对应的至少一个单元标识;An obtaining unit, configured to acquire, according to the file identifier of the first virtual file, at least one unit identifier corresponding to the first virtual disk from a correspondence between a file identifier and a unit identifier stored in the cloud storage platform;
确定单元,用于根据所述起始地址和存储块单元的容量,从每个单元标识对应的存储块单元中确定第一存储块单元和所述待存储数据在所述第一存储块单元中的偏移地址。a determining unit, configured to determine, according to the starting address and a capacity of the storage block unit, a first storage block unit and the to-be-stored data in the first storage block unit from a corresponding storage block unit of each unit identifier Offset address.
示例性的,所述装置600还包括:Exemplarily, the device 600 further includes:
创建模块,用于当所述终端创建第二虚拟磁盘时,在所述服务器中创建所述第二虚拟磁盘对应的第二虚拟文件。And a creating module, configured to create a second virtual file corresponding to the second virtual disk in the server when the terminal creates the second virtual disk.
示例性的,所述装置600还包括:Exemplarily, the device 600 further includes:
申请模块,用于在所述云存储平台中申请所述第二虚拟磁盘对应的至少一个存储块单元,将所述第二虚拟文件的文件标识和所述至少一个存储单元中的每个存储块单元的单元标识对应保存在所述云存储平台中的文件标识与单元标识的对应关系中。An application module, configured to apply, in the cloud storage platform, at least one storage block unit corresponding to the second virtual disk, and identify a file identifier of the second virtual file and each storage block in the at least one storage unit The unit identifier of the unit corresponds to the correspondence between the file identifier and the unit identifier stored in the cloud storage platform.
在本申请实施例中,由于第一虚拟文件与终端的连接对应,这样在通过该连接接收到终端的存储命令后,根据第一虚拟文件和该存储命令中的起始地址,确定云存储平台中用于存储待存储数据的第一存储块单元和待存储数据在第一存储块单元中的偏移地址,根据该偏移地址,将待存储数据存储在第一存储块单元中。这样实现将待存储数据存储在云存储平台中,而云存储平台的存储数据的可靠性较高,从而提高数据存储的可靠性。In the embodiment of the present application, since the first virtual file corresponds to the connection of the terminal, after receiving the storage command of the terminal through the connection, determining the cloud storage platform according to the first virtual file and the starting address in the storage command And an offset address of the first storage block unit for storing data to be stored and the data to be stored in the first storage block unit, according to the offset address, storing the data to be stored in the first storage block unit. In this way, the data to be stored is stored in the cloud storage platform, and the reliability of the storage data of the cloud storage platform is high, thereby improving the reliability of the data storage.
参见图7,本申请实施例提供了一种读取数据的装置700,所述装置700包括:Referring to FIG. 7, an embodiment of the present application provides an apparatus 700 for reading data, where the apparatus 700 includes:
接收模块701,用于通过第一虚拟文件对应的连接接收终端发送的读取命令,所述读取命令包括待读取数据的数据量和所述待读取数据在第一虚拟磁盘中的起始地址,所述第一虚拟文件是服务器中的一个虚拟文件,所述第一虚拟磁盘是所述第一虚拟文件在所述终端中对应的虚拟磁盘;The receiving module 701 is configured to receive, by using a connection corresponding to the first virtual file, a read command sent by the terminal, where the read command includes an amount of data of the data to be read and the data to be read in the first virtual disk a first virtual file is a virtual file in the server, and the first virtual disk is a virtual disk corresponding to the first virtual file in the terminal;
确定模块702,用于根据所述起始地址和所述第一虚拟文件,确定第一存储块单元和所述待读取数据在所述第一存储块单元中的偏移地址,所述第一虚拟磁盘在云存储平台中对应至少一个存储块单元,所述第一存储块单元是所述至少一个存储块单元中的一个;a determining module 702, configured to determine, according to the starting address and the first virtual file, an offset address of the first storage block unit and the to-be-read data in the first storage block unit, where a virtual disk corresponding to at least one memory block unit in the cloud storage platform, the first memory block unit being one of the at least one memory block unit;
读取模块703,用于根据所述偏移地址和所述数据量,从所述第一存储块单元中读取所述待读取数据;The reading module 703 is configured to read the data to be read from the first storage block unit according to the offset address and the data amount;
发送模块704,用于向所述终端发送所述待读取数据。The sending module 704 is configured to send the to-be-read data to the terminal.
示例性的,所述确定模块702包括:Exemplarily, the determining module 702 includes:
获取单元,用于根据所述第一虚拟文件的文件标识,从云存储平台存储的文件标识与单元标识的对应关系中获取所述第一虚拟磁盘对应的至少一个单元标识;An obtaining unit, configured to acquire, according to the file identifier of the first virtual file, at least one unit identifier corresponding to the first virtual disk from a correspondence between a file identifier and a unit identifier stored in the cloud storage platform;
确定单元,用于根据所述起始地址和存储块单元的容量,从每个单元标识对应的存储块单元中确定第一存储块单元和所述待读取数据在所述第一存储块单元中的偏移地址。a determining unit, configured to determine, according to the starting address and a capacity of the storage block unit, a first storage block unit from the corresponding storage block unit and a data to be read in the first storage block unit The offset address in .
示例性的,所述装置700还包括:Exemplarily, the device 700 further includes:
创建模块,用于当所述终端创建第二虚拟磁盘时,在所述服务器中创建所述第二虚拟磁盘对应的第二虚拟文件。And a creating module, configured to create a second virtual file corresponding to the second virtual disk in the server when the terminal creates the second virtual disk.
示例性的,所述装置700还包括:Exemplarily, the device 700 further includes:
申请模块,用于在所述云存储平台中申请所述第二虚拟磁盘对应的至少一个存储块单元,将所述第二虚拟文件的文件标识和所述至少一个存储块单元中的每个存储块单元的单元标识对应保存在所述云存储平台中的文件标识与单元标识的对应关系中。An application module, configured to apply, in the cloud storage platform, at least one storage block unit corresponding to the second virtual disk, and store the file identifier of the second virtual file and each of the at least one storage block unit The unit identifier of the block unit corresponds to the correspondence between the file identifier and the unit identifier stored in the cloud storage platform.
在本申请实例中,由于第一虚拟文件与终端的连接对应,这样在通过该连接接收到终端的读取命令后,根据第一虚拟文件和该读取命令中的起始地址,确定云存储平台中用于存储待读取数据的第一存储块单元和待读取数据在第一存储块单元中的偏移地址,根据该偏移地址,在第一存储块单元中读取数据。这样可以支持将数据存储在云存储平台中,而云存储平台的存储数据的可靠性较高,从而提高数据存储的可靠性。In the example of the present application, since the first virtual file corresponds to the connection of the terminal, after receiving the read command of the terminal through the connection, determining the cloud storage according to the first virtual file and the starting address in the read command And a offset address of the first memory block unit for storing data to be read and the data to be read in the first memory block unit in the platform, and reading data in the first memory block unit according to the offset address. This can support the storage of data in the cloud storage platform, and the storage reliability of the cloud storage platform is higher, thereby improving the reliability of the data storage.
需要说明的是:上述装置600和上述装置700可以位于同一台设备中,例如,二者可以位于图1所示实施例中的服务器中。It should be noted that the foregoing apparatus 600 and the foregoing apparatus 700 may be located in the same device. For example, the two may be located in the server in the embodiment shown in FIG. 1.
参见图8,本申请实施例提供了一种系统800,所述系统800包括:Referring to FIG. 8, an embodiment of the present application provides a system 800, where the system 800 includes:
终端801、服务器802和云存储平台803;a terminal 801, a server 802, and a cloud storage platform 803;
所述服务器803,用于通过第一虚拟文件对应的连接接收所述终端发送的存储命令,所述存储命令包括待存储数据和所述待存储数据在第一虚拟磁盘中的起始地址,所述第一虚拟文件是所述服务器中的一个虚拟文件,所述第一虚拟磁盘是所述第一虚拟文件在所述终端中对应的虚拟磁盘;以及,所述服务器803,还用于根据所述起始地址和所述第一虚拟文件,确定第一存储块单元和所述待存储数据在所述第一存储块单元中的偏移地址,所述第一虚拟磁盘在所述云存储平台中对应至少一个存储块单元,所述第一存储块单元是所述至少一个存储块单元中的一个;根据所述偏移地址,将所述待存储数据存储在所述第一存储块单元中。The server 803 is configured to receive, by using a connection corresponding to the first virtual file, a storage command sent by the terminal, where the storage command includes data to be stored and a starting address of the to-be-stored data in the first virtual disk. The first virtual file is a virtual file in the server, the first virtual disk is a virtual disk corresponding to the first virtual file in the terminal; and the server 803 is further configured to Determining, by the start address and the first virtual file, an offset address of the first storage block unit and the to-be-stored data in the first storage block unit, where the first virtual disk is in the cloud storage platform Corresponding to at least one memory block unit, the first memory block unit being one of the at least one memory block unit; storing the to-be-stored data in the first memory block unit according to the offset address .
或者,or,
所述服务器803,用于通过第一虚拟文件对应的连接接收所述终端发送的读取命令,所述读取命令包括待读取数据的数据量和所述待读取数据在第一虚拟磁盘中的起始地址,所述第一虚拟文件是所述服务器中的一个虚拟文件,所述第一虚拟磁盘是所述第一虚拟文件在所述终端中对应的虚拟磁盘;以及,所述服务器803,还用于根据所述起始地址和所述第一虚拟文件,确定第一存储 块单元和所述待读取数据在所述第一存储块单元中的偏移地址,所述第一虚拟磁盘在所述云存储平台中对应至少一个存储块单元,所述第一存储块单元是所述至少一个存储块单元中的一个;根据所述偏移地址和所述数据量,从所述第一存储块单元中读取所述待读取数据;向所述终端发送所述待读取数据。The server 803 is configured to receive, by using a connection corresponding to the first virtual file, a read command sent by the terminal, where the read command includes an amount of data to be read data and the to-be-read data is in the first virtual disk. a starting address in the first virtual file is a virtual file in the server, the first virtual disk is a virtual disk corresponding to the first virtual file in the terminal; and the server 803. The method is further configured to determine, according to the start address and the first virtual file, an offset address of the first storage block unit and the to-be-read data in the first storage block unit, where the first a virtual disk corresponding to at least one memory block unit in the cloud storage platform, the first memory block unit being one of the at least one memory block unit; according to the offset address and the data amount, from the Reading the data to be read in the first storage block unit; and transmitting the data to be read to the terminal.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。With regard to the apparatus in the above embodiments, the specific manner in which the respective modules perform the operations has been described in detail in the embodiment relating to the method, and will not be explained in detail herein.
图9示出了本发明一个示例性实施例提供的装置900的结构框图。通常,装置900包括有:处理器901和存储器902。FIG. 9 is a block diagram showing the structure of an apparatus 900 provided by an exemplary embodiment of the present invention. Generally, the device 900 includes a processor 901 and a memory 902.
处理器901可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器901可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器901也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU(Central Processing Unit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器901可以在集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器901还可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。 Processor 901 can include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 901 can be implemented by at least one of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). achieve. The processor 901 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, which is also called a CPU (Central Processing Unit); the coprocessor is A low-power processor for processing data in standby. In some embodiments, the processor 901 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and rendering of content that needs to be displayed on the display screen. In some embodiments, the processor 901 may further include an AI (Artificial Intelligence) processor for processing computational operations related to machine learning.
存储器902可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器902还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器902中的非暂态的计算机可读存储介质用于存储至少一个指令,该至少一个指令用于被处理器901所执行以实现本申请中方法实施例提供的一种存储数据的方法或一种读取数据的方法。 Memory 902 can include one or more computer readable storage media, which can be non-transitory. Memory 902 can also include high speed random access memory, as well as non-volatile memory, such as one or more disk storage devices, flash storage devices. In some embodiments, the non-transitory computer readable storage medium in the memory 902 is configured to store at least one instruction for execution by the processor 901 to implement one of the methods provided by the method embodiments of the present application. A method of storing data or a method of reading data.
在一些实施例中,装置900还可选包括有:外围设备接口903和至少一个外围设备。处理器901、存储器902和外围设备接口903之间可以通过总线或信号线相连。各个外围设备可以通过总线、信号线或电路板与外围设备接口903相连。具体地,外围设备包括:射频电路904、触摸显示屏905、摄像头906、 音频电路907、定位组件908和电源909中的至少一种。In some embodiments, apparatus 900 can also optionally include: a peripheral device interface 903 and at least one peripheral device. The processor 901, the memory 902, and the peripheral device interface 903 can be connected by a bus or a signal line. Each peripheral device can be connected to the peripheral device interface 903 via a bus, signal line or circuit board. Specifically, the peripheral device includes at least one of a radio frequency circuit 904, a touch display screen 905, a camera 906, an audio circuit 907, a positioning component 908, and a power source 909.
外围设备接口903可被用于将I/O(Input/Output,输入/输出)相关的至少一个外围设备连接到处理器901和存储器902。在一些实施例中,处理器901、存储器902和外围设备接口903被集成在同一芯片或电路板上;在一些其他实施例中,处理器901、存储器902和外围设备接口903中的任意一个或两个可以在单独的芯片或电路板上实现,本实施例对此不加以限定。The peripheral device interface 903 can be used to connect at least one peripheral device associated with an I/O (Input/Output) to the processor 901 and the memory 902. In some embodiments, processor 901, memory 902, and peripheral interface 903 are integrated on the same chip or circuit board; in some other embodiments, any of processor 901, memory 902, and peripheral interface 903 or The two can be implemented on a separate chip or circuit board, which is not limited in this embodiment.
射频电路904用于接收和发射RF(Radio Frequency,射频)信号,也称电磁信号。射频电路904通过电磁信号与通信网络以及其他通信设备进行通信。射频电路904将电信号转换为电磁信号进行发送,或者,将接收到的电磁信号转换为电信号。可选地,射频电路904包括:天线系统、RF收发器、一个或多个放大器、调谐器、振荡器、数字信号处理器、编解码芯片组、用户身份模块卡等等。射频电路904可以通过至少一种无线通信协议来与其它装置进行通信。该无线通信协议包括但不限于:万维网、城域网、内联网、各代移动通信网络(2G、3G、4G及5G)、无线局域网和/或WiFi(Wireless Fidelity,无线保真)网络。在一些实施例中,射频电路904还可以包括NFC(Near Field Communication,近距离无线通信)有关的电路,本申请对此不加以限定。The radio frequency circuit 904 is configured to receive and transmit an RF (Radio Frequency) signal, also called an electromagnetic signal. Radio frequency circuit 904 communicates with the communication network and other communication devices via electromagnetic signals. The radio frequency circuit 904 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 904 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and the like. Radio frequency circuit 904 can communicate with other devices via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to, the World Wide Web, a metropolitan area network, an intranet, generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the radio frequency circuit 904 may also include NFC (Near Field Communication) related circuits, which is not limited in this application.
显示屏905用于显示UI(User Interface,用户界面)。该UI可以包括图形、文本、图标、视频及其它们的任意组合。当显示屏905是触摸显示屏时,显示屏905还具有采集在显示屏905的表面或表面上方的触摸信号的能力。该触摸信号可以作为控制信号输入至处理器901进行处理。此时,显示屏905还可以用于提供虚拟按钮和/或虚拟键盘,也称软按钮和/或软键盘。在一些实施例中,显示屏905可以为一个,设置装置900的前面板;在另一些实施例中,显示屏905可以为至少两个,分别设置在装置900的不同表面或呈折叠设计;在再一些实施例中,显示屏905可以是柔性显示屏,设置在装置900的弯曲表面上或折叠面上。甚至,显示屏905还可以设置成非矩形的不规则图形,也即异形屏。显示屏905可以采用LCD(Liquid Crystal Display,液晶显示屏)、OLED(Organic Light-Emitting Diode,有机发光二极管)等材质制备。The display screen 905 is used to display a UI (User Interface). The UI can include graphics, text, icons, video, and any combination thereof. When display 905 is a touch display, display 905 also has the ability to acquire touch signals over the surface or surface of display 905. The touch signal can be input to the processor 901 as a control signal for processing. At this time, the display screen 905 can also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards. In some embodiments, the display screen 905 can be one, setting the front panel of the device 900; in other embodiments, the display screen 905 can be at least two, respectively disposed on different surfaces of the device 900 or in a folded design; In still other embodiments, display screen 905 can be a flexible display screen disposed on a curved surface or folded surface of device 900. Even the display screen 905 can be set to a non-rectangular irregular pattern, that is, a profiled screen. The display screen 905 can be prepared by using an LCD (Liquid Crystal Display) or an OLED (Organic Light-Emitting Diode).
摄像头组件906用于采集图像或视频。可选地,摄像头组件906包括前置摄像头和后置摄像头。通常,前置摄像头设置在装置的前面板,后置摄像头设置在装置的背面。在一些实施例中,后置摄像头为至少两个,分别为主摄像头、景深摄像头、广角摄像头、长焦摄像头中的任意一种,以实现主摄像头和景深 摄像头融合实现背景虚化功能、主摄像头和广角摄像头融合实现全景拍摄以及VR(Virtual Reality,虚拟现实)拍摄功能或者其它融合拍摄功能。在一些实施例中,摄像头组件906还可以包括闪光灯。闪光灯可以是单色温闪光灯,也可以是双色温闪光灯。双色温闪光灯是指暖光闪光灯和冷光闪光灯的组合,可以用于不同色温下的光线补偿。 Camera component 906 is used to capture images or video. Optionally, camera assembly 906 includes a front camera and a rear camera. Typically, the front camera is placed on the front panel of the unit and the rear camera is placed on the back of the unit. In some embodiments, the rear camera is at least two, which are respectively a main camera, a depth camera, a wide-angle camera, and a telephoto camera, so as to realize the background blur function of the main camera and the depth camera, and the main camera Combine with a wide-angle camera for panoramic shooting and VR (Virtual Reality) shooting or other integrated shooting functions. In some embodiments, camera assembly 906 can also include a flash. The flash can be a monochrome temperature flash or a two-color temperature flash. The two-color temperature flash is a combination of a warm flash and a cool flash that can be used for light compensation at different color temperatures.
音频电路907可以包括麦克风和扬声器。麦克风用于采集用户及环境的声波,并将声波转换为电信号输入至处理器901进行处理,或者输入至射频电路904以实现语音通信。出于立体声采集或降噪的目的,麦克风可以为多个,分别设置在装置900的不同部位。麦克风还可以是阵列麦克风或全向采集型麦克风。扬声器则用于将来自处理器901或射频电路904的电信号转换为声波。扬声器可以是传统的薄膜扬声器,也可以是压电陶瓷扬声器。当扬声器是压电陶瓷扬声器时,不仅可以将电信号转换为人类可听见的声波,也可以将电信号转换为人类听不见的声波以进行测距等用途。在一些实施例中,音频电路907还可以包括耳机插孔。The audio circuit 907 can include a microphone and a speaker. The microphone is used to collect sound waves of the user and the environment, and convert the sound waves into electrical signals for input to the processor 901 for processing, or to the radio frequency circuit 904 for voice communication. For the purpose of stereo acquisition or noise reduction, the microphones may be plural, and are respectively disposed at different parts of the device 900. The microphone can also be an array microphone or an omnidirectional acquisition microphone. The speaker is then used to convert electrical signals from processor 901 or radio frequency circuit 904 into sound waves. The speaker can be a conventional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only can the electrical signal be converted into human audible sound waves, but also the electrical signal can be converted into sound waves that are inaudible to humans for ranging and the like. In some embodiments, audio circuit 907 can also include a headphone jack.
定位组件908用于定位装置900的当前地理位置,以实现导航或LBS(Location Based Service,基于位置的服务)。定位组件908可以是基于美国的GPS(Global Positioning System,全球定位系统)、中国的北斗系统或俄罗斯的伽利略系统的定位组件。The location component 908 is used to locate the current geographic location of the device 900 to implement navigation or LBS (Location Based Service). The positioning component 908 can be a positioning component based on a GPS (Global Positioning System) of the United States, a Beidou system of China, or a Galileo system of Russia.
电源909用于为装置900中的各个组件进行供电。电源909可以是交流电、直流电、一次性电池或可充电电池。当电源909包括可充电电池时,该可充电电池可以是有线充电电池或无线充电电池。有线充电电池是通过有线线路充电的电池,无线充电电池是通过无线线圈充电的电池。该可充电电池还可以用于支持快充技术。 Power source 909 is used to power various components in device 900. The power source 909 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power source 909 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged by a wired line, and a wireless rechargeable battery is a battery that is charged by a wireless coil. The rechargeable battery can also be used to support fast charging technology.
在一些实施例中,装置900还包括有一个或多个传感器910。该一个或多个传感器910包括但不限于:加速度传感器911、陀螺仪传感器912、压力传感器913、指纹传感器914、光学传感器915以及接近传感器916。In some embodiments, device 900 also includes one or more sensors 910. The one or more sensors 910 include, but are not limited to, an acceleration sensor 911, a gyro sensor 912, a pressure sensor 913, a fingerprint sensor 914, an optical sensor 915, and a proximity sensor 916.
加速度传感器911可以检测以装置900建立的坐标系的三个坐标轴上的加速度大小。比如,加速度传感器911可以用于检测重力加速度在三个坐标轴上的分量。处理器901可以根据加速度传感器911采集的重力加速度信号,控制触摸显示屏905以横向视图或纵向视图进行用户界面的显示。加速度传感器911还可以用于游戏或者用户的运动数据的采集。The acceleration sensor 911 can detect the magnitude of the acceleration on the three coordinate axes of the coordinate system established by the device 900. For example, the acceleration sensor 911 can be used to detect components of gravity acceleration on three coordinate axes. The processor 901 can control the touch display screen 905 to display the user interface in a landscape view or a portrait view according to the gravity acceleration signal collected by the acceleration sensor 911. The acceleration sensor 911 can also be used for the acquisition of game or user motion data.
陀螺仪传感器912可以检测装置900的机体方向及转动角度,陀螺仪传感器912可以与加速度传感器911协同采集用户对装置900的3D动作。处理器901根据陀螺仪传感器912采集的数据,可以实现如下功能:动作感应(比如根据用户的倾斜操作来改变UI)、拍摄时的图像稳定、游戏控制以及惯性导航。The gyro sensor 912 can detect the body direction and the rotation angle of the device 900, and the gyro sensor 912 can cooperate with the acceleration sensor 911 to collect the user's 3D motion on the device 900. The processor 901 can implement functions such as motion sensing (such as changing the UI according to the user's tilting operation), image stabilization at the time of shooting, game control, and inertial navigation, based on the data collected by the gyro sensor 912.
压力传感器913可以设置在装置900的侧边框和/或触摸显示屏905的下层。当压力传感器913设置在装置900的侧边框时,可以检测用户对装置900的握持信号,由处理器901根据压力传感器913采集的握持信号进行左右手识别或快捷操作。当压力传感器913设置在触摸显示屏905的下层时,由处理器901根据用户对触摸显示屏905的压力操作,实现对UI界面上的可操作性控件进行控制。可操作性控件包括按钮控件、滚动条控件、图标控件、菜单控件中的至少一种。The pressure sensor 913 can be disposed on a side border of the device 900 and/or a lower layer of the touch display screen 905. When the pressure sensor 913 is disposed on the side frame of the device 900, the user's holding signal to the device 900 can be detected, and the processor 901 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 913. When the pressure sensor 913 is disposed on the lower layer of the touch display screen 905, the operability control on the UI interface is controlled by the processor 901 according to the user's pressure on the touch display screen 905. The operability control includes at least one of a button control, a scroll bar control, an icon control, and a menu control.
指纹传感器914用于采集用户的指纹,由处理器901根据指纹传感器914采集到的指纹识别用户的身份,或者,由指纹传感器914根据采集到的指纹识别用户的身份。在识别出用户的身份为可信身份时,由处理器901授权该用户执行相关的敏感操作,该敏感操作包括解锁屏幕、查看加密信息、下载软件、支付及更改设置等。指纹传感器914可以被设置装置900的正面、背面或侧面。当装置900上设置有物理按键或厂商Logo时,指纹传感器914可以与物理按键或厂商Logo集成在一起。The fingerprint sensor 914 is configured to collect the fingerprint of the user, and the processor 901 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 914, or the fingerprint sensor 914 identifies the identity of the user according to the collected fingerprint. Upon identifying that the identity of the user is a trusted identity, the processor 901 authorizes the user to perform related sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying and changing settings, and the like. Fingerprint sensor 914 can be provided with the front, back or side of device 900. When the device 900 is provided with a physical button or vendor logo, the fingerprint sensor 914 can be integrated with a physical button or vendor logo.
光学传感器915用于采集环境光强度。在一个实施例中,处理器901可以根据光学传感器915采集的环境光强度,控制触摸显示屏905的显示亮度。具体地,当环境光强度较高时,调高触摸显示屏905的显示亮度;当环境光强度较低时,调低触摸显示屏905的显示亮度。在另一个实施例中,处理器901还可以根据光学传感器915采集的环境光强度,动态调整摄像头组件906的拍摄参数。Optical sensor 915 is used to collect ambient light intensity. In one embodiment, the processor 901 can control the display brightness of the touch display screen 905 according to the ambient light intensity collected by the optical sensor 915. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 905 is raised; when the ambient light intensity is low, the display brightness of the touch display screen 905 is lowered. In another embodiment, the processor 901 can also dynamically adjust the shooting parameters of the camera assembly 906 according to the ambient light intensity collected by the optical sensor 915.
接近传感器916,也称距离传感器,通常设置在装置900的前面板。接近传感器916用于采集用户与装置900的正面之间的距离。在一个实施例中,当接近传感器916检测到用户与装置900的正面之间的距离逐渐变小时,由处理器901控制触摸显示屏905从亮屏状态切换为息屏状态;当接近传感器916检测到用户与装置900的正面之间的距离逐渐变大时,由处理器901控制触摸显示屏905从息屏状态切换为亮屏状态。Proximity sensor 916, also referred to as a distance sensor, is typically disposed on the front panel of device 900. Proximity sensor 916 is used to capture the distance between the user and the front of device 900. In one embodiment, when the proximity sensor 916 detects that the distance between the user and the front side of the device 900 is gradually decreasing, the touch screen 905 is controlled by the processor 901 to switch from the bright screen state to the screen state; when the proximity sensor 916 detects When the distance between the user and the front side of the device 900 gradually becomes larger, the processor 901 controls the touch display screen 905 to switch from the state of the screen to the bright state.
本领域技术人员可以理解,图9中示出的结构并不构成对装置900的限定, 可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。Those skilled in the art will appreciate that the structure illustrated in FIG. 9 does not constitute a limitation to device 900, and may include more or fewer components than those illustrated, or some components may be combined, or different component arrangements may be employed.
本领域技术人员在考虑说明书及实践这里公开的申请后,将容易想到本申请的其它实施方案。本申请旨在涵盖本申请的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本申请的一般性原理并包括本申请未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本申请的真正范围和精神由下面的权利要求指出。Other embodiments of the present application will be readily apparent to those skilled in the <RTIgt; The application is intended to cover any variations, uses, or adaptations of the application, which are in accordance with the general principles of the application and include common general knowledge or common technical means in the art that are not disclosed herein. . The specification and examples are to be regarded as illustrative only,
应当理解的是,本申请并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本申请的范围仅由所附的权利要求来限制。It is to be understood that the invention is not limited to the details of the details and The scope of the present application is limited only by the accompanying claims.

Claims (19)

  1. 一种存储数据的方法,其特征在于,所述方法包括:A method of storing data, the method comprising:
    通过第一虚拟文件对应的连接接收终端发送的存储命令,所述存储命令包括待存储数据和所述待存储数据在第一虚拟磁盘中的起始地址,所述第一虚拟文件是服务器中的一个虚拟文件,所述第一虚拟磁盘是所述第一虚拟文件在所述终端中对应的虚拟磁盘;Receiving, by the connection corresponding to the first virtual file, a storage command sent by the terminal, where the storage command includes data to be stored and a starting address of the to-be-stored data in the first virtual disk, where the first virtual file is in the server a virtual file, the first virtual disk is a virtual disk corresponding to the first virtual file in the terminal;
    根据所述起始地址和所述第一虚拟文件,确定第一存储块单元和所述待存储数据在所述第一存储块单元中的偏移地址,所述第一虚拟磁盘在云存储平台中对应至少一个存储块单元,所述第一存储块单元是所述至少一个存储块单元中的一个;Determining, by the start address and the first virtual file, an offset address of the first storage block unit and the to-be-stored data in the first storage block unit, where the first virtual disk is in a cloud storage platform Corresponding to at least one memory block unit, the first memory block unit being one of the at least one memory block unit;
    根据所述偏移地址,将所述待存储数据存储在所述第一存储块单元中。And storing the to-be-stored data in the first storage block unit according to the offset address.
  2. 如权利要求1所述的方法,其特征在于,所述根据所述起始地址和所述第一虚拟文件,确定第一存储块单元和所述待存储数据在所述第一存储块单元中的偏移地址,包括:The method according to claim 1, wherein said determining, according to said start address and said first virtual file, said first memory block unit and said data to be stored are in said first memory block unit Offset address, including:
    根据所述第一虚拟文件的文件标识,从云存储平台存储的文件标识与单元标识的对应关系中获取所述第一虚拟磁盘对应的至少一个单元标识;Obtaining, according to the file identifier of the first virtual file, the at least one unit identifier corresponding to the first virtual disk from the correspondence between the file identifier and the unit identifier stored in the cloud storage platform;
    根据所述起始地址和存储块单元的容量,从每个单元标识对应的存储块单元中确定第一存储块单元和所述待存储数据在所述第一存储块单元中的偏移地址。And determining, according to the starting address and the capacity of the storage block unit, an offset address of the first storage block unit and the to-be-stored data in the first storage block unit from the corresponding storage block unit.
  3. 如权利要求1或2所述的方法,其特征在于,所述方法还包括:The method of claim 1 or 2, wherein the method further comprises:
    当所述终端创建第二虚拟磁盘时,在所述服务器中创建所述第二虚拟磁盘对应的第二虚拟文件。When the terminal creates the second virtual disk, the second virtual file corresponding to the second virtual disk is created in the server.
  4. 如权利要求3所述的方法,其特征在于,所述在所述服务器中创建所述第二虚拟磁盘对应的第二虚拟文件之后,还包括:The method of claim 3, after the creating the second virtual file corresponding to the second virtual disk in the server, further comprising:
    在所述云存储平台中申请所述第二虚拟磁盘对应的至少一个存储块单元,将所述第二虚拟文件的文件标识和所述至少一个存储单元中的每个存储块单元的单元标识对应保存在所述云存储平台中的文件标识与单元标识的对应关系 中。Applying, in the cloud storage platform, at least one storage block unit corresponding to the second virtual disk, and correspondingly, a file identifier of the second virtual file and a unit identifier of each storage block unit in the at least one storage unit The correspondence between the file identifier and the unit identifier in the cloud storage platform is saved.
  5. 一种读取数据的方法,其特征在于,所述方法包括:A method of reading data, the method comprising:
    通过第一虚拟文件对应的连接接收终端发送的读取命令,所述读取命令包括待读取数据的数据量和所述待读取数据在第一虚拟磁盘中的起始地址,所述第一虚拟文件是服务器中的一个虚拟文件,所述第一虚拟磁盘是所述第一虚拟文件在所述终端中对应的虚拟磁盘;Receiving, by the connection corresponding to the first virtual file, a read command sent by the terminal, where the read command includes a data amount of data to be read and a start address of the data to be read in the first virtual disk, where A virtual file is a virtual file in the server, and the first virtual disk is a virtual disk corresponding to the first virtual file in the terminal;
    根据所述起始地址和所述第一虚拟文件,确定第一存储块单元和所述待读取数据在所述第一存储块单元中的偏移地址,所述第一虚拟磁盘在云存储平台中对应至少一个存储块单元,所述第一存储块单元是所述至少一个存储块单元中的一个;Determining, according to the start address and the first virtual file, an offset address of the first storage block unit and the to-be-read data in the first storage block unit, the first virtual disk being in a cloud storage Corresponding to at least one memory block unit in the platform, the first memory block unit being one of the at least one memory block unit;
    根据所述偏移地址和所述数据量,从所述第一存储块单元中读取所述待读取数据;Reading the data to be read from the first storage block unit according to the offset address and the data amount;
    向所述终端发送所述待读取数据。Sending the data to be read to the terminal.
  6. 如权利要求5所述的方法,其特征在于,所述根据所述起始地址和所述第一虚拟文件,确定第一存储块单元和所述待读取数据在所述第一存储块单元中的偏移地址,包括:The method according to claim 5, wherein said determining, according to said start address and said first virtual file, said first memory block unit and said data to be read are in said first memory block unit The offset address in, including:
    根据所述第一虚拟文件的文件标识,从云存储平台存储的文件标识与单元标识的对应关系中获取所述第一虚拟磁盘对应的至少一个单元标识;Obtaining, according to the file identifier of the first virtual file, the at least one unit identifier corresponding to the first virtual disk from the correspondence between the file identifier and the unit identifier stored in the cloud storage platform;
    根据所述起始地址和存储块单元的容量,从每个单元标识对应的存储块单元中确定第一存储块单元和所述待读取数据在所述第一存储块单元中的偏移地址。Determining, according to the starting address and a capacity of the storage block unit, a first memory block unit and an offset address of the data to be read in the first memory block unit from a corresponding memory block unit .
  7. 如权利要求5或6所述的方法,其特征在于,所述方法还包括:The method of claim 5 or claim 6, wherein the method further comprises:
    当所述终端创建第二虚拟磁盘时,在所述服务器中创建所述第二虚拟磁盘对应的第二虚拟文件。When the terminal creates the second virtual disk, the second virtual file corresponding to the second virtual disk is created in the server.
  8. 如权利要求7所述的方法,其特征在于,所述在所述服务器中创建所述第二虚拟磁盘对应的第二虚拟文件之后,还包括:The method of claim 7, wherein after the creating the second virtual file corresponding to the second virtual disk in the server, the method further comprises:
    在所述云存储平台中申请所述第二虚拟磁盘对应的至少一个存储块单元, 将所述第二虚拟文件的文件标识和所述至少一个存储块单元中的每个存储块单元的单元标识对应保存在所述云存储平台中的文件标识与单元标识的对应关系中。Applying, in the cloud storage platform, at least one storage block unit corresponding to the second virtual disk, and identifying a file identifier of the second virtual file and a unit identifier of each storage block unit in the at least one storage block unit Corresponding to the correspondence between the file identifier and the unit identifier stored in the cloud storage platform.
  9. 一种存储数据的装置,其特征在于,所述装置包括:An apparatus for storing data, the apparatus comprising:
    接收模块,用于通过第一虚拟文件对应的连接接收终端发送的存储命令,所述存储命令包括待存储数据和所述待存储数据在第一虚拟磁盘中的起始地址,所述第一虚拟文件是服务器中的一个虚拟文件,所述第一虚拟磁盘是所述第一虚拟文件在所述终端中对应的虚拟磁盘;a receiving module, configured to receive, by using a connection corresponding to the first virtual file, a storage command sent by the terminal, where the storage command includes data to be stored and a starting address of the to-be-stored data in the first virtual disk, the first virtual The file is a virtual file in the server, and the first virtual disk is a virtual disk corresponding to the first virtual file in the terminal;
    确定模块,用于根据所述起始地址和所述第一虚拟文件,确定第一存储块单元和所述待存储数据在所述第一存储块单元中的偏移地址,所述第一虚拟磁盘在云存储平台中对应至少一个存储块单元,所述第一存储块单元是所述至少一个存储块单元中的一个;a determining module, configured to determine, according to the starting address and the first virtual file, an offset address of the first storage block unit and the to-be-stored data in the first storage block unit, the first virtual The disk corresponds to at least one storage block unit in the cloud storage platform, and the first storage block unit is one of the at least one storage block unit;
    存储模块,用于根据所述偏移地址,将所述待存储数据存储在所述第一存储块单元中。And a storage module, configured to store the to-be-stored data in the first storage block unit according to the offset address.
  10. 如权利要求9所述的装置,其特征在于,所述确定模块包括:The apparatus of claim 9, wherein the determining module comprises:
    获取单元,用于根据所述第一虚拟文件的文件标识,从云存储平台存储的文件标识与单元标识的对应关系中获取所述第一虚拟磁盘对应的至少一个单元标识;An obtaining unit, configured to acquire, according to the file identifier of the first virtual file, at least one unit identifier corresponding to the first virtual disk from a correspondence between a file identifier and a unit identifier stored in the cloud storage platform;
    确定单元,用于根据所述起始地址和存储块单元的容量,从每个单元标识对应的存储块单元中确定第一存储块单元和所述待存储数据在所述第一存储块单元中的偏移地址。a determining unit, configured to determine, according to the starting address and a capacity of the storage block unit, a first storage block unit and the to-be-stored data in the first storage block unit from a corresponding storage block unit of each unit identifier Offset address.
  11. 如权利要求9或10所述的装置,其特征在于,所述装置还包括:The device of claim 9 or 10, wherein the device further comprises:
    创建模块,用于当所述终端创建第二虚拟磁盘时,在所述服务器中创建所述第二虚拟磁盘对应的第二虚拟文件。And a creating module, configured to create a second virtual file corresponding to the second virtual disk in the server when the terminal creates the second virtual disk.
  12. 如权利要求11所述的装置,其特征在于,所述装置还包括:The device of claim 11 wherein said device further comprises:
    申请模块,用于在所述云存储平台中申请所述第二虚拟磁盘对应的至少一个存储块单元,将所述第二虚拟文件的文件标识和所述至少一个存储单元中的 每个存储块单元的单元标识对应保存在所述云存储平台中的文件标识与单元标识的对应关系中。An application module, configured to apply, in the cloud storage platform, at least one storage block unit corresponding to the second virtual disk, and identify a file identifier of the second virtual file and each storage block in the at least one storage unit The unit identifier of the unit corresponds to the correspondence between the file identifier and the unit identifier stored in the cloud storage platform.
  13. 一种读取数据的装置,其特征在于,所述装置包括:A device for reading data, characterized in that the device comprises:
    接收模块,用于通过第一虚拟文件对应的连接接收终端发送的读取命令,所述读取命令包括待读取数据的数据量和所述待读取数据在第一虚拟磁盘中的起始地址,所述第一虚拟文件是服务器中的一个虚拟文件,所述第一虚拟磁盘是所述第一虚拟文件在所述终端中对应的虚拟磁盘;a receiving module, configured to receive, by using a connection corresponding to the first virtual file, a read command sent by the terminal, where the read command includes an amount of data of the data to be read and a start of the data to be read in the first virtual disk An address, the first virtual file is a virtual file in the server, and the first virtual disk is a virtual disk corresponding to the first virtual file in the terminal;
    确定模块,用于根据所述起始地址和所述第一虚拟文件,确定第一存储块单元和所述待读取数据在所述第一存储块单元中的偏移地址,所述第一虚拟磁盘在云存储平台中对应至少一个存储块单元,所述第一存储块单元是所述至少一个存储块单元中的一个;a determining module, configured to determine, according to the starting address and the first virtual file, an offset address of the first storage block unit and the to-be-read data in the first storage block unit, the first The virtual disk corresponds to at least one storage block unit in the cloud storage platform, and the first storage block unit is one of the at least one storage block unit;
    读取模块,用于根据所述偏移地址和所述数据量,从所述第一存储块单元中读取所述待读取数据;a reading module, configured to read the data to be read from the first storage block unit according to the offset address and the data amount;
    发送模块,用于向所述终端发送所述待读取数据。And a sending module, configured to send the to-be-read data to the terminal.
  14. 如权利要求13所述的装置,其特征在于,所述确定模块包括:The apparatus of claim 13 wherein said determining module comprises:
    获取单元,用于根据所述第一虚拟文件的文件标识,从云存储平台存储的文件标识与单元标识的对应关系中获取所述第一虚拟磁盘对应的至少一个单元标识;An obtaining unit, configured to acquire, according to the file identifier of the first virtual file, at least one unit identifier corresponding to the first virtual disk from a correspondence between a file identifier and a unit identifier stored in the cloud storage platform;
    确定单元,用于根据所述起始地址和存储块单元的容量,从每个单元标识对应的存储块单元中确定第一存储块单元和所述待读取数据在所述第一存储块单元中的偏移地址。a determining unit, configured to determine, according to the starting address and a capacity of the storage block unit, a first storage block unit from the corresponding storage block unit and a data to be read in the first storage block unit The offset address in .
  15. 如权利要求13或14所述的装置,其特征在于,所述装置还包括:The device according to claim 13 or 14, wherein the device further comprises:
    创建模块,用于当所述终端创建第二虚拟磁盘时,在所述服务器中创建所述第二虚拟磁盘对应的第二虚拟文件。And a creating module, configured to create a second virtual file corresponding to the second virtual disk in the server when the terminal creates the second virtual disk.
  16. 如权利要求15所述的装置,其特征在于,所述装置还包括:The device of claim 15 wherein said device further comprises:
    申请模块,用于在所述云存储平台中申请所述第二虚拟磁盘对应的至少一个存储块单元,将所述第二虚拟文件的文件标识和所述至少一个存储块单元中 的每个存储块单元的单元标识对应保存在所述云存储平台中的文件标识与单元标识的对应关系中。An application module, configured to apply, in the cloud storage platform, at least one storage block unit corresponding to the second virtual disk, and store the file identifier of the second virtual file and each of the at least one storage block unit The unit identifier of the block unit corresponds to the correspondence between the file identifier and the unit identifier stored in the cloud storage platform.
  17. 一种存储数据的系统,其特征在于,所述系统包括:A system for storing data, characterized in that the system comprises:
    终端、服务器和云存储平台;Terminal, server and cloud storage platforms;
    所述服务器,用于通过第一虚拟文件对应的连接接收所述终端发送的存储命令,所述存储命令包括待存储数据和所述待存储数据在第一虚拟磁盘中的起始地址,所述第一虚拟文件是所述服务器中的一个虚拟文件,所述第一虚拟磁盘是所述第一虚拟文件在所述终端中对应的虚拟磁盘;The server is configured to receive, by using a connection corresponding to the first virtual file, a storage command sent by the terminal, where the storage command includes data to be stored and a starting address of the to-be-stored data in the first virtual disk, The first virtual file is a virtual file in the server, and the first virtual disk is a virtual disk corresponding to the first virtual file in the terminal;
    所述服务器,还用于根据所述起始地址和所述第一虚拟文件,确定第一存储块单元和所述待存储数据在所述第一存储块单元中的偏移地址,所述第一虚拟磁盘在所述云存储平台中对应至少一个存储块单元,所述第一存储块单元是所述至少一个存储块单元中的一个;根据所述偏移地址,将所述待存储数据存储在所述第一存储块单元中。The server is further configured to determine, according to the start address and the first virtual file, an offset address of the first storage block unit and the to-be-stored data in the first storage block unit, where a virtual disk corresponding to at least one memory block unit in the cloud storage platform, the first memory block unit being one of the at least one memory block unit; storing the data to be stored according to the offset address In the first memory block unit.
  18. 一种读取数据的系统,其特征在于,所述系统包括:A system for reading data, characterized in that the system comprises:
    终端、服务器和云存储平台;Terminal, server and cloud storage platforms;
    所述服务器,用于通过第一虚拟文件对应的连接接收所述终端发送的读取命令,所述读取命令包括待读取数据的数据量和所述待读取数据在第一虚拟磁盘中的起始地址,所述第一虚拟文件是所述服务器中的一个虚拟文件,所述第一虚拟磁盘是所述第一虚拟文件在所述终端中对应的虚拟磁盘;The server is configured to receive, by using a connection corresponding to the first virtual file, a read command sent by the terminal, where the read command includes an amount of data to be read data and the to-be-read data is in the first virtual disk a starting address, the first virtual file is a virtual file in the server, and the first virtual disk is a virtual disk corresponding to the first virtual file in the terminal;
    所述服务器,还用于根据所述起始地址和所述第一虚拟文件,确定第一存储块单元和所述待读取数据在所述第一存储块单元中的偏移地址,所述第一虚拟磁盘在所述云存储平台中对应至少一个存储块单元,所述第一存储块单元是所述至少一个存储块单元中的一个;根据所述偏移地址和所述数据量,从所述第一存储块单元中读取所述待读取数据;向所述终端发送所述待读取数据。The server is further configured to determine, according to the start address and the first virtual file, an offset address of the first storage block unit and the to-be-read data in the first storage block unit, The first virtual disk corresponds to at least one storage block unit in the cloud storage platform, the first storage block unit is one of the at least one storage block unit; according to the offset address and the data amount, Reading the data to be read in the first storage block unit; and sending the data to be read to the terminal.
  19. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至4任一所述的方法步骤或所述计算机程序被处理器执行时实现如权利要求5至8任一所述的方法步骤。A computer readable storage medium, wherein the computer readable storage medium stores a computer program, the computer program being executed by a processor to implement the method steps or the method of any one of claims 1 to 4. The method steps of any one of claims 5 to 8 are implemented when the computer program is executed by a processor.
PCT/CN2019/086285 2018-05-09 2019-05-09 Method for storing data, and method, device, and system for reading data WO2019214694A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810437833.2A CN110471613B (en) 2018-05-09 2018-05-09 Data storage method, data reading method, device and system
CN201810437833.2 2018-05-09

Publications (1)

Publication Number Publication Date
WO2019214694A1 true WO2019214694A1 (en) 2019-11-14

Family

ID=68468478

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/086285 WO2019214694A1 (en) 2018-05-09 2019-05-09 Method for storing data, and method, device, and system for reading data

Country Status (2)

Country Link
CN (1) CN110471613B (en)
WO (1) WO2019214694A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112199427A (en) * 2020-09-24 2021-01-08 中国建设银行股份有限公司 Data processing method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060155667A1 (en) * 2004-12-10 2006-07-13 Microsoft Corporation Systems and methods for attaching a virtual machine virtual hard disk to a host machine
CN103795806A (en) * 2013-12-25 2014-05-14 天津火星科技有限公司 Method for achieving cloud storage for mobile terminal
CN105338027A (en) * 2014-07-30 2016-02-17 杭州海康威视系统技术有限公司 Method, system and device for cloud storage of video data
CN105827669A (en) * 2015-01-04 2016-08-03 中国移动通信集团江苏有限公司 Virtual storage method, virtual storage equipment and virtual storage system for terminals
CN107092437A (en) * 2016-02-17 2017-08-25 杭州海康威视数字技术股份有限公司 Data write-in, read method and device, cloud storage system

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4349871B2 (en) * 2003-09-09 2009-10-21 株式会社日立製作所 File sharing apparatus and data migration method between file sharing apparatuses
US8725782B2 (en) * 2011-04-25 2014-05-13 Microsoft Corporation Virtual disk storage techniques
CN103593147B (en) * 2013-11-07 2016-08-17 华为技术有限公司 A kind of method and device of digital independent
CN104778129B (en) * 2014-01-14 2021-08-27 中兴通讯股份有限公司 Method and device for realizing virtual storage of mobile terminal
CN105260142B (en) * 2015-11-03 2018-09-18 宁波市科技园区明天医网科技有限公司 A kind of cloud storage area medical device for image and operation method
US10540165B2 (en) * 2016-02-12 2020-01-21 Nutanix, Inc. Virtualized file server rolling upgrade
CN106648464B (en) * 2016-12-22 2020-01-21 柏域信息科技(上海)有限公司 Multi-node mixed block cache data reading and writing method and system based on cloud storage

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060155667A1 (en) * 2004-12-10 2006-07-13 Microsoft Corporation Systems and methods for attaching a virtual machine virtual hard disk to a host machine
CN103795806A (en) * 2013-12-25 2014-05-14 天津火星科技有限公司 Method for achieving cloud storage for mobile terminal
CN105338027A (en) * 2014-07-30 2016-02-17 杭州海康威视系统技术有限公司 Method, system and device for cloud storage of video data
CN105827669A (en) * 2015-01-04 2016-08-03 中国移动通信集团江苏有限公司 Virtual storage method, virtual storage equipment and virtual storage system for terminals
CN107092437A (en) * 2016-02-17 2017-08-25 杭州海康威视数字技术股份有限公司 Data write-in, read method and device, cloud storage system

Also Published As

Publication number Publication date
CN110471613B (en) 2021-01-12
CN110471613A (en) 2019-11-19

Similar Documents

Publication Publication Date Title
CN110308956B (en) Application interface display method and device and mobile terminal
CN110971930A (en) Live virtual image broadcasting method, device, terminal and storage medium
CN110333834B (en) Frame frequency adjusting method and device, display device and computer readable storage medium
US20220164159A1 (en) Method for playing audio, terminal and computer-readable storage medium
WO2020001564A1 (en) Method, apparatus, and system for processing tasks
CN110740340B (en) Video live broadcast method and device and storage medium
WO2022134632A1 (en) Work processing method and apparatus
WO2019205735A1 (en) Data transmission method and apparatus, and display screen and display apparatus
CN111897465B (en) Popup display method, device, equipment and storage medium
CN112256320A (en) Version number generation method, device, terminal and storage medium
CN111265885B (en) Resource display method, resource sending method, device, equipment and storage medium
CN110797042A (en) Audio processing method, device and storage medium
CN109783176B (en) Page switching method and device
CN111385525B (en) Video monitoring method, device, terminal and system
CN113269877B (en) Method and electronic equipment for acquiring room layout plan
CN111324293B (en) Storage system, data storage method, data reading method and device
CN112181915B (en) Method, device, terminal and storage medium for executing service
WO2019214694A1 (en) Method for storing data, and method, device, and system for reading data
CN111008083A (en) Page communication method and device, electronic equipment and storage medium
CN112669884B (en) Audio data processing method, device, equipment and storage medium
CN114594885A (en) Application icon management method, device and equipment and computer readable storage medium
CN110708582B (en) Synchronous playing method, device, electronic equipment and medium
CN113843814A (en) Control system, method, device and storage medium for mechanical arm equipment
CN108881715B (en) Starting method and device of shooting mode, terminal and storage medium
CN111158791A (en) Configuration file updating method, device and system and storage medium

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: 19799976

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: 19799976

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 19799976

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 17/05/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19799976

Country of ref document: EP

Kind code of ref document: A1