Disclosure of Invention
The invention provides a data transmission method and equipment based on screen saver, which are used for reducing the forwarding pressure of equipment such as a DM server, an MS server and the like.
In order to achieve the above object, the present invention provides a data transmission method based on screen saver, which is applied in a monitoring system comprising a video management VM server, a video client VC, and a data forwarding device, and in the process of sending data to the VC by the data forwarding device, the method comprises the following steps:
the VM server acquires the current screen protection state of the VC, wherein the screen protection state is in a screen protection state or not in the screen protection state;
and when the current screen protection state of the VC is in the screen protection state, the VM server informs the data forwarding equipment to stop sending data to the VC.
The method for acquiring the current screen protection state of the VC by the VM server specifically comprises the following steps:
when the VC monitors that the VC is changed from a state of not being in a screen protection state to a state of being in the screen protection state, the VC informs the VM server of the information of the current screen protection state, and the VM server determines that the current screen protection state of the VC is in the screen protection state; when the VC monitors that the VC is changed from the screen protection state to the screen protection state, the VC notifies the VM server of the information that the VC is not in the screen protection state currently, and the VM server determines that the current screen protection state of the VC is not in the screen protection state; or,
the VM server inquires whether the VC is currently in a screen protection state according to a preset period, and determines that the current screen protection state of the VC is in the screen protection state when the inquiry result shows that the VC is currently in the screen protection state; and when the query result indicates that the VC is not in the screen protection state currently, determining that the current screen protection state of the VC is not in the screen protection state currently.
The method further comprises: and the VC monitors the change condition of the current screen protection state through a preset monitoring program, and monitors that the VC changes from the screen protection state not in the screen protection state to the screen protection state, or monitors that the VC changes from the screen protection state to the screen protection state not in the screen protection state.
The data forwarding equipment is a Media Switching (MS) server or a Data Management (DM) server; the VM server notifies the data forwarding device to stop sending data to the VC, and then further includes:
when the data forwarding equipment is an MS server, after receiving the data sent to the VC, the MS server discards the data sent to the VC to stop sending the data to the VC;
and when the data forwarding equipment is a DM server, the DM server stops acquiring the data sent to the VC so as to stop sending the data to the VC.
The data forwarding equipment is an MS server or a DM server; the VM server notifies the data forwarding device to stop sending data to the VC, and then further includes:
when the data forwarding device is an MS server, after the VM server determines that the current screen protection state of the VC is not in the screen protection state, the VM server informs the MS server to continue to send data to the VC, and after the MS server receives the data sent to the VC, the MS server sends the received data to the VC;
when the data forwarding device is a DM server, after the VM server determines that the current screen protection state of the VC is not in the screen protection state, the VM server informs the DM server to continue to send data to the VC, the DM server reacquires the data sent to the VC, and sends the acquired data to the VC.
When the data forwarding device is a DM server, the VM server notifies the data forwarding device to stop sending data to the VC, and then the method further includes:
after the VC monitors that the VC is changed from the screen protection state to the non-screen protection state, the VC acquires a time period t in the screen protection state and a time point s of data played back before the screen protection state, and notifies the VM server of information of the time period t and the time point s;
and the VM server informs the DM server to continuously send the data corresponding to the time period t and the time point s to the VC, and the DM server reacquires the data sent to the VC from the data corresponding to the time point s plus the time period t and sends the acquired data to the VC.
A video management VM server is applied to a monitoring system comprising the VM server, a video client VC and a data forwarding device, and in the process of sending data to the VC by the data forwarding device, the VM server comprises:
an obtaining module, configured to obtain a current screen protection state of the VC, where the screen protection state is a screen protection state or is not a screen protection state;
and the communication module is used for informing the data forwarding equipment to stop sending data to the VC when the current screen protection state of the VC is in the screen protection state.
The acquisition module is specifically configured to receive information that is notified by the VC and currently in a screen saver state when the VC monitors that the VC changes from a screen saver state to a screen saver state, and determine that the current screen saver state of the VC is in the screen saver state; when the VC monitors that the VC is changed from the screen protection state to the screen protection state, receiving information which is notified by the VC and is not in the screen protection state currently, and determining that the current screen protection state of the VC is not in the screen protection state currently; or,
inquiring whether the VC is currently in a screen protection state according to a preset period, and determining that the current screen protection state of the VC is in the screen protection state when the inquiry result shows that the VC is currently in the screen protection state; and when the query result indicates that the VC is not in the screen protection state currently, determining that the current screen protection state of the VC is not in the screen protection state currently.
The data forwarding equipment is an MS server or a DM server;
the communication module is further configured to, after notifying the MS server to stop sending data to the VC and determining that the current screen saver state of the VC is not in the screen saver state, notify the MS server to continue sending data to the VC, and after receiving the data sent to the VC, the MS server sends the received data to the VC;
after informing the DM server to stop sending data to the VC, after determining that the current screen protection state of the VC is not in the screen protection state, informing the DM server to continue sending data to the VC, and reacquiring the data sent to the VC by the DM server and sending the acquired data to the VC.
When the data forwarding device is a DM server;
the communication module is further configured to receive a time period t in the screen saver state acquired by the VC notified by the VC and a time point s of data played back before the VC is in the screen saver state after the VC monitors that the VC changes from being in the screen saver state to not being in the screen saver state after notifying the DM server to stop sending data to the VC;
and informing the DM server to continuously send the data corresponding to the time period t and the time point s to the VC, starting from the data corresponding to the time point s plus the time period t by the DM server, reacquiring the data sent to the VC, and sending the acquired data to the VC.
A video client VC is applied to a monitoring system comprising a video management VM server, the VC and a data forwarding device, and in the process of sending data to the VC by the data forwarding device, the VC comprises:
the monitoring module is used for monitoring the current screen protection state of the monitoring module, wherein the screen protection state is in a screen protection state or not in the screen protection state;
the communication module is used for notifying the VM server of the information in the current screen protection state when the state that the VC is not in the screen protection state is changed into the screen protection state by monitoring, and the VM server determines that the current screen protection state of the VC is in the screen protection state;
when the state of the VC is monitored to be changed from the screen protection state to the screen protection state, the VM server is informed of the information which is not in the screen protection state, and the VM server determines that the current screen protection state of the VC is not in the screen protection state.
The monitoring module is specifically configured to monitor a change condition of a current screen protection state through a preset monitoring program, and monitor that the current screen protection state changes from a non-screen protection state to a screen protection state, or monitor that the current screen protection state changes from the screen protection state to the non-screen protection state.
The monitoring module is further used for acquiring a time period t in the screen protection state and a time point s of data played back before the screen protection state after the monitoring module monitors that the monitoring module changes from the screen protection state to the non-screen protection state;
the notification module is further configured to notify the VM server of information of a time period t and a time point s.
Compared with the prior art, the invention has at least the following advantages: in a live flow (namely, the VC checks live data) or a playback flow (namely, the VC checks recorded data), when the screen protection state of the VC is in the screen protection state, the VM server informs the MS server or the DM server to stop sending data to the VC, so that the forwarding pressure of devices such as the DM server and the MS server is reduced.
Detailed Description
The invention provides a data transmission method based on screen protection, which is applied to a monitoring system comprising a VM (virtual machine) server, a VC (virtual machine) and data forwarding equipment, wherein in a live process (namely the VC checks live data), the data forwarding equipment is an MS (Mobile station) server, namely the MS server sends data (namely the live data) to the VC; in the playback flow (i.e., the VC views the video data), the data forwarding device is a DM server, i.e., the DM server sends data (i.e., the video data) to the VC.
In the process of sending data to the VC by the data forwarding device (i.e. in the live process, the MS server has sent data to the VC; or in the playback process, the DM server has sent data to the VC), as shown in fig. 2, the data transmission method based on screen saver provided by the present invention includes the following steps:
in step 201, the VM server obtains a current screen saver state of the VC, where the screen saver state is in a screen saver state (i.e., a screen saver enabled state) or not in the screen saver state (i.e., a screen saver disabled state).
The method for acquiring the current screen protection state of the VC by the VM server specifically comprises the following steps:
when the VC monitors that the VC is changed from the state of not being in the screen protection state to the state of being in the screen protection state, the VC (related functions can be realized by XP on the VC) informs the VM server of the information currently in the screen protection state, and the VM server determines that the current screen protection state of the VC is in the screen protection state.
When the VC monitors that the VC is changed from the screen protection state to the screen protection state, the VC informs the VM server of the information that the VC is not in the screen protection state currently, and the VM server determines that the current screen protection state of the VC is not in the screen protection state.
In the invention, a preset monitoring program (which can be realized by installing a corresponding plug-in when video monitoring software is installed) for monitoring the screen protection process can be installed on the VC, and the change condition of the current screen protection state is monitored by the preset monitoring program; after the VC is changed from the state of not being in the screen protection state to the state of being in the screen protection state, the VC can monitor the change condition through a preset monitoring program, so that the VC can monitor that the VC is changed from the state of not being in the screen protection state to the state of being in the screen protection state; after the VC is changed from the screen protection state to the non-screen protection state at present, the VC can monitor the change condition through a preset monitoring program, so that the VC can monitor that the VC is changed from the screen protection state to the non-screen protection state.
It should be noted that the VC may notify the VM server of information that it is currently in the screen saver state or information that it is not currently in the screen saver state through an HTTP (Hyper Text Transfer Protocol) message.
In practical application, since there may be multiple use panes on the VC, and different data is received and displayed through different use panes, the VC may also carry information of all use panes of itself in the HTTP message, and notify the data forwarding device to stop sending data corresponding to all use panes in a subsequent process.
The second mode is that the VM server queries whether the VC is currently in the screen protection state according to a preset period (the preset period may be selected according to actual experience, for example, 10 minutes), and determines that the current screen protection state of the VC is in the screen protection state when the query result is that the VC is currently in the screen protection state (that is, the VC responds that the VC is currently in the screen protection state); and when the query result is that the VC is not in the screen protection state currently (namely the VC responds that the VC is not in the screen protection state currently), determining that the current screen protection state of the VC is not in the screen protection state.
It should be noted that the VM server may periodically query whether the VC is currently in the screen saver state through an SIP (Session Initiation Protocol) message, and when the VC is currently in the screen saver state, may respond to a result that the VC is currently in the screen saver state; and when the VC is not in the screen protection state currently, responding to the VC not in the screen protection state currently.
Step 202, when the current screen protection state of the VC is in the screen protection state, the VM server notifies the data forwarding device to stop sending data to the VC.
In the invention, in a live flow, the data forwarding equipment is an MS server, and a VM server can inform the MS server of stopping sending data to a VC by using an MAI message; after that, after receiving the data sent to the VC (i.e., the data sent to the VC by the EC through the MS server), the MS server directly discards the data sent to the VC to stop sending the data to the VC, i.e., the MS server only receives the data sent to the VC, but does not forward the data to the VC.
Further, after the VM server determines that the current screen protection state of the VC changes from being in the screen protection state to not being in the screen protection state (which can be known in two ways in step 201), the VM server needs to notify the MS server to continue sending data to the VC, and then the MS server can directly send the received data to the VC after receiving the data sent to the VC (i.e., the data sent by the EC to the VC through the MS server).
It should be noted that when the VM server notifies the MS server to stop sending data to the VC, the EC does not stop sending data to the MS server, but the MS server does not forward the data to the VC; therefore, when data needs to be continuously transmitted to the VC, the MS server can directly transmit the data from the EC to the VC without the process of reestablishing the negotiation and the like of live data.
In the playback process, the data forwarding device is a DM server, and a VM server can inform the DM server to stop sending data to a VC by using an RTSP (Real Time Streaming Protocol) message; thereafter, the DM server will stop acquiring data sent to the VC (i.e., the DM server is not reading data sent to the VC from the storage device) to stop sending data to the VC, i.e., the DM server does not acquire data sent to the VC and does not send data to the VC.
Further, after the VM server determines that the current screen protection state of the VC changes from being in the screen protection state to not being in the screen protection state (which can be known through two manners of step 201), the VM server needs to notify the DM server to continue sending data to the VC (which can be realized through play message of RTSP), and then the DM server re-acquires the data that needs to be sent to the VC (that is, the DM server reads the data that needs to be sent to the VC from the storage device), and sends the acquired data to the VC.
Because the time information of the played back video data needs to be known in the playback process, the method of the invention can further comprise the following steps: after the VC monitors that the VC changes from the screen protection state to the non-screen protection state, the VC needs to acquire a time period t when the VC is in the screen protection state (the time period t when the VC is in the screen protection state is recorded by starting a timer) and a time point s of data played back before the VC is in the screen protection state (namely the time point s is requested by a user before); then, the VC informs the VM server of the information of the time period t and the time point s; and the VM server informs the DM server to continuously send the data corresponding to the time period t and the time point s to the VC, and the DM server reacquires the data sent to the VC from the time point s plus the data corresponding to the time period t (namely, the playback time is the time period t + the time point s) and sends the acquired data to the VC.
For example, when the time point s of playing back data before the screen saver state is 2011.10.10.08.10.10 and the time period t in the screen saver state is 30s, the DM server needs to retrieve data transmitted to the VC from the data corresponding to 2011.10.10.08.10.40.
It should be noted that the VM server may notify the DM server to continue to send data corresponding to the time period t and the time point s to the VC through the play message of the RTSP, and the VM server only needs to add the sum of the time period t and the time point s (which is the time for starting playing) to the clock field of the play message.
Based on the same inventive concept as the above method, the present invention further provides a video management VM server, which is applied in a monitoring system including the VM server, a video client VC, and a data forwarding device, and in a process that the data forwarding device sends data to the VC, as shown in fig. 3, the VM server includes:
an obtaining module 11, configured to obtain a current screen protection state of the VC, where the screen protection state is a screen protection state or is not a screen protection state;
and the communication module 12 is configured to notify the data forwarding device to stop sending data to the VC when the current screen saver state of the VC is in a screen saver state.
The acquiring module 11 is specifically configured to receive information that is notified by the VC and currently in a screen saver state when the VC monitors that the VC changes from a screen saver state to a screen saver state, and determine that the current screen saver state of the VC is in the screen saver state; when the VC monitors that the VC is changed from the screen protection state to the screen protection state, receiving information which is notified by the VC and is not in the screen protection state currently, and determining that the current screen protection state of the VC is not in the screen protection state currently; or,
inquiring whether the VC is currently in a screen protection state according to a preset period, and determining that the current screen protection state of the VC is in the screen protection state when the inquiry result shows that the VC is currently in the screen protection state; and when the query result indicates that the VC is not in the screen protection state currently, determining that the current screen protection state of the VC is not in the screen protection state currently.
The data forwarding equipment is an MS server or a DM server;
the communication module 12 is further configured to, after notifying the MS server to stop sending data to the VC and determining that the current screen saver state of the VC is not in the screen saver state, notify the MS server to continue sending data to the VC, and after receiving the data sent to the VC, the MS server sends the received data to the VC;
after informing the DM server to stop sending data to the VC, after determining that the current screen protection state of the VC is not in the screen protection state, informing the DM server to continue sending data to the VC, and reacquiring the data sent to the VC by the DM server and sending the acquired data to the VC.
When the data forwarding device is a DM server;
the communication module 12 is further configured to receive, after notifying the DM server to stop sending data to the VC and after the VC monitors that the VC changes from being in the screen saver state to not being in the screen saver state, a time period t in the screen saver state acquired by the VC notified by the VC, and a time point s of data played back before being in the screen saver state;
and informing the DM server to continuously send the data corresponding to the time period t and the time point s to the VC, starting from the data corresponding to the time point s plus the time period t by the DM server, reacquiring the data sent to the VC, and sending the acquired data to the VC.
The modules of the device can be integrated into a whole or can be separately deployed. The modules can be combined into one module, and can also be further split into a plurality of sub-modules.
Based on the same inventive concept as the above method, the present invention further provides a video client VC, which is applied in a monitoring system including a video management VM server, the VC, and a data forwarding device, and in a process of sending data to the VC by the data forwarding device, as shown in fig. 4, the VC includes:
the monitoring module 21 is configured to monitor a current screen protection state of the monitoring module, where the screen protection state is a screen protection state or a screen protection state not being in the screen protection state;
the communication module 22 is configured to notify the VM server of information currently in the screen protection state when it is monitored that the current screen protection state of the VM changes from the screen protection state not in the screen protection state to the screen protection state, and the VM server determines that the current screen protection state of the VC is in the screen protection state;
when the state of the VC is monitored to be changed from the screen protection state to the screen protection state, the VM server is informed of the information which is not in the screen protection state, and the VM server determines that the current screen protection state of the VC is not in the screen protection state.
The monitoring module 21 is specifically configured to monitor a change condition of a current screen protection state through a preset monitoring program, and monitor that the current screen protection state changes from a non-screen protection state to a screen protection state, or monitor that the current screen protection state changes from the screen protection state to the non-screen protection state.
The monitoring module 21 is further configured to obtain a time period t in the screen saver state and a time point s of data played back before the screen saver state after monitoring that the self is changed from the screen saver state to the screen saver state;
the notifying module 22 is further configured to notify the VM server of information of the time period t and the time point s.
The modules of the device can be integrated into a whole or can be separately deployed. The modules can be combined into one module, and can also be further split into a plurality of sub-modules.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present invention may be implemented by hardware, or by software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments of the present invention.
Those skilled in the art will appreciate that the drawings are merely schematic representations of one preferred embodiment and that the blocks or flow diagrams in the drawings are not necessarily required to practice the present invention.
Those skilled in the art will appreciate that the modules in the devices in the embodiments may be distributed in the devices in the embodiments according to the description of the embodiments, and may be correspondingly changed in one or more devices different from the embodiments. The modules of the above embodiments may be combined into one module, or further split into multiple sub-modules.
The above-mentioned serial numbers of the present invention are for description only and do not represent the merits of the embodiments.
The above disclosure is only for a few specific embodiments of the present invention, but the present invention is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present invention.