CN111405313A - Method and system for storing streaming media data - Google Patents

Method and system for storing streaming media data Download PDF

Info

Publication number
CN111405313A
CN111405313A CN201910577923.6A CN201910577923A CN111405313A CN 111405313 A CN111405313 A CN 111405313A CN 201910577923 A CN201910577923 A CN 201910577923A CN 111405313 A CN111405313 A CN 111405313A
Authority
CN
China
Prior art keywords
storage
media data
streaming media
storage space
object block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910577923.6A
Other languages
Chinese (zh)
Other versions
CN111405313B (en
Inventor
叶敏
林鹏
王伟
林起芊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision System Technology Co Ltd
Original Assignee
Hangzhou Hikvision System Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikvision System Technology Co Ltd filed Critical Hangzhou Hikvision System Technology Co Ltd
Priority to CN201910577923.6A priority Critical patent/CN111405313B/en
Publication of CN111405313A publication Critical patent/CN111405313A/en
Application granted granted Critical
Publication of CN111405313B publication Critical patent/CN111405313B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • H04N21/23113Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion involving housekeeping operations for stored content, e.g. prioritizing content for deletion because of storage space restrictions

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The disclosure provides a method and a system for storing streaming media data, and belongs to the technical field of cloud storage. The method is applied to a storage server, the storage server comprises a plurality of storage areas, each storage area comprises a plurality of object blocks, and the method comprises the following steps: receiving streaming media data; determining a storage area with the largest current residual storage space in the plurality of storage areas, and determining an object block with the residual storage space as an object block to be used in the plurality of object blocks in the storage area with the largest current residual storage space; storing the streaming media data in the object block to be used; in the process of storing the streaming media data, when the object block to be used does not have a residual storage space, if the streaming media data is not stored completely, the step is switched to the step of determining the storage area with the largest current residual storage space in the plurality of storage areas. By adopting the method and the device, the balance of the storage area can be improved.

Description

Method and system for storing streaming media data
Technical Field
The present disclosure relates to the field of cloud storage technologies, and in particular, to a method and a system for storing streaming media data.
Background
For data occupying a large storage space, the terminal can store the data in the cloud system, and when the terminal needs to be used, the data is acquired from the cloud system.
The cloud system mainly comprises a scheduling server and a storage server cluster, and a storage space of each storage server in the storage server cluster can be divided into a plurality of storage areas. After receiving the data to be stored sent by the terminal, the scheduling server determines a storage server from the storage server cluster, and the storage server stores the data to be stored in a certain storage area.
In implementing the present disclosure, the inventors found that the related art has at least the following problems:
in the related art, in the process of storing data to be stored in a storage space by a storage server, usually, after one storage area is full, the data is stored in another storage area, so that the situations that some storage areas store more data and some storage areas store less data or even do not store data occur, and the balance of the storage areas is poor.
Disclosure of Invention
The embodiment of the disclosure provides a method for storing streaming media data, so as to solve the problems of the related art. The technical scheme is as follows:
in a first aspect, a method for storing streaming media data is provided, where the method is applied to a storage server, where the storage server includes a plurality of storage areas, and each storage area includes a plurality of object blocks, and the method includes:
receiving streaming media data;
determining a storage area with the largest current residual storage space in the plurality of storage areas, and determining an object block with the residual storage space as an object block to be used in the plurality of object blocks in the storage area with the largest current residual storage space;
storing the streaming media data in the object block to be used;
in the process of storing the streaming media data, when the object block to be used does not have a residual storage space, if the streaming media data is not stored completely, the step is switched to the step of determining the storage area with the largest current residual storage space in the plurality of storage areas.
Optionally, the determining, in the plurality of storage areas, a storage area with a largest current remaining storage space, and determining, in a plurality of object blocks in the storage area with the largest current remaining storage space, an object block with a remaining storage space as an object block to be used includes:
if the object blocks which store the streaming media data and have the residual storage space do not exist in the plurality of storage areas, determining the storage area with the largest current residual storage space in the plurality of storage areas, and determining the object block with the residual storage space as an object block to be used in the plurality of object blocks in the storage area with the largest current residual storage space;
optionally, the method further includes:
and if the object blocks which store the streaming media data and have the residual storage space exist in the plurality of storage areas, determining that the object blocks which store the streaming media data and have the residual storage space are the object blocks to be used.
Optionally, the method further includes: and deleting the streaming media data reaching the preset storage period.
Optionally, each object block includes an information area and a data area;
the storing the streaming media data in the object block to be used includes:
storing the attribute information part of the streaming media data in the information area of the object block to be used, and storing the data part of the streaming media data in the data area of the object block to be used.
Optionally, each storage region further includes a start block, and the start block is configured to store attribute information of the storage region to which the start block belongs.
Optionally, the attribute information includes a total storage space of the storage area, the number of object blocks, and a storage space of the object blocks.
In a second aspect, this embodiment further provides a system for storing streaming media data, where the system includes a scheduling server and multiple storage servers;
the scheduling server is used for receiving the storage requests sent by the terminals, selecting the storage servers according to the current memory occupancy rate and the current remaining storage space of each storage server, and sending the address information of the selected storage servers to the terminals sending the storage requests, so that the terminals sending the storage requests send streaming media data to the selected storage servers;
the storage server is configured to perform the method steps as described above.
Optionally, the scheduling server is configured to select a storage server of which the current memory occupancy rate is smaller than a first preset value and the current remaining storage space is larger than a second preset value.
In a third aspect, the present embodiment further provides a computer device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the bus; a memory for storing a computer program; and the processor is used for executing the program stored in the memory and realizing the steps of the method.
In a third aspect, the present embodiment also provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the method steps described above.
The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:
in the embodiment of the disclosure, when the storage server stores the streaming media data, instead of storing the streaming media data into another storage area after storing one storage area, each storage area is divided into a plurality of object blocks, when the streaming media data is received, the storage area with the largest current remaining storage space is determined in the plurality of storage areas, the streaming media data is stored in one object block with the largest current remaining storage space in the storage area with the largest current remaining storage space, after the object block is stored fully, if the remaining streaming media data still exist, the storage area with the largest current remaining storage space is determined again in the plurality of storage areas, and then the remaining streaming media data is stored in one object block with the remaining storage space in the reselected storage area. Therefore, the streaming media data can be stored in a plurality of storage areas, and the balance of the storage areas can be improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for storing streaming media data according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a method for storing streaming media data according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart illustrating a process of selecting a storage server by a scheduling server according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a storage server according to an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the present disclosure more apparent, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.
The disclosed embodiments provide a method for storing streaming media data, which may be applied to a storage server, where the storage server may include a plurality of storage devices, and for example, may include DISK, SSD (solid state Drive, commonly referred to as solid state DISK), RAID (Redundant Array of independent DISKs), and the like. Each storage device constitutes a storage area, each storage area can be divided into a plurality of object blocks, and the object blocks are sub-areas of the storage area and are used for storing streaming media data. The process of the storage server storing the streaming media data in the object block may be performed according to the flow shown in fig. 1.
The storage space of any two object blocks is equal, specifically, the storage space of any two object blocks in each storage area is the same, and the storage space of any two object blocks in different storage areas is also the same, so that the storage server divides the storage areas according to the object blocks with the same storage space. It is to be noted that since the storage space of each storage area is not the same, the number of object blocks included in each storage area is not the same.
In step 101, a storage server receives streaming media data.
The streaming media data may be video data, or media data such as audio data transmitted by a streaming technology.
In an implementation, the streaming media data received by the storage server may come from a terminal (such as a monitoring device) that collects the media data, for example, the terminal sends the collected media data to the storage server according to a streaming transmission technology, and the storage server may receive the streaming media data from the terminal that collects the media data.
In step 102, the storage server determines a storage area with the largest current remaining storage space among the plurality of storage areas, and determines an object block with the remaining storage space as an object block to be used among a plurality of object blocks in the storage area with the largest current remaining storage space.
In implementation, after the storage server receives the streaming media data, a storage area with the largest current remaining storage space may be selected from the plurality of storage areas, and an object block with the remaining storage space is determined to be an object block to be used in the plurality of object blocks of the selected storage area.
Wherein, the current state of any object block of each storage region may be one of the following three states: the streaming media data is stored and no residual storage space exists, and the streaming media data is not stored (i.e. is in an idle state).
Accordingly, as described above, the object block to be used is an object block storing the remaining storage space, and the object block to be used may be an object block not storing the streaming media data, or an object block storing the streaming media data but having the remaining storage space.
The term "having a storage space" refers to being capable of storing a minimum transmission unit, for example, streaming media data is transmitted in packets (the data size of one packet is the minimum transmission unit), if an object block is capable of storing one packet, it indicates that the storage space is also present, and if the object block is not capable of storing one packet, it indicates that the storage space is not present, that is, the data is already stored. For example, if the data size of a packet is 2KB and the remaining storage space of the object block is only 1KB, the object block is full and has no storage space.
In step 103, the storage server stores the streaming media data in the object block to be used.
In an implementation, after the storage server determines the object block to be used, the received streaming media data may be stored in the object block to be used.
In step 104, in the process of storing the streaming media data, when the object block to be used does not have a remaining storage space, if the streaming media data is not stored completely, the storage server proceeds to determine a storage area with the largest current remaining storage space among the plurality of storage areas.
The object block to be used does not have a remaining storage space, which means that the object block to be used does not have a storage space, that is, the object block to be used is full of data.
In the implementation, in the process of storing the streaming media data, when there is no remaining storage space in the storage server, if there is any streaming media data left, the storage server goes to execute step 102, re-determine a storage area with the largest current remaining storage space among the plurality of storage areas, determine, among the plurality of object blocks in the storage area with the largest current remaining storage space, that the object block with the remaining storage space is the object block to be used, and store the remaining streaming media data in the object block to be used determined this time.
The storage area with the largest remaining storage space determined last time and the storage area with the largest remaining storage space determined this time may or may not be the same storage area.
For example, when the storage server determines the storage area with the largest remaining storage space last time, the current remaining storage space of the storage area 1 is the largest, and when the storage server determines the storage area with the largest remaining storage space this time, the current remaining storage space of the storage area 1 is still the largest, so the storage areas determined twice last time and this time are both the storage area 1. If the previous storage server determines the storage area with the largest remaining storage space, the current remaining storage space of the storage area 1 is the largest, the storage area determined at the previous time is the storage area 1, the remaining storage space of the storage area 1 is reduced in the process of storing the streaming media data, when the storage server re-determines the storage area at this time, the storage area 1 is no longer the storage area with the largest current remaining storage space, if the current remaining storage space of the storage area 2 is the largest, the storage area determined at this time is the storage area 2, and the storage areas determined by the previous storage server and the storage server at this time are not the same storage area.
The method for storing the streaming media data comprises the steps that after one storage area is full, the storage area is stored into another storage area, each storage area is divided into a plurality of object blocks, when the streaming media data are received, the storage area with the largest current residual storage space is determined in the plurality of storage areas, the streaming media data are stored in one object block with the largest current residual storage space in the storage area with the largest current residual storage space, after the object blocks are full, if the remaining streaming media data exist, the storage area with the largest current residual storage space is determined in the plurality of storage areas again, and then the remaining streaming media data are stored in one object block with the remaining storage space in the newly selected storage area. Therefore, the streaming media data can be stored in a plurality of storage areas, and the balance of the storage areas can be improved.
In one possible application scenario, the storage server may be a server for storing streaming media data in a system for storing streaming media data, and the system may further include a scheduling server. The terminal for collecting the media data can send a storage request to the scheduling server, after receiving the storage request sent by the terminal, the scheduling server can select one storage server from the plurality of storage servers, which is not called a target storage server, and then send the address information of the target storage server to the terminal, and after receiving the address information of the target storage server, the terminal can send the streaming media data to the target storage server. After the target storage server receives the streaming media data, a storage area with the largest current remaining storage space may be determined in the plurality of storage areas, for example, the storage area 1 is the storage area with the largest current remaining storage space, and correspondingly, the storage area selected by the target storage server is the storage area 1. The manner of selecting the object block to be used from the object blocks in the storage area 1 by the storage server may be as follows:
one case may be that an object block having a remaining storage space is randomly selected from a plurality of object blocks in the storage area 1 and determined as an object block to be used. In one case, an object block with a remaining storage space may be selected from the object blocks in the storage area 1 according to a preset arrangement order and determined as an object block to be used. Another case may also be that an object block which stores streaming media data but still has a remaining storage space is selected from the plurality of object blocks in the storage area 1 as an object block to be used, and if an object block which does not store streaming media data but still has a remaining storage space is selected from the plurality of object blocks in the storage area 1, the object block may be selected according to one of the former two cases.
In this embodiment, a specific selection manner of selecting, from a plurality of object blocks in a storage area, an object block having a remaining storage space as an object block to be used by a storage server is not specifically limited, and the object block having the remaining storage space may be selected to store streaming media data.
Optionally, in order to improve the manageability of the storage data, correspondingly, after the storage server receives the streaming media data, it is determined whether there is an object block in the plurality of storage areas, where the streaming media data is already stored but there is a remaining storage space. And if the object blocks which store the streaming media data and have the residual storage space exist in the plurality of storage areas, determining the object blocks which store the streaming media data and have the residual storage space as the object blocks to be used. If there is no object block storing the streaming media data and having a remaining storage space in the plurality of storage areas, determining a storage area with a largest current remaining storage space in the plurality of storage areas, and determining, among the plurality of object blocks in the storage area with the largest current remaining storage space, that the object block having the remaining storage space is an object block to be used, which may specifically be performed according to the flow shown in fig. 2:
after the storage server receives the streaming media data, the following process may be performed as shown in fig. 2:
in step 201, the storage server detects whether there is an object block that stores the streaming media data but has a remaining storage space among the object blocks of the plurality of storage areas. If so, go to step 202, and if not, go to step 203.
The plurality of storage areas may be all storage areas in the storage server.
In step 202, the storage server determines an object block storing the streaming media data but having a remaining storage space as an object block to be used.
In step 203, the storage server determines a storage area with the largest current remaining storage space among the plurality of storage areas, and determines an object block with the remaining storage space as an object block to be used among a plurality of object blocks in the storage area with the largest current remaining storage space.
As described above, in step 203, the object block having the remaining storage space is the object block in which the streaming media data is not stored.
In step 204, the storage server stores the streaming media data in the object block to be used. If the storage of the streaming media data is finished, the process is turned to the end, and in this case, the object block to be used may have a remaining storage space or may have no remaining storage space. Otherwise, go to step 203, that is, in the process of storing the streaming media data, when there is no remaining storage space in the object block to be used, and if the storage of the streaming media data is not completed, go to step 203 to execute the storage operation on the remaining streaming media data. And when the streaming media data is stored, ending the process.
Based on the above, in the first round of storage of streaming media data, the object block to be used may be an object block in which the streaming media data is stored but has a remaining storage space, or may be an object block in which the streaming media data is not stored. In the storage process after the second round of the streaming media data, the object blocks to be used selected in each round are all the object blocks which do not store the streaming media data.
For example, when the storage server first accesses a path of streaming media data, it may perform the process as shown in fig. 2, first perform step 201, and if there is an object block that stores streaming media data but has a remaining storage space, and is not marked as object block 1, determine object block 1 as an object block to be used according to step 202. And then storing the streaming media data in the object block 1 according to the step 204, wherein in the storing process, if the streaming media data can be completely stored in the object block 1, the storing process of the streaming media data is ended. If the storage of the streaming media data is not finished, but the object block 1 does not have a remaining storage space, the flow goes to sequentially execute step 203 and step 204 until the streaming media data is completely stored. If the path of streaming media data belongs to uninterrupted data, in this case, the storage server may perform step 203 and step 204 in a loop to store the subsequent received streaming media data.
Optionally, in a general case, the data size of the streaming media data is relatively large, for example, video data collected by monitoring equipment (such as a camera) in the monitoring field belongs to uninterruptedly transmitted media data, so that a storage space is vacated, and correspondingly, the storage server may delete the streaming media data that reaches a preset storage period, so as to save the storage space.
Optionally, in order to facilitate the storage server to read the stored streaming media data, correspondingly, each object block of each storage area may include an information area and a data area, and the storage server may store the attribute information component of the streaming media data in the information area of the object block to be used, and store the data portion of the streaming media data in the data area.
The attribute information part of the streaming media data may include, but is not limited to, an encoding format of the streaming media data, the number of key frames, an uploading time of the key frames, a storage location of the key frames in the data area, and the like.
In implementation, the attribute information of the streaming media data stored in the information area of the object block may be used as an index to search for the streaming media data. For example, when the storage server receives a streaming media reading notification carrying a target uploading time, the uploading time of a key frame matched with the target uploading time may be searched based on the target uploading time and the uploading time of a key frame stored in the information area of the target block, the target block where the key frame is located may be determined, and then streaming media data matched with the target uploading time may be acquired from the data area of the determined target block.
For example, the target upload time is 09:00 in 5/16/2019 to 10:00 in 16/2019, and when the storage server receives the streaming media read notification in the time period, all the key frames corresponding to the target upload time may be searched in the storage area based on the upload time of the key frames in the information area, and then streaming media data including the key frames may be acquired from the data area of the object block. And then, the storage server sends the acquired streaming media data to the terminal.
Optionally, because the attribute information part stored in the information area of the object block is important and is key information of the streaming media data, in order to improve security, the information area may include a main information area and a standby information area, where the main information area and the standby information area are backups of each other.
Optionally, each storage region may include not only the object block, but also a start block, where the start block is used to store attribute information of the storage region to which the start block belongs, where the attribute information may be a total storage space of the storage region, the number of object blocks, a storage space of the object blocks, and the like.
The attribute information stored in the start block is important, and in order to improve the security of the attribute information stored in the start block, correspondingly, the start block may include a main start block and a standby start block, and the attribute information stored in the main start block and the standby start block are backed up with each other.
In an implementation, the storage server may obtain a total storage space condition of the storage area from the start block of each storage area, and the data amount of the streaming media data sent to a certain storage area by the storage server is determined, and further, for each storage area, the storage server may determine the remaining storage space of the storage area based on the obtained total storage space of the storage area and the data amount of the streaming media data sent to the storage area.
In the embodiment of the disclosure, when the storage server stores the streaming media data, instead of storing the streaming media data into another storage area after storing one storage area, each storage area is divided into a plurality of object blocks, when the streaming media data is received, the storage area with the largest current remaining storage space is determined in the plurality of storage areas, the streaming media data is stored in one object block with the largest current remaining storage space in the storage area with the largest current remaining storage space, after the object block is stored fully, if the remaining streaming media data still exist, the storage area with the largest current remaining storage space is determined again in the plurality of storage areas, and then the remaining streaming media data is stored in one object block with the remaining storage space in the reselected storage area. Therefore, the streaming media data can be stored in a plurality of storage areas, and the balance of the storage areas can be improved.
The present embodiment further provides a system for storing streaming media data, which may include a scheduling server and a plurality of storage servers, where the scheduling server may be configured to receive a storage request sent by a terminal, select a storage server according to a current memory occupancy rate and a current remaining storage space of each storage server, and send address information of the selected storage server to the terminal sending the storage request, so that the terminal sending the storage request sends the streaming media data to the selected storage server. The storage server is used for storing the received streaming media data according to the method.
The scheduling server may be referred to as a CMS (Cloud Management Service), the Storage server may be referred to as a CVS (Cloud Video Storage Service), and the terminal may be a device that acquires media data, for example, a monitoring device.
In one possible application scenario, the terminal may call an SDK (software development kit) interface to establish a connection with the scheduling server, and send a storage request to the scheduling server. After receiving the storage request, the scheduling server may select an appropriate storage server from the plurality of storage servers, and send address information of the selected storage server to the terminal, and after receiving the address information of the storage server, the terminal may send streaming media data to the storage server. After receiving the streaming media data sent by the terminal, the storage server may store the streaming media data according to the method described above.
In implementation, the scheduling server may select a storage server according to the current memory occupancy rate and the current remaining storage space of each storage server. Specifically, the storage server may select a storage server whose current memory occupancy rate is smaller than a first preset value and whose current remaining storage space is larger than a second preset value. For example, one storage server may be randomly selected from the storage servers with the current memory occupancy rate of less than 70% and the current remaining storage space of more than 50G. For another example, the storage server with the largest current remaining storage space may be selected from the storage servers with the current memory occupancy rate of less than 70% and the current remaining storage space of more than 50G.
In a possible application, the scheduling server may also select the storage server as shown in fig. 3, and when the scheduling server receives the storage request sent by the terminal, step 301 is first executed to detect whether the terminal has sent the storage request. For example, whether the storage request is sent can be determined according to the identifier of the terminal carried by the sending storage request of the terminal. If the terminal has sent a storage request, step 302 is executed to select a storage server that previously stores the streaming media data of the terminal. If the terminal has not sent the storage request, and belongs to sending the storage request to the scheduling server for the first time, step 303 is executed, and the storage server is selected according to the current memory occupancy rate and the current remaining storage space of each storage server. After the dispatch server selects a storage server, the process proceeds to step 304, where the address information of the selected storage server is sent to the terminal.
In the embodiment of the disclosure, when the storage server in the system for storing the streaming media data stores the streaming media data, the streaming media data is not stored in one storage area and then stored in another storage area after the storage server is full. Each storage area is divided into a plurality of object blocks, when the streaming media data are received, the storage area with the largest current residual storage space is determined in the plurality of storage areas, the streaming media data are stored in one object block with the remaining storage space in the storage area with the largest current residual storage space, after the object block is full, if the remaining streaming media data exist, the storage area with the largest current residual storage space is determined in the plurality of storage areas again, and then the remaining streaming media data are stored in one object block with the remaining storage space in the reselected storage area. Therefore, the streaming media data can be stored in a plurality of storage areas, and the balance of the storage areas can be improved.
Fig. 4 is a schematic structural diagram of a computer device, which may be the storage server described above, where the computer device 400 may generate a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 401 and one or more memories 402, where the memory 402 stores at least one instruction, and the at least one instruction is loaded and executed by the processor 401 to implement the following method steps for storing streaming media data:
receiving streaming media data;
determining a storage area with the largest current residual storage space in the plurality of storage areas, and determining an object block with the residual storage space as an object block to be used in the plurality of object blocks in the storage area with the largest current residual storage space;
storing the streaming media data in the object block to be used;
in the process of storing the streaming media data, when the object block to be used does not have a residual storage space, if the streaming media data is not stored completely, the step is switched to the step of determining the storage area with the largest current residual storage space in the plurality of storage areas.
In an exemplary embodiment, a computer-readable storage medium, such as a memory, including instructions executable by a processor in a terminal to perform the method of storing streaming media data in the above-described embodiments is also provided. For example, the computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (11)

1. A method for storing streaming media data, wherein the method is applied to a storage server, the storage server includes a plurality of storage areas, each storage area includes a plurality of object blocks, and the method includes:
receiving streaming media data;
determining a storage area with the largest current residual storage space in the plurality of storage areas, and determining an object block with the residual storage space as an object block to be used in the plurality of object blocks in the storage area with the largest current residual storage space;
storing the streaming media data in the object block to be used;
in the process of storing the streaming media data, when the object block to be used does not have a residual storage space, if the streaming media data is not stored completely, the step is switched to the step of determining the storage area with the largest current residual storage space in the plurality of storage areas.
2. The method according to claim 1, wherein the determining a storage area with the largest current remaining storage space among the plurality of storage areas, and determining an object block with the remaining storage space among a plurality of object blocks in the storage area with the largest current remaining storage space as an object block to be used comprises:
if the object blocks which store the streaming media data and have the residual storage space do not exist in the plurality of storage areas, determining the storage area with the largest current residual storage space in the plurality of storage areas, and determining the object block with the residual storage space as the object block to be used in the plurality of object blocks in the storage area with the largest current residual storage space.
3. The method of claim 2, further comprising:
and if the object blocks which store the streaming media data and have the residual storage space exist in the plurality of storage areas, determining that the object blocks which store the streaming media data and have the residual storage space are the object blocks to be used.
4. The method of claim 1, further comprising: and deleting the streaming media data reaching the preset storage period.
5. The method of claim 1, wherein each object block includes an information area and a data area;
the storing the streaming media data in the object block to be used includes:
storing the attribute information part of the streaming media data in the information area of the object block to be used, and storing the data part of the streaming media data in the data area of the object block to be used.
6. The method of claim 1, wherein each storage region further comprises a start block for storing attribute information of the storage region.
7. The method according to claim 6, wherein the attribute information comprises a total storage space of the belonging storage area, a number of object blocks, and a storage space of the object blocks.
8. A system for storing streaming media data, the system comprising a scheduling server and a plurality of storage servers;
the scheduling server is used for receiving the storage requests sent by the terminals, selecting the storage servers according to the current memory occupancy rate and the current remaining storage space of each storage server, and sending the address information of the selected storage servers to the terminals sending the storage requests, so that the terminals sending the storage requests send streaming media data to the selected storage servers;
the storage server for performing the method steps of any of claims 1-7.
9. The method of claim 8, wherein the scheduling server is configured to select a storage server having a current memory occupancy rate smaller than a first preset value and a current remaining storage space larger than a second preset value.
10. The computer equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing the communication between the processor and the memory through the bus; a memory for storing a computer program; a processor for executing a program stored in the memory to perform the method steps of any of claims 1-7.
11. A computer-readable storage medium, characterized in that a computer program is stored in the storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 1-7.
CN201910577923.6A 2019-06-28 2019-06-28 Method and system for storing streaming media data Active CN111405313B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910577923.6A CN111405313B (en) 2019-06-28 2019-06-28 Method and system for storing streaming media data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910577923.6A CN111405313B (en) 2019-06-28 2019-06-28 Method and system for storing streaming media data

Publications (2)

Publication Number Publication Date
CN111405313A true CN111405313A (en) 2020-07-10
CN111405313B CN111405313B (en) 2023-11-14

Family

ID=71413844

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910577923.6A Active CN111405313B (en) 2019-06-28 2019-06-28 Method and system for storing streaming media data

Country Status (1)

Country Link
CN (1) CN111405313B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022121434A1 (en) * 2020-12-07 2022-06-16 海信视像科技股份有限公司 Display device, video recording method, and recorded file display method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101714391A (en) * 2009-11-12 2010-05-26 北京东方网力科技有限公司 Data storage method and device
CN102200935A (en) * 2011-04-27 2011-09-28 烽火通信科技股份有限公司 Method for storing data in stream media system
CN104699416A (en) * 2013-12-10 2015-06-10 杭州海康威视系统技术有限公司 Data storage system and data storage method
CN106293527A (en) * 2016-08-05 2017-01-04 成都佳荣科技有限公司 Data-storage system
WO2017035787A1 (en) * 2015-09-01 2017-03-09 深圳好视网络科技有限公司 Method, device, and system for storing streaming media file

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101714391A (en) * 2009-11-12 2010-05-26 北京东方网力科技有限公司 Data storage method and device
CN102200935A (en) * 2011-04-27 2011-09-28 烽火通信科技股份有限公司 Method for storing data in stream media system
CN104699416A (en) * 2013-12-10 2015-06-10 杭州海康威视系统技术有限公司 Data storage system and data storage method
WO2017035787A1 (en) * 2015-09-01 2017-03-09 深圳好视网络科技有限公司 Method, device, and system for storing streaming media file
CN106293527A (en) * 2016-08-05 2017-01-04 成都佳荣科技有限公司 Data-storage system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022121434A1 (en) * 2020-12-07 2022-06-16 海信视像科技股份有限公司 Display device, video recording method, and recorded file display method
US12088871B2 (en) 2020-12-07 2024-09-10 Hisense Visual Technology Co., Ltd. Display apparatus, video recording method, and recorded file display method

Also Published As

Publication number Publication date
CN111405313B (en) 2023-11-14

Similar Documents

Publication Publication Date Title
US10817386B2 (en) Virtual machine recovery method and virtual machine management device
US10601901B2 (en) Methods, systems, and media for stored content distribution and access
CN111049928B (en) Data synchronization method, system, electronic device and computer readable storage medium
CN110099084B (en) Method, system and computer readable medium for ensuring storage service availability
CN112291082B (en) Disaster recovery processing method, terminal and storage medium for machine room
CN114443364B (en) Distributed block storage data processing method, device, equipment and storage medium
CN105786539B (en) File downloading method and device
CN112965660A (en) Method, system, device and medium for feeding back information of double storage pools
CN109144403B (en) Method and equipment for switching cloud disk modes
CN113467719A (en) Data writing method and device
CN111405313A (en) Method and system for storing streaming media data
CN112363980A (en) Data processing method and device for distributed system
CN112199176A (en) Service processing method, device and related equipment
CN109522177A (en) A kind of task daily record processing system, method and device
CN116483543A (en) Task processing method, device, equipment and storage medium
CN112698783A (en) Object storage method, device and system
CN109669814A (en) A kind of restoration methods of Metadata Service, device, equipment and readable storage medium storing program for executing
CN102325171A (en) Data storage method in monitoring system and system
CN112053707B (en) Recording method and device for multimedia equipment, storage medium and electronic device
CN109992447A (en) Data copy method, device and storage medium
CN114089912A (en) Data processing method and device based on message middleware and storage medium
CN111104381A (en) Log management method, device and equipment and computer readable storage medium
CN110569231A (en) Data migration method, device, equipment and medium
CN115328880B (en) Distributed file online recovery method, system, computer equipment and storage medium
CN111399763B (en) Method, device, system, equipment and storage medium for data storage

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant