Disclosed is a video switching method, a device, and a video patrol system. The method comprises: receiving a video switching instruction to determine a display device corresponding to a to-be-played video; determining whether there is a currently played video in the determined display device; if so, determining a task identifier corresponding to the currently played video; closing the currently played video according to the task identifier; and sending the video to be played to the display device for playing. When the video played in the display device needs to be switched, the task identifier corresponding to the currently played video in the display device is determined first, and the video is closed according to the task identifier. Then, the to-be-played video is sent to the display device for playing. This shows that the currently played video is normally shutdown, thereby avoiding an unknown error caused by abnormal closing of the video.
Legal claims defining the scope of protection, as filed with the USPTO.
1. A video switching method, comprising: receiving a video switching instruction, and determining a display device corresponding to a to-be-played video; determining whether the determined display device is currently playing a video; if so, determining a task identifier corresponding to the currently played video; stopping playing of the currently played video according to the task identifier; and sending the to-be-played video to the display device for playing, wherein determining a task identifier corresponding to the currently played video comprises: obtaining a correspondence between the currently played video and a thread number of a thread occupied by the currently played video; determining a thread occupied by the currently played video according to the obtained correspondence; and wherein stopping playing of the currently played video according to the task identifier comprises: sending a release resource instruction for the determined thread, so that the thread releases resources occupied by the currently played video; and wherein when at least two video switching instructions are received simultaneously, determining a display device corresponding to the to-be-played video comprises: determining respectively display devices corresponding to the at least two video switching instructions; determining whether there is an identical display device corresponding to more than one display devices; if so, determining priorities of first video switching instructions corresponding to the identical display device, and determining the identical display device as the display device corresponding to a first video switching instruction with the highest priority.
2. The method of claim 1 , wherein determining a display device corresponding to a to-be-played video comprises: parsing the video switching instruction so as to acquire an identifier of a display device included in the video switching instruction; and determining the display device corresponding to the acquired identifier as the display device corresponding to the to-be-played video.
3. The method of claim 1 , wherein after sending the to-be-played video to the display device for playing, the method further comprises: recording a correspondence between the to-be-played video and the display device; and wherein determining whether the determined display device is currently playing a video comprises: determining whether the determined display device is currently playing a video by searching in the recorded correspondences for a correspondence between the video and the display device, wherein existence of the correspondence between the video and the display device indicates that the determined display device is currently playing the video.
4. The method of claim 1 , further comprising: if it is determined that the determined display device currently is not playing a video, performing the step of sending the to-be-played video to the display device for playing.
5. A video switching apparatus, comprising: a receiving determining module, configured for receiving a video switching instruction, and determining a display device corresponding to a to-be-played video; a judging module, configured for determining whether the determined display device is currently playing a video; a determining module, configured for determining a task identifier corresponding to the currently played video when a result of the judging module is YES; a stopping module, configured for stopping playing of the currently played video according to the task identifier; and; a sending module, configured for sending the to-be-played video to the display device for playing, wherein the determining module is further configured for: when a result of the judging module is yes, obtaining a correspondence between the currently played video and a thread number of a thread occupied by the currently played video, and determining a thread occupied by the currently played video according to the obtained correspondence; and wherein the stopping module is further configured for: sending a release resource instruction for the determined thread, so that the thread releases resources occupied by the currently played video, wherein the receiving determining module is further configured for: determining, when at least two video switching instructions are received simultaneously, respectively display devices corresponding to the at least two video switching instructions; determining whether there is an identical display device corresponding to more than one display devices; if so, determining priorities of first video switching instructions corresponding to the identical display device, and determining the identical display device as the display device corresponding to a first video switching instruction with the highest priority.
6. The apparatus of claim 5 , wherein the receiving determining module is further configured for: receiving the video switching instruction, parsing the video switching instruction so as to acquire an identifier of a display device included in the video switching instruction; and determining the display device corresponding to the acquired identifier as the display device corresponding to the to-be-played video.
7. The apparatus of claim 5 , further comprising: a recording module, configured for recording a correspondence between the to-be-played video and the display device; and wherein the judging module is further configured for: determining whether the determined display device is currently playing a video by searching in the recorded correspondences for a correspondence between the video and the display device, wherein existence of the correspondence between the video and the display device indicates that the determined display device is currently playing the video.
8. The apparatus of claim 5 , wherein the sending module is triggered in responding to a negative result from the judging module.
9. A video patrol system, comprising: a server and a display device, wherein, the server is configured for receiving a video switching instruction, and determining a display device corresponding to a to-be-played video; determining whether the determined display device is currently playing a video; if so, determining a task identifier corresponding to the currently played video; stopping playing of the currently played video according to the task identifier; and sending the to-be-played video to the display device for playing, wherein determining a task identifier corresponding to the currently played video comprises: obtaining a correspondence between the currently played video and a thread number of a thread occupied by the currently played video; determining a thread occupied by the currently played video according to the obtained correspondence; and wherein stopping playing of the currently played video according to the task identifier comprises: sending a release resource instruction for the determined thread, so that the thread releases resources occupied by the currently played video; and wherein when at least two video switching instructions are received simultaneously, determining a display device corresponding to the to-be-played video comprises: determining respectively display devices corresponding to the at least two video switching instructions; determining whether there is an identical display device corresponding to more than one display devices; if so, determining priorities of first video switching instructions corresponding to the identical display device, and determining the identical display device as the display device corresponding to a first video switching instruction with the highest priority; the display device is configured for receiving and playing the video send by the server.
10. The system of claim 9 , wherein the video patrol system comprises at least two servers and at least two display devices.
11. An electronic device, comprising: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus; the memory is used for storing a computer program; the processor is configured for implementing the video switching method of claim 1 when executing the program stored on the memory.
12. A non-transitory storage medium, which is configured for storing executable program codes, wherein, the executable program codes are configured for implementing the video switching method of claim 1 when being executed.
Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.
August 28, 2017
March 9, 2021
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.