CN110430208B - Video stream processing method and device, electronic equipment and storage medium - Google Patents
Video stream processing method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN110430208B CN110430208B CN201910746077.6A CN201910746077A CN110430208B CN 110430208 B CN110430208 B CN 110430208B CN 201910746077 A CN201910746077 A CN 201910746077A CN 110430208 B CN110430208 B CN 110430208B
- Authority
- CN
- China
- Prior art keywords
- video stream
- video
- information
- list
- server
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/10—Architectures or entities
- H04L65/1013—Network architectures, gateways, control or user entities
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/1066—Session management
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/60—Network streaming of media packets
- H04L65/75—Media network packet handling
-
- 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/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
-
- 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/14—Session management
- H04L67/146—Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Business, Economics & Management (AREA)
- General Business, Economics & Management (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The application provides a video stream processing method, a video stream processing device, an electronic device and a storage medium, wherein the video stream monitoring method comprises the following steps: acquiring a video list recorded by an access server according to a set time interval; acquiring a video stream list recorded by the streaming media server; judging whether a video stream needing to be processed exists or not based on the video list, the video stream list and the video stream recorded by the central management server; and if so, recovering the resources occupied by the video stream needing to be processed. According to the embodiment of the application, the video stream to be processed is determined and recovered in time through the video list recorded by the access server, the video stream list recorded by the streaming media server and the video stream recorded by the central management server, which are obtained at regular time, so that the recovery efficiency of the video stream is improved.
Description
Technical Field
The present application relates to the field of streaming media control technologies, and in particular, to a video stream processing method and apparatus, an electronic device, and a storage medium.
Background
The video stream monitoring system generally comprises a user side, namely a client side, a central management server, front-end equipment, an access server and a streaming media server, wherein when the user side needs to retrieve videos, a streaming opening request is sent to the central management server, and the central management server can perform authorization limitation on the number of the read and the concurrent video streams according to the actual number of the front-end equipment and the system concurrent capability so as to ensure the stability of the video streams provided by the video stream monitoring system.
When the client is crashed, the front-end equipment fails and other accidents happen, the client cannot close the opened video streams, and the counts of the video streams in the system cannot be released, so that the number of the video streams which are actually called and read by the client is different from the number of the video streams stored by the central management server, and when the number of the video streams stored by the central management server exceeds the limit, the client cannot continuously call and read the video streams.
At present, the video stream monitoring system can only be restarted to completely recover the video stream, and before the video stream monitoring system is restarted, the video stream monitoring system cannot normally work, so that the efficiency of recovering the video stream is low due to the restart of the video stream monitoring system, and the effective monitoring of the video of a target area by a user end is influenced.
Disclosure of Invention
In view of the above, an object of the present application is to provide a video stream processing method, apparatus, electronic device and storage medium, so as to improve the recovery efficiency of a video stream.
In a first aspect, an embodiment of the present application provides a video stream processing method, which is applied to a central management server in a video stream monitoring system, where the video stream monitoring system further includes: the video stream processing method comprises the following steps that an access server and a streaming media server which are respectively connected with a central management server, a front-end device connected with the access server, and a user side connected with the streaming media server, wherein the front-end device transmits video streams to the user side through the access server and the streaming media server, the central management server records the video streams which are transmitted to the user side and do not receive a video stream closing request sent by the user side, and the video stream processing method comprises the following steps:
acquiring a video list recorded by the access server according to a set time interval; and acquiring a video stream list recorded by the streaming media server;
judging whether a video stream needing to be processed exists or not based on the video list, the video stream list and the video stream recorded by the central management server;
and if so, recovering the resources occupied by the video stream needing to be processed.
In some embodiments, after the recovering the resources occupied by the video stream needing to be processed, the method further comprises:
the number of recorded video streams is updated.
In some embodiments, the video stream processing method further comprises:
receiving a video stream acquisition request sent by the user side, wherein the video stream acquisition request comprises a user side identifier, a streaming media server identifier and a target video stream;
when the number of the video streams is determined to be smaller than a set threshold value, inquiring the mapping relation between the pre-stored video streams and the access server identification and the front-end equipment identification to obtain the access server identification and the front-end equipment identification mapped by the target video streams;
generating a video stream calling request according to the target video stream, the user side identifier, the streaming media server identifier and the acquired front-end equipment identifier;
and sending a video stream calling request to the front-end equipment corresponding to the acquired front-end equipment identifier through the access server corresponding to the acquired access server identifier, so that the access server receives a target video stream returned by the front-end equipment according to the video stream calling request, and sends the target video stream to a user side corresponding to the user side identifier through the streaming media server corresponding to the streaming media server identifier.
In some embodiments, the determining, by the access server, whether there is a video stream to be processed based on the video list, the video stream list and the video stream recorded by the central management server includes:
judging whether the video stream list has inconsistent video stream information with the video stream recorded by the central management server, if so, determining that the video stream needing to be processed exists, wherein the video stream needing to be processed is the inconsistent video stream information; and the number of the first and second groups,
acquiring video information corresponding to the video stream recorded by the central management server;
and judging whether the video list and the acquired video information have inconsistent video information, if so, determining that a video stream needing to be processed exists, wherein the video stream needing to be processed is the inconsistent video information.
In some embodiments, the video list further includes a latest timestamp of the video information received by the access server, the video stream list further includes a latest timestamp of the video stream information sent, and the video stream processing method further includes:
acquiring the latest timestamp of the video information in the video list, which is consistent with the acquired video information, aiming at the video information in the video list, which is consistent with the acquired video information;
judging whether the absolute value of the difference value between the latest timestamp of the video information and the current timestamp of the video information is greater than a set time difference threshold value or not aiming at each piece of video information which is consistent with the acquired video information in the video list, and if so, determining that the video information is a video stream needing to be processed;
acquiring the latest timestamp of each piece of video stream information in the video stream list, which is consistent with the video stream recorded by the central management server, aiming at the video stream information in the video stream list, which is consistent with the video stream recorded by the central management server;
and judging whether the absolute value of the difference value between the latest timestamp of the video stream information and the current timestamp of the video stream information is greater than a set time difference threshold value or not aiming at each piece of video stream information which is consistent with the video stream recorded by the central management server in the video stream list, and if so, determining that the video stream information is the video stream needing to be processed.
In some embodiments, the recycling resources occupied by the video stream to be processed includes:
if the video stream to be processed is video information, disconnecting the front-end equipment corresponding to the video information from the access server, clearing the video information stored by the access server, and clearing the video stream information corresponding to the video information stored in the streaming media server;
if the video stream to be processed is the video stream information, the connection between the streaming media server corresponding to the video stream information and the user side is disconnected, and the video stream information stored by the streaming media server is removed.
In some embodiments, after receiving the video stream acquisition request sent by the user side, the video stream processing method further includes:
and when the number of the video streams is determined to reach the set threshold, sending information for prompting that the number of the video streams reaches the set threshold to the user side, and refusing to provide the target video streams corresponding to the video stream acquisition requests to the user side.
In a second aspect, an embodiment of the present application provides a video stream processing apparatus, which resides in a central management server in a video stream monitoring system, where the video stream monitoring system further includes: the device comprises an access server and a streaming media server which are respectively connected with a central management server, a front-end device connected with the access server, and a user side connected with the streaming media server, wherein the front-end device transmits video streams to the user side through the access server and the streaming media server, the central management server records the video streams which are transmitted to the user side and do not receive a video stream closing request sent by the user side, and the video stream processing device comprises:
the acquisition module is used for acquiring a video list recorded by the access server according to a set time interval; and acquiring a video stream list recorded by the streaming media server;
the judging module is used for judging whether the video stream needing to be processed exists or not based on the video list, the video stream list and the video stream recorded by the central management server;
and the recovery module is used for recovering the resources occupied by the video stream needing to be processed if the video stream needing to be processed exists.
In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, when the electronic device runs, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to execute the steps of the video stream processing method according to the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the video stream processing method according to the first aspect.
In the video stream processing method provided in the embodiment of the present application, the central management server may obtain, according to a set time interval, a video list recorded by the access server and a video stream list recorded by the streaming media server, and then determine whether there is a video stream to be processed according to the video stream list, the video stream list and the video stream recorded by the central management server, where the video stream list recorded by the access server includes all videos received by the access server and sent by the front-end device, the video stream list recorded by the streaming media server includes all video streams sent by the streaming media server to the user side, and the central management server may record a video stream transmitted to the user side and not receiving a video stream closing request sent by the user side, so according to the video list recorded by the access server, the video stream list recorded by the streaming media server and the video stream recorded by the central management server, the method and the device can judge whether the video stream needing to be processed exists, namely the video stream which is interrupted in transmission and still recorded by the central management server, and then the resources occupied by the video stream needing to be processed are recovered after the video stream needing to be processed exists, so that the video stream is checked at regular time, and the video stream needing to be processed is recovered, and the problem of low video stream recovery efficiency caused by restarting a video stream monitoring system when a client or front-end equipment fails is solved, namely the recovery efficiency of the video stream is improved.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 shows a schematic structural diagram of a video stream monitoring system provided in an embodiment of the present application;
fig. 2 is a flowchart illustrating a video stream processing method according to an embodiment of the present application;
fig. 3 is a flowchart illustrating a first method for determining whether there is a video stream that needs to be processed according to an embodiment of the present application;
fig. 4 is a flowchart illustrating a second method for determining whether there is a video stream to be processed according to an embodiment of the present application;
fig. 5 is a flowchart illustrating a video stream acquiring method according to an embodiment of the present application;
fig. 6 is a flowchart illustrating a video stream playback method according to an embodiment of the present application;
FIG. 7 is a flow chart illustrating another video recycling method provided by embodiments of the present application;
fig. 8 is a schematic structural diagram illustrating a video stream processing apparatus according to an embodiment of the present application;
fig. 9 shows a schematic structural diagram of an electronic device provided in an embodiment of the text application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
In addition, the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that in the embodiments of the present application, the term "comprising" is used to indicate the presence of the features stated hereinafter, but does not exclude the addition of further features.
Before introducing the video stream processing method of the embodiment of the present application, a video stream monitoring system provided in the embodiment of the present application is introduced, as shown in fig. 1, including a central management server 101, an access server 102, a streaming media server 103, a front end device 104, and a user end 105, when a user a and a user B want to watch a video in an area a, a video stream acquisition request may be sent to the central management server 101 through the user end 105, the central management server 101 determines which front end device the user wants to watch based on the video stream acquisition request, and sends an identification code of the front end device to the access server 102, after the access server 102 acquires a video collected by a corresponding front end device 104, the video is identified, and then the video is sent to the streaming media server 103 connected to the user end 105, and then the streaming media server 103 divides the video into a video stream a and a video stream B and sends the video stream a and the video stream B to the corresponding user respectively After determining that the user terminal 105 receives the video stream, the central management server 101 records the video stream received by the user terminal 105, such as recording an identifier of the video when the access server 102 receives the video, and an identifier of the video stream when the streaming media server 103 sends the video stream.
When the user does not need to watch the video in the area a, a request for closing the video in the area a may be sent to the central management server 101 through the user terminal 105, and when the central management server 101 receives the request for closing the video in the area a, an instruction for closing the video in the area a is also sent to the access server 102, and the recorded identifier of the video when the access server receives the video is cleared, and when the streaming media server sends the video stream, the identifier of the video stream is cleared.
Because the transmission of the video stream is performed in real time, i.e. the video stream is played while being transmitted, and in the actual video retrieval process, there may occur problems such as network break of the user terminal, and running of the user terminal, when the user terminal runs, the user terminal cannot send a video stream closing request to the central management server, at this time, the central management server still keeps the relevant record of the video stream requested by the user terminal, and this relevant record is called a record to be cleared, if the number of the video streams recorded by the central management server reaches the video stream retrieval threshold, when the user terminal has a fault and then sends a video stream acquisition request, or when other user terminals start sending video stream acquisition requests, the central management server will refuse to provide the user terminal with the target video stream corresponding to the video stream acquisition request, if too many records to be cleared are recorded by the central management server, the video streams that the user can read are fewer, for example, if the video stream reading threshold is 10, if the records that need to be cleared are 8, the central management server only allows to read 2 video streams at this time, if there are more user terminals that need to read the video streams, or a certain user terminal wants to read more video streams, the video stream monitoring system needs to be restarted, specifically, the central management server, the access server, and the streaming media server in the video stream monitoring system can be restarted to recover the video streams in a restarting manner, a certain time duration needs to be consumed for each restart, and in the starting process, the user terminal watches the video.
The embodiment of the application provides a video stream processing method, which is applied to a central management server in a video stream monitoring system.
Specifically, as shown in fig. 1, the video stream monitoring system includes: an access server 102 and a streaming media server 103 respectively connected to a central management server 101, a front-end device 104 connected to the access server 102, and a client 105 connected to the streaming media server 103, where the front-end device 104 transmits a video stream to the client 105 through the access server 102 and the streaming media server 103, and the central management server 101 records the video stream transmitted to the client 105 and not receiving a video stream closing request sent by the client 105, as shown in fig. 2, a video stream processing method provided in this embodiment of the present application specifically includes the following steps S201 to S203:
s201, acquiring a video list recorded by an access server according to a set time interval; acquiring a video stream list recorded by the streaming media server;
the set time interval here may be a set time interval such as 1 minute, 10 minutes, 15 minutes, and the like, that is, a video list recorded by the access server and a video stream list recorded by the streaming server are acquired at regular time.
The video list recorded by the access server includes video information received by the access server and a latest timestamp of the received video information, where the video information can be encoded after being received to obtain encoded information of the video information, the video information is then updated, the encoded information of the video information is added to the video information, the latest timestamp of the video information can be a timestamp of a latest received data packet, for example, when the access server receives a video sent by the front-end device a, the data packet of the video is encoded to obtain encoded information of each data packet in the video, and a timestamp is given to each data packet of the latest received video, that is, the latest timestamp of the received video information is recorded.
The video stream list recorded by the streaming media server includes the latest timestamp of the video stream information sent by the streaming media server and the video stream information, the video stream information can be encoded after being received, the encoded information of the video stream information is obtained, then the video stream information is updated, the encoded information of the video stream information is added to the video stream information, the latest timestamp of the video stream information can be the timestamp of a data packet sent to a user end latest, for example, after the streaming media server receives a video sent by an access device, the video is divided into the number of video streams corresponding to the number of the user ends, each video stream is sent to a required user end, after the video stream is sent successfully, the video stream is encoded, and a data packet sent to the user end latest in the video stream is subjected to timestamp.
The timestamp of the latest received data packet can represent the latest timestamp of the video information received by the access server, and the timestamp of the latest sent data packet can represent the timestamp of the latest data stream sent by the streaming media server to the user side.
S202, judging whether a video stream needing to be processed exists or not based on the video list, the video stream list and the video stream recorded by the central management server;
the present invention is to determine whether there is a video stream that needs to be processed, that is, whether there is a video stream that needs to be recovered, according to a video list formed by recording, by an access server, video information sent by a front-end device and a latest timestamp of the video information, a video stream list formed by recording, by a streaming server, video stream information sent to a user end and a latest timestamp of the video stream information, and information of a video stream recorded by a central management server.
The video stream recorded by the central management server is a video stream that is transmitted to the user terminal and has not received a video stream closing request sent by the user terminal, and specifically, the video stream is recorded by the access server and the video stream is recorded by the streaming media server.
S203, if the video stream exists, resources occupied by the video stream needing to be processed are recovered.
Specifically, in step S202, based on the video list, the video stream list and the video stream recorded by the central management server, it is determined whether there is a video stream that needs to be processed, as shown in fig. 3, the method specifically includes the following steps S301 to S303:
s301, judging whether video stream information which is inconsistent with the video stream recorded by the central management server exists in the video stream list, if so, determining that a video stream which needs to be processed exists, wherein the video stream which needs to be processed is the inconsistent video stream information.
S302, video information corresponding to the video stream recorded by the central management server is obtained.
In this embodiment, since the video list recorded by the access server includes the video information received by the access server, the video stream list recorded by the streaming server includes the video stream information sent by the streaming server, and after each video received by the access server is sent to the streaming server, it may be divided into multiple video streams by the streaming server, for example, a piece of video information is video a101, which represents the video encoded as 101 sent by the front-end device a received by the access server, and after the video a101 is sent to the streaming server, the streaming server divides the video a101 into video stream a101a, video stream a101b and video stream a101c, and sends video stream a101a to a client, sends video stream a101b to b client, and sends video stream a101c to c client, here or the video information corresponding to video streams a101 a-a 101c recorded by the central management server, i.e., video a 101.
And S303, judging whether the video list and the acquired video information have inconsistent video information, if so, determining that a video stream needing to be processed exists, wherein the video stream needing to be processed is the inconsistent video information.
Step S301 determines whether inconsistent video stream information exists through the video stream list recorded by the streaming media server and the video stream recorded by the central management server, and steps S302 to S303 determine whether inconsistent video stream information exists through the video stream list recorded by the access server and the video information corresponding to the video stream recorded by the central management server, and these two modes can be performed independently, and all video streams to be processed are deleted and selected together.
For example, the two above processes of determining whether there are video streams to be processed are respectively described in a specific embodiment, where table 1 below shows video streams (including video stream information and video information) recorded by a central management server, table 2 below shows a list of videos recorded by an access server acquired at a certain time, and table 3 below shows a list of video streams recorded by a streaming media server acquired at the same time, and the specific determination processes are as follows:
table 1 video stream recorded by a central management server
Video stream information | Video information |
A101a、A101b、A101c | A101 |
B201a、B201b | B201 |
C301b、C301c | C301 |
Table 2 list of videos recorded by access server
Video information | Time stamp corresponding to video information |
A101 | 10:01 |
B201 | 09:01 |
C302 | 10:01 |
Table 3 list of video streams recorded by streaming server
Video stream information | Time stamp corresponding to video stream information |
A101a | 10:02 |
A101b | 10:02 |
A101c | 09:02 |
B201a | 09:05 |
B201b | 09:05 |
C301b | 09:00 |
C301a | 09:01 |
Through step S301, comparing the streaming media video stream list in table 3 with the video streams recorded by the central management server in table 1, finding that there is video stream C301C and no video stream C301a in the video stream information recorded by the central management server in table 1, but there is video stream C301C and video stream C301a in the video stream list recorded by the streaming media server in table 3, and the inconsistent video stream information includes video stream C301a and video stream C301C, then determining video stream C301a and video stream C301C as the video streams needing processing.
By comparing the video list recorded by the access server in table 2 with the video stream recorded by the central management server in table 1, and finding that the video information recorded by the central management server in table 1 includes video C301 and does not include video C302, but does not include video C301 and includes video C302 in the video list recorded by the access server in table 2, the video C301 and the video C302 are determined as video streams to be processed, through step S303.
Specifically, the inconsistent video stream information is found one by one from the video stream information recorded by the central management server, for example, it is first determined whether the video stream a101a in table 1 exists in table 3, then it is determined whether the video stream a101b in table 1 exists in table 3, all the video stream information in table 1 is compared one by one, then the video stream information that does not exist in table 3 but exists in table 1 is determined, and the opposite process is also adopted, that is, it is determined whether the video stream information in table 3 exists in the video stream information recorded in table 1 one by one, that is, it is determined that the video stream information that exists in table 3 but does not exist in table 1 but exists in table 1, so that the video stream to be processed is found; in the same way, the video information in table 1 but not in table 2 and the video information in table 2 but not in table 1 can also be determined, i.e. the video stream to be processed is also found.
Because the video list further includes the latest timestamp of the video information received by the access server in addition to the video information, and the video stream list further includes the latest timestamp of the video stream information sent by the streaming media server in addition to the video stream information, in an embodiment, as shown in fig. 4, the video stream processing method further includes the following specific steps S401 to S404:
s401, aiming at the video information consistent with the acquired video information in the video list, acquiring the latest timestamp of the video information consistent with the acquired video information in the video list;
s402, judging whether the absolute value of the difference value between the latest timestamp of the video information and the current timestamp of the video information is larger than a set time difference threshold value or not aiming at each piece of video information which is consistent with the acquired video information in the video list, and if so, determining that the video information is a video stream needing to be processed;
s403, aiming at the video stream information in the video stream list, which is consistent with the video stream recorded by the central management server, acquiring the latest timestamp of each piece of video stream information in the video stream list, which is consistent with the video stream recorded by the central management server;
s404, aiming at each piece of video stream information in the video stream list, which is consistent with the video stream recorded by the central management server, judging whether the absolute value of the difference value between the latest timestamp of the video stream information and the current timestamp is greater than a set time difference threshold value, and if so, determining that the video stream information is the video stream needing to be processed.
After step S401 to step S402 are located after step S303, that is, after the video information inconsistent with the acquired video information in the video list is determined as the video stream to be processed, the video information consistent with the acquired video information in the video list may be continuously determined, and it is determined whether the video stream to be processed still exists; steps S403 to S404 may be located after S301, that is, after determining that the video stream information in the video stream list that is inconsistent with the video stream recorded by the central management server is a video stream that needs to be processed, continuously determining the video stream information in the video stream list that is consistent with the video stream recorded by the central management server, and determining whether there is still a video stream that needs to be processed, which is specifically as follows:
for steps S401 to S402, table 1 and table 2 may be taken as an example, because in table 2, the video a101 and the video B201 are consistent with the video information in the central management server, and then the difference between the timestamp of the video a101 and the current timestamp is determined, if the current timestamp is 10:00, the difference between the timestamp of the video a101 and the current timestamp is 1 minute, and the difference between the timestamp of the video B201 and the current timestamp is 59 minutes, and if the time difference threshold is set to be 10 minutes, the video B201 may be determined to be a video stream that needs to be processed.
Also, for steps S403 to S404, table 1 and table 3 may be taken as an example, because the video stream a101a, the video stream a101B, the video stream a101C, the video stream B201a, the video stream B201B, and the video stream C301B in table 3 are consistent with the video stream information in the central management server, and then it is determined that the difference between the timestamps of the video stream a101a, the video stream a101B, the video stream a101C, the video stream B201a, the video stream B201B, and the video stream C301B and the current timestamp is 2 minutes, 48 minutes, 55 minutes, 60 minutes, respectively, then it may be determined that the video stream a101C, the video stream B201a, the video stream B201B, and the video stream C301B need to be processed.
In one embodiment, the method for reclaiming resources occupied by a video stream to be processed comprises the following steps:
the first mode is as follows: if the video stream needing to be processed is video information, disconnecting the front-end equipment corresponding to the video information from the access server, clearing the video information stored by the access server, and clearing the video stream information corresponding to the video information stored in the streaming media server;
the second mode is as follows: if the video stream to be processed is the video stream information, the connection between the streaming media server corresponding to the video stream information and the user side is disconnected, and the video stream information stored by the streaming media server is removed.
Here, the first way is to disconnect the front-end device corresponding to the video C301 from the access server, clear the video C301 stored in the access server, and clear the video stream information corresponding to the video C301 stored in the streaming media server, such as C301b and C301C, when the video stream needing to be processed, such as the video C301, determined by the access server and the central management server is the video stream needing to be processed.
The second way is to disconnect the streaming media server corresponding to the video stream a101c from the user side and remove the video stream a101c stored in the streaming media server when the video stream to be processed, which is determined by the video stream list recorded by the streaming media server and the central management server, is the video stream to be processed, for example, the video stream a101c is the video stream to be processed.
In an embodiment, after recovering the resources occupied by the video stream to be processed, the video stream processing method further includes:
the number of recorded video streams is updated.
For example, as shown in table 1 above, before the video streams needing to be processed are recovered, the number of the video streams recorded in the central management server is 8 in total, that is, video stream a101a, video stream a101B, video stream a101C, video stream B201a, video stream B201B, video stream C301B, and video stream C301C, and after video stream C301C, video stream a101C, video stream B201a, video stream B201B, and video stream C301B are cleared, the number of the video streams recorded in the central management server is updated, and 8 video streams are updated to 3.
Thus, if the video retrieval threshold is 10, the central management server only allows the client to retrieve two video streams before updating, and then allows the client to retrieve 7 video streams after updating.
Therefore, according to a certain time interval, the central management server can update the number of the recorded video streams regularly, so that the number of the videos really watched by the user side is consistent with that of the recorded video streams, the situation that the video stream monitoring system is repeatedly started to clear the video streams needing to be processed is avoided, and the video stream recovery efficiency is improved.
In one implementation, as shown in fig. 5, the video stream processing method provided in the embodiment of the present application further includes the following specific steps S501 to S504:
s501, a video stream acquisition request sent by a user side is received, wherein the video stream acquisition request comprises a user side identifier, a streaming media server identifier and a target video stream.
The client identifier here may be used to represent an address of a client that receives the video stream, the streaming server identifier refers to an identifier of a streaming server connected to the client that initiates the video stream acquisition request, and the target video stream refers to a video of a target area that a user wants to view.
S502, when the number of the video streams is determined to be smaller than a set threshold value, inquiring the mapping relation between the pre-stored video streams and the access server identification and the front-end equipment identification, and acquiring the access server identification and the front-end equipment identification mapped by the target video streams;
after receiving a video stream acquisition request sent by a user side, a central management server firstly judges whether the number of recorded video streams is smaller than a set threshold value, and when the number of the video streams is determined to be smaller than the set threshold value, the central management server acquires an access server identifier and a front-end equipment identifier corresponding to a target video stream requested by the user side according to a mapping relation between the pre-stored video streams and the access server identifier and the front-end equipment identifier.
And S503, generating a video stream calling request according to the target video stream, the user side identifier, the streaming media server identifier and the acquired front-end equipment identifier.
In some cases, there may be multiple streaming media servers, multiple clients, multiple front-end devices, and multiple video streams recorded by the same front-end device, so that a video stream retrieval request needs to be generated according to a target video stream, a client identifier, a streaming media server identifier, and an acquired front-end device identifier, so that a client that needs to refer to a video finally receives a desired video stream.
And S504, sending the video stream calling request to the front-end equipment corresponding to the acquired front-end equipment identifier through the access server corresponding to the acquired access server identifier, so that the access server receives the target video stream returned by the front-end equipment according to the video stream calling request, and sending the target video stream to the user side corresponding to the user side identifier through the stream media server corresponding to the stream media server identifier.
And then sending the obtained video stream calling request to front-end equipment corresponding to the front-end equipment identifier through an access server corresponding to the access server identifier, so that the corresponding front-end equipment returns the target video stream to the access server, the access server sends the target video stream to the user side through a stream media server corresponding to the stream media server identifier, and when the user side is determined to receive the target video stream, the video stream information of the target video stream is recorded, the number of the recorded video streams is increased, and the specifically increased number is consistent with the number of the video streams requested by the user side.
For example, when the access server receives the target video information corresponding to the target video stream, the target video information is coded as C401, and when the streaming server transmits the target video stream, the target video information is coded as C401a and C401b, the records of the video C401, the video stream C401a and the video stream C401b are added, and the number of the recorded video streams is increased by 2.
Here, the access server receives the video returned by the front-end device, and then sends the video to the streaming media server, and the streaming media server divides the video into video streams corresponding to the number of the clients requesting the video, so that the video here may include at least one video stream.
In an embodiment, after receiving a video stream acquisition request sent by a user, the video stream processing method further includes:
and when the number of the video streams is determined to reach the set threshold, sending information for prompting that the number of the video streams reaches the set threshold to the user side, and refusing to provide the target video streams corresponding to the video stream acquisition requests to the user side.
For example, the number of the video streams recorded by the central management server is 10, and if the set threshold is 10, that is, the number of the video streams reaches the set threshold, information indicating that the number of the video streams reaches the set threshold may be sent to the client, for example, 1 indicates that the number of the video streams reaches the set threshold, and when it is determined that the number of the video streams reaches the set threshold, the target video stream corresponding to the video stream acquisition request is not provided to the client.
In one embodiment, a video stream shutdown request sent by a user side is received, where the video stream shutdown request includes a target video stream, and then the central management server will remove the target video stream from the record and renew the number of the recorded video streams, where a specific shutdown process may send a shutdown instruction to the streaming media server, and then the streaming media server will not send a corresponding target video stream to the user side.
Next, two video stream recovery methods will be described with reference to the above process of determining a video stream to be processed, as shown in fig. 6, for the video stream recovery process in the access server, a video stream recorded by the central management server is obtained, a video list recorded by the access server is obtained, starting from the first piece of video information in the video list, whether the video information exists in the video stream recorded by the central management server is determined, if the video information does not exist, the video information is recovered as the video stream to be processed, if the video information exists, a difference between a timestamp corresponding to the video information and a current timestamp is determined, whether the difference is greater than a set time difference threshold is determined, if the difference is greater than the set time difference threshold, the video information is recovered as the video stream to be processed, if the difference is not greater than the set time difference threshold, whether the next piece of video information in the video list exists in the video stream recorded by the central management server is continuously determined, and determining and recycling all video streams needing to be processed until all video information in the video list is judged.
As shown in fig. 7, for the video stream recovery process in the streaming media server, acquiring a video stream recorded by the central management server and acquiring a video stream list recorded by the streaming media server, starting from a first piece of video stream information in the video stream list, determining whether the video stream information exists in the video stream recorded by the central management server, if not, recovering the video stream information as a video stream to be processed, if so, determining a difference value between a timestamp corresponding to the video stream information and a current timestamp, determining whether the difference value is greater than a set time difference threshold, if so, recovering the video stream information as the video stream to be processed, if not, continuing to determine whether a next piece of video information in the video stream list exists in the video stream recorded by the central management server, until all pieces of video stream information in the video stream list are determined, and determining all video streams needing to be processed and recycling the video streams.
All the video streams needing to be recovered can be determined through the two modes, including the video streams needing to be processed due to the failure of the front-end equipment or the failure of the user side.
In the method and the device, in the process of sending the video stream to the user side, a video list recorded by an access server is additionally obtained, the video stream list recorded by a streaming media server is obtained, whether the video stream needing to be processed exists or not is judged according to the video list, the video stream list and the video stream recorded by a central management server, and then after the video stream needing to be processed exists, resources occupied by the video stream needing to be processed are recovered.
As shown in fig. 8, an embodiment of the present application further provides a video stream processing apparatus 800, which resides in a central management server in a video stream monitoring system, and the video stream monitoring system further includes: the access server and the streaming media server respectively connected to the central management server, the front end device connected to the access server, and the client connected to the streaming media server, wherein the front end device transmits a video stream to the client through the access server and the streaming media server, the central management server records the video stream transmitted to the client and not receiving a video stream closing request sent by the client, and the video stream processing apparatus 800 includes:
an obtaining module 801, configured to obtain a video list recorded by an access server according to a set time interval; acquiring a video stream list recorded by the streaming media server;
a judging module 802, configured to judge whether a video stream to be processed exists based on the video list, the video stream list, and the video stream recorded by the central management server;
the recovery module 803 is configured to recover, if there is a video stream that needs to be processed, a resource occupied by the video stream that needs to be processed.
In an embodiment, the video stream processing apparatus further includes an updating module 804, and after the recycling module 803 recycles the resources occupied by the video stream to be processed, the updating module 804 is configured to:
the number of recorded video streams is updated.
In one embodiment, the video stream processing apparatus 800 further includes:
a receiving module 805, configured to receive a video stream acquisition request sent by a user end, where the video stream acquisition request includes a user end identifier, a streaming media server identifier, and a target video stream;
a query module 806, configured to query, when it is determined that the number of the video streams is smaller than a set threshold, a mapping relationship between a pre-stored video stream and the access server identifier and the front-end device identifier, and obtain an access server identifier and a front-end device identifier mapped by a target video stream;
a generating module 807, configured to generate a video stream fetching request according to the target video stream, the user side identifier, the streaming media server identifier, and the obtained front-end device identifier;
the sending module 808 is configured to send the video stream retrieval request to the front-end device corresponding to the obtained front-end device identifier through the access server corresponding to the obtained access server identifier, so that the access server receives a target video stream returned by the front-end device according to the video stream retrieval request, and sends the target video stream to the user side corresponding to the user-side identifier through the streaming media server corresponding to the streaming media server identifier.
In an embodiment, the video list includes video information received by the access server, the video stream list includes video stream information sent by the streaming media server, the video information corresponds to one or more video stream information, and the determining module 802 is configured to determine whether there is a video stream that needs to be processed according to the following manners:
judging whether video stream information which is inconsistent with the video stream recorded by the central management server exists in the video stream list, if so, determining that the video stream which needs to be processed exists, wherein the video stream which needs to be processed is inconsistent with the video stream information; and the number of the first and second groups,
acquiring video information corresponding to a video stream recorded by a central management server;
and judging whether video information which is inconsistent with the acquired video information exists in the video list, if so, determining that video streams which need to be processed exist, wherein the video streams which need to be processed are inconsistent video information.
In one embodiment, the video list further includes the latest timestamp of the video information received by the access server, the video stream list further includes the latest timestamp of the video stream information sent, and the determining module 802 is further configured to:
acquiring the latest timestamp of the video information consistent with the acquired video information in the video list aiming at the video information consistent with the acquired video information in the video list;
judging whether the absolute value of the difference value between the latest timestamp and the current timestamp of each piece of video information which is consistent with the acquired video information in the video list is greater than a set time difference threshold value, and if so, determining that the video information is a video stream needing to be processed;
aiming at video stream information which is consistent with the video stream recorded by the central management server in the video stream list, acquiring the latest timestamp of each piece of video stream information which is consistent with the video stream recorded by the central management server in the video stream list;
and judging whether the absolute value of the difference value between the latest timestamp of the video stream information and the current timestamp of the video stream information is greater than a set time difference threshold value or not aiming at each piece of video stream information which is consistent with the video stream recorded by the central management server in the video stream list, and if so, determining that the video stream information is the video stream needing to be processed.
In one embodiment, the reclamation module 803 is configured to reclaim resources occupied by the video stream to be processed in the following manner:
if the video stream to be processed is video information, disconnecting the front-end equipment corresponding to the video information from the access server, clearing the video information stored by the access server, and clearing the video stream information corresponding to the video information stored in the streaming media server;
if the video stream to be processed is the video stream information, the connection between the streaming media server corresponding to the video stream information and the user side is disconnected, and the video stream information stored by the streaming media server is removed.
In one embodiment, the sending module 808 is further configured to:
after the receiving module 805 receives the video stream acquisition request sent by the user terminal, when the querying module 806 determines that the number of the video streams reaches the set threshold, send information for prompting that the number of the video streams reaches the set threshold to the user terminal, and refuse to provide the target video stream corresponding to the video stream acquisition request to the user terminal.
An embodiment of the present application further provides an electronic device 900, as shown in fig. 9, which is a schematic structural diagram of the electronic device 900 provided in the embodiment of the present application, and includes: a processor 901, a storage medium 902, and a bus 903. The storage medium 902 stores machine-readable instructions executable by the processor 901 (for example, execution instructions corresponding to the obtaining module 801, the determining module 802, and the recycling module 803 in the apparatus in fig. 8, and the like), when the electronic device 900 operates, the processor 901 and the storage medium 902 communicate via the bus 903, and when the machine-readable instructions are executed by the processor 901, the following processes are performed:
acquiring a video list recorded by an access server according to a set time interval; acquiring a video stream list recorded by the streaming media server;
judging whether a video stream needing to be processed exists or not based on the video list, the video stream list and the video stream recorded by the central management server;
and if so, recovering the resources occupied by the video stream needing to be processed.
In a possible implementation, the instructions executed by the processor 901, after reclaiming the resources occupied by the video stream that needs to be processed, further include:
the number of recorded video streams is updated.
In a possible implementation manner, the instructions executed by the processor 901 further include:
receiving a video stream acquisition request sent by a user side, wherein the video stream acquisition request comprises a user side identifier, a streaming media server identifier and a target video stream;
when the number of the video streams is determined to be smaller than a set threshold value, inquiring the mapping relation between the pre-stored video streams and the access server identification and the front-end equipment identification to obtain the access server identification and the front-end equipment identification mapped by the target video streams;
generating a video stream calling request according to the target video stream, the user side identifier, the stream media server identifier and the acquired front-end equipment identifier;
and sending the video stream calling request to the front-end equipment corresponding to the acquired front-end equipment identifier through the access server corresponding to the acquired access server identifier, so that the access server receives a target video stream returned by the front-end equipment according to the video stream calling request and sends the target video stream to a user side corresponding to the user side identifier through the streaming media server corresponding to the streaming media server identifier.
In a possible implementation, the video list includes video information received by the access server, the video stream list includes video stream information sent by the streaming media server, the video information corresponds to one or more video stream information, and the instructions executed by the processor 901 include:
judging whether video stream information which is inconsistent with the video stream recorded by the central management server exists in the video stream list, if so, determining that the video stream which needs to be processed exists, wherein the video stream which needs to be processed is inconsistent with the video stream information; and the number of the first and second groups,
acquiring video information corresponding to a video stream recorded by a central management server;
and judging whether the video list and the acquired video information have inconsistent video information, if so, determining that a video stream needing to be processed exists, wherein the video stream needing to be processed is the inconsistent video information.
In a possible implementation, the video list further includes the latest timestamp of the video information received by the access server, the video stream list further includes the latest timestamp of the video stream information sent, and the instructions executed by the processor 901 further include:
if the video list does not have inconsistent video information with the acquired video information, acquiring the latest timestamp of each piece of video information in the video list;
judging whether the absolute value of the difference value between the latest timestamp and the current timestamp of each piece of video information is greater than a set time difference threshold value or not, and if so, determining that the piece of video information is a video stream needing to be processed;
if the video stream list does not have inconsistent video stream information with the video stream recorded by the central management server, acquiring the latest timestamp of each video stream in the video stream list;
and judging whether the absolute value of the difference value between the latest timestamp and the current timestamp of each video stream is greater than a set time difference threshold value or not, and if so, determining that the video stream is the video stream needing to be processed.
In a possible implementation, the instructions executed by the processor 901 include:
if the video stream needing to be processed is video information, disconnecting the front-end equipment corresponding to the video information from the access server, clearing the video information stored by the access server, and clearing the video stream information corresponding to the video information stored in the streaming media server;
if the video stream to be processed is the video stream information, the connection between the streaming media server corresponding to the video stream information and the user side is disconnected, and the video stream information stored by the streaming media server is removed.
In a possible implementation manner, the instructions executed by the processor 901, after receiving a video stream acquisition request sent by a user terminal, further include:
and when the number of the video streams is determined to reach the set threshold, sending information for prompting that the number of the video streams reaches the set threshold to the user side, and refusing to provide the target video streams corresponding to the video stream acquisition requests to the user side.
The embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program performs the steps of the video stream processing method.
Specifically, the storage medium can be a general-purpose storage medium, such as a removable disk, a hard disk, or the like, and when the computer program on the storage medium is executed, the video stream processing method can be executed, thereby improving the recovery efficiency of the video stream.
The computer program product for performing the video stream processing method provided in the embodiment of the present application includes a computer-readable storage medium storing a program code, where instructions included in the program code may be used to execute the method described in the foregoing method embodiment, and specific implementation may refer to the method embodiment, which is not described herein again.
The video stream processing apparatus provided by the embodiment of the present application may be specific hardware on a device, or software or firmware installed on a device, and the like. The device provided by the embodiment of the present application has the same implementation principle and technical effect as the foregoing method embodiments, and for the sake of brief description, reference may be made to the corresponding contents in the foregoing method embodiments where no part of the device embodiments is mentioned. It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the foregoing systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus once an item is defined in one figure, it need not be further defined and explained in subsequent figures, and moreover, the terms "first", "second", "third", etc. are used merely to distinguish one description from another and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the present disclosure, which should be construed in light of the above teachings. Are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (9)
1. A video stream processing method is applied to a central management server in a video stream monitoring system, and the video stream monitoring system further comprises: the video stream processing method comprises the following steps that an access server and a streaming media server which are respectively connected with a central management server, a front-end device connected with the access server, and a user side connected with the streaming media server, wherein the front-end device transmits video streams to the user side through the access server and the streaming media server, the central management server records the video streams which are transmitted to the user side and do not receive a video stream closing request sent by the user side, and the video stream processing method comprises the following steps:
acquiring a video list recorded by the access server according to a set time interval; and acquiring a video stream list recorded by the streaming media server;
judging whether a video stream needing to be processed exists or not based on the video list, the video stream list and the video stream recorded by the central management server;
if yes, recovering resources occupied by the video stream needing to be processed;
the video list includes video information received by the access server, the video stream list includes video stream information sent by the streaming media server, the video information corresponds to one or more pieces of video stream information, and the determining whether there is a video stream to be processed based on the video list, the video stream list and the video stream recorded by the central management server includes:
judging whether the video stream list has inconsistent video stream information with the video stream recorded by the central management server, if so, determining that the video stream needing to be processed exists, wherein the video stream needing to be processed is the inconsistent video stream information; and the number of the first and second groups,
acquiring video information corresponding to the video stream recorded by the central management server;
and judging whether the video list and the acquired video information have inconsistent video information, if so, determining that a video stream needing to be processed exists, wherein the video stream needing to be processed is the inconsistent video information.
2. The video stream processing method according to claim 1, wherein after said recovering the resources occupied by the video stream to be processed, the method further comprises:
the number of recorded video streams is updated.
3. The video stream processing method according to claim 2, further comprising:
receiving a video stream acquisition request sent by the user side, wherein the video stream acquisition request comprises a user side identifier, a streaming media server identifier and a target video stream;
when the number of the video streams is determined to be smaller than a set threshold value, inquiring the mapping relation between the pre-stored video streams and the access server identification and the front-end equipment identification to obtain the access server identification and the front-end equipment identification mapped by the target video streams;
generating a video stream calling request according to the target video stream, the user side identifier, the streaming media server identifier and the acquired front-end equipment identifier;
and sending a video stream calling request to the front-end equipment corresponding to the acquired front-end equipment identifier through the access server corresponding to the acquired access server identifier, so that the access server receives a target video stream returned by the front-end equipment according to the video stream calling request, and sends the target video stream to a user side corresponding to the user side identifier through the streaming media server corresponding to the streaming media server identifier.
4. The video stream processing method according to claim 1, wherein the video list further includes a latest timestamp of the video information received by the access server, the video stream list further includes a latest timestamp of the video stream information transmitted, and the video stream processing method further includes:
acquiring the latest timestamp of the video information in the video list, which is consistent with the acquired video information, aiming at the video information in the video list, which is consistent with the acquired video information;
for each piece of video information which is consistent with the acquired video information in the video list, judging whether the absolute value of the difference value between the latest timestamp of the video information which is consistent with the video information and the current timestamp is greater than a set time difference threshold value or not, and if so, determining that the video information is a video stream which needs to be processed;
acquiring the latest timestamp of each piece of video stream information in the video stream list, which is consistent with the video stream recorded by the central management server, aiming at the video stream information in the video stream list, which is consistent with the video stream recorded by the central management server;
and judging whether the absolute value of the difference value between the latest timestamp of the video stream information and the current timestamp of the video stream information is greater than a set time difference threshold value or not aiming at each piece of video stream information which is consistent with the video stream recorded by the central management server in the video stream list, and if so, determining that the video stream information is the video stream needing to be processed.
5. The video stream processing method according to claim 1 or 4, wherein said recovering the resources occupied by the video stream to be processed comprises:
if the video stream to be processed is video information, disconnecting the front-end equipment corresponding to the video information from the access server, clearing the video information stored by the access server, and clearing the video stream information corresponding to the video information stored in the streaming media server;
if the video stream to be processed is the video stream information, the connection between the streaming media server corresponding to the video stream information and the user side is disconnected, and the video stream information stored by the streaming media server is removed.
6. The video stream processing method according to claim 3, wherein after receiving the video stream acquisition request sent by the user side, the video stream processing method further comprises:
and when the number of the video streams is determined to reach the set threshold, sending information for prompting that the number of the video streams reaches the set threshold to the user side, and refusing to provide the target video streams corresponding to the video stream acquisition requests to the user side.
7. A video stream processing apparatus residing in a central management server in a video stream monitoring system, the video stream monitoring system further comprising: the device comprises an access server and a streaming media server which are respectively connected with a central management server, a front-end device connected with the access server, and a user side connected with the streaming media server, wherein the front-end device transmits video streams to the user side through the access server and the streaming media server, the central management server records the video streams which are transmitted to the user side and do not receive a video stream closing request sent by the user side, and the video stream processing device comprises:
the acquisition module is used for acquiring a video list recorded by the access server according to a set time interval; and acquiring a video stream list recorded by the streaming media server;
the judging module is used for judging whether the video stream needing to be processed exists or not based on the video list, the video stream list and the video stream recorded by the central management server;
the recovery module is used for recovering resources occupied by the video stream to be processed if the video stream to be processed exists;
the video list comprises video information received by the access server, the video stream list comprises video stream information sent by the streaming media server, the video information corresponds to one or more video stream information, and the judging module is used for judging whether video streams needing to be processed exist according to the following modes:
judging whether the video stream list has inconsistent video stream information with the video stream recorded by the central management server, if so, determining that the video stream needing to be processed exists, wherein the video stream needing to be processed is the inconsistent video stream information; and the number of the first and second groups,
acquiring video information corresponding to the video stream recorded by the central management server;
and judging whether the video list and the acquired video information have inconsistent video information, if so, determining that a video stream needing to be processed exists, wherein the video stream needing to be processed is the inconsistent video information.
8. An electronic device, comprising: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating via the bus when the electronic device is operating, the processor executing the machine-readable instructions to perform the steps of the video stream processing method according to any one of claims 1 to 6.
9. A computer-readable storage medium, having stored thereon a computer program for performing, when executed by a processor, the steps of the video stream processing method according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910746077.6A CN110430208B (en) | 2019-08-13 | 2019-08-13 | Video stream processing method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910746077.6A CN110430208B (en) | 2019-08-13 | 2019-08-13 | Video stream processing method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110430208A CN110430208A (en) | 2019-11-08 |
CN110430208B true CN110430208B (en) | 2022-02-18 |
Family
ID=68416038
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910746077.6A Active CN110430208B (en) | 2019-08-13 | 2019-08-13 | Video stream processing method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110430208B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111586066B (en) * | 2020-05-12 | 2022-08-12 | 上海依图网络科技有限公司 | Method and device for encrypting multimedia data |
CN114007036A (en) * | 2021-12-29 | 2022-02-01 | 广东睿江云计算股份有限公司 | Communication method and communication system for loading media stream on demand |
Family Cites Families (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7626950B2 (en) * | 2004-08-18 | 2009-12-01 | At&T Intellectual Property, I,L.P. | SIP-based session control among a plurality of multimedia devices |
CN101068341B (en) * | 2007-06-01 | 2010-08-04 | 中兴通讯股份有限公司 | Stream media dispatching system and medium file scheduling method thereof |
US7895629B1 (en) * | 2007-11-07 | 2011-02-22 | At&T Mobility Ii Llc | Video service buffer management in a mobile rate control enabled network |
CN101997872B (en) * | 2010-10-21 | 2014-08-13 | 中兴通讯股份有限公司 | Method for reducing transmit jitter of code streams of streaming media and streaming media server |
CN102231863B (en) * | 2011-06-02 | 2013-03-27 | 南京中兴力维软件有限公司 | Transmission method of multichannel video streams and system thereof |
CN103096030B (en) * | 2011-11-03 | 2016-05-25 | 中国移动通信集团江苏有限公司 | A kind of video monitoring multi-service fusion platform and solution |
CN105898434A (en) * | 2014-11-19 | 2016-08-24 | 北京航天长峰科技工业集团有限公司 | Different-security-level network information exchange system |
CN106162219B (en) * | 2015-04-21 | 2019-08-16 | 杭州海康威视系统技术有限公司 | Video cloud storage method and system |
CN105872002A (en) * | 2015-12-22 | 2016-08-17 | 乐视云计算有限公司 | Video program obtaining method and system, and device |
TWI679886B (en) * | 2017-12-18 | 2019-12-11 | 大猩猩科技股份有限公司 | A system and method of image analyses |
CN108184142B (en) * | 2017-12-29 | 2019-12-10 | 深圳中兴网信科技有限公司 | Video stream validity checking method and video stream validity checking system |
CN109525460B (en) * | 2018-11-26 | 2020-10-13 | 视联动力信息技术股份有限公司 | Method and device for monitoring number resources of video network |
-
2019
- 2019-08-13 CN CN201910746077.6A patent/CN110430208B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN110430208A (en) | 2019-11-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113905005B (en) | Method and device for updating client state of instant messaging | |
CN111831514A (en) | Equipment monitoring method, device, equipment and storage medium | |
CN110430208B (en) | Video stream processing method and device, electronic equipment and storage medium | |
CN112714359B (en) | Video recommendation method and device, computer equipment and storage medium | |
CN111190962B (en) | File synchronization method and device and local terminal | |
CN107315825A (en) | A kind of index upgrade system, method and device | |
CN110737545B (en) | Data processing method and device, electronic equipment and storage medium | |
CN111262822B (en) | File storage method, device, block link point and system | |
CN108958883B (en) | Recovery method and system for virtual machine in cloud computing cluster | |
CN111818025B (en) | User terminal detection method and device | |
CN110737565B (en) | Data monitoring method and device, electronic equipment and storage medium | |
CN112153132A (en) | File uploading method, device and equipment based on virtualization management platform | |
CN115955332A (en) | Abnormal traffic filtering method and device for authentication system and electronic equipment | |
CN108509296B (en) | Method and system for processing equipment fault | |
CN113900842A (en) | Message consumption method and device, electronic equipment and computer storage medium | |
CN112218175A (en) | Processing method and device for live broadcast room state and computing equipment | |
CN112948020B (en) | Configuration file processing method and device | |
CN113821414B (en) | Server protection method and device, electronic equipment and storage medium | |
CN110928945B (en) | Data processing method and device for database and data processing system | |
CN114422576B (en) | Session cleaning method and device, computer equipment and readable storage medium | |
CN110333968B (en) | Data management method and device applied to database and computer equipment | |
CN113326141A (en) | Memory management method and device for block chain nodes | |
CN112804108B (en) | Signaling execution method and device, electronic equipment and machine-readable storage medium | |
CN114490516A (en) | File system processing method, recycle bin management method, device and equipment | |
CN114281769A (en) | Method and device for managing files on disk, computer equipment and storage medium |
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 |