WO2024011962A1 - 视频流传输的控制方法及装置、设备、介质 - Google Patents

视频流传输的控制方法及装置、设备、介质 Download PDF

Info

Publication number
WO2024011962A1
WO2024011962A1 PCT/CN2023/086033 CN2023086033W WO2024011962A1 WO 2024011962 A1 WO2024011962 A1 WO 2024011962A1 CN 2023086033 W CN2023086033 W CN 2023086033W WO 2024011962 A1 WO2024011962 A1 WO 2024011962A1
Authority
WO
WIPO (PCT)
Prior art keywords
streaming
video stream
video
terminal
push
Prior art date
Application number
PCT/CN2023/086033
Other languages
English (en)
French (fr)
Inventor
贾宇航
雷艺学
张云飞
Original Assignee
腾讯科技(深圳)有限公司
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 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2024011962A1 publication Critical patent/WO2024011962A1/zh

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/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • H04N21/23418Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/258Client or end-user data management, e.g. managing client capabilities, user preferences or demographics, processing of multiple end-users preferences to derive collaborative data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/258Client or end-user data management, e.g. managing client capabilities, user preferences or demographics, processing of multiple end-users preferences to derive collaborative data
    • H04N21/25866Management of end-user data
    • H04N21/25891Management of end-user data being end-user preferences
    • 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/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • 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/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/44008Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream
    • 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/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • 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/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/466Learning process for intelligent management, e.g. learning user preferences for recommending movies
    • 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/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/466Learning process for intelligent management, e.g. learning user preferences for recommending movies
    • H04N21/4668Learning process for intelligent management, e.g. learning user preferences for recommending movies for recommending content, e.g. movies

Definitions

  • the present application relates to the field of communication technology, specifically, to a method for controlling video stream transmission, a control device for video stream transmission, electronic equipment, and computer-readable media.
  • video streaming transmission can be used in various scenarios such as smart transportation, assisted driving, cloud technology, and artificial intelligence.
  • the collector can push the collected video streams related to vehicles on the road to pull Streaming terminal, so that the streaming terminal can perform corresponding processing based on the received video stream to achieve assisted driving, etc.
  • Embodiments of the present application provide a control method, device, equipment, and medium for video stream transmission, thereby adapting the transmission of video streams to network changes, at least to a certain extent, and achieving reasonable control of video stream transmission.
  • embodiments of the present application provide a method for controlling video stream transmission, which is applied to a streaming terminal.
  • the method includes: receiving a video stream sent by a streaming party, and detecting the video stream during the reception process.
  • Network indicator information based on the network indicator information, determine a pull code rate that matches the network indicator information; generate a pull request based on the pull code rate, and the pull request is used to instruct the push stream
  • the party performs streaming processing based on the streaming code rate; and sends the streaming request to the streaming party.
  • embodiments of the present application provide a method for controlling video stream transmission, which is applied to a streaming terminal.
  • the method includes: pushing the video stream to a video streaming server, so that the video streaming server Push the video stream to the streaming terminal; receive the streaming request sent by the streaming terminal; wherein the streaming request carries the streaming code rate, and the streaming code rate is the streaming code rate of the streaming terminal.
  • embodiments of the present application provide a method for controlling video stream transmission, which is applied to a video streaming server.
  • the method includes: receiving a video stream sent by a push terminal, and pushing the video stream to a pull stream.
  • the video stream is determined based on the detected network indicator information during the reception process of the video stream; and the push processing is performed to the streaming terminal based on the streaming code rate.
  • inventions of the present application provide a control device for video stream transmission, which is applied to a streaming terminal.
  • the device includes: a receiving module configured to receive a video stream sent by a streaming party and detect the video stream. Network indicator information during the receiving process; a determining module configured to determine, based on the network indicator information, the network indicator information that matches the network indicator information.
  • Pull streaming code rate the generation module is configured to generate a streaming request based on the pulling streaming code rate, and the streaming request is used to instruct the streaming party to perform streaming processing based on the pulling streaming code rate; the sending module, Configured to send the pull request to the push party.
  • inventions of the present application provide a control device for video stream transmission, which is applied to a streaming terminal.
  • the device includes: a streaming module configured to push the video stream to the video streaming server so that all The video streaming server pushes the video stream to the streaming terminal; the receiving module is configured to receive the streaming request sent by the streaming terminal; wherein the streaming request carries the streaming code rate, so The streaming code rate is determined by the streaming terminal receiving the video stream sent by the video streaming server and based on the detected network indicator information during the receiving process of the video stream; the streaming module further It is configured to perform push processing to the video streaming server based on the pull streaming code rate, so that the video streaming server pushes the video stream corresponding to the pull streaming code rate to the streaming terminal.
  • embodiments of the present application provide a control device for video stream transmission, which is applied to a video streaming server.
  • the device includes: a streaming module configured to receive a video stream sent by a streaming terminal and convert the video The stream is pushed to the streaming terminal; the receiving module is configured to receive the streaming request sent by the streaming terminal; wherein the streaming request carries the streaming code rate, and the streaming code rate is the
  • the streaming terminal receives the video stream sent by the video streaming server and determines it based on the detected network indicator information of the video stream during the reception process; the streaming module is also configured to based on the streaming code
  • the push flow processing is performed to the pull flow terminal at a certain rate.
  • embodiments of the present application provide an electronic device, including one or more processors; a memory for storing one or more programs. When the one or more programs are processed by the one or more When the processor is executed, the electronic device is caused to implement the control method for video streaming transmission as described above.
  • embodiments of the present application provide a computer-readable medium on which a computer program is stored.
  • the computer program is executed by a processor, the above-mentioned control method for video streaming transmission is implemented.
  • embodiments of the present application provide a computer program product, which includes computer instructions.
  • the control method for video streaming transmission is implemented as described above.
  • the streaming terminal detects the network indicator information during the reception process of the video stream, and can determine the streaming code rate that matches the network indicator information based on the network indicator information, and then convert the streaming code rate to The form of a stream request is sent to the stream pusher, so that the stream pusher can perform push processing based on the pull stream bit rate, so that the transmission of the video stream can adapt to network changes and achieve reasonable control over the transmission of the video stream.
  • the streaming terminal side performs logical processing based on network indicator information to determine the streaming code rate that matches the network indicator information, which can reduce the processing pressure on the server side and avoid unnecessary message transmission.
  • the push terminal receives the pull request carrying the pull code rate sent by the pull terminal, and then can perform push processing to the pull terminal based on the pull code rate, that is, the push terminal performs the push process to the pull terminal.
  • Video stream push adapts to network changes, achieving reasonable control of push to pull-streaming terminals.
  • the video streaming server by receiving the streaming request carrying the streaming code rate sent by the streaming terminal, can then perform push processing to the streaming terminal based on the streaming code rate, that is, the video streaming server performs push processing to the streaming terminal.
  • Video stream push adapts to network changes, achieving reasonable control of push to pull-streaming terminals.
  • Figure 1 is a schematic diagram of an exemplary implementation environment in which the technical solutions of the embodiments of the present application can be applied;
  • Figure 2 is a flow chart of a method for controlling video streaming transmission according to an exemplary embodiment of the present application
  • Figure 3 is a flow chart of a method for controlling video streaming transmission according to another exemplary embodiment of the present application.
  • Figure 4 is a flow chart of a method for controlling video streaming transmission according to another exemplary embodiment of the present application.
  • Figure 5 is a flow chart of a method for controlling video streaming transmission according to another exemplary embodiment of the present application.
  • Figure 6 is a flow chart of a method for controlling video streaming transmission according to another exemplary embodiment of the present application.
  • Figure 7 is a flow chart of a method for controlling video streaming transmission according to another exemplary embodiment of the present application.
  • Figure 8 is a flow chart of a method for controlling video streaming transmission according to another exemplary embodiment of the present application.
  • Figure 9 is a flow chart of a method for controlling video streaming transmission according to an exemplary embodiment of the present application.
  • Figure 10 is a flow chart of a method for controlling video streaming transmission according to another exemplary embodiment of the present application.
  • Figure 11 is a flow chart of a method for controlling video streaming transmission according to an exemplary embodiment of the present application.
  • Figure 12 is a flow chart of a method for controlling video streaming transmission according to another exemplary embodiment of the present application.
  • Figure 13 is a flow chart of a method for controlling video streaming transmission according to another exemplary embodiment of the present application.
  • Figure 14 is a flow chart of a method for controlling video streaming transmission according to another exemplary embodiment of the present application.
  • Figure 15 is a schematic diagram of an exemplary implementation environment in which the technical solution of the embodiment of the present application can be applied;
  • Figure 16 is a flow chart of a method for controlling video streaming transmission according to an exemplary embodiment of the present application.
  • Figure 17 is a flow chart of a method for controlling video streaming transmission according to an exemplary embodiment of the present application.
  • Figure 18 is a block diagram of a control device for video streaming transmission according to an embodiment of the present application.
  • Figure 19 is a block diagram of a control device for video streaming transmission according to an embodiment of the present application.
  • Figure 20 is a block diagram of a control device for video streaming transmission according to an embodiment of the present application.
  • FIG. 21 is a schematic structural diagram of a computer system suitable for implementing an electronic device according to an embodiment of the present application.
  • FIG. 1 is a schematic diagram of an implementation environment involved in this application.
  • the implementation environment mainly includes a pull terminal 101, a push terminal 102, and a video streaming server 103. It can be understood that the streaming terminal 101, the streaming terminal 102, and the video streaming server 103 can communicate through a wired or wireless network. in:
  • the pull terminal 101 and/or the push terminal 102 include but are not limited to smartphones, tablets, laptops, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, etc.
  • the video streaming server 103 can be a server that provides various services. It can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also provide cloud services, cloud databases, cloud computing, Cloud servers for basic cloud computing services such as cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network, content distribution network), and big data and artificial intelligence platforms, this office There is no restriction on this.
  • pull terminals 101, push terminals 102, and video streaming servers 103 in Figure 1 is only illustrative. According to actual needs, there can be any number of pull terminals 101 and push terminals 102. , and video streaming server 103.
  • the method for controlling video stream transmission can be executed by the streaming terminal 101.
  • the streaming terminal 101 serves as the streaming party.
  • the streaming terminal 101 receives the video stream sent by the streaming party, and detects the network indicator information of the video stream during the reception process; then, based on the network indicator information, determines the streaming code rate that matches the network indicator information; and then Generate a pull request based on the pull code rate.
  • the pull request is used to instruct the push party to perform push processing based on the pull code rate; and then send a pull request to the push party.
  • the method for controlling video streaming transmission can be executed by the streaming terminal 102, in which case the streaming terminal 102 serves as the streaming party.
  • the streaming terminal 102 pushes the video stream to the video streaming server, so that the video streaming server pushes the video stream to the streaming terminal; and receives a streaming request sent by the streaming terminal, where the streaming request It carries the streaming bit rate.
  • the streaming bit rate is determined by the streaming terminal receiving the video stream sent by the video streaming server and based on the detected network indicator information during the reception process of the video stream. It is then based on the streaming bit rate. Perform push processing to the video streaming server, so that the video streaming server pushes the video stream corresponding to the pull streaming code rate to the pull streaming terminal.
  • the method for controlling video streaming transmission can be executed by the video streaming server 103, in which case the video streaming server 103 serves as the streaming party.
  • the video streaming server 103 receives the video stream sent by the streaming terminal, and pushes the video stream to the streaming terminal; and receives the streaming request sent by the streaming terminal; wherein the streaming request carries the streaming message Bit rate, the streaming bit rate is determined by the streaming terminal receiving the video stream sent by the video streaming server and based on the detected network indicator information during the receiving process of the video stream; and then based on the streaming bit rate, the streaming terminal is Push processing.
  • the technical solution of the embodiment shown in Figure 1 can be applied in various scenarios, including but not limited to smart transportation, assisted driving, cloud technology, artificial intelligence, etc.; in actual applications, it can be adjusted accordingly according to specific application scenarios.
  • the streaming terminal 102 can be a vehicle-mounted terminal, a navigation terminal, etc.
  • the streaming terminal 101 can be a computer, a smart phone, a tablet, a laptop, etc.
  • the computer receives the video stream sent by the vehicle-mounted terminal, detects the network indicator information of the video stream during the reception process, and determines the streaming code rate that matches the network indicator information based on the network indicator information, and then generates the streaming code rate based on the streaming code rate.
  • the pull stream code rate of the band is pushed to the video stream server, so that the video stream server pushes the video stream corresponding to the pull stream code rate to the computer; accordingly, the computer can receive the pull request sent by the video stream server The video stream corresponding to the streaming bitrate carried in .
  • the video streaming server 103 may be a server located in the cloud.
  • the computer receives the video stream sent by the vehicle-mounted terminal, detects the network indicator information of the video stream during the reception process, and determines the streaming code rate that matches the network indicator information based on the network indicator information, and then generates the streaming code rate based on the streaming code rate.
  • Stream request and send a pull request to the vehicle terminal accordingly, the cloud server can receive the pull request sent by the computer, and perform push processing to the computer based on the pull stream code rate; accordingly, the computer can receive the pull request sent by the cloud server and The video stream corresponding to the pull bit rate carried in the pull request.
  • Figure 2 is a flow chart of a method for controlling video stream transmission according to an embodiment of the present application.
  • the method for controlling video stream transmission can be executed by the streaming terminal 101 as the streaming party.
  • the control method of the video stream transmission includes at least S201 to S204, and the details are as follows:
  • S201 Receive the video stream sent by the streaming party, and detect the network indicator information of the video stream during the receiving process.
  • the video stream in the embodiment of the present application can be a video stream generated in any scenario, including but not limited to a video stream generated by a live broadcast terminal in a live broadcast scenario, a video stream generated by a vehicle-mounted terminal in a smart transportation or assisted driving scenario (can be The camera collects the video stream corresponding to the road image and sends it to the vehicle-mounted terminal), etc.
  • the streaming parties include but are not limited to streaming terminals, video streaming servers, etc.
  • the streaming terminal is the real generator/source of the video stream; for example, in a live broadcast scenario, the streaming terminal is the live broadcast terminal corresponding to the anchor. As the live broadcast progresses, the live broadcast terminal will generate the corresponding video stream.
  • the video streaming server is the intermediary that the push streaming terminal needs to pass through to send the video stream to the pulling terminal.
  • the push streaming terminal generates the video stream, and then sends the video stream to the video streaming server, and then the video streaming server
  • the received video stream is sent to the streaming terminal; for example, following the previous example, the live broadcast terminal generates a video stream, and then sends the video stream to the video streaming server, and then the video streaming server sends the received video stream to the streaming terminal. middle.
  • the streaming terminal is the streaming party, which is the party that receives the video stream; for example, following the above example, in the live broadcast scenario, the streaming terminal is the viewing terminal corresponding to the audience watching the live broadcast, that is, the live broadcast
  • the terminal generates a video stream, and then sends the video stream to the video stream server.
  • the video stream server then sends the received video stream to the viewing terminal, so that the audience can watch the anchor through the video stream pulled by the viewing terminal. Live content.
  • the network indicator information is information related to network indicators, where the network indicators are indicators that can reflect the quality of the network, including but not limited to delay, packet loss rate, throughput, lag rate, etc.
  • S202 Based on the network indicator information, determine the streaming code rate that matches the network indicator information.
  • the streaming terminal detects the network indicator information during the reception process of the video stream, and then can determine the streaming code rate that matches the network indicator information based on the network indicator information.
  • S203 Generate a pull request based on the pull code rate.
  • the pull request is used to instruct the push party to perform push processing based on the pull code rate.
  • the streaming terminal determines the streaming code rate that matches the network indicator information based on the network indicator information, and then generates a streaming request based on the streaming code rate to instruct the streaming party based on the streaming request through the streaming request.
  • the code rate is pushed to the stream.
  • the streaming side performs streaming processing based on the streaming code rate. Please refer to the detailed introduction in the following embodiments.
  • the streaming terminal generates a streaming request based on the streaming code rate, and then can send the streaming request to the streaming party.
  • the streaming terminal detects the network indicator information during the reception process of the video stream, and can determine the streaming code rate that matches the network indicator information based on the network indicator information, and then convert the streaming code rate to The form of a pull request is sent to the pusher, so that the pusher can perform push processing based on the pull code rate.
  • the transmission of the video stream can adapt to network changes and achieve reasonable control over the transmission of the video stream.
  • the streaming terminal side executes logical processing based on the network indicator information to determine the streaming code rate that matches the network indicator information, which can reduce the processing pressure on the server side and avoid resource consumption caused by unnecessary message transmission. The phenomenon of consumption.
  • another method of controlling video stream transmission is provided, and the method of controlling video stream transmission can be executed by the streaming terminal 101 as the streaming party.
  • the control method for video stream transmission may include S301 to S302, S201, S203 to S204.
  • S301 Determine the quality of the network environment where the streaming terminal is located based on the network indicator information.
  • network indicators can reflect the quality of the network; therefore, in embodiments of the present application, the quality of the network environment in which the streaming terminal is located can be determined based on the detected network indicator information.
  • S302 Based on the quality of the network environment, determine the streaming code rate that matches the quality of the network environment; wherein, the quality of the network environment and the streaming code rate are positively correlated.
  • the streaming terminal determines the quality of the network environment in which the streaming terminal is located based on the network indicator information. Then, based on the quality of the network environment, the streaming code rate that matches the quality of the network environment can be determined to obtain a Adapt the streaming bit rate to the current network changes.
  • the streaming terminal determines the quality of the network environment in which the streaming terminal is located based on network indicator information, and based on the quality of the network environment, it can quickly and accurately determine the streaming code rate that matches the quality of the network environment.
  • the implementation process is simple and can be applied to many application scenarios.
  • the control method for video stream transmission is The control method may be executed by the streaming terminal 101 as the streaming party. As shown in Figure 4, the control method for video stream transmission may include S401, S302, S201, S203 to S204. Among them, the network indicator information includes the numerical value of the network indicator.
  • S401 Determine the quality of the network environment where the streaming terminal is located based on the relationship between the value of the network indicator and the preset indicator threshold.
  • the larger the network indicator the worse the network quality.
  • the smaller the network indicator the better the network quality; for example, for delay, 100ms>10ms, of which 100ms
  • the network quality represented is worse than the network quality represented by 10ms.
  • the larger the network indicator is the better the network quality is.
  • the smaller the network indicator is, the worse the network quality is.
  • 10Mbps the bit rate
  • 10Mbps the bit rate
  • 5Mbps the number rate
  • determining the quality of the network environment where the streaming terminal is located may at least include:
  • the first detection result indicates that there are a specified number of values among the multiple values that are greater than the preset indicator threshold, then it is determined that the network environment where the streaming terminal is located is of the first level of quality;
  • the network environment in which the streaming terminal is located is of the second level of quality; wherein the quality of the first level is lower than the quality of the second level. Second level quality.
  • the detected network indicator information includes multiple values of the network indicator.
  • the streaming terminal detects the relationship between multiple values of network indicators and preset indicator thresholds, obtains a first detection result, and determines the quality of the network environment in which the streaming terminal is located based on the first detection result.
  • Case 1 If the first detection result indicates that there are a specified number of values among multiple values that are greater than the preset indicator threshold, then it is determined that the network environment where the streaming terminal is located is of the first level of quality, that is, it is determined that the streaming terminal is in The quality of the network environment is poor.
  • Case 2 If the first detection result indicates that there are not a specified number of values greater than the preset index threshold among the multiple values, it is determined that the network environment where the streaming terminal is located is of the second level of quality, that is, it is determined that the streaming terminal is in The quality of the network environment is better.
  • the multiple values of the detected network indicators are a1, a2, a3, and a4 respectively, and the default indicator threshold is a0, then a1, a2, a3, and a4 are compared with a0 respectively to obtain the first Test results.
  • the first detection result indicates that there are a specified number of multiple values that are larger than the predetermined number.
  • the network environment where the streaming terminal is located is the first level of quality; or assuming that a1 ⁇ a0, a2 ⁇ a0, a3>a0, a4 ⁇ a0 in the first detection result, and the specified number is 2.
  • the first detection result at this time indicates that there are no specified number of numbers greater than the preset index threshold among the multiple values. value, it can be determined that the network environment where the streaming terminal is located is the second level of quality.
  • the accuracy of determining the quality of the network environment in which the streaming terminal is located can be improved with the help of multiple values of network indicators, and thereby the accuracy of determining the streaming code rate can be improved.
  • determining the quality of the network environment where the streaming terminal is located may at least include:
  • the second detection result indicates that the average value is greater than the preset index threshold, it is determined that the network environment where the streaming terminal is located is of the first level of quality
  • the second detection result indicates that the average value is less than or equal to the preset index threshold, it is determined that the network environment in which the streaming terminal is located is of the second level of quality; wherein the first level of quality is lower than the second level of quality.
  • the detected network indicator information includes multiple values of the network indicator.
  • the streaming terminal performs a summation and averaging operation on multiple values to obtain an average value, and then detects the relationship between the average value and the preset index threshold to obtain a second detection result, and based on the second detection result Determine the quality of the network environment where the streaming terminal is located.
  • the second detection result indicates that the average value is greater than the preset index threshold, it is determined that the network environment where the streaming terminal is located is of the first level of quality, that is, it is determined that the quality of the network environment where the streaming terminal is located is poor.
  • the second detection result indicates that the average value is greater than the preset index threshold, and it can be determined that the network environment where the streaming terminal is located is the first level of quality; or assuming that the third In the first detection result, a' ⁇ a0.
  • the second detection result indicates that the average value is less than or equal to the preset indicator threshold, and it can be determined that the network environment where the streaming terminal is located is of the second level of quality.
  • the accuracy of determining the quality of the network environment in which the streaming terminal is located can be improved with the help of multiple values of network indicators, and thereby the accuracy of determining the streaming code rate can be improved.
  • the aforementioned "determine the quality of the network environment where the streaming terminal is located based on the relationship between the value of the network indicator and the preset indicator threshold" is based on the fact that the larger the network indicator, the worse the network quality represented, and the smaller the network indicator.
  • adaptive adjustments can be made to network indicators that represent better network quality when the network index is larger, and network indicators that represent worse network quality when the network index decreases.
  • S302 shown in Figure 4 please refer to S302 shown in Figure 3.
  • S201 and S201 shown in Figure 4 For detailed introduction of S203 to S204, please refer to S201 and S203 to S204 shown in Figure 2, which will not be described again here.
  • the streaming terminal determines the quality of the network environment in which the streaming terminal is located based on the relationship between the value of the network indicator and the preset indicator threshold. Based on the quality of the network environment, the quality of the network environment can be quickly and accurately determined. Matching the streaming bit rate, the implementation process is simple, and it can be applied to many application scenarios.
  • control method for video stream transmission may include S501 to S502, S301, S201, S203 to S204.
  • S502 If the network environment is of the second level of quality, determine the streaming code rate to a second value; wherein the first level of quality is lower than the second level of quality, and the first value is smaller than the second value.
  • Table 1 is an example based on the quality of the network environment and determines the streaming code rate that matches the quality of the network environment.
  • the streaming terminal can quickly and accurately determine the streaming code rate that matches the quality of the network environment based on the quality of the network environment.
  • the implementation process is simple and can be applied to many application scenarios.
  • the control method for video stream transmission may include S601, S202 to S204.
  • the network indicator information includes at least one of delay information and packet loss rate information.
  • the streaming party when the streaming party sends the video stream to the streaming terminal, it is specifically transmitted in the form of data packets, in which the data packets can carry the corresponding timestamp information when the streaming party sends the data packet, so as to
  • the streaming terminal is used to determine the sending time of the data packet based on the timestamp information.
  • the streaming terminal can also record the time when the data packet is received, that is, the reception time of the data packet. Therefore, in the embodiment of the present application, the delay information of the data packet during the reception process can be determined through the reception time and the transmission time, thereby obtaining the delay information of the video stream during the reception process.
  • S602. Receive the video stream sent by the streaming party. If the network indicator information includes packet loss rate information, obtain the video stream corresponding The received data amount of the data packet, and the sent data amount of the data packet is determined based on the data packet size carried in the data packet, and the packet loss rate information of the video stream during the reception process is determined based on the received data amount and the sent data amount.
  • the streaming party when the streaming party sends the video stream to the streaming terminal, it is transmitted in the form of data packets, and the data packets can also carry data packet size information corresponding to the data packets sent by the streaming party. , for the streaming terminal to determine the amount of data to be sent in the data packet based on the data packet size information. At the same time, the streaming terminal can also record the packet size of the received data packet when receiving the data packet, that is, the received data amount of the data packet. Therefore, in the embodiment of the present application, the packet loss rate information of the data packet during the reception process can be determined based on the received data amount and the sent data amount, thereby obtaining the packet loss rate information of the video stream during the reception process.
  • the network indicator information includes delay information and packet loss rate information as an example.
  • the network indicator information may also include other network indicator information such as throughput.
  • the network indicator information may be based on Other network indicator information determines the packet loss rate information of the video stream during the reception process. In practical applications, adaptive adjustments can be made.
  • the streaming terminal can quickly and accurately obtain network indicator information such as delay and packet loss rate by detecting the delay, packet loss rate, etc. of the video stream during the reception process, so as to determine the appropriate streaming code in the later stage. rate support.
  • the method of controlling video stream transmission can be executed by the streaming terminal 101 as the streaming party.
  • the control method for video stream transmission may include S701 to S702, and S201 to S203.
  • the push party includes the push terminal.
  • the pull request is used to instruct the push terminal to perform push processing to the video streaming server based on the pull code rate, and push the video stream to the pull terminal through the video streaming server.
  • the streaming terminal can directly send a streaming request to the streaming terminal, so that the streaming terminal can perform streaming processing to the video streaming server based on the streaming code rate carried in the streaming request, and then through the video stream The server sends the video stream to the streaming terminal.
  • S702 Receive the video stream corresponding to the streaming code rate sent by the video streaming server.
  • the streaming terminal sends a streaming request to the streaming terminal, and then the streaming terminal performs streaming processing to the video streaming server based on the streaming code rate carried in the streaming request, and then the video stream is processed by the video streaming server.
  • the push streaming terminal and accordingly, the pull streaming terminal receives the video stream corresponding to the pull streaming code rate sent by the video streaming server.
  • the streaming terminal sends the streaming request to the streaming terminal, so that the streaming terminal can make corresponding decisions (such as increasing/lowering the camera bit rate), thereby achieving adaptive adjustment of the bit rate.
  • the method of controlling video stream transmission can be executed by the streaming terminal 101 as the streaming party.
  • the control method for video stream transmission may include S801 to S802, and S201 to S203.
  • the push party includes the push terminal.
  • S801. Send a pull request to the video streaming server.
  • the pull request is used to instruct the video streaming server to perform push processing based on the pull code rate.
  • the streaming terminal can directly send a streaming request to the video streaming server, so that the video streaming server can perform streaming processing to the streaming terminal based on the streaming code rate carried in the streaming request.
  • S802 Receive the video stream corresponding to the streaming code rate sent by the video streaming server.
  • the streaming terminal sends a streaming request to the video streaming server, and then the video streaming server performs push processing to the streaming terminal based on the streaming code rate carried in the streaming request.
  • the streaming terminal receives the video The video stream sent by the streaming server corresponding to the streaming code rate.
  • the streaming terminal sends the streaming request to the video streaming server, so that the video streaming server can make corresponding decisions (for example, select the video stream that matches the pulling bit rate from multiple video streams corresponding to the pushing bit rate. Push the video stream corresponding to the bit rate) to achieve adaptive adjustment of the bit rate.
  • FIG. 9 is a flow chart of a method for controlling video streaming transmission according to an embodiment of the present application.
  • the method for controlling video streaming transmission can be executed by the streaming terminal 102 as the streaming party.
  • the control method of the video stream transmission includes at least S901 to S903. The details are as follows:
  • S901 Push the video stream to the video streaming server, so that the video streaming server pushes the video stream to the streaming terminal.
  • the push terminal sends the video stream to the video stream server, and then the video stream server sends the received video stream to the pull terminal.
  • the pull terminal can detect the video stream during the reception process.
  • Network indicator information and based on the detected network indicator information, determine the streaming code rate that matches the network indicator information, and then generate a streaming request based on the streaming code rate.
  • S902 Receive the streaming request sent by the streaming terminal; wherein, the streaming request carries the streaming code rate.
  • the streaming code rate is when the streaming terminal receives the video stream sent by the video streaming server, and based on the detected video stream, Determined by the network indicator information during the reception process.
  • the streaming terminal can send a streaming request to the streaming terminal, and accordingly, the streaming terminal receives the streaming request sent by the streaming terminal.
  • S903 Perform push processing to the video streaming server based on the pulling bit rate, so that the video streaming server pushes the video stream corresponding to the pulling bit rate to the pulling terminal.
  • the streaming terminal receives the streaming request sent by the streaming terminal, and then can perform streaming processing to the video streaming server based on the streaming code rate carried in the streaming request, and then the video streaming server will process the received streaming The video stream corresponding to the streaming bit rate is sent to the streaming terminal.
  • the push terminal receives the pull request carrying the pull code rate sent by the pull terminal, and then can perform push processing to the pull terminal based on the pull code rate, that is, the push terminal performs push processing to the pull terminal.
  • the video stream push by the streaming terminal adapts to network changes, achieving reasonable control of the push to the streaming terminal.
  • the control method for video stream transmission may include S1001 to S1002, and S902 to S903.
  • S1001 to S1002 are as follows:
  • the push terminal when the push terminal sends a video stream to the pull terminal in the early stage, it can perform push processing based on the set push code rate, where the push code rate can be set by the relevant staff. There can be one or more code rates.
  • S1002 Encode the video stream into video encoding blocks corresponding to the push bit rate, and push the video encoding blocks to the video streaming server.
  • the streaming terminal obtains the set streaming bit rate, and then can encode the video stream into video encoding blocks corresponding to the pushing bit rate, and send the video encoding blocks to the video streaming server.
  • multiple push streaming code rates are set; the video stream is encoded into video coding blocks corresponding to the push streaming code rate, and the video coding blocks are pushed to the video streaming server, which can at least include:
  • the video stream is encoded into multiple video encoding blocks corresponding to the push bit rates, and the multiple video encoding blocks corresponding to the push bit rates are pushed to the video streaming server.
  • the video stream will be encoded into the video stream encoding block B1 corresponding to the push streaming bit rate b1, and the video stream will be encoded into the push streaming bit rate.
  • the video stream encoding block B2 corresponding to b2 encodes the video stream into the video stream encoding block B3 corresponding to the push bit rate b3, and sends the video stream encoding blocks B1, B2, and B3 to the video stream server.
  • video encoding blocks corresponding to multiple push streaming bit rates are pushed to the video streaming servers respectively.
  • the video stream encoding blocks B1, B2, and B3 are sent to the video streaming server K1
  • the video stream encoding blocks B1, B2, and B3 is sent to the video stream server K2
  • the video stream encoding blocks B1, B2, and B3 are sent to the video stream server K3.
  • video encoding blocks corresponding to multiple push bit rates are pushed to the video streaming server respectively, and the video streaming server can make corresponding decisions later.
  • the set pushing code rate is one; the video stream is encoded into a video coding block corresponding to the pushing code rate, and the video coding block is pushed to the video streaming server, which may at least include: :
  • the video stream is encoded into a video stream encoding block B1 corresponding to the push bit rate b1, and the video stream encoding block B1 is sent to the video stream server.
  • video encoding blocks corresponding to a pushing bit rate are pushed to the video streaming servers respectively.
  • the video stream encoding block B1 is sent to the video streaming server K1
  • the video stream encoding block B1 is sent to the video streaming server K2.
  • a video encoding block corresponding to the push bit rate is pushed to the video streaming server, and the streaming terminal can make corresponding decisions later.
  • encoding the video stream into video coding blocks corresponding to the push bit rate, and pushing the video coding blocks to the video streaming server may at least include:
  • the streaming terminal can encode the video stream based on the streaming code rate to obtain multiple video encoding blocks with specified duration, and push the multiple video encoding blocks to the video stream through multiple links.
  • Streaming server when specified The length can be set by relevant staff.
  • the video stream is encoded based on the push bit rate b1, and multiple 5-second video encoding blocks are obtained.
  • the obtained multiple 5-second video encoding blocks can be sent to the video streaming server through the multiple links.
  • the streaming terminal may push multiple video encoding blocks to the video streaming server through multiple links based on the Real-Time Streaming Protocol (RTSP).
  • RTSP Real-Time Streaming Protocol
  • the amount of buffering required for the link at the same time can be reduced through chunking, the transmission delay of the video stream can be reduced, and the video stream resource can be avoided from being sent directly to the video stream server due to excessive size.
  • the video streaming server cannot adapt to downloads and other phenomena.
  • the transmission rate of the video stream can be improved through multiple links concurrently.
  • the push streaming terminal obtains the set push streaming code rate, encodes the video stream into video coding blocks corresponding to the push streaming code rate, and pushes the video coding blocks to the video streaming server, which is a streaming terminal.
  • the video streaming server which is a streaming terminal.
  • FIG. 11 is a flow chart of a method for controlling video streaming transmission according to an embodiment of the present application.
  • the method for controlling video streaming transmission can be executed by the second server 104 serving as the video streaming server.
  • the control method of the video stream transmission includes at least S1101 to S1103. The details are as follows:
  • S1101 Receive the video stream sent by the push terminal and push the video stream to the pull terminal.
  • the video stream server can receive the video stream sent by the push terminal, and send the received video stream to the pull terminal.
  • the pull terminal can detect the network indicator information of the video stream during the reception process, and Based on the detected network indicator information, determine the streaming code rate that matches the network indicator information, and then generate a streaming request based on the streaming code rate.
  • the streaming request carries the streaming code rate.
  • the streaming code rate is when the streaming terminal receives the video stream sent by the video streaming server, and based on the detected video stream, Determined by the network indicator information during the reception process.
  • the streaming terminal may send a streaming request to the video streaming server, and accordingly, the video streaming server receives the streaming request sent by the streaming terminal.
  • the video streaming server receives the streaming request sent by the streaming terminal, and can then perform push processing to the streaming terminal based on the streaming code rate carried in the streaming request.
  • the video streaming server receives the streaming request carrying the streaming code rate sent by the streaming terminal, and then can perform push processing to the streaming terminal based on the streaming code rate, that is, the video streaming server pushes the streaming code to the streaming terminal.
  • the video stream push by the streaming terminal adapts to network changes, achieving reasonable control of the push to the streaming terminal.
  • the method for controlling video streaming transmission can be executed by the video streaming server 103 as the streaming party.
  • the video stream transmission control method may include S1201 to S1203 and S1102.
  • the streaming terminal can encode the video stream into multiple video encoding blocks corresponding to the respective pushing bit rates, and push the multiple video encoding blocks corresponding to the respective pushing bit rates to the video streaming server.
  • the video streaming server receives multiple video encoding blocks corresponding to the streaming bit rates sent by the streaming terminal, that is, multiple video streams corresponding to the streaming bit rates.
  • S1202 Match the pull bit rate with the push bit rates of multiple video streams to obtain a matching result.
  • the video streaming server receives the streaming request sent by the streaming terminal, and then can match the streaming code rate carried in the streaming request with the push streaming code rates of multiple video streams to obtain a matching result.
  • the video stream corresponding to the successfully matched push bit rate can be pushed.
  • the video streaming server makes decisions by matching the pull bit rate with the push bit rates of multiple video streams, thereby realizing adaptive adjustment of the bit rate.
  • another method for controlling video streaming transmission is provided, and the method for controlling video streaming transmission can be executed by the video streaming server 103 as the streaming party.
  • the video stream transmission control method may also include S1301 to S1302 after S1202.
  • the video streaming server receives the streaming request sent by the streaming terminal, and then matches the streaming code rate carried in the streaming request with the push streaming code rates of multiple video streams to obtain a match. result.
  • the push bit rate and the pull bit rate of the multiple video streams can be calculated separately to obtain multiple difference values.
  • S1302 Select the video stream corresponding to the push bit rate with the smallest difference from multiple differences, and perform push processing on the selected video stream.
  • the video streaming server performs a difference operation on the push streaming code rate of multiple video streams and the pull streaming code rate to obtain multiple difference values. Afterwards, the push stream with the smallest difference value can be selected from the multiple difference values. The video stream corresponding to the bit rate, and the selected video stream will be pushed.
  • the video streaming server makes decisions by matching the pull bit rate with the push bit rates of multiple video streams, thereby realizing adaptive adjustment of the bit rate.
  • another method for controlling video streaming transmission is provided, and the method for controlling video streaming transmission can be executed by the video streaming server 103 as the streaming party.
  • the video stream transmission control method may also include S1401 to S1402 after S1103.
  • the streaming terminal receives the streaming request sent by the streaming terminal, and can then perform push processing to the video streaming server based on the streaming code rate carried in the streaming request.
  • the video streaming server receives the streaming request. The video stream sent by the streaming terminal corresponding to the streaming bit rate.
  • S1402 Push the video stream corresponding to the streaming bit rate to the streaming terminal.
  • the video streaming server receives the video stream corresponding to the pull bit rate sent by the push terminal, and then can send the received video stream corresponding to the pull bit rate to the pull terminal.
  • the video streaming server receives the video stream corresponding to the pull bit rate sent by the push terminal, and then can send the received video stream corresponding to the pull bit rate to the pull terminal, so that the pull terminal The video stream corresponding to the streaming bit rate can be successfully obtained.
  • FIG. 15 mainly includes pull streaming terminals, push streaming terminals, and video streaming servers (there are 3 servers in total, namely server A, server B, and server C.
  • Server C is a cloud server, and server B corresponds to the streaming terminal.
  • communications equipment of which:
  • the pull terminal is mainly used to receive the video stream sent by the push party (i.e. push terminal and video streaming server), and detect the network indicator information of the video stream during the reception process; and then determine the network indicator information based on the network indicator information. Match the pull code rate; then generate a pull request based on the pull code rate. The pull request is used to instruct the push party to perform push processing based on the pull code rate; and then send a pull request to the push party.
  • the push party i.e. push terminal and video streaming server
  • the push terminal is mainly used to push the video stream to the video stream server, so that the video stream server can push the video stream to the pull terminal; and to receive the pull request sent by the pull terminal, in which the pull request It carries the pull code rate.
  • the pull code rate is determined by the pull terminal receiving the video stream sent by the video streaming server and based on the detected network indicator information during the reception process of the video stream; and then based on the pull code rate.
  • the video streaming server performs push processing, so that the video streaming server pushes the video stream corresponding to the pull streaming code rate to the pull streaming terminal.
  • the video streaming server is mainly used to receive the video stream sent by the push terminal and push the video stream to the pull terminal; and to receive the pull request sent by the pull terminal; where the pull request carries the pull code. rate, the streaming code rate is the final
  • the terminal receives the video stream sent by the video streaming server and determines it based on the detected network indicator information during the reception process of the video stream; and then performs push processing to the streaming terminal based on the streaming code rate.
  • Communication equipment is mainly used to provide support for mutual communication between pull terminals, push terminals and video streaming servers. It can include 4G/5G base stations, RSU (Road Side Unit), Wifi, 5G CPE ( Customer Premise(s)Equipment) etc.
  • Figure 16 is a flow chart of a method for controlling video stream transmission according to an embodiment of the present application. As shown in Figure 16, the control method of the video stream transmission includes at least S1601 to S1608. The details are as follows:
  • the streaming terminal pushes a video stream corresponding to the streaming code rate to the video streaming server.
  • the streaming terminal can be preset with a streaming service, where the streaming service is a program code written by a developer to implement the streaming function.
  • the streaming terminal has a streaming requirement, , start the push service, and can implement push based on the detected push command.
  • the video streaming server may be an RTSP server, and the push bit rate may be b1, that is, the video stream corresponding to the push bit rate b1 is sent to the video stream servers A, B, and C.
  • the video stream may be in any video format, such as ".mp4", “.flv”, “.avi”, etc. It can be understood that the video stream contains multiple frames of images, and the multiple frame images can also be in any image format, such as ".gif", “.eps”, etc.
  • the streaming terminal can encode the video stream based on the one streaming code rate, obtain multiple video encoding blocks with specified duration, and push the multiple video encoding blocks to the video streaming server through multiple links. middle.
  • the video streaming server receives a video stream corresponding to the push bit rate sent by the push terminal, and pushes a video stream corresponding to the push bit rate to the pull terminal.
  • the video streaming servers A, B, and C send the video streams corresponding to the push streaming code rate b1 to the pull streaming terminal.
  • the streaming terminal receives a video stream corresponding to the push bit rate sent by the video streaming server, and detects network indicator information during the reception process of a video stream corresponding to the push bit rate.
  • the streaming terminal can be preset with a streaming service, where the streaming service is a program code written by a developer to implement the streaming function.
  • the streaming terminal when the streaming terminal has a streaming requirement, , starts the streaming service, and can implement streaming based on the detected streaming command.
  • the network indicator information includes at least one of delay information and packet loss rate information.
  • delay information if the network indicator information includes delay information, the reception time of the data packet corresponding to the video stream is obtained, the sending time of the data packet is determined based on the timestamp information carried in the data packet, and the video stream is determined based on the receiving time and the sending time. Delay information during reception. If the network indicator information includes packet loss rate information, obtain the received data amount of the data packet corresponding to the video stream, and determine the sent data amount of the data packet based on the data packet size carried in the data packet, based on the received data amount and the sent data amount. Packet loss rate information of the video stream during reception.
  • the streaming terminal determines the streaming code rate that matches the network indicator information based on the network indicator information.
  • the streaming terminal determines the quality of the network environment in which the streaming terminal is located based on the relationship between the value of the network indicator and the preset indicator threshold. Among them, if the network environment is the first level of quality, the streaming code rate is determined to be the first value; if the network environment is the second level of quality, the streaming code rate is determined to be the second value; the quality of the first level is low For the second level of quality, the first value is smaller than the second value.
  • the streaming terminal may also receive relevant network information on the base station side sent by the communication device, and then determine a streaming code rate that matches the network indicator information based on the relevant network information.
  • the streaming terminal generates a streaming request based on the streaming code rate and sends the streaming request to the streaming terminal.
  • the streaming terminal sends the video stream of a single pushing code rate version (i.e. push streaming code rate b1) to the three video streaming servers A, B, and C respectively; therefore, the streaming terminal is still not sure whether to pull the stream For the video stream with the code rate required by the terminal, the pull terminal needs to notify the push terminal of the pull code rate to make decisions (such as increasing/lowering the camera code rate), so as to achieve adaptive adjustment of the code rate.
  • a single pushing code rate version i.e. push streaming code rate b1
  • the pull terminal needs to notify the push terminal of the pull code rate to make decisions (such as increasing/lowering the camera code rate), so as to achieve adaptive adjustment of the code rate.
  • the push terminal receives the pull request sent by the pull terminal, and performs push processing to the video streaming server based on the pull code rate.
  • the video streaming server receives the video stream corresponding to the pull streaming bit rate sent by the push streaming terminal, and pushes the video stream corresponding to the pull streaming bit rate to the pull streaming terminal.
  • the streaming terminal receives the video stream corresponding to the streaming bit rate sent by the video streaming server, and plays based on the video stream corresponding to the streaming bit rate.
  • the video stream transmission control method proposed in the embodiments of this application is suitable for application scenarios with low bandwidth requirements.
  • Figure 17 is a flow chart of a method for controlling video stream transmission according to an embodiment of the present application. As shown in Figure 17, the control method of the video stream transmission includes at least S1701 to S1707. The details are as follows:
  • the streaming terminal pushes video streams corresponding to multiple streaming bit rates to the video streaming server.
  • the streaming terminal can be preset with a streaming service, where the streaming service is a program code written by a developer to implement the streaming function.
  • the streaming terminal has a streaming requirement, , start the push service, and can implement push based on the detected push command.
  • the video streaming server may be an RTSP server, and the multiple streaming code rates may be b1, b2, and b3, that is, the video streams corresponding to the streaming code rates b1, b2, and b3 are sent to the video streaming server.
  • the video stream may be in any video format, such as ".mp4", “.flv”, “.avi”, etc. It can be understood that the video stream contains multiple frames of images, and the multiple frame images can also be in any image format, such as ".gif", “.eps”, etc.
  • the streaming terminal can encode the video stream based on the multiple streaming bit rates to obtain multiple video encoding blocks with specified durations, and push the multiple video encoding blocks to the video stream through multiple links. in the streaming server.
  • the video streaming server receives multiple video streams corresponding to respective push bit rates sent by the push terminal, and pushes the multiple video streams corresponding to respective push bit rates to the pull terminal.
  • the video streaming servers A, B, and C send the video streams corresponding to the push streaming code rates b1, b2, and b3 respectively to the pull streaming terminal.
  • the streaming terminal receives multiple video streams corresponding to respective push bit rates sent by the video streaming server, and detects network indicator information during the reception process of multiple video streams corresponding to respective push bit rates.
  • the streaming terminal can be preset with a streaming service, where the streaming service is a program code written by a developer to implement the streaming function.
  • the streaming terminal when the streaming terminal has a streaming requirement, , starts the streaming service, and can implement streaming based on the detected streaming command.
  • the network indicator information includes at least one of delay information and packet loss rate information.
  • delay information if the network indicator information includes delay information, the reception time of the data packet corresponding to the video stream is obtained, the sending time of the data packet is determined based on the timestamp information carried in the data packet, and the video stream is determined based on the receiving time and the sending time. Delay information during reception interest. If the network indicator information includes packet loss rate information, obtain the received data amount of the data packet corresponding to the video stream, and determine the sent data amount of the data packet based on the data packet size carried in the data packet, based on the received data amount and the sent data amount. Packet loss rate information of the video stream during reception.
  • the streaming terminal determines the streaming code rate that matches the network indicator information based on the network indicator information.
  • the streaming terminal determines the quality of the network environment in which the streaming terminal is located based on the relationship between the value of the network indicator and the preset indicator threshold. Among them, if the network environment is the first level of quality, the streaming code rate is determined to be the first value; if the network environment is the second level of quality, the streaming code rate is determined to be the second value; the quality of the first level is low For the second level of quality, the first value is smaller than the second value.
  • the streaming terminal may also receive relevant network information on the base station side sent by the communication device, and then determine a streaming code rate that matches the network indicator information based on the relevant network information.
  • the streaming terminal generates a streaming request based on the streaming code rate and sends the streaming request to the video streaming server.
  • the streaming terminal sends video streams of multiple push code rate versions (ie, push code rates b1, b2, b3) to the three video stream servers A, B, and C respectively; therefore, there is no need to The push terminal makes the decision, and the pull terminal only needs to notify the video streaming server of the pull code rate for decision-making (for example, select and pull the stream from three video streams corresponding to push code rates b1, b2, and b3. Push the video stream corresponding to the bit rate that matches the bit rate), thereby achieving adaptive adjustment of the bit rate.
  • push code rate versions ie, push code rates b1, b2, b3
  • the video streaming server receives the streaming request sent by the streaming terminal, and performs push processing to the streaming terminal based on the streaming code rate.
  • the streaming terminal receives the video stream corresponding to the streaming code rate sent by the video streaming server, and plays based on the video stream corresponding to the streaming code rate.
  • control method for video stream transmission proposed in the embodiments of this application is suitable for application scenarios with high latency requirements.
  • FIG 18 is a block diagram of a control device for video stream transmission according to an embodiment of the present application. As shown in Figure 18, the video stream transmission control device is applied to the streaming terminal.
  • the device includes:
  • the receiving module 1801 is configured to receive the video stream sent by the streaming party, and detect the network indicator information of the video stream during the receiving process;
  • the determination module 1802 is configured to determine the streaming code rate that matches the network indicator information based on the network indicator information;
  • the generation module 1803 is configured to generate a pull request based on the pull code rate, and the pull request is used to instruct the push party to perform push processing based on the pull code rate;
  • the sending module 1804 is configured to send the pull request to the push party.
  • the determination module 1802 is specifically configured as:
  • a streaming code rate that matches the quality of the network environment is determined; wherein the quality of the network environment has a positive correlation with the streaming code rate.
  • the determination module 1802 is specifically configured as:
  • the quality of the network environment in which the streaming terminal is located is determined.
  • the network indicator has multiple values; the determination module 1802 is also specifically configured as:
  • the first detection result indicates that there are a specified number of values among the plurality of values that are greater than the preset indicator threshold, then it is determined that the network environment in which the streaming terminal is located is of the first level of quality;
  • the network environment in which the streaming terminal is located is of the second level of quality; wherein, The quality of the first level is lower than the quality of the second level.
  • the network indicator has multiple values; the determination module 1802 is also specifically configured as:
  • the second detection result indicates that the average value is greater than the preset index threshold, it is determined that the network environment in which the streaming terminal is located is of the first level of quality
  • the second detection result indicates that the average value is less than or equal to the preset index threshold, it is determined that the network environment in which the streaming terminal is located is of the second level of quality; wherein, the first level of quality Lower than said second level of quality.
  • the determination module 1802 is specifically configured as:
  • the network indicator information includes at least one of delay information and packet loss rate information;
  • the receiving module 1801 is specifically configured as:
  • the receiving time of the data packet corresponding to the video stream is obtained, and the sending time of the data packet is determined based on the timestamp information carried in the data packet.
  • the receiving time and the sending time determine the delay information of the video stream during the receiving process;
  • the network indicator information includes the packet loss rate information
  • obtain the received data amount of the data packet corresponding to the video stream and determine the sent data amount of the data packet based on the data packet size carried in the data packet. , determining the packet loss rate information of the video stream during the reception process based on the received data amount and the sent data amount.
  • the sending module 1804 is specifically configured as:
  • the pull request is used to instruct the push terminal to perform push processing to the video streaming server based on the pull code rate, and use the video streaming server to The video stream is pushed to the streaming terminal;
  • the sending module 1804 is specifically configured as:
  • FIG 19 is a block diagram of a control device for video stream transmission according to an embodiment of the present application. As shown in Figure 19, the control device for video streaming transmission is applied to the streaming terminal.
  • the device includes:
  • the streaming module 1901 is configured to push the video stream to the video streaming server, so that the video streaming server pushes the video stream to the streaming terminal;
  • the receiving module 1902 is configured to receive a streaming request sent by the streaming terminal; wherein the streaming request carries a streaming code rate, and the streaming code rate is the video stream received by the streaming terminal.
  • the video stream sent by the server is determined based on the detected network indicator information during the reception of the video stream;
  • the push module 1901 is also configured to perform push processing to the video streaming server based on the pull code rate, so that the video stream server pushes the video stream corresponding to the pull code rate to the video stream. in the streaming terminal.
  • the streaming module 1901 is specifically configured as:
  • the video stream is encoded into video encoding blocks corresponding to the push bit rate, and the video encoding blocks are pushed to the video stream server.
  • the push module 1901 is also specifically configured as:
  • the video stream is encoded into multiple video encoding blocks corresponding to the push bit rates, and the video encoding blocks corresponding to the multiple push bit rates are pushed.
  • the video stream is encoded into a video coding block corresponding to the push code rate, and the video coding block corresponding to the push code rate is pushed to the video in the streaming server.
  • the push module 1901 is also specifically configured as:
  • the plurality of video encoding blocks are pushed to the video streaming server through multiple links.
  • FIG 20 is a block diagram of a control device for video stream transmission according to an embodiment of the present application. As shown in Figure 20, the video stream transmission control device is applied to the video stream server, and the device includes:
  • the push module 2001 is configured to receive the video stream sent by the push terminal and push the video stream to the pull terminal;
  • the receiving module 2002 is configured to receive a streaming request sent by the streaming terminal; wherein the streaming request carries a streaming code rate, and the streaming code rate is the video stream received by the streaming terminal.
  • the video stream sent by the server is determined based on the detected network indicator information during the reception of the video stream;
  • the streaming module 2001 is also configured to perform streaming processing to the streaming terminal based on the streaming code rate.
  • the receiving module 2002 is specifically configured as:
  • Push module 2001 the specific configuration is:
  • the video stream corresponding to the successfully matched push bit rate is pushed.
  • the streaming module 2001 is also specifically configured as:
  • the receiving module 2002 is specifically configured as:
  • Embodiments of the present application also provide an electronic device, including: one or more processors; and a memory for storing one or more programs.
  • the electronic device When the one or more programs are executed by the one or more processors, the electronic device The device implements the previous control method for video streaming transmission.
  • FIG. 21 is a schematic structural diagram of a computer system suitable for implementing an electronic device according to an embodiment of the present application.
  • the computer system 2100 includes a central processing unit (Central Processing Unit, CPU) 2101, which can be loaded into a random computer according to a program stored in a read-only memory (Read-Only Memory, ROM) 2102 or from a storage part 2108. Access the program in the memory (Random Access Memory, RAM) 2103 to perform various appropriate actions and processing, such as performing the method in the above embodiment. In RAM 2103, various programs and data required for system operation are also stored.
  • CPU 2101, ROM 2102 and RAM 2103 are connected to each other through bus 2104.
  • An input/output (I/O) interface 2105 is also connected to bus 2104.
  • the following components are connected to the I/O interface 2105: an input part 2106 including a keyboard, a mouse, etc.; an output part 2107 including a cathode ray tube (Cathode Ray Tube, CRT), a liquid crystal display (Liquid Crystal Display, LCD), etc., and a speaker, etc. ; a storage section 2108 including a hard disk, etc.; and a communication section 2109 including a network interface card such as a LAN (Local Area Network) card, a modem, etc.
  • the communication section 2109 performs communication processing via a network such as the Internet.
  • Driver 2110 is also connected to I/O interface 2105 as needed.
  • Removable media 2111 such as magnetic disks, optical disks, magneto-optical disks, semiconductor memories, etc., are installed on the drive 2110 as needed, so that a computer program read therefrom is installed into the storage portion 2108 as needed.
  • the process described above with reference to the flowchart may be implemented as a computer software program.
  • embodiments of the present application include a computer program product, which includes a computer program carried on a computer-readable medium.
  • the computer program includes a computer program for executing the method shown in the flowchart.
  • the computer program may be downloaded and installed from the network via communications portion 2109, and/or installed from removable media 2111.
  • CPU central processing unit
  • the computer-readable medium shown in the embodiments of the present application may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two.
  • the computer-readable medium may be, for example, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof.
  • Computer readable media may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard drive, random access memory (RAM), read only memory (ROM), erasable programmable Read-only memory (Erasable Programmable Read Only Memory, EPROM), flash memory, optical fiber, portable compact disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical storage device, magnetic storage device, or any suitable one of the above combination.
  • a computer-readable medium may be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, in which a computer-readable computer program is carried. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above.
  • a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that may be sent, propagated, or transmitted for use by or in connection with an instruction execution system, apparatus, or device. Programs used in conjunction with it. Computer programs embodied on computer-readable media may be transmitted using any suitable medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
  • each block in the flow chart or block diagram may represent a module, program segment, or part of the code.
  • the above-mentioned module, program segment, or part of the code includes one or more executable components for implementing the specified logical function. instruction.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown one after another may actually execute substantially in parallel, or they may sometimes execute in the reverse order, depending on the functionality involved.
  • each block in the block diagram or flowchart illustration, and combinations of blocks in the block diagram or flowchart illustration can be implemented by special purpose hardware-based systems that perform the specified functions or operations, or may be implemented by special purpose hardware-based systems that perform the specified functions or operations. Achieved by a combination of specialized hardware and computer instructions.
  • the units involved in the embodiments of this application can be implemented in software or hardware, and the described units can also be provided in a processor. Among them, the names of these units do not constitute a limitation on the unit itself under certain circumstances.
  • Another aspect of the present application also provides a computer-readable medium on which a computer program is stored.
  • the computer program is executed by a processor, the previous control method for video stream transmission is implemented.
  • the computer-readable medium may be included in the electronic device described in the above embodiments, or may exist separately without being assembled into the electronic device.
  • Another aspect of the application also provides a computer program product or computer program, which includes computer instructions stored in a computer-readable medium.
  • the processor of the computer device reads the computer instructions from the computer-readable medium, and the processor executes the computer instructions, so that the computer device executes the control method for video streaming transmission provided in the above embodiments.

Abstract

本申请实施例公开了一种视频流传输的控制方法及装置、设备、介质,可应用于智慧交通、辅助驾驶、云技术、人工智能等各种场景。该视频流传输的控制方法包括:接收推流方发送的视频流,并检测视频流在接收过程中的网络指标信息,基于网络指标信息,确定与网络指标信息相匹配的拉流码率,基于拉流码率生成拉流请求,拉流请求用于指示推流方基于拉流码率进行推流处理,向推流方发送拉流请求。本申请的技术方案使得视频流的传输与网络变化相适配,实现了对视频流传输的合理控制。

Description

视频流传输的控制方法及装置、设备、介质
优先权信息
本申请要求于2022年7月12日提交中国专利局、申请号为202210818435.1、申请名称为“视频流传输的控制方法及装置、设备、介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,具体而言,涉及一种视频流传输的控制方法、视频流传输的控制装置、电子设备,以及计算机可读介质。
背景技术
目前,视频流传输可应用于智慧交通、辅助驾驶、云技术、人工智能等各种场景中,例如在辅助驾驶场景中,采集方可以将采集到的道路中车辆相关的视频流推流至拉流终端,这样拉流终端就可以基于接收到的视频流进行相应处理,以实现辅助驾驶等。
其中,在进行视频流传输的过程中,网络通常会发生变化,而网络变化又会在一定程度上影响视频流传输。因此,如何合理控制视频流的传输,以与网络变化相适配是亟待解决的问题。
发明内容
本申请实施例提供了一种视频流传输的控制方法及装置、设备、介质,进而至少在一定程度上使得视频流的传输与网络变化相适配,实现了对视频流传输的合理控制。
第一方面,本申请实施例提供了一种视频流传输的控制方法,应用于拉流终端,所述方法包括:接收推流方发送的视频流,并检测所述视频流在接收过程中的网络指标信息;基于所述网络指标信息,确定与所述网络指标信息相匹配的拉流码率;基于所述拉流码率生成拉流请求,所述拉流请求用于指示所述推流方基于所述拉流码率进行推流处理;向所述推流方发送所述拉流请求。
第二方面,本申请实施例提供了一种视频流传输的控制方法,应用于推流终端,所述方法包括:将视频流推流至视频流服务器中,以使所述视频流服务器将所述视频流推流至拉流终端中;接收所述拉流终端发送的拉流请求;其中,所述拉流请求中携带有拉流码率,所述拉流码率是所述拉流终端接收所述视频流服务器发送的视频流,并基于检测到的所述视频流在接收过程中的网络指标信息所确定的;基于所述拉流码率向所述视频流服务器进行推流处理,以使所述视频流服务器将所述拉流码率对应的视频流推流至所述拉流终端中。
第三方面,本申请实施例提供了一种视频流传输的控制方法,应用于视频流服务器,所述方法包括:接收推流终端发送的视频流,并将所述视频流推流至拉流终端中;接收所述拉流终端发送的拉流请求;其中,所述拉流请求中携带有拉流码率,所述拉流码率是所述拉流终端接收所述视频流服务器发送的视频流,并基于检测到的所述视频流在接收过程中的网络指标信息所确定的;基于所述拉流码率向所述拉流终端进行推流处理。
第四方面,本申请实施例提供了一种视频流传输的控制装置,应用于拉流终端,所述装置包括:接收模块,配置为接收推流方发送的视频流,并检测所述视频流在接收过程中的网络指标信息;确定模块,配置为基于所述网络指标信息,确定与所述网络指标信息相匹配的 拉流码率;生成模块,配置为基于所述拉流码率生成拉流请求,所述拉流请求用于指示所述推流方基于所述拉流码率进行推流处理;发送模块,配置为向所述推流方发送所述拉流请求。
第五方面,本申请实施例提供了一种视频流传输的控制装置,应用于推流终端,所述装置包括:推流模块,配置为将视频流推流至视频流服务器中,以使所述视频流服务器将所述视频流推流至拉流终端中;接收模块,配置为接收所述拉流终端发送的拉流请求;其中,所述拉流请求中携带有拉流码率,所述拉流码率是所述拉流终端接收所述视频流服务器发送的视频流,并基于检测到的所述视频流在接收过程中的网络指标信息所确定的;所述推流模块,还配置为基于所述拉流码率向所述视频流服务器进行推流处理,以使所述视频流服务器将所述拉流码率对应的视频流推流至所述拉流终端中。
第六方面,本申请实施例提供了一种视频流传输的控制装置,应用于视频流服务器,所述装置包括:推流模块,配置为接收推流终端发送的视频流,并将所述视频流推流至拉流终端中;接收模块,配置为接收所述拉流终端发送的拉流请求;其中,所述拉流请求中携带有拉流码率,所述拉流码率是所述拉流终端接收所述视频流服务器发送的视频流,并基于检测到的所述视频流在接收过程中的网络指标信息所确定的;所述推流模块,还配置为基于所述拉流码率向所述拉流终端进行推流处理。
第七方面,本申请实施例提供了一种电子设备,包括一个或多个处理器;存储器,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述电子设备实现如上所述的视频流传输的控制方法。
第八方面,本申请实施例提供了一种计算机可读介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如上所述的视频流传输的控制方法。
第九方面,本申请实施例提供了一种计算机程序产品,包括计算机指令,所述计算机指令被处理器执行时实现如上所述的视频流传输的控制方法。
在本申请实施例提供的技术方案中:
拉流终端,一方面,通过检测视频流在接收过程中的网络指标信息,并可以基于网络指标信息,确定出与网络指标信息相匹配的拉流码率,进而将该拉流码率以拉流请求的形式发送至推流方,使得推流方可以基于拉流码率进行推流处理,这样视频流的传输可以与网络变化相适配,实现了对视频流传输的合理控制。又一方面,由拉流终端侧执行基于网络指标信息,确定出与网络指标信息相匹配的拉流码率的逻辑处理,可以减轻服务端侧的处理压力,也可以避免不必要的消息传输所造成的资源消耗的现象。
推流终端,通过接收拉流终端所发送的携带有拉流码率的拉流请求,进而可以基于该拉流码率向拉流终端进行推流处理,即推流终端向拉流终端进行的视频流推流与网络变化相适配,实现了向拉流终端推流的合理控制。
视频流服务器,通过接收拉流终端所发送的携带有拉流码率的拉流请求,进而可以基于该拉流码率向拉流终端进行推流处理,即视频流服务器向拉流终端进行的视频流推流与网络变化相适配,实现了向拉流终端推流的合理控制。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本申请。
附图说明
图1是可以应用本申请实施例的技术方案的示例性实施环境的示意图;
图2是本申请的一示例性实施例示出的视频流传输的控制方法的流程图;
图3是本申请的另一示例性实施例示出的视频流传输的控制方法的流程图;
图4是本申请的另一示例性实施例示出的视频流传输的控制方法的流程图;
图5是本申请的另一示例性实施例示出的视频流传输的控制方法的流程图;
图6是本申请的另一示例性实施例示出的视频流传输的控制方法的流程图;
图7是本申请的另一示例性实施例示出的视频流传输的控制方法的流程图;
图8是本申请的另一示例性实施例示出的视频流传输的控制方法的流程图;
图9是本申请的一示例性实施例示出的视频流传输的控制方法的流程图;
图10是本申请的另一示例性实施例示出的视频流传输的控制方法的流程图;
图11是本申请的一示例性实施例示出的视频流传输的控制方法的流程图;
图12是本申请的另一示例性实施例示出的视频流传输的控制方法的流程图;
图13是本申请的另一示例性实施例示出的视频流传输的控制方法的流程图;
图14是本申请的另一示例性实施例示出的视频流传输的控制方法的流程图;
图15是可以应用本申请实施例的技术方案的示例性实施环境的示意图;
图16是本申请的一示例性实施例示出的视频流传输的控制方法的流程图;
图17是本申请的一示例性实施例示出的视频流传输的控制方法的流程图;
图18是本申请的一个实施例的视频流传输的控制装置的框图;
图19是本申请的一个实施例的视频流传输的控制装置的框图;
图20是本申请的一个实施例的视频流传输的控制装置的框图;
图21是适于用来实现本申请实施例的电子设备的计算机系统的结构示意图。
具体实施方式
这里将详细地对示例性实施例执行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相相同的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相同的装置和方法的例子。
附图中所示的方框图仅仅是功能实体,不一定必须与物理上独立的实体相对应。即,可以采用软件形式来实现这些功能实体,或在一个或多个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。
附图中所示的流程图仅是示例性说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解,而有的操作/步骤可以合并或部分合并,因此实际执行的顺序有可能根据实际情况改变。
需要说明的是,在本申请中提及的“多个”是指两个或者两个以上。“和/或”描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。
目前,在进行视频流传输的过程中,网络通常会发生变化,其中网络变化会在一定程度上影响视频流传输。而相关技术中对于如何合理控制视频流的传输,以与网络变化相适配并未有明确的方案。
请参阅图1,图1是本申请涉及的一种实施环境的示意图。该实施环境主要包括拉流终端101、推流终端102、视频流服务器103。可以理解的是,拉流终端101、推流终端102,以及视频流服务器103之间可以通过有线或者无线网络进行通信。其中:
拉流终端101和/或推流终端102包括但不限于智能手机、平板、笔记本电脑、计算机、智能语音交互设备、智能家电、车载终端、飞行器等。
视频流服务器103可以是提供各种服务的服务器,其可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、CDN(Content Delivery Network,内容分发网络)以及大数据和人工智能平台等基础云计算服务的云服务器,本处不对此进行限制。
需要说明的是,图1中的拉流终端101、推流终端102,以及视频流服务器103的数目仅仅是示意性的,根据实际需要,可以具有任意数量的拉流终端101、推流终端102,以及视频流服务器103。
在本申请的一个实施例中,视频流传输的控制方法可以由拉流终端101执行,此时拉流终端101即作为拉流方。
示例性地,拉流终端101接收推流方发送的视频流,并检测视频流在接收过程中的网络指标信息;之后基于网络指标信息,确定与网络指标信息相匹配的拉流码率;之后基于拉流码率生成拉流请求,拉流请求用于指示推流方基于拉流码率进行推流处理;之后向推流方发送拉流请求。
在本申请的一个实施例中,视频流传输的控制方法可以由推流终端102执行,此时推流终端102即作为推流方。
示例性地,推流终端102将视频流推流至视频流服务器中,以使视频流服务器将视频流推流至拉流终端中;以及接收拉流终端发送的拉流请求,其中拉流请求中携带有拉流码率,拉流码率是拉流终端接收视频流服务器发送的视频流,并基于检测到的视频流在接收过程中的网络指标信息所确定的;之后基于拉流码率向视频流服务器进行推流处理,以使视频流服务器将拉流码率对应的视频流推流至拉流终端中。
在本申请的一个实施例中,视频流传输的控制方法可以由视频流服务器103执行,此时视频流服务器103即作为推流方。
示例性地,视频流服务器103接收推流终端发送的视频流,并将视频流推流至拉流终端中;以及接收拉流终端发送的拉流请求;其中,拉流请求中携带有拉流码率,拉流码率是拉流终端接收视频流服务器发送的视频流,并基于检测到的视频流在接收过程中的网络指标信息所确定的;之后基于拉流码率向拉流终端进行推流处理。
图1所示实施例的技术方案可以应用于各种场景中,包括但不限于智慧交通、辅助驾驶、云技术、人工智能等;在实际应用中,可以根据具体应用场景进行相应调整。
示例性地,如果应用于智慧交通或辅助驾驶场景中,推流终端102可以是车载终端、导航终端等,拉流终端101可以是计算机、智能手机、平板、笔记本电脑等。例如计算机接收车载终端发送的视频流,并检测视频流在接收过程中的网络指标信息,并基于网络指标信息,确定与网络指标信息相匹配的拉流码率,进而基于拉流码率生成拉流请求,并向车载终端发送拉流请求;相应地,车载终端可以接收计算机发送的拉流请求,并基于拉流请求中携 带的拉流码率向视频流服务器进行推流处理,以使视频流服务器将拉流码率对应的视频流推流至计算机中;相应地,计算机可以接收视频流服务器发送的与拉流请求中所携带的拉流码率对应的视频流。
示例性地,如果应用于云技术或人工智能场景中,视频流服务器103可以是位于云端的服务器。例如计算机接收车载终端发送的视频流,并检测视频流在接收过程中的网络指标信息,并基于网络指标信息,确定与网络指标信息相匹配的拉流码率,进而基于拉流码率生成拉流请求,并向车载终端发送拉流请求;相应地,云端服务器可以接收计算机发送的拉流请求,并基于拉流码率向计算机进行推流处理;相应地,计算机可以接收云端服务器发送的与拉流请求中所携带的拉流码率对应的视频流。
需要说明的是,在本申请的具体实施方式中,涉及到对象相关的数据例如网络指标信息,当本申请实施例运用到具体产品或技术中时,需要获得对象许可或者同意,且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准。
以下对本申请实施例的技术方案的各种实现细节进行详细阐述:
请参阅图2,图2是本申请的一个实施例示出的视频流传输的控制方法的流程图,该视频流传输的控制方法可以由作为拉流方的拉流终端101来执行。如图2所示,该视频流传输的控制方法至少包括S201至S204,详细介绍如下:
S201,接收推流方发送的视频流,并检测视频流在接收过程中的网络指标信息。
本申请实施例中视频流可以是任意场景下所产生的视频流,包括但不限于直播场景中直播终端所产生的视频流、智慧交通或辅助驾驶场景中车载终端所产生的视频流(可以是摄像头采集到道路图像对应的视频流并发送至车载终端的)等。
本申请实施例中推流方包括但不限于推流终端、视频流服务器等。其中,推流终端是视频流的真正产生/来源方;例如在直播场景中推流终端是主播所对应的直播终端,随着直播的进行,直播终端会产生相应的视频流。而视频流服务器则是推流终端将视频流发送至拉流终端所需经过的中间方,即推流终端产生视频流,之后是将视频流发送至视频流服务器,之后再由视频流服务器将接收到的视频流发送至拉流终端;例如承接前述示例,直播终端产生视频流,之后是将视频流发送至视频流服务器,之后再由视频流服务器将接收到的视频流发送至拉流终端中。
相应地,本申请实施例中拉流终端即为拉流方,其是接收视频流的一方;例如承接前述示例,在直播场景中拉流终端是观看直播的观众所对应的观看终端,即直播终端产生视频流,之后是将视频流发送至视频流服务器,之后再由视频流服务器将接收到的视频流发送至观看终端中,从而观众可以通过观看终端所拉取到的视频流观看到主播所直播的内容。
可以理解的是,视频流服务器通常为多个,其中多个视频流服务器中的任一个或多个可以与拉流终端对应;例如共有3个视频流服务器,其中有2个视频流服务器是云端服务器,有1个服务器是与拉流终端所对应的物理服务器。本申请实施例中网络指标信息是与网络指标相关的信息,其中网络指标是能够反映网络质量优劣的指标,其包括但不限于时延、丢包率、吞吐量和卡顿率等。
S202,基于网络指标信息,确定与网络指标信息相匹配的拉流码率。
本申请实施例中拉流终端检测视频流在接收过程中的网络指标信息,之后就可以基于网络指标信息,确定与网络指标信息相匹配的拉流码率。
本申请实施例中拉流码率是拉流终端向推流方进行拉流时所确定的一个适配当前网络变化的码率,其中码率是表示单位时间内传送比特的数目,其单位为比特/秒(bit/s或bps)、千比特/秒(kbit/s或kbps,k=1000)或兆比特/秒(Mbps,M=1000000);可以理解的是,比特率越高,每秒传送数据就越多,画质就越清晰,相应地,编码后的文件就越大,反之,比特率越低,每秒传送数据就越小,画质就越模糊,相应地,编码后的文件就越小。
S203,基于拉流码率生成拉流请求,拉流请求用于指示推流方基于拉流码率进行推流处理。
本申请实施例中拉流终端基于网络指标信息,确定与网络指标信息相匹配的拉流码率,之后可以基于拉流码率生成拉流请求,以通过拉流请求指示推流方基于拉流码率进行推流处理。其中拉流方基于拉流码率进行推流处理请参见下述实施例中的详细介绍。
S204,向推流方发送拉流请求。
本申请实施例中拉流终端基于拉流码率生成拉流请求,之后就可以向推流方发送拉流请求。
本申请实施例中拉流终端通过检测视频流在接收过程中的网络指标信息,并可以基于网络指标信息,确定出与网络指标信息相匹配的拉流码率,进而将该拉流码率以拉流请求的形式发送至推流方,使得推流方可以基于拉流码率进行推流处理,这样视频流的传输可以与网络变化相适配,实现了对视频流传输的合理控制。同时由拉流终端侧执行基于网络指标信息,确定出与网络指标信息相匹配的拉流码率的逻辑处理,可以减轻服务端侧的处理压力,也可以避免不必要的消息传输所造成的资源消耗的现象。
在本申请的一个实施例中,提供了另一种视频流传输的控制方法,该视频流传输的控制方法可以由作为拉流方的拉流终端101来执行。如图3所示,该视频流传输的控制方法可以包括S301至S302、S201、S203至S204。
S301至S302详细介绍如下:
S301,基于网络指标信息,确定拉流终端所处网络环境的质量。
如前述实施例所述,网络指标可以反映网络质量的优劣;因此,本申请实施例中可以基于检测到的网络指标信息,确定拉流终端所处网络环境的质量的优劣。
S302,基于网络环境的质量,确定与网络环境的质量相匹配的拉流码率;其中,网络环境的质量与拉流码率呈正相关关系。
本申请实施例中拉流终端基于网络指标信息,确定拉流终端所处网络环境的质量,之后就可以基于网络环境的质量,确定与网络环境的质量相匹配的拉流码率,以得到一个适配当前网络变化的拉流码率。
可以理解的是,网络环境的质量与拉流码率呈正相关关系,即网络环境的质量越好,则所确定的拉流码率就越大,反之,网络环境的质量越差,则所确定的拉流码率就越小。需要说明的是,图3所示中S201、S203至S204的详细介绍请参见图2所示的S201、S203至S204,在此不再赘述。
本申请实施例中拉流终端基于网络指标信息,确定拉流终端所处网络环境的质量,并基于网络环境的质量,可以快速准确地确定出与网络环境的质量相匹配的拉流码率,实现过程简单,可适用于诸多应用场景中。
在本申请的一个实施例中,提供了另一种视频流传输的控制方法,该视频流传输的控 制方法可以由作为拉流方的拉流终端101来执行。如图4所示,该视频流传输的控制方法可以包括S401、S302、S201、S203至S204。其中,网络指标信息包括网络指标的数值。
S401详细介绍如下:
S401,基于网络指标的数值与预设指标阈值的关系,确定拉流终端所处网络环境的质量。
本申请实施例中网络指标的数值用于表征网络指标的大小,其大小与其单位和单位前的数值相关;例如针对码率而言,单位有比特/秒(bps或bps)、千比特/秒(kbit/s或kbps,k=1000),以及兆比特/秒(Mbps,M=1000000),单位越大则越大,例如10Mbps>10kbps>10bps,或者单位相同,单位前的数值越大则越大,例如10Mbps>5Mbps。
可以理解的是,对于某些网络指标而言,网络指标越大,则表征网络质量越差,反之,网络指标越小,则表征网络质量越好;例如针对时延,100ms>10ms,其中100ms所表征的网络质量比10ms表征的网络质量差。而对于某些网络指标而言,网络指标越大,则表征网络质量越好,反之,网络指标越小,则表征网络质量越差;例如针对码率,10Mbps>5Mbps,其中10Mbps所表征的网络质量比5Mbps表征的网络质量好。
在本申请的一个实施例中,网络指标的数值为多个;基于网络指标的数值与预设指标阈值的关系,确定拉流终端所处网络环境的质量,至少可以包括:
检测网络指标的多个数值分别与预设指标阈值的关系,得到第一检测结果;
若第一检测结果表征多个数值中存在指定数量个大于预设指标阈值的数值,则确定拉流终端所处的网络环境为第一等级的质量;
若第一检测结果表征多个数值中不存在指定数量个大于预设指标阈值的数值,则确定拉流终端所处的网络环境为第二等级的质量;其中,第一等级的质量低于第二等级的质量。
其中,可选实施例中为了更加准确的确定出拉流终端所处网络环境的质量;拉流终端所检测的是视频流在接收过程中的预设时间段内同一网络指标的多个数值,因而,所检测得到的网络指标信息包括网络指标的多个数值。
其中,可选实施例中拉流终端是检测网络指标的多个数值分别与预设指标阈值的关系,得到第一检测结果,并基于第一检测结果确定拉流终端所处网络环境的质量。
可以理解的是,基于第一检测结果确定拉流终端所处网络环境的质量,存在着至少以下两种确定情况,其中:
情况一,如果第一检测结果表征多个数值中存在指定数量个大于预设指标阈值的数值,则确定拉流终端所处的网络环境为第一等级的质量,即确定拉流终端所处的网络环境的质量较差。
情况二,如果第一检测结果表征多个数值中不存在指定数量个大于预设指标阈值的数值,则确定拉流终端所处的网络环境为第二等级的质量,即确定拉流终端所处的网络环境的质量较好。
举例说明,例如设检测到的网络指标的多个数值分别为a1、a2、a3、a4,预设指标阈值为a0,则是将a1、a2、a3、a4分别与a0进行比较,得到第一检测结果。同时设第一检测结果中a1>a0、a2>a0、a3>a0、a4<a0,并设指定数量为2,明显地,此时第一检测结果表征多个数值中存在指定数量个大于预设指标阈值的数值,可以确定拉流终端所处的网络环境为第一等级的质量;或者设第一检测结果中a1<a0、a2<a0、a3>a0、a4<a0,并设指定数量为2,明显地,此时第一检测结果表征多个数值中不存在指定数量个大于预设指标阈值的数 值,可以确定拉流终端所处的网络环境为第二等级的质量。
这样,通过实施可选实施例,借助于网络指标的多个数值可以提升确定拉流终端所处网络环境的质量的准确性,进而可以提升确定拉流码率的准确性。
在本申请的一个实施例中,网络指标的数值为多个;基于网络指标的数值与预设指标阈值的关系,确定拉流终端所处网络环境的质量,至少可以包括:
对多个数值进行求和取平均运算,得到平均数值;
检测平均数值与预设指标阈值的关系,得到第二检测结果;
若第二检测结果表征平均数值大于预设指标阈值,则确定拉流终端所处的网络环境为第一等级的质量;
若第二检测结果表征平均数值小于或等于预设指标阈值,则确定拉流终端所处的网络环境为第二等级的质量;其中,第一等级的质量低于第二等级的质量。
其中,可选实施例中为了更加准确的确定出拉流终端所处网络环境的质量;拉流终端所检测的是视频流在接收过程中的预设时间段内同一网络指标的多个数值,因而,所检测得到的网络指标信息包括网络指标的多个数值。
其中,可选实施例中拉流终端是对多个数值进行求和取平均运算,得到平均数值,之后检测平均数值与预设指标阈值的关系,得到第二检测结果,并基于第二检测结果确定拉流终端所处网络环境的质量。
可以理解的是,基于第二检测结果确定拉流终端所处网络环境的质量,存在着至少以下两种确定情况,其中:
情况一,如果第二检测结果表征平均数值大于预设指标阈值,则确定拉流终端所处的网络环境为第一等级的质量,即确定拉流终端所处的网络环境的质量较差。
情况二,如果第二检测结果表征平均数值小于或等于预设指标阈值,则确定拉流终端所处的网络环境为第二等级的质量,即确定拉流终端所处的网络环境的质量较好。
举例说明,例如设检测到的网络指标的多个数值分别为a1、a2、a3、a4,则得到平均数值a’=(a1+a2+a3+a4)/4,设预设指标阈值为a0,则是将a’与a0进行比较,得到第二检测结果。同时设第二检测结果中a’>a0,明显地,此时第二检测结果表征平均数值大于预设指标阈值,可以确定拉流终端所处的网络环境为第一等级的质量;或者设第一检测结果中a’<a0,明显地,此时第二检测结果表征平均数值小于或等于预设指标阈值,可以确定拉流终端所处的网络环境为第二等级的质量。
可以理解的是,除了对多个数值进行求和取平均运算之外,还可以是其他运算处理,例如对多个数值进行求和取平均运算,再与指定权重求乘积的运算等,在实际应用中,基于多个数值所进行运算处理可以灵活调整。
这样,通过实施可选实施例,借助于网络指标的多个数值可以提升确定拉流终端所处网络环境的质量的准确性,进而可以提升确定拉流码率的准确性。
需要说明的是,前述“基于网络指标的数值与预设指标阈值的关系,确定拉流终端所处网络环境的质量”,是针对网络指标越大,所表征网络质量越差,网络指标越小,所表征网络质量越好的网络指标而言,针对网络指标越大,所表征网络质量越好,网络指标越小,所表征网络质量越差的网络指标进行适应性调整即可。
需要说明的是,图4所示中S302的详细介绍请参见图3所示的S302,图4所示中S201、 S203至S204的详细介绍请参见图2所示的S201、S203至S204,在此不再赘述。
本申请实施例中拉流终端基于网络指标的数值与预设指标阈值的关系,确定拉流终端所处网络环境的质量,并基于网络环境的质量,可以快速准确地确定出与网络环境的质量相匹配的拉流码率,实现过程简单,可适用于诸多应用场景中。
在本申请的一个实施例中,提供了另一种视频流传输的控制方法,该视频流传输的控制方法可以由作为拉流方的拉流终端101来执行。如图5所示,该视频流传输的控制方法可以包括S501至S502、S301、S201、S203至S204。
S501至S502详细介绍如下:
S501,若网络环境为第一等级的质量,则确定拉流码率为第一数值。
S502,若网络环境为第二等级的质量,则确定拉流码率为第二数值;其中,第一等级的质量低于第二等级的质量,第一数值小于第二数值。
如前述实施例所述,网络环境的质量越好,则所确定的拉流码率就越大,网络环境的质量越差,则所确定的拉流码率就越小,因而,如果网络环境为第一等级的质量,则确定拉流码率为第一数值,如果网络环境为第二等级的质量,则确定拉流码率为第二数值,其中第一等级的质量低于第二等级的质量,第一数值小于第二数值。
举例说明,请参见表1所示,为一种示例的基于网络环境的质量,确定与网络环境的质量相匹配的拉流码率。
表1
需要说明的是,图5所示中S301的详细介绍请参见图3所示的S301,图5所示中S201、S203至S204的详细介绍请参见图2所示的S201、S203至S204,在此不再赘述。
本申请实施例中拉流终端通过基于网络环境所属等级的质量,可以快速准确地确定出与网络环境的质量相匹配的拉流码率,实现过程简单,可适用于诸多应用场景中。
在本申请的一个实施例中,提供了另一种视频流传输的控制方法,该视频流传输的控制方法可以由作为拉流方的拉流终端101来执行。如图6所示,该视频流传输的控制方法可以包括S601、S202至S204。其中,网络指标信息包括时延信息和丢包率信息中的至少一种。
S601详细介绍如下:
S601,接收推流方发送的视频流,若网络指标信息包括时延信息,则获取视频流对应数据包的接收时刻,并基于数据包中所携带的时间戳信息确定数据包的发送时刻,基于接收时刻与发送时刻确定视频流在接收过程中的时延信息。
可以理解的是,推流方在将视频流发送至拉流终端时,其具体是以数据包的形式传输,其中数据包中可以携带有推流方发送数据包时对应的时间戳信息,以用于拉流终端基于该时间戳信息确定数据包的发送时刻。同时拉流终端还可以在接收到数据包时,记录下接收数据包的时刻,即数据包的接收时刻。因此,本申请实施例中可以通过接收时刻和发送时刻可以确定出数据包在接收过程中的时延信息,从而以得到视频流在接收过程中的时延信息。
S602,接收推流方发送的视频流,若网络指标信息包括丢包率信息,则获取视频流对应 数据包的接收数据量,并基于数据包中所携带的数据包大小确定数据包的发送数据量,基于接收数据量与发送数据量确定视频流在接收过程中的丢包率信息。
可以理解的是,推流方在将视频流发送至拉流终端时,其具体是以数据包的形式传输,其中数据包中还可以携带有推流方所发送数据包对应的数据包大小信息,以用于拉流终端基于该数据包大小信息确定数据包的发送数据量。同时拉流终端还可以在接收到数据包时,记录下所接收数据包的数据包大小,即数据包的接收数据量。因此,本申请实施例中可以通过接收数据量和发送数据量可以确定出数据包在接收过程中的丢包率信息,从而以得到视频流在接收过程中的丢包率信息。
需要说明的是,本申请实施例中是以网络指标信息包括时延信息和丢包率信息进行的示例说明,网络指标信息还可以包括其他的网络指标信息例如吞吐量等,相应地,可以基于其他的网络指标信息确定视频流在接收过程中的丢包率信息,在实际应用中,可以进行适应性调整。
需要说明的是,图6所示中S202至S204的详细介绍请参见图2所示的S202至S204,在此不再赘述。
本申请实施例中拉流终端通过检测视频流在接收过程中的时延、丢包率等,可以快速准确地获取到时延、丢包率等网络指标信息,以为后期确定合适的拉流码率提供支持。
在本申请的一个实施例中,提供了另一种视频流传输的控制方法,该视频流传输的控制方法可以由作为拉流方的拉流终端101来执行。如图7所示,该视频流传输的控制方法可以包括S701至S702、S201至S203。其中,推流方包括推流终端。
S701至S702详细介绍如下:
S701,向推流终端发送拉流请求,拉流请求用于指示推流终端基于拉流码率向视频流服务器进行推流处理,并通过视频流服务器将视频流推送给拉流终端。
本申请实施例中拉流终端可以直接向推流终端发送拉流请求,这样推流终端就可以基于拉流请求中所携带的拉流码率向视频流服务器进行推流处理,进而通过视频流服务器将视频流发送至推流终端中。
S702,接收视频流服务器发送的与拉流码率相对应的视频流。
本申请实施例中拉流终端向推流终端发送拉流请求,之后推流终端基于拉流请求中所携带的拉流码率向视频流服务器进行推流处理,进而通过视频流服务器将视频流发送至推流终端中,相应地,拉流终端接收视频流服务器发送的与拉流码率相对应的视频流。
需要说明的是,图7所示中S201至S203的详细介绍请参见图2所示的S201至S203,在此不再赘述。
本申请实施例中拉流终端将拉流请求发送至推流终端,这样推流终端可以做相应决策(例如提高/降低摄像头码率),从而实现码率自适应调整。
在本申请的一个实施例中,提供了另一种视频流传输的控制方法,该视频流传输的控制方法可以由作为拉流方的拉流终端101来执行。如图8所示,该视频流传输的控制方法可以包括S801至S802、S201至S203。其中,推流方包括推流终端。
S801至S802详细介绍如下:
S801,向视频流服务器发送拉流请求,拉流请求用于指示视频流服务器基于拉流码率进行推流处理。
本申请实施例中拉流终端可以直接向视频流服务器发送拉流请求,这样视频流服务器就可以基于拉流请求中所携带的拉流码率向拉流终端进行推流处理。
S802,接收视频流服务器发送的与拉流码率相对应的视频流。
本申请实施例中拉流终端向视频流服务器发送拉流请求,之后视频流服务器基于拉流请求中所携带的拉流码率向拉流终端进行推流处理,相应地,拉流终端接收视频流服务器发送的与拉流码率相对应的视频流。
需要说明的是,图8所示中S201至S203的详细介绍请参见图2所示的S201至S203,在此不再赘述。
本申请实施例中拉流终端将拉流请求发送至视频流服务器,这样视频流服务器可以做相应决策(例如从多个推流码率分别对应的视频流中选择与拉流码率相匹配的推流码率对应的视频流),从而实现码率自适应调整。
需要说明的是,图2至图8所示实施例是从拉流终端的角度进行的阐述,以下结合图9至图10从推流终端的角度对本申请实施例的技术方案的实现细节进行详细阐述:
请参阅图9,图9是本申请的一个实施例示出的视频流传输的控制方法的流程图,该视频流传输的控制方法可以由作为推流方的推流终端102来执行。如图9所示,该视频流传输的控制方法至少包括S901至S903,详细介绍如下:
S901,将视频流推流至视频流服务器中,以使视频流服务器将视频流推流至拉流终端中。
本申请实施例中推流终端是将视频流发送至视频流服务器中,再由视频流服务器将接收到的视频流发送至拉流终端中,这样拉流终端可以检测视频流在接收过程中的网络指标信息,并基于检测到的网络指标信息,确定与网络指标信息相匹配的拉流码率,进而基于拉流码率生成拉流请求。
S902,接收拉流终端发送的拉流请求;其中,拉流请求中携带有拉流码率,拉流码率是拉流终端接收视频流服务器发送的视频流,并基于检测到的视频流在接收过程中的网络指标信息所确定的。
如前述实施例所述,拉流终端可以向推流终端发送拉流请求,相应地,推流终端接收拉流终端发送的拉流请求。
S903,基于拉流码率向视频流服务器进行推流处理,以使视频流服务器将拉流码率对应的视频流推流至拉流终端中。
本申请实施例中推流终端接收拉流终端发送的拉流请求,之后可以基于拉流请求中携带的拉流码率向视频流服务器进行推流处理,再由视频流服务器将接收到的该拉流码率对应的视频流发送至拉流终端中。
本申请实施例中推流终端通过接收拉流终端所发送的携带有拉流码率的拉流请求,进而可以基于该拉流码率向拉流终端进行推流处理,即推流终端向拉流终端进行的视频流推流与网络变化相适配,实现了向拉流终端推流的合理控制。
在本申请的一个实施例中,提供了另一种视频流传输的控制方法,该视频流传输的控制方法可以由作为推流方的推流终端102来执行。如图10所示,该视频流传输的控制方法可以包括S1001至S1002、S902至S903。
S1001至S1002详细介绍如下:
S1001,获取设定的推流码率。
本申请实施例中推流终端在前期向拉流终端发送视频流时,可以基于设定的推流码率进行推流处理,其中该推流码率可以由相关工作人员设置得到,该推流码率可以有一个或多个。
S1002,将视频流编码成推流码率对应的视频编码块,并将视频编码块推流至视频流服务器中。
本申请实施例中推流终端获取设定的推流码率,之后就可以将视频流编码成推流码率对应的视频编码块,并将视频编码块发送至视频流服务器中。
在本申请的一个实施例中,设定的推流码率为多个;将视频流编码成推流码率对应的视频编码块,并将视频编码块推流至视频流服务器中,至少可以包括:
将视频流编码成多个推流码率分别对应的视频编码块,并将多个推流码率分别对应的视频编码块推流至视频流服务器中。
举例说明,例如设定的多个推流码率分别为b1、b2、b3,则是将视频流编码成推流码率b1对应的视频流编码块B1,将视频流编码成推流码率b2对应的视频流编码块B2,将视频流编码成推流码率b3对应的视频流编码块B3,并将视频流编码块B1、B2、B3发送至视频流服务器中。
如前述实施例所述,视频流服务器通常为多个;因此,可选实施例中是将多个推流码率对应的视频编码块均分别推流至视频流服务器中。例如承接前述示例,设视频流服务器有3个,分别为K1、K2、K3,则是将视频流编码块B1、B2、B3发送至视频流服务器K1中,将视频流编码块B1、B2、B3发送至视频流服务器K2中,将视频流编码块B1、B2、B3发送至视频流服务器K3中。
这样,通过实施可选实施例,将多个推流码率对应的视频编码块均分别推流至视频流服务器中,后期可以由视频流服务器做相应决策。
在本申请的一个实施例中,设定的推流码率为一个;将视频流编码成推流码率对应的视频编码块,并将视频编码块推流至视频流服务器中,至少可以包括:
将视频流编码成一个推流码率对应的视频编码块,并将一个推流码率对应的视频编码块推流至视频流服务器中。
举例说明,例如设定的一个推流码率为b1,则是将视频流编码成推流码率b1对应的视频流编码块B1,并将视频流编码块B1发送至视频流服务器中。
如前述实施例所述,视频流服务器通常为多个;因此,本申请实施例中是将一个推流码率对应的视频编码块均分别推流至视频流服务器中。例如承接前述示例,设视频流服务器有3个,分别为K1、K2、K3,则是将视频流编码块B1发送至视频流服务器K1中,将视频流编码块B1发送至视频流服务器K2中,将视频流编码块B1发送至视频流服务器K3中。
这样,通过实施可选实施例,将一个推流码率对应的视频编码块推流至视频流服务器中,后期可以由推流终端做相应决策。
在本申请的一个实施例中,将视频流编码成推流码率对应的视频编码块,并将视频编码块推流至视频流服务器中,至少可以包括:
基于推流码率对视频流进行编码,得到具有指定时长的多个视频编码块;
通过多个链路将多个视频编码块推流至视频流服务器中。
也即,可选实施例中推流终端可以基于推流码率对视频流进行编码,得到具有指定时长的多个视频编码块,并通过多个链路将多个视频编码块推流至视频流服务器中,其中指定时 长可以由相关工作人员设置得到。
举例说明,例如针对一个推流码率b1而言,设指定时长为5秒,则是基于推流码率b1对视频流进行编码,得到多个5秒的视频编码块。同时设推流终端和视频流服务器之间建立有多个链路以进行通信,那么可以将所得到的多个5秒的视频编码块通过该多个链路发送至视频流服务器中。
其中,可选实施例中推流终端可以是基于实时流协议(Real-Time Streaming Protocol,RTSP)通过多个链路将多个视频编码块推流至视频流服务器中。
这样,通过实施可选实施例,通过分块可以减少在同一时间链路所需的缓存量,降低视频流的传输时延,避免由于视频流资源过大而直接发送至视频流服务器中,所导致的视频流服务器无法适配下载等现象,同时通过多个链路并发可以提升视频流的传输速率。
需要说明的是,图10所示中S902至S903的详细介绍请参见图9所示的S902至S903,在此不再赘述。
本申请实施例中推流终端获取设定的推流码率,并将视频流编码成推流码率对应的视频编码块,以及将视频编码块推流至视频流服务器中,为拉流终端检测视频流在接收过程中的网络指标信息提供支持。
需要说明的是,图9至图10所示实施例是从推流终端的角度进行的阐述,以下结合图11至图14从视频流服务器的角度对本申请实施例的技术方案的实现细节进行详细阐述:
请参阅图11,图11是本申请的一个实施例示出的视频流传输的控制方法的流程图,该视频流传输的控制方法可以由作为视频流服务器的第二服务器104来执行。如图11所示,该视频流传输的控制方法至少包括S1101至S1103,详细介绍如下:
S1101,接收推流终端发送的视频流,并将视频流推流至拉流终端中。
本申请实施例中视频流服务器可以接收推流终端发送的视频流,并将接收到的视频流发送至拉流终端中,这样拉流终端可以检测视频流在接收过程中的网络指标信息,并基于检测到的网络指标信息,确定与网络指标信息相匹配的拉流码率,进而基于拉流码率生成拉流请求。
S1102,接收拉流终端发送的拉流请求;其中,拉流请求中携带有拉流码率,拉流码率是拉流终端接收视频流服务器发送的视频流,并基于检测到的视频流在接收过程中的网络指标信息所确定的。
如前述实施例所述,拉流终端可以向视频流服务器发送拉流请求,相应地,视频流服务器接收拉流终端发送的拉流请求。
S1103,基于拉流码率向拉流终端进行推流处理。
本申请实施例中视频流服务器接收拉流终端发送的拉流请求,之后可以基于拉流请求中携带的拉流码率向拉流终端进行推流处理。
本申请实施例中视频流服务器通过接收拉流终端所发送的携带有拉流码率的拉流请求,进而可以基于该拉流码率向拉流终端进行推流处理,即视频流服务器向拉流终端进行的视频流推流与网络变化相适配,实现了向拉流终端推流的合理控制。
在本申请的一个实施例中,提供了另一种视频流传输的控制方法,该视频流传输的控制方法可以由作为推流方的视频流服务器103来执行。如图12所示,该视频流传输的控制方法可以包括S1201至S1203、S1102。
S1201至S1203详细介绍如下:
S1201,接收推流终端发送的多个推流码率对应的视频流。
如前述实施例所述,推流终端可以将视频流编码成多个推流码率分别对应的视频编码块,并将多个推流码率分别对应的视频编码块推流至视频流服务器中,相应地,视频流服务器接收推流终端发送的多个推流码率分别对应的视频编码块,即多个推流码率分别对应的视频流。
S1202,将拉流码率与多个视频流的推流码率进行匹配,得到匹配结果。
本申请实施例中视频流服务器接收拉流终端发送的拉流请求,之后就可以将拉流请求中所携带的拉流码率与多个视频流的推流码率进行匹配,得到匹配结果。
S1203,若匹配结果表征匹配成功,则将匹配成功的推流码率对应的视频流进行推流处理。
其中,如果匹配结果表征匹配成功,则可以将匹配成功的推流码率对应的视频流进行推流处理。
举例说明,例如承接前述示例,视频流服务器接收到推流终端发送的视频流编码块B1、B2、B3,其中视频流编码块B1对应的推流码率为b1,视频流编码块B2对应的推流码率为b2,视频流编码块B3对应的推流码率为b3;设拉流请求中所携带的拉流码率为b’,则是将拉流码率b’分别与推流码率b1、b2、b3进行匹配,得到匹配结果。同时设匹配结果中b’=b1,则此时表征匹配成功,可以将匹配成功的推流码率b1对应的视频流进行推流处理,即将推流码率b1对应的视频流发送至拉流终端中。
需要说明的是,图12所示中S1102的详细介绍请参见图11所示的S1102,在此不再赘述。
本申请实施例中视频流服务器通过将拉流码率与多个视频流的推流码率进行匹配的方式做决策,实现了码率自适应调整。
在本申请的一个实施例中,提供了另一种视频流传输的控制方法,该视频流传输的控制方法可以由作为推流方的视频流服务器103来执行。如图13所示,该视频流传输的控制方法在S1202之后还可以包括S1301至S1302。
S1301至S1302详细介绍如下:
S1301,若匹配结果表征匹配失败,则将多个视频流的推流码率分别与拉流码率进行求差运算,得到多个差值。
如前述实施例所述,视频流服务器接收拉流终端发送的拉流请求,之后就可以将拉流请求中所携带的拉流码率与多个视频流的推流码率进行匹配,得到匹配结果。
其中,如果匹配结果表征匹配失败,则可以将多个视频流的推流码率分别与拉流码率进行求差运算,得到多个差值。
S1302,从多个差值中选择差值最小的推流码率所对应的视频流,并将选择出的视频流进行推流处理。
本申请实施例中视频流服务器将多个视频流的推流码率分别与拉流码率进行求差运算,得到多个差值,之后可以从多个差值中选择差值最小的推流码率所对应的视频流,并将选择出的视频流进行推流处理。
举例说明,例如承接前述示例,设匹配结果中b’与b1、b2、b3均不相等,则此时表征 匹配失败,将b’分别与b1、b2、b3进行求差运算,得到b1’=|b’-b1|,b2’=|b’-b2|,b3’=|b’-b3|。同时设3个差值b1’、b2’、b3’中最小的是b1’,则将b1’所对应的推流码率b1对应的视频流进行推流处理,即将推流码率b1对应的视频流发送至拉流终端中。
需要说明的是,图13所示中S1201至S1203的详细介绍请参见图12所示的S1201至S1203,在此不再赘述。
本申请实施例中视频流服务器通过将拉流码率与多个视频流的推流码率进行匹配的方式做决策,实现了码率自适应调整。
在本申请的一个实施例中,提供了另一种视频流传输的控制方法,该视频流传输的控制方法可以由作为推流方的视频流服务器103来执行。如图14所示,该视频流传输的控制方法在S1103之后还可以包括S1401至S1402。
S1401至S1402详细介绍如下:
S1401,接收推流终端发送的与拉流码率对应的视频流;其中,拉流码率对应的视频流是推流终端接收到拉流终端发送的拉流请求时所推流的。
如前述实施例所述,推流终端接收拉流终端发送的拉流请求,之后可以基于拉流请求中携带的拉流码率向视频流服务器进行推流处理,相应地,视频流服务器接收推流终端发送的与拉流码率对应的视频流。
S1402,将拉流码率对应的视频流推流至拉流终端中。
本申请实施例中视频流服务器接收推流终端发送的与拉流码率对应的视频流,之后可以将接收到的该拉流码率对应的视频流发送至拉流终端中。
需要说明的是,图14所示中S1101至S1103的详细介绍请参见图11所示的S1101至S1103,在此不再赘述。
本申请实施例中视频流服务器接收推流终端发送的与拉流码率对应的视频流,之后可以将接收到的该拉流码率对应的视频流发送至拉流终端中,使得拉流终端能够成功获取到拉流码率对应的视频流。
以下对本申请实施例的一个具体场景进行详细说明:
请参阅图15,主要包含了拉流终端、推流终端、视频流服务器(共有3个服务器,分别为服务器A、服务器B、服务器C,其中服务器C为云端服务器,服务器B与拉流终端对应)以及通信设备;其中:
拉流终端,主要用于接收推流方(即推流终端和视频流服务器)发送的视频流,并检测视频流在接收过程中的网络指标信息;之后基于网络指标信息,确定与网络指标信息相匹配的拉流码率;之后基于拉流码率生成拉流请求,拉流请求用于指示推流方基于拉流码率进行推流处理;之后向推流方发送拉流请求。
推流终端,主要用于将视频流推流至视频流服务器中,以使视频流服务器将视频流推流至拉流终端中;以及接收拉流终端发送的拉流请求,其中拉流请求中携带有拉流码率,拉流码率是拉流终端接收视频流服务器发送的视频流,并基于检测到的视频流在接收过程中的网络指标信息所确定的;之后基于拉流码率向视频流服务器进行推流处理,以使视频流服务器将拉流码率对应的视频流推流至拉流终端中。
视频流服务器,主要用于接收推流终端发送的视频流,并将视频流推流至拉流终端中;以及接收拉流终端发送的拉流请求;其中,拉流请求中携带有拉流码率,拉流码率是拉流终 端接收视频流服务器发送的视频流,并基于检测到的视频流在接收过程中的网络指标信息所确定的;之后基于拉流码率向拉流终端进行推流处理。
通信设备,主要用于为拉流终端、推流终端以及视频流服务器之间的相互通信提供支持,其可以包括4G/5G基站、RSU(Road Side Unit,路侧单元)、Wifi、5G CPE(Customer Premise(s)Equipment)等。
基于图15所示的实施环境,请参阅图16,图16是本申请的一个实施例示出的视频流传输的控制方法的流程图。如图16所示,该视频流传输的控制方法至少包括S1601至S1608,详细介绍如下:
S1601,推流终端将一个推流码率对应的视频流推流至视频流服务器中。
本申请实施例中推流终端可以预置有推流服务,其中推流服务是由开发工作者编写好的用于实现推流功能的程序代码,相应地,在推流终端有推流需求时,启动推流服务,并可以基于检测到的推流命令实现推流。
本申请实施例中视频流服务器可以是RTSP服务器,该一个推流码率可以是b1,即是将推流码率b1对应的视频流发送至视频流服务器A、B、C中。
本申请实施例中视频流可以是任意视频格式,例如“.mp4”,“.flv”,“.avi”等。可以理解的是,视频流包含多帧图像,其中多帧图像也可以是任意图像格式,例如“.gif”,“.eps”等。
可选地,推流终端可以基于该一个推流码率对视频流进行编码,得到具有指定时长的多个视频编码块,并通过多个链路将多个视频编码块推流至视频流服务器中。
S1602,视频流服务器接收推流终端发送的一个推流码率对应的视频流,并将一个推流码率对应的视频流推流至拉流终端中。
本申请实施例中视频流服务器A、B、C将推流码率b1对应的视频流发送至拉流终端中。
S1603,拉流终端接收视频流服务器发送的一个推流码率对应的视频流,并检测一个推流码率对应的视频流在接收过程中的网络指标信息。
本申请实施例中拉流终端可以预置有拉流服务,其中拉流服务是由开发工作者编写好的用于实现拉流功能的程序代码,相应地,在拉流终端有拉流需求时,启动拉流服务,并可以基于检测到的拉流命令实现拉流。
可选地,网络指标信息包括时延信息和丢包率信息中的至少一种。其中,如果网络指标信息包括时延信息,则获取视频流对应数据包的接收时刻,并基于数据包中所携带的时间戳信息确定数据包的发送时刻,基于接收时刻与发送时刻确定视频流在接收过程中的时延信息。如果网络指标信息包括丢包率信息,则获取视频流对应数据包的接收数据量,并基于数据包中所携带的数据包大小确定数据包的发送数据量,基于接收数据量与发送数据量确定视频流在接收过程中的丢包率信息。
S1604,拉流终端基于网络指标信息,确定与网络指标信息相匹配的拉流码率。
可选地,拉流终端基于网络指标的数值与预设指标阈值的关系,确定拉流终端所处网络环境的质量。其中,如果网络环境为第一等级的质量,则确定拉流码率为第一数值;如果网络环境为第二等级的质量,则确定拉流码率为第二数值;第一等级的质量低于第二等级的质量,第一数值小于第二数值。
可选地,拉流终端也可以是接收通信设备所发送的基站侧的相关网络信息,进而基于该相关网络信息,确定与网络指标信息相匹配的拉流码率。
S1605,拉流终端基于拉流码率生成拉流请求,并向推流终端发送拉流请求。
可以理解的是,由于推流终端向三个视频流服务器A、B、C分别发送单一推流码率版本(即推流码率b1)的视频流;因此,推流终端仍然不确定拉流终端所需码率版本视频流,需要通过拉流终端将拉流码率通知给推流终端做决策(例如提高/降低摄像头码率),从而实现码率自适应调整。
S1606,推流终端接收拉流终端发送的拉流请求,并基于拉流码率向视频流服务器进行推流处理。
S1607,视频流服务器接收推流终端发送的与拉流码率对应的视频流,并将拉流码率对应的视频流推流至拉流终端中。
S1608,拉流终端接收视频流服务器发送的与拉流码率对应的视频流,并基于该拉流码率对应的视频流进行播放。
需要说明的是,图16所示中S1601至S1608的详细介绍请参见前述实施例,在此不再赘述。
本申请实施例中所提出的视频流传输的控制方法适用于带宽要求较低的应用场景中。
基于图15所示的实施环境,请参阅图17,图17是本申请的一个实施例示出的视频流传输的控制方法的流程图。如图17所示,该视频流传输的控制方法至少包括S1701至S1707,详细介绍如下:
S1701,推流终端将多个推流码率分别对应的视频流推流至视频流服务器中。
本申请实施例中推流终端可以预置有推流服务,其中推流服务是由开发工作者编写好的用于实现推流功能的程序代码,相应地,在推流终端有推流需求时,启动推流服务,并可以基于检测到的推流命令实现推流。
本申请实施例中视频流服务器可以是RTSP服务器,该多个推流码率可以是b1、b2、b3,即是将推流码率b1、b2、b3分别对应的视频流发送至视频流服务器A、B、C中。
本申请实施例中视频流可以是任意视频格式,例如“.mp4”,“.flv”,“.avi”等。可以理解的是,视频流包含多帧图像,其中多帧图像也可以是任意图像格式,例如“.gif”,“.eps”等。
可选地,推流终端可以分别基于该多个推流码率对视频流进行编码,得到具有指定时长的多个视频编码块,并通过多个链路将多个视频编码块推流至视频流服务器中。
S1702,视频流服务器接收推流终端发送的多个推流码率分别对应的视频流,并将多个推流码率分别对应的视频流推流至拉流终端中。
本申请实施例中视频流服务器A、B、C将推流码率b1、b2、b3分别对应的视频流发送至拉流终端中。
S1703,拉流终端接收视频流服务器发送的多个推流码率分别对应的视频流,并检测多个推流码率分别对应的视频流在接收过程中的网络指标信息。
本申请实施例中拉流终端可以预置有拉流服务,其中拉流服务是由开发工作者编写好的用于实现拉流功能的程序代码,相应地,在拉流终端有拉流需求时,启动拉流服务,并可以基于检测到的拉流命令实现拉流。
可选地,网络指标信息包括时延信息和丢包率信息中的至少一种。其中,如果网络指标信息包括时延信息,则获取视频流对应数据包的接收时刻,并基于数据包中所携带的时间戳信息确定数据包的发送时刻,基于接收时刻与发送时刻确定视频流在接收过程中的时延信 息。如果网络指标信息包括丢包率信息,则获取视频流对应数据包的接收数据量,并基于数据包中所携带的数据包大小确定数据包的发送数据量,基于接收数据量与发送数据量确定视频流在接收过程中的丢包率信息。
S1704,拉流终端基于网络指标信息,确定与网络指标信息相匹配的拉流码率。
可选地,拉流终端基于网络指标的数值与预设指标阈值的关系,确定拉流终端所处网络环境的质量。其中,如果网络环境为第一等级的质量,则确定拉流码率为第一数值;如果网络环境为第二等级的质量,则确定拉流码率为第二数值;第一等级的质量低于第二等级的质量,第一数值小于第二数值。
可选地,拉流终端也可以是接收通信设备所发送的基站侧的相关网络信息,进而基于该相关网络信息,确定与网络指标信息相匹配的拉流码率。
S1705,拉流终端基于拉流码率生成拉流请求,并向视频流服务器发送拉流请求。
可以理解的是,由于推流终端向三个视频流服务器A、B、C分别发送多个推流码率版本(即推流码率b1、b2、b3)的视频流;因此,可以无需再由推流终端做决策,而仅需要通过拉流终端将拉流码率通知给视频流服务器做决策(例如从三个推流码率b1、b2、b3分别对应的视频流中选择与拉流码率相匹配的推流码率对应的视频流),从而实现码率自适应调整。
S1706,视频流服务器接收拉流终端发送的拉流请求,并基于拉流码率向拉流终端进行推流处理。
S1707,拉流终端接收视频流服务器发送的与拉流码率对应的视频流,并基于该该拉流码率对应的视频流进行播放。
需要说明的是,图17所示中S1701至S1707的详细介绍请参见前述实施例,在此不再赘述。
本申请实施例中所提出的视频流传输的控制方法适用于时延要求较高的应用场景中。
图18是本申请的一个实施例示出的视频流传输的控制装置的框图。如图18所示,该视频流传输的控制装置应用于拉流终端,装置包括:
接收模块1801,配置为接收推流方发送的视频流,并检测所述视频流在接收过程中的网络指标信息;
确定模块1802,配置为基于所述网络指标信息,确定与所述网络指标信息相匹配的拉流码率;
生成模块1803,配置为基于所述拉流码率生成拉流请求,所述拉流请求用于指示所述推流方基于所述拉流码率进行推流处理;
发送模块1804,配置为向所述推流方发送所述拉流请求。
在本申请的一个实施例中,确定模块1802,具体配置为:
基于所述网络指标信息,确定所述拉流终端所处网络环境的质量;
基于所述网络环境的质量,确定与所述网络环境的质量相匹配的拉流码率;其中,所述网络环境的质量与所述拉流码率呈正相关关系。
在本申请的一个实施例中,确定模块1802,还具体配置为:
基于所述网络指标的数值与预设指标阈值的关系,确定所述拉流终端所处网络环境的质量。
在本申请的一个实施例中,所述网络指标的数值为多个;确定模块1802,还具体配置为:
检测所述网络指标的多个数值分别与所述预设指标阈值的关系,得到第一检测结果;
若所述第一检测结果表征所述多个数值中存在指定数量个大于所述预设指标阈值的数值,则确定所述拉流终端所处的网络环境为第一等级的质量;
若所述第一检测结果表征所述多个数值中不存在指定数量个大于所述预设指标阈值的数值,则确定所述拉流终端所处的网络环境为第二等级的质量;其中,所述第一等级的质量低于所述第二等级的质量。
在本申请的一个实施例中,所述网络指标的数值为多个;确定模块1802,还具体配置为:
对多个数值进行求和取平均运算,得到平均数值;
检测所述平均数值与所述预设指标阈值的关系,得到第二检测结果;
若所述第二检测结果表征所述平均数值大于所述预设指标阈值,则确定所述拉流终端所处的网络环境为第一等级的质量;
若所述第二检测结果表征所述平均数值小于或等于所述预设指标阈值,则确定所述拉流终端所处的网络环境为第二等级的质量;其中,所述第一等级的质量低于所述第二等级的质量。
在本申请的一个实施例中,确定模块1802,还具体配置为:
若所述网络环境为第一等级的质量,则确定所述拉流码率为第一数值;
若所述网络环境为第二等级的质量,则确定所述拉流码率为第二数值;其中,所述第一等级的质量低于所述第二等级的质量,所述第一数值小于所述第二数值。
在本申请的一个实施例中,所述网络指标信息包括时延信息和丢包率信息中的至少一种;接收模块1801,具体配置为:
若所述网络指标信息包括所述时延信息,则获取所述视频流对应数据包的接收时刻,并基于所述数据包中所携带的时间戳信息确定所述数据包的发送时刻,基于所述接收时刻与所述发送时刻确定所述视频流在接收过程中的时延信息;
若所述网络指标信息包括所述丢包率信息,则获取所述视频流对应数据包的接收数据量,并基于所述数据包中所携带的数据包大小确定所述数据包的发送数据量,基于所述接收数据量与所述发送数据量确定所述视频流在接收过程中的丢包率信息。
在本申请的一个实施例中,若所述推流方包括推流终端;发送模块1804,具体配置为:
向所述推流终端发送所述拉流请求,所述拉流请求用于指示所述推流终端基于所述拉流码率向视频流服务器进行推流处理,并通过所述视频流服务器将视频流推送给所述拉流终端;
接收所述视频流服务器发送的与所述拉流码率相对应的视频流。
在本申请的一个实施例中,若所述推流方包括视频流服务器;发送模块1804,具体配置为:
向所述视频流服务器发送所述拉流请求,所述拉流请求用于指示所述视频流服务器基于所述拉流码率进行推流处理;
接收所述视频流服务器发送的与所述拉流码率相对应的视频流。
图19是本申请的一个实施例示出的视频流传输的控制装置的框图。如图19所示,该视频流传输的控制装置应用于推流终端,装置包括:
推流模块1901,配置为将视频流推流至视频流服务器中,以使所述视频流服务器将所述视频流推流至拉流终端中;
接收模块1902,配置为接收所述拉流终端发送的拉流请求;其中,所述拉流请求中携带有拉流码率,所述拉流码率是所述拉流终端接收所述视频流服务器发送的视频流,并基于检测到的所述视频流在接收过程中的网络指标信息所确定的;
所述推流模块1901,还配置为基于所述拉流码率向所述视频流服务器进行推流处理,以使所述视频流服务器将所述拉流码率对应的视频流推流至所述拉流终端中。
在本申请的一个实施例中,推流模块1901,具体配置为:
获取设定的推流码率;
将所述视频流编码成所述推流码率对应的视频编码块,并将所述视频编码块推流至所述视频流服务器中。
在本申请的一个实施例中,推流模块1901,还具体配置为:
若所述设定的推流码率为多个,则将视频流编码成多个推流码率分别对应的视频编码块,并将所述多个推流码率分别对应的视频编码块推流至所述视频流服务器中;
若所述设定的推流码率为一个,则将视频流编码成一个推流码率对应的视频编码块,并将所述一个推流码率对应的视频编码块推流至所述视频流服务器中。
在本申请的一个实施例中,推流模块1901,还具体配置为:
基于所述推流码率对视频流进行编码,得到具有指定时长的多个视频编码块;
通过多个链路将所述多个视频编码块推流至所述视频流服务器中。
图20是本申请的一个实施例示出的视频流传输的控制装置的框图。如图20所示,该视频流传输的控制装置应用于视频流服务器,装置包括:
推流模块2001,配置为接收推流终端发送的视频流,并将所述视频流推流至拉流终端中;
接收模块2002,配置为接收所述拉流终端发送的拉流请求;其中,所述拉流请求中携带有拉流码率,所述拉流码率是所述拉流终端接收所述视频流服务器发送的视频流,并基于检测到的所述视频流在接收过程中的网络指标信息所确定的;
所述推流模块2001,还配置为基于所述拉流码率向所述拉流终端进行推流处理。
在本申请的一个实施例中,接收模块2002,具体配置为:
接收所述推流终端发送的多个推流码率对应的视频流;
推流模块2001,具体配置为:
若所述匹配结果表征匹配成功,则将匹配成功的推流码率对应的视频流进行推流处理。
在本申请的一个实施例中,推流模块2001,还具体配置为:
若所述匹配结果表征匹配失败,则将多个视频流的推流码率分别与所述拉流码率进行求差运算,得到多个差值;
从所述多个差值中选择差值最小的推流码率所对应的视频流,并将选择出的视频流进行推流处理。
在本申请的一个实施例中,接收模块2002,具体配置为:
接收所述推流终端发送的与所述拉流码率对应的视频流;其中,所述拉流码率对应的视频流是所述推流终端接收到所述拉流终端发送的拉流请求时所推流的;
将所述拉流码率对应的视频流推流至所述拉流终端中。
需要说明的是,前述实施例所提供的装置与前述实施例所提供的方法属于同一构思,其中各个模块和单元执行操作的具体方式已经在方法实施例中进行了详细描述。
本申请实施例还提供了一种电子设备,包括:一个或多个处理器;存储器,用于存储一个或多个程序,当一个或多个程序被一个或多个处理器执行时,使得电子设备实现如前的视频流传输的控制方法。
图21是适于用来实现本申请实施例的电子设备的计算机系统的结构示意图。
需要说明的是,图21示出的电子设备的计算机系统2100仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。
如图21所示,计算机系统2100包括中央处理单元(Central Processing Unit,CPU)2101,其可以根据存储在只读存储器(Read-Only Memory,ROM)2102中的程序或者从存储部分2108加载到随机访问存储器(Random Access Memory,RAM)2103中的程序而执行各种适当的动作和处理,例如执行上述实施例中的方法。在RAM 2103中,还存储有系统操作所需的各种程序和数据。CPU 2101、ROM 2102以及RAM 2103通过总线2104彼此相连。输入/输出(Input/Output,I/O)接口2105也连接至总线2104。
以下部件连接至I/O接口2105:包括键盘、鼠标等的输入部分2106;包括诸如阴极射线管(Cathode Ray Tube,CRT)、液晶显示器(Liquid Crystal Display,LCD)等以及扬声器等的输出部分2107;包括硬盘等的存储部分2108;以及包括诸如LAN(Local Area Network,局域网)卡、调制解调器等的网络接口卡的通信部分2109。通信部分2109经由诸如因特网的网络执行通信处理。驱动器2110也根据需要连接至I/O接口2105。可拆卸介质2111,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器2110上,以便于从其上读出的计算机程序根据需要被安装入存储部分2108。
特别地,根据本申请实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本申请实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的计算机程序。在这样的实施例中,该计算机程序可以通过通信部分2109从网络上被下载和安装,和/或从可拆卸介质2111被安装。在该计算机程序被中央处理单元(CPU)2101执行时,执行本申请的系统中限定的各种功能。
需要说明的是,本申请实施例所示的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读介质例如可以是电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(Erasable Programmable Read Only Memory,EPROM)、闪存、光纤、便携式紧凑磁盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本申请中,计算机可读介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本申请中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的计算机程序。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与 其结合使用的程序。计算机可读介质上包含的计算机程序可以用任何适当的介质传输,包括但不限于:无线、有线等等,或者上述的任意合适的组合。
附图中的流程图和框图,图示了按照本申请各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。其中,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不相同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本申请实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现,所描述的单元也可以设置在处理器中。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定。
本申请的另一方面还提供了一种计算机可读介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如前的视频流传输的控制方法。该计算机可读介质可以是上述实施例中描述的电子设备中所包含的,也可以是单独存在,而未装配入该电子设备中。
本申请的另一方面还提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读介质中。计算机设备的处理器从计算机可读介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述各个实施例中提供的视频流传输的控制方法。
上述内容,仅为本申请的较佳示例性实施例,并非用于限制本申请的实施方案,本领域普通技术人员根据本申请的主要构思和精神,可以十分方便地进行相应的变通或修改,故本申请的保护范围应以权利要求书所要求的保护范围为准。

Claims (17)

  1. 一种视频流传输的控制方法,其特征在于,应用于拉流终端,所述方法包括:
    接收推流方发送的视频流,并检测所述视频流在接收过程中的网络指标信息;
    基于所述网络指标信息,确定与所述网络指标信息相匹配的拉流码率;
    基于所述拉流码率生成拉流请求,所述拉流请求用于指示所述推流方基于所述拉流码率进行推流处理;
    向所述推流方发送所述拉流请求。
  2. 如权利要求1所述的方法,其特征在于,所述基于所述网络指标信息,确定与所述网络指标信息相匹配的拉流码率,包括:
    基于所述网络指标信息,确定所述拉流终端所处网络环境的质量;
    基于所述网络环境的质量,确定与所述网络环境的质量相匹配的拉流码率;其中,所述网络环境的质量与所述拉流码率呈正相关关系。
  3. 如权利要求2所述的方法,其特征在于,所述网络指标信息包括网络指标的数值;所述基于所述网络指标信息,确定所述拉流终端所处网络环境的质量,包括:
    基于所述网络指标的数值与预设指标阈值的关系,确定所述拉流终端所处网络环境的质量。
  4. 如权利要求3所述的方法,其特征在于,所述网络指标的数值为多个;所述基于所述网络指标的数值与预设指标阈值的关系,确定所述拉流终端所处网络环境的质量,包括:
    检测所述网络指标的多个数值分别与所述预设指标阈值的关系,得到第一检测结果;
    若所述第一检测结果表征所述多个数值中存在指定数量个大于所述预设指标阈值的数值,则确定所述拉流终端所处的网络环境为第一等级的质量;
    若所述第一检测结果表征所述多个数值中不存在指定数量个大于所述预设指标阈值的数值,则确定所述拉流终端所处的网络环境为第二等级的质量;其中,所述第一等级的质量低于所述第二等级的质量。
  5. 如权利要求1至4中任一项所述的方法,其特征在于,所述网络指标信息包括时延信息和丢包率信息中的至少一种;所述检测所述视频流在接收过程中的网络指标信息,包括:
    若所述网络指标信息包括所述时延信息,则获取所述视频流对应数据包的接收时刻,并基于所述数据包中所携带的时间戳信息确定所述数据包的发送时刻,基于所述接收时刻与所述发送时刻确定所述视频流在接收过程中的时延信息;
    若所述网络指标信息包括所述丢包率信息,则获取所述视频流对应数据包的接收数据量,并基于所述数据包中所携带的数据包大小确定所述数据包的发送数据量,基于所述接收数据量与所述发送数据量确定所述视频流在接收过程中的丢包率信息。
  6. 如权利要求1至4中任一项所述的方法,其特征在于,若所述推流方包括推流终端,则所述向所述推流方发送所述拉流请求,包括:
    向所述推流终端发送所述拉流请求,所述拉流请求用于指示所述推流终端基于所述拉 流码率向视频流服务器进行推流处理,并通过所述视频流服务器将视频流推送给所述拉流终端;
    在所述向所述推流方发送所述拉流请求之后,所述方法还包括:
    接收所述视频流服务器发送的与所述拉流码率相对应的视频流。
  7. 如权利要求1至4中任一项所述的方法,其特征在于,若所述推流方包括视频流服务器,则所述向所述推流方发送所述拉流请求,包括:
    向所述视频流服务器发送所述拉流请求,所述拉流请求用于指示所述视频流服务器基于所述拉流码率进行推流处理;
    在所述向所述推流方发送所述拉流请求之后,所述方法还包括:
    接收所述视频流服务器发送的与所述拉流码率相对应的视频流。
  8. 一种视频流传输的控制方法,其特征在于,应用于推流终端,所述方法包括:
    将视频流推流至视频流服务器中,以使所述视频流服务器将所述视频流推流至拉流终端中;
    接收所述拉流终端发送的拉流请求;其中,所述拉流请求中携带有拉流码率,所述拉流码率是所述拉流终端接收所述视频流服务器发送的视频流,并基于检测到的所述视频流在接收过程中的网络指标信息所确定的;
    基于所述拉流码率向所述视频流服务器进行推流处理,以使所述视频流服务器将所述拉流码率对应的视频流推流至所述拉流终端中。
  9. 一种视频流传输的控制方法,其特征在于,应用于视频流服务器,所述方法包括:
    接收推流终端发送的视频流,并将所述视频流推流至拉流终端中;
    接收所述拉流终端发送的拉流请求;其中,所述拉流请求中携带有拉流码率,所述拉流码率是所述拉流终端接收所述视频流服务器发送的视频流,并基于检测到的所述视频流在接收过程中的网络指标信息所确定的;
    基于所述拉流码率向所述拉流终端进行推流处理。
  10. 如权利要求9所述的方法,其特征在于,所述接收推流终端发送的视频流,包括:
    接收所述推流终端发送的多个推流码率对应的视频流;
    所述基于所述拉流码率向所述拉流终端进行视频流推流,包括:
    将所述拉流码率与多个视频流的推流码率进行匹配,得到匹配结果;
    若所述匹配结果表征匹配成功,则将匹配成功的推流码率对应的视频流进行推流处理。
  11. 如权利要求10所述的方法,其特征在于,所述方法还包括:
    若所述匹配结果表征匹配失败,则将多个视频流的推流码率分别与所述拉流码率进行求差运算,得到多个差值;
    从所述多个差值中选择差值最小的推流码率所对应的视频流,并将选择出的视频流进行推流处理。
  12. 一种视频流传输的控制装置,其特征在于,所述装置包括:
    接收模块,配置为接收推流方发送的视频流,并检测所述视频流在接收过程中的网络指标信息;
    确定模块,配置为基于所述网络指标信息,确定与所述网络指标信息相匹配的拉流码率;
    生成模块,配置为基于所述拉流码率生成拉流请求,所述拉流请求用于指示所述推流方基于所述拉流码率进行推流处理;
    发送模块,配置为向所述推流方发送所述拉流请求。
  13. 一种视频流传输的控制装置,其特征在于,所述装置包括:
    推流模块,配置为将视频流推流至视频流服务器中,以使所述视频流服务器将所述视频流推流至拉流终端中;
    接收模块,配置为接收所述拉流终端发送的拉流请求;其中,所述拉流请求中携带有拉流码率,所述拉流码率是所述拉流终端接收所述视频流服务器发送的视频流,并基于检测到的所述视频流在接收过程中的网络指标信息所确定的;
    所述推流模块,还配置为基于所述拉流码率向所述视频流服务器进行推流处理,以使所述视频流服务器将所述拉流码率对应的视频流推流至所述拉流终端中。
  14. 一种视频流传输的控制装置,其特征在于,所述装置包括:
    推流模块,配置为接收推流终端发送的视频流,并将所述视频流推流至拉流终端中;
    接收模块,配置为接收所述拉流终端发送的拉流请求;其中,所述拉流请求中携带有拉流码率,所述拉流码率是所述拉流终端接收所述视频流服务器发送的视频流,并基于检测到的所述视频流在接收过程中的网络指标信息所确定的;
    所述推流模块,还配置为基于所述拉流码率向所述拉流终端进行推流处理。
  15. 一种电子设备,其特征在于,包括:
    一个或多个处理器;
    存储器,用于存储一个或多个程序,当所述一个或多个程序被所述电子设备执行时,使得所述电子设备实现如权利要求1至7或8或9-11中任一项所述的视频流传输的控制方法。
  16. 一种计算机可读介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至7或8或9-11中任一项所述的视频流传输的控制方法。
  17. 一种计算机程序产品,包括计算机指令,其特征在于,所述计算机指令被处理器执行时实现如权利要求1至7或8或9-11中任一项所述的视频流传输的控制方法。
PCT/CN2023/086033 2022-07-12 2023-04-03 视频流传输的控制方法及装置、设备、介质 WO2024011962A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210818435.1 2022-07-12
CN202210818435.1A CN117440177A (zh) 2022-07-12 2022-07-12 视频流传输的控制方法及装置、设备、介质

Publications (1)

Publication Number Publication Date
WO2024011962A1 true WO2024011962A1 (zh) 2024-01-18

Family

ID=89535372

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/086033 WO2024011962A1 (zh) 2022-07-12 2023-04-03 视频流传输的控制方法及装置、设备、介质

Country Status (2)

Country Link
CN (1) CN117440177A (zh)
WO (1) WO2024011962A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109040801A (zh) * 2018-07-19 2018-12-18 北京达佳互联信息技术有限公司 媒体码率自适应方法、装置、计算机设备及存储介质
US20210105517A1 (en) * 2018-06-20 2021-04-08 Naver Corporation Method and system for adaptive data transmission
CN113382278A (zh) * 2021-06-11 2021-09-10 中国电信股份有限公司 视频推送方法、装置、电子设备和可读存储介质
CN114584833A (zh) * 2020-11-18 2022-06-03 花瓣云科技有限公司 音视频的处理方法、装置及存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210105517A1 (en) * 2018-06-20 2021-04-08 Naver Corporation Method and system for adaptive data transmission
CN109040801A (zh) * 2018-07-19 2018-12-18 北京达佳互联信息技术有限公司 媒体码率自适应方法、装置、计算机设备及存储介质
CN114584833A (zh) * 2020-11-18 2022-06-03 花瓣云科技有限公司 音视频的处理方法、装置及存储介质
CN113382278A (zh) * 2021-06-11 2021-09-10 中国电信股份有限公司 视频推送方法、装置、电子设备和可读存储介质

Also Published As

Publication number Publication date
CN117440177A (zh) 2024-01-23

Similar Documents

Publication Publication Date Title
US10931732B2 (en) Multimedia file transmission apparatus and method
US11039179B2 (en) Use of simultaneously received videos by a system to generate a quality of experience value
US20140189064A1 (en) Method and system for adaptive video transmission
WO2016049987A1 (zh) 一种数据处理方法、装置及相关服务器
US20230060066A1 (en) Data transmission method and apparatus, computer readable medium, and electronic device
WO2023071605A1 (zh) 投屏数据传输方法、装置、电子设备及存储介质
KR101569510B1 (ko) 적응적 실시간 트랜스코딩 방법 및 이를 위한 스트리밍 서버
WO2015120766A1 (zh) 一种视频优化系统及方法
WO2023051243A1 (zh) 视频码率切换方法、装置、电子设备及存储介质
WO2019228116A1 (zh) 一种用于单向广播和双向网络的数据传输方法及系统
US20150341634A1 (en) Method, apparatus and system to select audio-video data for streaming
CN115134632A (zh) 视频码率控制方法、设备、介质及内容分发网络cdn系统
WO2015085873A1 (zh) 视频码流的获取方法及装置
CN104363511A (zh) 一种在移动设备中在线播放F4v视频的方法及系统
CN113259729B (zh) 数据切换的方法、服务器、系统及存储介质
WO2024001266A1 (zh) 视频流传输的控制方法及装置、设备、介质
WO2024011962A1 (zh) 视频流传输的控制方法及装置、设备、介质
US8644138B2 (en) Method, computer program product, and apparatus for deriving intelligence from format change requests
US9537707B2 (en) System for self organization of an internet protocol television grid
CN110996164A (zh) 视频发布方法、装置、电子设备及计算机可读介质
CN116980662A (zh) 流媒体播放方法、装置、电子设备、存储介质及程序产品
CN113242446B (zh) 视频帧的缓存方法、转发方法、通信服务器及程序产品
US20220321625A1 (en) Video Communications Network With Value Optimization
US10504482B2 (en) Smart small form-factor pluggable (SFP) transceiver
WO2024060720A1 (zh) 视频流传输控制方法及装置、系统、电子设备、存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23838464

Country of ref document: EP

Kind code of ref document: A1