Information generation method and apparatus
By calculating the duration difference between audio and video files and the maximum playback duration of the buffer, the audio and video reading method is dynamically adjusted, solving the problem that the interleaving judgment algorithm in the existing technology cannot adapt to changes in the buffer and bitrate, thus improving the synchronization and performance of the playback device.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SAMSUNG ELECTRONICS CHINA R&D CENT
- Filing Date
- 2023-06-06
- Publication Date
- 2026-04-21
AI Technical Summary
Existing interleaving detection algorithms cannot dynamically adjust the interleaving detection results according to the buffer size of the playback device and changes in file bitrate, resulting in decreased playback performance, especially when the interval between audio and video frames is large, making it impossible to guarantee audio and video synchronization.
By calculating the duration difference between video playback duration and audio playback duration based on the sub-data arrangement order of the target audio and video files, and combining this with the maximum playback duration of the playback device's buffer, interleaving result information is generated, and the audio and video reading method is dynamically adjusted.
It improves the synchronization and playback performance of audio and video playback, reduces the number of buffering cycles, and adapts to different playback devices and file bitrate variations.
Smart Images

Figure CN116567288B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, specifically to the field of multimedia playback and information processing technology, and in particular to information generation methods and apparatus. Background Technology
[0002] With the technological advancements in the multimedia field, the demand for smooth audio and video playback is increasing, leading to the emergence of high-bitrate files and various media playback devices. Since multimedia file playback requires audio and video synchronization, to achieve this, the video buffer must contain video data while the audio buffer contains audio data for a corresponding period of time. If the video buffer contains data but the audio buffer is empty, playback must be paused to buffer a certain amount of audio data before playback can resume.
[0003] Therefore, if the playback device reads audio and video frames sequentially from front to back, if the intervals between some audio and video packets are large—for example, if there is no audio packet for a long time, and the video packet fills the video buffer, but no audio data can be read, playback will be unable to continue. Alternatively, for files with an index table, audio and video frames are read by jumping between file read pointers according to a pre-set algorithm or method. While ensuring the buffer doesn't become one empty and the other full, the number of jumps by the file read pointer at different positions in the file should be minimized. More jumps slow down data download and reading, affecting playback performance. The number of jumps largely depends on the file's interleaving condition, and the method for reading audio and video data frames needs to be adjusted accordingly for different file interleaving conditions. However, existing interleaving judgment algorithms cannot dynamically adjust the interleaving judgment results based on changes in the playback device's buffer size and the playback file's bitrate, and they do not separately judge the interleaving condition at different file positions to update the audio and video reading methods at those positions. Summary of the Invention
[0004] Embodiments of this disclosure provide an information generation method, apparatus, electronic device, and computer-readable medium.
[0005] In a first aspect, embodiments of this disclosure provide an information generation method, the method comprising: determining current sub-data from an audio-video data set based on the arrangement order of at least one sub-data in an audio-video data set corresponding to a target audio-video file, wherein the audio-video data set includes at least one sub-data arranged sequentially after being split from the target audio-video file; obtaining the video playback duration and audio playback duration corresponding to the current sub-data based on the target audio-video file, and calculating the duration difference between the video playback duration and audio playback duration corresponding to the current sub-data; obtaining the maximum playback duration of the buffer corresponding to the current playback device; generating interleaving result information corresponding to the current sub-data based on the duration difference and the maximum playback duration of the buffer, and continuing to determine new current sub-data from the audio-video data set based on the arrangement order of at least one sub-data in the audio-video data set.
[0006] In some embodiments, based on the duration difference and the maximum playback duration of the buffer, interleaving result information corresponding to the current sub-data is generated, including: determining whether the duration difference is greater than the maximum playback duration of the buffer; and in response to determining that the duration difference is greater than or equal to the maximum playback duration of the buffer, generating first interleaving result information characterizing the interleaving status of the current sub-data.
[0007] In some embodiments, generating interleaving result information corresponding to the current sub-data based on the duration difference and the maximum playback duration of the buffer further includes: in response to determining that the duration difference is less than the maximum playback duration of the buffer, obtaining the number of target video frame bytes corresponding to the current sub-data; obtaining the total number of bytes in the video buffer of the current playback device; determining whether the number of target video frame bytes is greater than the total number of bytes in the video buffer; and in response to determining that the number of target video frame bytes is greater than the total number of bytes in the video buffer, generating first interleaving result information characterizing the interleaving status of the current sub-data.
[0008] In some embodiments, generating interleaving result information corresponding to the current sub-data based on the duration difference and the maximum playback duration of the buffer further includes: generating second interleaving result information characterizing the interleaving status of the current sub-data in response to determining that the number of bytes in the target video frame is less than or equal to the total number of bytes in the video buffer.
[0009] In some embodiments, the maximum playback duration of the buffer includes the maximum playback duration of the video in the video buffer; and determining whether the duration difference is greater than the maximum playback duration of the buffer includes: determining whether the duration difference is positive; and in response to determining that the duration difference is positive, determining whether the duration difference is greater than the maximum playback duration of the video in the video buffer.
[0010] In some embodiments, the maximum playback duration of the buffer includes the maximum playback duration of the audio in the audio buffer; and determining whether the duration difference is greater than the maximum playback duration of the buffer includes: in response to determining that the duration difference is negative, determining whether the absolute value of the duration difference is greater than the maximum playback duration of the audio in the audio buffer.
[0011] In some embodiments, the audio and video data set is obtained based on the following steps: obtaining target attribute information corresponding to the target audio and video file and the current playback device corresponding to the target audio and video file; splitting the target audio and video file based on the target attribute information and the attribute information of the current playback device to obtain at least one sub-data corresponding to the target audio and video file; determining the arrangement order of at least one sub-data based on the target audio and video file; and arranging at least one sub-data in order to generate the audio and video data set based on the arrangement order of at least one sub-data.
[0012] Secondly, embodiments of this disclosure provide an information generation apparatus, comprising: a determining module configured to determine current sub-data from an audio-video data set based on the arrangement order of at least one sub-data in an audio-video data set corresponding to a target audio-video file, wherein the audio-video data set includes at least one sub-data arranged sequentially after being split from the target audio-video file; a calculating module configured to obtain the video playback duration and audio playback duration corresponding to the current sub-data based on the target audio-video file, and calculate the duration difference between the video playback duration and audio playback duration corresponding to the current sub-data; an obtaining module configured to obtain the maximum playback duration of the buffer corresponding to the current playback device; and a generating module configured to generate interleaving result information corresponding to the current sub-data based on the duration difference and the maximum playback duration of the buffer, and continue to determine new current sub-data from the audio-video data set based on the arrangement order of at least one sub-data in the audio-video data set.
[0013] In some embodiments, the generation module includes: a judgment unit configured to judge whether the duration difference is greater than the maximum playback duration of the buffer; and a generation unit configured to generate first interleaving result information characterizing the current sub-data interleaving situation in response to determining that the duration difference is greater than or equal to the maximum playback duration of the buffer.
[0014] In some embodiments, the generation module further includes: an acquisition unit; and the acquisition unit is configured to, in response to determining that the duration difference is less than the maximum playback duration of the buffer, acquire the number of target video frame bytes corresponding to the current sub-data; acquire the total number of bytes in the video buffer of the current playback device; the judgment unit is further configured to determine whether the number of target video frame bytes is greater than the total number of bytes in the video buffer; and the generation unit is further configured to, in response to determining that the number of target video frame bytes is greater than the total number of bytes in the video buffer, generate first interleaving result information characterizing the interleaving status of the current sub-data.
[0015] In some embodiments, the generating unit is further configured to: generate second interleaving result information characterizing the current sub-data interleaving situation in response to determining that the number of bytes in the target video frame is less than or equal to the total number of bytes in the video buffer.
[0016] In some embodiments, the maximum playback duration of the buffer includes the maximum playback duration of the video in the video buffer; and the judging unit is further configured to: judge whether the duration difference is positive; and in response to determining that the duration difference is positive, judge whether the duration difference is greater than the maximum playback duration of the video in the video buffer.
[0017] In some embodiments, the maximum playback duration of the buffer includes the maximum playback duration of the video in the video buffer; and the determining unit is further configured to: in response to determining that the duration difference is negative, determine whether the absolute value of the duration difference is greater than the maximum playback duration of the audio in the audio buffer.
[0018] In some embodiments, the audio and video data set is obtained based on the following steps: obtaining target attribute information corresponding to the target audio and video file and the current playback device corresponding to the target audio and video file; splitting the target audio and video file based on the target attribute information and the attribute information of the current playback device to obtain at least one sub-data corresponding to the target audio and video file; determining the arrangement order of at least one sub-data based on the target audio and video file; and arranging at least one sub-data in order to generate the audio and video data set based on the arrangement order of at least one sub-data.
[0019] Thirdly, this application provides an electronic device including one or more processors; a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the information generation method as described in any implementation of the first aspect.
[0020] Fourthly, this application provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the information generation method as described in any implementation of the first aspect.
[0021] The information generation method and apparatus provided in the embodiments of this disclosure determine the current sub-data from the audio-video data set based on the arrangement order of at least one sub-data in the audio-video data set corresponding to the target audio-video file. The audio-video data set includes at least one sub-data that is sequentially arranged after being split from the target audio-video file. Then, based on the target audio-video file, the video playback duration and audio playback duration corresponding to the current sub-data are obtained, and the duration difference between the video playback duration and audio playback duration corresponding to the current sub-data is calculated. Next, the maximum playback duration of the buffer corresponding to the current playback device is obtained. Finally, based on the duration difference and the maximum playback duration of the buffer, interleaving result information corresponding to the current sub-data is generated, and the information generation method and apparatus continue to determine the current sub-data from the audio-video data set based on the arrangement order of at least one sub-data in the audio-video data set. The system identifies new current sub-data, allowing the target audio / video file to be split. Each sub-data segment undergoes audio / video interleaving analysis, enabling separate assessments of interleaving at different locations within the same target audio / video file. This results in more accurate interleaving information for the entire target audio / video file. Furthermore, the system dynamically adjusts the interleaving results based on the maximum playback duration of the current playback device's buffer. This ensures that the same target audio / video file will produce different interleaving results for different playback devices, making the interleaving information more accurate and better suited to the playback device. This allows the playback device to dynamically adjust its audio / video reading method based on each interleaving assessment result, reducing buffering during playback and ultimately improving the player's performance. Attached Figure Description
[0022] Other features, objects, and advantages of this disclosure will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0023] Figure 1 Exemplary system architecture diagrams are shown, in which some embodiments of this disclosure can be applied;
[0024] Figure 2 A flowchart illustrating an embodiment of the information generation method of this disclosure is shown;
[0025] Figure 3 A schematic diagram illustrating an application scenario of the information generation method of this disclosure is shown;
[0026] Figure 4 A schematic diagram of another embodiment of the information generation method of this disclosure is shown;
[0027] Figure 5 A schematic diagram of yet another embodiment of the information generation method of this disclosure is shown;
[0028] Figure 6A schematic diagram of the structure of one embodiment of the information generation apparatus of this disclosure is shown;
[0029] Figure 7 A schematic diagram of the structure of an electronic device suitable for implementing embodiments of the present disclosure is shown. Detailed Implementation
[0030] The present disclosure will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0031] It should be noted that, unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other. This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0032] Figure 1 An exemplary system architecture 100 is shown for an information generation method or information generation apparatus to which embodiments of the present disclosure may be applied.
[0033] like Figure 1 As shown, system architecture 100 may include servers 101 and 102, network 103, and playback devices 104 and 105. Network 103 serves as the medium for providing communication links between servers 101 and 102 and playback devices 104 and 105. Network 103 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.
[0034] Users can interact with servers 101 and 102 via network 103 through playback devices 104 and 105 to receive or send information. Various applications, such as video playback applications and data processing applications, can be installed on playback devices 104 and 105.
[0035] Playback devices 104 and 105 can be either hardware or software. When the playback device is hardware, it can be various electronic devices with a display screen and supporting communication with a server, including but not limited to smartphones, tablets, laptops, and desktop computers. When the terminal device is software, it can be installed in the electronic devices listed above. It can be implemented as multiple software programs or software modules, or as a single software program or software module. No specific limitations are made here.
[0036] Servers 101 and 102 can receive requests from playback devices 104 and 105 to obtain target audio and video files, and then obtain the target audio and video files based on these requests. Servers 101 and 102 can then obtain the corresponding audio and video data set based on the target audio and video file. This audio and video data set can include at least one sub-data segment of the target audio and video file, arranged sequentially. Based on the order of at least one sub-data segment in the audio and video data set, servers 101 and 102 can then determine the current sub-data segment from the audio and video data set. Based on the target audio and video file, servers 101 and 102 can then obtain the video playback duration and audio playback duration corresponding to the current sub-data segment, calculate the duration difference between the video playback duration and audio playback duration, and obtain the maximum playback duration of the buffer corresponding to the current playback device (i.e., playback devices 104 and 105). Finally, servers 101 and 102 can generate interleaving result information corresponding to the current sub-data based on the duration difference and the maximum playback duration of the buffer, and continue to determine the new current sub-data from the audio and video data set based on the arrangement order of at least one sub-data in the audio and video data set, until the interleaving result information corresponding to the last sub-data is generated.
[0037] It should be noted that a server can be either hardware or software. When a server is hardware, it can be any electronic device that provides various services to terminal devices. When a server is software, it can be implemented as multiple software programs or software modules providing various services to terminal devices, or it can be implemented as a single software program or software module providing various services to terminal devices. No specific limitations are made here.
[0038] It should be noted that the information generation method provided in the embodiments of this disclosure can be executed by servers 101 and 102. Accordingly, the information generation device is disposed in servers 101 and 102.
[0039] It should be understood that Figure 1 The number of servers, networks, and playback devices shown is merely illustrative. Depending on implementation needs, any number of playback devices, networks, and servers can be included.
[0040] Continue to refer to Figure 2 The diagram illustrates a flow 200 of an embodiment of an information generation method according to the present disclosure. This information generation method may include the following steps:
[0041] Step 210: Determine the current sub-data from the audio and video data set based on the arrangement order of at least one sub-data in the audio and video data set corresponding to the target audio and video file.
[0042] In this step, the entity executing the information generation method (e.g.) Figure 1Servers 101 and 102 shown can receive a request to acquire a target audio / video file sent by the current playback device. This request can be a request generated by the current playback device based on a user-input playback request. The request includes the target audio / video file to be acquired and the attribute information of the current playback device. The attribute information of the current playback device can include device information that influences playback performance, such as the total number of bytes in the audio buffer and the total number of bytes in the video buffer. The execution entity can acquire the corresponding target audio / video file based on the current playback device's request and then split the target audio / video file into at least one sub-data item. Alternatively, it can directly treat the target audio / video file as a single sub-data item without splitting it, or it can split the target audio / video file into multiple sub-data items and arrange these sub-data items sequentially according to their positions within the target audio / video file. This results in the acquisition of an audio / video data set corresponding to the target audio / video file, which includes at least one sub-data item arranged sequentially after the target audio / video file was split.
[0043] After obtaining the audio and video data set corresponding to the target audio and video file, the aforementioned executing entity can determine the current sub-data from the audio and video data set based on the arrangement order of at least one sub-data in the audio and video data set. If the audio and video data set includes only one sub-data, then the current sub-data can be the only sub-data in the audio and video data set; if the audio and video data set includes multiple sub-data, then the current sub-data can be the first sub-data in the audio and video data set, or it can be the next sub-data adjacent to the sub-data that has previously generated interleaving result information.
[0044] In some optional implementations of this embodiment, the audio and video data set in step 210 above is obtained based on the following steps:
[0045] The first step is to obtain the target attribute information corresponding to the target audio and video file and the current playback device corresponding to the target audio and video file.
[0046] Specifically, the aforementioned execution entity can receive a request to acquire the target audio or video file sent by the current playback device. This acquisition request can be request information generated by the current playback device based on a playback request input by the user. The acquisition request includes the target audio or video file to be acquired and the attribute information of the current playback device. The attribute information of the current playback device can include device information that characterizes the playback performance of the current playback device, and can include the total number of bytes in the audio buffer and the total number of bytes in the video buffer of the current playback device, etc.
[0047] The aforementioned execution entity can obtain the corresponding target audio and video file based on the acquisition request of the current playback device, and perform attribute analysis on the target audio and video file to obtain the target attribute information corresponding to the target audio and video file. The target attribute information may include the total number of bytes in the target audio and video file and the total playback duration.
[0048] The aforementioned execution entity can further determine the total playback duration of the current playback device based on the target attribute information corresponding to the target audio and video files. Thus, the attribute information of the current playback device includes the total number of bytes in the audio buffer, the total number of bytes in the video buffer, and the total playback duration.
[0049] The second step involves splitting the target audio / video file based on the target attribute information and the attribute information of the current playback device, thereby obtaining at least one sub-data corresponding to the target audio / video file.
[0050] Specifically, the aforementioned executing entity can compare the target attribute information corresponding to the target audio / video file with the attribute information of the current playback device to determine the size. If the total number of bytes in both the audio buffer and the video buffer is greater than the total number of bytes in the target audio / video file, and the total playback duration of the buffer is greater than the total playback duration of the target audio / video file, then the target audio / video file will not be split and will be treated as a whole. Otherwise, the target audio / video file will be split to obtain at least one sub-data corresponding to the target audio / video file.
[0051] The third step is to determine the order of at least one sub-data based on the target audio and video file.
[0052] Specifically, after obtaining at least one sub-data corresponding to the target audio / video file, the aforementioned executing entity can determine the position of each sub-data based on the target audio / video file, and thus determine the arrangement order of at least one sub-data based on the position of each sub-data.
[0053] The fourth step is to arrange at least one sub-data in order to generate an audio and video data set.
[0054] Specifically, the aforementioned executing entity can arrange at least one sub-data in sequence according to the arrangement order of at least one sub-data to generate an audio and video data set including at least one sequentially arranged sub-data.
[0055] In this implementation, the target audio and video file is split based on the target attribute information and the attribute information of the current playback device. The interleaving situation of each sub-data can be judged from beginning to end, thereby performing audio and video interleaving judgment on each sub-data. This allows the playback device to dynamically adjust the audio and video reading method in a timely manner based on the interleaving judgment result.
[0056] Step 220: Based on the target audio and video file, obtain the video playback duration and audio playback duration corresponding to the current sub-data, and calculate the duration difference between the video playback duration and audio playback duration corresponding to the current sub-data.
[0057] In this step, after determining the current sub-data, the execution entity can determine the current position of the current sub-data based on the target audio / video file, and then determine all video frames and all audio frames from the first sub-data to the current position of the current sub-data. The execution entity can then calculate the video playback duration and audio playback duration corresponding to the current position of the current sub-data based on all video frames and all audio frames, respectively. That is, the video playback duration represents the total playback duration of all video frames corresponding to the current position, and the audio playback duration represents the total playback duration of all audio frames corresponding to the current position. Afterwards, the execution entity can compare the video playback duration and audio playback duration corresponding to the current sub-data to determine the duration difference between them.
[0058] Step 230: Obtain the maximum playback duration of the buffer corresponding to the current playback device.
[0059] In this step, the execution entity obtains the total number of bytes in the audio buffer and the total number of bytes in the video buffer of the current playback device. The total number of bytes in the buffer is obtained by dividing the total number of bytes in the buffer by the average bitrate of the target audio and video file. The average bitrate of the target audio and video file can be obtained by dividing the sum of the byte sizes of all video frames or audio frames by the sum of the playback durations of all video frames or audio frames.
[0060] As an example, the aforementioned execution entity can obtain the maximum playback duration of the video buffer by dividing the total number of bytes in the video buffer by the average bitrate of the video. The average bitrate of the video can be obtained by dividing the sum of the byte sizes of all video frames by the sum of the playback durations of all video frames.
[0061] As an example, the aforementioned execution entity can obtain the maximum playback duration of the audio buffer by dividing the total number of bytes in the audio buffer by the average bitrate of the audio. The average bitrate of the audio can be obtained by dividing the sum of the byte sizes of all audio frames by the sum of the playback durations of all audio frames.
[0062] Step 240: Based on the duration difference and the maximum playback duration of the buffer, generate the interleaving result information corresponding to the current sub-data, and continue to determine the new current sub-data from the audio and video data set based on the arrangement order of at least one sub-data in the audio and video data set.
[0063] In this step, after the execution entity obtains the duration difference between the video playback duration and the audio playback duration corresponding to the current sub-data and the maximum playback duration of the buffer, it can compare the duration difference with the maximum playback duration of the buffer to obtain the comparison result. Then, based on the comparison result, it generates the interleaving result information corresponding to the current sub-data. The interleaving result information represents the audio and video interleaving situation of the current sub-data and can include two types of interleaving result information: good interleaving situation and poor interleaving situation.
[0064] Specifically, if the comparison result indicates a duration difference greater than the maximum playback duration of the buffer, then interleaving result information representing poor interleaving of the current sub-data is generated; if the comparison result indicates a duration difference less than or equal to the maximum playback duration of the buffer, then interleaving result information representing good interleaving of the current sub-data is generated.
[0065] See also Figure 3 , Figure 3 This is a schematic diagram illustrating an application scenario of the information generation method according to this embodiment. The method can be applied to... Figure 3 In this application scenario, after server 301 obtains the audio and video data set corresponding to the target audio and video file, it can determine the current sub-data based on the arrangement order of at least one sub-data in the audio and video data set corresponding to the target audio and video file, thus determining the i-th sub-data as the current sub-data. Then, server 301 can obtain the timestamp of the first video packet. And obtain the timestamp of the second video packet. And calculate the time of the video frame based on the two timestamps mentioned above. Afterwards, the server can obtain the timestamp of the first audio packet via a 301 redirect. And obtain the timestamp of the second audio packet. And calculate the time of the audio frame based on the two timestamps mentioned above. .
[0066] Furthermore, server 301 determines the number of video frames from the first sub-data point to the current sub-data point based on the audio and video data set. (video frame index of most close to The server 301 can also determine the number of audio frames from the first sub-data point to the current sub-data point (file length). .
[0067] Then server 301 can adjust the timing of video frames. and the number of video frames Calculate the video playback duration corresponding to the current sub-data and based on the audio frame time. and the number of video frames Calculate the audio playback duration corresponding to the current sub-data, and calculate the duration difference between the video playback duration and the audio playback duration. .
[0068] Server 301 can also obtain the attribute information of the current playback device 302, and obtain the maximum playback duration of the buffer corresponding to the current playback device by dividing the total number of bytes in the buffer by the average bitrate of the target audio and video file. In particular, server 301 calculates the average bitrate of the video frame by dividing the sum of the byte size of all video frames by the sum of the playback durations of all video frames. The average bitrate of an audio frame can also be calculated by dividing the sum of the byte sizes of all audio frames by the sum of the playback durations of all audio frames. .
[0069] Server 301 can also generate interleaving result information corresponding to the current sub-data based on the duration difference and the maximum playback duration of the buffer. The interleaving result information of the current sub-data can be sent to the current playback device 302 so that the current playback device 302 can dynamically update the audio and video reading method according to the interleaving situation of the current sub-data. Then, based on the arrangement order of at least one sub-data in the audio and video data set, a new current sub-data is determined from the audio and video data set, the (i+1)th sub-data is determined as the new current sub-data, and new interleaving result information is generated for the new current sub-data, until the interleaving result information of the last sub-data is generated.
[0070] The information generation method and apparatus provided in the above embodiments of this disclosure determine the current sub-data from the audio-video data set based on the arrangement order of at least one sub-data in the audio-video data set corresponding to the target audio-video file. The audio-video data set includes at least one sub-data that is sequentially arranged after being split from the target audio-video file. Then, based on the target audio-video file, the video playback duration and audio playback duration corresponding to the current sub-data are obtained, and the duration difference between the video playback duration and audio playback duration corresponding to the current sub-data is calculated. Next, the maximum playback duration of the buffer corresponding to the current playback device is obtained. Finally, based on the duration difference and the maximum playback duration of the buffer, interleaving result information corresponding to the current sub-data is generated. Furthermore, new current sub-data is determined from the audio-video data set based on the arrangement order of at least one sub-data in the audio-video data set. This allows for splitting the target audio-video file and performing audio-video interleaving judgment on each sub-data, thereby achieving the same target audio-video file interleaving. The interleaving situation at different locations in the video file is judged separately, making the interleaving result information of the entire target audio and video file more accurate. Furthermore, the audio and video interleaving judgment of each sub-data can be performed according to the maximum playback duration of the current playback device's buffer, and the audio and video interleaving result information can be dynamically adjusted continuously. This allows the same target audio and video file to have different interleaving results for different playback devices, making the interleaving result information more accurate and more compatible with the playback device. As a result, the playback device can dynamically adjust the audio and video reading method in a timely manner based on each interleaving judgment result, reducing the number of buffering times during playback and thus improving the playback performance of the player. This method can be applied to situations such as playing the same playback file on different playback devices, playing multimedia files with different bitrates on the same playback device, playing the same multimedia file on the same playback device by different applications, and applications setting different buffer byte sizes according to actual needs.
[0071] See Figure 4 , Figure 4 A flow 400 of another embodiment of the information generation method is shown. This information generation method may include the following steps:
[0072] Step 410: In response to obtaining the audio and video data set corresponding to the target audio and video file, determine the current sub-data from the audio and video data set based on the arrangement order of at least one sub-data in the audio and video data set.
[0073] In this step, step 410 and Figure 2 Step 210 in the illustrated embodiment is the same and will not be repeated here.
[0074] Step 420: Based on the target audio and video file, obtain the video playback duration and audio playback duration corresponding to the current sub-data, and calculate the duration difference between the video playback duration and audio playback duration corresponding to the current sub-data.
[0075] In this step, step 420 and Figure 2 Step 220 in the illustrated embodiment is the same and will not be repeated here.
[0076] Step 430: Obtain the maximum playback duration of the buffer corresponding to the current playback device.
[0077] In this step, step 430 and Figure 2 Step 230 in the illustrated embodiment is the same and will not be repeated here.
[0078] Step 440: Determine whether the duration difference is greater than the maximum playback duration of the buffer.
[0079] In this step, after the execution entity obtains the duration difference between the video playback duration and the audio playback duration corresponding to the current sub-data and the maximum playback duration in the buffer, it can compare the duration difference with the maximum playback duration in the buffer to determine whether the duration difference is greater than the maximum playback duration in the buffer.
[0080] In response to the determination that the duration difference is greater than or equal to the maximum playback duration of the buffer, step 450 is executed, and in response to the determination that the duration difference is greater than or equal to the maximum playback duration of the buffer, the first interleaving result information characterizing the current sub-data interleaving status is generated.
[0081] In this step, the execution entity determines the interleaving difference of the current sub-data by comparing and determining that the duration difference is greater than or equal to the maximum playback duration of the buffer. It then generates the first interleaving result information representing the interleaving difference of the current sub-data.
[0082] In this embodiment, by comparing the duration difference with the maximum playback duration of the buffer, if it is determined that the duration difference is greater than or equal to the maximum playback duration of the buffer, a first interleaving result information representing the current interleaving status of the sub-data is generated. The audio and video interleaving judgment of each sub-data can be performed according to the maximum playback duration of the buffer of the current playback device, and the audio and video interleaving result information is continuously and dynamically adjusted. When the same target audio and video file is used for different playback devices, the interleaving result information will have different results, making the interleaving result information more accurate and more in line with the playback device.
[0083] Further reading Figure 4 The information generation method may also include the following steps:
[0084] In response to the determination that the duration difference is less than the maximum playback duration of the buffer, step 460 is executed, and in response to the determination that the duration difference is less than the maximum playback duration of the buffer, the number of target video frame bytes corresponding to the current sub-data is obtained.
[0085] In this step, the execution entity determines that the duration difference is less than the maximum playback duration of the buffer by comparison. It then further identifies the closest consecutive video frames to the current sub-data from the audio and video data set. These consecutive video frames refer to a segment of multiple consecutive video frames closest to the current sub-data. The execution entity can then determine the number of bytes corresponding to the target video frame based on the acquired target video frame.
[0086] Specifically, if the current sub-data is the i-th sub-data, the aforementioned execution entity searches for the maximum byte offset position of consecutive video frames starting from the video frame closest to the current sub-data.
[0087] (largest offset in conintue video frame data from video frame which is most close to (file length).
[0088] Furthermore, the aforementioned execution entity can search backwards from the video frame closest to the current sub-data frame for the smallest byte offset position of consecutive video frames. ( Then, the aforementioned execution entity can set the maximum byte offset position. With the smallest byte offset position Ostarti The difference between them is determined as the number of bytes in the target video frame.
[0089] Step 470: Obtain the total number of bytes in the video buffer of the current playback device.
[0090] In this step, the aforementioned execution entity can obtain the attribute information of the current playback device and obtain the total number of bytes in the video buffer of the current playback device from the attribute information.
[0091] Step 480: Determine whether the number of bytes in the target video frame is greater than the total number of bytes in the video buffer.
[0092] In this step, the execution entity can compare the number of bytes in the target video frame with the total number of bytes in the video buffer to determine whether the number of bytes in the target video frame is greater than the total number of bytes in the video buffer.
[0093] In response to determining that the number of bytes in the target video frame is greater than the total number of bytes in the video buffer, step 490 is executed, and in response to determining that the number of bytes in the target video frame is greater than the total number of bytes in the video buffer, first interleaving result information characterizing the current sub-data interleaving status is generated.
[0094] In this step, the execution entity determines that the number of bytes in the target video frame is greater than the total number of bytes in the video buffer by comparison, then determines the interleaving situation of the current sub-data and generates first interleaving result information that represents the interleaving situation of the current sub-data. This first interleaving result information represents the interleaving situation of the current sub-data.
[0095] In response to determining that the number of bytes in the target video frame is greater than the total number of bytes in the video buffer, step 4100 is executed; in response to determining that the number of bytes in the target video frame is less than or equal to the total number of bytes in the video buffer, second interleaving result information characterizing the current sub-data interleaving situation is generated.
[0096] In this step, the execution entity determines that the number of bytes in the target video frame is less than or equal to the total number of bytes in the video buffer by comparison. If this is the case, the interleaving situation of the current sub-data is determined to be good, and a second interleaving result information representing the interleaving situation of the current sub-data is generated. This second interleaving result information represents the good interleaving situation of the current sub-data.
[0097] In this implementation, when the duration difference is less than the maximum playback duration of the buffer, the number of bytes in the target video frame is further compared with the total number of bytes in the video buffer. Based on the comparison result, interleaving result information is generated, making the interleaving result information more accurate. Audio and video interleaving judgment can be performed on each sub-data according to the maximum playback duration of the current playback device's buffer, and the judgment can be made according to the number of bytes in the target video frame and the total number of bytes in the video buffer. The audio and video interleaving result information is continuously and dynamically adjusted. The interleaving result information will be different for the same target audio and video file when it is played on different playback devices, making the interleaving result information more accurate and more in line with the playback device.
[0098] Further reading Figure 5 , Figure 5 A schematic diagram 500 illustrates another embodiment of the information generation method, which may include the following steps:
[0099] Step 510: In response to obtaining the audio and video data set corresponding to the target audio and video file, determine the current sub-data from the audio and video data set based on the arrangement order of at least one sub-data in the audio and video data set.
[0100] In this step, step 510 and Figure 4 Step 410 in the illustrated embodiment is the same and will not be repeated here.
[0101] Step 520: Based on the target audio and video file, obtain the video playback duration and audio playback duration corresponding to the current sub-data, and calculate the duration difference between the video playback duration and audio playback duration corresponding to the current sub-data.
[0102] In this step, step 520 and Figure 4 Step 420 in the illustrated embodiment is the same and will not be repeated here.
[0103] Step 530: Obtain the maximum playback duration of the video in the video buffer and the maximum playback duration of the audio in the audio buffer corresponding to the current playback device.
[0104] In this step, step 530 and Figure 4 Step 430 in the illustrated embodiment is the same and will not be repeated here.
[0105] Step 540: Determine whether the duration difference is positive.
[0106] In this step, after obtaining the duration difference between the video playback duration and the audio playback duration corresponding to the current sub-data, the execution entity determines whether the duration difference is positive.
[0107] In response to the determination that the duration difference is positive, step 550 is executed. In response to the determination that the duration difference is positive, it is determined whether the duration difference is greater than the maximum playback duration of the video in the video buffer.
[0108] The maximum playback duration of the aforementioned buffer can include the maximum playback duration of the video in the video buffer.
[0109] In this step, if the execution entity determines that the duration difference is positive, it will compare the duration difference with the maximum playback duration of the video in the video buffer to determine whether the duration difference is greater than the maximum playback duration of the video in the video buffer.
[0110] In response to the determination that the duration difference is greater than or equal to the maximum playback duration of the buffer, step 570 is executed, and in response to the determination that the duration difference is greater than or equal to the maximum playback duration of the buffer, the first interleaving result information representing the current sub-data interleaving status is generated.
[0111] In response to the determination that the duration difference is less than the maximum playback duration of the buffer, steps 580-5120 are executed.
[0112] Furthermore, the maximum playback duration of the aforementioned buffer may include the maximum playback duration of the video in the audio buffer.
[0113] In response to the determination that the duration difference is negative, step 560 is executed, and in response to the determination that the duration difference is negative, it is determined whether the absolute value of the duration difference is greater than the maximum playback duration of the audio in the audio buffer.
[0114] In this step, if the execution entity determines that the duration difference is negative, it compares the absolute value of the duration difference with the maximum playback duration of the audio in the audio buffer to determine whether the absolute value of the duration difference is greater than the maximum playback duration of the audio in the audio buffer.
[0115] In response to the determination that the duration difference is greater than or equal to the maximum playback duration of the buffer, step 570 is executed, and in response to the determination that the duration difference is greater than or equal to the maximum playback duration of the buffer, the first interleaving result information representing the current sub-data interleaving status is generated.
[0116] In response to the determination that the duration difference is less than the maximum playback duration of the buffer, steps 580-5120 are executed.
[0117] In this embodiment, by determining whether the duration difference is positive, and comparing it with the maximum playback duration of the video in the video buffer or the maximum playback duration of the audio in the audio buffer according to different situations, the specificity under different situations is improved, making the interleaving result information more accurate.
[0118] Further reference Figure 6 As an implementation of the methods shown in the above figures, this application provides an embodiment of an information generation apparatus, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.
[0119] like Figure 6 As shown, the information generation device 600 of this embodiment includes: a determining module 610, a calculating module 620, an acquiring module 630, and a generating module 640.
[0120] The determining module 610 is configured to determine the current sub-data from the audio-video data set based on the arrangement order of at least one sub-data in the audio-video data set corresponding to the target audio-video file, wherein the audio-video data set includes at least one sub-data that is sequentially arranged after the target audio-video file is split.
[0121] The calculation module 620 is configured to obtain the video playback duration and audio playback duration corresponding to the current sub-data based on the target audio and video file, and calculate the duration difference between the video playback duration and audio playback duration corresponding to the current sub-data.
[0122] The acquisition module 630 is configured to acquire the maximum playback duration of the buffer corresponding to the current playback device.
[0123] The generation module 640 is configured to generate interleaving result information corresponding to the current sub-data based on the duration difference and the maximum playback duration of the buffer, and to continue to determine the new current sub-data from the audio and video data set based on the arrangement order of at least one sub-data in the audio and video data set.
[0124] In some optional implementations of this embodiment, the generation module 640 includes: a judgment unit configured to judge whether the duration difference is greater than the maximum playback duration of the buffer; and a generation unit configured to generate first interleaving result information characterizing the current sub-data interleaving situation in response to determining that the duration difference is greater than or equal to the maximum playback duration of the buffer.
[0125] In some optional implementations of this embodiment, the generation module 640 further includes: an acquisition unit; and the acquisition unit is configured to, in response to determining that the duration difference is less than the maximum playback duration of the buffer, acquire the number of target video frame bytes corresponding to the current sub-data; acquire the total number of bytes in the video buffer of the current playback device; the judgment unit is further configured to determine whether the number of target video frame bytes is greater than the total number of bytes in the video buffer; and the generation unit is further configured to, in response to determining that the number of target video frame bytes is greater than the total number of bytes in the video buffer, generate first interleaving result information characterizing the interleaving status of the current sub-data.
[0126] In some optional implementations of this embodiment, the generation unit is further configured to: generate second interleaving result information characterizing the current sub-data interleaving situation in response to determining that the number of bytes in the target video frame is less than or equal to the total number of bytes in the video buffer.
[0127] In some optional implementations of this embodiment, the maximum playback duration of the buffer includes the maximum playback duration of the video in the video buffer; and the judgment unit is further configured to: determine whether the duration difference is positive; and in response to determining that the duration difference is positive, determine whether the duration difference is greater than the maximum playback duration of the video in the video buffer.
[0128] In some optional implementations of this embodiment, the maximum playback duration of the buffer includes the maximum playback duration of the video in the video buffer; and the judgment unit is further configured to: in response to determining that the duration difference is negative, determine whether the absolute value of the duration difference is greater than the maximum playback duration of the audio in the audio buffer.
[0129] In some optional implementations of this embodiment, the audio and video data set is obtained based on the following steps: obtaining the target attribute information corresponding to the target audio and video file and the current playback device corresponding to the target audio and video file; splitting the target audio and video file based on the target attribute information and the attribute information of the current playback device to obtain at least one sub-data corresponding to the target audio and video file; determining the arrangement order of the at least one sub-data based on the target audio and video file; and arranging the at least one sub-data in order to generate the audio and video data set based on the arrangement order of the at least one sub-data.
[0130] The information generation apparatus provided in the above embodiments of this disclosure determines the current sub-data from the audio-video data set based on the arrangement order of at least one sub-data in the audio-video data set corresponding to the target audio-video file. The audio-video data set includes at least one sub-data that is sequentially arranged after being split from the target audio-video file. Then, based on the target audio-video file, it obtains the video playback duration and audio playback duration corresponding to the current sub-data, calculates the duration difference between the video playback duration and audio playback duration corresponding to the current sub-data, obtains the maximum playback duration of the buffer corresponding to the current playback device, and finally generates interleaving result information corresponding to the current sub-data based on the duration difference and the maximum playback duration of the buffer. It then continues to determine the current sub-data from the audio-video data set based on the arrangement order of at least one sub-data in the audio-video data set. The system identifies new current sub-data, allowing the target audio / video file to be split. Each sub-data segment undergoes audio / video interleaving analysis, enabling separate assessments of interleaving at different locations within the same target audio / video file. This results in more accurate interleaving information for the entire target audio / video file. Furthermore, the system dynamically adjusts the interleaving results based on the maximum playback duration of the current playback device's buffer. This ensures that the same target audio / video file will produce different interleaving results for different playback devices, making the interleaving information more accurate and better suited to the playback device. This allows the playback device to dynamically adjust its audio / video reading method based on each interleaving assessment result, reducing buffering during playback and ultimately improving the player's performance.
[0131] Those skilled in the art will understand that the above-described apparatus also includes other well-known structures, such as processors and memories. To avoid unnecessarily obscuring the embodiments of this disclosure, these well-known structures are... Figure 6 Not shown in the image.
[0132] The following is for reference. Figure 7 It illustrates an electronic device suitable for implementing embodiments of the present disclosure (e.g., Figure 1 The structural diagram of the server (700).
[0133] like Figure 7 As shown, the electronic device 700 may include a processing unit (e.g., a central processing unit, a graphics processor, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the electronic device 700. The processing unit 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0134] Typically, the following devices can be connected to I / O interface 705: input devices 706 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 707 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 708 including, for example, magnetic tapes, hard disks, etc.; and communication devices 709. Communication device 709 allows electronic device 700 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 7 An electronic device 700 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 7 Each box shown can represent a device or multiple devices as needed.
[0135] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 709, or installed from storage device 708, or installed from ROM 702. When the computer program is executed by processing device 701, it performs the functions defined in the methods of embodiments of this disclosure.
[0136] It should be noted that the computer-readable medium described in the embodiments of this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In the embodiments of this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the embodiments of this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0137] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: determine the current sub-data from the audio-video data set based on the arrangement order of at least one sub-data in the audio-video data set corresponding to the target audio-video file, wherein the audio-video data set includes at least one sub-data arranged sequentially after being split from the target audio-video file; based on the target audio-video file, obtain the video playback duration and audio playback duration corresponding to the current sub-data, and calculate the duration difference between the video playback duration and audio playback duration corresponding to the current sub-data; obtain the maximum playback duration of the buffer corresponding to the current playback device; generate interleaving result information corresponding to the current sub-data based on the duration difference and the maximum playback duration of the buffer, and continue to determine new current sub-data from the audio-video data set based on the arrangement order of at least one sub-data in the audio-video data set.
[0138] Computer program code for performing the operations of embodiments of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0139] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0140] The modules described in the embodiments of this application can be implemented in software or hardware. The described modules can also be housed in a processor; for example, it can be described as: a processor including a determining module, a calculating module, an acquiring module, and a generating module. The names of these modules do not necessarily limit the module itself; for example, the determining module can also be described as "a module that determines the current sub-data from the audio-visual data set based on the arrangement order of at least one sub-data in the audio-visual data set corresponding to the target audio-visual file."
[0141] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.
Claims
1. An information generation method, the method comprising: Based on the arrangement order of at least one sub-data in the audio and video data set corresponding to the target audio and video file, the current sub-data is determined from the audio and video data set, wherein the audio and video data set includes at least one sub-data that is sequentially arranged after the target audio and video file is split; Based on the target audio and video file, obtain the video playback duration and audio playback duration corresponding to the current sub-data, and calculate the duration difference between the video playback duration and audio playback duration corresponding to the current sub-data; Get the maximum playback duration of the buffer corresponding to the current playback device; Based on the duration difference and the maximum playback duration of the buffer, interleaving result information corresponding to the current sub-data is generated, including: determining whether the duration difference is greater than the maximum playback duration of the buffer; in response to determining that the duration difference is greater than or equal to the maximum playback duration of the buffer, generating first interleaving result information characterizing the interleaving situation of the current sub-data; the first interleaving result information characterizes the interleaving situation difference of the current sub-data, and continuing to determine new current sub-data from the audio and video data set based on the arrangement order of at least one sub-data in the audio and video data set.
2. The method according to claim 1, wherein, The step of generating the interleaving result information corresponding to the current sub-data based on the duration difference and the maximum playback duration of the buffer also includes: In response to determining that the duration difference is less than the maximum playback duration of the buffer, the number of target video frame bytes corresponding to the current sub-data is obtained; Get the total number of bytes in the video buffer of the current playback device; Determine whether the number of bytes in the target video frame is greater than the total number of bytes in the video buffer; In response to determining that the number of bytes in the target video frame is greater than the total number of bytes in the video buffer, a first interleaving result information characterizing the current sub-data interleaving situation is generated.
3. The method according to claim 2, wherein, The step of generating the interleaving result information corresponding to the current sub-data based on the duration difference and the maximum playback duration of the buffer also includes: In response to determining that the number of bytes in the target video frame is less than or equal to the total number of bytes in the video buffer, a second interleaving result information characterizing the current sub-data interleaving situation is generated.
4. The method according to claim 1, wherein, The maximum playback duration of the buffer includes the maximum playback duration of the video in the video buffer. And, determining whether the duration difference is greater than the maximum playback duration of the buffer includes: Determine whether the duration difference is positive; In response to determining that the duration difference is positive, it is determined whether the duration difference is greater than the maximum playback duration of the video in the video buffer.
5. The method according to claim 4, wherein, The maximum playback duration of the buffer includes the maximum playback duration of audio in the audio buffer. And, determining whether the duration difference is greater than the maximum playback duration of the buffer includes: In response to determining that the duration difference is negative, it is determined whether the absolute value of the duration difference is greater than the maximum playback duration of the audio in the audio buffer.
6. The method according to claim 1, wherein, The audio and video data set was obtained based on the following steps: Obtain the target attribute information corresponding to the target audio and video file and the current playback device corresponding to the target audio and video file; Based on the target attribute information and the attribute information of the current playback device, the target audio and video file is split to obtain at least one sub-data corresponding to the target audio and video file; Based on the target audio and video file, determine the arrangement order of the at least one sub-data; Based on the arrangement order of the at least one sub-data, the at least one sub-data is arranged sequentially to generate the audio and video data set.
7. An information generation apparatus, the apparatus comprising: The determining module is configured to determine the current sub-data from the audio and video data set based on the arrangement order of at least one sub-data in the audio and video data set corresponding to the target audio and video file, wherein the audio and video data set includes at least one sub-data that is sequentially arranged after the target audio and video file is split; The calculation module is configured to obtain the video playback duration and audio playback duration corresponding to the current sub-data based on the target audio and video file, and calculate the duration difference between the video playback duration and audio playback duration corresponding to the current sub-data. The acquisition module is configured to acquire the maximum playback duration of the buffer corresponding to the current playback device; The generation module is configured to generate interleaving result information corresponding to the current sub-data based on the duration difference and the maximum playback duration of the buffer, and to continue to determine new current sub-data from the audio and video data set based on the arrangement order of at least one sub-data in the audio and video data set. The generation module includes: a judgment unit configured to judge whether the duration difference is greater than the maximum playback duration of the buffer; and a generation unit configured to generate first interleaving result information characterizing the interleaving status of the current sub-data in response to determining that the duration difference is greater than or equal to the maximum playback duration of the buffer.
8. The apparatus according to claim 7, wherein, The generation module further includes: an acquisition unit; and, The acquisition unit is configured to, in response to determining that the duration difference is less than the maximum playback duration of the buffer, acquire the number of target video frame bytes corresponding to the current sub-data; and acquire the total number of bytes in the video buffer of the current playback device; The judgment unit is further configured to determine whether the number of bytes in the target video frame is greater than the total number of bytes in the video buffer. The generation unit is further configured to generate first interleaving result information characterizing the current sub-data interleaving situation in response to determining that the number of bytes in the target video frame is greater than the total number of bytes in the video buffer.
9. The apparatus according to claim 8, wherein, The generation unit is further configured to: In response to determining that the number of bytes in the target video frame is less than or equal to the total number of bytes in the video buffer, a second interleaving result information characterizing the current sub-data interleaving situation is generated.
10. The apparatus according to claim 7, wherein, The maximum playback duration of the buffer includes the maximum playback duration of the video in the video buffer; and the determining unit is further configured to: Determine whether the duration difference is positive; In response to determining that the duration difference is positive, it is determined whether the duration difference is greater than the maximum playback duration of the video in the video buffer.
11. The apparatus according to claim 10, wherein, The maximum playback duration of the buffer includes the maximum video playback duration of the audio buffer; and the determining unit is further configured to: In response to determining that the duration difference is negative, it is determined whether the absolute value of the duration difference is greater than the maximum playback duration of the audio in the audio buffer.
12. The apparatus according to claim 7, wherein, The audio and video data set was obtained based on the following steps: Obtain the target attribute information corresponding to the target audio and video file and the current playback device corresponding to the target audio and video file; Based on the target attribute information and the attribute information of the current playback device, the target audio and video file is split to obtain at least one sub-data corresponding to the target audio and video file; Based on the target audio and video file, determine the arrangement order of the at least one sub-data; Based on the arrangement order of the at least one sub-data, the at least one sub-data is arranged sequentially to generate the audio and video data set.
13. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
14. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-6.
Citation Information
Patent Citations
Method and device for determining timestamp
CN109600564A
Live broadcast data processing method and device, computer equipment and storage medium
CN111918093A