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

Method and system for storing streaming media data Download PDF

Info

Publication number
CN111405313B
CN111405313B CN201910577923.6A CN201910577923A CN111405313B CN 111405313 B CN111405313 B CN 111405313B CN 201910577923 A CN201910577923 A CN 201910577923A CN 111405313 B CN111405313 B CN 111405313B
Authority
CN
China
Prior art keywords
storage
media data
streaming media
storage space
storage area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910577923.6A
Other languages
Chinese (zh)
Other versions
CN111405313A (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

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, belonging 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: receiving streaming media data; determining a storage area with the largest current residual storage space in the storage areas, and determining an object block with the residual storage space as an object block to be used in a plurality of object blocks of the storage area with the largest current residual storage space; storing the streaming media data in the object block to be used; and in the process of storing the streaming media data, when the object block to be used does not have the residual storage space, if the streaming media data is not stored, the method is transferred to a storage area with the maximum current residual storage space among the 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 disclosure relates to the technical field of cloud storage, in particular to a method and a system for storing streaming media data.
Background
For data occupying large storage space, the terminal can store the data in the cloud system, and when the terminal needs to be used, the data are acquired from the cloud system.
The cloud system mainly comprises a scheduling server and a storage server cluster, wherein the 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 carrying out the present disclosure, the inventors have 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, after one storage area is fully stored, the data is stored in another storage area, so that the situation that more data is stored in the existing storage area and less data is stored in the existing storage area or even the data is not stored in the existing storage area is caused, 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, there is provided a method of storing streaming media data, the method being applied to a storage server, the storage server comprising a plurality of storage areas, each storage area comprising a plurality of object blocks, the method comprising:
receiving streaming media data;
determining a storage area with the largest current residual storage space in the storage areas, and determining an object block with the residual storage space as an object block to be used in a plurality of object blocks of the storage area with the largest current residual storage space;
storing the streaming media data in the object block to be used;
and in the process of storing the streaming media data, when the object block to be used does not have the residual storage space, if the streaming media data is not stored, the method is transferred to a storage area with the maximum current residual storage space among the storage areas.
Optionally, the determining, in the multiple storage areas, a storage area with the largest current remaining storage space, and determining, in the multiple object blocks of the storage area with the largest current remaining storage space, the object block with the remaining storage space as the object block to be used includes:
if the object blocks which store the streaming media data and also have the residual storage space do not exist in the storage areas, determining the storage area with the maximum current residual storage space in the storage areas, and determining the object block with the residual storage space as the object block to be used in the object blocks with the maximum current residual storage space;
optionally, the method further comprises:
and if the object blocks which store the streaming media data and also have the residual storage space exist in the storage areas, determining the object blocks which store the streaming media data and also have the residual storage space as the object blocks to be used.
Optionally, the method further comprises: 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:
and 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 area further includes a start block, where the start block is used to store attribute information of the storage area to which the start block belongs.
Optionally, the attribute information includes a total storage space of the belonging storage area, the number of the object blocks, and a storage space of the object blocks.
In a second aspect, the present embodiment further provides a system for storing streaming media data, where the system includes 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 residual 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 described above.
Optionally, 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.
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 to realize the steps of the method.
In a third aspect, the present embodiment further provides a computer-readable storage medium, in which a computer program is stored, which computer program, when being executed by a processor, implements the above-mentioned method steps.
The technical scheme provided by the embodiment of the application has the beneficial effects that at least:
in the embodiment of the disclosure, when the storage server stores the streaming media data, instead of storing one storage area into another storage area after filling the other storage area, each storage area is divided into a plurality of object blocks, when the streaming media data is received, a storage area with the largest current remaining storage space is determined in the plurality of storage areas, the streaming media data is stored in an object block with the largest current remaining storage space in the storage area, after the object block is filled, if the streaming media data is left, the storage area with the largest current remaining storage space is determined in the plurality of storage areas again, and then the remaining streaming media data is stored in an object block with the largest remaining storage space in the newly selected storage area. In this way, 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 of the embodiments of the present disclosure, the drawings required for the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and other drawings may be obtained according to these drawings without inventive effort for a person of ordinary skill in the art.
Fig. 1 is a flowchart of a method for storing streaming media data according to an embodiment of the present disclosure;
fig. 2 is a flowchart of a method for storing streaming media data according to an embodiment of the present disclosure;
fig. 3 is a schematic flow chart of selecting a storage server by a scheduling server according to an embodiment of the disclosure;
fig. 4 is a schematic structural diagram of a storage server according to an embodiment of the present disclosure.
Detailed Description
For the purposes of clarity, technical solutions and advantages of the present disclosure, the following further details the embodiments of the present disclosure with reference to the accompanying drawings.
The embodiment of the disclosure provides a method for storing streaming media data, which can be applied to a storage server, wherein the storage server can comprise a plurality of storage devices, and for example, can comprise DISK, SSD (Solid State Drive, solid state drive, commonly known as solid state drive), RAID (Redundant Array of Independent Disks ) and the like. Each storage device constitutes a storage area, each storage area being divisible into a plurality of object blocks, the object blocks being sub-areas of the storage area for storing streaming media data. The process of the storage server storing streaming media data in the object block may be performed according to the flow shown in fig. 1.
The storage spaces of any two object blocks are equal, specifically, the storage spaces of any two object blocks in each storage area are the same, and the storage spaces of any two object blocks in different storage areas are also the same, so that the storage server divides the storage areas according to the object blocks with the same storage spaces. It is to be noted that since the storage space is different for each storage area, the number of object blocks included in each storage area is different.
In step 101, a storage server receives streaming media data.
The streaming media data may be video data or media data transmitted by streaming technology, such as audio data.
In implementation, the streaming media data received by the storage server may come from a terminal (such as a monitoring device) that collects media data, for example, the terminal sends the collected media data to the storage server according to a streaming technology, and the storage server may receive the streaming media data from the terminal that collects 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 largest current remaining storage space as an object block to be used among a plurality of object blocks of the storage area with the largest current remaining storage space.
In an implementation, after receiving the streaming media data, the storage server may select a storage area with the largest current remaining storage space from the plurality of storage areas, and determine, from a plurality of object blocks in the selected storage area, that the object block with the remaining storage space is an object block to be used.
The current state of any object block of each storage area may be one of the following three states: there is no remaining storage space in which streaming media data is stored, there is still remaining storage space in which streaming media data is stored, and no streaming media data is stored (i.e., in an idle state).
Accordingly, as described above, the object block to be used is an object block storing the remaining storage space, and then the object block to be used may be an object block not storing streaming media data, or may be an object block storing streaming media data but still having the remaining storage space.
Here, having a storage space means that a minimum transmission unit, for example, transmission of streaming media data in packets (the data amount of one packet is the minimum transmission unit), can also be stored, and if the object block can store one packet, it means that there is still a storage space, and if one packet cannot be stored, it means that there is no storage space, that is, it is already full of data. For example, if the data size of one data packet is 2KB, and the remaining memory space of the object block is still only capable of storing 1KB of data, it indicates that the object block is full and has no memory 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, when the storage server does not have the remaining storage space in the storage of the streaming media data, if the streaming media data is not stored, the storage server proceeds to execute the determination of the storage area with the largest current remaining storage space among the plurality of storage areas.
Wherein, the object block to be used does not have residual storage space, which means that the object block to be used does not have storage space, that is, the object block to be used is full of data.
In the implementation, when the storage server stores the streaming media data and the to-be-used object block does not have the remaining storage space, if the streaming media data which is not stored still remains, the storage server goes to the execution step 102, and redetermines the storage area with the largest current remaining storage space in the storage areas, and determines the object block with the remaining storage space as the to-be-used object block in the storage area with the largest current remaining storage space determined at this time, and stores the remaining streaming media data in the to-be-used object block determined at this time.
The storage area with the largest remaining storage space determined in the previous time and the storage area with the largest remaining storage space determined in the current time may be the same storage area or may not be the same storage area.
For example, when 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, and when the current storage server determines the storage area with the largest remaining storage space, the current remaining storage space of the storage area 1 is still the largest, and then the storage areas determined in the previous and current times are both the storage area 1. And if the previous storage server determines that the storage area with the largest remaining storage space is the largest current remaining storage space of the storage area 1, the previously determined storage area is the storage area 1, and the remaining storage space of the storage area 1 is reduced in the process of storing the streaming media data, when the storage server determines the storage area again this time, the storage area 1 is not the storage area with the largest current remaining storage space any more, and if the current remaining storage space of the storage area 2 is the largest current remaining storage space, the currently determined storage area is the storage area 2, and then the storage areas determined by the previous storage server and the current storage server are not the same storage area.
The method for storing streaming media data described above, instead of storing one storage area in another storage area after filling up the storage area, divides each storage area into a plurality of object blocks, when receiving streaming media data, determines a storage area with the largest current remaining storage space among the plurality of storage areas, stores streaming media data in an object block with the largest current remaining storage space of the storage area, and if the object block is full, then re-determines a storage area with the largest current remaining storage space among the plurality of storage areas if there is remaining streaming media data, and stores the remaining streaming media data in an object block with the largest current remaining storage space of the re-selected storage area. In this way, 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, which may further comprise a scheduling server. The terminal for collecting media data may send a storage request to the scheduling server, after the scheduling server receives the storage request sent by the terminal, one storage server may be selected from a plurality of storage servers, which may be called as a target storage server, and then address information of the target storage server is sent to the terminal. After the target storage server receives the streaming media data, a storage area with the largest current remaining storage space can 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 in which the storage server selects the object block to be used from the plurality of object blocks in the storage area 1 may be as follows:
one case may be that one object block having a remaining storage space is randomly selected from a plurality of object blocks of the storage area 1 to be determined as an object block to be used. In this case, one object block having a remaining storage space may be selected from among the plurality of object blocks in the storage area 1 in accordance with a predetermined arrangement order, and the selected object block may be determined as an object block to be used. Another case may be that an object block storing streaming media data but having a remaining storage space is selected as an object block to be used from among the plurality of object blocks of the storage area 1, and if an object block storing no streaming media data but having a remaining storage space is not stored among the plurality of object blocks of the storage area 1, the object block may be selected according to one of the first two cases.
In this embodiment, a specific selection manner of selecting an object block with a remaining storage space as an object block to be used from a plurality of object blocks in a storage area of a storage server is not specifically limited, and the object block with the remaining storage space can be selected to store streaming media data.
Alternatively, in order to improve the regularity of the stored data, accordingly, the storage server determines whether there is an object block in which the streaming data has been stored but which has a remaining storage space in the plurality of storage areas after receiving the streaming data. If there are object blocks which store streaming media data and also have a remaining storage space in the plurality of storage areas, it is determined that the object blocks which store streaming media data and also have a remaining storage space are object blocks to be used. If there is no object block storing streaming media data and having a remaining storage space in the plurality of storage areas, determining a storage area with the largest current remaining storage space in the plurality of storage areas, and determining the object block with the largest current remaining storage space as an object block to be used in the plurality of object blocks of the storage area with the largest current remaining storage space, specifically, may be performed according to a flow shown in fig. 2:
after the storage server receives the streaming media data, the method may be performed according to the flow shown in fig. 2:
in step 201, the storage server detects whether there is an object block storing streaming media data but having a remaining storage space among the respective object blocks of the plurality of storage areas. If present, go to step 202, if not present, 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 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 largest current remaining storage space as an object block to be used among a plurality of object blocks of the storage area with the largest current remaining storage space.
Based on the foregoing, in step 203, the object block having the remaining storage space is the object block in which the streaming data is not stored.
In step 204, the storage server stores the streaming media data in the object block to be used. If the streaming media data is stored, the process goes to the end, in which case the object block to be used may or may not have any remaining storage space. Otherwise, the execution step 203 is shifted to, that is, when the storage server stores the streaming media data until the object block to be used does not have the remaining storage space, and if the streaming media data is not stored, the execution step 203 is shifted to execute the storage operation on the remaining streaming media data. And when the streaming media data is stored, turning to the end.
In this case, in the first round of storage of streaming media data, the object block to be used may be an object block storing streaming media data but having a remaining storage space, or may be an object block not storing streaming media data. In the storage process after the second round of 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 accesses one path of streaming media data for the first time, the process may be performed according to the flow shown in fig. 2, and step 201 may be performed first, and if there is an object block storing streaming media data but having a remaining storage space, the object block may be referred to as object block 1, then the object block 1 is determined as an object block to be used according to step 202. The streaming media data is then stored in the object block 1 according to step 204, and if the streaming media data can be completely stored in the object block 1 during the storing, the storing of the streaming media data is ended. If the streaming media data is not stored but there is no remaining storage space in the object block 1, the process goes to sequentially execute step 203 and step 204 until the streaming media data is completely stored. If the streaming media data belongs to uninterrupted data, the storage server may perform step 203 and step 204 in a loop for the storage process of the subsequent received streaming media data.
Alternatively, in general, the data size of the streaming media data is relatively large, for example, video data collected by a monitoring device (such as a camera) in the monitoring field belongs to media data that is transmitted continuously, so that a storage space is saved, and correspondingly, the storage server can delete the streaming media data reaching a preset storage period to save the storage space.
Alternatively, in order to facilitate the storage server to read the stored streaming media data, each object block of the respective storage areas may include an information area and a data area, and the storage server may store the attribute information part of the streaming media data in the information area of the object block to be used and the data part of the streaming media data in the data area.
The attribute information portion 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 an implementation, attribute information of the streaming media data stored in the information area of the object block may be used as an index to find the streaming media data. For example, when the storage server receives a streaming media reading notification carrying the target uploading time, the storage server may search for the uploading time of the key frame matched with the target uploading time based on the target uploading time and the uploading time of the key frame stored in the information area of the object block, determine the object block where the key frame is located, and then acquire the streaming media data matched with the target uploading time from the data area of the determined object block.
For example, when the target uploading time is 09:00 from 2019, 5, 16, and 10:00 from 2019, 5, 16, and 10:00, and the storage server receives the notification of the streaming media reading in the above time period, it may search all the key frames corresponding to the target uploading time in the storage area based on the uploading time of the key frames in the information area, and then obtain the streaming media data containing the key frames from the data area of the object block. And then, the storage server sends the acquired streaming media data to the terminal.
Optionally, since the attribute information portion 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 mutually backed up.
Optionally, each storage area includes not only the object blocks, but also a start block, where the start block is configured to store attribute information of the storage area to which the start block belongs, where the attribute information may be a total storage space of the storage area, a number of the object blocks, a storage space of the object blocks, and so on.
The attribute information stored in the starting block is important, and in order to improve the safety of the attribute information stored in the starting block, the starting block may include a main starting block and a standby starting block, where the attribute information stored in the main starting block and the standby starting block are mutually backed up.
In an implementation, the storage server may obtain the total storage space 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 one storage area into another storage area after filling the other storage area, each storage area is divided into a plurality of object blocks, when the streaming media data is received, a storage area with the largest current remaining storage space is determined in the plurality of storage areas, the streaming media data is stored in an object block with the largest current remaining storage space in the storage area, after the object block is filled, if the streaming media data is left, the storage area with the largest current remaining storage space is determined in the plurality of storage areas again, and then the remaining streaming media data is stored in an object block with the largest remaining storage space in the newly selected storage area. In this way, the streaming media data can be stored in a plurality of storage areas, and the balance of the storage areas can be improved.
The embodiment also provides a system for storing streaming media data, which can comprise a scheduling server and a plurality of storage servers, wherein the scheduling server can be used for receiving a storage request sent by a terminal, selecting the storage server according to the current memory occupancy rate and the current residual storage space of each storage server, and sending the 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 abbreviated as CMS (Cloud Management Service, cloud storage management service), the storage server may be abbreviated as CVS (Cloud Video Storage service, cloud storage video storage service), and the terminal may be a device for collecting media data, for example, may be a monitoring device or the like.
In one possible application scenario, the terminal may invoke an SDK (software development kit, software tool development kit) interface to establish a connection with the dispatch server and send a storage request to the dispatch 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 the storage server receives the streaming media data sent by the terminal, the streaming media data can be stored according to the method.
In an implementation, the scheduling server may select the storage server according to a current memory occupancy rate and a current remaining storage space of each storage server. Specifically, the storage server may 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. For example, one storage server may be selected randomly from the storage servers having a current memory occupancy rate of less than 70% and a current remaining storage space of greater 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 smaller than 70% and the current remaining storage space larger than 50G.
In one possible application, the scheduling server may also select a storage server in the manner shown in fig. 3, and when the scheduling server receives a storage request sent by a terminal, step 301 is first performed to detect whether the terminal has sent the storage request. For example, whether the storage request is sent may 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 performed to select a storage server that previously stored streaming media data for the terminal. If the terminal does not send 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 scheduling server selects the storage server, step 304 is executed to send the address information of the selected storage server to the terminal.
In the embodiment of the present disclosure, when a storage server in a system for storing streaming media data stores streaming media data, one storage area is not fully stored and then stored in another storage area. And dividing each storage area into a plurality of object blocks, determining the storage area with the largest current residual storage space in the plurality of storage areas when the streaming media data is received, storing the streaming media data in one object block with the largest current residual storage space in the storage area with the residual storage space, and if the object block is full, determining the storage area with the largest current residual storage space in the plurality of storage areas again and storing the residual streaming media data in one object block with the residual storage space in the re-selected storage area. In this way, 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 provided in an embodiment of the present application, where the computer device may be a storage server as described above, and the computer device 400 may have a relatively large difference due to different configurations or performances, and may include one or more processors (central processing units, CPU) 401 and one or more memories 402, where at least one instruction is stored in the memory 402, and the at least one instruction is loaded and executed by the processor 401 to implement the following method steps of storing streaming media data:
receiving streaming media data;
determining a storage area with the largest current residual storage space in the storage areas, and determining an object block with the residual storage space as an object block to be used in a plurality of object blocks of the storage area with the largest current residual storage space;
storing the streaming media data in the object block to be used;
and in the process of storing the streaming media data, when the object block to be used does not have the residual storage space, if the streaming media data is not stored, the method is transferred to a storage area with the maximum current residual storage space among the storage areas.
In an exemplary embodiment, a computer readable storage medium, such as a memory comprising instructions executable by a processor in a terminal to perform the method of storing streaming media data in the above embodiment is also provided. For example, the computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
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 for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The foregoing description of the preferred embodiments of the application is not intended to limit the application to the precise form disclosed, and any such modifications, equivalents, and alternatives falling within the spirit and scope of the application are intended to be included within the scope of the application.

Claims (8)

1. A method of storing streaming media data, the method being applied to a storage server, the storage server comprising a plurality of storage areas, each storage area comprising a plurality of object blocks and a start block for storing attribute information of the storage area, the attribute information comprising a total storage space of the storage areas, a number of object blocks and a storage space of the object blocks, the method comprising:
receiving streaming media data;
acquiring the total storage space of each storage area from a starting block of each storage area, and determining the residual storage space of each storage area based on the acquired total storage space of each storage area and the data amount of streaming media data sent to each storage area;
determining a storage area with the largest current residual storage space in the storage areas, and determining one object block with the residual storage space as an object block to be used in a plurality of object blocks of the storage area with the largest current residual storage space;
storing the streaming media data in the object block to be used;
deleting the streaming media data reaching a preset storage period;
and in the process of storing the streaming media data, when the object block to be used does not have the residual storage space, if the streaming media data is not stored, the process is shifted to the process of determining the storage area with the maximum current residual storage space in the storage areas, wherein the storage area with the maximum residual storage space determined in the previous time and the storage area with the maximum residual storage space determined in the current time are the same storage area or are not the same storage area.
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 largest current remaining storage space as an object block to be used among a plurality of object blocks of the storage area, includes:
and if the object blocks which store the streaming media data and also have the residual storage space do not exist in the storage areas, determining the storage area with the maximum current residual storage space in the storage areas, and determining the object block with the residual storage space as the object block to be used in the object blocks with the maximum current residual storage space.
3. The method according to claim 2, wherein the method further comprises:
and if the object blocks which store the streaming media data and also have the residual storage space exist in the storage areas, determining the object blocks which store the streaming media data and also have the residual storage space as the object blocks to be used.
4. 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:
and 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.
5. 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 residual 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 being adapted to perform the method of any of claims 1-4.
6. The system of claim 5, wherein the scheduling server is configured to select a storage server having a current memory occupancy less than a first predetermined value and a current remaining storage space greater than a second predetermined value.
7. The computer equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the bus; a memory for storing a computer program; a processor for executing a program stored on a memory, implementing the method of any one of claims 1-4.
8. A computer readable storage medium, characterized in that the storage medium has stored therein a computer program which, when executed by a processor, implements the method of any of claims 1-4.
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 CN111405313A (en) 2020-07-10
CN111405313B true 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)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4258674A1 (en) * 2020-12-07 2023-10-11 Hisense Visual Technology Co., Ltd. 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

Also Published As

Publication number Publication date
CN111405313A (en) 2020-07-10

Similar Documents

Publication Publication Date Title
US10637916B2 (en) Method and device for storage resource allocation for video cloud storage
CN110659151B (en) Data verification method and device and storage medium
US10601901B2 (en) Methods, systems, and media for stored content distribution and access
US11102322B2 (en) Data processing method and apparatus, server, and controller
CN102298547A (en) Data backup method and device
CN110633168A (en) Data backup method and system for distributed storage system
CN105786539B (en) File downloading method and device
CN109361625B (en) Method, device and controller for checking forwarding table item
CN111405313B (en) Method and system for storing streaming media data
CN113965519B (en) Flow control and cluster resource guarantee method, equipment and storage medium
US20090190607A1 (en) Method and apparatus for transmitting data and method and apparatus for performing data task
CN102118315A (en) Method for fluidizing, recording and reading data and system adopting same
JP2009157437A (en) Distributed storage system
CN101986703A (en) Video recording method, network video surveillance system and front end as well as scheduling server
CN112698783A (en) Object storage method, device and system
CN110798492B (en) Data storage method and device and data processing system
CN109669814A (en) A kind of restoration methods of Metadata Service, device, equipment and readable storage medium storing program for executing
CN115623236A (en) Gift special-effect resource playing method and device
CN114089912A (en) Data processing method and device based on message middleware and storage medium
CN115314738A (en) Method and device for processing pull stream by adding label to hook data
JP2023150938A (en) Control device, access network node, control method, and computer program
CN115967678A (en) Flow limiting method and device, computer equipment and storage medium
CN112506706A (en) Image processing method, device, server and storage medium
CN116743719A (en) Streaming media processing method and device, terminal equipment and storage medium
CN116932318A (en) Method, apparatus and computer readable medium for data processing and transmission

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