CN109962944A - A kind of media data storage method, storage device and electronic equipment - Google Patents
A kind of media data storage method, storage device and electronic equipment Download PDFInfo
- Publication number
- CN109962944A CN109962944A CN201711403402.6A CN201711403402A CN109962944A CN 109962944 A CN109962944 A CN 109962944A CN 201711403402 A CN201711403402 A CN 201711403402A CN 109962944 A CN109962944 A CN 109962944A
- Authority
- CN
- China
- Prior art keywords
- encoder
- media data
- storage
- event information
- real time
- 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
Links
- 238000003860 storage Methods 0.000 title claims abstract description 159
- 238000000034 method Methods 0.000 title claims abstract description 50
- 238000013500 data storage Methods 0.000 title claims abstract description 25
- 238000005520 cutting process Methods 0.000 claims description 26
- 238000007726 management method Methods 0.000 claims description 21
- 238000004891 communication Methods 0.000 claims description 17
- 230000005540 biological transmission Effects 0.000 claims description 13
- 238000004590 computer program Methods 0.000 claims description 7
- 238000012217 deletion Methods 0.000 claims description 6
- 230000037430 deletion Effects 0.000 claims description 6
- 238000010586 diagram Methods 0.000 description 13
- 238000012544 monitoring process Methods 0.000 description 9
- 238000001514 detection method Methods 0.000 description 7
- 238000004458 analytical method Methods 0.000 description 6
- 238000012790 confirmation Methods 0.000 description 6
- 230000004044 response Effects 0.000 description 6
- 238000012545 processing Methods 0.000 description 5
- 230000011664 signaling Effects 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 3
- 238000009826 distribution Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000004913 activation Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 230000001934 delay Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000014759 maintenance of location Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 230000000630 rising effect Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/76—Television signal recording
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Computer Networks & Wireless Communication (AREA)
- Information Transfer Between Computers (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the present application provides a kind of media data storage method, storage device and electronic equipment, this method comprises: receiving the event information that encoder is sent;Judge whether event information is predetermined event information;If so, obtaining the media data that encoder acquires in real time, and the media data that will acquire is stored to storage server.Using the embodiment of the present application, it is effectively saved the memory space of storage server.
Description
Technical field
This application involves technical field of data storage, more particularly to a kind of media data storage method, storage device and
Electronic equipment.
Background technique
Media data includes video data and audio data etc..With encoder output media data increasingly high definition, Yun Cun
Storage application is more and more extensive.
Currently, the storage time section of media data is issued to cloud storage by user when carrying out the storage of media data
Access server, access server obtain the media data that encoder acquires in real time in the storage time section, and will acquire
Media data is stored to the storage server of cloud storage.
Media data is stored according to the above method, the media data in storage time section will all be stored to storage service
Device.Assuming that it is daily 8 points to ten eight points that user, which specifies storage time section, then the memory space that single encoder needs daily is
* 3600 seconds 10 hours * encoder average bit rates, this will occupy the memory space of a large amount of storage server.
Summary of the invention
The embodiment of the present application is designed to provide a kind of media data storage method, storage device and electronic equipment, with
Save the memory space of storage server.Specific technical solution is as follows:
On the one hand, the embodiment of the present application discloses a kind of media data storage method, which comprises
Receive the event information that encoder is sent;
Judge whether the event information is predetermined event information;
If so, obtaining the media data that the encoder acquires in real time, and the media data that will acquire is stored to storage and taken
Business device.
In one embodiment of the application, the method also includes:
Before receiving the event information that the encoder is sent, when the initial time for reaching predetermined storage time section
When, and/or when receiving the connection request for being directed to the encoder, connection is established with the encoder;
It stores in the media data that will acquire to the storage server, when the end for reaching predetermined storage time section
When the time, or when receiving the cutting request for the encoder, the connection of cutting and the encoder.
In one embodiment of the application, the method also includes:
After establishing connection with the encoder, the media data that the encoder acquires in real time is obtained and cached;It deletes
The media data cached in addition to duration of pre-recording;
When the event information for determining that the encoder is sent is the predetermined event information, by the media number of caching
According to storing to the storage server.
In one embodiment of the application, described the step of obtaining the media data that encoder acquires in real time, comprising:
Obtain the media data that preset time delay inner encoder acquires in real time.
In one embodiment of the application, described the step of obtaining the media data that encoder acquires in real time, comprising:
Using the event information as event commencing signal, the media data that encoder acquires in real time is obtained;
When receiving the event end signal that the encoder is sent, stop obtaining the matchmaker that the encoder acquires in real time
Volume data.
In one embodiment of the application, the step of media data that will acquire is stored to storage server, packet
It includes:
Address requests instruction is sent to management server;
Receive the address for the storage server that the management server is sent according to Address requests instruction;
The media data that will acquire stores storage server corresponding to received address.
Two aspects, the embodiment of the present application disclose a kind of media data store, and described device includes:
Receiving unit, for receiving the event information of encoder transmission;
Judging unit, for judging whether the event information is predetermined event information;
Storage unit, for it is real-time to obtain the encoder in the case where the judging result of the judging unit, which is, is
The media data of acquisition, and the media data that will acquire is stored to storage server.
In one embodiment of the application, described device further include:
Unit is established, for before receiving the event information that the encoder is sent, when reaching predetermined storage
Between section initial time when, and/or when receive be directed to the encoder connection request when, establish connection with the encoder;
Cutting unit makes a reservation for deposit for storing in the media data that will acquire to the storage server when reaching
When storing up the end time of period, or when receiving the cutting request for the encoder, the company of cutting and the encoder
It connects.
In one embodiment of the application, described device further include: cache unit and deletion unit;
The cache unit, it is real-time for after establishing connection with the encoder, obtaining and caching the encoder
The media data of acquisition;
The deletion unit, for deleting the media data cached outside duration of pre-recording;
The storage unit is also used to believe when the event information for determining the encoder transmission for the scheduled event
When breath, the media data of caching is stored to the storage server.
In one embodiment of the application, the storage unit is specifically used for:
In the case where the judging result of the judging unit, which is, is, the matchmaker that preset time delay inner encoder acquires in real time is obtained
Volume data.
In one embodiment of the application, the storage unit is specifically used for:
In the case where the judging result of the judging unit, which is, is, using the event information as event commencing signal,
Obtain the media data that encoder acquires in real time;When receiving the event end signal that the encoder is sent, stop obtaining
The media data that the encoder acquires in real time.
In one embodiment of the application, the storage unit is specifically used for:
Address requests instruction is sent to management server;
Receive the address for the storage server that the management server is sent according to Address requests instruction;
The media data that will acquire stores storage server corresponding to received address.
Three aspects, the embodiment of the present application disclose a kind of electronic equipment, including processor, communication interface, memory and logical
Believe bus;Wherein, the processor, the communication interface, the memory complete mutual lead to by the communication bus
Letter;
The memory, for storing computer program;
The processor realizes above-mentioned media data storage side for executing the computer program stored on memory
Method step.
Four aspects, the embodiment of the present application disclose a kind of machine readable storage medium, in the machine readable storage medium
It is stored with computer applied algorithm, the computer applied algorithm realizes above-mentioned media data storage method when being executed by processor
Step.
In the embodiment of the present application, only when the event information for receiving encoder transmission is predetermined event information, just obtain
When taking the media data that encoder acquires in real time, and the media data that will acquire is stored to storage server, rather than will store
Between section inner encoder acquire media data store the memory space that storage server has been saved to storage server entirely.Certainly,
Any product or method for implementing the application must be not necessarily required to reach simultaneously above all advantages.
Detailed description of the invention
Technical solution in ord to more clearly illustrate embodiments of the present application or in the related technology, below will be to embodiment or phase
Attached drawing needed in technical description is closed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.
Fig. 1 is the first flow diagram of media data storage method provided by the embodiments of the present application;
Fig. 2 is second of flow diagram of media data storage method provided by the embodiments of the present application
Fig. 3 is the first work signaling diagram of media data provided by the embodiments of the present application storage;
Fig. 4 is second of work signaling diagram of media data provided by the embodiments of the present application storage;
Fig. 5 is the first structural schematic diagram of media data store provided by the embodiments of the present application;
Fig. 6 is second of structural schematic diagram of media data store provided by the embodiments of the present application;
Fig. 7 is a kind of structural schematic diagram of electronic equipment provided by the embodiments of the present application.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on
Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall in the protection scope of this application.
For ease of understanding, the word occurred in the embodiment of the present application is explained below.
Media data: including video data and audio data etc.;
Event information: including mobile detection, region intrusion detecting, Face datection etc.;
Mobile detection: the image collected by camera according to different frame rates can be by CPU (Central
Processing Unit, central processing unit) it is calculated and compared according to certain algorithm, determine whether picture changes, such as someone
It passes by, camera lens is moved;
Region intrusion detecting: setting an off-limits region in picture, has detected whether that object enters and has set
Region.
In order to save the memory space of storage server, the embodiment of the present application provide a kind of media data storage method and
Media data store.This method can be applied to an equipment in cloud storage, such as access server.For convenient for saying
It is bright, it is said so that media data storage method and the executing subject of media data store are access server as an example below
It is bright.
With reference to Fig. 1, Fig. 1 is the first flow diagram of media data storage method provided by the embodiments of the present application, should
Method includes:
Step 101: receiving the event information that encoder is sent;
Encoder carries out analytical calculation to the image of acquisition in real time, it is determined whether event occurs;When determining generation event,
The event information that analysis meter calculates is sent to access server.
In one embodiment of the application, in order to guarantee the storage of media data, it can preset what needs connected
The encoder information of encoder, here, encoder information include IP (Internet Protocol, network protocol) address, MAC
(Media Access Control, media access control) address, port, user name, password etc., according to encoder information, connects
Connection can be established with encoder by entering server.It is connected for example, access server is sent according to encoder information to encoder
Request;Encoder establishes connection according to connection request and access server, and the connection of connection request is sent to access server
Response;Access server establishes connection according to connection response and encoder.
After establishing connection with encoder, access server can carry out event monitoring to encoder, receive encoder
The event information of transmission, until establishing connection cutting with encoder.
In one embodiment of the application, the corresponding storage time section of an encoder can be preset, this is predetermined
Storage time section is the period where the event that user is concerned about, when reaching the initial time of predetermined storage time section, access
Server sends connection request to encoder according to encoder information, establishes connection with encoder;When the predetermined storage time of arrival
When the end time of section, access server sends cutting request, the company of cutting and encoder to encoder according to encoder information
It connects.
Based on the above situation, event monitoring only is carried out to encoder in predetermined storage time section, effectively saves equipment
Resource.
In one embodiment of the application, user can be directed to encoder to access server input according to their needs
Connection request or encoder the connection request for being directed to encoder can be sent to access server, access server receiving
For encoder connection request when, establish connection with encoder;User can also be defeated to access server according to their needs
The cutting for being directed to encoder can be sent for the cutting request of encoder or encoder to access server by, which entering, requests, access
For server when receiving the cutting request for encoder, cutting establishes connection with encoder.User be can satisfy in this way to thing
The demand that part is monitored.
It is above two to establish the method that connection is connect with encoder and comprehensively consider, that is, when access server is connecing
When narrowing to the connection request of encoder, judge whether that the initial time for reaching predetermined storage time section waits if not reaching
When reaching the initial time of predetermined storage time section, connection is established with encoder;If reaching, connection is established with encoder.
Step 102: whether the event information for judging that encoder is sent is predetermined event information;If so, executing step 103;
Here, predetermined event information may include in the event informations such as mobile detection, region intrusion detecting, Face datection
It is one or more.
For example, predetermined event information includes mobile detection, region intrusion detecting, Face datection, if the thing that encoder is sent
Part information is mobile detection, it is determined that the event information that encoder is sent is predetermined event information.
If the event information that encoder is sent is not predetermined event information, can be without any processing, continue thing
Part is monitored.
Step 103: obtaining the media data that encoder acquires in real time, and the media data that will acquire is stored to storage service
Device.
In one embodiment of the application, it can preset and obtain the data type of media data, obtain media number
According to bandwidth and the storage class of media data etc., here, data type may include subcode stream, main bit stream etc., store class
Type can be rm, rmvb, wmv, avi, mp4,3gp, mkv etc..The parameter specifically set can need to set according to user, this Shen
Please embodiment to this without limit.
It, can be with and according to preset when the event information that access server determines that encoder is sent is predetermined event information
Data type obtains the media data that encoder acquires in real time, and stores according to the media data that preset storage class will acquire
To storage server.
In the embodiment of the present application, access server obtains the media data that encoder acquires in real time, and it is slow not need encoder
Media data is deposited, therefore does not need encoder and SD (Secure Digital Memory, secure data) card is locally configured, is saved
Encoder cost, and improve the stability of encoder.
In addition, in the embodiment of the present application, only when the event information for receiving encoder transmission is predetermined event information,
The media data that encoder acquires in real time is just obtained, and the media data that will acquire is stored to storage server, rather than will deposited
The media data of storage period inner encoder acquisition stores the memory space that storage server has been saved to storage server entirely.
In one embodiment of the application, a time delay can be preset, when the event letter for determining that encoder is sent
When breath is predetermined event information, the media data that the available preset time delay inner encoder of access server acquires in real time, and will
The media data of acquisition is stored to storage server;When being more than preset time delay, then the matchmaker that encoder acquires in real time is no longer obtained
Volume data.In this way, obtaining the media data in preset time delay, event analysis ensure that, and saved the storage of storage server
Space.
For example, preset time delay is 30s, the event information that access server determines that encoder is sent when 8:30:00 is predetermined
Event information, the then media data that access server starts that acquisition encoder acquires in real time stop obtaining when reaching 8:30:30
Take media data.
In one embodiment of the application, however, it is determined that the event information that encoder is sent is predetermined event information, access
Server can detect the event commencing signal sent when event occurs for the event information as encoder, obtain encoder
The media data acquired in real time, and the media data that will acquire is stored to storage server;When access server receives encoder
When the event end signal sent at the end of detecting event, stop obtaining the media data that encoder acquires in real time.It protects in this way
Event analysis has been demonstrate,proved, and has saved the memory space of storage server.
The above two side for obtaining media data can be set in one embodiment of the application, in access server
Formula, when obtaining media data, the signal type that event information can be sent according to encoder determines obtain using which kind of mode.
For example, obtaining media number by the way of preset time delay if the signal type that encoder sends event information is pulse signal
According to;If the signal type that encoder sends event information is non-pulse signal, letter is terminated using event commencing signal and event
Number mode obtain media data.
In order to be conducive to the analysis of successor data, in one embodiment of the application, with reference to media number shown in Fig. 2
According to second of flow diagram of storage method, it is based on Fig. 1, this method comprises:
Step 201: obtaining and cache the media data that encoder acquires in real time;
After establishing connection with encoder, the media data acquired in real time is obtained, and be buffered in local, and is not yet stored into and deposits
Server is stored up, the memory space of waste storage server is avoided.
Step 202: deleting the media data cached outside duration of pre-recording;
The media data cached outside duration of pre-recording is deleted, i.e., only remains the media data for duration caching of pre-recording, effectively saves
The about memory space of access server.
For example, access server obtains the media data that encoder acquires in real time a length of 10 seconds when pre-recording, and it is buffered in this
Ground reaches 8:30:00 when the time, deletes the media data cached before 8:29:50, retains and delays between 8:29:50-8:30:00
The media data deposited;When the time reaching 8:30:10, the media data cached before 8:30:00 is deleted, 8:30:00-8 is retained:
The media data cached between 30:10, and so on.
The deletion for the media data pre-recorded outside duration can be deleted, such as above example by preset duration, be deleted every 10 seconds
Except primary;The deletion for the media data pre-recorded outside duration can also be deleted with first-in first-out, such as the caching of media data
The duration at time to current time has been more than duration of pre-recording, then deletes the media data.The embodiment of the present application is to this without limit
It is fixed.
Here, step 201 can execute before step 202, can also execute after step S202, can also be with step
Rapid S202 is performed simultaneously, and the embodiment of the present application is to this without limiting.
Step 203: receiving the event information that encoder is sent;
Step 203 is identical as step 101, and details are not described herein again.
Step 204: judging whether event information is predetermined event information;If so, executing step 205 and step 206;
Step 204 is identical as step 102, and details are not described herein again.
Step S205: the media data that encoder acquires in real time is obtained, and the media data that will acquire is stored to storage and taken
Business device;
Step 205 is identical as step 103, and details are not described herein again.
Step S206: the media data of caching is stored to storage server.
At this point, storing the media data pre-recorded in duration cached in access server in storage server, i.e., event is sent out
Media data before death also stores the media data after event occurs, facilitates the analysis of successor data.
Here, step 206 can execute before step 205, can execute after step 205, acceptable and step
205 are performed simultaneously.
In one embodiment of the application, access server by the media data of caching store to storage server it
Afterwards, the media data of caching can be deleted, to save the memory space of access server.
In one embodiment of the application, in order to save the resource of access server, access server is receiving volume
After the event information that code device is sent, it can stop executing step 201, pause obtains and caches the media that encoder acquires in real time
Data.In order to facilitate the analysis of successor data, when stopping executing step 205, that is, stop obtaining what encoder acquired in real time
Media data, and the media data that will acquire is stored to storage server, access server re-execute the steps 201 again,
Obtain and cache the media data that encoder acquires in real time.
Below with reference to the first work signaling diagram of media data shown in Fig. 3 storage, to provided by the embodiments of the present application
Media data storage method is explained.
Step 301: user configuration code device information, parameter information into access server 200;
Encoder information may include: IP address, MAC Address, port, user name, password etc..
Parameter information is the parameter information for obtaining media data, may include: data type, bandwidth, storage class, storage
Period, predetermined event information, preset time delay etc..
Here, storage time section can be 8 points to 18 points of specified planned time section, such as Mon-Fri.
Step 302: access server 200 detects whether to receive the connection request 1 for encoder 100, and/or detection
Whether the initial time of predetermined storage time section is reached;If receiving connection request 1, and/or reach predetermined storage time section
Initial time, then follow the steps 303;
Step 303: access server 200 sends connection request 2 to encoder 100;
Step 304: encoder 100 establishes connection according to connection request 2 and access server 200, and to access server
200 send the connection response 2 for being directed to connection request 2;
Step 305;Access server 200 establishes successful connection according to connection response 2 and encoder 100, and activation pin is to volume
The event monitoring of code device 100;
Step 306: encoder 100 replys event monitoring confirmation message to access server 200;
At this point, access server 200 determines the event monitoring opened to encoder 100.
Step 307: when encoder 100 detects that event occurs, sending event information 1 to access server 200;
Step 308: access server 200 determines that event information 1 is predetermined event information, starts to take stream from encoder 100,
Media data is obtained according to predetermined data types;
Step 309: the media data of the predetermined data types acquired in real time is sent to access server by encoder 100
200;
Step 310: access server 200 stores media data to storage server 300 according to predetermined storage class;
Step 311: when reaching preset time delay, or when receiving event end signal, access server 200 stop from
Encoder 100 takes stream;
Step 312: encoder 100 is replied to access server 200 to be stopped taking stream confirmation message;
Step 313: when reaching the end time of predetermined storage time section, or working as and receive cutting for encoder 100
When disconnected request, the connection of access server 200 cutting and encoder 100 stops the event monitoring to encoder 100;
Step 314: encoder 100 replys cutting confirmation message to access server 200.
In the embodiment of the present application, access server and storage server can be located in same physical machine, can also position
In in different physical machines.
In practical application, in cloud storage, may exist more access servers and storage server;Access server and
Storage server can be managed by management server.For example, after access server gets media data, to management service
Device sends Address requests instruction.Management server distributes storage server according to address request instruction, for the media data of acquisition,
And the address of the storage server of the distribution is sent to access server.Access server receives management server transmission
Behind the address of storage server, the media data that will acquire stores storage server corresponding to received address.
Below with reference to media data shown in Fig. 4 store second of work signaling diagram, based on including access server, deposit
The media data storage method of the cloud storage of storage server and management server is explained.
Step 401: user input coding device information, parameter information into management server 400;
Step 402: access server 200 is written in encoder information that management server 400 will acquire, parameter information;
Step 403: access server 200 detects whether to receive the connection request 1 for encoder 100, and/or detection
Whether the initial time of predetermined storage time section is reached;If receiving connection request 1, and/or reach predetermined storage time section
Initial time, then follow the steps 404;
Step 404: access server 200 sends connection request 2 to encoder 100;
Step 405: encoder 100 establishes connection according to connection request 2 and access server 200, and to access server
200 send the connection response 2 for being directed to connection request 2;
Step 406;Access server 200 establishes successful connection according to connection response 2 and encoder 100, and activation pin is to volume
The event monitoring of code device 100;
Step 407: encoder 100 replys event monitoring confirmation message to access server 200;
Step 408: when encoder 100 detects that event occurs, sending event information 1 to access server 200;
Step 409: access server 200 determines that event information 1 is predetermined event information, starts to take stream from encoder 100,
Media data is obtained according to predetermined data types;
Step 410: the media data of the predetermined data types acquired in real time is sent to access server by encoder 100
200;
Step 411: storage of the access server 200 to this media data obtained of the application storage of management server 400
Server;
Step 412: management server 400 is that the media data that this is obtained distributes storage server 300;And by distribution
The address of storage server 300 is sent to access server 200;
Step 413: media data is stored to management server 400 according to predetermined storage class and is sent out by access server 200
The corresponding storage server 300 in the address sent will store media data to management server 400 according to predetermined storage class
The storage server 300 of distribution;
Step 414: when reaching preset time delay, or when receiving event end signal, access server 200 stop from
Encoder 100 takes stream;
Step 415: encoder 100 is replied to access server 200 to be stopped taking stream confirmation message;
Step 416: when reaching the end time of predetermined storage time section, or working as and receive cutting for encoder 100
When disconnected request, the connection of access server 200 cutting and encoder 100 stops the event monitoring to encoder 100;
Step 417: encoder 100 replys cutting confirmation message to access server 200.
Corresponding with media data storage method embodiment, the embodiment of the present application also provides a kind of storages of media data to fill
It sets.With reference to Fig. 5, Fig. 5 is the first structural schematic diagram of media data store provided by the embodiments of the present application, the device packet
It includes:
Receiving unit 501, for receiving the event information of encoder transmission;
Judging unit 502, for judging whether event information is predetermined event information;
Storage unit 503 is adopted in real time in the case where the judging result of judging unit 502, which is, is, obtaining encoder
The media data of collection, and the media data that will acquire is stored to storage server.
In one embodiment of the application, above-mentioned media data store can also include:
Unit is established, for before receiving the event information that encoder is sent, when reaching rising for predetermined storage time section
When time beginning, and/or when receiving the connection request for being directed to encoder, connection is established with encoder;
Cutting unit, for storing in the media data that will acquire to storage server, when reaching predetermined storage
Between section end time when, or when receiving the cutting request for encoder, cutting and the connection of encoder.
In one embodiment of the application, second of structural representation of media data store described in reference diagram 6,
Based on Fig. 5, which includes: cache unit 601, deletes unit 602, receiving unit 603, judging unit 604, storage unit
605;Wherein, receiving unit 603, judging unit 604 and the receiving unit 501 in embodiment illustrated in fig. 5,502 phase of judging unit
Together, details are not described herein again;
Cache unit 601, the media acquired in real time for after establishing connection with encoder, obtaining and caching encoder
Data;
Unit 602 is deleted, for deleting the media data cached outside duration of pre-recording;
Storage unit 605 is also used to that it is real-time to obtain encoder in the case where the judging result of judging unit 604, which is, is
The media data of acquisition, the media data that will acquire are stored to storage server, and the media data of caching is stored to storage
Server.
In one embodiment of the application, storage unit 503 specifically can be used for:
In the case where the judging result of judging unit 502, which is, is, the matchmaker that preset time delay inner encoder acquires in real time is obtained
Volume data.
In one embodiment of the application, storage unit 503 specifically can be used for:
In the case where the judging result of judging unit 502, which is, is, the event information that encoder is sent is opened as event
Beginning signal obtains the media data that encoder acquires in real time;When receiving the event end signal of encoder transmission, stop obtaining
Take the media data that encoder acquires in real time.
In one embodiment of the application, storage unit 503 specifically can be used for:
Address requests instruction is sent to management server;
Receive the address for the storage server that management server is sent according to address request instruction;
The media data that will acquire stores storage server corresponding to received address.
Using the embodiment of the present application, only when the event information for receiving encoder transmission is predetermined event information,
The media data that encoder acquires in real time is obtained, and the media data that will acquire is stored to storage server, rather than will storage
The media data of period inner encoder acquisition stores the memory space that storage server has been saved to storage server entirely.
Corresponding with media data storage method embodiment, the embodiment of the present application also provides a kind of electronic equipment, such as Fig. 7 institute
Show, including processor 701, communication interface 702, memory 703 and communication bus 704;Wherein, processor 701, communication interface
702, memory 703 completes mutual communication by communication bus 704;
Memory 703, for storing computer program;
Processor 701 when for executing the computer program stored on memory 703, is realized such as above-mentioned Fig. 1-Fig. 4 institute
The media data storage method shown.Wherein, media data storage method includes:
Receive the event information that encoder is sent;
Judge whether the event information is predetermined event information;
If so, obtaining the media data that encoder acquires in real time, and the media data that will acquire is stored to storage server.
Using the embodiment of the present application, only when the event information for receiving encoder transmission is predetermined event information,
The media data that encoder acquires in real time is obtained, and the media data that will acquire is stored to storage server, rather than will storage
The media data of period inner encoder acquisition stores the memory space that storage server has been saved to storage server entirely.
Communication bus 704 can be PCI (Peripheral Component Interconnect, Peripheral Component Interconnect mark
It is quasi-) bus or EISA (Extended Industry Standard Architecture, expanding the industrial standard structure) bus
Deng.The communication bus 704 can be divided into address bus, data/address bus, control bus etc..For convenient for indicating, only with one in Fig. 7
Thick line indicates, it is not intended that an only bus or a type of bus.
Communication interface 702 is for the communication between above-mentioned electronic equipment and other equipment.
Memory 703 may include RAM (Random Access Memory, random access memory), also may include
NVM (Non-Volatile Memory, nonvolatile memory), for example, at least a magnetic disk storage.Optionally, memory
703 can also be that at least one is located remotely from the storage device of aforementioned processor.
Processor 701 can be general processor, including CPU, NP (Network Processor, network processing unit) etc.;
It can also be DSP (Digital Signal Processing, digital signal processor), ASIC (Application
Specific Integrated Circuit, specific integrated circuit), FPGA (Field-Programmable Gate Array,
Field programmable gate array) or other programmable logic device, discrete gate or transistor logic, discrete hardware components.
The embodiment of the present application also provides a kind of machine readable storage medium, calculating is stored in machine readable storage medium
Machine program realizes such as above-mentioned Fig. 1-media data storage method shown in Fig. 4 when computer program is executed by processor.Wherein,
Media data storage method includes:
Receive the event information that encoder is sent;
Judge whether the event information is predetermined event information;
If so, obtaining the media data that encoder acquires in real time, and the media data that will acquire is stored to storage server.
Using the embodiment of the present application, only when the event information for receiving encoder transmission is predetermined event information,
The media data that encoder acquires in real time is obtained, and the media data that will acquire is stored to storage server, rather than will storage
The media data of period inner encoder acquisition stores the memory space that storage server has been saved to storage server entirely.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for media number
For storage device, electronic equipment, machine readable storage medium embodiment, since it is substantially similar to media data storage side
Method embodiment, so be described relatively simple, related place referring to figures 1-4 shown in media data storage method embodiment portion
It defends oneself bright.
The above is only the preferred embodiments of the application, are not intended to limit the protection scope of the application.It is all in this Shen
Any modification, equivalent replacement, improvement and so within spirit and principle please, are all contained in the protection scope of the application.
Claims (13)
1. a kind of media data storage method, which is characterized in that the described method includes:
Receive the event information that encoder is sent;
Judge whether the event information is predetermined event information;
If so, obtaining the media data that the encoder acquires in real time, and the media data that will acquire is stored to storage server.
2. the method according to claim 1, which is characterized in that the method also includes:
Before receiving the event information that the encoder is sent, when reaching the initial time of predetermined storage time section,
And/or when receiving the connection request for being directed to the encoder, connection is established with the encoder;
It stores in the media data that will acquire to the storage server, when the end time for reaching predetermined storage time section
When, or when receiving the cutting request for the encoder, the connection of cutting and the encoder.
3. method according to claim 2, which is characterized in that the method also includes:
After establishing connection with the encoder, the media data that the encoder acquires in real time is obtained and cached;It deletes pre-
Record the media data cached outside duration;
When the event information for determining that the encoder is sent is the predetermined event information, the media data of caching is deposited
It stores up to the storage server.
4. the method according to claim 1, which is characterized in that described the step of obtaining the media data that encoder acquires in real time,
Include:
Obtain the media data that preset time delay inner encoder acquires in real time.
5. the method according to claim 1, which is characterized in that described the step of obtaining the media data that encoder acquires in real time,
Include:
Using the event information as event commencing signal, the media data that encoder acquires in real time is obtained;
When receiving the event end signal that the encoder is sent, stop obtaining the media number that the encoder acquires in real time
According to.
6. the method according to claim 1, which is characterized in that the media data that will acquire is stored to the step of storage server
Suddenly, comprising:
Address requests instruction is sent to management server;
Receive the address for the storage server that the management server is sent according to Address requests instruction;
The media data that will acquire stores storage server corresponding to received address.
7. a kind of media data store, which is characterized in that described device includes:
Receiving unit, for receiving the event information of encoder transmission;
Judging unit, for judging whether the event information is predetermined event information;
Storage unit, for obtaining the encoder and acquiring in real time in the case where the judging result of the judging unit, which is, is
Media data, and the media data that will acquire is stored to storage server.
8. device according to claim 7, which is characterized in that described device further include:
Unit is established, for before receiving the event information that the encoder is sent, when reaching predetermined storage time section
Initial time when, and/or when receive be directed to the encoder connection request when, establish connection with the encoder;
Cutting unit, for storing in the media data that will acquire to the storage server, when reaching predetermined storage
Between section end time when, or when receiving the cutting request for the encoder, cutting and the connection of the encoder.
9. device according to claim 8, which is characterized in that described device further include: cache unit and deletion unit;
The cache unit acquires in real time for after establishing connection with the encoder, obtaining and caching the encoder
Media data;
The deletion unit, for deleting the media data cached outside duration of pre-recording;
The storage unit is also used to when the event information for determining the encoder transmission be the predetermined event information
When, the media data of caching is stored to the storage server.
10. device according to claim 7, which is characterized in that the storage unit is specifically used for:
In the case where the judging result of the judging unit, which is, is, the media number that preset time delay inner encoder acquires in real time is obtained
According to.
11. device according to claim 7, which is characterized in that the storage unit is specifically used for:
In the case where the judging result of the judging unit, which is, is, using the event information as event commencing signal, obtain
The media data that encoder acquires in real time;When receiving the event end signal that the encoder is sent, stop described in acquisition
The media data that encoder acquires in real time.
12. device according to claim 7, which is characterized in that the storage unit is specifically used for:
Address requests instruction is sent to management server;
Receive the address for the storage server that the management server is sent according to Address requests instruction;
The media data that will acquire stores storage server corresponding to received address.
13. a kind of electronic equipment, which is characterized in that including processor, communication interface, memory and communication bus;Wherein, described
Processor, the communication interface, the memory complete mutual communication by the communication bus;
The memory, for storing computer program;
The processor realizes any side claim 1-6 for executing the computer program stored on memory
Method step.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711403402.6A CN109962944B (en) | 2017-12-22 | 2017-12-22 | Media data storage method, storage device and electronic equipment |
PCT/CN2018/122454 WO2019120259A1 (en) | 2017-12-22 | 2018-12-20 | Media data storage method, storage device, and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711403402.6A CN109962944B (en) | 2017-12-22 | 2017-12-22 | Media data storage method, storage device and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109962944A true CN109962944A (en) | 2019-07-02 |
CN109962944B CN109962944B (en) | 2020-09-25 |
Family
ID=66993096
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711403402.6A Active CN109962944B (en) | 2017-12-22 | 2017-12-22 | Media data storage method, storage device and electronic equipment |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109962944B (en) |
WO (1) | WO2019120259A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111143580A (en) * | 2019-12-26 | 2020-05-12 | 惠州Tcl移动通信有限公司 | Multimedia data storage method and device, storage medium and electronic equipment |
CN113711619A (en) * | 2020-03-20 | 2021-11-26 | 华为技术有限公司 | Multimedia data storage method, apparatus, device, storage medium and program product |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101626499A (en) * | 2009-08-21 | 2010-01-13 | 杭州华三通信技术有限公司 | Data storage method and data storage system |
CN201682559U (en) * | 2010-05-14 | 2010-12-22 | 蔡晓东 | Intelligent video analyzing and monitoring pick-up camera |
US20120162417A1 (en) * | 2010-12-23 | 2012-06-28 | Av Tech Corporation | Security control system and method thereof, computer readable media and computer readable program product |
CN105338294A (en) * | 2014-08-07 | 2016-02-17 | 富士通株式会社 | Monitoring device and method |
-
2017
- 2017-12-22 CN CN201711403402.6A patent/CN109962944B/en active Active
-
2018
- 2018-12-20 WO PCT/CN2018/122454 patent/WO2019120259A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101626499A (en) * | 2009-08-21 | 2010-01-13 | 杭州华三通信技术有限公司 | Data storage method and data storage system |
CN201682559U (en) * | 2010-05-14 | 2010-12-22 | 蔡晓东 | Intelligent video analyzing and monitoring pick-up camera |
US20120162417A1 (en) * | 2010-12-23 | 2012-06-28 | Av Tech Corporation | Security control system and method thereof, computer readable media and computer readable program product |
CN105338294A (en) * | 2014-08-07 | 2016-02-17 | 富士通株式会社 | Monitoring device and method |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111143580A (en) * | 2019-12-26 | 2020-05-12 | 惠州Tcl移动通信有限公司 | Multimedia data storage method and device, storage medium and electronic equipment |
CN111143580B (en) * | 2019-12-26 | 2024-04-09 | 惠州Tcl移动通信有限公司 | Multimedia data storage method and device, storage medium and electronic equipment |
CN113711619A (en) * | 2020-03-20 | 2021-11-26 | 华为技术有限公司 | Multimedia data storage method, apparatus, device, storage medium and program product |
Also Published As
Publication number | Publication date |
---|---|
WO2019120259A1 (en) | 2019-06-27 |
CN109962944B (en) | 2020-09-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104488231B (en) | Method, apparatus and system for selectively monitoring flow | |
CN109842781B (en) | Monitoring video playing method, device, system, media server and storage medium | |
CN112087644B (en) | Pull stream request processing method, device and system, electronic equipment and storage medium | |
CN104573611A (en) | Distributed face recognition trunking system | |
WO2018059247A1 (en) | Monitoring method, device, and system | |
CN102811344A (en) | Control method and device for improving storage stability in video monitoring system | |
CN110851290A (en) | Data synchronization method and device, electronic equipment and storage medium | |
WO2018024165A1 (en) | Method and device for storing warning image | |
CN106357480B (en) | Method and device for monitoring network performance of application and mobile terminal | |
WO2019024910A1 (en) | Storage resource recovery method, apparatus and system | |
CN109962944A (en) | A kind of media data storage method, storage device and electronic equipment | |
CN107306200B (en) | Network fault early warning method and gateway for network fault early warning | |
CN110933152B (en) | Preheating method, device and system and electronic equipment | |
CN103116950B (en) | Data monitoring method, point-of-sale (POS) machine, POS transaction server and payment system | |
CN112579820B (en) | Time hopping video data processing method, device, medium and electronic equipment | |
CN111064957B (en) | Equipment state monitoring method and device | |
CN107959696A (en) | A kind of daily record bill processing method and system | |
CN109829526B (en) | Bar code management method and device and electronic equipment | |
CN112653736A (en) | Parallel source returning method and device and electronic equipment | |
CN113177883B (en) | Arrangement transmission system based on data queue | |
CN105471850A (en) | Video uploading method and video uploading device | |
CN113055350B (en) | Data transmission method, device, equipment and readable storage medium | |
CN105072418B (en) | A kind of method and apparatus that judgement monitoring frontend is offline | |
CN108805741B (en) | Fusion method, device and system of power quality data | |
CN105337778A (en) | Internet of Things event-driven service management system |
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 |