CN115022658B - Method, device, equipment and medium suitable for embedded live broadcast data processing - Google Patents

Method, device, equipment and medium suitable for embedded live broadcast data processing Download PDF

Info

Publication number
CN115022658B
CN115022658B CN202210604096.7A CN202210604096A CN115022658B CN 115022658 B CN115022658 B CN 115022658B CN 202210604096 A CN202210604096 A CN 202210604096A CN 115022658 B CN115022658 B CN 115022658B
Authority
CN
China
Prior art keywords
display
target
sequence number
data segment
displayed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210604096.7A
Other languages
Chinese (zh)
Other versions
CN115022658A (en
Inventor
何觉清
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Lijiahe Electronic Technology Co ltd
Original Assignee
Guangzhou Lijiahe Electronic Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Lijiahe Electronic Technology Co ltd filed Critical Guangzhou Lijiahe Electronic Technology Co ltd
Priority to CN202210604096.7A priority Critical patent/CN115022658B/en
Publication of CN115022658A publication Critical patent/CN115022658A/en
Application granted granted Critical
Publication of CN115022658B publication Critical patent/CN115022658B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • 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/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • H04N21/23106Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion involving caching operations
    • 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/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • H04N21/23109Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion by placing content in organized collections, e.g. EPG data repository
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4331Caching operations, e.g. of an advertisement for later insertion during playback
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4332Content storage operation, e.g. storage operation in response to a pause request, caching operations by placing content in organized collections, e.g. local EPG data repository
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/8547Content authoring involving timestamps for synchronizing content
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The embodiment of the invention discloses a method, a device, equipment and a medium for processing embedded live broadcast data, wherein the method comprises the following steps: determining a target node sequence number from the display auxiliary list according to a timestamp range corresponding to the target data segment, and taking a ring queue corresponding to a data channel corresponding to the target data segment as a target queue; if the target node sequence number is not empty, storing the target data segment into a queue node corresponding to the target node sequence number in the target queue; if the target node sequence number is empty, determining a second sequence number from a preset node sequence number list according to the node sequence number corresponding to the timestamp range with the latest starting time in the display auxiliary list and the timestamp range corresponding to the target data segment, updating the display auxiliary list according to the second sequence number, and storing the target data segment into a queue node corresponding to the second sequence number in the target queue; and displaying according to the display auxiliary list and each annular queue. The method is beneficial to aligning and displaying the data segments with the same time stamp range.

Description

Method, device, equipment and medium suitable for embedded live broadcast data processing
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a medium for processing embedded live broadcast data.
Background
With the development of technology, live broadcasting is popular with users because of integrating the advantages of images, sounds and characters, and particularly, the live broadcasting based on embedded mobile electronic devices is widely applied due to the portability of the live broadcasting. During live broadcasting, different types of data such as audio, video, barrage, popup window and the like are generated, the different types of data are transmitted by adopting different data channels, and due to the fact that the data of the different data channels are difficult to align, the display of live broadcasting data is in a time-misalignment condition, for example, the popup window is different from the data channels of video, the data volume of the data channel corresponding to the popup window is less than that of the data channel corresponding to the video, the popup window designed for the content of the video of 8 points 04 points possibly reaches the mobile electronic equipment before the video of 8 points 04 points, so that the mobile electronic equipment ejects the popup window designed for the content of the video of 8 points 04 points when the video of 8 points 02 points is displayed, the popup window leads to content penetration in advance, weakens the accuracy of interaction, and thus the viewing experience of live broadcasting data is seriously affected.
Disclosure of Invention
Based on the above, it is necessary to provide a method, a device, equipment and a medium for processing embedded live broadcast data, aiming at the technical problem that the display time of live broadcast data is not aligned due to the fact that the data of different data channels are difficult to align because the data of different data channels are received by adopting different data channels for transmission during live broadcast.
A method for processing live data suitable for embedding, the method comprising:
acquiring each live broadcast data packet sent by each data channel, analyzing each live broadcast data packet to obtain an analysis result, and storing the analysis result into a local cache;
extracting a data segment of a server time stamp within a target time stamp range from each analysis result corresponding to each data channel of the local cache as a target data segment, wherein the target time stamp range is any time stamp range of which the processing state in a preset display auxiliary list is not displayed;
searching a node sequence number from the display auxiliary list according to the timestamp range corresponding to the target data segment to obtain a target node sequence number, and taking a ring-shaped queue corresponding to the data channel corresponding to the target data segment as a target queue;
If the target node sequence number is not empty, storing the target data segment into a queue node corresponding to the target node sequence number in the target queue;
if the target node sequence number is empty, taking the node sequence number corresponding to the timestamp range with the latest starting time in the auxiliary display list as a first sequence number, searching a node sequence number from a preset node sequence number list according to the first sequence number, the timestamp range corresponding to the first sequence number and the timestamp range corresponding to the target data segment, taking the node sequence number as a second sequence number, updating the node sequence number corresponding to the target data segment in the auxiliary display list according to the second sequence number, and storing the target data segment into the queue node corresponding to the second sequence number in the target queue;
and displaying according to the display auxiliary list and each annular queue.
A live data processing method device suitable for embedding, the device comprising:
the data acquisition module is used for acquiring each live broadcast data packet sent by each data channel, analyzing each live broadcast data packet to obtain an analysis result, and storing the analysis result into a local cache;
The target data segment determining module is used for extracting a data segment of which the server-side timestamp is in a target timestamp range from the analysis results corresponding to each data channel of the local cache, and taking the data segment as a target data segment, wherein the target timestamp range is any timestamp range which is not displayed in a preset display auxiliary list and is in a processing state;
the target node sequence number determining module is used for searching a node sequence number from the display auxiliary list according to the timestamp range corresponding to the target data segment to obtain a target node sequence number, and taking an annular queue corresponding to the data channel corresponding to the target data segment as a target queue;
the first processing module is used for storing the target data segment into a queue node corresponding to the target node sequence number in the target queue if the target node sequence number is not empty;
the second processing module is configured to, if the target node sequence number is null, take the node sequence number corresponding to the timestamp range with the latest start time in the auxiliary display list as a first sequence number, search a node sequence number from a preset node sequence number list according to the first sequence number, the timestamp range corresponding to the first sequence number, and the timestamp range corresponding to the target data segment, and use the node sequence number as a second sequence number, update the node sequence number corresponding to the target data segment in the auxiliary display list according to the second sequence number, and store the target data segment to the queue node corresponding to the second sequence number in the target queue;
And the display module is used for displaying according to the display auxiliary list and each annular queue.
A computer device comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of:
acquiring each live broadcast data packet sent by each data channel, analyzing each live broadcast data packet to obtain an analysis result, and storing the analysis result into a local cache;
extracting a data segment of a server time stamp within a target time stamp range from each analysis result corresponding to each data channel of the local cache as a target data segment, wherein the target time stamp range is any time stamp range of which the processing state in a preset display auxiliary list is not displayed;
searching a node sequence number from the display auxiliary list according to the timestamp range corresponding to the target data segment to obtain a target node sequence number, and taking a ring-shaped queue corresponding to the data channel corresponding to the target data segment as a target queue;
if the target node sequence number is not empty, storing the target data segment into a queue node corresponding to the target node sequence number in the target queue;
If the target node sequence number is empty, taking the node sequence number corresponding to the timestamp range with the latest starting time in the auxiliary display list as a first sequence number, searching a node sequence number from a preset node sequence number list according to the first sequence number, the timestamp range corresponding to the first sequence number and the timestamp range corresponding to the target data segment, taking the node sequence number as a second sequence number, updating the node sequence number corresponding to the target data segment in the auxiliary display list according to the second sequence number, and storing the target data segment into the queue node corresponding to the second sequence number in the target queue;
and displaying according to the display auxiliary list and each annular queue.
A computer readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
acquiring each live broadcast data packet sent by each data channel, analyzing each live broadcast data packet to obtain an analysis result, and storing the analysis result into a local cache;
extracting a data segment of a server time stamp within a target time stamp range from each analysis result corresponding to each data channel of the local cache as a target data segment, wherein the target time stamp range is any time stamp range of which the processing state in a preset display auxiliary list is not displayed;
Searching a node sequence number from the display auxiliary list according to the timestamp range corresponding to the target data segment to obtain a target node sequence number, and taking a ring-shaped queue corresponding to the data channel corresponding to the target data segment as a target queue;
if the target node sequence number is not empty, storing the target data segment into a queue node corresponding to the target node sequence number in the target queue;
if the target node sequence number is empty, taking the node sequence number corresponding to the timestamp range with the latest starting time in the auxiliary display list as a first sequence number, searching a node sequence number from a preset node sequence number list according to the first sequence number, the timestamp range corresponding to the first sequence number and the timestamp range corresponding to the target data segment, taking the node sequence number as a second sequence number, updating the node sequence number corresponding to the target data segment in the auxiliary display list according to the second sequence number, and storing the target data segment into the queue node corresponding to the second sequence number in the target queue;
and displaying according to the display auxiliary list and each annular queue.
According to the embedded live broadcast data processing method, the node sequence number is searched from the display auxiliary list according to the timestamp range corresponding to the target data segment, the node sequence number is obtained, the annular queue corresponding to the data channel corresponding to the target data segment is used as a target queue, if the target node sequence number is not empty, the target data segment is stored in a queue node corresponding to the target node sequence number in the target queue, if the target node sequence number is empty, the node sequence number corresponding to the timestamp range with the latest starting time in the display auxiliary list is used as a first sequence number, the node sequence number is searched from a preset node sequence number list according to the timestamp range corresponding to the first sequence number and the timestamp range corresponding to the target data segment, the node sequence number corresponding to the target data segment is used as a second sequence number, the node sequence number corresponding to the target data segment in the display auxiliary list is updated according to the second sequence number, the node sequence number corresponding to the target data segment is stored in the second queue, and the same data segment is stored in the same queue, and the same data is favorably stored in the display auxiliary list; the target data segment is extracted through the timestamp range of the display auxiliary list, so that the processing of the segments is realized, the display instantaneity is improved, and the method and the device are suitable for embedded live broadcast application scenes.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Wherein:
FIG. 1 is a flow chart of a method of processing live data suitable for embedding in one embodiment;
FIG. 2 is a block diagram of a device suitable for embedded live data processing in one embodiment;
FIG. 3 is a block diagram of a computer device in one embodiment.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
As shown in fig. 1, in one embodiment, a method for processing live data suitable for embedding is provided. The method can be applied to the terminal of the embedded equipment, and the embodiment is exemplified by the terminal. Embedded devices include, but are not limited to: audio and video recorder, cell-phone, panel computer and wearing equipment.
When the application is applied to an audio-video recorder, the audio-video recorder comprises: CPU (central processing unit), memory, USB (Universal Serial Bus) protocol conversion module, HDMI (high definition multimedia interface) protocol conversion module, video analog-to-digital conversion module, audio analog-to-digital conversion module, wireless network module, wired broadband network module, CVBS (composite synchronous video broadcast signal or composite video blanking and synchronization) output module, HDMI output module, TF (TransFLash) card, U disk (universal serial bus), power amplifier module, display screen, and power module, wherein the power amplifier module comprises digital-to-analog conversion unit, power amplifier unit, loudspeaker and earphone interface; the CPU is respectively and electrically connected with the memory, the USB protocol conversion module, the HDMI protocol conversion module, the video analog-to-digital conversion module, the audio analog-to-digital conversion module, the wireless network module, the wired broadband network module, the CVBS output module, the HDMI output module, the TF card, the U disk, the power amplification module and the display screen; the power supply module is used for supplying power to each component or module of the audio and video recorder; the audio analog-to-digital conversion module receives audio signals and/or microphone signals, the video analog-to-digital conversion module receives CVBS signals, the HDMI protocol conversion module receives HDMI signals, the USB protocol conversion module receives computer data, the CVBS output module is connected with the television, the HDMI output module is used for being connected with the high-definition television, the wireless network module receives wireless network signals, and the wired broadband network module receives limited network signals.
The application relates to a method suitable for processing embedded live broadcast data, which specifically comprises the following steps:
102, acquiring each live broadcast data packet sent by each data channel, analyzing each live broadcast data packet to obtain an analysis result, and storing the analysis result in a local cache;
the data channel may be a signal channel, a sub-channel in a signal channel, or a virtual channel for transmitting data. The signal channel may be one or more of an HDMI signal channel, a CVBS signal channel, a wireless network channel, a wired network channel.
Specifically, acquiring live broadcast data packets sent by a server through each data channel; and adopting an analysis method corresponding to each data channel to analyze the live broadcast data packet corresponding to the data channel, taking the data obtained by analysis as an analysis result, and storing the analysis result in a local cache of local equipment.
Step 104, extracting a data segment of a server timestamp in a target timestamp range from each analysis result corresponding to each data channel of the local cache, wherein the target timestamp range is any timestamp range of which the processing state in a preset display auxiliary list is not displayed;
The server time stamp is the planned presentation time of the server mark.
The auxiliary list is displayed, which comprises: range number, timestamp range, processing status, node number, standard presentation duration, presentation start time, presentation end time. The timestamp range is a time range from a start time to an end time. The initial values of the processing states are not shown. The node sequence number is the sequence number of the queue node. The presentation start time is the start time at which the presentation is performed. The display end time is the end time of the display. It will be appreciated that the data records in the auxiliary list are presented in ascending order of start time of the range of time stamps, and that the initial value of the node sequence number in the auxiliary list is presented as a null value.
Specifically, any timestamp range in which the processing state in the presentation assistance list is not presented is taken as the target timestamp range; and extracting a data segment with a server time stamp within a target time stamp range from each analysis result corresponding to each data channel of the local cache, and taking the extracted data segment as a target data segment, namely, the server time stamp corresponding to the target data segment is positioned within the target time stamp range, wherein the target data segment is a data segment corresponding to one data channel.
Optionally, any timestamp range in which the processing state in the auxiliary list is not shown is taken as the target timestamp range, and the ending time of the target timestamp range is earlier than the current time.
Step 106, searching a node sequence number from the display auxiliary list according to the timestamp range corresponding to the target data segment to obtain a target node sequence number, and taking a ring queue corresponding to the data channel corresponding to the target data segment as a target queue;
specifically, according to the timestamp range corresponding to the target data segment, searching a node sequence number from the display auxiliary list, if the node sequence number is searched, taking the searched node sequence number as a target node sequence number, and if the node sequence number is not searched, taking a null value as the target node sequence number; and taking the annular queue corresponding to the data channel corresponding to the target data segment as a target queue, and providing a basis for inserting the data segment in the target queue.
The circular queue is a fixed length circular queue. A plurality of queue nodes are arranged in the annular queue, and each queue node is provided with a node serial number. In the same annular queue, the node sequence numbers have uniqueness.
It can be understood that the number of queue nodes of the ring queues corresponding to the data channels is the same, and the mode of setting the node serial numbers is the same.
Step 108, if the target node sequence number is not null, storing the target data segment into a queue node corresponding to the target node sequence number in the target queue;
specifically, if the target node sequence number is not null, it means that the timestamp range corresponding to the target data segment already has a data segment cached in a ring queue, so that the target data segment is stored in a queue node corresponding to the target node sequence number in the target queue, thereby realizing that the data segments in the same timestamp range are stored in the queue nodes with the same node sequence number.
Step 110, if the target node sequence number is null, using the node sequence number corresponding to the timestamp range with the latest starting time in the auxiliary display list as a first sequence number, searching a node sequence number from a preset node sequence number list according to the first sequence number, the timestamp range corresponding to the first sequence number and the timestamp range corresponding to the target data segment, and using the node sequence number as a second sequence number, updating the node sequence number corresponding to the target data segment in the auxiliary display list according to the second sequence number, and storing the target data segment into the queue node corresponding to the second sequence number in the target queue;
The node sequence number list comprises a plurality of node sequence numbers, wherein each node sequence number is arranged in positive sequence.
Specifically, if the target node sequence number is null, it means that the timestamp range corresponding to the target data segment has not been cached in the ring queue, and at this time, the node sequence number corresponding to the timestamp range needs to be determined; taking the node sequence number corresponding to the timestamp range with the latest starting time in the display auxiliary list as a first sequence number, subtracting the range sequence number corresponding to the timestamp range corresponding to the first sequence number from the range sequence number corresponding to the timestamp range corresponding to the target data segment, and obtaining the sequence number moving number; starting with the node sequence number corresponding to the first sequence number in the node sequence number list, moving the number of the sequence numbers, and taking the moved node sequence number as a second sequence number; replacing a node sequence number corresponding to the timestamp range corresponding to the target data segment in the display auxiliary list with the second sequence number; and storing the target data segment into the queue node corresponding to the second sequence number in the target queue, thereby realizing that the data segment with the same time stamp range is stored in the queue node corresponding to the same node sequence number, and storing the target data segment into the annular queue corresponding to the data channel corresponding to the target data segment.
For example, the range number corresponding to the timestamp range corresponding to the target data segment is 5, the range number corresponding to the timestamp range corresponding to the first sequence number is 3, the number of shifting is 2, the node number at the 3 rd bit in the node number list is the same as the first sequence number, the positive sequence is shifted from the 2 th bit to the 5 th bit, and the node number at the 5 th bit is used as the second sequence number.
For another example, the range number corresponding to the timestamp range corresponding to the target data segment is 4, the range number corresponding to the timestamp range corresponding to the first sequence number is 7, the number of the sequence number shifts is 3, the node number at the 7 th bit in the node sequence number list is the same as the first sequence number, the node sequence number at the 4 th bit is regarded as the second sequence number after shifting by 3 bits in the reverse order.
And step 112, displaying according to the display auxiliary list and each annular queue.
Specifically, a timestamp range with the earliest processing state of unrepresented starting time is searched from the presentation auxiliary list, a node sequence number corresponding to the searched timestamp range is used as a node sequence number to be presented, target data segments are extracted from queue nodes corresponding to the node sequence number to be presented in each annular queue, and each extracted target data segment is presented. Thereby realizing the alignment display of the data segments with the same timestamp range.
It can be understood that the extraction of the target data segment from the queue node corresponding to the node serial number to be displayed in each annular queue is a deletion type extraction, which means that the queue node corresponding to the node serial number to be displayed in each annular queue is empty after the extraction.
It will be appreciated that each extracted target data segment is presented, and the processing state in the presentation assistance list corresponding to each extracted target data segment is set to be presented.
According to the embodiment, a node sequence number is searched from the display auxiliary list according to the timestamp range corresponding to the target data segment, the node sequence number is obtained, a ring-shaped queue corresponding to the data channel corresponding to the target data segment is used as a target queue, if the target node sequence number is not empty, the target data segment is stored in a queue node corresponding to the target node sequence number in the target queue, if the target node sequence number is empty, the node sequence number corresponding to the timestamp range with the latest starting time in the display auxiliary list is used as a first sequence number, according to the first sequence number, the timestamp range corresponding to the first sequence number and the timestamp range corresponding to the target data segment, the node sequence number is searched from a preset node sequence number list and used as a second sequence number, and if the target node sequence number is empty, the node sequence number corresponding to the target data segment in the display auxiliary list is stored in the queue node corresponding to the second sequence number, so that the same node sequence number is stored in the queue, and the same data segment is aligned with the timestamp range in the queue, and the same data segment is stored in the queue; the target data segment is extracted through the timestamp range of the display auxiliary list, so that the processing of the segments is realized, the display instantaneity is improved, and the method and the device are suitable for embedded live broadcast application scenes.
In one embodiment, the step of displaying according to the auxiliary list and each ring queue includes:
step 202, obtaining the current time, and subtracting a preset delay extraction duration from the current time to serve as an extraction ending time;
specifically, the current time is subtracted by a preset delay extraction duration, and the calculated time is taken as the extraction end time.
The delay extraction duration is a value greater than 0.
Step 204, extracting the timestamp range with the processing state being unrepresented and the earliest starting time from the presentation auxiliary list as a timestamp range to be processed, wherein the starting time of the timestamp range to be processed is not later than the extraction ending time;
specifically, the timestamp range with the processing state being unrepresented and the earliest starting time is extracted from the presentation auxiliary list as a timestamp range to be processed, wherein the starting time of the timestamp range to be processed is not later than the extraction ending time, so that the extracted timestamp range to be processed is the timestamp range which is not presented and has the interval duration from the current time not less than the delay extraction duration and the earliest starting time.
Step 206, judging whether each queue node corresponding to the node serial number corresponding to the timestamp range to be processed is empty;
step 208, if yes, updating the processing state corresponding to the timestamp range to be processed in the display auxiliary list to be displayed, repeatedly executing the current time, subtracting a preset delay extraction duration from the current time, and taking the current time as an extraction ending time until a live broadcast ending signal is obtained;
specifically, if yes, that is, each queue node corresponding to the node serial number corresponding to the timestamp range to be processed is empty, which means that no data in the timestamp range to be processed can be displayed, so that a processing state corresponding to the timestamp range to be processed in the display auxiliary list is updated to be displayed; and repeatedly executing the step of acquiring the current time and subtracting a preset delay extraction time length from the current time as an extraction ending time until a live broadcasting ending signal is acquired, namely repeatedly executing the steps 202 to 208 until the live broadcasting ending signal is acquired.
Step 210, if not, acquiring each target data segment from each ring queue according to the node sequence number corresponding to the timestamp range to be processed, adding the data segment set to the tail of a preset preview queue as a data segment set, updating the processing state corresponding to the timestamp range to be displayed in the display auxiliary list, according to the maximum display duration corresponding to the data segment set, updating the standard display duration corresponding to the timestamp range to be processed in the display auxiliary list, generating a timing task according to the start time of the timestamp range to be processed and the earliest service end timestamp of each target data segment in the data segment set, repeatedly executing the current time, subtracting the preset delay extraction duration from the current time, and taking the current time as the step of extracting end time until a live broadcast end signal is acquired;
Specifically, if not, that is, each queue node corresponding to the node serial number corresponding to the timestamp range to be processed is not empty, which means that the timestamp range to be processed has data that can be displayed, so that each target data segment in each queue node corresponding to the node serial number corresponding to the timestamp range to be processed is obtained from each ring queue, and each obtained target data segment is used as the data segment set; the data segment set is added to the tail of a preset preview queue, so that a foundation is provided for display; updating the processing state corresponding to the timestamp range to be processed in the display auxiliary list to be displayed, so that the processing state is updated in time; replacing and updating the standard display duration corresponding to the timestamp range to be processed in the display auxiliary list according to the maximum display duration corresponding to the data segment set, wherein the maximum display duration is the data segment display duration with the maximum value, and the data segment display duration is the latest service end timestamp of one target data segment minus the earliest service end timestamp of the target data segment; generating a timing task according to the starting time of the timestamp range to be processed and the earliest timestamp of the service end of each target data segment in the data segment set, wherein the target data segments in the data segment set are in one-to-one correspondence with the timing task; and repeatedly executing the step 202 to step 210 until the live broadcast ending signal is acquired, wherein the step is to repeatedly execute the current time and subtract the preset delay extraction duration from the current time as the extraction ending time.
And 212, displaying according to each timing task and the preview queue.
Specifically, each timing task is executed, and a target data segment is obtained from the preview queue for display.
According to the embodiment, the display is performed according to each timing task and the preview queue, so that when the data segments in the same time stamp range are aligned and displayed, the starting time of the time stamp range corresponding to the target data segment is taken as the actual display starting time, and the display time accuracy is improved; by setting the preview queue, the data segments meeting the display requirements are cached in advance, so that the fluency of display is improved.
In one embodiment, the step of presenting according to each of the timing tasks and the preview queue includes:
step 302, acquiring the data segment set from the head of the preview queue as a data segment set to be displayed;
specifically, the data segment set is obtained from the head of the preview queue, and the obtained data segment set is used as the data segment set to be displayed.
Step 304, acquiring the latest display end time from the display auxiliary list as the display start time corresponding to the data segment set to be displayed;
Specifically, the latest display end time is obtained from the display auxiliary list, if the display end time is obtained, the obtained display end time is used as the display start time corresponding to the data segment set to be displayed, and if the display end time is not obtained, the current time is added with a preset processing delay time length to be used as the display start time corresponding to the data segment set to be displayed.
The processing delay duration is a value greater than 0.
Step 306, determining a display ending time corresponding to the data segment set to be displayed according to the display starting time corresponding to the data segment set to be displayed and the standard display duration corresponding to the data segment set to be displayed in the display auxiliary list;
specifically, the display start time corresponding to the data segment set to be displayed and the standard display duration corresponding to the data segment set to be displayed in the display auxiliary list are added, and the obtained data are used as display end time corresponding to the data segment set to be displayed.
Step 308, updating the auxiliary display list according to the display start time and the display end time corresponding to the data segment set to be displayed;
Specifically, the display starting time corresponding to the data segment set to be displayed is updated to the display starting time corresponding to the timestamp range corresponding to the data segment set to be displayed in the display auxiliary list, and the display ending time corresponding to the data segment set to be displayed is updated to the display ending time corresponding to the timestamp range corresponding to the data segment set to be displayed in the display auxiliary list.
Step 310, determining a task start time and a task delay time of each timing task corresponding to the data segment set to be displayed according to the standard display time length, the display start time and the display end time corresponding to the data segment set to be displayed;
specifically, the display starting time corresponding to the data segment set to be displayed is used as the task starting time of each timing task corresponding to the data segment set to be displayed; subtracting the display ending time corresponding to the data segment set to be displayed from the display starting time corresponding to the data segment set to be displayed to obtain actual display duration; dividing the actual display time length by the standard display time length corresponding to the data segment set to be displayed to obtain a time length adjustment rate; subtracting the starting time corresponding to the time stamp range corresponding to the data segment set to be displayed in the auxiliary display list from the earliest service end time stamp of the target data segment set to be displayed, multiplying the subtracted time by a time length adjustment rate, and taking the multiplied data as the task delay time length of the timing task corresponding to the target data segment.
And step 312, displaying the data segment set to be displayed according to each timing task corresponding to the data segment set to be displayed.
Specifically, according to each timing task corresponding to the data segment set to be displayed, the data segment set to be displayed is displayed, that is, the timing task is started at the task starting time of the timing task, the timing task is executed at the time point obtained by adding the task starting time of the timing task and the task delay time of the timing task, and the target data segment corresponding to the timing task is displayed by executing the timing task.
According to the embodiment, the data segment set is acquired from the head of the preview queue, and then the timing task corresponding to the acquired data segment set is updated according to the display auxiliary list, so that the accuracy of executing the timing task is improved; and by setting the task delay time length for each timing task, under the condition that the data segments with the same time stamp range are aligned and displayed, the actual display starting time is determined according to the earliest time stamp of the target data segment, so that the display time accuracy is improved.
In one embodiment, the step of determining the display end time corresponding to the to-be-displayed data segment set according to the display start time corresponding to the to-be-displayed data segment set and the standard display duration corresponding to the to-be-displayed data segment set in the display auxiliary list includes:
step 402, obtaining a current network speed;
specifically, a current network speed of the local device is obtained.
Step 404, summing up and calculating each standard display duration corresponding to the preview queue in the display auxiliary list to obtain a standard total duration to be displayed;
and carrying out summation calculation on each standard display duration corresponding to the preview queue in the display auxiliary list, and taking the calculated total duration as the standard total duration to be displayed.
Step 406, calculating an adjusted display duration corresponding to the to-be-displayed data segment set according to the display auxiliary list, the current network speed and the to-be-displayed standard total duration;
specifically, calculating a predicted total duration in a future period of time according to the current network speed; according to the display auxiliary list and each annular queue, calculating the maximum display duration to be analyzed of the data which is not added to the preview queue; and calculating the adjustment display duration corresponding to the data segment set to be displayed according to the total duration of the standard to be displayed, the predicted total duration and the display duration to be analyzed based on the principle that the multiplying power is not higher than the preset maximum threshold of the display multiplying power and not lower than the preset minimum threshold of the display multiplying power.
Wherein the display magnification maximum threshold is greater than the display magnification minimum threshold. The maximum threshold of the display magnification is a numerical value larger than 0. The display magnification minimum threshold is a value greater than 0.
Step 408, adding the display start time corresponding to the to-be-displayed data segment set to the adjusted display duration to obtain the display end time corresponding to the to-be-displayed data segment set.
Specifically, the display starting time corresponding to the data segment set to be displayed is added with the adjustment display duration, and the obtained data is used as the display ending time corresponding to the data segment set to be displayed.
According to the embodiment, the adjustment display duration corresponding to the data segment set to be displayed is calculated according to the display auxiliary list, the current network speed and the total duration of the standard to be displayed, so that the display speed is prevented from affecting the experience of a user watching display, no data is prevented from being played, and the fluency of display is improved.
In one embodiment, the step of calculating the adjusted display duration corresponding to the to-be-displayed data segment set according to the auxiliary display list, the current network speed and the to-be-displayed standard total duration includes:
Step 502, acquiring a historical network speed set;
in particular, a historical set of web speeds may be obtained from a local storage space.
The historical network speed set is the network speed at a plurality of moments before the current time.
Step 504, generating a network speed trend prediction curve according to the historical network speed set and the current network speed;
specifically, a trend prediction is carried out according to the historical network speed set and the current network speed input trend prediction model, so that a trend prediction result is obtained; and generating a network speed trend prediction curve according to the trend prediction result, wherein the x-axis of the network speed trend prediction curve is time, and the y-axis of the network speed trend prediction curve is network speed.
Step 506, calculating a new standard total duration which takes the current time as a starting time and is within the standard total duration to be displayed according to a preset receiving duration relation table and the network speed trend prediction curve;
and the receiving time length relation table is a relation table obtained according to the display auxiliary list. The reception time length relation table includes: the network speed range and the receiving duration in unit time, wherein the network speed range comprises: a range between a start web speed and an end web speed.
Specifically, according to a preset receiving duration relation table, segmenting curve segments of the network speed trend prediction curve within the standard total duration to be displayed to obtain each network speed segment, and multiplying the duration corresponding to the network speed segment in the network speed trend prediction curve by the unit time receiving duration corresponding to the network speed range corresponding to the network speed segment in the receiving duration relation table to obtain single-segment receiving duration; and summing the single-segment receiving time lengths to obtain the total time length of the newly added standard.
Step 508, calculating a display duration for each annular queue according to the display auxiliary list and in a mode of adopting the current time as an end time, wherein the display duration is used as a display duration to be analyzed;
specifically, according to the auxiliary display list and in a manner that the current time is taken as the end time, the display duration is calculated for each annular queue, that is, the end time corresponding to the display duration to be analyzed is not later than the current time, the start time corresponding to the display duration to be analyzed is the earliest service end timestamp of the target data segment corresponding to the display duration to be analyzed, and the end time corresponding to the display duration to be analyzed is the latest service end timestamp of the target data segment corresponding to the display duration to be analyzed.
Step 510, searching the display duration to be analyzed with the maximum value from the display durations to be analyzed, and taking the display duration to be analyzed as an untreated display total duration;
specifically, searching the display duration to be analyzed with the maximum value from the display durations to be analyzed, and taking the searched display duration to be analyzed as the total duration of unprocessed displays.
Step 512, calculating a display rate according to the newly added standard total time length, the untreated display total time length, the standard total time length to be displayed and a preset maximum threshold value of the time delay time length, and taking the calculated display rate as a target display rate;
Specifically, based on the principle that the multiplying power is not higher than a preset maximum threshold value of the exhibiting multiplying power and not lower than a preset minimum threshold value of the exhibiting multiplying power, the exhibiting multiplying power is calculated according to the newly-increased standard total duration, the untreated exhibiting total duration, the standard total duration to be exhibited and a preset maximum threshold value of the time delay duration, and the exhibiting multiplying power obtained through calculation is used as the target exhibiting multiplying power.
And step 514, multiplying the target display multiplying power by the standard display duration corresponding to the data segment set to be displayed to obtain the adjusted display duration.
Specifically, multiplying the target display multiplying power by the standard display duration corresponding to the data segment set to be displayed, and taking the multiplied data as the adjustment display duration.
According to the embodiment, a new standard total duration which takes the current time as the starting time and is within the standard total duration to be displayed is calculated according to a preset receiving duration relation table and the network speed trend prediction curve, the display multiplying power is calculated according to the new standard total duration, the unprocessed display total duration, the standard total duration to be displayed and a preset maximum threshold value of the delay time, and is used as a target display multiplying power, the annular queue, the preview queue and the future predicted duration are fully considered, so that the accuracy of the predicted target display multiplying power is higher, the display speed is prevented from influencing the experience of users watching display, no data can be prevented from being played, and the display fluency is improved.
In one embodiment, the step of calculating the display magnification according to the total time length of the new standard, the total time length of the unprocessed display, the total time length of the standard to be displayed and the preset maximum threshold value of the delay time length as the target display magnification includes:
step 602, adding the newly added standard total duration, the untreated display total duration and the standard total duration to be displayed to obtain a display expected duration;
specifically, the total time length of the new added standard, the total time length of the untreated display and the total time length of the standard to be displayed are added, and the obtained data are used as the expected time length of the display.
Step 604, judging whether the display expected duration is greater than the maximum threshold of the delay duration;
specifically, whether the expected duration of the display is greater than the maximum threshold of the delay time length is judged, that is, whether the display corresponding to the expected duration of the display is within the delay requirement is judged.
Step 606, if yes, subtracting the maximum threshold of the delay time from the expected display time to obtain a time to be deleted, deleting the target data segment from each of the annular queue and the preview queue according to the time to be deleted and the auxiliary display list, and taking a preset maximum threshold of the display multiplying power as the target display multiplying power;
Specifically, if the expected duration of the display is greater than the maximum threshold of the delay duration, it means that the display corresponding to the expected duration of the display is not in the delay requirement, and at this time, a part of the extracted but non-displayed target data segment needs to be discarded, so that the maximum threshold of the delay duration is subtracted from the expected duration of the display, and the subtracted duration is taken as the duration to be subtracted; if the number of the data segment sets in the preview queue exceeds a preset preview number retention threshold, deleting the data segment sets from the tail of the preview queue until the number of the data segment sets in the preview queue is not less than the preset preview number retention threshold, and the total display duration corresponding to the deleted data segment sets is not greater than the duration to be deleted; if the number of the data segment sets in the preview queue does not exceed a preset preview number retention threshold, not deleting the target data segment from the preview queue; after finishing the deletion processing of the preview queue, deleting the target data segment from each annular queue according to the duration to be deleted and the display auxiliary list until the sum of the total display duration corresponding to the preview queue after deletion, the maximum display duration corresponding to each annular queue and the total newly added standard duration is equal to the maximum threshold of the delay duration; and taking a preset maximum threshold of the display multiplying power as the target display multiplying power. Therefore, the experience of the user watching the display is prevented from being influenced by the display speed.
Step 608, if not, dividing the display expected duration by the maximum threshold of the delay duration to obtain an adjustment proportion, and multiplying the adjustment proportion by the maximum threshold of the display multiplying power to obtain the target display multiplying power.
Specifically, if not, that is, the expected duration of the presentation is less than or equal to the maximum threshold of the delay duration, which means that the presentation corresponding to the expected duration of the presentation is not within the delay requirement, and the extracted but not presented target data segment does not need to be discarded at this time, therefore, the expected duration of the presentation is divided by the maximum threshold of the delay duration, and the data obtained by the division is taken as an adjustment proportion; multiplying the adjustment proportion by the maximum threshold of the display multiplying power, and taking the multiplied data as the target display multiplying power. Therefore, no data can be prevented from being played, and the fluency of display is improved.
Optionally, the step of dividing the expected duration of display by the maximum threshold of the delay duration to obtain the adjustment ratio includes: dividing the display expected duration by the maximum threshold of the delay duration to obtain a proportion to be judged; if the proportion to be judged is smaller than a preset proportion threshold, taking a preset minimum threshold of the display multiplying power as the target display multiplying power; and if the proportion to be judged is greater than or equal to a preset proportion threshold, multiplying the adjustment proportion by the maximum display multiplying power threshold to obtain the target display multiplying power. Therefore, under the condition of improving the fluency of the display, the influence of the too slow display speed on the experience of the user watching the display is avoided.
In this embodiment, when the expected display time is longer than the maximum delay time threshold, the target data segments are pruned for each of the annular queue and the preview queue, and a preset maximum display rate threshold is used as the target display rate, so that the effect that the display speed influences the experience of the user watching the display by discarding the target data segments is avoided; when the display expected duration is smaller than or equal to the maximum threshold value of the delay duration, dividing the display expected duration by the maximum threshold value of the delay duration to obtain an adjustment proportion, and multiplying the adjustment proportion by the maximum threshold value of the display multiplying power to serve as the target display multiplying power so as to avoid no data to be played and improve the fluency of display.
In one embodiment, the step of displaying the to-be-displayed data segment set according to each of the timing tasks corresponding to the to-be-displayed data segment set includes:
step 702, judging whether the current time is equal to the task start time of each timing task corresponding to the data segment set to be displayed;
specifically, whether the current time is equal to the task starting time of each timing task corresponding to the to-be-displayed data segment set is judged, so that the playing of the target data segment corresponding to the to-be-displayed data segment set is started based on the task starting time of each timing task.
Step 704, if yes, taking any one of the timing tasks corresponding to the data segment set to be displayed as a target task, executing the target task, judging whether the task delay time of the target task is empty, if yes, displaying the target data segment corresponding to the target task in the data segment set to be displayed, if not, subtracting the task start time of the target task from the current time to obtain a waiting time, and if the waiting time is equal to the task delay time corresponding to the target task, displaying the target data segment corresponding to the target task in the data segment set to be displayed;
specifically, if yes, it means that the data segment set to be displayed enters a display stage, so that any one of the timing tasks corresponding to the data segment set to be displayed is taken as a target task, and then whether the task delay time length of the target task is empty is judged; if yes, that is, the task delay time of the target task is empty, which means that the earliest service end timestamp of the target data segment corresponding to the target task is the same as the task starting time corresponding to the target task, so that the target data segment corresponding to the target task in the data segment set to be displayed is displayed; if not, that is, the task delay time of the target task is not null, which means that the earliest service end timestamp of the target data segment corresponding to the target task is different from the task start time corresponding to the target task, and delay display is required for the target data segment corresponding to the target task, so that the task start time of the target task is subtracted from the current time to obtain a waiting time, and if the waiting time is equal to the task delay time corresponding to the target task, which means that the delay time is over, display is performed for the target data segment corresponding to the target task in the set of data segments to be displayed.
Step 706, updating the processing status corresponding to the to-be-displayed data segment set in the display auxiliary list to be displayed.
Specifically, the processing state corresponding to the data segment set to be displayed in the display auxiliary list is updated to be displayed, so that the display auxiliary list is updated in time.
According to the embodiment, the display is performed based on the preview queue, the task starting time of the timing task and the task delay time, the control requirement is reduced, the actual display starting time is determined according to the earliest service end timestamp of the target data segment under the condition that the data segments with the same timestamp range are aligned and displayed, and the display time accuracy is improved.
As shown in fig. 2, a device suitable for embedded live broadcast data processing method includes:
the data acquisition module 802 is configured to acquire each live broadcast data packet sent by each data channel, parse each live broadcast data packet to obtain a parsing result, and store the parsing result in a local cache;
a target data segment determining module 804, configured to extract, from the locally cached analysis results corresponding to each data channel, a data segment having a server timestamp within a target timestamp range, as a target data segment, where the target timestamp range is any timestamp range in which a processing state in a preset auxiliary display list is not displayed;
A target node sequence number determining module 806, configured to find a node sequence number from the auxiliary display list according to the timestamp range corresponding to the target data segment, obtain a target node sequence number, and use a ring queue corresponding to the data channel corresponding to the target data segment as a target queue;
a first processing module 808, configured to store the target data segment to a queue node in the target queue corresponding to the target node sequence number if the target node sequence number is not null;
a second processing module 810, configured to, if the target node sequence number is null, take the node sequence number corresponding to the timestamp range with the latest start time in the auxiliary display list as a first sequence number, search a node sequence number from a preset node sequence number list according to the first sequence number, the timestamp range corresponding to the first sequence number, and the timestamp range corresponding to the target data segment, and use the node sequence number as a second sequence number, update a node sequence number corresponding to the target data segment in the auxiliary display list according to the second sequence number, and store the target data segment to the queue node corresponding to the second sequence number in the target queue;
And the display module 812 is configured to display according to the display auxiliary list and each ring queue.
According to the embodiment, a node sequence number is searched from the display auxiliary list according to the timestamp range corresponding to the target data segment, the node sequence number is obtained, a ring-shaped queue corresponding to the data channel corresponding to the target data segment is used as a target queue, if the target node sequence number is not empty, the target data segment is stored in a queue node corresponding to the target node sequence number in the target queue, if the target node sequence number is empty, the node sequence number corresponding to the timestamp range with the latest starting time in the display auxiliary list is used as a first sequence number, according to the first sequence number, the timestamp range corresponding to the first sequence number and the timestamp range corresponding to the target data segment, the node sequence number is searched from a preset node sequence number list and used as a second sequence number, and if the target node sequence number is empty, the node sequence number corresponding to the target data segment in the display auxiliary list is stored in the queue node corresponding to the second sequence number, so that the same node sequence number is stored in the queue, and the same data segment is aligned with the timestamp range in the queue, and the same data segment is stored in the queue; the target data segment is extracted through the timestamp range of the display auxiliary list, so that the processing of the segments is realized, the display instantaneity is improved, and the method and the device are suitable for embedded live broadcast application scenes.
FIG. 3 illustrates an internal block diagram of a computer device in one embodiment. The computer device may specifically be a terminal or a server. As shown in fig. 3, the computer device includes a processor, a memory, and a network interface connected by a system bus. The memory includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system, and may also store a computer program which, when executed by a processor, causes the processor to implement a method for processing live data suitable for embedding. The internal memory may also store a computer program which, when executed by the processor, causes the processor to perform a method for processing live data suitable for embedding. It will be appreciated by those skilled in the art that the structure shown in FIG. 3 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is presented comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of:
acquiring each live broadcast data packet sent by each data channel, analyzing each live broadcast data packet to obtain an analysis result, and storing the analysis result into a local cache;
extracting a data segment of a server time stamp within a target time stamp range from each analysis result corresponding to each data channel of the local cache as a target data segment, wherein the target time stamp range is any time stamp range of which the processing state in a preset display auxiliary list is not displayed;
searching a node sequence number from the display auxiliary list according to the timestamp range corresponding to the target data segment to obtain a target node sequence number, and taking a ring-shaped queue corresponding to the data channel corresponding to the target data segment as a target queue;
if the target node sequence number is not empty, storing the target data segment into a queue node corresponding to the target node sequence number in the target queue;
If the target node sequence number is empty, taking the node sequence number corresponding to the timestamp range with the latest starting time in the auxiliary display list as a first sequence number, searching a node sequence number from a preset node sequence number list according to the first sequence number, the timestamp range corresponding to the first sequence number and the timestamp range corresponding to the target data segment, taking the node sequence number as a second sequence number, updating the node sequence number corresponding to the target data segment in the auxiliary display list according to the second sequence number, and storing the target data segment into the queue node corresponding to the second sequence number in the target queue;
and displaying according to the display auxiliary list and each annular queue.
According to the embodiment, a node sequence number is searched from the display auxiliary list according to the timestamp range corresponding to the target data segment, the node sequence number is obtained, a ring-shaped queue corresponding to the data channel corresponding to the target data segment is used as a target queue, if the target node sequence number is not empty, the target data segment is stored in a queue node corresponding to the target node sequence number in the target queue, if the target node sequence number is empty, the node sequence number corresponding to the timestamp range with the latest starting time in the display auxiliary list is used as a first sequence number, according to the first sequence number, the timestamp range corresponding to the first sequence number and the timestamp range corresponding to the target data segment, the node sequence number is searched from a preset node sequence number list and used as a second sequence number, and if the target node sequence number is empty, the node sequence number corresponding to the target data segment in the display auxiliary list is stored in the queue node corresponding to the second sequence number, so that the same node sequence number is stored in the queue, and the same data segment is aligned with the timestamp range in the queue, and the same data segment is stored in the queue; the target data segment is extracted through the timestamp range of the display auxiliary list, so that the processing of the segments is realized, the display instantaneity is improved, and the method and the device are suitable for embedded live broadcast application scenes.
In one embodiment, a computer-readable storage medium is provided, storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
acquiring each live broadcast data packet sent by each data channel, analyzing each live broadcast data packet to obtain an analysis result, and storing the analysis result into a local cache;
extracting a data segment of a server time stamp within a target time stamp range from each analysis result corresponding to each data channel of the local cache as a target data segment, wherein the target time stamp range is any time stamp range of which the processing state in a preset display auxiliary list is not displayed;
searching a node sequence number from the display auxiliary list according to the timestamp range corresponding to the target data segment to obtain a target node sequence number, and taking a ring-shaped queue corresponding to the data channel corresponding to the target data segment as a target queue;
if the target node sequence number is not empty, storing the target data segment into a queue node corresponding to the target node sequence number in the target queue;
If the target node sequence number is empty, taking the node sequence number corresponding to the timestamp range with the latest starting time in the auxiliary display list as a first sequence number, searching a node sequence number from a preset node sequence number list according to the first sequence number, the timestamp range corresponding to the first sequence number and the timestamp range corresponding to the target data segment, taking the node sequence number as a second sequence number, updating the node sequence number corresponding to the target data segment in the auxiliary display list according to the second sequence number, and storing the target data segment into the queue node corresponding to the second sequence number in the target queue;
and displaying according to the display auxiliary list and each annular queue.
According to the embodiment, a node sequence number is searched from the display auxiliary list according to the timestamp range corresponding to the target data segment, the node sequence number is obtained, a ring-shaped queue corresponding to the data channel corresponding to the target data segment is used as a target queue, if the target node sequence number is not empty, the target data segment is stored in a queue node corresponding to the target node sequence number in the target queue, if the target node sequence number is empty, the node sequence number corresponding to the timestamp range with the latest starting time in the display auxiliary list is used as a first sequence number, according to the first sequence number, the timestamp range corresponding to the first sequence number and the timestamp range corresponding to the target data segment, the node sequence number is searched from a preset node sequence number list and used as a second sequence number, and if the target node sequence number is empty, the node sequence number corresponding to the target data segment in the display auxiliary list is stored in the queue node corresponding to the second sequence number, so that the same node sequence number is stored in the queue, and the same data segment is aligned with the timestamp range in the queue, and the same data segment is stored in the queue; the target data segment is extracted through the timestamp range of the display auxiliary list, so that the processing of the segments is realized, the display instantaneity is improved, and the method and the device are suitable for embedded live broadcast application scenes.
Those skilled in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by a computer program for instructing relevant hardware, where the program may be stored in a non-volatile computer readable storage medium, and where the program, when executed, may include processes in the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.

Claims (10)

1. A method for processing live data suitable for embedding, the method comprising:
acquiring each live broadcast data packet sent by each data channel, analyzing each live broadcast data packet to obtain an analysis result, and storing the analysis result into a local cache;
extracting a data segment of a server time stamp within a target time stamp range from each analysis result corresponding to each data channel of the local cache as a target data segment, wherein the target time stamp range is any time stamp range of which the processing state in a preset display auxiliary list is not displayed;
Searching a node sequence number from the display auxiliary list according to the timestamp range corresponding to the target data segment to obtain a target node sequence number, and taking a ring-shaped queue corresponding to the data channel corresponding to the target data segment as a target queue;
if the target node sequence number is not empty, storing the target data segment into a queue node corresponding to the target node sequence number in the target queue;
if the target node sequence number is empty, taking the node sequence number corresponding to the timestamp range with the latest starting time in the auxiliary display list as a first sequence number, searching a node sequence number from a preset node sequence number list according to the first sequence number, the timestamp range corresponding to the first sequence number and the timestamp range corresponding to the target data segment, taking the node sequence number as a second sequence number, updating the node sequence number corresponding to the target data segment in the auxiliary display list according to the second sequence number, and storing the target data segment into the queue node corresponding to the second sequence number in the target queue;
and displaying according to the display auxiliary list and each annular queue.
2. The method for embedded live data processing according to claim 1, wherein the step of presenting according to the presentation assistance list and each of the ring queues comprises:
acquiring current time, and subtracting a preset delay extraction duration from the current time to serve as extraction ending time;
extracting the timestamp range with the processing state being unrepresented and the earliest starting time from the presentation auxiliary list as a timestamp range to be processed, wherein the starting time of the timestamp range to be processed is not later than the extraction ending time;
judging whether each queue node corresponding to the node serial number corresponding to the timestamp range to be processed is empty or not;
if yes, updating the processing state corresponding to the timestamp range to be processed in the display auxiliary list to be displayed, repeatedly executing the current time, subtracting a preset delay extraction duration from the current time, and taking the current time as an extraction ending time until a live broadcast ending signal is obtained;
if not, acquiring each target data segment from each annular queue according to the node sequence number corresponding to the timestamp range to be processed, adding the data segment set into the tail of a preset preview queue as a data segment set, updating the processing state corresponding to the timestamp range to be displayed in the display auxiliary list, according to the maximum display duration corresponding to the data segment set, updating the standard display duration corresponding to the timestamp range to be processed in the display auxiliary list, generating a timing task according to the starting time of the timestamp range to be processed and the earliest service end timestamp of each target data segment in the data segment set, repeatedly executing the current time, subtracting the preset delay extraction duration from the current time, and taking the current time as the step of extracting end time until a live broadcast end signal is acquired;
And displaying according to each timing task and the preview queue.
3. The method for embedded live data processing according to claim 2, wherein the step of exposing according to each of the timed tasks and the preview queue comprises:
acquiring the data segment set from the head of the preview queue as a data segment set to be displayed;
acquiring the latest display end time from the display auxiliary list as the display start time corresponding to the data segment set to be displayed;
determining the display ending time corresponding to the data segment set to be displayed according to the display starting time corresponding to the data segment set to be displayed and the standard display duration corresponding to the data segment set to be displayed in the display auxiliary list;
updating the auxiliary display list according to the display start time and the display end time corresponding to the data segment set to be displayed;
determining task starting time and task delay time of each timing task corresponding to the data segment set to be displayed according to the standard display time length, the display starting time and the display ending time corresponding to the data segment set to be displayed;
And displaying the data segment set to be displayed according to each timing task corresponding to the data segment set to be displayed.
4. A method for processing embedded live broadcast data according to claim 3, wherein the step of determining the display end time corresponding to the set of data segments to be displayed according to the display start time corresponding to the set of data segments to be displayed and the standard display duration corresponding to the set of data segments to be displayed in the auxiliary display list includes:
acquiring a current network speed;
summing up and calculating the standard display duration corresponding to the preview queue in the display auxiliary list to obtain the total duration of the standard to be displayed;
calculating the adjustment display duration corresponding to the data segment set to be displayed according to the display auxiliary list, the current network speed and the total duration of the standard to be displayed;
and adding the display starting time corresponding to the data segment set to be displayed with the adjustment display duration to obtain the display ending time corresponding to the data segment set to be displayed.
5. The method for processing live broadcast data according to claim 4, wherein the step of calculating the adjusted display duration corresponding to the set of data segments to be displayed according to the auxiliary display list, the current network speed and the total duration of the standard to be displayed includes:
Acquiring a historical network speed set;
generating a network speed trend prediction curve according to the historical network speed set and the current network speed;
calculating a new standard total duration which takes the current time as a starting time and is within the standard total duration to be displayed according to a preset receiving duration relation table and the network speed trend prediction curve;
calculating the display duration of each annular queue according to the display auxiliary list and in a mode of adopting the current time as the end time, and taking the display duration as the display duration to be analyzed;
searching the display duration to be analyzed with the maximum value from each display duration to be analyzed, and taking the display duration to be analyzed as the total duration of untreated display;
calculating a display multiplying power according to the newly-added standard total duration, the untreated display total duration, the standard total duration to be displayed and a preset maximum threshold value of the time delay duration, and taking the display multiplying power as a target display multiplying power;
multiplying the target display multiplying power by the standard display duration corresponding to the data segment set to be displayed to obtain the adjusted display duration.
6. The method for processing live broadcast data according to claim 5, wherein the step of calculating the display magnification according to the total time length of the new standard, the total time length of the unprocessed display, the total time length of the standard to be displayed, and a preset maximum threshold value of the delay time length as the target display magnification includes:
Adding the newly added standard total time length, the untreated display total time length and the standard total time length to be displayed to obtain a display expected time length;
judging whether the display expected duration is greater than the maximum threshold value of the delay duration;
if yes, subtracting the maximum threshold of the delay time from the display expected time to obtain a time to be deleted, deleting the target data segment from each annular queue and each preview queue according to the time to be deleted and the display auxiliary list, and taking a preset maximum threshold of the display multiplying power as the target display multiplying power;
and if not, dividing the display expected duration by the maximum threshold of the delay duration to obtain an adjustment proportion, and multiplying the adjustment proportion by the maximum threshold of the display multiplying power to obtain the target display multiplying power.
7. A method for processing embedded live broadcast data according to claim 3, wherein the step of displaying the set of data segments to be displayed according to each of the timing tasks corresponding to the set of data segments to be displayed comprises:
judging whether the current time is equal to the task starting time of each timing task corresponding to the data segment set to be displayed;
If yes, taking any one of the timing tasks corresponding to the data segment set to be displayed as a target task, executing the target task, judging whether the task delay time length of the target task is empty, if yes, displaying the target data segment corresponding to the target task in the data segment set to be displayed, if not, subtracting the task start time of the target task from the current time to obtain a waiting time length, and if the waiting time length is equal to the task delay time length corresponding to the target task, displaying the target data segment corresponding to the target task in the data segment set to be displayed;
and updating the processing state corresponding to the data segment set to be displayed in the display auxiliary list to be displayed.
8. A method and apparatus for processing live broadcast data, the apparatus comprising:
the data acquisition module is used for acquiring each live broadcast data packet sent by each data channel, analyzing each live broadcast data packet to obtain an analysis result, and storing the analysis result into a local cache;
The target data segment determining module is used for extracting a data segment of which the server-side timestamp is in a target timestamp range from the analysis results corresponding to each data channel of the local cache, and taking the data segment as a target data segment, wherein the target timestamp range is any timestamp range which is not displayed in a preset display auxiliary list and is in a processing state;
the target node sequence number determining module is used for searching a node sequence number from the display auxiliary list according to the timestamp range corresponding to the target data segment to obtain a target node sequence number, and taking an annular queue corresponding to the data channel corresponding to the target data segment as a target queue;
the first processing module is used for storing the target data segment into a queue node corresponding to the target node sequence number in the target queue if the target node sequence number is not empty;
the second processing module is configured to, if the target node sequence number is null, take the node sequence number corresponding to the timestamp range with the latest start time in the auxiliary display list as a first sequence number, search a node sequence number from a preset node sequence number list according to the first sequence number, the timestamp range corresponding to the first sequence number, and the timestamp range corresponding to the target data segment, and use the node sequence number as a second sequence number, update the node sequence number corresponding to the target data segment in the auxiliary display list according to the second sequence number, and store the target data segment to the queue node corresponding to the second sequence number in the target queue;
And the display module is used for displaying according to the display auxiliary list and each annular queue.
9. A computer readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of the method of any one of claims 1 to 7.
10. A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method of any of claims 1 to 7.
CN202210604096.7A 2022-05-30 2022-05-30 Method, device, equipment and medium suitable for embedded live broadcast data processing Active CN115022658B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210604096.7A CN115022658B (en) 2022-05-30 2022-05-30 Method, device, equipment and medium suitable for embedded live broadcast data processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210604096.7A CN115022658B (en) 2022-05-30 2022-05-30 Method, device, equipment and medium suitable for embedded live broadcast data processing

Publications (2)

Publication Number Publication Date
CN115022658A CN115022658A (en) 2022-09-06
CN115022658B true CN115022658B (en) 2023-09-08

Family

ID=83071256

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210604096.7A Active CN115022658B (en) 2022-05-30 2022-05-30 Method, device, equipment and medium suitable for embedded live broadcast data processing

Country Status (1)

Country Link
CN (1) CN115022658B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109688422A (en) * 2019-01-16 2019-04-26 武汉瓯越网视有限公司 A kind of method and device of video processing
CN110943796A (en) * 2019-11-19 2020-03-31 深圳市道通智能航空技术有限公司 Timestamp alignment method, timestamp alignment device, storage medium and equipment
CN111246178A (en) * 2020-02-05 2020-06-05 浙江大华技术股份有限公司 Video processing method and device, storage medium and electronic device
WO2020125792A1 (en) * 2018-12-21 2020-06-25 深圳市中兴微电子技术有限公司 Data output method and apparatus, and storage medium and device
WO2020224091A1 (en) * 2019-05-06 2020-11-12 平安科技(深圳)有限公司 Sequence generation method and apparatus, computer device, and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020125792A1 (en) * 2018-12-21 2020-06-25 深圳市中兴微电子技术有限公司 Data output method and apparatus, and storage medium and device
CN109688422A (en) * 2019-01-16 2019-04-26 武汉瓯越网视有限公司 A kind of method and device of video processing
WO2020224091A1 (en) * 2019-05-06 2020-11-12 平安科技(深圳)有限公司 Sequence generation method and apparatus, computer device, and storage medium
CN110943796A (en) * 2019-11-19 2020-03-31 深圳市道通智能航空技术有限公司 Timestamp alignment method, timestamp alignment device, storage medium and equipment
CN111246178A (en) * 2020-02-05 2020-06-05 浙江大华技术股份有限公司 Video processing method and device, storage medium and electronic device

Also Published As

Publication number Publication date
CN115022658A (en) 2022-09-06

Similar Documents

Publication Publication Date Title
CN111213385B (en) Content modification method, media client and non-transitory computer readable medium
CN113038241B (en) Method, computing system, and non-transitory computer readable medium for performing corrections in a media stream
CN109089154B (en) Video extraction method, device, equipment and medium
CN109089127B (en) Video splicing method, device, equipment and medium
CN108540819B (en) Live broadcast data processing method and device, computer equipment and storage medium
EP2437415A2 (en) Reception Apparatus, Reception Method, Transmission Apparatus, Transmission Method, Program, and Broadcasting System
CN112616062B (en) Subtitle display method and device, electronic equipment and storage medium
CN109714622B (en) Video data processing method and device and electronic equipment
CN105791949B (en) Method of program recording and device
CN114402572B (en) Using in-band metadata as a basis for accessing reference fingerprints to facilitate content-related actions
CN110691281B (en) Video playing processing method, terminal device, server and storage medium
CN108737884B (en) Content recording method and equipment, storage medium and electronic equipment
CN112954434B (en) Subtitle processing method, system, electronic device and storage medium
CN112601101A (en) Subtitle display method and device, electronic equipment and storage medium
CN108260024B (en) Live broadcast data processing method and device, computer equipment and storage medium
US10284889B1 (en) Determining an actual start of program content relative to a scheduled start of the program content
CN107371053B (en) Audio and video stream contrast analysis method and device
CN115022658B (en) Method, device, equipment and medium suitable for embedded live broadcast data processing
CN111787357A (en) Video processing method and electronic equipment
CN111698261B (en) Video playing method, device, equipment and storage medium based on streaming media
CN113891108A (en) Subtitle optimization method and device, electronic equipment and storage medium
CN107820119B (en) Program recording method, television and computer readable storage medium
CN114143486A (en) Video stream synchronization method and device, computer equipment and storage medium
WO2020247835A1 (en) Content-modification system with testing and reporting feature
CN111405373A (en) Method and device for acquiring video stream

Legal Events

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