Distributed video playing method and system based on B / S structure
By establishing the association relationship between video information and video recording equipment, the user's access request is directly sent to the video recording equipment, solving the problem of server bandwidth bottleneck in the prior art, and realizing the diversion of video traffic and bandwidth saving.
Patent Information
- Application Number
- CN202510209469.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-25
- Publication Date
- 2025-05-23
AI Technical Summary
In the existing distributed video playback method based on B/S structure, video resources are stored uniformly on the server platform, resulting in a large bottleneck in server bandwidth when there are more people previewing.
By receiving the video information reported by the video recording device, establishing the association relationship between the video information and the video recording device, and when the user sends an access request, obtaining the communication information of the target video recording device, and sending the access request directly to the video recording device, so as to realize that the video traffic is not transmitted through the server.
Effectively divert video traffic browsed by different users, save video bandwidth, reduce the pressure on the server, and provide timely preview services.
Smart Images

Figure CN120034665A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of video processing, and more specifically, to a distributed video playing method and system based on a B / S structure. Background Art
[0002] With the in-depth development of Internet technology, the application of streaming media technology is becoming more and more popular, such as distance education, video conferencing, Internet live broadcast, etc. However, the transmission of streaming media is inseparable from the carrier of the protocol. Figure 1 As shown in the figure, after all video recording devices in the current recording and broadcasting system complete video recording, they upload the recorded video resources to the server, and the server can provide a web service with a B / S architecture. Users preview the video resources collected by the recording device through a browser. In the prior art, video resources are uniformly stored on the server platform, and all users' preview traffic for recorded resources is distributed through the server. The server provides services uniformly. When there are many people previewing, the server bandwidth will have a large bottleneck. Summary of the invention
[0003] In view of this, the present invention provides a distributed video playback method based on a B / S structure, which is used to solve the problem that the existing distributed video playback method based on a B / S structure is performed uniformly by a server.
[0004] To achieve the above objectives, the proposed solution is as follows: A distributed video playback method based on a B / S structure, applied to a server, includes: Receive video information of stored videos reported by each video recording device, and establish an association relationship between each video information and the video recording device; Obtaining the access request of the target video sent by the user; Acquire communication information of a target video recording device corresponding to the target video based on the association relationship; An access request is sent to a target video recording device so that the target video recording device sends the target video to a user end.
[0005] Preferably, before obtaining the access request for the target video sent by the user terminal, the method further includes: The association relationship is stored in a database or text form.
[0006] Preferably, before obtaining the access request for the target video sent by the user terminal, the method further includes: The stored video information and association relationships are displayed for users to view through the user terminal.
[0007] Preferably, the communication information includes: The IP address or WebRtc communication information of the video recording device.
[0008] A distributed video playback system based on a B / S structure, the system comprising a user end, a video recording device and a server end, wherein the server end implements the aforementioned distributed video playback method based on a B / S structure; The client terminal allows users to view video information and related information on the server terminal and send access requests to the target video to the server terminal; The video recording device is used to send video information of the stored video to the server, and send the target video to the user.
[0009] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects: The distributed video playback method based on B / S structure provided by the present invention comprises the following steps: a server receives video information of stored videos reported by each video recording device, and establishes an association relationship between each video information and the video recording device; obtains an access request for a target video sent by a user terminal; obtains communication information of a target video recording device corresponding to the target video based on the association relationship; and sends the access request to the target video recording device so that the target video recording device can send the target video to the user terminal. The videos in the present invention are distributedly stored in each video recording device, so that the video traffic does not pass through the server terminal, which can save video traffic. When different users browse videos on different video recording devices, the traffic can be effectively diverted, and the preview service can be provided in a timely manner while saving bandwidth. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0011] Figure 1 It is a structural diagram of the existing recording and broadcasting system; Figure 2 A flow chart of a distributed video playback method based on a B / S structure provided by an embodiment of the present invention; Figure 3 A signaling flow chart of a distributed video playback method based on a B / S structure provided in an embodiment of the present invention; Figure 4 A flow chart of another distributed video playback method based on a B / S structure provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0012] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0013] First, combine Figure 3 The embodiment of the present invention provides a distributed video playback system based on a B / S structure. The video playback system is based on a B / S structure (Browser / Server) and provides services to users through the Web. Figure 3 As shown, the system includes: a server 100, a video recording device 200 and a user terminal 300.
[0014] The user end 300 allows the user to view the video information and associated information on the server end 100 , and sends an access request for a target video to the server end 100 .
[0015] The video recording device 200 is used to send video information of the stored video to the server 100 , and to send the target video to the user end 300 .
[0016] Specifically, the video recording device 200 is composed of a series of devices, each of which stores a video. After recording a video, the recording device no longer uploads the video to the server 100, but stores the video by itself and uploads the video information of the video to the server 100. By uploading the video information to the server, the server 100 is notified that the video exists on the video recording device.
[0017] The user can enter the server address and access the server through the user terminal 300. The server 100 can establish an association relationship between each video information and the video recording device 200; and obtain the communication information of the target video recording device 200 corresponding to the target video based on the association relationship, and send an access request to the target video recording device, so that the target video recording device 200 can send the target video to the user terminal 300.
[0018] The client 300 allows the user to view the video information and associated information on the server 100, and sends an access request for a target video to the server 100. When the user accesses a video through the client 300, the server 100 returns the associated information and video information to the client 300 via the Web.
[0019] The server 100 may be a service device disposed on the network side. The server 100 exchanges data with the video recording device 200 and the user terminal 300 through the network. The server 100 may be implemented as a single server or as a server cluster consisting of multiple servers.
[0020] Next, combine Figure 2 The embodiment of the present invention introduces a distributed video playback method based on a B / S structure from the perspective of a server. Figure 2 As shown, including: Step S01: receiving video information of stored videos reported by each video recording device, and establishing an association relationship between each video information and the video recording device.
[0021] Specifically, after the video recording device 200 completes recording, it stores the recorded video by itself. The video recording system does not need to upload the video to the server 100, but only needs to upload the video information of the video to the server 100. The server 100 establishes a connection between the video information and the corresponding video recording device according to the video information of the video and the video recording device 300 to obtain an association relationship. The video information includes the video file name, device IP address, etc.
[0022] Examples include Figure 4 After the video recording device completes recording, it reports the video information of the corresponding videos Video1, Video2 and Video3 to the server. For example, a video Video 1 is stored on the video recording device. The video recording device sends the video information of Video 1 to the server through the interface to notify the server that Video1 is stored in the video recording device. The server 100 records the association between the video recording device and Video1 through a database or text file. The interface can be a network communication interface such as http, rpc, mqtt, etc.
[0023] The server 100 provides a Web server with a B / S architecture and a unified portal, and users access the server through the user terminal.
[0024] Step S02: obtaining an access request for a target video sent by a user terminal.
[0025] Specifically, when a user accesses a video through the client 300, the server 100 returns relevant information to the client 300 through the Web, wherein the information sent includes the associated information of the video information and the video recording device. Figure 4As shown, the client browses videos Video1, Video2 and Video3 through the server. The server 100 registers ServiceWorker through Javascript to intercept the access request of the client 300 to Video1, and forwards the access request to the video recording device through http or WebRtc.
[0026] Step S03: acquiring communication information of a target video recording device corresponding to the target video based on the association relationship.
[0027] Specifically, the javascript of the client 300 initiates a request to the server 100 to obtain communication information related to the target video recording device. If the server 100 and the target video recording device are in the same network segment, the IP address of the target video recording device may be returned, or the relevant information of the WebRtc communication between the client 300 and the target video recording device may be returned.
[0028] Step S04: sending an access request to a target video recording device, so that the target video recording device can send the target video to the user end.
[0029] Specifically, the server 100 intercepts the access request of the client 300 to play the target video file by using ServiceWorker in Web JS, and sends the access request to the target video recording device 300, which directly returns the video data to the Web of the client 300. After receiving the video data, the client 300 can directly render it through the client 300. The Web service or WebRtc service of the target recording device provides the actual video stream to the client.
[0030] The video playback method provided by the embodiment of the present invention makes the user feel that the video resources are all provided by a Web service with a unified B / S architecture, but the actual resources are distributed and stored on various video recording devices, and the acquisition of video resources is directly transmitted between the user end and the video recording device, which can effectively reduce the video bandwidth bottleneck of the server end and alleviate the bandwidth pressure of the system.
[0031] Furthermore, the distributed video playback method based on the B / S structure of the embodiment of the present invention may further include, before obtaining the access request of the target video sent by the user terminal in step S02: The stored video information and association relationships are displayed for users to view through the user terminal.
[0032] Specifically, the client 300 accesses the server 100, and the server 100 displays the video and displays the video information of the video. At the same time, the Http Response carries the associated information of the video and the video recording device. The distributed video playback method based on B / S structure provided by the embodiment of the present invention comprises the following steps: the server receives the video information of the stored videos reported by each video recording device, and establishes the association relationship between each video information and the video recording device; obtains the access request of the target video sent by the user end; obtains the communication information of the target video recording device corresponding to the target video based on the association relationship; and sends the access request to the target video recording device so that the target video recording device can send the target video to the user end. The videos in the present invention are distributedly stored in each video recording device, so the video traffic does not pass through the server end, which can save video traffic. When different users browse videos on different video recording devices, the traffic can be effectively diverted, and the preview service can be provided in a timely manner while saving bandwidth.
[0033] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0034] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0035] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A distributed video playback method based on B / S structure, characterized in that: Applied to the server, including: Receive video information of stored videos reported by each video recording device, and establish an association relationship between each video information and the video recording device; Obtaining the access request of the target video sent by the user; Acquire communication information of a target video recording device corresponding to the target video based on the association relationship; An access request is sent to a target video recording device so that the target video recording device sends the target video to a user end.
2. The distributed video playback method based on B / S structure according to claim 1 is characterized in that: Before obtaining the access request for the target video sent by the user, the following is also included: The association relationship is stored in a database or text form.
3. The distributed video playback method based on B / S structure according to claim 1 is characterized in that: Before obtaining the access request for the target video sent by the user, the following is also included: The stored video information and association relationships are displayed for users to view through the user terminal.
4. The distributed video playback method based on B / S structure according to any one of claims 1 to 3, characterized in that: The communication information includes: The IP address or WebRtc communication information of the video recording device.
5. A distributed video playback system based on B / S structure, characterized in that: The system includes a user end, a video recording device and a server end, wherein the server end implements the distributed video playback method based on the B / S structure as described in any one of claims 1 to 4; The client terminal allows users to view video information and related information on the server terminal and send access requests to the target video to the server terminal; The video recording device is used to send video information of the stored video to the server, and send the target video to the user.
Citation Information
Patent Citations
Transformer substation video monitoring method using distributed storage and server unified management
CN105072415A
Method and system in support of multichannel broadcast of camera video data and Homed system
CN106998441A
Method and device for accessing camera
CN107888868A
Video playing method, video pushing method, device, and electronic equipment
CN114071242A
Video storage method and device based on key event identification, equipment and medium
CN114139015A