CN117596438A - Video stream processing system and method - Google Patents

Video stream processing system and method Download PDF

Info

Publication number
CN117596438A
CN117596438A CN202311556352.0A CN202311556352A CN117596438A CN 117596438 A CN117596438 A CN 117596438A CN 202311556352 A CN202311556352 A CN 202311556352A CN 117596438 A CN117596438 A CN 117596438A
Authority
CN
China
Prior art keywords
video
service module
module
information
slice
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.)
Pending
Application number
CN202311556352.0A
Other languages
Chinese (zh)
Inventor
林乔
赵武阳
陈瀚
李小龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Shengzhe Science & Technology Co ltd
Original Assignee
Beijing Shengzhe Science & Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Shengzhe Science & Technology Co ltd filed Critical Beijing Shengzhe Science & Technology Co ltd
Priority to CN202311556352.0A priority Critical patent/CN117596438A/en
Publication of CN117596438A publication Critical patent/CN117596438A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4334Recording operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47202End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for requesting content on demand, e.g. video on demand
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/632Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing using a connection between clients on a wide area network, e.g. setting up a peer-to-peer communication via Internet for retrieving video segments from the hard-disk of other client devices
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention discloses a video stream processing system and a video stream processing method. Comprising the following steps: the streaming media service module is connected with the rear end service module; the streaming media service module is used for acquiring the video stream, generating a video slice file according to the video stream when the legal condition of the video stream is confirmed to be legal, generating video slice file information and video m3u8 index information according to the video slice file, carrying out distributed storage on the video slice file information and the video m3u8 index information to generate a callback event, and sending the callback event to the back-end service module; and the back-end service module is used for receiving the callback event and storing the callback event to the appointed search engine. And the distributed storage is performed based on the S3 protocol, so that the waiting time of playing the streaming media at the client is reduced, the fluency of playing the streaming media is improved, the live broadcast, time-shifting review and on-demand functions are simultaneously supported on the premise of not changing the HLS protocol, and the user experience is improved.

Description

Video stream processing system and method
Technical Field
The present invention relates to the field of video processing technologies, and in particular, to a video stream processing system and method.
Background
With the continuous development of the internet, live broadcasting is more and more popular. HLS (HTTP Live Streaming, hypertext transfer protocol dynamic code rate adaptation) is used for audio and video services of PCs and mobile terminals as an indispensable technology for realizing live broadcasting.
The HLS protocol stores live broadcast data streams as continuous video slices of media files (MPEG-TS format) with very short duration at the server, and the client continuously downloads and plays the video slice files, so long as the latest video slice files acquired from the server are continuously played in sequence for playing, live broadcast can be realized.
Because the HLS protocol is played by generating a video slice file for the client to download continuously, when the HLS on-demand request is played in the prior art, the returned video playing content cannot be played completely according to the starting time and the ending time of the user.
Disclosure of Invention
The invention provides a video stream processing system and a video stream processing method, which aim to solve the problem of massive video file storage and video index quick retrieval, and can support live broadcast and time-shift review at the same time.
According to an aspect of the present invention, there is provided a video stream processing system, the system comprising:
The streaming media service module is connected with the rear end service module;
the streaming media service module is used for acquiring the video stream, generating a video slice file according to the video stream when the legal condition of the video stream is confirmed to be legal, generating video slice file information and video m3u8 index information according to the video slice file, carrying out distributed storage on the video slice file information and the video m3u8 index information to generate a callback event, and sending the callback event to the back-end service module;
and the back-end service module is used for receiving the callback event and storing the callback event to the appointed search engine.
Optionally, the streaming media service module specifically includes: a live slice generation sub-module, a video slice file processing sub-module and an index file processing sub-module; the live slice generation sub-module is used for generating a video slice file according to a preset transmission protocol according to the video stream and sending the video slice file to the video slice file processing sub-module; the video slice file processing sub-module is used for receiving the video slice file, generating video slice information according to the video slice file, sending the video slice information to the index file processing sub-module, carrying out distributed storage on the video slice information to generate a first callback event, and sending the first callback event to the back-end service module; the index file processing sub-module is used for receiving video slice information, generating video m3u8 index information according to the video slice information and preset time, carrying out distributed storage on the video m3u8 index information to generate a second callback event, and sending the second callback event to the back-end service module.
Optionally, the system further comprises: the shooting device is connected with the streaming media service module; and the shooting device is used for determining the device identification, acquiring shooting video, combining the device identification with the shooting video to generate a video stream, and sending the video stream to the streaming media service module.
Optionally, the video slice file processing sub-module is configured to determine a target device identifier corresponding to the video slice information, determine a target storage period according to the target device identifier, and store the video slice information to a first specified address according to the target storage period to generate a first callback event; the index file processing sub-module is used for determining a target device identifier corresponding to the video m3u8 index information, determining a target storage period according to the target device identifier, and storing the video m3u8 index information to a second designated address according to the target storage period so as to generate a second callback event.
Optionally, the video slice file processing sub-module is further configured to determine an actual storage period of the video slice information, and delete the video slice information from the first designated address when the actual storage period is consistent with the target storage period; the index file processing sub-module is further configured to determine an actual storage period of the video m3u8 index information, and delete the video m3u8 index information from the second designated address when the actual storage period is consistent with the target storage period.
Optionally, the streaming media service module is further configured to generate a callback parameter according to the video stream, and send the callback parameter to the back-end service module; the back-end service module is also used for receiving the callback parameters, acquiring the verification conditions, judging whether the callback parameters are consistent with the verification conditions, if so, determining that the legal condition is legal, otherwise, determining that the legal condition is illegal, and responding the legal condition to a callback request of the streaming media service module.
Optionally, the system further comprises: the streaming client is connected with the back-end service module; the broadcast streaming client is used for acquiring a broadcast request input by a user and sending the broadcast request to the back-end service module, wherein the broadcast request comprises live broadcast, time-shifting watching and on-demand; the back-end service module is also used for receiving the playing request, acquiring response content corresponding to the playing request based on the appointed search engine and sending the response content to the streaming client; and the streaming client is used for receiving the response content and displaying the response content.
Optionally, the back-end service module is configured to determine a time span corresponding to the play request when the play request is a time-shift-back view or an on-demand request, determine whether the time span is greater than a preset time, if yes, acquire target index information corresponding to the play request based on the second callback event, and encapsulate the target index information to generate response content, otherwise, acquire the target index information corresponding to the play request based on the first callback event, and encapsulate the target index information to generate response content.
Optionally, the back-end service module is configured to determine a timestamp of each first callback event in the specified search engine when the play request is live broadcast, select a specified number of first callback events as target index information according to the timestamp, and encapsulate the target index information to generate the response content.
According to another aspect of the present invention, there is provided a video stream processing method, the method comprising:
the method comprises the steps that a streaming media service module obtains a video stream, when the legal condition of the video stream is confirmed to be legal, a video slice file is generated according to the video stream, video slice file information and video m3u8 index information are generated according to the video slice file, the video slice file information and the video m3u8 index information are stored in a distributed mode to generate callback events, and the callback events are sent to a back-end service module;
and receiving the callback event through the back-end service module, and storing the callback event to the appointed search engine.
The technical scheme of the embodiment of the invention comprises the following steps: the streaming media service module is connected with the rear end service module; the streaming media service module is used for acquiring the video stream, generating a video slice file according to the video stream when the legal condition of the video stream is confirmed to be legal, generating video slice file information and video m3u8 index information according to the video slice file, carrying out distributed storage on the video slice file information and the video m3u8 index information to generate a callback event, and sending the callback event to the back-end service module; and the back-end service module is used for receiving the callback event and storing the callback event to the appointed search engine. And the distributed storage is performed based on the S3 protocol, so that the waiting time of playing the streaming media at the client is reduced, the fluency of playing the streaming media is improved, the live broadcast, time-shifting review and on-demand functions are simultaneously supported on the premise of not changing the HLS protocol, and the user experience is improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic structural diagram of a video stream processing system according to a first embodiment of the present invention;
fig. 2 is a schematic structural diagram of another video stream processing system according to a first embodiment of the present invention;
fig. 3 is a schematic structural diagram of another video stream processing system according to the second embodiment of the present invention;
fig. 4 is a flowchart of a video stream processing method according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device implementing a video stream processing method according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a schematic structural diagram of a video stream processing system according to a first embodiment of the present invention, where the system includes: and the back-end service module is connected with the streaming media service module.
The streaming media service module refers to a module that performs slicing processing on a video stream through an HLS protocol and performs distributed storage based on an S3 protocol, the HLS protocol stores a live broadcast data stream as video slices of continuous media files (MPEG-TS format) with very short duration at a server, and a client continuously downloads and plays the video slice files, so that live broadcast can be realized as long as the latest video slice files acquired from the server are continuously played in sequence. The S3 protocol refers to the interface specification of Amazon S3 (Simple Storage Service), which is a RESTful API based on the HTTP protocol for accessing Amazon Web Services the object storage service provided by which data is stored in the form of objects, each object containing a unique identifier, i.e., an object key; meanwhile, the object storage also supports the storage and management of metadata, including information such as object type, size, creation time, last modification time and the like, and the application scene of the object storage is very wide, including the fields of big data analysis, cloud computing, video media and the like.
Optionally, the streaming media service module is configured to obtain a video stream, generate a video slice file according to the video stream when the legal condition of the video stream is confirmed to be legal, generate video slice file information and video m3u8 index information according to the video slice file, perform distributed storage on the video slice file information and the video m3u8 index information to generate a callback event, and send the callback event to the back-end service module; and the back-end service module is used for receiving the callback event and storing the callback event to the appointed search engine.
Specifically, the streaming media service module firstly confirms legal condition of the video stream, when the video stream is legal, the video stream is subjected to slicing processing based on the HLS protocol to generate a video slice file, then video slice file information and video m3u8 index information are generated according to the video slice file, distributed storage is carried out to generate callback events, and the callback events are sent to the back-end service module. The back-end service module stores the video slice file information and the video m3u8 index information in the callback event to a designated search engine, wherein the designated search engine can be ElasticSearch, elasticSearch which is an open source distributed search engine based on Lucene. In the aspect of searching and analyzing big data, the method can provide near real-time reliable guarantee.
It should be noted that, the search engine based on the elastic search can provide a near real-time search effect on the premise of hundreds of millions of video index in terms of searching and analyzing big data, so that the waiting time of video search by a user through a client is effectively reduced, and the on-demand experience of the user is improved. Meanwhile, based on the elastic search, clustering analysis can be performed on video index data, for example, clustering analysis data such as statistics of a certain time period, the push time length of a video stream channel, statistics of the percentage of the push time length of all video stream channels and the like can be performed, and therefore the whole system has more abundant product functions.
Optionally, the streaming media service module is further configured to generate a callback parameter according to the video stream, and send the callback parameter to the back-end service module; the back-end service module is also used for receiving the callback parameters, acquiring the verification conditions, judging whether the callback parameters are consistent with the verification conditions, if so, determining that the legal condition is legal, otherwise, determining that the legal condition is illegal, and responding the legal condition to a callback request of the streaming media service module.
Specifically, when the streaming media service module confirms the legal condition of the video stream, callback parameters are generated according to the video stream, then the callback parameters are sent to the back-end service module for verification, verification conditions preset by a developer are arranged in the back-end service module, when the callback parameters are consistent with the verification conditions, the legal condition can be confirmed to be legal, and when the callback parameters are inconsistent with the verification conditions, the legal condition is confirmed to be illegal, and the back-end service module sends the confirmed legal condition to the streaming media service module.
Fig. 2 is a schematic structural diagram of a video stream processing system according to a first embodiment of the present invention, where a streaming media service module specifically includes: the device comprises a live slice generation sub-module, a video slice file processing sub-module and an index file processing sub-module. The system further comprises: and the shooting device is connected with the streaming media service module.
Optionally, the streaming media service module specifically includes: a live slice generation sub-module, a video slice file processing sub-module and an index file processing sub-module; the live slice generation sub-module is used for generating a video slice file according to a preset transmission protocol according to the video stream and sending the video slice file to the video slice file processing sub-module; the video slice file processing sub-module is used for receiving the video slice file, generating video slice information according to the video slice file, sending the video slice information to the index file processing sub-module, carrying out distributed storage on the video slice information to generate a first callback event, and sending the first callback event to the back-end service module; the index file processing sub-module is used for receiving video slice information, generating video m3u8 index information according to the video slice information and preset time, carrying out distributed storage on the video m3u8 index information to generate a second callback event, and sending the second callback event to the back-end service module.
Specifically, the live slice generation sub-module generates a video slice file according to the received video stream and HLS protocol, and sends the video slice file to the video slice file processing sub-module. The video slice file processing sub-module is used for processing the video slice file to generate video slice information, and performing distributed storage on the video slice file to generate a first callback event, and callback the first callback event to the back-end service module. The index file processing sub-module may buffer video slice information for a preset time, for example, half an hour, to generate video m3u8 index information, that is, the video m3u8 index information includes a plurality of video slice information. Meanwhile, the index file processing sub-module performs distributed storage on the index information of the video m3u8 to generate a second callback event, and the second callback event is called back to the back-end service module.
Further, the index file processing sub-module is to accelerate the response speed of the client in performing the video query with a relatively large time span and moving back to the request in time, the HLS protocol plays the time bar that the client will have for displaying the time shift range and performing the time shift operation by the client, in most cases, the latest several hours or the latest day of video m3u8 index information will be displayed, taking 12 seconds as an example of each video slice information, the player client obtains 60/12×60×12=3600 video slice information if searching the latest 12 hours of video slice information from the elastic search in real time, and repackaging the video slice information into the video slice information in response to the video m3u8 index information of the client will generate a small time consumption, which affects the user experience, so the index file processing sub-module will generate a video m3u8 index information for each video stream and store the video m3u8 index information in the storage cluster to avoid the problem. That is, by the index file processing sub-module, when each path of video stream is automatically pushed for 30 minutes or the live video stream stops pushing, one video m3u8 index information can be generated, compared with the 12-hour 3600 video slice information, only 60/30×12=24 video m3u8 index information can be generated, and the video stream can be directly responded to a client for playing, so that the response speed and the user experience are greatly improved.
Optionally, the system further comprises: the shooting device is connected with the streaming media service module; and the shooting device is used for determining the device identification, acquiring shooting video, combining the device identification with the shooting video to generate a video stream, and sending the video stream to the streaming media service module.
Specifically, the photographing device determines its own device identifier and then combines the device identifier with the photographed video to generate a video stream, each photographing device has its own unique push channel number, and different device identifiers correspond to different push channel numbers.
Optionally, the video slice file processing sub-module is configured to determine a target device identifier corresponding to the video slice information, determine a target storage period according to the target device identifier, and store the video slice information to a first specified address according to the target storage period to generate a first callback event; the index file processing sub-module is used for determining a target device identifier corresponding to the video m3u8 index information, determining a target storage period according to the target device identifier, and storing the video m3u8 index information to a second designated address according to the target storage period so as to generate a second callback event.
Optionally, the video slice file processing sub-module is further configured to determine an actual storage period of the video slice information, and delete the video slice information from the first designated address when the actual storage period is consistent with the target storage period; the index file processing sub-module is further configured to determine an actual storage period of the video m3u8 index information, and delete the video m3u8 index information from the second designated address when the actual storage period is consistent with the target storage period.
When the S3 distributed storage is performed, different addresses can be created according to the storage period, so that the expired video file data can be conveniently deleted periodically by using the life cycle function of the S3 object storage. For example, different primary paths may be used according to the number of days that the video files need to be saved in the S3 object storage cluster according to the storage deadline, for example, a primary path of a folder saved for 1 day is records1d, a primary path of a folder saved for 7 days is records7d, after setting the S3 object storage lifecycle configuration, the files under the directory may be deleted periodically according to the configuration, so as to ensure that the file capacity of the S3 object storage service is within an expected threshold.
Specifically, the storage period may be determined according to the device identifier, the video slice file processing sub-module and the index file processing sub-module may both determine a target storage period according to the target device identifier, then store video slice information and video m3u8 index information to the specified address according to the target storage period, further, the video slice file processing sub-module and the index file processing sub-module may also determine an actual storage period of the video slice information and the video m3u8 index information, and when the actual storage period is consistent with the target storage period, delete the stored content to ensure that the file capacity of the S3 object storage service is within an expected threshold.
The technical scheme of the embodiment of the invention comprises the following steps: the streaming media service module is connected with the rear end service module; the streaming media service module is used for acquiring the video stream, generating a video slice file according to the video stream when the legal condition of the video stream is confirmed to be legal, generating video slice file information and video m3u8 index information according to the video slice file, carrying out distributed storage on the video slice file information and the video m3u8 index information to generate a callback event, and sending the callback event to the back-end service module; and the back-end service module is used for receiving the callback event and storing the callback event to the appointed search engine. Index information search is carried out based on an elastic search engine, waiting time of playing streaming media at a client is reduced, smoothness of streaming media playing is improved, live broadcast, time-shifting review and on-demand functions are supported on the premise that an HLS protocol is not changed, and user experience is improved.
Example two
Fig. 3 is a schematic structural diagram of a video stream processing system according to a second embodiment of the present invention, where a streaming client is added on the basis of the first embodiment.
Optionally, the system further comprises: the streaming client is connected with the back-end service module; the broadcast streaming client is used for acquiring a broadcast request input by a user and sending the broadcast request to the back-end service module, wherein the broadcast request comprises live broadcast, time-shifting watching and on-demand; the back-end service module is also used for receiving the playing request, acquiring response content corresponding to the playing request based on the appointed search engine and sending the response content to the streaming client; and the streaming client is used for receiving the response content and displaying the response content.
Specifically, a user initiates a play request to an API interface of a back-end service module through a streaming client, for example, parameters such as a video stream channel number, video stream start time and end time are sent, after the back-end service module receives the play request, the back-end service module analyzes the corresponding parameters, acquires response content corresponding to the play request based on an elastic search engine, and sends the response content to the streaming client for display.
Optionally, the back-end service module is configured to determine a timestamp of each first callback event in the specified search engine when the play request is live broadcast, select a specified number of first callback events as target index information according to the timestamp, and encapsulate the target index information to generate the response content.
The http:// HLS. Test.com/live/test123/index.m3u8 after the back-end service module receives the request URL, analyzes the video stream channel number, queries the cached video slice file information of the test123 video stream channel, and returns a 404 state code if no cached video slice file information or the cached video slice file information has expired; if the effective video slice file information is queried, the specified number of video slice file information can be selected according to the time stamp, for example, the video slice file can be read again every 12s, and response content is generated after encapsulation and displayed to the streaming client.
Optionally, the back-end service module is configured to determine a time span corresponding to the play request when the play request is a time-shift-back view or an on-demand request, determine whether the time span is greater than a preset time, if yes, acquire target index information corresponding to the play request based on the second callback event, and encapsulate the target index information to generate response content, otherwise, acquire the target index information corresponding to the play request based on the first callback event, and encapsulate the target index information to generate response content.
Specifically, when the play request is time-shifted to watch or order, determining a time span corresponding to the play request, when the time span is greater than a preset time, selecting video m3u8 index information of a second callback event to obtain target index information corresponding to the play request, and when the time span is less than or equal to the preset time, selecting video slice file information of a first callback time to obtain target index information corresponding to the play request.
In a specific embodiment, when an HLS on-demand request is initiated by a streaming client, a back-end service module needs to take time stamps of video start and end playing, after receiving the URL of the type, analyzes the video stream channel number, start playing time and end playing time, queries stored target index information from a search engine elastic search according to start starting time, end ending time and video stream channel number parameters, and returns to 404 state codes if no target index information or the target index information has expired; if the effective target index information is queried, the method directly responds to the client side of the broadcast stream.
In a specific embodiment, when HLS is initiated by a streaming client and a watching request is returned, a time stamp of video initial playing needs to be carried, after receiving a URL of the request type, a back-end service module analyzes a video stream channel number and a time stamp of starting playing, firstly, a second-level m3u8 index information is responded, a time shift.m3u8 file in the second-level m3u8 index information is periodically requested, stored target index information of a corresponding video stream channel is queried from a search engine elastic search according to a start parameter, and if no target index information or the target index information is expired, a state code is returned 404; if the effective target index information is queried, the m3u8 index file information is dynamically generated and responded to the client. When the client requests the secondary m3u8 index URL twice, the back-end service module deletes the first TS link in the responsive m3u8 index information, and adds a piece of TS video index information at the data end, so as to continuously respond to the latest real-time HLS live video data of the client.
The technical scheme of the embodiment of the invention comprises the following steps: the streaming media service module is connected with the rear end service module; the streaming media service module is used for acquiring the video stream, generating a video slice file according to the video stream when the legal condition of the video stream is confirmed to be legal, generating video slice file information and video m3u8 index information according to the video slice file, carrying out distributed storage on the video slice file information and the video m3u8 index information to generate a callback event, and sending the callback event to the back-end service module; and the back-end service module is used for receiving the callback event and storing the callback event to the appointed search engine. Index information search is carried out based on an elastic search engine, waiting time of playing streaming media at a client is reduced, smoothness of streaming media playing is improved, live broadcast, time-shifting review and on-demand functions are supported on the premise that an HLS protocol is not changed, and user experience is improved.
Example III
Fig. 4 is a flowchart of a method for controlling a road roller according to a third embodiment of the present invention, where the present embodiment is applicable to a scenario in which video streams are stored and viewed. As shown in fig. 4, the method includes:
s310, acquiring a video stream through a streaming media service module, generating a video slice file according to the video stream when the legal condition of the video stream is confirmed to be legal, generating video slice file information and video m3u8 index information according to the video slice file, performing distributed storage on the video slice file information and the video m3u8 index information to generate a callback event, and transmitting the callback event to a back-end service module.
Specifically, the streaming media service module specifically includes: the device comprises a live slice generation sub-module, a video slice file processing sub-module and an index file processing sub-module. The live slice generation sub-module generates a video slice file according to the received video stream and the HLS protocol, and sends the video slice file to the video slice file processing sub-module. The video slice file processing sub-module is used for processing the video slice file to generate video slice information, and performing distributed storage on the video slice file to generate a first callback event, and callback the first callback event to the back-end service module. The index file processing sub-module may buffer video slice information for a preset time, for example, half an hour, to generate video m3u8 index information, that is, the video m3u8 index information includes a plurality of video slice information. The colleague, the index file processing sub-module performs distributed storage on the video m3u8 index information to generate a second callback event, and the second callback event is called back to the back-end service module.
S320, receiving the callback event through the back-end service module, and storing the callback event to the designated search engine.
Specifically, the back-end service module is configured to store video slicing information and video m3u8 index information reported by the streaming media service module into a search engine elastic search, process live broadcast, time-shift viewing and on-demand requests initiated by the streaming client, and generate response content for display to the streaming client.
The technical scheme of the embodiment of the invention comprises the following steps: the streaming media service module is connected with the rear end service module; the streaming media service module is used for acquiring the video stream, generating a video slice file according to the video stream when the legal condition of the video stream is confirmed to be legal, generating video slice file information and video m3u8 index information according to the video slice file, carrying out distributed storage on the video slice file information and the video m3u8 index information to generate a callback event, and sending the callback event to the back-end service module; and the back-end service module is used for receiving the callback event and storing the callback event to the appointed search engine. Index information search is carried out based on an elastic search engine, waiting time of playing streaming media at a client is reduced, smoothness of streaming media playing is improved, live broadcast, time-shifting review and on-demand functions are supported on the premise that an HLS protocol is not changed, and user experience is improved.
Example IV
Fig. 5 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 5, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as a roller control method.
In some embodiments, a method of controlling a road roller may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. One or more of the steps of a method of controlling a road roller described above may be performed when the computer program is loaded into RAM 13 and executed by processor 11. Alternatively, in other embodiments, processor 11 may be configured to perform a method of roller control in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A video stream processing system, comprising: the streaming media service module is connected with the rear end service module;
the streaming media service module is used for acquiring a video stream, generating a video slice file according to the video stream when the legal condition of the video stream is confirmed to be legal, generating video slice file information and video m3u8 index information according to the video slice file, carrying out distributed storage on the video slice file information and the video m3u8 index information to generate a callback event, and sending the callback event to the back-end service module;
And the back-end service module is used for receiving the callback event and storing the callback event to a designated search engine.
2. The system according to claim 1, wherein the streaming media service module specifically comprises: a live slice generation sub-module, a video slice file processing sub-module and an index file processing sub-module;
the live slice generation sub-module is used for generating the video slice file according to the video stream and a preset transmission protocol, and sending the video slice file to the video slice file processing sub-module;
the video slice file processing sub-module is used for receiving the video slice file, generating video slice information according to the video slice file, sending the video slice information to the index file processing sub-module, performing distributed storage on the video slice information to generate a first callback event, and sending the first callback event to the back-end service module;
the index file processing sub-module is used for receiving the video slice information, generating video m3u8 index information according to the video slice information and preset time, performing distributed storage on the video m3u8 index information to generate a second callback event, and sending the second callback event to the back-end service module.
3. The system of claim 2, wherein the system further comprises: the shooting device is connected with the streaming media service module;
the shooting device is used for determining a device identifier, acquiring a shooting video, combining the device identifier with the shooting video to generate the video stream, and sending the video stream to the streaming media service module.
4. The system of claim 3, wherein the slice-by-slice file processing sub-module is configured to determine a target device identifier corresponding to the slice-by-slice information, determine a target storage deadline according to the target device identifier, and store the slice-by-slice information to a first specified address according to the target storage deadline to generate the first callback event;
the index file processing sub-module is configured to determine a target device identifier corresponding to the video m3u8 index information, determine a target storage period according to the target device identifier, and store the video m3u8 index information to a second designated address according to the target storage period to generate the second callback event.
5. The system of claim 4, wherein the slice-by-slice file processing sub-module is further configured to determine an actual storage deadline for the slice-by-slice information, and delete the slice-by-slice information from the first specified address when the actual storage deadline is consistent with the target storage deadline;
The index file processing sub-module is further configured to determine an actual storage period of the video m3u8 index information, and delete the video m3u8 index information from the second designated address when the actual storage period is consistent with the target storage period.
6. The system of claim 1, wherein the streaming media service module is further configured to generate a callback parameter according to the video stream, and send the callback parameter to the backend service module;
the back-end service module is further configured to receive the callback parameter, obtain a verification condition, determine whether the callback parameter is consistent with the verification condition, if yes, determine that the legal condition is legal, if not, determine that the legal condition is illegal, and respond the legal condition to a callback request of the streaming media service module.
7. The system of claim 4, wherein the system further comprises: the streaming client is connected with the back-end service module;
the broadcast streaming client is used for acquiring a broadcast request input by a user and sending the broadcast request to the back-end service module, wherein the broadcast request comprises live broadcast, time-shifting watching and on-demand;
The back-end service module is further configured to receive the play request, obtain response content corresponding to the play request based on the specified search engine, and send the response content to the streaming client;
and the streaming client is used for receiving the response content and displaying the response content.
8. The system of claim 7, wherein the back-end service module is configured to determine a time span corresponding to the play request when the play request is time-shifted-back or on-demand, determine whether the time span is greater than a preset time, if so, acquire target index information corresponding to the play request based on the second callback event, and encapsulate the target index information to generate the response content, otherwise, acquire target index information corresponding to the play request based on the first callback event, and encapsulate the target index information to generate the response content.
9. The system of claim 7, wherein the back-end service module is configured to determine a timestamp of each of the first callback events in the specified search engine when the play request is live, select a specified number of the first callback events as target index information according to the timestamp, and encapsulate the target index information to generate the response content.
10. A video stream processing method, applied to a video stream processing system according to any one of claims 1 to 9, comprising:
acquiring a video stream through a streaming media service module, generating a video slice file according to the video stream when the legal condition of the video stream is confirmed to be legal, generating video slice file information and video m3u8 index information according to the video slice file, performing distributed storage on the video slice file information and the video m3u8 index information to generate a callback event, and transmitting the callback event to a back-end service module;
and receiving the callback event through a back-end service module, and storing the callback event to a designated search engine.
CN202311556352.0A 2023-11-21 2023-11-21 Video stream processing system and method Pending CN117596438A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311556352.0A CN117596438A (en) 2023-11-21 2023-11-21 Video stream processing system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311556352.0A CN117596438A (en) 2023-11-21 2023-11-21 Video stream processing system and method

Publications (1)

Publication Number Publication Date
CN117596438A true CN117596438A (en) 2024-02-23

Family

ID=89919399

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311556352.0A Pending CN117596438A (en) 2023-11-21 2023-11-21 Video stream processing system and method

Country Status (1)

Country Link
CN (1) CN117596438A (en)

Similar Documents

Publication Publication Date Title
US11350139B2 (en) Video live broadcast method and apparatus
US9532114B2 (en) Optimizing caches for media streaming
US10110694B1 (en) Adaptive transfer rate for retrieving content from a server
US11356748B2 (en) Method, apparatus and system for slicing live streaming
TWI602415B (en) Method and apparatus for flexible caching of delivered media
US11553196B2 (en) Media storage
US20140298395A1 (en) Methods and systems for playing video on multiple terminals
CN109474854B (en) Video playing method, playlist generating method and related equipment
US20140165119A1 (en) Offline download method, multimedia file download method and system thereof
CN110636340B (en) Video file uploading method, storage device, terminal device and storage medium
US11212332B2 (en) Dynamic archiving of streaming content
CN110324680B (en) Video pushing method and device, server, client and storage medium
CN108900855B (en) Live content recording method and device, computer readable storage medium and server
CN112311874B (en) Media data processing method and device, storage medium and electronic equipment
CN107690093B (en) Video playing method and device
CN111510789A (en) Video playing method, system, computer equipment and computer readable storage medium
US20200366967A1 (en) Method and system for monitoring quality of streaming media
CN108415908B (en) Multimedia data processing method and server
CN108777802B (en) Method and device for caching VR (virtual reality) video
US9813321B2 (en) Hybrid content delivery system
CN117596438A (en) Video stream processing system and method
CN112235592B (en) Live broadcast method, live broadcast processing method, device and computer equipment
WO2020172586A1 (en) Adaptive retrieval of objects from remote storage
CN111800649A (en) Method and device for storing video and method and device for generating video
CN110753268B (en) Page card data generation method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination