CN109729314A - A kind of method for processing video frequency, device, electronic equipment and storage medium - Google Patents
A kind of method for processing video frequency, device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN109729314A CN109729314A CN201811584294.1A CN201811584294A CN109729314A CN 109729314 A CN109729314 A CN 109729314A CN 201811584294 A CN201811584294 A CN 201811584294A CN 109729314 A CN109729314 A CN 109729314A
- Authority
- CN
- China
- Prior art keywords
- monitor channel
- prestretching
- flow
- channel
- preset
- 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
Landscapes
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The invention discloses a kind of method for processing video frequency, device, electronic equipment and storage mediums, the described method includes: when current point in time is preset video prestretching stream time point, determine the first prestretching flow/time length of preset each first monitor channel, for each first monitor channel, prestretching stream process is carried out to the video code flow slice of first monitor channel in the corresponding first prestretching flow/time length of first monitor channel;Preset each first monitor channel is the higher ranked monitor channel of monitoring divided in advance.Due to when reaching preset video prestretching stream time point, prestretching stream process is carried out to the video code flow slice of first monitor channel in the corresponding first prestretching flow/time length of the first monitor channel, in memory by the video code flow slice caching of first monitor channel, when user requests the video code flow of first monitor channel in the first prestretching flow/time length, the video code flow cached can be directly played, picture achievees the effect that the second opens.
Description
Technical field
The present invention relates to technical field of video processing more particularly to a kind of method for processing video frequency, device, electronic equipment and deposit
Storage media.
Background technique
Traditional video monitoring system is as shown in Figure 1, video will be carried out using real-time stream media protocols such as RTSP/RTMP
Live streaming and program request, and play RTSP/RTMP code stream and need specific client end of playing back or decoding control, thus exist in use
Very big limitation.
With the demand of traditional video surveillance interconnection networking, HLS protocol meets the tendency of appearance, HLS (HTTP Live
It Streaming) is the stream media network transport protocol based on http agreement proposed by Apple Inc., since it has simply,
Adaptively, the advantages that no plug-in unitization plays may be implemented, be the current whole world with one of most commonly used network transmission protocol, especially
It is suitable for mobile Internet Streaming Media fields.It can be realized the HLS protocol that no plug-in unitization plays, undoubtedly become video monitoring system
System is broadcast live the optimal selection with program request in web or mobile terminal, as shown in Figure 2 using the video monitoring system of HLS protocol.
But due to the realization mechanism of HLS protocol, need for real-time code stream to be cut into and be sliced one by one, thus also brings simultaneously
Higher delay and initial screen time, it is assumed that 3 are set by slice buffering quantity, each slice duration is set as 2 seconds, then
The initial screen time of each living broadcast channel at least needs 6 seconds.
In order to improve the experience of user, the video monitoring system living broadcast channel that live preview is carried out based on HLS protocol is reduced
Initial screen time, existing technical solution mainly include reduce the cutting duration of each slice, and reduce slice caching number
Amount.By the cutting duration of each slice of reduction, and the scheme of the caching quantity of slice is reduced, code stream GOP can be limited to
Size (GOP refers to the interval between the period of key frame, that is, two I frames), the cutting duration of each slice obtain at least
Equal to 1 GOP time, and for anti-network jitter, in practice, the caching quantity of ts file fragmentation is minimum cannot be less than 2
It is a, so this scheme user is initially opened certain road live streaming least waiting time and also will be greater than 2 GOP times, if one
GOP is equal to 2 seconds, then at least also having 4 seconds initial screen times, it is seen that this scheme still has longer initial screen time.
Summary of the invention
The embodiment of the invention provides a kind of method for processing video frequency, device, electronic equipment and storage mediums, existing to solve
There is the broadcasting longer problem of video initial screen time in technology.
The embodiment of the invention provides a kind of method for processing video frequency, which comprises
Judge whether current point in time is preset video prestretching stream time point;
If so, the first prestretching flow/time length of preset each first monitor channel is determined, for each first prison
Control channel, in the corresponding first prestretching flow/time length of first monitor channel to the video code flow of first monitor channel be sliced into
Row prestretching stream process, in memory by the video code flow slice caching of first monitor channel;Wherein, preset each first prison
Control channel be divide in advance monitor higher ranked monitor channel.
Further, the first prestretching flow/time length of preset each first monitor channel of the determination includes:
For the second monitor channel each of is installed in scene, according to the important of the monitored position of the second monitor channel
Property, determine the monitoring grade of second monitor channel;Wherein, the importance of monitored position is higher, the prison of the second monitor channel
Control higher grade;
The second monitor channel of the preset quantity of monitoring grade from high to low is chosen as preset first monitor channel;Really
First prestretching flow/time length of fixed preset each first monitor channel.
Further, the method also includes:
For each first monitor channel, is played if the video code flow of first monitor channel is requested, work as knowledge
When being clipped to the video code flow stopping request broadcasting of first monitor channel, the corresponding second prestretching stream of first monitor channel is determined
Duration;
For each first monitor channel, in the corresponding second prestretching flow/time length of first monitor channel to this
The video code flow slice of one monitor channel carries out prestretching stream process, the video code flow slice of first monitor channel is buffered in interior
In depositing.
Further, the corresponding second prestretching flow/time length of the determination first monitor channel includes:
According to the requested number played of first monitor channel in predetermined time period, first monitor channel is determined
Hot value;
For each first monitor channel, by the hot value of first monitor channel and preset keep-alive basis duration
Product as the corresponding second prestretching flow/time length of first monitor channel.
Further, described according to the requested number played of first monitor channel in predetermined time period, determining should
The hot value of first monitor channel includes:
The ratio of requested first number and the default hour played of first monitor channel in default hour is made
For the first hot value, using first hot value as the hot value of first monitor channel;Or
The ratio of requested second number and the preset number of days played of first monitor channel in preset number of days is made
For the second hot value, using second hot value as the hot value of first monitor channel;Or
First monitor channel is used into the use that the third number and first monitor channel that play are requested in duration
The ratio of number of days is as third hot value, using the third hot value as the hot value of first monitor channel;Or
Using the sum of first hot value, the second hot value and third hot value as the temperature of first monitor channel
Value.
Further, it is determined that being sliced and carrying out to video code flow after the first prestretching flow/time length of each first monitor channel
Before prestretching stream process, the method also includes:
For each first monitor channel, according to the monitoring grade of first monitor channel, first monitoring is determined
The weight duration in channel, according to the weight duration of first monitor channel, to the first prestretching flow/time length of first monitor channel
It is updated, wherein monitoring higher grade, and weight duration is bigger.
Further, it is determined that being sliced and carrying out to video code flow after the second prestretching flow/time length of each first monitor channel
Before prestretching stream process, the method also includes:
For each first monitor channel, according to the monitoring grade of first monitor channel, first monitoring is determined
The weight duration in channel, according to the weight duration of first monitor channel, to the second prestretching flow/time length of first monitor channel
It is updated, wherein monitoring higher grade, and weight duration is bigger.
On the other hand, the embodiment of the invention provides a kind of video process apparatus, described device includes:
Judgment module, for judging whether current point in time is preset video prestretching stream time point;
First processing module, if the judging result for the judgment module be it is yes, determine it is preset it is each first prison
The the first prestretching flow/time length for controlling channel, it is corresponding first pre- in first monitor channel for each first monitor channel
It draws in flow/time length and prestretching stream process is carried out to the video code flow slice of first monitor channel, by the video of first monitor channel
Code stream slice caching is in memory;Wherein, preset each first monitor channel is the higher ranked prison of monitoring divided in advance
Control channel.
Further, described device further include:
Determining module, for being supervised according to second monitor channel for the second monitor channel each of is installed in scene
The importance for controlling position, determines the monitoring grade of second monitor channel;Wherein, the importance of monitored position is higher, and second
The monitoring higher grade of monitor channel;The second monitor channel of the preset quantity of monitoring grade from high to low is chosen as preset
First monitor channel;Determine the first prestretching flow/time length of preset each first monitor channel.
Further, described device further include:
Second processing module, for being directed to each first monitor channel, if the video codes of first monitor channel
Stream is requested to be played, and when the video code flow for recognizing first monitor channel, which stops request, to be played, determines that first monitoring is logical
The corresponding second prestretching flow/time length in road;It is corresponding second pre- in first monitor channel for each first monitor channel
It draws in flow/time length and prestretching stream process is carried out to the video code flow slice of first monitor channel, by the video of first monitor channel
Code stream slice caching is in memory.
Further, the Second processing module is specifically used for according to the first monitor channel quilt in predetermined time period
The number played is requested, determines the hot value of first monitor channel;For each first monitor channel, this first is supervised
When controlling corresponding as first monitor channel with the product of preset keep-alive basis duration the second prestretching stream of hot value in channel
It is long.
Further, the Second processing module is broadcast specifically for first monitor channel in default hour to be requested
The ratio of first number and the default hour put is as the first hot value, using first hot value as first monitoring
The hot value in channel;Or first monitor channel in preset number of days is requested to second number and the preset number of days played
Ratio is as the second hot value, using second hot value as the hot value of first monitor channel;Or this first is monitored
Channel uses be requested the third number and first monitor channel played in duration to use the ratio of number of days hot as third
Angle value, using the third hot value as the hot value of first monitor channel;Or by first hot value, the second hot value
Hot value with the sum of third hot value as first monitor channel.
Further, described device further include:
Update module, for being directed to each first monitor channel, according to the monitoring grade of first monitor channel, really
The weight duration of fixed first monitor channel, according to the weight duration of first monitor channel, to the of first monitor channel
One prestretching flow/time length is updated, wherein monitoring higher grade, and weight duration is bigger.
Further, the update module is also used to for each first monitor channel, logical according to first monitoring
The monitoring grade in road determines the weight duration of first monitor channel, according to the weight duration of first monitor channel, to this
Second prestretching flow/time length of one monitor channel is updated, wherein monitoring higher grade, and weight duration is bigger.
The present invention provides a kind of electronic equipment, including processor, communication interface, memory and communication bus, wherein place
Device, communication interface are managed, memory completes mutual communication by communication bus;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes method and step as described in any one of the above embodiments.
The present invention provides a kind of computer readable storage medium, calculating is stored in the computer readable storage medium
Machine program, the computer program realize method and step described in any of the above embodiments when being executed by processor.
The embodiment of the invention provides a kind of method for processing video frequency, device, electronic equipment and storage medium, the method packets
It includes: judging whether current point in time is preset video prestretching stream time point;If so, determining that preset each first monitoring is logical
The first prestretching flow/time length in road, for each first monitor channel, in the corresponding first prestretching stream of first monitor channel
Prestretching stream process is carried out to the video code flow slice of first monitor channel in duration;Wherein, preset each first monitoring is logical
Road is the higher ranked monitor channel of monitoring divided in advance.
Due in embodiments of the present invention, when reaching preset video prestretching stream time point, for each monitoring grade
Higher first monitor channel, to the view of first monitor channel in the corresponding first prestretching flow/time length of first monitor channel
Frequency code stream slice carries out prestretching stream process, in memory by the video code flow of first monitor channel slice caching, in this way the
When user requests the video code flow of first monitor channel in one prestretching flow/time length, the view cached in memory can be directly played
Frequency code stream can make request obtain quick response, and picture achievees the effect that the second opens.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly introduced, it should be apparent that, drawings in the following description are only some embodiments of the invention, for this
For the those of ordinary skill in field, without creative efforts, it can also be obtained according to these attached drawings other
Attached drawing.
Fig. 1 is the video monitoring system schematic diagram for using RTSP/RTMP agreement in the prior art;
Fig. 2 is the video monitoring system schematic diagram for using HLS protocol in the prior art;
Fig. 3 is video processing procedure schematic diagram provided in an embodiment of the present invention;
Fig. 4 is the first monitor channel prestretching stream flow diagram provided in an embodiment of the present invention;
Fig. 5 is the prestretching stream flow diagram of the first monitor channel after playing request provided in an embodiment of the present invention disconnects;
Fig. 6 is video process apparatus structural schematic diagram provided in an embodiment of the present invention;
Fig. 7 is electronic equipment schematic diagram provided in an embodiment of the present invention.
Specific embodiment
The present invention will be describe below in further detail with reference to the accompanying drawings, it is clear that described embodiment is only this
Invention a part of the embodiment, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art exist
All other embodiment obtained under the premise of creative work is not made, shall fall within the protection scope of the present invention.
Fig. 3 be video processing procedure schematic diagram provided in an embodiment of the present invention, the process the following steps are included:
S101: judging whether current point in time is preset video prestretching stream time point, if so, carrying out S102.
S102: determining the first prestretching flow/time length of preset each first monitor channel, for each first monitoring
Channel is sliced the video code flow of first monitor channel in the corresponding first prestretching flow/time length of first monitor channel and carries out
Prestretching stream process, in memory by the video code flow slice caching of first monitor channel;Wherein, preset each first monitoring
Channel is the higher ranked monitor channel of monitoring divided in advance.
Method for processing video frequency provided in an embodiment of the present invention is applied to electronic equipment, which can be PC, plate
Apparatus such as computer.
It is preserved in electronic equipment preset video prestretching stream time point, preset video prestretching stream time point is user's root
According to need to set, for characterizing the time point of monitoring of user's care.Such as under traffic monitoring scene, preset video prestretching
Flowing time point is daily 8 a.m. and 6 pm, that is, the time point on peak on and off duty.It can be set in electronic equipment
Timer, to judge whether current point in time is preset video prestretching stream time point.
Preset each first monitor channel is preserved in electronic equipment, preset each first monitor channel is to draw in advance
The higher ranked monitor channel of the monitoring divided.Such as company video monitoring system, positioned at the monitor channel of company's main entrance, company's machine
The monitor channel etc. for wanting department is divided into higher ranked monitor channel;Such as traffic department's video monitoring system again can will flow
The monitor channel of big crossroad is measured, accident easily sends out the monitor channel on ground, and the monitoring on the regions such as government unit periphery is logical
Road etc. is divided into higher ranked monitor channel.
Preset first prestretching flow/time length, such as 20 minutes, 25 minutes etc. can be saved in electronic equipment.In addition, electronics
Preset keep-alive basis duration can also be preserved in equipment, when current point in time is preset video prestretching stream time point, electricity
Sub- equipment determines the first prestretching flow/time length of preset each first monitor channel according to preset keep-alive basis duration, such as can
Using directly by preset keep-alive basis duration as the first prestretching flow/time length of preset each first monitor channel, for each
First monitor channel, to the video code flow of first monitor channel in the corresponding first prestretching flow/time length of first monitor channel
Slice carries out prestretching stream process, that is, in memory by the video code flow slice caching of first monitor channel.Wherein, it presets
Keep-alive basis duration can be 20 minutes, 30 minutes etc..Video code flow slice in the embodiment of the present invention can be ts slice,
It is also possible to hls slice, the type of video code flow slice is not defined.
Due in embodiments of the present invention, when reaching preset video prestretching stream time point, for each monitoring grade
Higher first monitor channel, to the view of first monitor channel in the corresponding first prestretching flow/time length of first monitor channel
Frequency code stream slice carries out prestretching stream process, in memory by the video code flow of first monitor channel slice caching, in this way the
When user requests the video code flow of first monitor channel in one prestretching flow/time length, the view cached in memory can be directly played
Frequency code stream can make request obtain quick response, and picture achievees the effect that the second opens.
On the basis of the above embodiments, in embodiments of the present invention, preset each first monitor channel of the determination
The first prestretching flow/time length include:
For the second monitor channel each of is installed in scene, according to the important of the monitored position of the second monitor channel
Property, determine the monitoring grade of second monitor channel;Wherein, the importance of monitored position is higher, the prison of the second monitor channel
Control higher grade;
The second monitor channel of the preset quantity of monitoring grade from high to low is chosen as preset first monitor channel;Really
First prestretching flow/time length of fixed preset each first monitor channel.
In embodiments of the present invention, using the monitor channel installed in scene as the second monitor channel, the second monitoring is logical
Higher ranked monitor channel is monitored in road as the first monitor channel.
When determining preset each first monitor channel, for each of installing the second monitor channel in scene, according to
The importance of the monitored position of second monitor channel determines the monitoring grade of second monitor channel, monitored position it is important
Property is higher, and the monitoring higher grade of the second monitor channel.
Such as company video monitoring system can be by company positioned at the monitor channel importance highest of confidential departments, company
The monitor channel of confidential departments takes second place as level-one monitor channel, the monitor channel importance of company's main entrance, can be by company just
The monitor channel of door successively determines the monitoring grade of each monitor channel of company video monitoring system as second level monitor channel;
Accident can easily be sent out the monitor channel importance highest on ground, accident can easily be sent out by such as traffic department's video monitoring system again
The monitor channel on ground takes second place as level-one monitor channel, the importance of the monitor channel on the regions such as government unit periphery, can
Using by the monitor channel on the regions such as government unit periphery, as second level monitor channel, the monitoring of the big crossroad of flow is logical
Road importance third, can be using the monitor channel of the big crossroad of flow as three-level monitor channel.
Electronic equipment, can be according to the height of monitoring grade to every after the monitoring grade of each second monitor channel of determination
A second monitor channel is ranked up, it should be noted that monitoring grade level-one is highest.Then according to monitoring grade by height to
Low sequence chooses the second monitor channel of preset quantity as preset first monitor channel.Preset quantity can be 3,4
It is a etc..And then determine the first prestretching flow/time length of preset each first monitor channel.From probability, monitoring higher grade
Monitor channel it is played probability it is bigger, prestretching stream process are carried out to certain several high-grade monitor channel, can relatively probably
The initial screen time of the reduction system living broadcast channel entirety of rate.Also, certain several high-grade monitor channel is carried out at prestretching stream
Reason, and avoid carrying out overhead problem brought by prestretching stream process to all monitor channels.
Fig. 4 is the first monitor channel prestretching stream flow diagram provided in an embodiment of the present invention, as shown in figure 4, user is first
The second monitor channel is first added to video monitoring platform, and divides the monitoring grade of each second monitor channel.According to monitoring etc.
Grade judges whether the first monitor channel for belonging to prestretching stream, if so, judge whether to reach preset video prestretching stream time point,
If it is not, then continuing waiting for, carried out if it is, being sliced according to video code flow of the first prestretching flow/time length to the first monitor channel
Then prestretching stream process judges whether to reach the first prestretching flow/time length, if not, continuing the video code flow to the first monitor channel
Slice carries out prestretching stream process, if so, prestretching stream terminates.
When user requests the video code flow of the first monitor channel of broadcasting, in user's stopping request the first monitor channel of broadcasting
After video code flow, it is possible to which, because of the video code flow content played, user requests to play the video codes of the first monitor channel again
Stream when in order to guarantee that user requests to play the video code flow of the first monitor channel again, can make request obtain quick response, draw
Face achievees the effect that the second opens.On the basis of the various embodiments described above, in embodiments of the present invention, the method also includes:
For each first monitor channel, is played if the video code flow of first monitor channel is requested, work as knowledge
When being clipped to the video code flow stopping request broadcasting of first monitor channel, the corresponding second prestretching stream of first monitor channel is determined
Duration;
For each first monitor channel, in the corresponding second prestretching flow/time length of first monitor channel to this
The video code flow slice of one monitor channel carries out prestretching stream process, the video code flow slice of first monitor channel is buffered in interior
In depositing.
In embodiments of the present invention, for each first monitor channel, first monitor channel corresponding second determined
Prestretching flow/time length can be preset duration, and it is identical to be also possible to the first prestretching flow/time length corresponding with first monitor channel
Duration.
In order to make to determine that the second prestretching flow/time length is more acurrate, in embodiments of the present invention, the determination first monitoring is logical
The corresponding second prestretching flow/time length in road includes:
According to the requested number played of first monitor channel in predetermined time period, first monitor channel is determined
Hot value;
For each first monitor channel, by the hot value of first monitor channel and preset keep-alive basis duration
Product as the corresponding second prestretching flow/time length of first monitor channel.
For each first monitor channel, the video code flow of first monitor channel may be requested to play by multiple users,
It is played when the video code flow of first monitor channel stops request, that is, the last one user requests after disconnecting, electronic equipment
According to the requested number played of first monitor channel in predetermined time period, the temperature of first monitor channel can be determined
Value.Specifically, the requested number played of first monitor channel in predetermined time period can be saved in electronic equipment and be somebody's turn to do
The corresponding relationship of the hot value of first monitor channel, wherein the requested broadcasting of first monitor channel in predetermined time period
Number is more, and the hot value of first monitor channel is also higher.
It is after the hot value for determining first monitor channel, first monitoring is logical for each first monitor channel
The hot value in road and the product of preset keep-alive basis duration are as the corresponding second prestretching flow/time length of first monitor channel.With
It is corresponding in first monitor channel on the basis of the time point that the video code flow for recognizing first monitor channel stops request broadcasting
The second prestretching flow/time length in continue to update slice, prestretching stream process is carried out to the video code flow of first monitor channel slice,
In memory by the video code flow of first monitor channel slice caching, in this way the and in prestretching flow/time length user request this
When the video code flow of one monitor channel, the video code flow cached in memory can be directly played, request can be made to obtain quickly
Response, picture achieve the effect that the second opens.
In order to accurately determine the hot value of the first monitor channel, on the basis of the various embodiments described above, implement in the present invention
It is described according to the requested number played of first monitor channel in predetermined time period in example, determine first monitor channel
Hot value include:
The ratio of requested first number and the default hour played of first monitor channel in default hour is made
For the first hot value, using first hot value as the hot value of first monitor channel;Or
The ratio of requested second number and the preset number of days played of first monitor channel in preset number of days is made
For the second hot value, using second hot value as the hot value of first monitor channel;Or
First monitor channel is used into the use that the third number and first monitor channel that play are requested in duration
The ratio of number of days is as third hot value, using the third hot value as the hot value of first monitor channel;Or
Using the sum of first hot value, the second hot value and third hot value as the temperature of first monitor channel
Value.
Electronic equipment can count requested first number played of first monitor channel in default hour, preset hour
It can be 3 hours, 5 hours etc., after counting requested first number played of first monitor channel in default hour, meter
The ratio of first number and default hour is calculated, which is the first hot value, and electronic equipment can directly make the first hot value
For the hot value of first monitor channel.
Alternatively, electronic equipment can count requested second number played of first monitor channel in preset number of days, in advance
If number of days can be 2 days, 3 days etc., after counting requested second number played of first monitor channel in preset number of days,
The ratio of second number and preset number of days is calculated, which is the second hot value, and electronic equipment can be directly by the second hot value
Hot value as first monitor channel.
Again alternatively, electronic equipment can count from the first monitor channel use so far, it is requested the played
Three numbers come from first monitor channel in statistics and use for example, having so far 50 days from the first monitor channel use
From so far be requested play third number after, calculate third number and first monitor channel the ratio using number of days
Value, that is, the ratio with 50 days, the ratio are third hot value, electronic equipment can directly using third hot value as this
The hot value of one monitor channel.
Preferably, electronic equipment can determine the first hot value, the second hot value and third respectively according to the method described above
Hot value, then using the sum of the first hot value, the second hot value and third hot value as the hot value of first monitor channel.
Fig. 5 is the prestretching stream flow diagram of the first monitor channel after playing request provided in an embodiment of the present invention disconnects,
As shown in figure 5, electronic equipment recognizes the video code flow that video monitoring platform has user to request some the first monitor channel first,
Request is disconnected when recognizing the last one user, calculates the hot value and the second prestretching flow/time length of first monitor channel, then
Continue to carry out prestretching stream process to the video code flow of first monitor channel slice in the second prestretching flow/time length, during this period when
When user requests the video code flow of first monitor channel, may be implemented the picture second is opened.Then judge whether to reach the second prestretching
Flow/time length, if not, continuing to carry out prestretching stream process to the video code flow slice of the first monitor channel, if so, prestretching stream knot
Beam.
In order to make to determine that prestretching flow/time length is more acurrate, on the basis of the various embodiments described above, in embodiments of the present invention, really
After first prestretching flow/time length of fixed each first monitor channel, video code flow is sliced before carrying out prestretching stream process, it is described
Method further include:
For each first monitor channel, according to the monitoring grade of first monitor channel, first monitoring is determined
The weight duration in channel carries out the prestretching flow/time length of first monitor channel according to the weight duration of first monitor channel
It updates, wherein monitoring higher grade, and weight duration is bigger.
After the second prestretching flow/time length for determining each first monitor channel, video code flow is sliced and carries out prestretching stream process
Before, the method also includes:
For each first monitor channel, according to the monitoring grade of first monitor channel, first monitoring is determined
The weight duration in channel, according to the weight duration of first monitor channel, to the second prestretching flow/time length of first monitor channel
It is updated, wherein monitoring higher grade, and weight duration is bigger.
The monitoring grade and the mapping table of weight often of the first monitor channel can be saved in electronic equipment, wherein
Monitoring higher grade, and weight duration is bigger.Mapping table is as follows:
Monitor grade | Grade 1 | Grade 2 | Grade 3 | …… | Grade n |
Weight duration | Weight 1 | Weight 2 | Weight 3 | …… | Weight n |
Electronic equipment is directed to each first monitor channel, after the security level for determining first monitor channel, according to
Above-mentioned corresponding relationship can determine the weight duration of first monitor channel.When then according to the weight of first monitor channel
It is long, the first prestretching flow/time length or the second prestretching flow/time length of first monitor channel are updated.
Specifically, electronic equipment determines the first of preset each first monitor channel according to preset keep-alive basis duration
After prestretching flow/time length, for each first monitor channel, by the first prestretching flow/time length of first monitor channel and corresponding power
The sum of weight duration is as the updated first prestretching flow/time length of first monitor channel.Electronic equipment is logical for each first monitoring
Road, it is corresponding as first monitor channel using the hot value of first monitor channel with the product of preset keep-alive basis duration
After second prestretching flow/time length, using the second prestretching flow/time length of first monitor channel and the sum of corresponding weight duration as this
The updated second prestretching flow/time length of one monitor channel.
Fig. 6 is video process apparatus structural schematic diagram provided in an embodiment of the present invention, which includes:
Judgment module 61, for judging whether current point in time is preset video prestretching stream time point;
First processing module 62, if the judging result for the judgment module 61 be it is yes, determine preset each
First prestretching flow/time length of one monitor channel, for each first monitor channel, in first monitor channel corresponding
Prestretching stream process is carried out to the video code flow slice of first monitor channel in one prestretching flow/time length, by first monitor channel
Video code flow slice caching is in memory;Wherein, preset each first monitor channel is that the monitoring that divides in advance is higher ranked
Monitor channel.
Described device further include:
Determining module 63, for for the second monitor channel each of is installed in scene, according to the second monitor channel institute
The importance for monitoring position, determines the monitoring grade of second monitor channel;Wherein, the importance of monitored position is higher, the
The monitoring higher grade of two monitor channels;The second monitor channel of the preset quantity of monitoring grade from high to low is chosen as default
The first monitor channel;Determine the first prestretching flow/time length of preset each first monitor channel.
Described device further include:
Second processing module 64, for being directed to each first monitor channel, if the video of first monitor channel
Code stream is requested to be played, and when the video code flow for recognizing first monitor channel, which stops request, to be played, determines first monitoring
The corresponding second prestretching flow/time length in channel;For each first monitor channel, in first monitor channel corresponding second
Prestretching stream process is carried out to the video code flow slice of first monitor channel in prestretching flow/time length, by the view of first monitor channel
Frequency code stream slice caching is in memory.
The Second processing module 64 is specifically used for playing according to first monitor channel in predetermined time period is requested
Number, determine the hot value of first monitor channel;For each first monitor channel, by first monitor channel
Hot value and the product of preset keep-alive basis duration are as the corresponding second prestretching flow/time length of first monitor channel.
The Second processing module 64, specifically for first monitor channel in default hour is requested play first
Number and the ratio of the default hour are as the first hot value, using first hot value as the heat of first monitor channel
Angle value;Or using the ratio of requested second number played of first monitor channel in preset number of days and the preset number of days as
Second hot value, using second hot value as the hot value of first monitor channel;Or first monitor channel is used
The third number and first monitor channel played is requested in duration uses the ratio of number of days as third hot value, by institute
State hot value of the third hot value as first monitor channel;Or it is first hot value, the second hot value and third is hot
Hot value of the sum of angle value as first monitor channel.
Described device further include:
Update module 65, for being directed to each first monitor channel, according to the monitoring grade of first monitor channel,
The weight duration for determining first monitor channel, according to the weight duration of first monitor channel, to first monitor channel
First prestretching flow/time length is updated, wherein monitoring higher grade, and weight duration is bigger.
The update module 65 is also used to for each first monitor channel, according to the prison of first monitor channel
Grade is controlled, determines the weight duration of first monitor channel, according to the weight duration of first monitor channel, to first monitoring
The second prestretching flow/time length in channel is updated, wherein monitoring higher grade, and weight duration is bigger.
On the basis of the various embodiments described above, a kind of electronic equipment is additionally provided in the embodiment of the present invention, as shown in fig. 7,
It include: processor 301, communication interface 302, memory 303 and communication bus 304, wherein processor 301, communication interface 302,
Memory 303 completes mutual communication by communication bus 304;
It is stored with computer program in the memory 303, when described program is executed by the processor 301, so that
The processor 301 executes following steps:
Judge whether current point in time is preset video prestretching stream time point;
If so, the first prestretching flow/time length of preset each first monitor channel is determined, for each first prison
Control channel, in the corresponding first prestretching flow/time length of first monitor channel to the video code flow of first monitor channel be sliced into
Row prestretching stream process, in memory by the video code flow slice caching of first monitor channel;Wherein, preset each first prison
Control channel be divide in advance monitor higher ranked monitor channel.
Based on the same inventive concept, a kind of electronic equipment is additionally provided in the embodiment of the present invention, due to above-mentioned electronic equipment
The principle solved the problems, such as is similar to method for processing video frequency, therefore the implementation of above-mentioned electronic equipment may refer to the implementation of method, weight
Multiple place repeats no more.
Electronic equipment provided in an embodiment of the present invention be specifically as follows desktop computer, portable computer, smart phone,
Tablet computer, personal digital assistant (Personal Digital Assistant, PDA), network side equipment etc..
The communication bus that above-mentioned electronic equipment is mentioned can be Peripheral Component Interconnect standard (Peripheral Component
Interconnect, PCI) bus or expanding the industrial standard structure (Extended Industry Standard
Architecture, EISA) bus etc..The communication bus can be divided into address bus, data/address bus, control bus etc..For just
It is only indicated with a thick line in expression, figure, it is not intended that an only bus or a type of bus.
Communication interface 302 is for the communication between above-mentioned electronic equipment and other equipment.
Memory may include random access memory (Random Access Memory, RAM), also may include non-easy
The property lost memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally, memory may be used also
To be storage device that at least one is located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit, network processing unit (Network
Processor, NP) etc.;It can also be digital signal processor (Digital Signal Processing, DSP), dedicated collection
At circuit, field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hard
Part component etc..
When processor executes the program stored on memory in embodiments of the present invention, realize when the preset video of arrival
When prestretching stream time point, for the first higher ranked monitor channel of each monitoring, in first monitor channel corresponding first
Prestretching stream process is carried out to the video code flow slice of first monitor channel in prestretching flow/time length, by the view of first monitor channel
In memory, user requests the video code flow of first monitor channel to frequency code stream slice caching in this way in the first prestretching flow/time length
When, the video code flow cached in memory can be directly played, request can be made to obtain quick response, picture reaches the effect opened the second
Fruit.
On the basis of the various embodiments described above, the embodiment of the invention also provides a kind of computers to store readable storage medium
Matter is stored with the computer program that can be executed by electronic equipment in the computer readable storage medium, when described program is in institute
It states when being run on electronic equipment, so that the electronic equipment realizes following steps when executing:
Judge whether current point in time is preset video prestretching stream time point;
If so, the first prestretching flow/time length of preset each first monitor channel is determined, for each first prison
Control channel, in the corresponding first prestretching flow/time length of first monitor channel to the video code flow of first monitor channel be sliced into
Row prestretching stream process, in memory by the video code flow slice caching of first monitor channel;Wherein, preset each first prison
Control channel be divide in advance monitor higher ranked monitor channel.
Based on the same inventive concept, a kind of computer readable storage medium is additionally provided in the embodiment of the present invention, due to place
The principle and video that reason device is solved the problems, such as in the computer program stored on executing above-mentioned computer readable storage medium are handled
Method is similar, therefore processor may refer in the implementation for the computer program for executing above-mentioned computer-readable recording medium storage
The implementation of method, overlaps will not be repeated.
Above-mentioned computer readable storage medium can be any usable medium that the processor in electronic equipment can access
Or data storage device, including but not limited to magnetic storage such as floppy disk, hard disk, tape, magneto-optic disk (MO) etc., optical memory
Such as CD, DVD, BD, HVD and semiconductor memory such as ROM, EPROM, EEPROM, nonvolatile memory (NAND
FLASH), solid state hard disk (SSD) etc..
Computer program, computer program quilt are provided in the computer readable storage medium provided in embodiments of the present invention
It when processor executes, realizes when reaching preset video prestretching stream time point, for the first higher ranked prison of each monitoring
Control channel, in the corresponding first prestretching flow/time length of first monitor channel to the video code flow of first monitor channel be sliced into
Row prestretching stream process, in memory by the video code flow slice caching of first monitor channel, in this way in the first prestretching flow/time length
When interior user requests the video code flow of first monitor channel, the video code flow cached in memory can be directly played, it can be with
Request is set to obtain quick response, picture achievees the effect that the second opens.
The embodiment of the invention provides a kind of method for processing video frequency, device, electronic equipment and storage medium, the method packets
It includes: judging whether current point in time is preset video prestretching stream time point;If so, determining that preset each first monitoring is logical
The first prestretching flow/time length in road, for each first monitor channel, in the corresponding first prestretching stream of first monitor channel
Prestretching stream process is carried out to the video code flow slice of first monitor channel in duration;Wherein, preset each first monitoring is logical
Road is the higher ranked monitor channel of monitoring divided in advance.
Due in embodiments of the present invention, when reaching preset video prestretching stream time point, for each monitoring grade
Higher first monitor channel, to the view of first monitor channel in the corresponding first prestretching flow/time length of first monitor channel
Frequency code stream slice carries out prestretching stream process, in memory by the video code flow of first monitor channel slice caching, in this way the
When user requests the video code flow of first monitor channel in one prestretching flow/time length, the view cached in memory can be directly played
Frequency code stream can make request obtain quick response, and picture achievees the effect that the second opens.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Although preferred embodiments of the present invention have been described, it is created once a person skilled in the art knows basic
Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as
It selects embodiment and falls into all change and modification of the scope of the invention.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art
Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to include these modifications and variations.
Claims (10)
1. a kind of method for processing video frequency, which is characterized in that the described method includes:
Judge whether current point in time is preset video prestretching stream time point;
If so, determine the first prestretching flow/time length of preset each first monitor channel, it is logical for each first monitoring
Road carries out the video code flow slice of first monitor channel in the corresponding first prestretching flow/time length of first monitor channel pre-
Stream process is drawn, in memory by the video code flow slice caching of first monitor channel;Wherein, preset each first monitoring is logical
Road is the higher ranked monitor channel of monitoring divided in advance.
2. the method as described in claim 1, which is characterized in that the first of preset each first monitor channel of determination is pre-
Draw flow/time length include:
For the second monitor channel each of is installed in scene, according to the importance of the monitored position of the second monitor channel, really
The monitoring grade of fixed second monitor channel;Wherein, the importance of monitored position is higher, the monitoring grade of the second monitor channel
It is higher;
The second monitor channel of the preset quantity of monitoring grade from high to low is chosen as preset first monitor channel;Determine institute
State the first prestretching flow/time length of preset each first monitor channel.
3. the method as described in claim 1, which is characterized in that the method also includes:
It for each first monitor channel, is played if the video code flow of first monitor channel is requested, when recognizing
When the video code flow of first monitor channel stops request and plays, when determining the corresponding second prestretching stream of first monitor channel
It is long;
For each first monitor channel, to first prison in the corresponding second prestretching flow/time length of first monitor channel
The video code flow slice for controlling channel carries out prestretching stream process, and the video code flow slice of first monitor channel is buffered in memory
In.
4. method as claimed in claim 3, which is characterized in that the corresponding second prestretching stream of the determination first monitor channel
Duration includes:
According to the requested number played of first monitor channel in predetermined time period, the temperature of first monitor channel is determined
Value;
For each first monitor channel, by multiplying for the hot value of first monitor channel and preset keep-alive basis duration
Product is used as the corresponding second prestretching flow/time length of first monitor channel.
5. method as claimed in claim 4, which is characterized in that described according to the first monitor channel quilt in predetermined time period
The number played is requested, determines that the hot value of first monitor channel includes:
Using the ratio of requested first number played of first monitor channel in default hour and the default hour as the
One hot value, using first hot value as the hot value of first monitor channel;Or
Using the ratio of requested second number played of first monitor channel in preset number of days and the preset number of days as the
Two hot values, using second hot value as the hot value of first monitor channel;Or
First monitor channel is used into number of days using the third number and first monitor channel for being requested broadcasting in duration
Ratio as third hot value, using the third hot value as the hot value of first monitor channel;Or
Using the sum of first hot value, the second hot value and third hot value as the hot value of first monitor channel.
6. the method as described in claim 1, which is characterized in that determine each first monitor channel the first prestretching flow/time length it
Afterwards, video code flow is sliced before carrying out prestretching stream process, the method also includes:
For each first monitor channel, according to the monitoring grade of first monitor channel, first monitor channel is determined
Weight duration the first prestretching flow/time length of first monitor channel is carried out according to the weight duration of first monitor channel
It updates, wherein monitoring higher grade, and weight duration is bigger.
7. the method as claimed in claim 3 or 4, which is characterized in that when determining the second prestretching stream of each first monitor channel
After length, video code flow is sliced before carrying out prestretching stream process, the method also includes:
For each first monitor channel, according to the monitoring grade of first monitor channel, first monitor channel is determined
Weight duration the second prestretching flow/time length of first monitor channel is carried out according to the weight duration of first monitor channel
It updates, wherein monitoring higher grade, and weight duration is bigger.
8. a kind of video process apparatus, which is characterized in that described device includes:
Judgment module, for judging whether current point in time is preset video prestretching stream time point;
First processing module, if the judging result for the judgment module be it is yes, determine that preset each first monitoring is logical
The first prestretching flow/time length in road, for each first monitor channel, in the corresponding first prestretching stream of first monitor channel
Prestretching stream process is carried out to the video code flow slice of first monitor channel in duration, by the video code flow of first monitor channel
Slice caching is in memory;Wherein, preset each first monitor channel is that the higher ranked monitoring that monitors divided in advance is led to
Road.
9. a kind of electronic equipment, which is characterized in that including processor, communication interface, memory and communication bus, wherein processing
Device, communication interface, memory complete mutual communication by communication bus;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes the described in any item method steps of claim 1-7
Suddenly.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer in the computer readable storage medium
Program realizes claim 1-7 described in any item method and steps when the computer program is executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811584294.1A CN109729314B (en) | 2018-12-24 | 2018-12-24 | Video processing method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811584294.1A CN109729314B (en) | 2018-12-24 | 2018-12-24 | Video processing method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109729314A true CN109729314A (en) | 2019-05-07 |
CN109729314B CN109729314B (en) | 2021-02-02 |
Family
ID=66297065
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811584294.1A Active CN109729314B (en) | 2018-12-24 | 2018-12-24 | Video processing method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109729314B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111666516A (en) * | 2020-04-24 | 2020-09-15 | 北京奇艺世纪科技有限公司 | Page loading method and device, electronic equipment and storage medium |
CN113382278A (en) * | 2021-06-11 | 2021-09-10 | 中国电信股份有限公司 | Video pushing method and device, electronic equipment and readable storage medium |
CN114363303A (en) * | 2021-12-31 | 2022-04-15 | 上海网达软件股份有限公司 | Stream media transcoding method for realizing quick playing of monitoring video |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106227883A (en) * | 2016-08-05 | 2016-12-14 | 北京聚爱聊网络科技有限公司 | The temperature of a kind of content of multimedia analyzes method and apparatus |
CN106331642A (en) * | 2016-08-31 | 2017-01-11 | 浙江大华技术股份有限公司 | Method and device for processing data in video cloud system |
CN106412505A (en) * | 2016-09-29 | 2017-02-15 | 浙江大华技术股份有限公司 | Video display method and apparatus in P2P mode |
WO2017026991A1 (en) * | 2015-08-07 | 2017-02-16 | Hitachi, Ltd. | Dynamic caching and predictive maintenance for video streaming |
CN108259839A (en) * | 2018-03-16 | 2018-07-06 | 深圳市乐唯科技开发有限公司 | A kind of equipment real time remote manipulation and video frequency showing system and method |
-
2018
- 2018-12-24 CN CN201811584294.1A patent/CN109729314B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017026991A1 (en) * | 2015-08-07 | 2017-02-16 | Hitachi, Ltd. | Dynamic caching and predictive maintenance for video streaming |
CN106227883A (en) * | 2016-08-05 | 2016-12-14 | 北京聚爱聊网络科技有限公司 | The temperature of a kind of content of multimedia analyzes method and apparatus |
CN106331642A (en) * | 2016-08-31 | 2017-01-11 | 浙江大华技术股份有限公司 | Method and device for processing data in video cloud system |
CN106412505A (en) * | 2016-09-29 | 2017-02-15 | 浙江大华技术股份有限公司 | Video display method and apparatus in P2P mode |
CN108259839A (en) * | 2018-03-16 | 2018-07-06 | 深圳市乐唯科技开发有限公司 | A kind of equipment real time remote manipulation and video frequency showing system and method |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111666516A (en) * | 2020-04-24 | 2020-09-15 | 北京奇艺世纪科技有限公司 | Page loading method and device, electronic equipment and storage medium |
CN113382278A (en) * | 2021-06-11 | 2021-09-10 | 中国电信股份有限公司 | Video pushing method and device, electronic equipment and readable storage medium |
CN113382278B (en) * | 2021-06-11 | 2022-09-09 | 天翼云科技有限公司 | Video pushing method and device, electronic equipment and readable storage medium |
CN114363303A (en) * | 2021-12-31 | 2022-04-15 | 上海网达软件股份有限公司 | Stream media transcoding method for realizing quick playing of monitoring video |
CN114363303B (en) * | 2021-12-31 | 2023-06-02 | 上海网达软件股份有限公司 | Streaming media transcoding method for realizing rapid playing of surveillance video |
Also Published As
Publication number | Publication date |
---|---|
CN109729314B (en) | 2021-02-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3780523B1 (en) | Network traffic identification method and related device | |
CN106658049B (en) | A kind of video playing way to play for time and system | |
CN102282804B (en) | Adaptive network content distribution system | |
CN109729314A (en) | A kind of method for processing video frequency, device, electronic equipment and storage medium | |
CN106664315A (en) | Methods and apparatus to predict end of streaming media using a prediction model | |
CN107483976A (en) | Live management-control method, device and electronic equipment | |
CN107295395A (en) | Code check adaptive regulation method, device and electronic equipment | |
US11172044B2 (en) | Content based byte-range caching using a dynamically adjusted chunk size | |
US10001943B2 (en) | Data stream processor and method to throttle consumption of message data in a distributed computing system | |
KR20170012461A (en) | Method for reducing pre-fetching of multimedia streaming data with minimal impact on playback user experience | |
CN105262699A (en) | Network adaptive coding adjustment method and device | |
CN109495660B (en) | Audio data coding method, device, equipment and storage medium | |
Shen et al. | An information-aware QoE-centric mobile video cache | |
WO2022052566A1 (en) | Video bitrate adjustment method and apparatus, and electronic device and machine-readable storage medium | |
CN107147921A (en) | Based on section and the intelligence CDN video playback accelerated methods dispatched and equipment | |
CN101330601A (en) | Apparatus for unified monitoring multi-path remote video | |
CN108401190A (en) | A kind of method and apparatus for being marked in real time to video frame | |
CN104333816B (en) | The determination method and device of downloading mode in a kind of P2P networks | |
CN109587511A (en) | More equipment net cast methods, equipment, system and storage medium | |
WO2019206033A1 (en) | Server configuration method and apparatus | |
CN107786371B (en) | Data acceleration method and device and storage medium | |
Zeng et al. | Towards secure and network state aware bitrate adaptation at IoT edge | |
WO2022103513A1 (en) | Electronic apparatus and method for latency measurements and presentation for an optimized subscriber service | |
EP3017377B1 (en) | System and method for delivering content in a content delivery network | |
CN105429794A (en) | Method and device for improving access efficiency of network management work station to network element equipment |
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 |