WO2021036909A1 - Picture write-in method and apparatus - Google Patents
Picture write-in method and apparatus Download PDFInfo
- Publication number
- WO2021036909A1 WO2021036909A1 PCT/CN2020/110330 CN2020110330W WO2021036909A1 WO 2021036909 A1 WO2021036909 A1 WO 2021036909A1 CN 2020110330 W CN2020110330 W CN 2020110330W WO 2021036909 A1 WO2021036909 A1 WO 2021036909A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- target
- storage node
- picture
- memory
- target storage
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 94
- 230000015654 memory Effects 0.000 claims abstract description 231
- 230000001133 acceleration Effects 0.000 claims abstract description 80
- 230000008569 process Effects 0.000 claims description 48
- 238000004590 computer program Methods 0.000 claims 2
- 238000012545 processing Methods 0.000 description 9
- 238000010586 diagram Methods 0.000 description 8
- 238000012790 confirmation Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000013403 standard screening design Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/50—Information retrieval; Database structures therefor; File system structures therefor of still image data
- G06F16/51—Indexing; Data structures therefor; Storage structures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0629—Configuration or reconfiguration of storage systems
- G06F3/0631—Configuration or reconfiguration of storage systems by allocating resources to storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0646—Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
- G06F3/0652—Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket
Definitions
- the present disclosure relates to the field of storage technology, and in particular to a method and device for writing pictures.
- a camera set up on a road needs to store the picture after taking the picture, and when the manager views the picture, the picture needs to be extracted.
- the picture is generally stored in a disk, and subsequently read from the disk.
- a method for writing pictures is provided, the method is applied to a target storage node in a cloud storage system, and the target storage node is configured with a disk, a memory, and an SSD (Solid State Drives);
- the methods include:
- the target storage node receives the write request of the target picture, and determines whether the picture resource pool to which the target storage node belongs supports accelerated writing;
- the configured cache type is obtained from the configuration information of the storage node, wherein the cache Type is the cache type of the target picture when the target storage node writes;
- the target storage node writes the target picture into the memory of the target storage node
- the target storage node writes the target picture into the SSD of the target storage node.
- the picture when the amount of data of the picture is relatively small, the picture can be stored in the memory or SSD. Since the writing speed of the memory or SSD is faster, when the amount of data of the picture is relatively small, the writing speed of the picture can be relatively improved. Improve writing efficiency. Moreover, the pictures are stored in the memory or SSD. When reading the pictures, the pictures can be read from the memory or SSD. Since the reading speed of the memory or SSD is faster, the efficiency of reading pictures can also be improved.
- the method further includes:
- the writing the target picture into the memory of the target storage node includes:
- the memory margin after deleting the picture is greater than or equal to the data amount of the target picture, then the picture is written into the memory, and if the memory margin after deleting the picture is less than the data amount of the target picture, execute The process of deleting the picture whose writing time point is the longest from the current time point in the memory.
- the method further includes:
- the target storage node receives the read request of the target picture sent by the requester, and determines whether the picture resource pool to which the target storage node belongs supports accelerated writing, wherein the read request carries the target picture Index information stored on disk;
- the picture resource pool to which the target storage node belongs supports accelerated writing, read the target picture according to the cache type corresponding to the target picture and the read request;
- the reading the target picture according to the cache type corresponding to the target picture and the read request includes:
- the cache type corresponding to the target picture is memory acceleration, determining the first index of the target picture stored in the memory of the target storage node according to the index information;
- the target picture is read from the disk;
- the second index of the target picture stored in the SSD is determined according to the index information, and if the index table corresponding to the SSD configured on the target storage node is searched To the second index, read the target picture from the SSD configured on the target storage node according to the second index;
- the target picture is read from the disk according to the read request.
- the picture can also be read in the memory or SSD, the picture can be read quickly.
- a device for writing pictures is provided, the device is applied to a target storage node in a cloud storage system, the target storage node is configured with a disk, a memory, and an SSD; the device includes:
- the receiving module is used to receive the write request of the target picture
- a judging module for judging whether the image resource pool to which the target storage node belongs supports accelerated writing
- the determining module is configured to obtain the configured cache type from the configuration information of the storage node when the image resource pool to which the target storage node belongs supports accelerated writing, if the data amount of the target picture is less than the target value, Wherein, the cache type is the cache type of the target picture when the target storage node writes;
- a writing module configured to write the target picture into the memory of the target storage node if the cache type is memory acceleration
- the cache type is SSD acceleration
- the target picture is written into the SSD of the target storage node.
- the writing module is also used for:
- the writing module is used for:
- the memory margin after deleting the picture is greater than or equal to the data amount of the target picture, then the picture is written into the memory, and if the memory margin after deleting the picture is less than the data amount of the target picture, execute The process of deleting the picture whose writing time point is the longest from the current time point in the memory.
- the receiving module is further configured to receive a read request of a target picture sent by a requesting party, wherein the read request carries index information of the target picture stored on a disk;
- the judgment module is also used to judge whether the image resource pool to which the target storage node belongs supports accelerated writing;
- the device also includes:
- a reading module configured to read the target picture according to the cache type corresponding to the target picture and the read request if the picture resource pool to which the target storage node belongs supports accelerated writing;
- the sending module is used to send the target picture to the requester.
- the reading module is used for:
- the cache type corresponding to the target picture is memory acceleration, determining the first index of the target picture stored in the memory of the target storage node according to the index information;
- the target picture is read from the disk;
- the second index of the target picture stored in the SSD is determined according to the index information, and if the index table corresponding to the SSD configured on the target storage node is searched To the second index, read the target picture from the SSD configured on the target storage node according to the second index;
- the target picture is read from the disk according to the read request.
- a method for reading pictures is provided, the method is applied to a target storage node in a cloud storage system, the target storage node is configured with a disk, a memory, and a solid-state hard drive (SSD); the method includes:
- the target storage node receives the read request of the target picture sent by the requester, and determines whether the picture resource pool to which the target storage node belongs supports accelerated writing;
- the target image is read in the memory configured by the target storage node according to the read request, where:
- the cache type is the cache type of the target picture when the target storage node writes;
- the picture resource pool to which the target storage node belongs supports accelerated writing, and the cache type is SSD accelerated, reading the target picture from the SSD configured on the target storage node according to the read request;
- the pictures are stored in the memory or SSD, so the pictures can be read from the memory or SSD. Since the read speed of the memory or SSD is faster, the efficiency of reading pictures can be improved.
- the read request carries index information of the target picture stored on the disk
- the reading the target picture in the memory configured by the target storage node according to the reading request includes:
- the target picture is read from the memory of the target storage node according to the first index.
- the read request carries index information of the target picture stored on the disk
- the reading the target picture in the SSD configured on the target storage node according to the reading request includes:
- the target picture is read from the SSD configured on the target storage node according to the second index.
- a storage node for writing pictures includes a processor and a memory, and at least one instruction is stored in the memory, and the instruction is loaded and executed by the processor to achieve the above The method of writing pictures described in the first aspect.
- a computer-readable storage medium is provided, and at least one instruction is stored in the storage medium, and the instruction is loaded and executed by a processor to implement the method for writing a picture as described in the first aspect.
- the target storage node in the cloud storage system is configured with a disk, a memory, and an SSD.
- the target storage node can receive the write request of the target picture and determine whether the picture resource pool to which the target storage node belongs supports accelerated writing, and if the picture resource pool to which the storage node belongs supports accelerated writing , The data amount of the target picture and the size of the target value are judged. If the data amount of the target picture is less than the target value, the configured cache type is obtained from the configuration information of the storage node. If the cache type is memory acceleration, the target storage node writes the target image into the memory of the target storage node.
- the target storage node writes the target image into the SSD configured by the target storage node.
- the picture can be stored in the memory or SSD. Since the writing speed of the memory or SSD is faster, when the amount of data of the picture is relatively small, the writing speed of the picture can be relatively improved. Improve writing efficiency.
- the picture is stored in the memory or SSD, and the picture can be read from the memory or SSD. Since the reading speed of the memory or SSD is faster, the reading efficiency of the picture can also be improved.
- FIG. 1 is a schematic diagram of a cloud storage system provided by an embodiment of the present disclosure
- FIG. 2 is a flowchart of a method for writing pictures according to an embodiment of the present disclosure
- FIG. 3 is a schematic diagram of setting a cache type according to an embodiment of the present disclosure.
- FIG. 4 is a schematic diagram of setting a target value provided by an embodiment of the present disclosure.
- FIG. 5 is a schematic diagram of setting an acceleration strategy according to an embodiment of the present disclosure.
- FIG. 6 is a flowchart of a method for extracting pictures provided by an embodiment of the present disclosure.
- FIG. 7 is a schematic structural diagram of an apparatus for writing pictures according to an embodiment of the present disclosure.
- FIG. 8 is a schematic structural diagram of an apparatus for writing pictures according to an embodiment of the present disclosure.
- FIG. 9 is a schematic structural diagram of a storage node provided by an embodiment of the present disclosure.
- the embodiment of the present disclosure provides a method for writing a picture.
- the execution subject of the method may be a storage node, and the storage node may be a server.
- the storage node may be provided with a processor, a memory, a transceiver, etc., and the processor may be used to process the process of writing pictures.
- the processor is used to write pictures in the storage node, read pictures from the storage node, and so on.
- the memory can be used for the data needed and generated during the process of writing pictures.
- the memory is used for storing written pictures.
- the transceiver can be used for receiving and sending data. For example, it can be used for sending or receiving pictures. It can also be used to receive picture write requests, picture read requests, and so on.
- the method for writing pictures mentioned in the embodiments of the present disclosure is applied to a storage node of a cloud storage system, and there are multiple storage nodes.
- the storage nodes in the cloud storage system can be divided into different picture resource pools, and the same storage node will not exist in different picture resource pools.
- the cloud storage system includes multiple image resource pools, and each image resource pool can be configured to support accelerated writing or not to support accelerated writing.
- the storage node in the image resource pool that supports accelerated writing is configured with disk, memory, and SSD.
- the storage node in the image resource pool that does not support accelerated writing can be configured with disk, memory, and SSD, or only with disk and memory. . What needs to be explained here is that the image resource pool is a virtual storage space.
- the cloud storage system may include an application layer and a device layer.
- the application layer includes a management node and a storage node. Multiple storage nodes form a picture resource pool, and the management node can be used to manage storage nodes in the picture resource pool.
- the device layer includes external storage components of storage nodes, such as disks and SSDs.
- a virtual file system layer is also included between the application layer and the device layer to connect the device layer and the application layer.
- an embodiment of the present disclosure provides a method for writing a picture, taking a picture taken by a camera for storage as an example for description, and the processing flow of the method may be as follows:
- Step 201 The target storage node receives the write request of the target picture, and judges whether the picture resource pool to which the target storage node belongs supports accelerated writing.
- the target picture can be any picture.
- the camera after the camera captures the target picture, it can generate a write request and add the target picture to it, and the camera determines the management node to connect to. Then send the write request to the management node.
- the management node After receiving the write request, the management node can view the image resource pool connected to the camera ID, and determine the storage capacity of each storage node in the storage nodes included in the image resource pool, and the total storage space of each storage node. For any storage node, compare the storage capacity of the storage node with the total storage space capacity of the storage node to obtain the storage occupancy rate of the storage node.
- the management node may select the storage node with the least occupancy rate (hereinafter may be referred to as the target storage node), and send a write request of the target picture to the target storage node.
- the target storage node may receive the write request sent by the management node, and parse the write request to obtain the target picture.
- the target storage node may obtain the corresponding relationship between the storage node and the picture resource pool, and from the corresponding relationship, determine the picture resource pool to which the target storage node belongs, or the configuration information of the target storage node includes the identity of the picture resource pool to which it belongs, The target storage node can directly obtain the identification of the picture resource pool to which it belongs from the configuration information. Then the target storage node obtains the configuration file of the image resource pool, obtains the writing flag of the image resource pool from the configuration file, and determines whether the image resource pool supports accelerated writing according to the value of the writing flag.
- the foregoing is based on the storage occupancy rate of the storage node to determine the target storage node. In the embodiments of the present disclosure, it may also be based on the weighting of the storage occupancy rate of the storage node and the central processing unit (CPU) occupancy rate of the storage node. Value to determine the target storage node.
- the management node determines the storage node with the smallest weighted value of the storage occupancy rate and the CPU occupancy rate as the target storage node.
- the weight coefficients corresponding to the storage occupancy rate and the CPU occupancy rate are different, and the sum is 1, and the weight coefficient corresponding to the storage occupancy rate is greater than the weight coefficient corresponding to the CPU occupancy rate.
- Step 202 When the image resource pool to which the target storage node belongs supports accelerated writing, if the data amount of the target image is less than the target value, obtain the configured cache type from the configuration information of the storage node.
- the target value can be set and stored in the storage node.
- the target value generally belongs to 0 ⁇ 500k and can be set to 100k.
- Cache types are generally divided into non-accelerated, memory accelerated, and SSD accelerated.
- the target storage node may determine that the picture resource pool supports accelerated writing.
- the target storage node may determine that the picture resource pool does not support accelerated writing.
- the first value and the second value are different values. For example, the first value may be 1, and the second value may be zero.
- the target storage node can determine the relationship between the data volume of the target image and the target value. If the data volume of the target image is less than the target value, it can obtain the configured cache type from the configuration information of the target storage node, and then set the cache type Set to the cache type corresponding to the target image. In this way, when the data volume of the picture is less than the target value, it can be accelerated by means of memory or SSD to increase the writing speed. In this way, because the target value is set, when the amount of image data is relatively small, it can be stored in SSD or memory, and when the amount of image data is relatively large, it can be stored in the disk, not only without losing the image, but also improving The reading speed of pictures with a relatively small amount of data.
- the target storage node writes the target image to the disk of the target storage node.
- the target storage node may first directly write the target image to the disk of the target storage node, and then determine whether the image resource pool to which the target storage node belongs supports accelerated writing.
- the target storage node may first determine whether the picture resource pool to which the target storage node belongs supports accelerated writing, and then write the target picture to the disk. In this way, if the image resource pool does not support acceleration or supports acceleration, the image can also be written to the disk, which can prevent the loss of image data.
- step 202 if the data amount of the target picture is greater than or equal to the target value, since the target picture has been written to the disk of the target storage node, subsequent processing is not required, and the writing process of the target picture is completed. In addition, if the target picture does not support accelerated writing, the target picture is written to the disk of the target storage node, no subsequent processing is required, and the writing process of the target picture is completed.
- Step 203 If the cache type is memory acceleration, the target image is written into the memory of the storage node; if the cache type is solid state drive SSD acceleration, the target image is written into the SSD of the storage node.
- the target storage node can write the target image into the memory of the target storage node, and create the index value of the target image for subsequent retrieval from the memory of the target storage node Read the target picture.
- the index value here can be the identification of the target picture.
- the target storage node maintains an index table.
- the index table includes the corresponding relationship between the index value and the storage location information.
- the target storage node also records the corresponding relationship between the index value and the block identifier of the target image stored on the disk. In this way, Later, you can use the identifier of the block in the disk to find the storage location information of the target picture in the memory.
- the target storage node can determine its own SSD, write the target picture into its own SSD, and create the index value of the target picture for subsequent reading of the target picture from the SSD.
- the index value here can be the identification of the target picture.
- the target storage node maintains an index table.
- the index table includes the corresponding relationship between the index value and the storage location information.
- the target storage node also records the corresponding relationship between the index value and the block identifier of the picture stored on the disk. In this way, the subsequent You can use the identifier of the block in the disk to find the storage location information of the target image stored in the SSD.
- the data amount of the target image and the size of the memory margin are also determined, and the processing can be as follows:
- the target image is written into the memory of the target storage node; if the current memory margin of the target storage node is less than the data amount of the target image, then the target image is written in the memory Delete the picture that is the longest from the current time point in the writing time point; if the memory margin after deleting the picture is greater than or equal to the data amount of the target picture, then the picture is written into the memory, if the memory margin after deleting the picture is less than the target For the amount of data of the picture, the process of deleting the picture whose writing time point is the longest from the current time point in the memory is executed.
- the target storage node can determine the memory margin of the current memory, and the memory margin refers to the space in the current memory that has not yet stored data. Then the target storage node can compare the memory margin with the size of the data volume of the target picture. If the memory margin is greater than or equal to the data amount of the target picture, the target picture can be directly written into the memory of the target storage node.
- the target storage node can determine the picture with the longest time point from the current time point in the memory, and then delete the picture. Then determine the current memory margin, if the memory margin is greater than or equal to the data amount of the target picture, you can directly write the target picture into the memory. If the current memory margin is still less than the data amount of the target picture, you can continue to delete the picture in the current memory and write the picture with the longest time point from the current time point until the memory margin is greater than or equal to the data amount of the target picture. Write to the memory of the target storage node.
- the target storage node after the target storage node writes the target image to the disk of the target storage node, it may return index information to the management node, where the index information is the identifier of the disk to which the target image is written and the identifier of the block. .
- the process shown in FIG. 2 may be executed by an application on the target storage node.
- the configuration information of the target storage node can be read, and configuration items such as the cache type, memory size, and target value can be obtained from it.
- the application detects that the memory cache is enabled in the configuration item, it can create a memory for caching pictures according to the size of the memory, and initialize the memory, and then use the memory to cache pictures. If the memory allocation fails, the application fails to start, and the memory cannot be used to cache pictures subsequently.
- process shown in Figure 2 it can be executed by an application on the target storage node.
- the application there are two processes, one is A process, the other is B process, A and Process B is connected through a unix domain socket link.
- process A can receive the requester’s write request and inform process B through the unix domain socket link.
- Process B can perform the above step 202 To 203.
- the index information (the index information is the identifier of the disk and the identifier of the block stored in the disk) is returned to the A process through the unix domain socket link.
- Process A can feed back to the requesting party.
- the user can click the option to set the cache type on the cloud storage system management page displayed on the terminal to trigger the terminal to display the storage node that has not set the cache type, find the target storage node in it, and select the cache for the target storage node Types of. Then the user can click the confirmation option to trigger the generation of the setting information of the cache type (the setting information carries the set cache type), and send the setting information of the cache type to the target storage node (a1).
- the target storage node can update the cache type set by the user to the configuration file (a2), and then return success to the display terminal of the cloud storage system management page (a3).
- the user can click the threshold setting option on the cloud storage system management page displayed on the terminal, and the terminal will display a threshold input box, and the user can enter the target value. Then the user can click the OK option to trigger the terminal to send the threshold setting information (the setting information carries the target value) (b1).
- the management node inserts the target value into the database of the management node (b2), and updates the target value to the zookeeper node (b3).
- the target storage node can monitor the zookeeper node, obtain the target value, write it into the memory, and write it to its configuration file (b4).
- other management nodes can synchronize the target value to their own memory and database by monitoring the target value of the management node.
- a process for the target storage node to obtain an indication message of whether the image resource pool supports acceleration is also provided:
- the user can click the acceleration policy setting option on the cloud storage system management page of the terminal to trigger the terminal to display the image resource pool for which the acceleration policy is not set, and find the image resource pool to which the target storage node belongs, as the target Select the acceleration strategy for the image resource pool to which the storage node belongs.
- the user can click the confirmation option to trigger the terminal to generate acceleration indication information, which can be used to indicate any acceleration strategy of acceleration support and non-support acceleration.
- the terminal sends the acceleration instruction information to the management node (c1), and the management node can insert the acceleration strategy in the acceleration instruction information into the database of the management node (c2), and update the acceleration strategy to the zookeeper node (c3).
- the target storage node can monitor the zookeeper node, obtain the acceleration strategy, write to the memory, and write to its own configuration file (c4).
- other management nodes can synchronize the acceleration strategy to their own memory and database by monitoring the acceleration strategy of the management node.
- the above-mentioned management node receives the acceleration indication information and the target value through CLI (command-line interface) interface.
- CLI command-line interface
- the above-mentioned target storage node receives the cache type, it also uses CLI to receive it. of.
- the cache type of the picture resource pool can also be modified.
- the user can select the image resource pool to which the target storage node belongs in the cloud storage system management page of the terminal, and re-select the acceleration strategy for the image resource pool to which the target storage node belongs.
- the user can click the confirmation option to trigger the terminal to generate update acceleration indication information, which can be used to indicate the modified acceleration strategy.
- the terminal sends the update acceleration instruction information to the management node, and the management node can use the acceleration strategy in the update acceleration instruction information to update the currently existing acceleration strategy.
- the target storage node can monitor the zookeeper node, obtain the updated acceleration strategy, write the updated acceleration strategy into the memory, and update the existing acceleration strategy in its configuration file.
- processing of reading the target picture is also provided, and the corresponding processing flow may be as follows:
- Step 601 Receive a read request for a target picture sent by the requesting party, where the read request carries index information of the target picture stored on the disk.
- the target picture when the target picture is to be viewed, the target picture can be read, and the user viewing the target picture can operate the terminal (that is, the requester) to send a read request of the target picture to the target storage node.
- the read request carries the index information of the target picture stored in the disk, which may be the identifier of the disk and the identifier of the block in the disk.
- the target storage node may receive the read request of the target picture, and parse the index information of the target picture stored on the disk, that is, the identifier of the stored disk and the identifier of the block in the disk.
- Step 602 Determine whether the picture resource pool to which the target storage node belongs supports accelerated writing. If the picture resource pool to which the target storage node belongs supports accelerated writing, read the target picture according to the cache type and read request corresponding to the target picture.
- the target storage node can obtain the corresponding relationship between the storage node and the picture resource pool, and from the corresponding relationship, determine the picture resource pool to which the target storage node belongs, or the configuration information of the target storage node includes the picture resource to which it belongs The identification of the pool, the target storage node can directly obtain the picture resource pool to which it belongs from the configuration information. Then obtain the configuration file of the picture resource pool, obtain the write flag of the picture resource pool from the configuration file, and determine the picture resource pool according to the value of the write flag if the value is the first value Support accelerated writing. If the value is the second value, it is determined that the image resource pool does not support accelerated writing.
- the target storage node can obtain the configuration item of the cache type in the configuration file, and determine the cache type according to the value of the configuration item.
- the cache type is no acceleration, memory acceleration, and SSD
- the cache type in the configuration file is determined as the cache type corresponding to the target picture (this process has been discussed above, and will not be repeated here). For example, if the value of the configuration item is 0, the cache type is determined to be no acceleration, if the value of the configuration item is 1, the cache type is determined to be SSD acceleration, and if the value of the configuration item is 2, the cache type is determined to be memory acceleration.
- the target storage node can use the cache type corresponding to the target picture and the index information of the target picture stored on the disk to read the target picture from the target storage node.
- the target image can be read as follows:
- the first index of the target image stored in the memory of the target storage node is determined according to the index information. If the first index is found in the index table corresponding to the memory of the target storage node, According to the first index, the target picture is read from the memory of the target storage node; if the first index is not found in the index table corresponding to the memory of the target storage node, the target picture is read from the disk. If the target picture corresponds to If the cache type of is SSD acceleration, the second index of the target image stored in the SSD is determined according to the index information.
- the second index is found in the index table corresponding to the SSD configured on the target storage node, the second index is used from The target image is read from the SSD configured on the target storage node. If the second index is not found in the index table corresponding to the SSD configured on the target storage node, the target image is read from the disk according to the read request.
- the cache type corresponding to the target picture is memory acceleration
- the first index and then look for the first index in the index table corresponding to the memory of the target storage node. If the first index exists, the target image can be read at the position corresponding to the first index in the memory of the target storage node .
- the first index does not exist in the index table corresponding to the memory of the target storage node, you can directly read the target image from the disk, using the disk identifier and block identifier (in this case, the target image is generally in the target storage node).
- the storage time in the configured memory is relatively long and has been deleted).
- the target image can be read directly from the disk using the disk identifier and the block identifier.
- the cache type corresponding to the target image is SSD acceleration
- the corresponding relationship between the index value and the identifier of the block stored in the disk of the image can be found according to the index information, and the second index of the target image stored in the SSD of the target storage node can be determined. If the second index can be found in the index table of the SSD of the target storage node, the target image can be read at the position corresponding to the second index in the SSD of the target storage node.
- the disk identifier and block identifier in the index information can be used to read the target picture (in this case, the target picture is generally stored in the target storage).
- the storage time in the SSD of the node configuration is relatively long and has been deleted).
- the read request carries a MYSQL (Structured Query Language, structured query language) database index (that is, the identifier of the disk and the identifier of the block), which is used to locate the position of the image data on the disk.
- the first index is generated when the data of the picture is stored in the memory, and can be called a memory index, which is used to locate the address of the data of the picture in the memory.
- the second index is generated when the data of the picture is stored in the SSD, and can be called a DB (databases, database) index, which is used to locate the address of the data of the picture in the SSD.
- step 603 If the target picture is read, step 603 is executed. If the target picture is not read, the target picture is read from the disk.
- Step 603 Send the target picture to the requesting party.
- the target storage node after the target storage node reads the target picture, it can send the target picture to the requesting party.
- process A can receive the requester's read request and notify process B through the unix domain socket link.
- Process B can perform the above steps 602 to 603, and then send the read target picture to the A process through the unix domain socket link, and the A process can feed back to the requester.
- the unix domain socket link established by the A process and the B process can be connected all the time, and through the heartbeat message, it is detected whether the unix domain socket link is in a connected state. If it is not in a connected state, a unix domain socket link is established. If it is in the connected state, continue to use the heartbeat message to detect whether the unix domain socket link is in the connected state
- the storage node in the cloud storage system is configured with a disk, a memory, and an SSD.
- the target storage node can receive the write request of the target picture and determine whether the picture resource pool to which the target storage node belongs supports accelerated writing, and if the picture resource pool to which the storage node belongs supports accelerated writing , The data amount of the target picture and the size of the target value are judged. If the data amount of the target picture is less than the target value, the configured cache type is obtained from the configuration information of the storage node. If the cache type is memory acceleration, the target storage node writes the target image into the memory of the target storage node.
- the target storage node writes the target image into the SSD configured by the target storage node.
- the picture can be stored in the memory or SSD. Since the writing speed of the memory or SSD is faster, when the amount of data of the picture is relatively small, the writing speed of the picture can be relatively improved. Improve picture writing efficiency.
- the picture is stored in the memory or SSD, and the picture can be read from the memory or SSD. Since the reading speed of the memory or SSD is faster, the reading efficiency of the picture can also be improved.
- the embodiment of this application also provides a process of reading pictures: the target storage node receives the read request of the target picture sent by the requester, and judges whether the picture resource pool to which the target storage node belongs supports accelerated writing; if the target storage node The image resource pool to which the node belongs supports accelerated writing, and the cache type is memory acceleration.
- the target image is read in the memory configured by the target storage node, where the cache type is that the target image is written in the target storage node If the image resource pool to which the target storage node belongs supports accelerated writing, and the cache type is SSD acceleration, then according to the read request, read the target image from the SSD configured on the target storage node; send the target to the requester image.
- the target storage node After the target storage node receives the read request of the target picture sent by the requester, it determines whether the picture resource pool to which the target storage node belongs supports accelerated writing, and determines the cache type as described in the foregoing. If the image resource pool to which the target storage node belongs supports accelerated writing, and the cache type is memory acceleration, you can use a read request to read the target image in the memory. If the image resource pool to which the target storage node belongs supports accelerated writing, And the cache type is SSD acceleration, then the target image is read in the SSD according to the read request. After reading the target picture, the target storage node sends the target picture to the requester.
- the picture when the amount of data of the picture is relatively small, the picture can be stored in the memory or SSD, and the picture can be stored in the memory or SSD, so the picture can be read from the memory or SSD. Since the reading speed of the memory or SSD is faster, Can improve the efficiency of image reading.
- the read request carries index information of the target image stored on the disk; according to the index information, determine the first index of the target image stored in the memory of the target storage node; if it is in the index table corresponding to the memory of the target storage node If the first index is found in, the target image is read from the memory of the target storage node according to the first index.
- the read request carries index information of the target image stored on the disk; according to the index information, determine the second index of the target image stored in the SSD; if it is found in the index table corresponding to the SSD configured on the target storage node
- the second index reads the target picture from the SSD configured on the target storage node according to the second index.
- the target storage node does not find the target image in the memory and SSD configured on the target storage node, the target image can be read from the disk configured by the target storage node. The detailed process is described in the foregoing and will not be repeated here.
- the embodiments of the present disclosure also provide a device for writing pictures, the device is applied to a target storage node of a cloud storage system, and the target storage node is configured with a disk, a memory, and an SSD.
- the device includes:
- the receiving module 710 is configured to receive a write request of the target picture
- the judging module 720 is configured to judge whether the image resource pool to which the target storage node belongs supports accelerated writing
- the determining module 730 is configured to obtain the configured cache type from the configuration information of the storage node when the image resource pool to which the target storage node belongs supports accelerated writing, if the data amount of the target picture is less than the target value , Wherein the cache type is the cache type of the target picture when the target storage node writes;
- the writing module 740 is configured to write the target picture into the memory of the target storage node if the cache type is memory acceleration; if the cache type is SSD acceleration, write the target picture The SSD of the target storage node.
- the writing module 740 is also used for:
- the writing module 740 is configured to:
- the memory margin after deleting the picture is greater than or equal to the data amount of the target picture, then the picture is written into the memory, and if the memory margin after deleting the picture is less than the data amount of the target picture, execute The process of deleting the picture whose writing time point is the longest from the current time point in the memory.
- the receiving module 710 is further configured to receive a read request of a target picture sent by a requesting party, wherein the read request carries index information of the target picture stored on a disk;
- the judgment module 720 is further configured to judge whether the image resource pool to which the target storage node belongs supports accelerated writing;
- the device further includes:
- a reading module 750 configured to read the target picture according to the cache type corresponding to the target picture and the read request if the picture resource pool to which the target storage node belongs supports accelerated writing;
- the sending module 760 is configured to send the target picture to the requester.
- the reading module 750 is configured to:
- the cache type corresponding to the target picture is memory acceleration, determining the first index of the target picture stored in the memory of the target storage node according to the index information;
- the target picture is read from the disk;
- the second index of the target picture stored in the SSD is determined according to the index information, and if the index table corresponding to the SSD configured on the target storage node is searched To the second index, read the target picture from the SSD configured on the target storage node according to the second index;
- the target picture is read from the disk according to the read request.
- the storage node in the cloud storage system is configured with a disk, a memory, and an SSD.
- the target storage node can receive the write request of the target picture and determine whether the picture resource pool to which the target storage node belongs supports accelerated writing, and if the picture resource pool to which the storage node belongs supports accelerated writing , The data amount of the target picture and the size of the target value are judged. If the data amount of the target picture is less than the target value, the configured cache type is obtained from the configuration information of the storage node. If the cache type is memory acceleration, the target storage node writes the target image into the memory of the target storage node.
- the target storage node writes the target image into the SSD configured by the target storage node.
- the picture can be stored in the memory or SSD. Since the writing speed of the memory or SSD is faster, when the amount of data of the picture is relatively small, the writing speed of the picture can be relatively improved. Improve writing efficiency.
- the picture is stored in the memory or SSD, and the picture can be read from the memory or SSD. Since the reading speed of the memory or SSD is faster, the reading efficiency of the picture can also be improved.
- the device for writing pictures provided in the above embodiments writes pictures
- only the division of the above-mentioned functional modules is used as an example for illustration.
- the above-mentioned functions can be allocated to different functional modules according to needs.
- Complete that is, divide the internal structure of the device into different functional modules to complete all or part of the functions described above.
- the device for writing a picture provided in the above-mentioned embodiment belongs to the same concept as the embodiment of the method for writing a picture, and the specific implementation process is detailed in the method embodiment, and will not be repeated here.
- FIG. 9 is a schematic structural diagram of a storage node provided by an embodiment of the present disclosure.
- the storage node 900 may have relatively large differences due to different configurations or performance, and may include one or more processors (central processing units, CPU) 901 And one or more memories 902, wherein at least one instruction is stored in the memory 902, and the at least one instruction is loaded and executed by the processor 901 to implement the above-mentioned method steps of determining to write a picture.
- processors central processing units, CPU
- memories 902 wherein at least one instruction is stored in the memory 902, and the at least one instruction is loaded and executed by the processor 901 to implement the above-mentioned method steps of determining to write a picture.
- the embodiments of the present disclosure also provide a storage node for writing pictures, the storage node includes a processor and a memory, and at least one instruction is stored in the memory, and the instruction is loaded and executed by the processor to realize The above-mentioned method of writing pictures.
- the embodiment of the present disclosure also provides a computer-readable storage medium, in which at least one instruction is stored, and the instruction is loaded and executed by a processor to implement the method for writing a picture as described above.
- the program can be stored in a computer-readable storage medium.
- the storage medium mentioned can be a read-only memory, a magnetic disk or an optical disk, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
Claims (15)
- 一种写入图片的方法,其特征在于,所述方法应用于云存储系统中的目标存储节点,所述目标存储节点配置有磁盘、内存和固态硬盘SSD;所述方法包括:A method for writing pictures, characterized in that the method is applied to a target storage node in a cloud storage system, and the target storage node is configured with a disk, a memory, and a solid-state hard drive (SSD); the method includes:所述目标存储节点接收目标图片的写入请求,判断所述目标存储节点所属的图片资源池是否支持加速写入;The target storage node receives the write request of the target picture, and determines whether the picture resource pool to which the target storage node belongs supports accelerated writing;在所述目标存储节点所属的图片资源池支持加速写入时,如果所述目标图片的数据量小于目标数值,则在所述存储节点的配置信息中获取配置的缓存类型,其中,所述缓存类型为所述目标图片在所述目标存储节点写入时的缓存类型;When the picture resource pool to which the target storage node belongs supports accelerated writing, if the data amount of the target picture is less than the target value, the configured cache type is obtained from the configuration information of the storage node, wherein the cache Type is the cache type of the target picture when the target storage node writes;如果所述缓存类型为内存加速,则所述目标存储节点将所述目标图片写入所述目标存储节点的内存中;If the cache type is memory acceleration, the target storage node writes the target picture into the memory of the target storage node;如果所述缓存类型为SSD加速,则所述目标存储节点将所述目标图片写入所述目标存储节点的SSD中。If the cache type is SSD acceleration, the target storage node writes the target picture into the SSD of the target storage node.
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:将所述目标图片写入所述目标存储节点的磁盘。Writing the target picture to the disk of the target storage node.
- 根据权利要求1所述的方法,其特征在于,所述将所述目标图片写入所述目标存储节点的内存中,包括:The method according to claim 1, wherein the writing the target picture into the memory of the target storage node comprises:如果所述目标存储节点当前的内存余量大于或等于所述目标图片的数据量,则将所述目标图片写入所述目标存储节点的内存中;If the current memory margin of the target storage node is greater than or equal to the data amount of the target picture, writing the target picture into the memory of the target storage node;如果所述目标存储节点当前的内存余量小于所述目标图片的数据量,则在所述内存中删除写入时间点距离当前时间点最长的图片;If the current memory margin of the target storage node is less than the data amount of the target picture, deleting the picture whose writing time point is the longest from the current time point in the memory;如果删除图片后的内存余量大于或等于所述目标图片的数据量,则将所述图片写入所述内存中,如果删除图片后的内存余量小于所述目标图片的数据量,则执行所述在所述内存中删除写入时间点距离当前时间点最长的图片的处理。If the memory margin after deleting the picture is greater than or equal to the data amount of the target picture, then the picture is written into the memory, and if the memory margin after deleting the picture is less than the data amount of the target picture, execute The process of deleting the picture whose writing time point is the longest from the current time point in the memory.
- 根据权利要求1至3任一所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 3, wherein the method further comprises:所述目标存储节点接收请求方发送的所述目标图片的读取请求,判断所述目标存储节点所属的图片资源池是否支持加速写入,其中,所述读取请求中携带有所述目标图片存储在磁盘的索引信息;The target storage node receives the read request of the target picture sent by the requester, and determines whether the picture resource pool to which the target storage node belongs supports accelerated writing, wherein the read request carries the target picture Index information stored on disk;如果所述目标存储节点所属的图片资源池支持加速写入,则根据所述目标图片对应的缓存类型和所述读取请求,读取所述目标图片;If the picture resource pool to which the target storage node belongs supports accelerated writing, read the target picture according to the cache type corresponding to the target picture and the read request;向所述请求方发送所述目标图片。Sending the target picture to the requesting party.
- 根据权利要求4所述的方法,其特征在于,所述根据所述目标图片对应的缓存类型和所述读取请求,读取所述目标图片,包括:The method according to claim 4, wherein the reading the target picture according to the cache type corresponding to the target picture and the read request comprises:如果所述目标图片对应的缓存类型为内存加速,则根据所述索引信息,确定所述目标图片存储在所述目标存储节点的内存中的第一索引;如果在所述目标存储节点的内存对应的索引表中查找到所述第一索引,则根据所述第一索引,从所述目标存储节点的内存中读取所述目标图片;如果在所述目标存储节点的内存对应的索引表中未查找到所述第一索引,则从磁盘中读取所述目标图片;If the cache type corresponding to the target picture is memory acceleration, then according to the index information, determine the first index of the target picture stored in the memory of the target storage node; if it corresponds to the memory of the target storage node If the first index is found in the index table of the target storage node, the target picture is read from the memory of the target storage node according to the first index; if it is in the index table corresponding to the memory of the target storage node If the first index is not found, read the target picture from the disk;如果所述目标图片对应的缓存类型为SSD加速,则根据所述索引信息,确定所述目标图片存储在SSD中的第二索引,如果在所述目标存储节点配置的SSD对应的索引表中查找到所述第二索引,则根据所述第二索引,从所述目标存储节点配置的SSD中读取所述目标图片;如果在所述目标存储节点配置的SSD对应的索引表中未查找到所述第二索引,则根据所述读取请求,从磁盘中读取所述目标图片。If the cache type corresponding to the target picture is SSD acceleration, the second index of the target picture stored in the SSD is determined according to the index information, and if the index table corresponding to the SSD configured on the target storage node is searched To the second index, read the target picture from the SSD configured on the target storage node according to the second index; if it is not found in the index table corresponding to the SSD configured on the target storage node The second index reads the target picture from the disk according to the read request.
- 一种写入图片的装置,其特征在于,所述装置应用于云存储系统中的目标存储节点,所述目标存储节点配置有磁盘、内存和固态硬盘SSD;所述装置包括:A device for writing pictures, characterized in that the device is applied to a target storage node in a cloud storage system, and the target storage node is configured with a magnetic disk, a memory, and a solid-state hard drive (SSD); the device includes:接收模块,用于接收目标图片的写入请求;The receiving module is used to receive the write request of the target picture;判断模块,用于判断所述目标存储节点所属的图片资源池是否支持加速写入;A judging module for judging whether the image resource pool to which the target storage node belongs supports accelerated writing;确定模块,用于在所述目标存储节点所属的图片资源池支持加速写入时,如果所述目标图片的数据量小于目标数值,则在所述存储节点的配置信息中获取配置的缓存类型,其中,所述缓存类型为所述目标图片在所述目标存储节点写入时的缓存类型;The determining module is configured to obtain the configured cache type from the configuration information of the storage node when the image resource pool to which the target storage node belongs supports accelerated writing, if the data amount of the target picture is less than the target value, Wherein, the cache type is the cache type of the target picture when the target storage node writes;写入模块,用于如果所述缓存类型为内存加速,则将所述目标图片写入所述目标存储节点的内存中;如果所述缓存类型为SSD加速,则将所述目标图片写入所述目标存储节点的SSD中。A writing module, configured to write the target picture into the memory of the target storage node if the cache type is memory acceleration; if the cache type is SSD acceleration, write the target picture into the memory In the SSD of the target storage node.
- 根据权利要求6所述的装置,其特征在于,所述写入模块,还用于:The device according to claim 6, wherein the writing module is further used for:将所述目标图片写入所述目标存储节点的磁盘。Writing the target picture to the disk of the target storage node.
- 根据权利要求7所述的装置,其特征在于,所述写入模块,用于:The device according to claim 7, wherein the writing module is configured to:如果所述目标存储节点当前的内存余量大于或等于所述目标图片的数据量,则将所述目标图片写入所述目标存储节点的内存中;If the current memory margin of the target storage node is greater than or equal to the data amount of the target picture, writing the target picture into the memory of the target storage node;如果所述目标存储节点当前的内存余量小于所述目标图片的数据量,则在所述内存中删除写入时间点距离当前时间点最长的图片;If the current memory margin of the target storage node is less than the data amount of the target picture, deleting the picture whose writing time point is the longest from the current time point in the memory;如果删除图片后的内存余量大于或等于所述目标图片的数据量,则将所述图片写入所述内存中,如果删除图片后的内存余量小于所述目标图片的数据量,则执行所述在所述内存中删除写入时间点距离当前时间点最长的图片的处理。If the memory margin after deleting the picture is greater than or equal to the data amount of the target picture, then the picture is written into the memory, and if the memory margin after deleting the picture is less than the data amount of the target picture, execute The process of deleting the picture whose writing time point is the longest from the current time point in the memory.
- 根据权利要求6至8任一所述的装置,其特征在于,所述接收模块,还用于接收请求方发送的目标图片的读取请求,其中,所述读取请求中携带有所述目标图片存储在磁盘的索引信息;The device according to any one of claims 6 to 8, wherein the receiving module is further configured to receive a read request for a target picture sent by a requesting party, wherein the read request carries the target Index information of pictures stored on disk;所述判断模块,还用于判断所述目标存储节点所属的图片资源池是否支持加速写入;The judgment module is also used to judge whether the image resource pool to which the target storage node belongs supports accelerated writing;所述装置还包括:The device also includes:读取模块,用于如果所述目标存储节点所属的图片资源池支持加速写入,则根据所述目标图片对应的缓存类型和所述读取请求,读取所述目标图片;A reading module, configured to read the target picture according to the cache type corresponding to the target picture and the read request if the picture resource pool to which the target storage node belongs supports accelerated writing;发送模块,用于向所述请求方发送所述目标图片。The sending module is used to send the target picture to the requester.
- 根据权利要求9所述的装置,其特征在于,所述读取模块,用于:The device according to claim 9, wherein the reading module is configured to:如果所述目标图片对应的缓存类型为内存加速,则根据所述索引信息,确定所述目标图片存储在所述目标存储节点的内存中的第一索引;如果在所述目标存储节点的内存对应的索引表中查找到所述第一索引,则根据所述第一索引,从所述目标存储节点的内存中读取所述目标图片;如果在所述目标存储节点的内存对应的索引表中未查找到所述第一索引,则从磁盘中读取所述目标图片;If the cache type corresponding to the target picture is memory acceleration, then according to the index information, determine the first index of the target picture stored in the memory of the target storage node; if it corresponds to the memory of the target storage node If the first index is found in the index table of the target storage node, the target picture is read from the memory of the target storage node according to the first index; if it is in the index table corresponding to the memory of the target storage node If the first index is not found, read the target picture from the disk;如果所述目标图片对应的缓存类型为SSD加速,则根据所述索引信息,确定所述目标图片存储在SSD中的第二索引,如果在所述目标存储节点配置的SSD对应的索引表中查找到所述第二索引,则根据所述第二索引,从所述目标存储节点配置的SSD中读取所述目标图片;如果在所述目标存储节点配置的SSD对应的索引表中未查找到所述第二索引,则根据所述读取请求,从磁盘中 读取所述目标图片。If the cache type corresponding to the target picture is SSD acceleration, the second index of the target picture stored in the SSD is determined according to the index information, and if the index table corresponding to the SSD configured on the target storage node is searched To the second index, read the target picture from the SSD configured on the target storage node according to the second index; if it is not found in the index table corresponding to the SSD configured on the target storage node The second index reads the target picture from the disk according to the read request.
- 一种写入图片的存储节点,其特征在于,包括处理器和存储器;所述存储器,用于存放至少一条指令;所述处理器,用于执行所述存储器上所存放的至少一条指令,实现权利要求1-5任一项所述的方法步骤。A storage node for writing pictures, comprising a processor and a memory; the memory is used to store at least one instruction; the processor is used to execute at least one instruction stored in the memory to implement The method step of any one of claims 1-5.
- 一种计算机可读存储介质,其特征在于,所述存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-5任一项所述的方法步骤。A computer-readable storage medium, characterized in that a computer program is stored in the storage medium, and when the computer program is executed by a processor, the method steps according to any one of claims 1 to 5 are realized.
- 一种读取图片的方法,其特征在于,所述方法应用于云存储系统中的目标存储节点,所述目标存储节点配置有磁盘、内存和固态硬盘SSD;所述方法包括:A method for reading pictures, characterized in that the method is applied to a target storage node in a cloud storage system, and the target storage node is configured with a disk, a memory, and a solid-state hard drive (SSD); the method includes:所述目标存储节点接收请求方发送的目标图片的读取请求,判断所述目标存储节点所属的图片资源池是否支持加速写入;The target storage node receives the read request of the target picture sent by the requester, and determines whether the picture resource pool to which the target storage node belongs supports accelerated writing;如果所述目标存储节点所属的图片资源池支持加速写入,且缓存类型为内存加速,则根据所述读取请求,在所述目标存储节点配置的内存中读取所述目标图片,其中,所述缓存类型为所述目标图片在所述目标存储节点写入时的缓存类型;If the image resource pool to which the target storage node belongs supports accelerated writing, and the cache type is memory acceleration, the target image is read in the memory configured by the target storage node according to the read request, where: The cache type is the cache type of the target picture when the target storage node writes;如果所述目标存储节点所属的图片资源池支持加速写入,且所述缓存类型为SSD加速,则根据所述读取请求,在所述目标存储节点配置的SSD中读取所述目标图片;If the picture resource pool to which the target storage node belongs supports accelerated writing, and the cache type is SSD accelerated, reading the target picture from the SSD configured on the target storage node according to the read request;向所述请求方发送所述目标图片。Sending the target picture to the requesting party.
- 根据权利要求13所述的方法,其特征在于,所述读取请求中携带有所述目标图片存储在磁盘的索引信息;The method according to claim 13, wherein the read request carries index information of the target picture stored on a disk;所述根据所述读取请求,在所述目标存储节点配置的内存中读取所述目标图片,包括:The reading the target picture in the memory configured by the target storage node according to the reading request includes:根据所述索引信息,确定所述目标图片存储在所述目标存储节点的内存中的第一索引;Determine the first index of the target picture stored in the memory of the target storage node according to the index information;如果在所述目标存储节点的内存对应的索引表中查找到所述第一索引,则根据所述第一索引,从所述目标存储节点的内存中读取所述目标图片。If the first index is found in the index table corresponding to the memory of the target storage node, the target picture is read from the memory of the target storage node according to the first index.
- 根据权利要求13或14所述的方法,其特征在于,所述读取请求中携带有所述目标图片存储在磁盘的索引信息;The method according to claim 13 or 14, wherein the read request carries index information of the target picture stored on a disk;所述根据所述读取请求,在所述目标存储节点配置的SSD中读取所述目标图片,包括:The reading the target picture in the SSD configured on the target storage node according to the reading request includes:根据所述索引信息,确定所述目标图片存储在SSD中的第二索引;Determine the second index of the target picture stored in the SSD according to the index information;如果在所述目标存储节点配置的SSD对应的索引表中查找到所述第二索引,则根据所述第二索引,从所述目标存储节点配置的SSD中读取所述目标图片。If the second index is found in the index table corresponding to the SSD configured on the target storage node, the target picture is read from the SSD configured on the target storage node according to the second index.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910786664.8 | 2019-08-23 | ||
CN201910786664.8A CN111399753B (en) | 2019-08-23 | 2019-08-23 | Method and device for writing pictures |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021036909A1 true WO2021036909A1 (en) | 2021-03-04 |
Family
ID=71430246
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/110330 WO2021036909A1 (en) | 2019-08-23 | 2020-08-20 | Picture write-in method and apparatus |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111399753B (en) |
WO (1) | WO2021036909A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111399753B (en) * | 2019-08-23 | 2022-08-05 | 杭州海康威视系统技术有限公司 | Method and device for writing pictures |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104111898A (en) * | 2014-05-26 | 2014-10-22 | 中国能源建设集团广东省电力设计研究院 | Hybrid storage system based on multidimensional data similarity and data management method |
US20160004637A1 (en) * | 2014-01-08 | 2016-01-07 | Netapp, Inc. | Nvram caching and logging in a storage system |
CN107301090A (en) * | 2016-04-14 | 2017-10-27 | 华为技术有限公司 | It is using the method and device for setting data handling path in storage server |
CN107463627A (en) * | 2017-07-11 | 2017-12-12 | 深圳市云领天下科技有限公司 | A kind of picture loading method and terminal |
CN107861891A (en) * | 2017-11-14 | 2018-03-30 | 郑州天迈科技股份有限公司 | Audio/video data access method for public transport vehicle-mounted hard disk |
CN108008912A (en) * | 2016-11-02 | 2018-05-08 | 华为技术有限公司 | A kind of memory buffers method and intelligent terminal based on DRAM |
CN111399753A (en) * | 2019-08-23 | 2020-07-10 | 杭州海康威视系统技术有限公司 | Method and device for writing pictures |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9075754B1 (en) * | 2011-12-31 | 2015-07-07 | Emc Corporation | Managing cache backup and restore |
TW201508484A (en) * | 2013-08-22 | 2015-03-01 | Acer Inc | Data writing method, hard disc module, and data writing system |
US10013344B2 (en) * | 2014-01-14 | 2018-07-03 | Avago Technologies General Ip (Singapore) Pte. Ltd. | Enhanced SSD caching |
CN108268219B (en) * | 2018-02-01 | 2021-02-09 | 杭州宏杉科技股份有限公司 | Method and device for processing IO (input/output) request |
CN108845768A (en) * | 2018-06-19 | 2018-11-20 | 郑州云海信息技术有限公司 | A kind of date storage method, device, equipment and storage medium |
-
2019
- 2019-08-23 CN CN201910786664.8A patent/CN111399753B/en active Active
-
2020
- 2020-08-20 WO PCT/CN2020/110330 patent/WO2021036909A1/en active Application Filing
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160004637A1 (en) * | 2014-01-08 | 2016-01-07 | Netapp, Inc. | Nvram caching and logging in a storage system |
CN104111898A (en) * | 2014-05-26 | 2014-10-22 | 中国能源建设集团广东省电力设计研究院 | Hybrid storage system based on multidimensional data similarity and data management method |
CN107301090A (en) * | 2016-04-14 | 2017-10-27 | 华为技术有限公司 | It is using the method and device for setting data handling path in storage server |
CN108008912A (en) * | 2016-11-02 | 2018-05-08 | 华为技术有限公司 | A kind of memory buffers method and intelligent terminal based on DRAM |
CN107463627A (en) * | 2017-07-11 | 2017-12-12 | 深圳市云领天下科技有限公司 | A kind of picture loading method and terminal |
CN107861891A (en) * | 2017-11-14 | 2018-03-30 | 郑州天迈科技股份有限公司 | Audio/video data access method for public transport vehicle-mounted hard disk |
CN111399753A (en) * | 2019-08-23 | 2020-07-10 | 杭州海康威视系统技术有限公司 | Method and device for writing pictures |
Also Published As
Publication number | Publication date |
---|---|
CN111399753A (en) | 2020-07-10 |
CN111399753B (en) | 2022-08-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7480654B2 (en) | Achieving cache consistency while allowing concurrent changes to metadata | |
CN105027070B (en) | Roll up the security of operation | |
CN110515539B (en) | Cloud disk mounting method, device, equipment and storage medium based on cloud storage | |
EP2863310B1 (en) | Data processing method and apparatus, and shared storage device | |
JP2017199439A (en) | System and method for implementing data storage service | |
CN111338766A (en) | Transaction processing method and device, computer equipment and storage medium | |
WO2022063322A1 (en) | Hard drive migration method, distributed storage cluster system and storage medium | |
CN110998557A (en) | High availability database through distributed storage | |
US10318475B2 (en) | System and method for persistence of application data using replication over remote direct memory access | |
WO2021147935A1 (en) | Log playback method and apparatus | |
WO2020098654A1 (en) | Data storage method and device based on cloud storage, and storage medium | |
CN108540510B (en) | Cloud host creation method and device and cloud service system | |
CN109714229B (en) | Performance bottleneck positioning method of distributed storage system | |
WO2021143351A1 (en) | Distributed retrieval method, apparatus and system, computer device, and storage medium | |
US20240061712A1 (en) | Method, apparatus, and system for creating training task on ai training platform, and medium | |
WO2022111188A1 (en) | Transaction processing method, system, apparatus, device, storage medium, and program product | |
WO2022048358A1 (en) | Data processing method and device, and storage medium | |
CN110457263A (en) | A kind of date storage method and device | |
CN113010549A (en) | Data processing method based on remote multi-active system, related equipment and storage medium | |
CN107181773A (en) | Data storage and data managing method, the equipment of distributed memory system | |
WO2021036909A1 (en) | Picture write-in method and apparatus | |
CN113741822B (en) | Data storage method, data reading method and related device | |
EP3633519A1 (en) | Method for storing objects, and object store gateway | |
WO2024082857A1 (en) | Data migration method and system, and related apparatus | |
CN109032753A (en) | A kind of isomery virtual hard disk trustship method, system, storage medium and Nova platform |
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: 20859202 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: 20859202 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 1205A DATED 25.05.2023) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20859202 Country of ref document: EP Kind code of ref document: A1 |