Cache data management method and device, medium and equipment

By judging and adjusting the availability of data cache space in the multimedia playback device, the problems of lag and audio-visual out-synchronization caused by unreasonable data cache space settings are solved, and the smooth transition of multimedia playback and data writing are achieved.

CN119299737APending Publication Date: 2025-01-10SHENZHEN TCL DIGITAL TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411393664.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

In multimedia playback devices, unreasonable data cache space settings lead to problems such as lag in the multimedia playback process or audio and video out of synchronization.

Method used

By receiving multimedia playback requests, parsing and reorganizing target source data, we can determine whether the current data cache space supports GOP data writing. If it is not supported, remove historical location information and corresponding historical GOP data from the queue structure until the cache space supports it. Write, ensures that new GOP data can be written to the cache space and split the data when necessary to adapt to the storage needs of different cache areas.

Benefits of technology

It avoids system resource occupation and delay caused by excessive data cache space settings, as well as data overflow and timeliness due to excessive settings, ensuring smooth transition of multimedia playback and audio and video synchronization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119299737A_ABST
    Figure CN119299737A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a cache data management method and device, a medium and equipment, and the method comprises the steps: receiving a playing request for target multimedia, and obtaining target source data corresponding to the target multimedia according to the playing request; analyzing the target source data to obtain GOP data; judging whether the current data cache space for GOP data cache supports GOP data writing or not; if the data cache space does not support GOP data writing, target historical position information located at the head of a queue structure is removed from the queue structure associated with the data cache space, and meanwhile historical GOP data corresponding to the target historical position information in the data cache space is released until the data cache space supports GOP data writing. And writing the GOP data into the data cache space. By utilizing the cache data management method provided by the embodiment of the invention, the problem that the multimedia playing process is stuck or audio and video are asynchronous due to unreasonable setting of a current data cache mechanism can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data management technology, and in particular to the field of cache data management technology, and in particular to a cache data management 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 Adaptation Layer Protocol (ALP) 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 ROUTE protocol or MMTP protocol and reorganize the data to obtain GOP data that can be read and played by the multimedia playback device.

[0003] In data transmission, when a user switches to a different data stream or data source for multimedia playback, the multimedia playback device usually needs to have enough GOP cache data to achieve a smooth transition, so as to avoid obvious visual flicker or pause that affects the user's visual experience during the switching process. Therefore, the concept of data cache space is proposed. However, when the capacity of the data cache space is set to be large, the existence of too much cache data will cause the occupation of system resources, and the multimedia playback device needs to spend more time to load and process the cache data, resulting in a delay in the start time of multimedia playback, affecting the user experience. When the capacity of the data cache space is set to be small, it will cause the new cache data to be unable to be written into the data cache space in time, and it is necessary to manually manage the historical cache data, such as actively deleting the historical cache data, to release enough data cache space for the new cache data to be written, which will not only affect the user experience, but also affect the timeliness of the multimedia playback device reading the cache data, thereby causing the problem of audio and video being out of sync. Summary of the invention

[0004] The embodiments of the present application provide a cache data management method, device, medium and equipment. The cache data management method provided in the embodiments of the present application is used to solve the problem of freezing or audio and video asynchrony during multimedia playback caused by unreasonable settings of the current data cache mechanism.

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

[0006] Receiving a play request for a target multimedia, and acquiring target source data corresponding to the target multimedia according to the play request;

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

[0008] Determine whether the data cache space currently used for caching the GOP data supports writing the GOP data;

[0009] If it is not supported, the target historical position information located at the head of the queue structure associated with the data cache space will be removed, and the historical GOP data corresponding to the target historical position information in the data cache space will be released until the data cache space supports writing of the GOP data, and the GOP data will be written into the data cache space.

[0010] In the cache data management method described in the embodiment of the present application, after determining whether the data cache space currently used for caching the GOP data supports writing the GOP data, the method further includes:

[0011] If the data cache space supports writing of the GOP data, the GOP data is written into the data cache space, and the storage location information of the GOP data in the data cache space is extracted, and the storage location information is synchronously written into the queue structure associated with the data cache space to instruct the multimedia playback device to read the corresponding GOP data from the data cache space.

[0012] In the cache data management method described in the embodiment of the present application, the data cache space is a ring queue structure. After the data cache space supports writing of the GOP data, the method further includes:

[0013] If the head buffer area of ​​the ring queue structure does not support the writing of the GOP data, but the tail buffer area of ​​the ring queue structure supports the writing of the GOP data, then the GOP data is written into the tail buffer area; or

[0014] If the tail buffer area of ​​the circular queue structure does not support the writing of the GOP data, but the head buffer area of ​​the circular queue structure supports the writing of the GOP data, the GOP data is written into the head buffer area.

[0015] In the cache data management method described in the embodiment of the present application, after the data cache space supports writing of the GOP data, the method further includes:

[0016] If the file size of the GOP data does not comply with the provisions of the preset data transmission protocol, or the head buffer area and the tail buffer area of ​​the ring queue structure do not support the writing of the GOP data, the GOP data is divided into a plurality of slice data;

[0017] The plurality of slice data are distributedly stored in different cache areas of the data cache space, and the plurality of slice data have the same preset identifier, so that when the GOP data is read, the plurality of slice data with the same preset identifier can be spliced ​​into complete GOP data.

[0018] In the cache data management method described in the embodiment of the present application, after writing the GOP data into the data cache space, the method further includes:

[0019] In response to a read instruction for the data cache space, determining, from the queue structure, target storage location information closest to a timestamp corresponding to the read instruction;

[0020] According to the target storage position information, the starting position of the target GOP data is located from the data cache space, and the starting position is used as the reading starting point to read a preset number of GOP data for decoding and playback operations.

[0021] In the cache data management method described in the embodiment of the present application, the reading of a preset number of GOP data for decoding and playback operations includes:

[0022] A preset number of GOP data are copied to obtain a preset number of GOP data copies, and decoding and playback operations are performed according to the preset number of GOP data copies.

[0023] In the cache data management method described in the embodiment of the present application, copying a preset number of GOP data to obtain a preset number of GOP data copies includes:

[0024] Determine the reading end point according to the target storage location information and the preset number;

[0025] Using a read pointer to point to the read starting point;

[0026] Using the copy pointer to point to the external buffer area of ​​the multimedia playback device;

[0027] The read pointer is controlled to move toward the read end point, so as to copy the GOP data between the read start point and the read end point to obtain a GOP data copy and then write it into the external buffer area of ​​the multimedia playback device.

[0028] Correspondingly, another aspect of the embodiment of the present application further provides a cache data management device, which is applied to a multimedia playback device, and the cache data management device includes:

[0029] A receiving module, configured to receive a play request for a target multimedia, and obtain target source data corresponding to the target multimedia according to the play request;

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

[0031] A determination module, used for determining whether the data cache space currently used for caching the GOP data supports writing the GOP data;

[0032] An adjustment module is used to remove the target historical position information located at the head of the queue structure associated with the data cache space if the data cache space does not support the writing of the GOP data, and release the historical GOP data corresponding to the target historical position information in the data cache space until the data cache space supports the writing of the GOP data, and write the GOP data into the data cache space.

[0033] 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 cache data management method as described above.

[0034] 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 cache data management method as described above.

[0035] The embodiment of the present application provides a cache data management method, device, medium and equipment, which receives a playback request for a target multimedia, obtains the target source data corresponding to the target multimedia according to the playback request; parses and reorganizes the target source data to obtain GOP data that can be read and played by the multimedia playback device; determines whether the data cache space currently used for GOP data caching supports GOP data writing; if the data cache space does not support GOP data writing, removes the target historical position information located at the head of the queue structure from the queue structure associated with the data cache space, and releases the historical GOP data corresponding to the target historical position information in the data cache space at the same time, until the data cache space supports GOP data writing, and writes the GOP data into the data cache space. Utilizing the cache data management method provided by the embodiment of the present application, when the data cache space does not support the writing of new GOP data, the historical GOP data in the data cache space that is the oldest from the current time can be automatically removed, so that the data cache space meets the conditions for writing new GOP data. It can not only avoid the situation where a large amount of system resources are occupied due to the data cache space being set too large, thereby causing a delay in the start time of multimedia playback; it can also avoid the situation where the new cache data cannot be written into the data cache space in time when the data cache space is full due to the data cache space being set too small, thereby affecting the timeliness of the multimedia playback device reading the cache data. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] 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.

[0037] Figure 1 A flowchart of a cache data management method provided in an embodiment of the present application.

[0038] Figure 2 Another flowchart of the cache data management method provided in an embodiment of the present application.

[0039] Figure 3 Another flowchart of the cache data management method provided in an embodiment of the present application.

[0040] Figure 4 A schematic diagram of the structure of a cache data management device provided in an embodiment of the present application.

[0041] Figure 5 Another structural schematic diagram of the cache data management device provided in an embodiment of the present application.

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

[0043] 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.

[0044] The embodiment of the present application provides a cache data management method, which can automatically remove the historical GOP data in the data cache space that is the oldest from the current time when the data cache space does not support the writing of new GOP data, so that the data cache space meets the conditions for writing new GOP data. It can not only avoid the delay in the start time of multimedia playback caused by the large data cache space, which leads to a large occupation of system resources; but also avoid the failure to write new cache data into the data cache space in time when the data cache space is full due to the small data cache space, which affects the timeliness of the multimedia playback device reading cache data.

[0045] 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.

[0046] 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.

[0047] The cache data management 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.

[0048] 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 cache data management method provided in an embodiment of the present application.

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

[0050] S101, receiving a play request for target multimedia, and acquiring target source data corresponding to the target multimedia according to the play request.

[0051] 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 current TV program of CCTV1 on the multimedia playback device (such as a TV or a computer), the current TV program of CCTV1 is the target multimedia referred to above.

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

[0053] It should be explained that ROUTE-SLS data or MMTP-SLS data is a table data structure for recording data, and in this solution it is mainly used to record the filtering conditions of the target source data corresponding to the target multimedia. Using the filtering conditions recorded by the ROUTE-SLS data or MMTP-SLS data, the storage location of the target source data in the ALP packet data can be accurately located. In some examples, the filtering conditions are expressed as a specific storage path for the target source data. It should be noted that each multimedia will have corresponding ROUTE-SLS data or MMTP-SLS data, so that the corresponding target source data can be found from a large number of ALP package data. Among them, the ROUTE-SLS data or MMTP-SLS data is configured in advance by the multimedia manufacturer (such as radio broadcasting).

[0054] 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 Adaptation Layer Protocol (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 or MMTP-SLS data corresponding to the target multimedia. According to the filtering conditions of the target source data recorded in the ROUTE-SLS data or MMTP-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.

[0055] S102, parsing and reorganizing the target source data to obtain GOP data that can be read and played by the multimedia playback device.

[0056] It should be explained that ROUTE (Real-Time Object Delivery over UnidirectionalTransport) and MMTP (Market Message Transfer Protocol) are both message transmission protocols. Taking the ROUTE protocol as an example, 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 the ROUTE protocol can also be used to implement operations such as data decoding and data reassembly.

[0057] In this embodiment, a codec is used to parse the target source data based on the ROUTE protocol or the MMTP 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.

[0058] 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.

[0059] 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.

[0060] S103, determining whether the data cache space currently used for caching the GOP data supports writing the GOP data.

[0061] Considering that when a user switches to a different data stream or data source for multimedia playback, the multimedia playback device usually needs to have enough GOP cache data to achieve a smooth transition, so as to avoid obvious visual flicker or pause that affects the user's visual experience during the switching process, wherein the GOP cache data is usually stored in the data cache space after being parsed. However, when the capacity of the data cache space is set to be large, the existence of too much cache data will cause the occupation of system resources, and the multimedia playback device needs to spend more time to load and process the cache data, resulting in a delay in the start time of multimedia playback, affecting the user experience. Therefore, this solution does not consider designing the data cache space to be infinite, but adds a storage upper limit to the data cache space to avoid excessive cache data affecting the processing efficiency of multimedia data. However, the data cache space with a storage upper limit will inevitably have a full load problem, resulting in the inability to cache new GOP data. If the data cache space is full, if the new GOP data continues to be written into the data cache space, it will cause data overflow in the data cache space, resulting in system crash. Therefore, in this embodiment, before writing the new GOP data into the data cache space, it is necessary to first determine whether the current data cache space supports GOP data writing to avoid data overflow in the data cache space.

[0062] S104, if the data cache space does not support the writing of the GOP data, the target historical position information located at the head of the queue structure associated with the data cache space is removed, and the historical GOP data corresponding to the target historical position information in the data cache space is released at the same time, until the data cache space supports the writing of the GOP data, and the GOP data is written into the data cache space.

[0063] In this embodiment, if Figure 2As shown, when it is detected that the data cache space does not support the writing of new GOP data, that is, the remaining storage space of the data cache space is less than the file size of the GOP data to be written, the historical GOP data in the data cache space that is the earliest from the current time is automatically removed so that the data cache space meets the conditions for writing new GOP data. This can not only avoid the delay in the start time of multimedia playback due to the excessively large data cache space, which causes a large amount of system resources to be occupied; but also avoid the problem that the new cache data cannot be written into the data cache space in time when the data cache space is full due to the data cache space being set too small, thereby affecting the timeliness of the multimedia playback device reading the cache data, and then causing the problem of audio and video synchronization.

[0064] It should be explained that when playing audio and video, multiple GOP data are usually required to complete the cooperation. It is not possible to achieve audio and video playback by decoding one of the GOP data. For example, when the audio and video playback requires 10 GOP data, but the multimedia playback device currently only receives 9 GOP data, it will cause the audio and video to be out of sync, because some video data or audio data is in the remaining 10th GOP data. Only when the complete 10 GOP data are received can the audio and video be played synchronously.

[0065] It should be further explained that, in the present embodiment, the data cache space is associated with the queue structure, and the queue structure is a first-in-first-out (FIFO) data structure, which allows elements to be taken out in the order in which they are added. The main feature of the queue is "first-in-first-out", that is, the element at the head of the queue will be taken out first. By utilizing the characteristics of the queue, when the data cache space does not support the writing of new GOP data, the target historical position information at the head of the queue structure can be removed, and the historical position information with the earliest distance from the current time point can be automatically removed. And because the queue structure is associated with the data cache space, the historical GOP data corresponding to the target historical position information in the data cache space can be released while removing the target historical position information, and the step S103 is repeated until the data cache space supports the writing of GOP data and the GOP data is written into the data cache space.

[0066] In some embodiments, after step S103, the method further includes the following steps:

[0067] If the data cache space supports writing of the GOP data, the GOP data is written into the data cache space, and the storage location information of the GOP data in the data cache space is extracted, and the storage location information is synchronously written into the queue structure associated with the data cache space to instruct the multimedia playback device to read the corresponding GOP data from the data cache space.

[0068] In this embodiment, by associating the data cache space with the queue structure, after the GOP data is written into the data cache space, the storage location information of the GOP data in the data cache space can be automatically extracted, and the storage location information can be synchronously written into the queue structure, which plays a role of a query index. When the multimedia playback device receives a playback request, it can search for the corresponding storage location information from the queue structure according to the information carried by the playback request, and locate the corresponding position from the data cache space according to the storage location information found, and then read the GOP data stored in the position for subsequent analysis and playback operations.

[0069] In some embodiments, the data cache space is a ring queue structure. After determining that the data cache space supports GOP data writing, the method further includes the following steps:

[0070] If the head buffer area of ​​the ring queue structure does not support the writing of the GOP data, but the tail buffer area of ​​the ring queue structure supports the writing of the GOP data, then the GOP data is written into the tail buffer area; or

[0071] If the tail buffer area of ​​the circular queue structure does not support the writing of the GOP data, but the head buffer area of ​​the circular queue structure supports the writing of the GOP data, the GOP data is written into the head buffer area.

[0072] In the present embodiment, the data buffer space is preferably a circular queue structure, which is a special type of queue. Its characteristics are that the entrance and exit of the circular queue structure are at the same position, and when the tail of the circular queue structure reaches the head of the circular queue structure, it will loop back to the head of the circular queue structure to form a ring structure, also known as a "circular queue". Since the head and tail of the circular queue structure are connected, the memory space can be used continuously, and there is no need to move the front elements when adding elements at the tail like a conventional queue. As long as the remaining space of the circular queue structure is sufficient, the earliest GOP data from the current time point can be omitted. If a conventional queue structure is adopted (i.e., data can only be written from the head of the queue), when the remaining space at the tail of the queue is insufficient, the data at the tail can only be deleted. Even if there is a difference of 1 byte, the data at the tail can only be deleted to make room for new GOP data. By adopting the circular queue structure, when the head cache area of ​​the circular queue structure does not support GOP data writing, but the tail cache area of ​​the circular queue structure supports GOP data writing, the GOP data can be written into the tail cache area; or when the tail cache area of ​​the circular queue structure does not support GOP data writing, but the head cache area of ​​the circular queue structure supports GOP data writing, the GOP data can be written into the head cache area. This avoids the situation where the remaining space of the data cache space is larger than the GOP data to be written and cannot be written normally, and maximizes the utilization of the data cache space.

[0073] In some embodiments, after determining that the data cache space supports GOP data writing, the method further includes the following steps:

[0074] If the file size of the GOP data does not meet the requirements of the preset data transmission protocol, the GOP data is divided into a plurality of slice data;

[0075] The plurality of slice data are distributedly stored in different cache areas of the data cache space, and the plurality of slice data have the same preset identifier, so that when the GOP data is read, the plurality of slice data with the same preset identifier can be spliced ​​into complete GOP data.

[0076] In this embodiment, in view of the requirements of the preset data transmission protocol (such as the ROUTE protocol or the MMTP protocol), the size of the transmitted GOP data needs to meet the numerical range requirements specified by the data transmission protocol. In order to solve this problem, the GOP data is fragmented and managed, and the GOP data is divided into several slices of data, which are distributedly written into different cache areas of the data cache space, and the several slices of data have the same preset identifier. When the GOP data is read, the several slices of data with the same preset identifier are spliced ​​into complete GOP data and then output.

[0077] In some embodiments, if both the head buffer area and the tail buffer area of ​​the ring queue structure do not support writing of the GOP data, the GOP data is divided into a plurality of slice data;

[0078] The plurality of slice data are distributedly stored in different cache areas of the data cache space, and the plurality of slice data have the same preset identifier, so that when the GOP data is read, the plurality of slice data with the same preset identifier can be spliced ​​into complete GOP data.

[0079] In this embodiment, when both the head cache area and the tail cache area of ​​the circular queue structure do not support GOP data writing, the GOP data can be fragmented and managed to be divided into several slice data, which are written in a distributed manner into different cache areas of the data cache space, and the several slice data have the same preset identifier. When the GOP data is read, the several slice data with the same preset identifier are spliced ​​into complete GOP data and then output.

[0080] In some embodiments, after step S104, the method further includes the following steps:

[0081] In response to a read instruction for the data cache space, determining, from the queue structure, target storage location information closest to a timestamp corresponding to the read instruction;

[0082] According to the target storage position information, the starting position of the target GOP data is located from the data cache space, and the starting position is used as the reading starting point to read a preset number of GOP data for decoding and playback operations.

[0083] In this embodiment, if Figure 3 As shown, in the process of reading GOP data, the GOP data to be read is copied to obtain the corresponding GOP data copy, and the copied GOP data is retained in the data cache space. The GOP data will not be destroyed after the reading is completed, so that when the user switches the current data source 1 to the data source 2 and then switches back to the data source 1, the historical GOP data that has been output can be directly read without receiving the GOP data again, thereby achieving the effect of fast synchronization of audio and video.

[0084] In some embodiments, in order to achieve the effect of only copying but not deleting in the process of reading GOP data based on a queue structure, the reading end point can be determined according to the target storage location information and a preset number; a read pointer is used to point to the reading starting point; a copy pointer is used to point to the external cache area of ​​the multimedia playback device; the read pointer is controlled to move toward the reading end point, so as to copy the GOP data between the reading starting point and the reading end point to obtain a GOP data copy and then write it into the external cache area of ​​the multimedia playback device, thereby finally achieving the goal that the original GOP data in the data cache space will not be deleted in the process of reading the GOP data.

[0085] 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.

[0086] 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.

[0087] As can be seen from the above, the cache data management method provided by the embodiment of the present application receives a playback request for the target multimedia, obtains the target source data corresponding to the target multimedia according to the playback request; parses and reorganizes the target source data to obtain GOP data that can be read and played by the multimedia playback device; determines whether the data cache space currently used for caching the GOP data supports the writing of the GOP data; if the data cache space does not support the writing of the GOP data, removes the target historical position information located at the head of the queue structure from the queue structure associated with the data cache space, and releases the historical GOP data corresponding to the target historical position information in the data cache space until the data cache space supports the writing of the GOP data, and writes the GOP data into the data cache space. Utilizing the cache data management method provided by the embodiment of the present application, when the data cache space does not support the writing of new GOP data, the historical GOP data in the data cache space that is the oldest from the current time can be automatically removed, so that the data cache space meets the conditions for writing new GOP data. It can not only avoid the situation where a large amount of system resources are occupied due to the data cache space being set too large, thereby causing a delay in the start time of multimedia playback; it can also avoid the situation where the new cache data cannot be written into the data cache space in time when the data cache space is full due to the data cache space being set too small, thereby affecting the timeliness of the multimedia playback device reading the cache data.

[0088] The embodiment of the present application also provides a cache data management device, which can be integrated in an electronic device.

[0089] See also Figure 4 , Figure 4A schematic diagram of the structure of a cache data management device provided in an embodiment of the present application. The cache data management device 30 may include:

[0090] The receiving module 31 is used to receive a play request for a target multimedia, and obtain target source data corresponding to the target multimedia according to the play request;

[0091] The parsing module 32 is used to parse and reorganize the target source data to obtain GOP data that can be read and played by the multimedia playback device;

[0092] A determination module 33, used to determine whether the data cache space currently used for caching the GOP data supports writing the GOP data;

[0093] The adjustment module 34 is used to remove the target historical position information located at the head of the queue structure associated with the data cache space if the data cache space does not support the writing of the GOP data, and release the historical GOP data corresponding to the target historical position information in the data cache space until the data cache space supports the writing of the GOP data and writes the GOP data into the data cache space.

[0094] In some embodiments, the device also includes a storage module, which is used to write the GOP data into the data cache space if the data cache space supports the writing of the GOP data, and extract the storage location information of the GOP data in the data cache space, and synchronously write the storage location information into the queue structure associated with the data cache space to instruct the multimedia playback device to read the corresponding GOP data from the data cache space.

[0095] In some embodiments, the device also includes a selection module for writing the GOP data into the tail cache area if the head cache area of ​​the circular queue structure does not support the writing of the GOP data, while the tail cache area of ​​the circular queue structure supports the writing of the GOP data; or writing the GOP data into the head cache area if the tail cache area of ​​the circular queue structure does not support the writing of the GOP data, while the head cache area of ​​the circular queue structure supports the writing of the GOP data.

[0096] In some embodiments, the device also includes a segmentation module, which is used to segment the GOP data into several slice data if the file size of the GOP data does not comply with the provisions of a preset data transmission protocol, or the head cache area and the tail cache area of ​​the circular queue structure do not support the writing of the GOP data; the several slice data are distributedly stored in different cache areas of the data cache space, and the several slice data have the same preset identifier, so that when the GOP data is read, the several slice data with the same preset identifier can be spliced ​​into complete GOP data.

[0097] In some embodiments, the device also includes a reading module, which is used to respond to a read instruction for the data cache space, determine from the queue structure the target storage location information closest to the timestamp corresponding to the read instruction; based on the target storage location information, locate the starting position of the target GOP data stored in the data cache space, use the starting position as the reading starting point, and read a preset number of GOP data for decoding and playback operations.

[0098] In some embodiments, the reading module is used to copy a preset number of GOP data to obtain a preset number of GOP data copies, and perform decoding and playback operations according to the preset number of GOP data copies.

[0099] In some embodiments, the reading module is used to determine the reading end point according to the target storage location information and a preset number; use a reading pointer to point to the reading starting point; use a copy pointer to point to the external cache area of ​​the multimedia playback device; control the reading pointer to move toward the reading end point to copy the GOP data between the reading starting point and the reading end point to obtain a GOP data copy and then write it into the external cache area of ​​the multimedia playback device.

[0100] 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.

[0101] As can be seen from the above, the cache data management device 30 provided in the embodiment of the present application, wherein the receiving module 31 is used to receive a playback request for the target multimedia, and obtain the target source data corresponding to the target multimedia according to the playback request; the parsing module 32 is used to parse and reorganize the target source data to obtain GOP data that can be read and played by the multimedia playback device; the judgment module 33 is used to judge whether the data cache space currently used for caching the GOP data supports the writing of the GOP data; the adjustment module 34 is used to remove the target historical position information located at the head of the queue structure associated with the data cache space if the data cache space does not support the writing of the GOP data, and release the historical GOP data corresponding to the target historical position information in the data cache space at the same time, until the data cache space supports the writing of the GOP data, and write the GOP data into the data cache space.

[0102] See also Figure 5 , Figure 5 Another structural diagram of a cache data management device provided in an embodiment of the present application, the cache data management 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, a parsing module 32, a judging module 33, and an adjusting module 34. For example, the structures and connection relationships of the above components may be as follows:

[0103] 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.

[0104] 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.

[0105] 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:

[0106] A receiving instruction is used to receive a play request for a target multimedia, and obtain target source data corresponding to the target multimedia according to the play request;

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

[0108] A judgment instruction, used to judge whether the data cache space currently used for caching the GOP data supports writing the GOP data;

[0109] An adjustment instruction is used to remove the target historical position information located at the head of the queue structure associated with the data cache space if the data cache space does not support the writing of the GOP data, and release the historical GOP data corresponding to the target historical position information in the data cache space until the data cache space supports the writing of the GOP data, and write the GOP data into the data cache space.

[0110] In some embodiments, the program also includes storage instructions for writing the GOP data into the data cache space if the data cache space supports writing of the GOP data, extracting storage location information of the GOP data in the data cache space, and synchronously writing the storage location information into a queue structure associated with the data cache space to instruct the multimedia playback device to read the corresponding GOP data from the data cache space.

[0111] In some embodiments, the program also includes selection instructions for writing the GOP data into the tail cache area if the head cache area of ​​the circular queue structure does not support the writing of the GOP data, while the tail cache area of ​​the circular queue structure supports the writing of the GOP data; or writing the GOP data into the head cache area if the tail cache area of ​​the circular queue structure does not support the writing of the GOP data, while the head cache area of ​​the circular queue structure supports the writing of the GOP data.

[0112] In some embodiments, the program also includes a segmentation instruction, which is used to segment the GOP data into several slice data if the file size of the GOP data does not comply with the provisions of a preset data transmission protocol, or the head cache area and the tail cache area of ​​the circular queue structure do not support the writing of the GOP data; the several slice data are distributedly stored in different cache areas of the data cache space, and the several slice data have the same preset identifier, so that when the GOP data is read, the several slice data with the same preset identifier can be spliced ​​into complete GOP data.

[0113] In some embodiments, the device also includes a reading module, which is used to respond to a read instruction for the data cache space, determine from the queue structure the target storage location information closest to the timestamp corresponding to the read instruction; based on the target storage location information, locate the starting position of the target GOP data stored in the data cache space, use the starting position as the reading starting point, and read a preset number of GOP data for decoding and playback operations.

[0114] In some embodiments, the read instruction is used to copy a preset number of GOP data to obtain a preset number of GOP data copies, and perform decoding and playback operations according to the preset number of GOP data copies.

[0115] In some embodiments, the read instruction is used to determine the read end point based on the target storage location information and a preset number; use a read pointer to point to the read start point; use a copy pointer to point to the external cache area of ​​the multimedia playback device; control the read pointer to move toward the read end point to copy the GOP data between the read start point and the read end point to obtain a GOP data copy and then write it into the external cache area of ​​the multimedia playback device.

[0116] 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.

[0117] See also Figure 6 , Figure 6 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 cache data management method provided in the above embodiment. The electronic device 1200 can be a television, a smart phone, or a tablet computer.

[0118] like Figure 6As 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 6 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.

[0119] 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.

[0120] The memory 120 can be used to store software programs and modules, such as the program instructions / modules corresponding to the cache data management 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 manage the cache data, 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.

[0121] 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.

[0122] 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 6 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.

[0123] 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.

[0124] 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.

[0125] 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 6 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.

[0126] 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.

[0127] 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.

[0128] 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:

[0129] A receiving instruction is used to receive a play request for a target multimedia, and obtain target source data corresponding to the target multimedia according to the play request;

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

[0131] A judgment instruction, used to judge whether the data cache space currently used for caching the GOP data supports writing the GOP data;

[0132] An adjustment instruction is used to remove the target historical position information located at the head of the queue structure associated with the data cache space if the data cache space does not support the writing of the GOP data, and release the historical GOP data corresponding to the target historical position information in the data cache space until the data cache space supports the writing of the GOP data, and write the GOP data into the data cache space.

[0133] In some embodiments, the program also includes storage instructions for writing the GOP data into the data cache space if the data cache space supports writing of the GOP data, extracting storage location information of the GOP data in the data cache space, and synchronously writing the storage location information into a queue structure associated with the data cache space to instruct the multimedia playback device to read the corresponding GOP data from the data cache space.

[0134] In some embodiments, the program also includes selection instructions for writing the GOP data into the tail cache area if the head cache area of ​​the circular queue structure does not support the writing of the GOP data, while the tail cache area of ​​the circular queue structure supports the writing of the GOP data; or writing the GOP data into the head cache area if the tail cache area of ​​the circular queue structure does not support the writing of the GOP data, while the head cache area of ​​the circular queue structure supports the writing of the GOP data.

[0135] In some embodiments, the program also includes a segmentation instruction, which is used to segment the GOP data into several slice data if the file size of the GOP data does not comply with the provisions of a preset data transmission protocol, or the head cache area and the tail cache area of ​​the circular queue structure do not support the writing of the GOP data; the several slice data are distributedly stored in different cache areas of the data cache space, and the several slice data have the same preset identifier, so that when the GOP data is read, the several slice data with the same preset identifier can be spliced ​​into complete GOP data.

[0136] In some embodiments, the device also includes a reading module, which is used to respond to a read instruction for the data cache space, determine from the queue structure the target storage location information closest to the timestamp corresponding to the read instruction; based on the target storage location information, locate the starting position of the target GOP data stored in the data cache space, use the starting position as the reading starting point, and read a preset number of GOP data for decoding and playback operations.

[0137] In some embodiments, the read instruction is used to copy a preset number of GOP data to obtain a preset number of GOP data copies, and perform decoding and playback operations according to the preset number of GOP data copies.

[0138] In some embodiments, the read instruction is used to determine the read end point based on the target storage location information and a preset number; use a read pointer to point to the read start point; use a copy pointer to point to the external cache area of ​​the multimedia playback device; control the read pointer to move toward the read end point to copy the GOP data between the read start point and the read end point to obtain a GOP data copy and then write it into the external cache area of ​​the multimedia playback device.

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

[0140] 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:

[0141] Receiving a play request for a target multimedia, and acquiring target source data corresponding to the target multimedia according to the play request;

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

[0143] Determine whether the data cache space currently used for caching the GOP data supports writing the GOP data;

[0144] If the data cache space does not support the writing of the GOP data, the target historical position information located at the head of the queue structure associated with the data cache space is removed, and the historical GOP data corresponding to the target historical position information in the data cache space is released until the data cache space supports the writing of the GOP data, and the GOP data is written into the data cache space.

[0145] An embodiment of the present application further provides a storage medium, in which a computer program is stored. When the computer program runs on a computer, the computer executes the cache data management method described in any of the above embodiments.

[0146] It should be noted that, for the cache data management method described in this application, ordinary testers in this field can understand that all or part of the process of implementing the cache data management method described in the embodiment of this 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 cache data management method. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), etc.

[0147] For the cache data management device of the embodiment of the present application, its various functional modules 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 modules can be implemented in the form of hardware or in the form of software functional modules. If the integrated modules are implemented in the form of software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium, such as a read-only memory, a disk or an optical disk.

[0148] The cache data management method, device, medium and equipment provided in the embodiments of the present application are introduced in detail above. 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 idea of ​​the present application; at the same time, for technicians in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A cache data management method, applied to a multimedia playback device, characterized in that: include: Receiving a play request for a target multimedia, and acquiring target source data corresponding to the target multimedia according to the play request; Parsing and reorganizing the target source data to obtain GOP data that can be read and played by the multimedia playback device; Determine whether the data cache space currently used for caching the GOP data supports writing the GOP data; If the data cache space does not support the writing of the GOP data, the target historical position information located at the head of the queue structure associated with the data cache space is removed, and the historical GOP data corresponding to the target historical position information in the data cache space is released until the data cache space supports the writing of the GOP data, and the GOP data is written into the data cache space.

2. The cache data management method according to claim 1, characterized in that: After determining whether the data cache space currently used for caching the GOP data supports writing the GOP data, the method further includes: If the data cache space supports writing of the GOP data, the GOP data is written into the data cache space, and the storage location information of the GOP data in the data cache space is extracted, and the storage location information is synchronously written into the queue structure associated with the data cache space to instruct the multimedia playback device to read the corresponding GOP data from the data cache space.

3. The cache data management method according to claim 1, characterized in that: The data cache space is a ring queue structure. After the data cache space supports writing of the GOP data, the method further includes: If the head buffer area of ​​the ring queue structure does not support the writing of the GOP data, but the tail buffer area of ​​the ring queue structure supports the writing of the GOP data, then the GOP data is written into the tail buffer area; or If the tail buffer area of ​​the circular queue structure does not support the writing of the GOP data, but the head buffer area of ​​the circular queue structure supports the writing of the GOP data, the GOP data is written into the head buffer area.

4. The cache data management method according to claim 3, characterized in that: After the data cache space supports writing of the GOP data, the method further includes: If the file size of the GOP data does not comply with the provisions of the preset data transmission protocol, or the head buffer area and the tail buffer area of ​​the ring queue structure do not support the writing of the GOP data, the GOP data is divided into a plurality of slice data; The plurality of slice data are distributedly stored in different cache areas of the data cache space, and the plurality of slice data have the same preset identifier, so that when the GOP data is read, the plurality of slice data with the same preset identifier can be spliced ​​into complete GOP data.

5. The cache data management method according to claim 1, characterized in that: After writing the GOP data into the data cache space, the method further includes: In response to a read instruction for the data cache space, determining, from the queue structure, target storage location information closest to a timestamp corresponding to the read instruction; According to the target storage position information, the starting position of the target GOP data is located from the data cache space, and the starting position is used as the reading starting point to read a preset number of GOP data for decoding and playback operations.

6. The cache data management method according to claim 5, characterized in that: The step of reading a preset number of GOP data for decoding and playing includes: A preset number of GOP data are copied to obtain a preset number of GOP data copies, and decoding and playback operations are performed according to the preset number of GOP data copies.

7. The cache data management method according to claim 6, characterized in that: The step of copying a preset number of GOP data to obtain a preset number of GOP data copies includes: Determine the reading end point according to the target storage location information and the preset number; Using a read pointer to point to the read starting point; Using the copy pointer to point to the external buffer area of ​​the multimedia playback device; The read pointer is controlled to move toward the read end point, so as to copy the GOP data between the read start point and the read end point to obtain a GOP data copy and then write it into the external buffer area of ​​the multimedia playback device.

8. A cache data management device, applied to a multimedia playback device, characterized in that: The cache data management device comprises: A receiving module, configured to receive a play request for a target multimedia, and obtain target source data corresponding to the target multimedia according to the play request; A parsing module, used for parsing and reorganizing the target source data to obtain GOP data that can be read and played by the multimedia playback device; A determination module, used for determining whether the data cache space currently used for caching the GOP data supports writing the GOP data; An adjustment module is used to remove the target historical position information located at the head of the queue structure associated with the data cache space if the data cache space does not support the writing of the GOP data, and release the historical GOP data corresponding to the target historical position information in the data cache space until the data cache space supports the writing of the GOP data, and write the GOP data into the data cache space.

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 cache data management 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 cache data management method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Dynamic audio and video synchronous control system and method of multimedia interaction equipment

    CN121193977A

  • Data transmission method, device and equipment

    CN121585329A