A method and system for sending live broadcast quick start data
By obtaining the target cache time and fast start time in the live broadcast request, determining the live broadcast cache data issuance strategy, dividing the data and sending it gradually within the target send time, the network congestion and bandwidth waste problems during the live broadcast fast start data is solved, and the realization of the realization of the network congestion and bandwidth waste. Faster live broadcast startup speed and higher data processing efficiency, improving the user's viewing experience.
Patent Information
- Application Number
- CN202411008494.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2044-07-26
AI Technical Summary
When sending live fast start data, network congestion and bandwidth waste are serious, resulting in poor user viewing experience.
By obtaining the target cache time and quick start time in the live broadcast request, determine the live broadcast cache data issuance strategy, split the data and send it gradually within the target send time, dynamically adjust the cache time under the network state to achieve faster live broadcast startup speed and higher data processing efficiency.
It improves the live broadcast startup speed, optimizes the data transmission strategy, improves the user's viewing experience, and reduces network transmission delay and bandwidth waste.
Smart Images

Figure CN118540551B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of live broadcast technology, and in particular relates to a live broadcast quick-start data sending method and system. Background Art
[0002] In the related technology,
[0003] The live broadcast quick start data is usually sent by the live broadcast server instantly sending all the quick start data to the live broadcast end. A large amount of data can easily cause network congestion. Since the quick start duration sent by the live broadcast server is much longer than the minimum quick start duration corresponding to the request, it aggravates the network congestion. In addition, the live broadcast end may quickly switch requests, aggravating network congestion and wasting more bandwidth. Therefore, how to better implement the live broadcast quick start data transmission has become an urgent problem to be solved. Summary of the invention
[0004] In view of the above deficiencies in the prior art, the purpose of the invention is to provide a live broadcast quick-start data sending method and system, which can achieve faster live broadcast startup speed, better data sending strategy and higher data processing efficiency, thereby improving the user's viewing experience.
[0005] According to a first aspect of the present invention, a method for sending live quick-start data is proposed, comprising: S1, obtaining a live broadcast request; S2, obtaining a target cache duration according to a domain name in the live broadcast request; S3, determining quick-start data and a quick-start duration corresponding to the quick-start data from the live broadcast cache data; S4, determining a sending strategy for the live broadcast cache data according to a comparison result between the target cache duration and the quick-start duration; and obtaining first data in a cache queue and a target sending duration corresponding to the first data, and sending the first data and the target data based on the target sending duration when the target data is received within the target sending duration.
[0006] Furthermore, quick-start data and a quick-start duration corresponding to the quick-start data are determined from the live broadcast cache data, including: based on the target cache duration, obtaining the starting position of the quick-start data from the live broadcast cache data; determining a first position between the starting position and the target audio and video position, and using the data corresponding to the first position as the quick-start data; and using the difference between the timestamp of the target audio and video packet and the timestamp of the starting position as the quick-start duration.
[0007] Furthermore, based on the comparison result between the target cache duration and the quick start duration, a strategy for sending out the live cache data is determined, including: judging whether the quick start duration is less than or equal to the target cache duration; when it is determined that the quick start duration is less than or equal to the target cache duration, sending out the quick start data; when it is determined that the quick start duration is greater than the target cache duration, dividing the quick start data into the first data and the second data for sending out.
[0008] Further, the sending time corresponding to the second data is the target cache time, and the target sending time corresponding to the first data is the difference between the quick start time and the target cache time, wherein, when it is determined that the quick start time is greater than the target cache time, the quick start data is divided into the first data and the second data for sending, including: when it is determined that the quick start time is greater than the target cache time, the second data is sent and the first data is stored in the cache queue.
[0009] Furthermore, in a case where the target data is received within the target sending time period, the first data and the target data are sent out based on the target sending time period, including: determining a target data packet corresponding to the first data; based on the target sending time period corresponding to the first data, dividing the target data packet into data packets of equal length and sending them out in sequence, and in a case where the target data is received within each of the equal lengths, sending out the data packets and the target data of the equal lengths.
[0010] Furthermore, the method further includes: sending out the first data when the target data is not received within the target sending time.
[0011] Furthermore, the method also includes: determining the level of the current network status; when the level of the network status is level one, increasing the target cache time length; when the level of the network status is level two, reducing the target cache time length.
[0012] According to a second aspect of the present invention, a live broadcast quick-start data sending system is proposed, comprising: a first acquisition module, used to obtain a live broadcast request; a second acquisition module, used to obtain a target cache duration according to a domain name in the live broadcast request; a determination module, used to determine quick-start data and a quick-start duration corresponding to the quick-start data from the live broadcast cache data; an issuance module, used to determine an issuance strategy for the live broadcast cache data according to a comparison result between the target cache duration and the quick-start duration; and obtaining first data in a cache queue and a target issuance duration corresponding to the first data, and when the target data is received within the target issuance duration, issuing the first data and the target data based on the target issuance duration.
[0013] According to a third aspect of the present invention, an electronic device is proposed, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any of the methods described in the first aspect of the present invention.
[0014] According to a fourth aspect of the present invention, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute any one of the methods according to the first aspect of the present invention.
[0015] The beneficial effects of the present invention are as follows:
[0016] The live broadcast quick start data sending method and system of the present invention obtains a live broadcast request; obtains the target cache duration according to the domain name in the live broadcast request; determines the quick start data and the quick start duration corresponding to the quick start data from the live broadcast cache data; determines the live broadcast cache data sending strategy according to the comparison result of the target cache duration and the quick start duration; and obtains the first data in the cache queue and the target sending duration corresponding to the first data, and when the target data is received within the target sending duration, sends the first data and the target data based on the target sending duration. This method can achieve faster live broadcast startup speed, better data sending strategy and higher data processing efficiency, thereby improving the user's viewing experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings are only used to illustrate specific embodiments and are not considered to limit the present invention. In the entire drawings, the same reference symbols represent the same components. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings.
[0018] Figure 1is a flowchart of a method for sending live quick-start data according to an embodiment of the present invention;
[0019] Figure 2 is a flowchart of a method for sending live quick-start data according to a specific embodiment of the present invention;
[0020] Figure 3 is a structural block diagram of a live broadcast quick start data sending system according to an embodiment of the present invention;
[0021] Figure 4 It is a structural block diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0022] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in the field without making creative work should fall within the scope of protection of the present invention.
[0023] Furthermore, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily obscuring the concepts disclosed in the present invention.
[0024] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the orientation or position relationship indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inside", "outside", etc. is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. In addition, the terms "first", "second", and "third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. The terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be a connection between the two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0025] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of methods and systems consistent with some aspects of the present invention as detailed in the appended claims.
[0026] The present invention proposes a live broadcast quick-start data sending method, system and related equipment. Specifically, the live broadcast quick-start data sending method, system and related equipment of an embodiment of the present invention are described below with reference to the accompanying drawings.
[0027] Figure 1 It is a flowchart of a live broadcast quick start data sending method according to an embodiment of the present invention. It should be noted that the live broadcast quick start data sending method of the embodiment of the present invention can be applied to the live broadcast quick start data sending system of the embodiment of the present invention. The live broadcast quick start data sending system can be configured on an electronic device or in a server. This embodiment of the present application does not limit this.
[0028] like Figure 1 As shown, the live broadcast quick start data sending method includes:
[0029] S110, obtaining a live broadcast request.
[0030] In an embodiment of the present invention, a live broadcast request may be obtained through an electronic device.
[0031] S120, obtaining a target cache duration according to the domain name in the live broadcast request.
[0032] In an embodiment of the present invention, the domain name in the live broadcast request may carry the target cache duration.
[0033] The target cache duration can be understood as the minimum cache duration.
[0034] The domain name carries a configuration file, wherein the configuration file includes a cache configuration, wherein the cache configuration includes a minimum cache duration.
[0035] S130, determining quick start data and a quick start duration corresponding to the quick start data from the live broadcast buffer data.
[0036] In an embodiment of the present invention, based on the target cache duration, the starting position of the quick-start data is obtained from the live broadcast cache data; the first position between the starting position and the target audio and video position is determined, and the data corresponding to the first position is used as the quick-start data; the difference between the timestamp of the target audio and video packet and the timestamp of the starting position is used as the quick-start duration.
[0037] The target audio and video position may be understood as the position of the latest audio and video data currently received.
[0038] Among them, based on the minimum cache duration and the timestamp of the live cache data, search from the latest data packet in the live cache data to the older data packets, that is, start from the latest data packet and search back in chronological order until the data position that meets the minimum cache duration requirement is found, and take the video key frame of the GOP where the data packet of the data is located as the starting position of the fast-start data. Then, the data from the starting position to the latest audio and video is used as the start data. Then, by calculating the difference between the timestamp of the target audio and video packet and the timestamp of the starting position, the fast-start duration can be obtained.
[0039] Among them, GOP represents a group consisting of a series of continuous pictures, which includes a key frame (I frame) and several differential frames (P frame and B frame); "video key frame" usually refers to the I frame in GOP, which is a picture that can be decoded independently and does not depend on other frames.
[0040] S140, determining a strategy for sending out the live cache data based on a comparison result between the target cache duration and the quick start duration; and obtaining the first data in the cache queue and the target sending duration corresponding to the first data, and sending out the first data and the target data based on the target sending duration when the target data is received within the target sending duration.
[0041] That is to say, when the target cache duration and the quick start duration are determined, the target cache duration and the quick start duration can be compared. Based on the comparison result, the strategy for sending the live cache data can be determined. The specific implementation method can refer to the subsequent embodiments.
[0042] According to the live broadcast quick start data sending method of the embodiment of the present invention, a live broadcast request is obtained; the target cache duration is obtained according to the domain name in the live broadcast request; the quick start data and the quick start duration corresponding to the quick start data are determined from the live broadcast cache data; the live broadcast cache data sending strategy is determined according to the comparison result of the target cache duration and the quick start duration; and the first data in the cache queue and the target sending duration corresponding to the first data are obtained, and when the target data is received within the target sending duration, the first data and the target data are sent based on the target sending duration. This method can achieve faster live broadcast startup speed, better data sending strategy and higher data processing efficiency, thereby improving the user's viewing experience.
[0043] In order to make it easier for those skilled in the art to understand the present invention, Figure 2 A method for sending live quick-start data according to a specific embodiment of the present invention is as follows. Figure 2 As shown, the live broadcast quick start data sending method includes:
[0044] S210, obtaining a live broadcast request.
[0045] S220, obtaining a target cache duration according to the domain name in the live broadcast request.
[0046] S230: Determine quick start data and a quick start duration corresponding to the quick start data from the live broadcast buffer data.
[0047] In the embodiment of the present invention, the implementation of step S210 to step S230 may refer to the implementation of step S110 to step S130 described above, and the present invention will not elaborate on this.
[0048] S240, determining whether the quick start duration is less than or equal to the target cache duration.
[0049] In an embodiment of the present invention, when the target cache duration is obtained and the quick start duration is determined, it may be determined whether the quick start duration is less than or equal to the target cache duration.
[0050] S250: When it is determined that the quick start duration is less than or equal to the target cache duration, the quick start data is sent out.
[0051] In an embodiment of the present invention, when the quick start duration is less than or equal to the target cache duration, this means that the quick start requirement can be met, so quick start data is sent so that the user can quickly start watching the live broadcast.
[0052] S260: When it is determined that the quick start duration is greater than the target cache duration, the quick start data is divided into first data and second data for sending.
[0053] The sending time corresponding to the second data is the target cache time, and the target sending time corresponding to the first data is the difference between the quick start time and the target cache time.
[0054] In an embodiment of the present invention, when it is determined that the fast start time length is greater than the target cache time length, the second data is sent out and the first data is stored in the cache queue.
[0055] S270, obtaining the first data in the cache queue and the target sending time duration corresponding to the first data.
[0056] S280, when the target data is received within the target sending time period, the first data and the target data are sent based on the target sending time period.
[0057] In an embodiment of the present invention, a target data packet corresponding to the first data is determined; based on the target sending duration corresponding to the first data, the target data packet is divided into data packets of equal duration and sent out in sequence; and when the target data is received within each equal duration, the data packets of equal duration and the target data are sent out.
[0058] Among them, when the target data is received within each equal time period, the target sending time period can be sent.
[0059] For example, the target data packets corresponding to the first data are the first data packet, the second data packet and the third data packet, wherein the target sending time corresponding to the first data is 3 seconds, that is, the first data needs to be sent within 3 seconds. For example, when the first target data is received in the first second, the first target data is stored in the cache queue, and the first data packet and the first target data are sent at the same time. When the second target data is received in the second second, the second target data is stored in the cache queue, and the second data and the second target data are sent at the same time. When the third target data is received in the third second, the third target data is stored in the cache queue, and the third data and the third target data are sent at the same time. At this time, the cache queue is empty. When the target data is received again after 3 seconds, the target data is no longer stored in the cache queue, but is sent directly.
[0060] S290, when the target data is not received within the target sending time, the first data is sent.
[0061] In one embodiment of the present invention, the level of the current network status is determined; when the level of the network status is level one, the target cache duration is increased; when the level of the network status is level two, the target cache duration is decreased. That is, when the network condition is good, the minimum cache duration can be appropriately reduced to improve the real-time performance of the live broadcast; and when the network condition is poor, the minimum cache duration is appropriately increased to ensure the stability of the live broadcast. The increased or decreased target cache duration is then used as the minimum cache duration.
[0062] According to the live broadcast quick-start data sending method of the embodiment of the present invention, by judging the relationship between the quick-start duration and the target cache duration, it is ensured that the user can start watching the live broadcast in the shortest time. If the quick-start duration is less than or equal to the target cache duration, the quick-start data is sent directly to achieve a quick start; when the quick-start duration is greater than the target cache duration, the quick-start data is divided into two parts and sent out, wherein the second data is sent out immediately to meet the target cache duration requirement, and the first data is cached and subsequently processed according to the difference between the first data and the target cache duration. This strategy can effectively balance the efficiency and real-time requirements of data transmission; by managing the first data and its corresponding target sending duration through the cache queue, dynamic processing of live broadcast data is achieved. When the target data is received within the target sending time, the first data and the target data can be combined and sent in time, ensuring the continuity and real-time nature of data transmission; if all the target data are not received within the target sending time, the cached first data will still be sent, which to a certain extent ensures the continuity of the live broadcast content and reduces the risk of playback interruption due to data transmission delay or loss; through fine time management and block processing of live broadcast data, network resources can be used more efficiently, reducing unnecessary data retransmission and waiting time, thereby improving the overall network transmission efficiency; therefore, the present invention shortens the user's waiting time, improves the fluency and stability of live broadcast viewing, and thus directly enhances the user's viewing experience.
[0063] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0064] According to one aspect of an embodiment of the present invention, a live broadcast quick start data sending system is also proposed. Figure 3 is a structural block diagram of a live broadcast quick start data sending system according to an embodiment of the present invention; Figure 3 As shown, including:
[0065] A first acquisition module 310 is used to acquire a live broadcast request;
[0066] A second acquisition module 320 is used to acquire a target cache duration according to the domain name in the live broadcast request;
[0067] A determination module 330, configured to determine quick start data and a quick start duration corresponding to the quick start data from the live broadcast buffer data;
[0068] The sending module 340 is used to determine the sending strategy of the live broadcast cache data according to the comparison result of the target cache time and the quick start time; and obtain the first data in the cache queue and the target sending time corresponding to the first data. When the target data is received within the target sending time, the first data and the target data are sent based on the target sending time.
[0069] According to the live broadcast quick start data sending system of the embodiment of the present invention, a live broadcast request is obtained; the target cache duration is obtained according to the domain name in the live broadcast request; the quick start data and the quick start duration corresponding to the quick start data are determined from the live broadcast cache data; the live broadcast cache data sending strategy is determined according to the comparison result of the target cache duration and the quick start duration; and the first data in the cache queue and the target sending duration corresponding to the first data are obtained, and when the target data is received within the target sending duration, the first data and the target data are sent based on the target sending duration. In this way, a faster live broadcast startup speed, a better data sending strategy and a higher data processing efficiency can be achieved, thereby improving the user's viewing experience.
[0070] Optionally, the determination module 330 is specifically used to obtain the starting position of the quick-start data from the live broadcast cache data based on the target cache duration; determine the first position between the starting position and the target audio and video position, and use the data corresponding to the first position as the quick-start data; and use the difference between the timestamp of the target audio and video packet and the timestamp of the starting position as the quick-start duration.
[0071] Optionally, the sending module 340 is specifically used to determine whether the quick start duration is less than or equal to the target cache duration; when it is determined that the quick start duration is less than or equal to the target cache duration, the quick start data is sent out; when it is determined that the quick start duration is greater than the target cache duration, the quick start data is divided into the first data and the second data and sent out.
[0072] Optionally, the sending time corresponding to the second data is the target cache time, and the target sending time corresponding to the first data is the difference between the quick start time and the target cache time, wherein the sending module 340 is specifically used to send the second data and store the first data in the cache queue when it is determined that the quick start time is greater than the target cache time.
[0073] Optionally, the sending module 340 is specifically used to determine the target data packet corresponding to the first data; based on the target sending duration corresponding to the first data, the target data packet is divided into data packets of equal duration and sent out in sequence; and when the target data is received within each of the equal durations, the data packets of equal duration and the target data are sent out.
[0074] Optionally, the system also includes: an execution module, which is used to send out the first data if the target data is not received within the target sending time.
[0075] Optionally, the system also includes an adjustment module, which is used to determine the level of the current network status; when the level of the network status is level one, increase the target cache time length; when the level of the network status is level two, reduce the target cache time length.
[0076] According to one aspect of an embodiment of the present invention, an electronic device is provided.
[0077] Figure 4 Schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Figure 4 As shown, the electronic device may include one or more ( Figure 4 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a microprocessor (Microprocessor Unit, referred to as MPU) or a programmable logic device (Programmable logic device, referred to as PLD)) and a memory 104 for storing data. In an exemplary embodiment, the electronic device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 4 The structure shown is for illustration only and does not limit the structure of the above terminal device. Figure 4 More or fewer components as shown, or with Figure 4 Equivalent functions or comparisons shown Figure 4 A different configuration with more features is shown.
[0078] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the live broadcast quick start data transmission method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0079] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the switching device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0080] The present invention proposes a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute a live broadcast quick-start data sending method.
[0081] The applicant of the present invention has made a detailed explanation and description of the implementation examples of the present invention in conjunction with the drawings in the specification. However, those skilled in the art should understand that the above implementation examples are only preferred implementation schemes of the present invention, and the detailed description is only to help readers better understand the spirit of the present invention, but not to limit the scope of protection of the present invention. On the contrary, any improvements or modifications based on the inventive spirit of the present invention should fall within the scope of protection of the present invention.
[0082] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0083] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present invention. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.
[0084] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, rather than to limit them. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the above embodiments, or replace some of the technical features therein by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. Any changes or replacements that can be easily thought of by those skilled in the art within the technical scope disclosed in the present invention should be covered within the protection scope of the present invention.
Claims
1. A method for sending live broadcast quick start data, characterized in that: include: S1, obtain live broadcast request; S2, obtaining the target cache duration according to the domain name in the live broadcast request; S3, determining quick start data and a quick start duration corresponding to the quick start data from the live broadcast buffer data; S4, determining a sending strategy of the live broadcast cache data according to a comparison result between the target cache duration and the quick start duration; and obtaining first data in the cache queue and a target sending time duration corresponding to the first data, and sending the first data and the target data based on the target sending time duration when the target data is received within the target sending time duration; Wherein, determining the quick start data and the quick start duration corresponding to the quick start data from the live broadcast cache data includes: based on the target cache duration, obtaining the starting position of the quick start data from the live broadcast cache data; determining the first position between the starting position and the target audio and video position, and using the data corresponding to the first position as the quick start data; using the difference between the timestamp of the target audio and video packet and the timestamp of the starting position as the quick start duration; Wherein, according to the comparison result of the target cache duration and the quick start duration, determining the sending strategy of the live cache data includes: judging whether the quick start duration is less than or equal to the target cache duration; sending the quick start data when it is determined that the quick start duration is less than or equal to the target cache duration; dividing the quick start data into the first data and the second data and sending them when it is determined that the quick start duration is greater than the target cache duration; Among them, the sending time corresponding to the second data is the target cache time, and the target sending time corresponding to the first data is the difference between the quick start time and the target cache time. Among them, when it is determined that the quick start time is greater than the target cache time, the quick start data is divided into the first data and the second data for sending, including: when it is determined that the quick start time is greater than the target cache time, the second data is sent and the first data is stored in the cache queue.
2. The method for sending live quick start data according to claim 1, characterized in that: In a case where the target data is received within the target sending time, sending the first data and the target data based on the target sending time includes: Determining a target data packet corresponding to the first data; Based on the target sending duration corresponding to the first data, the target data packet is divided into data packets of equal duration and sent out in sequence. When the target data is received within each of the equal durations, the data packets of equal duration and the target data are sent out.
3. The method for sending live quick start data according to claim 1, characterized in that: The method further comprises: If the target data is not received within the target sending time, the first data is sent.
4. The method for sending live quick start data according to claim 1, characterized in that: The method further comprises: Determine the level of current network status; When the level of the network status is level one, increasing the target cache time length; When the level of the network status is level 2, the target cache time length is reduced.
5. A live broadcast quick start data transmission system, characterized in that: include: A first acquisition module, used to acquire a live broadcast request; A second acquisition module is used to acquire a target cache duration according to the domain name in the live broadcast request; A determination module, used to determine quick start data and a quick start duration corresponding to the quick start data from the live broadcast buffer data; An issuing module, configured to determine an issuing strategy for the live broadcast cache data according to a comparison result between the target cache duration and the quick start duration; and obtaining first data in the cache queue and a target sending time duration corresponding to the first data, and sending the first data and the target data based on the target sending time duration when the target data is received within the target sending time duration; Wherein, determining the quick start data and the quick start duration corresponding to the quick start data from the live broadcast cache data includes: based on the target cache duration, obtaining the starting position of the quick start data from the live broadcast cache data; determining the first position between the starting position and the target audio and video position, and using the data corresponding to the first position as the quick start data; using the difference between the timestamp of the target audio and video packet and the timestamp of the starting position as the quick start duration; Wherein, according to the comparison result of the target cache duration and the quick start duration, determining the sending strategy of the live cache data includes: judging whether the quick start duration is less than or equal to the target cache duration; sending the quick start data when it is determined that the quick start duration is less than or equal to the target cache duration; dividing the quick start data into the first data and the second data and sending them when it is determined that the quick start duration is greater than the target cache duration; Among them, the sending time corresponding to the second data is the target cache time, and the target sending time corresponding to the first data is the difference between the quick start time and the target cache time. Among them, when it is determined that the quick start time is greater than the target cache time, the quick start data is divided into the first data and the second data for sending, including: when it is determined that the quick start time is greater than the target cache time, the second data is sent and the first data is stored in the cache queue.
6. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 4.
7. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Fast broadcast starting method and apparatus of high-definition live video
CN109618179A
Live broadcast data processing method and device, live broadcast client equipment and storage medium
CN113645477A
Live streaming data processing method and device and electronic equipment
CN113824970A
Video playing control method and device
WO2018000624A1
