Data buffering adjustment method and device, medium and equipment

By dynamically adjusting the maximum threshold of GOP data buffering in cache space of multimedia playback devices in ATSC3.0, memory waste and data reading failures caused by traditional fixed thresholds are solved, ensuring the continuity and fluency of audio and video playback.

CN119233008APending Publication Date: 2024-12-31SHENZHEN TCL DIGITAL TECH CO LTD
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
CN202411295362.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

In ATSC3.0 digital TV broadcast, the GOP data obtained by multimedia source data after data reorganization is not fixed, and the maximum threshold of the traditional cache space is fixed, resulting in the maximum buffer threshold setting too large or too small, resulting in memory waste or data reading failure , affects the continuity and fluency of audio and video playback.

Method used

By receiving multimedia playback requests, obtaining ROUTE-SLS data, extracting the target source data in the ALP data packet, parsing and reorganizing it into GOP data, and dynamically adjusting the maximum GOP data buffering threshold based on buffer configuration parameters and preset threshold calculation rules, and configure cache space.

Benefits of technology

It effectively avoids memory waste or data reading failure caused by improper buffering maximum threshold setting, ensuring the continuity and fluency of audio and video playback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119233008A_ABST
    Figure CN119233008A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data buffering adjustment method and device, a medium and equipment, and the method comprises the steps: receiving a playing request for target multimedia, and obtaining ROUTE-SLS data corresponding to the target multimedia according to the playing request; according to the ROUTE-SLS data, extracting target source data from the ALP data packet; performing analysis and data recombination on the target source data according to a ROUTE protocol to obtain GOP data; according to the buffer configuration parameters and a preset buffer threshold calculation rule, calculating a GOP data buffer maximum threshold adaptive to the target multimedia; and according to the GOP data buffer maximum threshold, configuring a buffer space of the current GOP data for GOP data caching. According to the method and the device, the situation that the maximum buffer threshold value is set to be too large to cause excessive memory consumption can be avoided, and the situation that the maximum buffer threshold value is set to be too small to cause that part of GOP data cannot be written into the cache in time due to insufficient cache space to cause data reading failure and influence on audio and video playing continuity and fluency can also be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data transmission technology, and in particular to the field of data buffer adjustment technology, and in particular to a data buffer adjustment method, device, medium and equipment. Background Art

[0002] ATSC3.0 is a digital television broadcasting standard that supports the transmission of audio and video content. In ATSC3.0, audio and video content are encapsulated in ALP (Adaptation Layer Protocol) packets. When a multimedia playback device, such as a TV, receives a multimedia playback request, it needs to first extract the corresponding multimedia source data from the ALP packet, and then parse the multimedia source data through the real-time object delivery over unidirectional transport (ROUTE) protocol and reorganize the data to obtain GOP data that can be read and played by the multimedia playback device.

[0003] In data transmission, affected by the characteristics of the ROUTE protocol, after the multimedia source data undergoes data reorganization operations, the multiple GOP data obtained are of indefinite length, that is, different GOP data correspond to different file sizes. When caching GOP data into the cache space, since the maximum buffer threshold corresponding to the traditional cache space is set in advance and cannot be changed by default, if the maximum buffer threshold is set too large, it will cause excessive memory consumption, thereby wasting resources; if the maximum buffer threshold is set too small, some GOP data will not be written into the cache in time due to insufficient cache space, resulting in data reading failure, affecting the continuity and smoothness of audio and video playback. Summary of the invention

[0004] The embodiments of the present application provide a data buffer adjustment method, device, medium and equipment. By using the data buffer adjustment method provided by the embodiments of the present application, the GOP data buffer maximum threshold of the cache space can be dynamically adjusted according to the actual situation of the target multimedia, and the GOP data buffer maximum threshold is set to a reasonable data, which can avoid the maximum buffer threshold being set too large, resulting in excessive memory consumption and thus wasting resources, and can also avoid the maximum buffer threshold being set too small, resulting in part of the GOP data being unable to be written into the cache in time due to insufficient cache space, thereby causing data reading failure and affecting the continuity and smoothness of audio and video playback.

[0005] On the one hand, an embodiment of the present application provides a data buffer adjustment method, which is applied to a multimedia playback device, including:

[0006] Receiving a play request for a target multimedia, and acquiring ROUTE-SLS data corresponding to the target multimedia according to the play request, wherein the ROUTE-SLS data is used to record filtering conditions and buffer configuration parameters of target source data corresponding to the target multimedia;

[0007] According to the filtering condition, extracting the target source data from the ALP data packet used to store the source data;

[0008] Parsing and reorganizing the target source data according to the ROUTE protocol to obtain GOP data that can be read and played by the multimedia playback device;

[0009] Calculate the maximum GOP data buffer threshold adapted to the target multimedia according to the buffer configuration parameters and the preset buffer threshold calculation rule;

[0010] According to the GOP data buffering maximum threshold, a cache space of the current GOP data is configured for the GOP data buffering.

[0011] In the data buffer adjustment method described in the embodiment of the present application, before calculating the GOP data buffer maximum threshold adapted to the target multimedia according to the buffer configuration parameters and the preset buffer threshold calculation rule, the method further includes:

[0012] Determine whether the buffer configuration parameters include a first parameter value for indicating a maximum size of the buffer space and a second parameter value for indicating a maximum GOP data file size in the transmission system;

[0013] If both the first parameter value and the second parameter value exist, the step of calculating the maximum GOP data buffer threshold adapted to the target multimedia according to the buffer configuration parameters and the preset buffer threshold calculation rule is performed;

[0014] The step of calculating the maximum GOP data buffer threshold adapted to the target multimedia according to the buffer configuration parameters and the preset buffer threshold calculation rule includes:

[0015] According to the first parameter value, the second parameter value and a preset first buffer threshold calculation rule, a GOP data buffer maximum threshold adapted to the target multimedia is calculated.

[0016] In the data buffer adjustment method described in the embodiment of the present application, before calculating the GOP data buffer maximum threshold adapted to the target multimedia according to the buffer configuration parameters and the preset buffer threshold calculation rule, the method further includes:

[0017] Determine whether there is a third parameter value in the buffer configuration parameters for indicating a playable duration of a single GOP data;

[0018] If the third parameter value exists, the step of calculating the maximum GOP data buffer threshold adapted to the target multimedia according to the buffer configuration parameter and the preset buffer threshold calculation rule is performed;

[0019] The step of calculating the maximum GOP data buffer threshold adapted to the target multimedia according to the buffer configuration parameters and the preset buffer threshold calculation rule includes:

[0020] The maximum GOP data buffer threshold adapted to the target multimedia is calculated based on the third parameter value, a fourth parameter value preset for indicating the total playable duration corresponding to the GOP data that can be accommodated in the cache space, and a preset second buffer threshold calculation rule.

[0021] In the data buffer adjustment method described in the embodiment of the present application, the calculation of the GOP data buffer maximum threshold adapted to the target multimedia according to the buffer configuration parameters and the preset buffer threshold calculation rule includes:

[0022] If the buffer configuration parameters satisfy the calculation requirements of the first buffer threshold calculation rule and the second buffer threshold calculation rule at the same time, respectively calculating a first calculation result corresponding to the first buffer threshold calculation rule and a second calculation result corresponding to the second buffer threshold calculation rule;

[0023] The maximum value between the first calculation result and the second calculation result is used as a maximum threshold of a GOP data buffer adapted to the target multimedia.

[0024] In the data buffer adjustment method described in the embodiment of the present application, the calculation of the GOP data buffer maximum threshold adapted to the target multimedia according to the buffer configuration parameters and the preset buffer threshold calculation rule includes:

[0025] If the buffer configuration parameter does not meet the calculation requirement of the first buffer threshold calculation rule or the second buffer threshold calculation rule, obtaining from the GOP data a decoding time required for decoding a single GOP data and a preset playback time conversion factor;

[0026] Calculate the actual playable duration of a single GOP data according to the decoding duration and the play duration conversion factor;

[0027] The maximum GOP data buffer threshold adapted to the target multimedia is calculated according to the fourth parameter value, the actual playable duration and the preset third buffer threshold calculation rule.

[0028] In the data buffer adjustment method described in the embodiment of the present application, the actual playback duration of a single GOP data is calculated based on the decoding duration and the playback duration conversion factor, including:

[0029] The decoding duration is divided by the playback duration conversion factor to obtain the actual playback duration of a single GOP data.

[0030] In the data buffer adjustment method described in the embodiment of the present application, the calculation of the GOP data buffer maximum threshold adapted to the target multimedia according to the buffer configuration parameters and the preset buffer threshold calculation rule includes:

[0031] If the buffer configuration parameters and the GOP data simultaneously meet the calculation requirements of the first buffer threshold calculation rule, the second buffer threshold calculation rule and the third buffer threshold calculation rule, respectively calculate a first calculation result corresponding to the first buffer threshold calculation rule, a second calculation result corresponding to the second buffer threshold calculation rule and a third calculation result corresponding to the third buffer threshold calculation rule;

[0032] The maximum value among the first calculation result, the second calculation result and the third calculation result is used as a maximum threshold of a GOP data buffer adapted to the target multimedia.

[0033] Accordingly, another aspect of the embodiment of the present application further provides a data buffer adjustment device, which is applied to a multimedia playback device, and the data buffer adjustment device includes:

[0034] A receiving module, used for receiving a play request for a target multimedia, and obtaining ROUTE-SLS data corresponding to the target multimedia according to the play request, wherein the ROUTE-SLS data is used for recording filtering conditions of target source data corresponding to the target multimedia, and buffer configuration parameters;

[0035] An extraction module, used for extracting the target source data from the ALP data packet used to store the source data according to the filtering condition;

[0036] A parsing module, used for parsing and reorganizing the target source data according to the ROUTE protocol to obtain GOP data that can be read and played by the multimedia playback device;

[0037] A calculation module, used for calculating a maximum GOP data buffer threshold adapted to the target multimedia according to the buffer configuration parameters and a preset buffer threshold calculation rule;

[0038] The configuration module is used to configure the cache space of the current GOP data according to the maximum threshold of the GOP data buffering, so as to provide the GOP data for caching.

[0039] Correspondingly, another aspect of the embodiment of the present application further provides a storage medium, wherein the storage medium stores a plurality of instructions, wherein the instructions are suitable for loading by a processor to execute the data buffer adjustment method as described above.

[0040] Correspondingly, another aspect of an embodiment of the present application further provides an electronic device, including a processor and a memory, wherein the memory stores a plurality of instructions, and the processor loads the instructions to execute the data buffer adjustment method as described above.

[0041] The embodiments of the present application provide a data buffer adjustment method, apparatus, medium and device, which receives a playback request for target multimedia, obtains ROUTE-SLS data corresponding to the target multimedia according to the playback request, and the ROUTE-SLS data is used to record the filtering conditions and buffer configuration parameters of the target source data corresponding to the target multimedia; according to the ROUTE-SLS data, extracts the target source data from the ALP data packet used to store the source data; parses the target source data according to the ROUTE protocol, and reorganizes the target source data to obtain GOP data that can be read and played by the multimedia playback device; calculates the maximum GOP data buffer threshold adapted to the target multimedia according to the buffer configuration parameters and the preset buffer threshold calculation rules; and configures the cache space of the current GOP data according to the GOP data buffer maximum threshold for GOP data caching. By utilizing the data buffer adjustment method provided in the embodiment of the present application, the GOP data buffer maximum threshold of the cache space can be dynamically adjusted according to the actual situation of the target multimedia, and the GOP data buffer maximum threshold can be set to a reasonable value. This can avoid the maximum buffer threshold being set too large, resulting in excessive memory consumption and thus wasting resources, and can also avoid the maximum buffer threshold being set too small, resulting in part of the GOP data being unable to be written into the cache in time due to insufficient cache space, thereby causing data reading failure and affecting the continuity and smoothness of audio and video playback. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application, and those skilled in the art can obtain other drawings based on these drawings without creative work.

[0043] Figure 1 A flowchart of a data buffer adjustment method provided in an embodiment of the present application.

[0044] Figure 2 A schematic diagram of the structure of a data buffer adjustment device provided in an embodiment of the present application.

[0045] Figure 3 Another structural schematic diagram of the data buffer adjustment device provided in an embodiment of the present application.

[0046] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0048] The embodiment of the present application provides a data buffer adjustment method, which can dynamically adjust the GOP data buffer maximum threshold of the cache space according to the actual situation of the target multimedia, and set the GOP data buffer maximum threshold to a reasonable value, which can avoid the maximum buffer threshold being set too large, resulting in excessive memory consumption and thus wasting resources, and can also avoid the maximum buffer threshold being set too small, resulting in part of the GOP data being unable to be written into the cache in time due to insufficient cache space, thereby causing data reading failure and affecting the continuity and smoothness of audio and video playback.

[0049] The term "and / or" in this application can be a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this application generally indicates that the associated objects before and after are in an "or" relationship.

[0050] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described here can be implemented in an order other than that illustrated or described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or modules is not necessarily limited to the steps or modules clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices. The naming or numbering of steps in this application does not mean that the steps in the method flow must be executed in the time / logical sequence indicated by the naming or numbering. The process steps that have been named or numbered can change the execution order according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved. The division of modules in this application is a logical division. There may be other division methods when it is implemented in actual applications. For example, multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection between modules can be electrical or other similar forms, which are not limited in this application. In addition, the modules or submodules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed in multiple circuit modules, and some or all of the modules may be selected according to actual needs to achieve the purpose of the present application.

[0051] The data buffer adjustment method involved in the embodiment of the present application is mainly applied to electronic devices, which may be televisions, smart phones, tablet computers, laptops, desktop computers, smart speakers, smart watches, smart voice interaction devices, smart home appliances, vehicle-mounted terminals and servers, etc., which are not limited here. Optionally, the server may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or an IoT cloud (Internet of Things cloud) that provides the ability to store, process and manage data generated by IoT devices, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and basic cloud computing services such as big data and artificial intelligence platforms, which are not limited here.

[0052] For ease of understanding, the specific process in the embodiments of the present application is described below. Figure 1, Figure 1 A flowchart of an embodiment of a data buffer adjustment method provided in an embodiment of the present application.

[0053] exist Figure 1 In the illustrated embodiment, the method is applied to a multimedia playback device and may include the following steps:

[0054] Step 101, receiving a play request for target multimedia, and acquiring ROUTE-SLS data corresponding to the target multimedia according to the play request, wherein the ROUTE-SLS data is used to record filtering conditions and buffer configuration parameters of target source data corresponding to the target multimedia.

[0055] It should be explained that the target multimedia refers to the audio and video content that the user wants to watch on the multimedia playback device. For example, any TV program provided by radio broadcasting can be called the multimedia referred to in this solution. For example, when the user wants to watch the TV program of CCTV1 at this time on the multimedia playback device (such as a TV or a computer), the TV program currently played by CCTV1 at this time is the target multimedia referred to above.

[0056] When the multimedia playback device receives a multimedia playback request initiated by a user, it needs to first obtain the ROUTE-SLS data corresponding to the target multimedia. Through the filtering conditions of the target source data recorded in the ROUTE-SLS data, it can locate the storage location of the target source data and perform extraction operations.

[0057] It needs to be explained that SLS (Service Layer Signaling) data is a table data structure for recording data. After receiving a multimedia playback request, the multimedia playback device first obtains SLT (Service List Table) data from the broadcast transport stream (TS). SLT data is a tabular data defined in the ATSC3.0 standard. SLT data contains a series of entries, each of which describes a specific service, including the type, identifier, start time, duration, and other relevant information of the service. In this embodiment, the focus is on the information in the SLT data that indicates that the currently requested multimedia is applicable to the ROUTE (Real-Time Object Delivery over Unidirectional Transport) protocol or the MMTP (Multimedia Transport Protocol) protocol.

[0058] It should be noted that there are at least two types of SLS data in the broadcast data stream, namely ROUTE-SLS data associated with data for data transmission based on the ROUTE protocol, and MMTP-SLS data associated with data for data transmission based on the MMTP protocol. Since this solution is only applicable to application scenarios that use the ROUTE protocol for data transmission, and because the MMTP-SLS does not record STSID (Session Type Signaling Identifier, which can be parsed to obtain the filtering conditions described in this solution) and MDP (Media Presentation Description, which can be parsed to obtain the buffer configuration parameters described in this solution), the MDP is the key file used by this solution to construct the maximum threshold of GOP data buffer. If this key file is missing, the dynamic adjustment of the cache space maximum threshold of GOP data buffer cannot be achieved. Therefore, before receiving a multimedia playback request, it is necessary to first determine whether the currently requested multimedia is transmitted based on the ROUTE protocol based on the STL data. If so, obtain the ROUTE-SLS data corresponding to the multimedia from the broadcast data stream, and obtain the STSID and MPD in the ROUTE-SLS for parsing, and obtain the filtering conditions for guiding the multimedia playback device on how to find the corresponding target source data from the numerous ALP (Adaptation Layer Protocol) data, as well as the buffer configuration parameters for constructing the maximum threshold of the GOP data buffer.

[0059] The nouns mentioned above need to be explained:

[0060] STSID: Used to identify different session types in the broadcast data stream. Session types can include different services, such as video, audio, subtitles, etc. Each session type has a unique STSID in the broadcast data stream. Multimedia playback devices use STSID to identify and select specific services (i.e. multimedia data streams). In ATSC 3.0, STSID is often used to assist multimedia playback devices in correctly processing and displaying complex scenarios such as multi-screen and multi-language services.

[0061] MPD: is an XML file that describes a media session. It contains metadata and distribution information of multimedia content. MPD describes the structure, format, duration, language and other attributes of multimedia content.

[0062] ROUTE: is a protocol for transmitting multimedia data. The ROUTE protocol provides a reliable and efficient mechanism for one-way real-time data transmission, adapting to the needs of broadcast and multicast environments. The ROUTE protocol is usually used in broadcast and multicast environments, such as in television broadcasting, wireless broadcasting, and certain network transmission applications. The ROUTE protocol can be used to transmit encapsulated data through one-way broadcast, and can also be used to implement operations such as data decoding and data reassembly.

[0063] MMTP: is a protocol for transmitting multimedia data, which is part of the ATSC 3.0 broadcast system. The MMTP protocol is specifically designed for transmitting audio, video, and data streams in the ATSC 3.0 system. It provides a mechanism that enables broadcast transmission systems to efficiently transmit multiple types of multimedia content and can adapt to different network conditions and the capabilities of receiving devices.

[0064] ALP: ALP is a packet format data used in ATSC 3.0 to transmit various types of data (such as video, audio, subtitles, etc.).

[0065] In this solution, ROUTE-SLS data is mainly used to record the filtering conditions and buffer configuration parameters of the target source data corresponding to the target multimedia. Using the filtering conditions recorded by the ROUTE-SLS data, the storage location of the target source data in the ALP package data can be accurately located. In some examples, the filtering conditions are expressed as a unique identifier of the target source data. The buffer configuration parameters recorded by the ROUTE-SLS data can be used to configure the cache space of the multimedia playback device, which will be highlighted later. It should be noted that each multimedia will have corresponding ROUTE-SLS data, and the corresponding multimedia source data can be found from a large number of ALP package data based on the ROUTE-SLS data. Among them, the ROUTE-SLS data is configured in advance by the multimedia manufacturer (such as radio broadcasting).

[0066] Step 102: extract the target source data from the ALP data packet used to store the source data according to the filtering condition.

[0067] It should be explained that multimedia playback is usually implemented based on the mainstream digital television broadcasting standard ATSC 3.0, which supports the transmission of audio and video content. In ATSC3.0, the audio and video content corresponding to the multimedia is encapsulated in the ALP data packet. When the multimedia playback device receives a multimedia playback request initiated by the user, it needs to first obtain the ROUTE-SLS data corresponding to the target multimedia. According to the filtering conditions of the target source data recorded in the ROUTE-SLS data, the corresponding target source data can be extracted from the ALP data packet, so that the multimedia playback device can perform audio and video playback operations according to the target source data.

[0068] Step 103: parsing and reorganizing the target source data according to the ROUTE protocol to obtain GOP data that can be read and played by the multimedia playback device.

[0069] In this embodiment, a codec is used to parse the target source data based on the ROUTE protocol, decompose it into a series of image frames or other media units, rearrange the parsed image frames or other media units in chronological order, and convert them into GOP data that can be read and played by a multimedia playback device.

[0070] GOP data refers to a term used in video compression and transmission, which stands for "Group of Pictures". GOP is a group of consecutive video frames that are processed as a unit during compression and decompression. In a video stream, GOP is the basic data unit, which is arranged in time order and is usually encoded together so that the video stream can be correctly reconstructed when decoded.

[0071] Each GOP usually contains an I frame (Intra-coded frame) and zero or more P frames (Predicted frames) and B frames (Bidirectionally predicted frames). I frames are self-contained and can be decoded without relying on other frames, while P frames and B frames rely on previous I frames or P frames for decoding. This structure makes video compression more efficient because during transmission, only the changing parts need to be transmitted, rather than the complete data of each frame.

[0072] Step 104: Calculate a maximum GOP data buffer threshold adapted to the target multimedia according to the buffer configuration parameters and a preset buffer threshold calculation rule.

[0073] It should be explained that the buffer configuration parameter refers to a parameter used to configure the maximum threshold of GOP data buffer in the cache space.

[0074] In some embodiments, the buffer configuration parameter includes a first parameter value for indicating a maximum size of the buffer space, and a second parameter value for indicating a maximum GOP data file size in the transmission system.

[0075] When it is detected that the first parameter value and the second parameter value exist in the buffer configuration parameters at the same time, the maximum GOP data buffer threshold value adapted to the target multimedia can be calculated according to the first parameter value, the second parameter value and the preset first buffer threshold value calculation rule. If it is detected that the first parameter value and the second parameter value do not exist in the buffer configuration parameters at the same time, the maximum GOP data buffer threshold value adapted to the target multimedia cannot be calculated according to the preset first buffer threshold value calculation rule.

[0076] In this embodiment, the first buffer threshold calculation rule is specifically expressed as follows:

[0077] GOP COUNT1=MAX_BUF_SIZE / maxTransportSize

[0078] Among them, GOP COUNT1 is the maximum threshold of GOP data buffer, MAX_BUF_SIZE is the first parameter value, and maxTransportSize is the second parameter value.

[0079] Assuming that the first parameter value is 524288 and the second parameter value is 96000, the maximum GOP data buffer threshold is 524288 / 96000=5.46 seconds. When the calculation result is a non-integer, the calculation result needs to be rounded down, for example, 5.46 seconds is rounded down to 5 seconds.

[0080] It should be noted that the first buffer threshold calculation rule uses the two parameters of the maximum size of the cache space and the maximum GOP data file size to participate in the calculation of the maximum threshold of the GOP data buffer. In essence, it calculates the maximum number of GOP data that the cache space can accommodate based on the characteristics of the size of data that the cache space can support for storage. This can not only reasonably use memory and avoid waste of resources, but also avoid the fact that due to the variable length of GOP data, some GOP data cannot be completely written into the cache due to insufficient cache space, thereby causing data reading failure and affecting the continuity and smoothness of audio and video playback.

[0081] In other embodiments, due to the possible ROUTE-SLS data transmission anomaly, the second parameter value representing the maximum GOP data file size in the transmission system is lost, and the first buffer threshold calculation rule cannot be used to calculate the GOP data buffer maximum threshold. In order to solve the above problem, the present solution also provides a second calculation rule for calculating the GOP data buffer maximum threshold.

[0082] When it is detected that there is a third parameter value for indicating the playable duration of a single GOP data in the buffer configuration parameters, the maximum GOP data buffer threshold for the target multimedia can be calculated according to the third parameter value, the fourth parameter value preset for indicating the total playable duration corresponding to the GOP data that can be accommodated in the cache space, and the preset second buffer threshold calculation rule. If it is detected that there is no third parameter value in the buffer configuration parameters, the maximum GOP data buffer threshold for the target multimedia cannot be calculated by the preset second buffer threshold calculation rule.

[0083] In this embodiment, the second buffer threshold calculation rule is specifically expressed as follows:

[0084] GOP_COUNT2=MAX_LEVEL_TIME / maxGopTime

[0085] Among them, GOP COUNT2 is the maximum threshold of GOP data buffer, MAX_LEVEL_TIME is the fourth parameter value, and maxGopTime is the third parameter value.

[0086] Assuming that the fourth parameter value is 6000 and the second parameter value is 2002 milliseconds, the maximum GOP data buffer threshold is 6000 / 2002=2.997 seconds. When the calculation result is a non-integer, the calculation result needs to be rounded down, for example, 2.997 seconds is rounded down to 2 seconds.

[0087] It should be noted that the second buffer threshold calculation rule uses the two parameters of the playable duration of a single GOP data and the total playable duration corresponding to the GOP data that can be accommodated in the cache space to participate in the calculation of the GOP data buffer maximum threshold. In essence, it calculates the maximum number of GOP data that the cache space can accommodate based on the characteristics of the supportable playback duration of the cache space. It can not only reasonably use memory and avoid waste of resources, but also avoid the inability to completely write some GOP data into the cache due to insufficient cache space due to the variable length of GOP data, thereby causing data reading failure and affecting the continuity and smoothness of audio and video playback.

[0088] In some embodiments, if the buffer configuration parameters meet the calculation requirements of the first buffer threshold calculation rule and the second buffer threshold calculation rule at the same time, that is, the GOP data buffer maximum threshold can be calculated by the first buffer threshold calculation rule or the second buffer threshold calculation rule, in order to determine the GOP data buffer maximum threshold that is most suitable for the current scene, the first calculation result corresponding to the first buffer threshold calculation rule and the second calculation result corresponding to the second buffer threshold calculation rule can be calculated respectively; the maximum value of the first calculation result and the second calculation result is used as the GOP data buffer maximum threshold for the target multimedia. It can avoid setting the buffer maximum threshold too large, resulting in excessive memory consumption and thus wasting resources, and it can also avoid setting the buffer maximum threshold too small, resulting in part of the GOP data being unable to be written into the cache in time due to insufficient cache space, thereby causing data reading failure and affecting the continuity and smoothness of audio and video playback.

[0089] In other embodiments, due to the possible ROUTE-SLS data transmission anomaly, the second parameter value representing the maximum GOP data file size in the transmission system or the third parameter value representing the playable duration of a single GOP data is lost. At this time, the first buffer threshold calculation rule or the second buffer threshold calculation rule cannot calculate the GOP data buffer maximum threshold. In order to solve the above problem, the present solution also provides a third calculation rule for calculating the GOP data buffer maximum threshold.

[0090] By obtaining from the GOP data the decoding time required to indicate decoding of a single GOP data and a preset playback time conversion factor; calculating the actual playable time of the single GOP data according to the decoding time and the playback time conversion factor; and then calculating the maximum GOP data buffer threshold adapted to the target multimedia according to the fourth parameter value, the actual playable time and the preset third buffer threshold calculation rule.

[0091] In this embodiment, the third buffer threshold calculation rule is specifically expressed as follows:

[0092] GOP_COUNT3=MAX_LEVEL_TIME / (abs(base media decode time2, time1) / gop_time scale))

[0093] Among them, GOP COUNT3 is the maximum threshold of GOP data buffer, abs (base media decode time2, time1) is the decoding time required for decoding a single GOP data, and gop_time scale is the playback time conversion factor.

[0094] Assuming that the fourth parameter value is 6000, the play duration conversion factor is 2002 milliseconds, and the third parameter value is (408595750442880-408595749962400) / 240000=2002 milliseconds, the GOP data buffer maximum threshold is 6000 / 2002=2.997 seconds. When the settlement result is a non-integer, the calculation result needs to be rounded down, for example, 2.997 seconds is rounded down to 2 seconds.

[0095] It should be explained that the decoding time required for decoding a single GOP data is calculated using two adjacent GOP data. Specifically, the decoding time required for decoding a single GOP data can be obtained by subtracting the timestamp corresponding to the start of playback of the latter GOP data from the timestamp corresponding to the start of playback of the previous GOP data. The playback time conversion factor is a conversion factor used to map the decoding time to the actual playback time. Dividing the decoding time by the playback time conversion factor can give the actual playback time of a single GOP data.

[0096] It should be noted that, since the third buffer threshold calculation rule is calculated based on the parameters contained in the actually received GOP data, the GOP data buffer maximum threshold calculated by the third buffer threshold calculation rule is more real and objective than the first buffer threshold calculation rule and the second buffer threshold calculation rule. At the same time, it can also ensure that in the event of data anomalies or changes in ROUTE-SLS, the GOP data buffer maximum threshold can be calculated based on the actually received GOP data.

[0097] In some embodiments, if the buffer configuration parameters and the GOP data simultaneously meet the calculation requirements of the first buffer threshold calculation rule, the second buffer threshold calculation rule, and the third buffer threshold calculation rule, that is, the GOP data buffer maximum threshold can be calculated by the first buffer threshold calculation rule, the second buffer threshold calculation rule, or the third buffer threshold calculation rule. At this time, in order to determine the GOP data buffer maximum threshold that is most suitable for the current scene, the first calculation result corresponding to the first buffer threshold calculation rule, the second calculation result corresponding to the second buffer threshold calculation rule, and the third calculation result corresponding to the third buffer threshold calculation rule can be calculated respectively; the maximum value among the first calculation result, the second calculation result, and the third calculation result is used as the GOP data buffer maximum threshold for the target multimedia. This can avoid the setting of the buffer maximum threshold too large, resulting in excessive memory consumption and thus wasting resources, and can also avoid the setting of the buffer maximum threshold too small, resulting in part of the GOP data being unable to be written into the cache in time due to insufficient cache space, thereby causing data reading failure and affecting the continuity and smoothness of audio and video playback.

[0098] Step 105: According to the maximum GOP data buffering threshold, a cache space of the current GOP data is configured for caching the GOP data.

[0099] In this embodiment, according to the GOP data buffer maximum threshold, the cache space of the current GOP data can be configured so that the GOP data buffer maximum threshold of the cache space is maintained at a reasonable value, so that the GOP data corresponding to the target multimedia can be cached normally. It can avoid setting the buffer maximum threshold too large, resulting in excessive memory consumption and thus wasting resources, and it can also avoid setting the buffer maximum threshold too small, resulting in part of the GOP data being unable to be written into the cache in time due to insufficient cache space, thereby causing data reading failure and affecting the continuity and smoothness of audio and video playback.

[0100] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.

[0101] In specific implementation, the present application is not limited by the execution order of the various steps described. If no conflict occurs, some steps can be performed in other orders or simultaneously.

[0102] As can be seen from the above, the data buffer adjustment method provided in the embodiment of the present application receives a playback request for the target multimedia, and obtains ROUTE-SLS data corresponding to the target multimedia according to the playback request, the ROUTE-SLS data is used to record the filtering conditions and buffer configuration parameters of the target source data corresponding to the target multimedia; according to the ROUTE-SLS data, the target source data is extracted from the ALP data packet used to store the source data; according to the ROUTE protocol, the target source data is parsed, and the target source data is reorganized to obtain GOP data that can be read and played by the multimedia playback device; according to the buffer configuration parameters and the preset buffer threshold calculation rules, the GOP data buffer maximum threshold adapted to the target multimedia is calculated; according to the GOP data buffer maximum threshold, the cache space of the current GOP data is configured for GOP data caching. By utilizing the data buffer adjustment method provided in the embodiment of the present application, the GOP data buffer maximum threshold of the cache space can be dynamically adjusted according to the actual situation of the target multimedia, and the GOP data buffer maximum threshold can be set to a reasonable value. This can avoid the maximum buffer threshold being set too large, resulting in excessive memory consumption and thus wasting resources, and can also avoid the maximum buffer threshold being set too small, resulting in part of the GOP data being unable to be written into the cache in time due to insufficient cache space, thereby causing data reading failure and affecting the continuity and smoothness of audio and video playback.

[0103] An embodiment of the present application further provides a data buffer adjustment device, which can be integrated in an electronic device.

[0104] See also Figure 2 , Figure 2 The data buffer adjustment device 30 is a schematic diagram of the structure of the data buffer adjustment device provided in the embodiment of the present application. The data buffer adjustment device 30 may include:

[0105] The receiving module 31 is used to receive a play request for a target multimedia, and obtain ROUTE-SLS data corresponding to the target multimedia according to the play request, wherein the ROUTE-SLS data is used to record the filtering conditions of the target source data corresponding to the target multimedia, and the buffer configuration parameters;

[0106] An extraction module 32, used for extracting the target source data from the ALP data packet used to store the source data according to the filtering condition;

[0107] The parsing module 33 is used to parse and reorganize the target source data according to the ROUTE protocol to obtain GOP data that can be read and played by the multimedia playback device;

[0108] A calculation module 34, configured to calculate a GOP data buffer maximum threshold adapted to the target multimedia according to the buffer configuration parameters and a preset buffer threshold calculation rule;

[0109] The configuration module 35 is used to configure the cache space of the current GOP data according to the maximum threshold of the GOP data buffering, so as to provide the GOP data for caching.

[0110] In some embodiments, the device also includes a first judgment module, which is used to determine whether there is a first parameter value for indicating the maximum size of the cache space and a second parameter value for indicating the maximum GOP data file size in the transmission system in the buffer configuration parameters; if the first parameter value and the second parameter value exist at the same time, the step of calculating the maximum GOP data buffer threshold adapted to the target multimedia according to the buffer configuration parameters and the preset buffer threshold calculation rules is executed; the calculation module 34 is used to calculate the maximum GOP data buffer threshold adapted to the target multimedia according to the first parameter value, the second parameter value and the preset first buffer threshold calculation rule.

[0111] In some embodiments, the device also includes a second judgment module, which is used to determine whether there is a third parameter value in the buffer configuration parameters for indicating the playable duration of a single GOP data; if the third parameter value exists, the step of calculating the maximum GOP data buffer threshold adapted to the target multimedia according to the buffer configuration parameters and the preset buffer threshold calculation rules is executed; the calculation module 34 is used to calculate the maximum GOP data buffer threshold adapted to the target multimedia according to the third parameter value, the preset fourth parameter value for indicating the maximum total playable duration corresponding to the GOP data that can be accommodated in the cache space, and the preset second buffer threshold calculation rule.

[0112] In some embodiments, the calculation module 34 is used to calculate the first calculation result corresponding to the first buffer threshold calculation rule and the second calculation result corresponding to the second buffer threshold calculation rule respectively if the buffer configuration parameters simultaneously meet the calculation requirements of the first buffer threshold calculation rule and the second buffer threshold calculation rule; and use the maximum value of the first calculation result and the second calculation result as the maximum threshold of the GOP data buffer adapted to the target multimedia.

[0113] In some embodiments, the calculation module 34 is used to obtain from the GOP data a decoding time required to indicate decoding of a single GOP data and a preset playback time conversion factor if the buffer configuration parameters do not meet the calculation requirements of the first buffer threshold calculation rule or the second buffer threshold calculation rule; calculate the actual playable time of a single GOP data according to the decoding time and the playback time conversion factor; and calculate the maximum GOP data buffer threshold adapted to the target multimedia according to the fourth parameter value, the actual playable time and the preset third buffer threshold calculation rule.

[0114] In some embodiments, the calculation module 34 is used to divide the decoding duration by the playback duration conversion factor to obtain the actual playback duration of a single GOP data.

[0115] In some embodiments, the calculation module 34 is used to calculate the first calculation result corresponding to the first buffer threshold calculation rule, the second calculation result corresponding to the second buffer threshold calculation rule, and the third calculation result corresponding to the third buffer threshold calculation rule respectively if the buffer configuration parameters and the GOP data simultaneously meet the calculation requirements of the first buffer threshold calculation rule, the second buffer threshold calculation rule, and the third calculation result corresponding to the third buffer threshold calculation rule; and use the maximum value of the first calculation result, the second calculation result, and the third calculation result as the maximum threshold of the GOP data buffer adapted to the target multimedia.

[0116] In specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same entity or several entities.

[0117] As can be seen from the above, the data buffer adjustment device 30 provided by the embodiment of the present application, wherein the receiving module 31 is used to receive a playback request for the target multimedia, and obtain ROUTE-SLS data corresponding to the target multimedia according to the playback request, and the ROUTE-SLS data is used to record the filtering conditions and buffer configuration parameters of the target source data corresponding to the target multimedia; the extraction module 32 is used to extract the target source data from the ALP data packet used to store the source data according to the filtering conditions; the parsing module 33 is used to parse and reorganize the target source data according to the ROUTE protocol to obtain GOP data that can be read and played by the multimedia playback device; the calculation module 34 is used to calculate the GOP data buffer maximum threshold adapted to the target multimedia according to the buffer configuration parameters and the preset buffer threshold calculation rules; the configuration module 35 is used to configure the cache space of the current GOP data according to the GOP data buffer maximum threshold for the GOP data cache.

[0118] See also Figure 3 , Figure 3 Another structural diagram of the data buffer adjustment device provided in the embodiment of the present application, the data buffer adjustment device 30 includes a memory 120, one or more processors 180, and one or more applications, wherein the one or more applications are stored in the memory 120 and configured to be executed by the processor 180; the processor 180 may include a receiving module 31, an extraction module 32, a parsing module 33, a calculation module 34 and a configuration module 35. For example, the structure and connection relationship of the above components may be as follows:

[0119] The memory 120 can be used to store applications and data. The applications stored in the memory 120 include executable codes. The applications can be composed of various functional modules. The processor 180 executes various functional applications and data processing by running the applications stored in the memory 120. In addition, the memory 120 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 120 may also include a memory controller to provide the processor 180 with access to the memory 120.

[0120] The processor 180 is the control center of the device, and uses various interfaces and lines to connect various parts of the entire terminal, and executes various functions of the device and processes data by running or executing applications stored in the memory 120, and calling data stored in the memory 120, so as to monitor the device as a whole. Optionally, the processor 180 may include one or more processing cores; preferably, the processor 180 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs.

[0121] Specifically in this embodiment, the processor 180 will load the executable code corresponding to the process of one or more applications into the memory 120 according to the following instructions, and the processor 180 will run the application stored in the memory 120 to implement various functions:

[0122] A receiving instruction is used to receive a play request for a target multimedia, and obtain ROUTE-SLS data corresponding to the target multimedia according to the play request, wherein the ROUTE-SLS data is used to record the filtering conditions of the target source data corresponding to the target multimedia, and the buffer configuration parameters;

[0123] An extraction instruction, used to extract the target source data from the ALP data packet used to store the source data according to the filtering condition;

[0124] A parsing instruction, used to parse and reorganize the target source data according to the ROUTE protocol to obtain GOP data that can be read and played by the multimedia playback device;

[0125] A calculation instruction, used to calculate a GOP data buffer maximum threshold adapted to the target multimedia according to the buffer configuration parameters and a preset buffer threshold calculation rule;

[0126] The configuration instruction is used to configure the cache space of the current GOP data according to the maximum threshold of the GOP data buffering, so as to provide the GOP data for caching.

[0127] In some embodiments, the program also includes a first judgment instruction for judging whether there is a first parameter value for indicating the maximum size of the cache space and a second parameter value for indicating the maximum GOP data file size in the transmission system in the buffer configuration parameters; if the first parameter value and the second parameter value exist at the same time, the step of calculating the maximum GOP data buffer threshold adapted to the target multimedia according to the buffer configuration parameters and the preset buffer threshold calculation rules is executed; the calculation instruction is used to calculate the maximum GOP data buffer threshold adapted to the target multimedia according to the first parameter value, the second parameter value and the preset first buffer threshold calculation rule.

[0128] In some embodiments, the program also includes a second judgment instruction for judging whether there is a third parameter value in the buffer configuration parameters for indicating the playable duration of a single GOP data; if the third parameter value exists, executing the step of calculating the maximum GOP data buffer threshold adapted to the target multimedia based on the buffer configuration parameters and the preset buffer threshold calculation rules; the calculation instruction is used to calculate the maximum GOP data buffer threshold adapted to the target multimedia based on the third parameter value, the preset fourth parameter value for indicating the maximum total playable duration corresponding to the GOP data that can be accommodated in the cache space, and the preset second buffer threshold calculation rule.

[0129] In some embodiments, the calculation instruction is used to calculate the first calculation result corresponding to the first buffer threshold calculation rule and the second calculation result corresponding to the second buffer threshold calculation rule respectively if the buffer configuration parameters simultaneously meet the calculation requirements of the first buffer threshold calculation rule and the second buffer threshold calculation rule; and use the maximum value of the first calculation result and the second calculation result as the maximum threshold of the GOP data buffer adapted to the target multimedia.

[0130] In some embodiments, the calculation instruction is used to obtain from the GOP data a decoding time required to indicate decoding of a single GOP data and a preset playback time conversion factor if the buffer configuration parameters do not meet the calculation requirements of the first buffer threshold calculation rule or the second buffer threshold calculation rule; calculate the actual playable time of a single GOP data based on the decoding time and the playback time conversion factor; and calculate the maximum GOP data buffer threshold adapted to the target multimedia based on the fourth parameter value, the actual playable time and the preset third buffer threshold calculation rule.

[0131] In some embodiments, the calculation instruction is used to divide the decoding duration by the playback duration conversion factor to obtain the actual playback duration of a single GOP data.

[0132] In some embodiments, the calculation instruction is used to calculate the first calculation result corresponding to the first buffer threshold calculation rule, the second calculation result corresponding to the second buffer threshold calculation rule, and the third calculation result corresponding to the third buffer threshold calculation rule respectively if the buffer configuration parameters and the GOP data simultaneously meet the calculation requirements of the first buffer threshold calculation rule, the second buffer threshold calculation rule, and the third calculation result corresponding to the third buffer threshold calculation rule; and use the maximum value of the first calculation result, the second calculation result, and the third calculation result as the maximum threshold of the GOP data buffer adapted to the target multimedia.

[0133] The embodiment of the present application also provides an electronic device, which may be a server, a smart phone, a television, a computer, a tablet computer, or other device.

[0134] See also Figure 4 , Figure 4 The electronic device 1200 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, and the electronic device can be used to implement the data buffer adjustment method provided in the above embodiment. The electronic device 1200 can be a television, a smart phone, or a tablet computer.

[0135] like Figure 4 As shown, the electronic device 1200 may include an RF (Radio Frequency) circuit 110, a memory 120 including one or more (only one is shown in the figure) computer-readable storage media, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, a transmission module 170, a processor 180 including one or more (only one is shown in the figure) processing cores, and a power supply 190. Those skilled in the art will understand that Figure 4 The structure of the electronic device 1200 shown in the figure does not constitute a limitation on the electronic device 1200, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0136] The RF circuit 110 is used to receive and send electromagnetic waves, realize the mutual conversion between electromagnetic waves and electrical signals, and thus communicate with a communication network or other devices. The RF circuit 110 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption / decryption chip, a user identity module (SIM) card, a memory, etc. The RF circuit 110 can communicate with various networks such as the Internet, an intranet, a wireless network, or communicate with other devices through a wireless network.

[0137] The memory 120 can be used to store software programs and modules, such as the program instructions / modules corresponding to the data buffer adjustment method in the above embodiment. The processor 180 executes various functional applications and data processing by running the software programs and modules stored in the memory 120. The vibration reminder mode can be automatically selected according to the current scene of the electronic device to perform data buffer adjustment, which can not only ensure that scenes such as meetings are not disturbed, but also ensure that users can perceive incoming calls, thereby improving the intelligence of the electronic device. The memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 120 may further include a memory remotely arranged relative to the processor 180, and these remote memories may be connected to the electronic device 1200 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0138] The input unit 130 can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, the input unit 130 may include a touch-sensitive surface 131 and other input devices 132. The touch-sensitive surface 131, also known as a touch display screen or a touch pad, can collect the user's touch operations on or near it (such as the user's operation on or near the touch-sensitive surface 131 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch-sensitive surface 131 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into touch point coordinates, and then sends it to the processor 180, and can receive and execute commands sent by the processor 180. In addition, the touch-sensitive surface 131 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch-sensitive surface 131, the input unit 130 may further include other input devices 132. Specifically, the other input devices 132 may include, but are not limited to, one or more of a physical keyboard, a function key (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, and the like.

[0139] The display unit 140 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device 1200, which can be composed of graphics, text, icons, videos and any combination thereof. The display unit 140 may include a display panel 141. Optionally, the display panel 141 may be configured in the form of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc. Further, the touch-sensitive surface 131 may cover the display panel 141. When the touch-sensitive surface 131 detects a touch operation on or near it, it is transmitted to the processor 180 to determine the type of touch event. Subsequently, the processor 180 provides corresponding visual output on the display panel 141 according to the type of touch event. Although in Figure 4 In the embodiment, the touch-sensitive surface 131 and the display panel 141 are implemented as two independent components to realize the input and output functions. However, in some embodiments, the touch-sensitive surface 131 and the display panel 141 can be integrated to realize the input and output functions.

[0140] The electronic device 1200 may also include at least one sensor 150, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 141 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 141 and / or the backlight when the electronic device 1200 is moved to the ear. As a type of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that can also be configured in the electronic device 1200, they will not be repeated here.

[0141] The audio circuit 160, the speaker 161, and the microphone 162 can provide an audio interface between the user and the electronic device 1200. The audio circuit 160 can transmit the received audio data to the speaker 161 after converting the received audio data into an electrical signal, which is converted into a sound signal for output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal, which is received by the audio circuit 160 and converted into audio data, and then the audio data is processed by the output processor 180, and then sent to another terminal through the RF circuit 110, or the audio data is output to the memory 120 for further processing. The audio circuit 160 may also include an earplug jack to provide communication between an external headset and the electronic device 1200.

[0142] The electronic device 1200 can help users send and receive emails, browse web pages, and access streaming media through the transmission module 170 (such as a Wi-Fi module), which provides users with wireless broadband Internet access. Figure 4 The transmission module 170 is shown, but it is understandable that it is not an essential component of the electronic device 1200 and can be omitted as needed without changing the essence of the invention.

[0143] The processor 180 is the control center of the electronic device 1200. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 120, and calling data stored in the memory 120, it executes various functions of the electronic device 1200 and processes data, thereby monitoring the mobile phone as a whole. Optionally, the processor 180 may include one or more processing cores; in some embodiments, the processor 180 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 180.

[0144] The electronic device 1200 also includes a power supply 190 for supplying power to various components. In some embodiments, the power supply can be logically connected to the processor 180 through a power management system, so that the power management system can realize functions such as managing discharge and power consumption. The power supply 190 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.

[0145] Although not shown, the electronic device 1200 may also include a camera (such as a front camera, a rear camera), a Bluetooth module, etc., which will not be described in detail here. Specifically in this embodiment, the display unit 140 of the electronic device 1200 is a touch screen display, and the electronic device 1200 also includes a memory 120, and one or more programs, wherein one or more programs are stored in the memory 120, and are configured to be executed by one or more processors 180. One or more programs include instructions for performing the following operations:

[0146] A receiving instruction is used to receive a play request for a target multimedia, and obtain ROUTE-SLS data corresponding to the target multimedia according to the play request, wherein the ROUTE-SLS data is used to record the filtering conditions of the target source data corresponding to the target multimedia, and the buffer configuration parameters;

[0147] An extraction instruction, used to extract the target source data from the ALP data packet used to store the source data according to the filtering condition;

[0148] A parsing instruction, used to parse and reorganize the target source data according to the ROUTE protocol to obtain GOP data that can be read and played by the multimedia playback device;

[0149] A calculation instruction, used to calculate a GOP data buffer maximum threshold adapted to the target multimedia according to the buffer configuration parameters and a preset buffer threshold calculation rule;

[0150] The configuration instruction is used to configure the cache space of the current GOP data according to the maximum threshold of the GOP data buffering, so as to provide the GOP data for caching.

[0151] In some embodiments, the program also includes a first judgment instruction for judging whether there is a first parameter value for indicating the maximum size of the cache space and a second parameter value for indicating the maximum GOP data file size in the transmission system in the buffer configuration parameters; if the first parameter value and the second parameter value exist at the same time, the step of calculating the maximum GOP data buffer threshold adapted to the target multimedia according to the buffer configuration parameters and the preset buffer threshold calculation rules is executed; the calculation instruction is used to calculate the maximum GOP data buffer threshold adapted to the target multimedia according to the first parameter value, the second parameter value and the preset first buffer threshold calculation rule.

[0152] In some embodiments, the program also includes a second judgment instruction for judging whether there is a third parameter value in the buffer configuration parameters for indicating the playable duration of a single GOP data; if the third parameter value exists, executing the step of calculating the maximum GOP data buffer threshold adapted to the target multimedia based on the buffer configuration parameters and the preset buffer threshold calculation rules; the calculation instruction is used to calculate the maximum GOP data buffer threshold adapted to the target multimedia based on the third parameter value, the preset fourth parameter value for indicating the maximum total playable duration corresponding to the GOP data that can be accommodated in the cache space, and the preset second buffer threshold calculation rule.

[0153] In some embodiments, the calculation instruction is used to calculate the first calculation result corresponding to the first buffer threshold calculation rule and the second calculation result corresponding to the second buffer threshold calculation rule respectively if the buffer configuration parameters simultaneously meet the calculation requirements of the first buffer threshold calculation rule and the second buffer threshold calculation rule; and use the maximum value of the first calculation result and the second calculation result as the maximum threshold of the GOP data buffer adapted to the target multimedia.

[0154] In some embodiments, the calculation instruction is used to obtain from the GOP data a decoding time required to indicate decoding of a single GOP data and a preset playback time conversion factor if the buffer configuration parameters do not meet the calculation requirements of the first buffer threshold calculation rule or the second buffer threshold calculation rule; calculate the actual playable time of a single GOP data based on the decoding time and the playback time conversion factor; and calculate the maximum GOP data buffer threshold adapted to the target multimedia based on the fourth parameter value, the actual playable time and the preset third buffer threshold calculation rule.

[0155] In some embodiments, the calculation instruction is used to divide the decoding duration by the playback duration conversion factor to obtain the actual playback duration of a single GOP data.

[0156] In some embodiments, the calculation instruction is used to calculate the first calculation result corresponding to the first buffer threshold calculation rule, the second calculation result corresponding to the second buffer threshold calculation rule, and the third calculation result corresponding to the third buffer threshold calculation rule respectively if the buffer configuration parameters and the GOP data simultaneously meet the calculation requirements of the first buffer threshold calculation rule, the second buffer threshold calculation rule, and the third calculation result corresponding to the third buffer threshold calculation rule; and use the maximum value of the first calculation result, the second calculation result, and the third calculation result as the maximum threshold of the GOP data buffer adapted to the target multimedia.

[0157] The embodiment of the present application also provides an electronic device, which may be a smart phone, a television, a computer, or other device.

[0158] As can be seen from the above, the embodiment of the present application provides an electronic device 1200, and the electronic device 1200 performs the following steps:

[0159] Receiving a play request for a target multimedia, and acquiring ROUTE-SLS data corresponding to the target multimedia according to the play request, wherein the ROUTE-SLS data is used to record filtering conditions and buffer configuration parameters of target source data corresponding to the target multimedia;

[0160] According to the filtering condition, extracting the target source data from the ALP data packet used to store the source data;

[0161] Parsing and reorganizing the target source data according to the ROUTE protocol to obtain GOP data that can be read and played by the multimedia playback device;

[0162] Calculate the maximum GOP data buffer threshold adapted to the target multimedia according to the buffer configuration parameters and the preset buffer threshold calculation rule;

[0163] According to the GOP data buffering maximum threshold, a cache space of the current GOP data is configured for the GOP data buffering.

[0164] An embodiment of the present application further provides a storage medium, wherein a computer program is stored in the storage medium. When the computer program is executed on a computer, the computer executes the data buffer adjustment method described in any one of the above embodiments.

[0165] It should be noted that, for the data buffer adjustment method described in the present application, ordinary testers in the field can understand that the implementation of all or part of the process of the data buffer adjustment method described in the embodiment of the present application can be completed by controlling the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, such as stored in the memory of an electronic device, and executed by at least one processor in the electronic device, and the execution process may include the process of the embodiment of the data buffer adjustment method. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), etc.

[0166] For the data buffer adjustment device of the embodiment of the present application, each functional module can be integrated into a processing chip, or each module can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium, such as a read-only memory, a disk or an optical disk.

[0167] The above is a detailed introduction to the data buffer adjustment method, device, medium and equipment provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application; at the same time, for those skilled in the art, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present application.

Claims

1. A data buffer adjustment method, applied to a multimedia playback device, characterized in that: include: Receiving a playback request for a target multimedia; Acquire ROUTE-SLS data corresponding to the target multimedia according to the play request, wherein the ROUTE-SLS data is used to record filtering conditions and buffer configuration parameters of target source data corresponding to the target multimedia; According to the filtering condition, extracting the target source data from the ALP data packet used to store the source data; Parsing and reorganizing the target source data according to the ROUTE protocol to obtain GOP data that can be read and played by the multimedia playback device; Calculate the maximum GOP data buffer threshold adapted to the target multimedia according to the buffer configuration parameters and the preset buffer threshold calculation rule; According to the GOP data buffering maximum threshold, a cache space of the current GOP data is configured for the GOP data buffering.

2. The data buffer adjustment method according to claim 1, characterized in that: Before calculating the GOP data buffer maximum threshold adapted to the target multimedia according to the buffer configuration parameters and the preset buffer threshold calculation rule, the method further includes: Determine whether the buffer configuration parameters include a first parameter value for indicating a maximum size of the buffer space and a second parameter value for indicating a maximum GOP data file size in the transmission system; If both the first parameter value and the second parameter value exist, the step of calculating the maximum GOP data buffer threshold adapted to the target multimedia according to the buffer configuration parameters and the preset buffer threshold calculation rule is performed; The step of calculating the maximum GOP data buffer threshold adapted to the target multimedia according to the buffer configuration parameters and the preset buffer threshold calculation rule includes: According to the first parameter value, the second parameter value and a preset first buffer threshold calculation rule, a GOP data buffer maximum threshold adapted to the target multimedia is calculated.

3. The data buffer adjustment method according to claim 2, characterized in that: Before calculating the GOP data buffer maximum threshold adapted to the target multimedia according to the buffer configuration parameters and the preset buffer threshold calculation rule, the method further includes: Determine whether there is a third parameter value in the buffer configuration parameters for indicating a playable duration of a single GOP data; If the third parameter value exists, the step of calculating the maximum GOP data buffer threshold adapted to the target multimedia according to the buffer configuration parameter and the preset buffer threshold calculation rule is performed; The step of calculating the maximum GOP data buffer threshold adapted to the target multimedia according to the buffer configuration parameters and the preset buffer threshold calculation rule includes: The maximum GOP data buffer threshold adapted to the target multimedia is calculated based on the third parameter value, a fourth parameter value preset for indicating the total playable duration corresponding to the GOP data that can be accommodated in the cache space, and a preset second buffer threshold calculation rule.

4. The data buffer adjustment method according to claim 3, characterized in that: The step of calculating the maximum GOP data buffer threshold adapted to the target multimedia according to the buffer configuration parameters and the preset buffer threshold calculation rule includes: If the buffer configuration parameters satisfy the calculation requirements of the first buffer threshold calculation rule and the second buffer threshold calculation rule at the same time, respectively calculating a first calculation result corresponding to the first buffer threshold calculation rule and a second calculation result corresponding to the second buffer threshold calculation rule; The maximum value between the first calculation result and the second calculation result is used as a maximum threshold of a GOP data buffer adapted to the target multimedia.

5. The data buffer adjustment method according to claim 4, characterized in that: The step of calculating the maximum GOP data buffer threshold adapted to the target multimedia according to the buffer configuration parameters and the preset buffer threshold calculation rule includes: If the buffer configuration parameter does not meet the calculation requirement of the first buffer threshold calculation rule or the second buffer threshold calculation rule, obtaining from the GOP data a decoding time required for decoding a single GOP data and a preset playback time conversion factor; Calculate the actual playable duration of a single GOP data according to the decoding duration and the play duration conversion factor; The maximum GOP data buffer threshold adapted to the target multimedia is calculated according to the fourth parameter value, the actual playable duration and the preset third buffer threshold calculation rule.

6. The data buffer adjustment method according to claim 5, characterized in that: The actual playback duration of a single GOP data is calculated based on the decoding duration and the playback duration conversion factor, including: The decoding duration is divided by the playback duration conversion factor to obtain the actual playback duration of a single GOP data.

7. The data buffer adjustment method according to claim 5, characterized in that: The step of calculating the maximum GOP data buffer threshold adapted to the target multimedia according to the buffer configuration parameters and the preset buffer threshold calculation rule includes: If the buffer configuration parameters and the GOP data simultaneously meet the calculation requirements of the first buffer threshold calculation rule, the second buffer threshold calculation rule and the third buffer threshold calculation rule, respectively calculate a first calculation result corresponding to the first buffer threshold calculation rule, a second calculation result corresponding to the second buffer threshold calculation rule and a third calculation result corresponding to the third buffer threshold calculation rule; The maximum value among the first calculation result, the second calculation result and the third calculation result is used as a maximum threshold of a GOP data buffer adapted to the target multimedia.

8. A data buffer adjustment device, applied to a multimedia playback device, characterized in that: The data buffer adjustment device comprises: A receiving module, used for receiving a play request for a target multimedia, and obtaining ROUTE-SLS data corresponding to the target multimedia according to the play request, wherein the ROUTE-SLS data is used for recording filtering conditions of target source data corresponding to the target multimedia, and buffer configuration parameters; An extraction module, used for extracting the target source data from the ALP data packet used to store the source data according to the filtering condition; A parsing module, used for parsing and reorganizing the target source data according to the ROUTE protocol to obtain GOP data that can be read and played by the multimedia playback device; A calculation module, used for calculating a maximum GOP data buffer threshold adapted to the target multimedia according to the buffer configuration parameters and a preset buffer threshold calculation rule; The configuration module is used to configure the cache space of the current GOP data according to the maximum threshold of the GOP data buffering, so as to provide the GOP data for caching.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the data buffer adjustment method according to any one of claims 1 to 7.

10. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a plurality of instructions, and the processor loads the instructions to execute the data buffer adjustment method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and system for configuring buffer area at streaming media server side based on MPEG (Moving Picture Experts Group)-4

    CN102378065A

  • Method and device for video data flow shaping

    CN103780907A

  • Video image data processing method and apparatus thereof

    CN105992023A

  • Multimedia data transmission method and device, medium and equipment

    CN117412102A

  • Streaming media data transmission method and device and terminal equipment

    CN117837151A