Efficient live streaming distribution method for continuously growing video files

By introducing modular design and flexible configuration strategies, and optimizing resource scheduling, the system solves the problems of slow processing speed and resource consumption in traditional live stream distribution systems when faced with large-scale concurrent requests and continuously growing video files. This enables efficient and real-time live stream distribution, improves user experience and system stability, and reduces operating costs.

CN119484880BActive Publication Date: 2025-11-07HANGZHOU ARCVIDEO TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411371717.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-11-07
Estimated Expiration
2044-09-29

AI Technical Summary

Technical Problem

Traditional live streaming distribution systems suffer from slow processing speed, long response time, and high resource consumption when faced with large-scale concurrent requests and continuously growing video files. This affects the smoothness and real-time performance of the live streaming service and results in high operating costs.

Method used

By employing technologies such as verification, marking, listening and waiting, data reading, configuration, queue modules, and data sending, the system achieves efficient and real-time distribution of continuously growing video files. Through the introduction of modular design and flexible configuration strategies, resource scheduling is optimized to ensure the stability and scalability of the system.

Benefits of technology

It improved processing speed and responsiveness, reduced resource consumption, enhanced user experience, lowered operating costs, and improved system scalability and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119484880B_ABST
    Figure CN119484880B_ABST
Patent Text Reader

Abstract

The application discloses a kind of efficient live streaming distribution methods for continuously growing video files, comprising the following steps: setting configuration module carries out parameter configuration;Setting mark module carries out variable declaration;Setting live streaming request client carries out live streaming request;Setting verification module carries out live streaming identification validity and legality verification;Setting mark module creates the data reading thread corresponding to live streaming identification mark;Setting listening waiting module creates the maintenance of listening for client connection, and whether it is being read as listening interrupt condition, cyclic waiting;Setting data reading module creates the independent first-in first-out queue corresponding to live streaming identification mark in queue module, and data reading module obtains configuration information from configuration module;Setting data reading module creates the data sending thread corresponding to live streaming identification mark;Data reading module carries out cyclic waiting process execution;Data sending module carries out cyclic execution;Based on client connection data packet is sent.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of streaming media, and particularly relates to an efficient live streaming distribution method for continuously growing video files. BACKGROUND

[0002] With the rapid development of network technology and the popularity of high-definition video content, live streaming services have become an indispensable part of people's daily life. However, in live streaming services, the characteristics of continuously growing video files pose a great challenge to live streaming distribution systems. Traditional live streaming distribution systems often have slow processing speed, long response time, high resource occupation and other problems when facing large-scale concurrent requests and continuously growing video files. These problems not only affect the smoothness and real-time performance of live streaming, but also increase the operating cost and limit the development of live streaming services.

[0003] In similar technologies, although there are various live streaming distribution solutions, most of them fail to effectively solve the distribution problem of continuously growing video files. Some systems use simple polling or pushing mechanisms, which cannot dynamically adjust according to the actual growth of video files and network conditions, resulting in low distribution efficiency. Some other systems are too complex, requiring high hardware investment and complex configuration management, which is not conducive to large-scale deployment and operation and maintenance. SUMMARY

[0004] In view of the above problems, the application provides an efficient live streaming distribution method for continuously growing video files, which realizes efficient and real-time distribution of continuously growing video files by introducing functions such as verification, marking, listening and waiting, data reading, configuration, queue and data sending.

[0005] To solve the above technical problems, the application adopts the following technical solutions:

[0006] An efficient live streaming distribution method for continuously growing video files is applied to a live streaming distribution system including a live streaming request client and a live streaming server, the live streaming server further includes a verification module, a marking module, a listening and waiting module, a data reading module, a configuration module, a video file, a queue module and a data sending module, the video file continuously grows and the file name is named with a live streaming identifier, and the method includes the following steps:

[0007] Setting the configuration module to configure parameters;

[0008] Setting the marking module to declare variables, the variables including a data reading thread set, an identifier bit indicating whether the live streaming identifier is being read, and a request client set of the live streaming identifier;

[0009] Setting the live streaming request client to make a live streaming request;

[0010] The setting verification module is configured to verify the validity and legality of the live stream identifier;

[0011] The setting marking module is configured to create a data reading thread corresponding to the live stream identifier, the marking module stores information of the created data reading thread, marks the live stream identifier as being read, and stores client information of the current live stream identifier;

[0012] The setting listening and waiting module is configured to create a listener to maintain the connection of the client, and uses whether the live stream identifier is being read as a listening interruption condition, and waits in a loop;

[0013] The setting data reading module is configured to create a first-in-first-out queue corresponding to the live stream identifier in the queue module, and the data reading module obtains configuration information from the configuration module;

[0014] The setting data reading module is configured to create a data sending thread corresponding to the live stream identifier, the data reading module uses whether the live stream identifier is being read in the marking module as an interruption condition, uses the reading video file frequency in the configuration module as a time interval to enter a loop waiting state, and performs a loop waiting process;

[0015] After the loop ends, the thread information corresponding to the live stream identifier is removed from the marking module;

[0016] The data sending module uses whether the live stream identifier is being read as an interruption condition, and uses the sending data frequency in the configuration module as a time interval to enter a loop, and performs a loop execution;

[0017] The data sending module uses whether the live stream identifier is being read as an interruption condition, and uses the sending data frequency in the configuration module as a time interval to enter a loop, and performs a loop execution;

[0018] In a possible implementation, the parameters configured by the parameter configuration module include a reading video file frequency, a size of each reading video file, a timeout time of a video file without change, a queue maximum value, and a sending data frequency.

[0019] In a possible implementation, the configuration information obtained by the data reading module from the configuration module includes a reading video file frequency, a size of each reading video file, a timeout time of a video file without change, and a queue maximum value.

[0020] In a possible implementation, the loop waiting process execution includes the following steps:

[0021] Obtain the latest data packet information, including an index position and a reading data packet time, if it is the first time to execute this loop step, the index position starts from a size of a current file minus a configured data packet size, and the reading data packet time takes a current system time;

[0022] With the current system time and the time difference of the latest data packet as the basis, it is judged whether the configured "video file no change timeout time" is exceeded, if timeout: call the marking module to set the current live stream as unread, end the related loop;

[0023] If there is no timeout, read the content of the video file according to the index position and the data packet size; get the current queue size in the queue module, and take the current queue size plus the content read this time as the basis to judge whether the configured "queue maximum value" is exceeded, if exceeded: empty the current queue; update the latest data packet information, including the index position and the reading data packet time, the index position is the index position of the last time plus the file size read this time, and the data packet time is the current system time.

[0024] In a possible implementation manner, the loop execution comprises the following steps:

[0025] Get the first data packet in the queue module;

[0026] Get the created client connection information in the marking module;

[0027] Judge the number of clients, if empty: call the marking module to set the current live stream as unread, for ending the related loop;

[0028] If not empty, multiplex the obtained data packet to send data to the client corresponding to each request live stream, that is, respond to the live stream request client, and if a client fails to send, call the marking module to remove the corresponding client.

[0029] The present application has the following beneficial effects:

[0030] (1) Improve processing speed and response ability: by multiplexing data packets, realize the rapid processing and real-time distribution of continuously growing video files, reduce user waiting time, and improve user experience.

[0031] (2) Reduce resource occupation: through intelligent resource scheduling and management mechanism, only one thread of a single live stream is used to read the video file, which reasonably allocates system resources, reduces hardware investment and energy consumption, and reduces operation cost.

[0032] (3) Enhance scalability and stability: modular design and flexible configuration strategy are adopted, which can easily cope with business growth and changes, while ensuring the stability and reliability of the system. BRIEF DESCRIPTION OF DRAWINGS

[0033] Figure 1 The step flow chart of the efficient live stream distribution method for continuously growing video files according to an embodiment of the present application;

[0034] Figure 2 The principle block diagram of the live streaming distribution system applied in the efficient live streaming distribution method for continuously growing video files according to an embodiment of the present application. DETAILED DESCRIPTION

[0035] The technical solutions in the embodiments of the present application will be clearly and completely described with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0036] Referring to Figure 1 , a step flowchart of an efficient live streaming distribution method for continuously growing video files according to an embodiment of the present application is shown, which is applied to a live streaming distribution system including a live streaming request client and a live streaming server as shown in Figure 2 , wherein the live streaming server further includes a verification module, a marking module, a listening and waiting module, a data reading module, a configuration module, a video file, a queue module and a data sending module, wherein the video file is continuously growing and the file name is named with a live streaming identifier, the video file can be generated by an encoder or a third party, and includes the following steps:

[0037] S101, setting the configuration module to perform parameter configuration, wherein the parameters include the frequency of reading the video file, the size of reading the video file each time, the timeout time of the video file without change, the maximum value of the queue and the frequency of sending data; wherein the frequency of reading the video file can be adjusted to cope with the update frequency of the video file under different environments, and the processing performance can be effectively improved. The size of reading the video file each time can be adjusted to achieve the minimum packet loss rate and improve the smoothness according to the network environment. The timeout time of the video file without change can be adjusted according to the client timeout time required by the business. The maximum value of the queue can be adjusted in combination with the actual server memory resources to improve the stability of the data packet. The frequency of sending data can be adjusted according to the actual server bandwidth to improve the stability of the client playback.

[0038] S102, setting the marking module to declare variables, including a data reading thread set, an identifier bit indicating whether the live streaming identifier is being read, and a request client set of the live streaming identifier;

[0039] S103, setting the live streaming request client to perform live streaming request;

[0040] S104, setting the verification module to perform validity and legality verification of the live streaming identifier; for example, the live streaming not maintained in the system or the live streaming that has ended is directly rejected; for example, the client request outside the white list is limited.

[0041] S105, the setting mark module creates a data reading thread corresponding to the live stream identification, the mark module stores the created data reading thread information, marks the live stream identification as being read, and stores the client information of the current requested live stream identification;

[0042] S106, the setting listening waiting module creates a listener to keep the client connection, and uses whether being read as a listening interruption condition, and waits in a loop;

[0043] S107, the setting data reading module creates a separate first-in-first-out queue corresponding to the live stream identification in the queue module, the data reading module obtains configuration information from the configuration module, and the obtained configuration information includes the reading video file frequency, the size of each reading video file, the timeout time of the unchanged video file, and the maximum value of the queue;

[0044] S108, the setting data reading module creates a data sending thread corresponding to the live stream identification; the data reading module uses "whether the live stream is being read" in the mark module as an interruption condition, and uses "reading video file frequency" in the configuration module as a time interval to enter a loop waiting state, and performs a loop waiting process;

[0045] S109, after the loop ends, the thread information corresponding to the live stream identification in the mark module is removed;

[0046] S110, the data sending module uses "whether the live stream is being read" as an interruption condition, and uses "the frequency of sending data" in the configuration module as a time interval to enter a loop, and performs a loop execution;

[0047] S111, based on the client connection, a data packet is sent.

[0048] In another embodiment of the application, the loop waiting process execution in S108 includes the following steps:

[0049] Obtain the latest data packet information: including the index position (the position of the data packet in the video file), the reading data packet time, if it is the first time to execute this loop step, the index position is started from the size of the current file minus the configured "data packet size", and the reading data packet time is taken as the current system time. Wherein the data packet is data information separated according to a certain size in the video file. Taking a 1MB video file as an example, if the size of each data packet is defined as 2KB, the video file includes 512 data packets.

[0050] The time difference between the current system time and the latest data packet is used as the basis to determine whether the configured "video file no change timeout time" is exceeded, if the timeout: call the marking module to set the current live stream as unread, end the related loop. The video file no change means that the video file has no new data packet generated.

[0051] If there is no timeout, read the content of the video file according to the index position and the data packet size; get the current queue size in the queue module, and use the current queue size plus the content read this time as the basis to determine whether the configured "queue maximum value" is exceeded, if exceeded: empty the current queue; update the latest data packet information, including the index position and the reading data packet time, the index position is the last index position plus the current read file size, and the data packet time is the current system time.

[0052] In another embodiment of the application, a high-efficiency live stream distribution method for continuously growing video files includes the following steps in the loop execution in S110:

[0053] Get the first data packet in the queue module;

[0054] Get the created client connection information in the marking module, which can be the client IP;

[0055] Determine the number of clients, if empty: call the marking module to set the current live stream as unread, used to end the related loop;

[0056] If not empty, multiplex the obtained data packet to send data to each client corresponding to the live stream request, that is, respond to the live stream request client, and if a client fails to send, call the marking module to remove the corresponding client.

[0057] The above setting of the high-efficiency live stream distribution method for continuously growing video files realizes efficient and real-time distribution of continuously growing video files by introducing functions such as verification, marking, listening and waiting, data reading, configuration, queue and data sending. Not only improves the smoothness and stability of live service, but also reduces resource occupation and operating cost, has wide application prospect and market demand.

[0058] It should be understood that the example embodiments described herein are illustrative and not limiting. Although one or more embodiments of the application are described in conjunction with the attached figures, it should be understood that various changes in form and detail can be made without departing from the spirit and scope of the application as defined by the appended claims.

Claims

1. An efficient live streaming method for continuously growing video files, characterized in that, The application is applied to live streaming distribution system including live streaming request client and live streaming server, the live streaming server further includes check module, mark module, listening waiting module, data reading module, configuration module, video file, queue module and data sending module, the video file continuously grows and the file name is named by live streaming identification, including the following steps: Setting configuration module to configure parameters; the parameters for configuring include reading video file frequency, video file size for each reading, video file timeout time without change, queue maximum value and data sending frequency; Setting mark module to declare variables, the variables include data reading thread set, live streaming identification whether is being read identification bit, live streaming identification request client set; Setting live streaming request client to make live streaming request; Setting check module to check live streaming identification validity and legality; Setting mark module to create data reading thread corresponding to live streaming identification, mark module stores the created data reading thread information, mark reads live streaming identification as being read, and stores current request live streaming identification client information; Setting listening waiting module to create listening to keep client connection, and to use whether being read as listening interrupt condition, and to circularly wait; Setting data reading module to create live streaming identification corresponding independent first-in-first-out queue in queue module, and data reading module obtains configuration information from configuration module; Setting data reading module to create live streaming identification corresponding data sending thread; data reading module uses "live streaming whether is being read" in mark module as interrupt condition, uses "reading video file frequency" in configuration module as time interval to enter circularly waiting state, and circularly waits; After the cycle ends, remove the thread information corresponding to the live streaming identification from the mark module; Data sending module uses "live streaming whether is being read" as interrupt condition, uses "data sending frequency" in configuration module as time interval to enter cycle, and circularly executes; Based on client connection, send data packet.

2. The method for efficient live streaming delivery for growing video files as claimed in claim 1, wherein, The configuration information obtained by the data reading module from the configuration module includes reading video file frequency, video file size for each reading, video file timeout time without change and queue maximum value.

3. The method for efficient live streaming delivery for growing video files as claimed in claim 1, wherein, The circularly waiting process execution includes the following steps: Obtain latest data packet information: including index position and reading data packet time, the index position is the position of the data packet in the video file, if it is the first time to execute this cycle step, the index position is taken as the size of the current file minus the configured "data packet size", and the reading data packet time is taken as the current system time; according to the time difference between the current system time and the latest data packet time, it is judged whether the configured "video file timeout time without change" is exceeded, if yes: call mark module to set the current live streaming as not read, and end the related cycle; If not, read the content of the video file according to the index position and the data packet size; Get the current queue size in the queue module, add the current queue size and the content of this reading as the basis to determine whether it exceeds the configured "queue maximum value", if it exceeds: empty the current queue; Update the latest packet information, including the index position and the reading packet time, the index position is the last index position plus the current reading file size, and the packet time is the current system time.

4. The method for efficient live streaming of continuously growing video files as claimed in claim 1 wherein, The loop execution includes the following steps: Get the first packet in the queue module; Get the created client connection information in the marking module; Determine the number of clients, if empty: call the marking module to set the current live stream as unread, used to end the related loop; If not empty, reuse the obtained packet to send data to each live stream client corresponding to the request, that is, respond to the live stream request client, and if a client fails to send, call the marking module to remove the corresponding client.

Citation Information

Patent Citations

  • Video streaming data distribution method and device for monitoring device

    CN103731641A

  • Video stream distributing method

    CN106681832A