Data processing method, device and readable storage medium

By adopting a caching mechanism on small smart terminals, the audio data is cached and downloaded to memory in memory, the problem that small smart terminals cannot realize the download and playback of audio data is improved, and the playback efficiency of audio data is improved.

CN115359810BActive Publication Date: 2025-02-07VIVO MOBILE COMM CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210964122.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-11
Publication Date
2025-02-07
Estimated Expiration
2042-08-11

AI Technical Summary

Technical Problem

Due to limited memory resources, small smart terminals cannot realize the download and playback of audio data, resulting in delayed playback of audio data and affecting playback efficiency.

Method used

Through the cache mechanism, the audio data is cached in the memory space and read data from it when the memory space is full for playback. At the same time, the audio data is continued to be downloaded to the memory until the file is fully downloaded.

Benefits of technology

It realizes the download and playback of audio data, avoids delayed playback, improves the playback efficiency of audio data, and achieves smooth playback of audio files after the file download is completed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115359810B_ABST
    Figure CN115359810B_ABST
Patent Text Reader

Abstract

The present application discloses a data processing method, device and readable storage medium, belonging to the field of audio playback technology, which includes: receiving audio data, and writing the audio data into a storage device and a memory space, wherein the storage space of the storage device is larger than the memory space; when the audio file is not completely downloaded to the storage device, reading the audio data from the memory space and playing it, wherein the audio file includes multiple audio data; when the audio file is completely downloaded to the storage device, reading the unplayed audio data in the audio file from the storage device and playing it according to the data amount of the played audio data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of audio playback technology, and in particular, to a data processing method, device, and readable storage medium. Background Art

[0002] With the development of integrated circuit technology, small smart terminals can carry more and more functions, and people begin to pursue playing audio data on small smart terminals. However, due to the relatively limited memory resources integrated in small smart terminals, it is difficult to achieve smooth audio data playback on small smart terminals.

[0003] In the prior art, a small smart terminal obtains audio data sent by a third-party server through a real-time operating system. Since the memory space of a small smart terminal is small, it cannot completely store the audio data, so the real-time operating system will download the received audio data into the memory and play it after the audio data is downloaded. Therefore, the existing small smart terminal does not support the function of downloading and playing audio data, which causes delayed playback of audio data and affects the playback efficiency of audio data. Summary of the invention

[0004] The embodiments of the present application provide a data processing method, device and readable storage medium, which realize the function of downloading and playing audio data through a cache mechanism, improve the playback efficiency of audio data, and solve the problem of delayed playback of audio data by existing small smart terminals.

[0005] In a first aspect, an embodiment of the present application provides a data processing method, including:

[0006] Receiving audio data, and writing the audio data into a memory and a memory space, wherein the storage space of the memory is larger than the memory space;

[0007] When the audio file is not completely downloaded to the memory, the audio data is read from the memory space and played, the audio file comprising a plurality of the audio data;

[0008] When the audio file is completely downloaded to the memory, the unplayed audio data in the audio file is read from the memory for playing according to the data amount of the played audio data.

[0009] In a second aspect, an embodiment of the present application provides a data processing device, including:

[0010] A data writing module, used for receiving audio data and writing the audio data into a memory and a memory space, wherein the storage space of the memory is larger than the memory space;

[0011] A cache data reading module, used for reading the audio data from the memory space and playing the audio data when the audio file is not completely downloaded to the memory, wherein the audio file includes a plurality of the audio data;

[0012] The download data reading module is used to read the unplayed audio data in the audio file from the memory for playing according to the data amount of the played audio data when the audio file is completely downloaded to the memory.

[0013] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the data processing method described in the first aspect.

[0014] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the data processing method as described in the first aspect is implemented.

[0015] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the data processing method as described in the first aspect.

[0016] In an embodiment of the present application, when the audio data of an audio file is received, all the audio data of the audio file are stored in a memory, and at the same time, the front audio data of the audio file is temporarily stored in the memory space based on a cache mechanism. When the memory space is full, the front audio data of the audio file is read from the memory space to supply the audio module for playing. Because the storage space of the memory is larger than the memory space, when the memory space is full of the front audio data of the audio file, the memory continues to store the rear audio data of the audio file until the entire audio file is stored in the memory. Therefore, while the audio module plays the audio data, the audio file is being downloaded to the memory, and the audio data is downloaded and played, and there is no need to wait until the audio file is completely downloaded to the memory before playing the audio file, avoiding the delayed playback of the audio file, and improving the playback efficiency of the audio data. After the audio file is downloaded, the control audio module reads the rear audio data of the audio file from the memory according to the data amount of the audio data that has been played, and plays, and realizes the smooth playback of the audio file. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a flowchart of a data processing method provided by an embodiment of the present application;

[0018] Figure 2is a schematic diagram of the structure of an embedded device provided in an embodiment of the present application;

[0019] Figure 3 is a workflow diagram of a network data receiving task provided in an embodiment of the present application;

[0020] Figure 4 It is a flowchart of writing audio data in a network receiving queue or storage into a memory space provided by an embodiment of the present application;

[0021] Figure 5 It is a flowchart of writing audio data in a network receiving queue into a memory space provided by an embodiment of the present application;

[0022] Figure 6 is a flowchart of writing audio data in a memory into a memory space provided by an embodiment of the present application;

[0023] Figure 7 is a workflow diagram of an audio playback task provided in an embodiment of the present application;

[0024] Figure 8 is a structural schematic diagram of a data processing device provided by an embodiment of the present application;

[0025] Fig. 9 It is a structural schematic diagram of an electronic device provided by an embodiment of the present application;

[0026] Fig.10 It is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0028] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0029] The data processing method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0030] Figure 1 1 is a flow chart of a data processing method provided by an embodiment of the present application. Figure 1 , the data processing method comprises:

[0031] S110, receiving audio data, and writing the audio data into a storage device and a memory space, wherein the storage space of the storage device is larger than the memory space.

[0032] In this embodiment, the executor of the data processing method is a small smart terminal, which runs a real-time operating system and has limited on-chip storage resources of the microcontroller. For example, the small smart terminal may be an embedded device, which may be a wearable device such as a smart watch, or a portable device such as a smart stylus.

[0033] This embodiment is described by taking a small intelligent terminal as an embedded device as an example. Figure 2 Schematic diagram of the structure of the embedded device provided in the embodiment of the present application. Figure 2 As shown, the embedded device includes a microcontroller and an audio module, and the microcontroller includes a memory space and a storage. Among them, the audio module is used to obtain the audio data in the memory space and the storage and play it, and the microcontroller is used to cache the front part of the audio data of the audio file in the memory space, and download all the audio data of the audio file to the storage. Exemplarily, the embedded device sends an audio file playback request to the server, and after the server receives the audio file playback request, it sends the corresponding audio file to the embedded device. Among them, the server can be a computer that provides application services for audio playback or a third-party server that provides other application services. The audio file can be divided into multiple audio data according to the timestamp order, and the server sends each audio data of the audio file to the embedded device in sequence according to the timestamp order, so that the embedded device receives the audio data sent by the server in sequence according to the timestamp order. The microcontroller writes each audio data into the storage in sequence according to the receiving order, so that the audio data in the storage is stored in the timestamp order to avoid storage errors. When all the audio data of the audio file are stored in the storage, the audio file is downloaded to the storage. While the microcontroller writes the audio data into the storage, it also caches the audio data into the memory space in the receiving order until the memory space is filled. Therefore, the audio data written into the memory space is the audio data in the front part of the audio file, which ensures that when the subsequent audio module obtains the audio data from the memory space and storage device for playback, the audio data is played in the order of the timestamps of the audio file, thereby ensuring the playback accuracy of the audio file.

[0034] Since the data processing speed of the audio module is fast, if the amount of stored data in the memory space is small, the audio data in the memory space will be quickly read and played. At this time, if the audio file still needs a long time to complete the download, it is necessary to wait for a long time to continue to play the remaining audio data, resulting in poor playback effect of the audio data. Therefore, in the present embodiment, the size of the memory space is at least 16 times the unit processing data volume of the audio module. For example, the data volume of the audio module reading the audio data at one time is 2K, and the size of the memory space is at least 32K. In this embodiment, if the size of the continuous available space of the on-chip memory chip of the microcontroller is greater than 16 times the unit processing data volume of the audio module, the continuous available area in the on-chip memory chip can be used as the memory space. In another embodiment, when the memory resources of the on-chip memory chip are limited, the embedded device can install an off-chip extended memory chip, and use the continuous available area of ​​the off-chip extended memory chip as the memory space to run the cache mechanism through the off-chip extended memory chip.

[0035] In one embodiment, an audio playing task and a network data receiving task are designed on the software program of the microcontroller. Among them, the network data receiving task is responsible for receiving the audio data sent by the server and writing the audio data into the storage and memory space, and notifying the audio playing task to perform corresponding operations when the memory space is full or the audio file is completely downloaded to the storage; the audio playing task is responsible for reading the audio data from the memory space and supplying it to the audio module for playing after receiving the notification, and controlling the audio module to read the audio data from the storage and play it.

[0036] In this embodiment, reference Figure 2 The network data receiving task can receive the audio data sent by the server through the network receiving queue, write each audio data in the network receiving queue into the storage, and write the audio data in the network receiving queue or the storage into the memory space. The audio playing task reads the audio data from the memory space and transmits it to the audio module to control the audio module to play the audio data, and controls the audio module to read the audio data from the storage and play it.

[0037] To ensure that the audio data in the memory space is read and written correctly and in order, starting from the time when the network data receiving task receives the audio data sent by the server, the audio playback task and the network data receiving task follow the first-come-first-served preemptive data reading and writing rules to obtain access rights to the memory space, and only one task is allowed to obtain access rights to the memory space at the same time. For example, if the audio playback task wants to read audio data from the memory space, it must obtain access rights to the memory space before it can read the audio data from the memory space. While the audio playback task obtains access rights, the network data receiving task blocks access rights to the memory space until the audio playback task releases access rights. Similarly, if the network data receiving task wants to write audio data to the memory space, it must obtain access rights to the memory space before it can write audio data to the memory space.

[0038] It should be noted that when the network data receiving task begins to execute, the audio data has not yet been written into the memory space, and the audio playing task cannot read the audio data for playback even if it obtains access rights. Therefore, the audio playing task does not participate in the access rights grabbing at the beginning, but participates in the access rights grabbing after receiving the notification from the network data receiving task.

[0039] In this embodiment, Figure 3 : is a workflow diagram of a network data receiving task provided in an embodiment of the present application. Figure 3 As shown, the workflow of the network data receiving task specifically includes S1101-S1104:

[0040] S1101. Receive audio data through a network receiving queue, write the audio data in the network receiving queue into a memory, and add the data amount of the audio data written into the memory to the first data amount of the audio data downloaded from the memory.

[0041] Exemplarily, when the microcontroller runs the network data receiving task, it receives the data sent by the server and performs a data check on the received data. If the received data does not belong to the audio file type, it is considered a data reception error and continues to receive the next data. If the received data belongs to the audio file type, it is determined that the audio data is received and the audio data is stored in the network receiving queue. Then, a batch of audio data is read from the network receiving queue, and the batch of audio data is written into the memory in sequence. This embodiment uses the characteristic of the network receiving queue to linearly process the network data stream, and quickly writes the audio data received in a unit time into the memory.

[0042] The data amount of a batch of audio data read from the network receiving queue depends on the data amount that the network data receiving task can process in a unit time. After the batch of audio data is written into the memory, the data amount of the batch of audio data is added to the first data amount of the audio data downloaded by the memory to update the first data amount of the memory. In the case where the data amount of the audio data read from the network receiving queue is equal to zero, it can be determined that all audio data of the audio file sent by the server have been fully stored in the memory. In order to determine whether the audio file in the memory is complete, the first data amount of the memory can be compared with the data amount of the audio file. If the first data amount is equal to the data amount of the audio file, it can be determined that the audio file is completely downloaded to the memory. If the first data amount is not equal to the data amount of the audio file, it can be determined that the audio file download is abnormal.

[0043] In this embodiment, after the audio file is completely downloaded to the memory, the microcontroller ends the operation of the network data receiving task to stop writing audio data to the memory space, and notifies the audio playback task that the network data receiving task has ended. After the audio playback task receives the notification of the end of the network data receiving task, the audio module is controlled to read the audio data from the memory for playback. At this time, the memory space is no longer involved in the audio playback task and the network data receiving task, so as to save the power consumption of the embedded device and extend the battery life of the embedded device.

[0044] S1102: Determine whether the audio data in the memory space reaches a preset storage threshold.

[0045] The preset storage threshold refers to the maximum storage data volume of the memory space. When the amount of audio data in the memory space reaches the preset storage threshold, it indicates that the memory space is full of audio data; when the amount of audio data in the memory space does not reach the preset storage threshold, it indicates that the memory space is not full of audio data. The memory space can only continue to write audio data if it is not full. Therefore, before writing audio data into the audio space, it is necessary to determine whether the memory space is full.

[0046] S1103. When the audio data in the memory space does not reach a preset storage threshold, based on a preset preemptive data read and write rule, obtain write access rights to the memory space, and write the audio data in the network receive queue or storage into the memory space.

[0047] Exemplarily, when it is determined that the memory space is not full, the first data amount of the memory is compared with the second data amount of the audio data written into the memory space. If the first data amount is equal to the second data amount, the audio data is read from the network receiving queue again; if the first data amount is greater than the second data amount, the network data receiving task seizes the access rights to the memory space. It can be understood that the audio data in the network receiving queue will be stored in the memory first and then written into the memory space, that is, the first data amount of the memory will generally be greater than the second data amount of the memory space. If the two are equal, it indicates that an error has occurred in the data writing link of the memory.

[0048] Furthermore, when the network data receiving task seizes the access rights to the memory space, if the seizure is successful, the access rights to the memory space are obtained; if the seizure fails, the task blocks and waits until the access rights to the memory space are released, and then it is seized again. After the network data receiving task obtains the access rights to the memory space, the audio data in the network receiving queue or the memory is written into the memory space. It can be understood that when the network data receiving task is blocked and waiting, the audio data will continue to be read from the network receiving queue and stored in the memory. Since the storage space of the network receiving queue is limited, when new audio data arrives, the earliest audio data stored in the network receiving queue will be deleted. If the network receiving queue receives new audio data during the blocking and waiting process, and deletes the earliest audio data stored, if the earliest audio data stored has not been written into the memory space, the earliest audio data stored can be obtained from the memory to ensure that the audio data is written into the memory space in an orderly manner.

[0049] In this embodiment, Figure 4 This is a flowchart of writing audio data in a network receiving queue or storage into a memory space provided by an embodiment of the present application. Figure 4 As shown, the step of continuing to write the audio data in the network receiving queue or the memory into the memory space specifically includes S11031-S11033:

[0050] S11031. Determine a difference between a first data amount and a second data amount of audio data written into the memory space.

[0051] Exemplarily, the data in the network receiving queue will be quickly written into the memory, so the first data amount is equivalent to the total data amount of the audio data received by the network receiving queue, and the second data amount is the total data amount of the audio data written into the memory space. It should be noted that if the audio playback task has read the audio data from the memory space before, the second data amount is the sum of the data amount of the audio data read by the audio playback task and the data amount of the audio data stored in the memory space. In general, the audio data in the network receiving queue will be first stored in the memory and then written into the memory space, and the first data amount is always greater than the second data amount.

[0052] S11032. When the difference is less than or equal to a third amount of audio data received by the network receiving queue within a unit time, write the audio data in the network receiving queue into the memory space.

[0053] Wherein, the third data amount refers to the total data amount of the audio data received by the network receiving queue per unit time. Exemplarily, when the difference between the first data amount and the second data amount is less than or equal to the third data amount, it indicates that the audio data deleted by the network receiving queue has been written into the memory space, that is, the audio data in the network receiving queue is adjacent to the timestamp of the audio data most recently written into the memory space. Therefore, the audio data is read from the network receiving queue, and the audio data is written into the memory space, so that the audio data in the memory space is sorted according to the timestamp order of the audio file, thereby avoiding the audio data storage error in the memory space.

[0054] In this embodiment, Figure 5 1 is a flowchart of writing audio data in a network receiving queue into a memory space provided by an embodiment of the present application. Figure 5 As shown, the step of writing the audio data in the network receiving queue into the memory space specifically includes S110321-S110324:

[0055] S110321. Determine the amount of available storage data in the memory space according to the preset storage threshold.

[0056] S110322. Compare the third data amount with the available storage data amount, and determine the minimum value as the target data amount.

[0057] S110323. Write the audio data of the target data volume in the network receiving queue into the memory space.

[0058] S110324. Add the data volume of the audio data written into the memory space to the second data volume, and release the write access permission of the memory space.

[0059] Among them, the available storage data amount refers to the data amount of audio data that can be currently stored in the memory space. The preset storage threshold is subtracted from the data amount of audio data currently stored in the memory space to obtain the available storage data amount of the memory space. The target data amount is the data amount of audio data currently written to the memory space. Exemplarily, when the available storage data amount is greater than the third data amount, it indicates that the memory space can at least store audio data of the third data amount, so the audio data of the third data amount is obtained from the network receiving queue and written to the memory space. On the contrary, when the available storage data amount is less than the third data amount, it indicates that the memory space is insufficient to store audio data of the third data amount, so the audio data of the available storage data amount is obtained from the network receiving queue and written to the memory space to just fill up the memory space.

[0060] The target data volume is added to the second data volume of the audio data written into the memory space to update the first data volume of the memory space. The network data receiving task releases the access rights of the memory space so that the audio playing task can seize the access rights of the memory space.

[0061] S11033. When the difference is greater than the third data amount, write the audio data in the memory into the memory space.

[0062] Exemplarily, when the difference between the first data amount and the second data amount is greater than the third data amount, it indicates that the audio data deleted by the network receiving queue is not all written into the memory space, that is, the audio data in the network receiving queue is not adjacent to the timestamp of the audio data most recently written into the memory space. If the audio data in the current network receiving queue continues to be written into the memory space, the audio data in the memory space will not be sorted in the order of the timestamps of the audio files, resulting in storage errors of the audio data in the memory space. Therefore, the present embodiment obtains audio data adjacent to the timestamp of the audio data most recently written into the memory space from the memory, and stores the audio data into the memory space.

[0063] In this embodiment, Figure 6 1 is a flowchart of writing audio data in a memory into a memory space provided by an embodiment of the present application. Figure 6 As shown, the step of writing the audio data in the memory into the memory space specifically includes S110331-S110332:

[0064] S110331. Acquire audio data having the same size as the target data amount from the memory according to the second data amount, and write the audio data into the memory space.

[0065] S110332. Add the data volume of the audio data written into the memory space to the second data volume, and release the write access permission of the memory space.

[0066] As can be seen from the above content, the target data amount is the minimum value of the third data amount and the available storage data amount of the memory space. Exemplarily, the second data amount is used as the address offset of the memory, and the storage position of the audio data most recently written to the memory space in the memory is determined according to the address offset. Since the audio data is continuously stored in the memory in the order of the timestamps of the audio files, the storage position of the audio data in the memory adjacent to the timestamp of the audio data most recently written to the memory space can be determined according to the storage position, and then the audio data adjacent to the timestamp of the audio data most recently written to the memory space can be obtained from the memory. Then the target data amount is added to the second data amount of the audio data written to the memory space to update the first data amount of the memory space. The network data receiving task releases the access rights of the memory space so that the audio playback task can seize the access rights of the memory space.

[0067] In one embodiment, after the audio data is written into the memory space, it is determined whether the audio playback task is in a special blocking waiting state and whether the audio data in the memory space reaches a preset storage threshold. Wherein, the special blocking waiting state is the state in which the audio playback task blocks and waits for access rights when the audio playback task determines that the audio data in the memory space is insufficient for the audio module to play and process. When the audio playback task determines that the audio data in the memory space is insufficient for the audio module to play and process, the status flag is set to a special blocking waiting state. When the network data receiving task determines that the audio playback task is in a special blocking waiting state according to the status flag and determines that the audio data in the memory space reaches a preset storage threshold, the audio playback task is notified that the memory space is full. After receiving the notification, the audio playback task leaves the special blocking waiting state to seize the access rights of the memory space. If the audio playback task is not in a special blocking waiting state, the audio playback task can seize the access rights of the memory space after the network data receiving task releases the rights, without the notification of the network data receiving task.

[0068] S1104. When the audio data in the memory space reaches a preset storage threshold, determine the time difference between the timestamp of the audio data most recently read from the memory space and the current timestamp. When the time difference is greater than the preset time threshold, determine that the audio file playback is abnormal.

[0069] Among them, the preset time threshold refers to the maximum length of time that the audio playback task obtains access rights to the memory space after the memory space is full. For example, after the memory space is full, the audio playback task will quickly obtain access rights to the memory space, and then read the audio data from the memory space and supply it to the audio module for playback processing. If the time difference between the timestamp of the audio data read from the memory space by the audio playback task and the current timestamp is greater than the preset time threshold, it indicates that the audio playback task cannot read the data in the memory space normally when there is data in the memory space, and then confirms that the audio playback task is abnormal, and stops the audio playback task.

[0070] S120. When the audio file is not completely downloaded to the memory, read the audio data from the memory space and play it, where the audio file includes multiple audio data. When the audio file is completely downloaded to the memory, read the unplayed audio data in the audio file from the memory and play it according to the data amount of the played audio data.

[0071] Exemplarily, the audio playback task starts executing after receiving the notification of full memory space sent by the network data receiving task for the first time. Before the audio file is completely downloaded to the memory, the audio playback task seizes the access rights of the memory space to read the audio data from the memory space and supplies it to the audio module for playback. After the audio file is not completely downloaded to the memory, the audio playback task controls the audio module to read the audio data from the memory for playback processing.

[0072] Figure 7 : is a workflow diagram of the audio playback task provided in the embodiment of the present application. Figure 7 As shown, the workflow of the audio playback task includes S1201-S1209:

[0073] S1201. Obtain the amount of audio data in the memory space.

[0074] S1202. Determine whether the amount of audio data in the memory space is greater than or equal to the preset data amount; if the amount of audio data in the memory space is greater than or equal to the preset data amount, execute step S1203; if the amount of audio data in the memory space is greater than or equal to the preset data amount, execute step S1207.

[0075] The preset data volume is the volume of audio data processed by the audio module at one time, which is generally 2K. Exemplarily, the audio playback task reads the preset data volume of audio data from the memory space each time to supply the audio module with the playback processing. If the volume of audio data in the memory space is less than the preset data volume, it indicates that the audio data in the memory space is insufficient for the audio module to play and process; if the volume of audio data in the memory space is greater than the preset data volume, it indicates that the audio data in the memory space is sufficient for the audio module to play and process.

[0076] S1203. Based on the preset preemptive data reading and writing rules, obtain read access rights to the memory space.

[0077] Exemplarily, when the audio data in the memory space is sufficient for the audio module to play and process, the audio playback task seizes the access rights to the memory space. If the seizure is successful, the access rights to the memory space are obtained. If the seizure fails, the task blocks and waits until the access rights to the memory space are released, and then re-seizes. After the audio playback task obtains the access rights to the memory space, it can read the audio data from the memory space and provide it to the audio module for playback and processing.

[0078] S1204, determining whether the audio file is completely downloaded to the memory; if the audio file is completely downloaded to the memory, executing step S1205; if the audio file is not completely downloaded to the memory, executing step S1206.

[0079] Exemplarily, when the audio file is completely downloaded to the memory, the network data receiving task will notify the audio playing task that the network data receiving task has ended execution. When the audio playing task receives the notification, it can be determined that the audio file has been completely downloaded to the memory, and when the audio playing task does not receive the notification, it can be determined that the audio file has not been completely downloaded to the memory.

[0080] S1205. Control the audio module to read the unplayed audio data in the audio file from the memory according to the amount of the played audio data and play it, and release the read access permission of the memory space.

[0081] Exemplarily, after determining that the audio file has been completely downloaded to the memory, the audio playback task controls the audio module to read the audio data of a preset data size from the memory for playback processing. In order to ensure the correct playback of the audio file, the data volume of the played audio data is used as the address offset of the memory to obtain the unplayed audio data of the second half of the audio file from the memory. At the same time, the audio playback task no longer reads audio data from the memory space, so the access rights to the memory space can be released.

[0082] S1206: Read audio data of a preset data size from the memory space for playback, and release the read access permission of the memory space.

[0083] Exemplarily, after determining that the audio file is not completely downloaded to the memory, audio data of a preset data size is read from the memory space and the audio data is transmitted to the audio module so that the audio module plays the audio data. The preset data size is accumulated to the data size of the played audio data, so that the subsequent reading of the audio data from the memory can locate the storage location of the unplayed audio data. The audio data currently read in the memory space is deleted. If the audio playback task continuously seizes the audio data in the memory space for multiple times, the memory space will gradually decrease until it is less than the preset data size. The audio playback task releases the access rights of the memory space so that the network data receiving task can seize the access rights of the memory space. The current timestamp is recorded as the timestamp of the audio data most recently read from the memory space, so that the audio playback can be verified to be normal based on the timestamp later.

[0084] S1207, blocking and waiting for the read access permission of the memory space.

[0085] Exemplarily, when the audio data in the memory space is insufficient for the audio module to play and process, the audio playback task blocks and waits for the access rights of the memory space and sets the flag position to a special blocking waiting state. After that, the audio playback task can only leave the special blocking waiting state after determining that the memory space is full or the audio file is completely downloaded to the memory. When the audio playback task is in a special blocking waiting state, it will not seize the access rights of the memory space together with the network data receiving task, and the network data receiving task can quickly obtain the access rights and write the audio data into the memory space.

[0086] S1208. When the audio data in the memory space reaches a preset storage threshold, based on the preset preemptive data reading and writing rules, obtain read access rights to the memory space, read audio data of a preset data size from the memory space for playback, and release the read access rights to the memory space.

[0087] Exemplarily, when the audio playback task is in a special blocking waiting state, if it receives a notification from the network data receiving task that the memory space is full, it exits the special blocking waiting state to seize the access rights to the internal reference space. When the memory space is full, the network data receiving task does not seize the access rights to the internal reference space, so the audio playback task can quickly obtain the access rights to the memory space, and after obtaining the access rights, read the audio data of a preset data size from the memory space to supply the audio data for playback. The preset data size is accumulated to the data size of the audio data that has been played, the audio data that has been read from the memory space is deleted, and the access rights to the memory space are released.

[0088] S1209: When the audio file is completely downloaded to the memory, control the audio module to read the unplayed audio data in the audio file from the memory according to the data volume of the played audio data and play it.

[0089] Exemplarily, when the audio playback task is in a special blocking waiting state, if a task end notification sent by a network data receiving task is received, the special blocking waiting state is exited and the audio module memory is notified to obtain unplayed audio data in the audio file.

[0090] In summary, the data processing method provided by the present embodiment, when receiving the audio data of an audio file, stores all the audio data of the audio file in a memory, and at the same time, based on a cache mechanism, temporarily stores the front audio data of the audio file in a memory space. When the memory space is full, the front audio data of the audio file is read from the memory space to supply the audio module for playing. Because the storage space of the memory is larger than the memory space, when the memory space is full of the front audio data of the audio file, the memory continues to store the rear audio data of the audio file until the entire audio file is stored in the memory. Therefore, while the audio module plays the audio data, the audio file is being downloaded to the memory, and the audio data is downloaded while playing, and there is no need to wait until the audio file is completely downloaded to the memory before playing the audio file, avoiding the delayed playing of the audio file, and improving the playing efficiency of the audio data. After the audio file is downloaded, the control audio module reads the rear audio data of the audio file from the memory according to the data amount of the audio data that has been played, and plays, and realizes the smooth playing of the audio file.

[0091] It should be noted that the data processing method provided in the embodiment of the present application can be executed by a data processing device or a control module in the data processing device for executing the data processing method. In the embodiment of the present application, the data processing device provided in the embodiment of the present application is described by taking the execution of the data processing method by the data processing device as an example.

[0092] Figure 8 Schematic diagram of a data processing device provided by an embodiment of the present application. Figure 8 As shown, the data processing device includes: a data writing module 201, a cache data reading module 202 and a download data reading module 203.

[0093] The data writing module is used to receive audio data and write the audio data into a memory and a memory space, wherein the storage space of the memory is larger than the memory space;

[0094] A cache data reading module, used for reading audio data from the memory space and playing the audio data when the audio file is not completely downloaded to the memory, wherein the audio file includes a plurality of audio data;

[0095] The download data reading module is used to read the unplayed audio data in the audio file from the memory for playing according to the data amount of the played audio data when the audio file is completely downloaded to the memory.

[0096] Based on the above embodiment, the cache data reading module includes:

[0097] A first data volume acquisition submodule, which acquires the data volume of the audio data in the memory space before reading the audio data from the memory space and playing it;

[0098] A first data reading submodule is used to obtain the read access permission of the memory space based on the preset preemptive data reading and writing rules when the data amount of the audio data in the memory space is greater than or equal to the preset data amount, and read the audio data of the preset data amount from the memory space for playback;

[0099] The read permission blocking submodule is used to block the read access permission of the waiting memory space after obtaining the data amount of the audio data in the memory space if the data amount of the audio data in the memory space is less than a preset data amount.

[0100] Based on the above embodiment, the first data reading submodule includes:

[0101] A download determination unit, configured to determine whether the audio file is completely downloaded to the memory after obtaining the read access permission of the memory space based on a preset preemptive data read and write rule;

[0102] A download data reading unit, used for controlling the audio module to read the unplayed audio data in the audio file from the memory and play it according to the data volume of the played audio data when the audio file is completely downloaded to the memory, and releasing the read access right of the memory space;

[0103] The cache data reading unit is used to read audio data of a preset data size from the memory space and play it when the audio file is not completely downloaded to the memory.

[0104] Based on the above embodiment, the cache data reading module includes:

[0105] The second data reading submodule is used to obtain the read access permission of the memory space after blocking and waiting for the read access permission of the memory space, and read the audio data of a preset data size from the memory space for playback based on the preset preemptive data reading and writing rules when the audio data in the memory space reaches a preset storage threshold.

[0106] Based on the above embodiment, the cache data reading module includes:

[0107] The third data reading submodule, after blocking and waiting for the read access permission of the memory space, controls the audio module to read the unplayed audio data in the audio file from the memory and play it according to the data amount of the played audio data when the audio file is completely downloaded to the memory.

[0108] Based on the above embodiment, the data writing module includes:

[0109] A data download submodule, used for receiving audio data through a network receiving queue, writing the audio data in the network receiving queue into a memory, and accumulating the data amount of the audio data written into the memory into the first data amount of the audio data downloaded into the memory;

[0110] The cache judgment submodule is used to judge whether the audio data in the memory space reaches a preset storage threshold;

[0111] The data cache submodule is used to obtain write access rights to the memory space based on preset preemptive data read and write rules when the audio data in the memory space does not reach a preset storage threshold, and write the audio data in the network receive queue or storage into the memory space.

[0112] Based on the above embodiment, the data cache submodule includes:

[0113] a difference determination unit, used to determine a difference between the first data amount and the second data amount of the audio data written into the memory space;

[0114] A first data cache unit is used to write the audio data in the network receiving queue into the memory space when the difference is less than or equal to a third data amount of the audio data received by the network receiving queue within a unit time;

[0115] The second data cache unit is used to write the audio data in the memory into the memory space when the difference is greater than the third data amount.

[0116] Based on the above embodiment, the first data cache unit includes:

[0117] An available storage amount determination subunit is used to determine the available storage data amount of the memory space according to a preset storage threshold;

[0118] A target data volume determination subunit, configured to compare the third data volume with the available storage data volume, and determine the minimum value as the target data volume;

[0119] A first data cache subunit is used to write audio data of a target data volume in a network receiving queue into a memory space;

[0120] The first permission releasing subunit is used to accumulate the data volume of the audio data currently written into the memory space into the second data volume, and release the write access permission of the memory space.

[0121] Based on the above embodiment, the second data cache unit includes:

[0122] A second data cache subunit is used to obtain audio data having the same size as the target data amount from the memory according to the second data amount, and write the audio data into the memory space;

[0123] A second permission releasing subunit, used for accumulating the data volume of the audio data written into the memory space into the second data volume, and releasing the write access permission of the memory space;

[0124] The target data volume is the minimum value between the third data volume and the available storage data volume of the memory space.

[0125] Based on the above embodiment, the data writing module further includes:

[0126] A time difference determination submodule, for determining, after determining whether the audio data in the memory space reaches a preset storage threshold, a time difference between a timestamp of the audio data most recently read from the memory space and a current timestamp if the audio data in the memory space reaches the preset storage threshold;

[0127] The playback anomaly determination submodule is used to determine that the audio file playback is abnormal when the time difference is greater than a preset time threshold.

[0128] In summary, the data processing device provided by the present embodiment, when receiving the audio data of an audio file, stores all the audio data of the audio file in a memory, and at the same time, based on a cache mechanism, temporarily stores the front audio data of the audio file in a memory space. When the memory space is full, the front audio data of the audio file is read from the memory space to supply the audio module for playing. Because the storage space of the memory is larger than the memory space, when the memory space is full of the front audio data of the audio file, the memory continues to store the rear audio data of the audio file until the entire audio file is stored in the memory. Therefore, while the audio module plays the audio data, the audio file is being downloaded to the memory, and the audio data is downloaded and played, and there is no need to wait until the audio file is completely downloaded to the memory before playing the audio file, avoiding the delayed playback of the audio file, and improving the playback efficiency of the audio data. After the audio file is downloaded, the control audio module reads the rear audio data of the audio file from the memory according to the data amount of the audio data that has been played, and plays, and realizes the smooth playback of the audio file.

[0129] The data processing device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. For example, the mobile electronic device can be a handheld computer, a vehicle-mounted electronic device, a wearable device, etc., and the non-mobile electronic device can be a television (TV), a Bluetooth speaker, etc., which is not specifically limited in the embodiment of the present application.

[0130] The data processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0131] The data processing device provided in the embodiment of the present application can realize Figures 1 to 7 To avoid repetition, the various processes implemented by the method embodiment are not described here.

[0132] Alternatively, if Fig. 9 As shown, an embodiment of the present application also provides an electronic device 30, including a processor 301, a memory 302, and a program or instruction stored in the memory 302 and executable on the processor 301. When the program or instruction is executed by the processor 301, each process of the above-mentioned data processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0133] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.

[0134] Fig.10 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0135] The electronic device 40 includes but is not limited to components such as a radio frequency unit 403, a network module 404, an audio output unit 405, an input unit 406, a sensor 407, a display unit 408, a user input unit 409, an interface unit 410, a memory 402, and a processor 401.

[0136] Those skilled in the art will appreciate that the electronic device 40 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 401 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.10 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0137] Among them, the processor 401 is used to receive audio data and write the audio data into a memory and a memory space, the storage space of the memory is larger than the memory space; when the audio file is not completely downloaded to the memory, the audio data is read from the memory space and played, and the audio file includes multiple audio data; when the audio file is completely downloaded to the memory, according to the data amount of the audio data that has been played, the audio data that has not been played in the audio file is read from the memory for playing.

[0138] Optionally, the processor 401 is also used to obtain the data amount of the audio data in the memory space before reading the audio data from the memory space and playing it; when the data amount of the audio data in the memory space is greater than or equal to the preset data amount, based on the preset preemptive data reading and writing rules, obtain the read access permission of the memory space, and read the audio data of the preset data amount from the memory space for playing; after obtaining the data amount of the audio data in the memory space, when the data amount of the audio data in the memory space is less than the preset data amount, block and wait for the read access permission of the memory space.

[0139] Optionally, processor 401 is also used to determine whether the audio file is completely downloaded to the memory after obtaining read access rights to the memory space based on preset preemptive data reading and writing rules; when the audio file is completely downloaded to the memory, control the audio module to read and play the unplayed audio data in the audio file from the memory according to the amount of audio data that has been played, and release the read access rights to the memory space; when the audio file is not completely downloaded to the memory, read and play audio data of a preset data amount from the memory space.

[0140] Optionally, processor 401 is also used to obtain read access rights to the memory space after blocking and waiting for the read access rights to the memory space, and read audio data of a preset data size from the memory space for playback based on preset preemptive data reading and writing rules when the audio data in the memory space reaches a preset storage threshold.

[0141] Optionally, the processor 401 is also used to control the audio module to read and play the unplayed audio data in the audio file from the memory according to the amount of audio data that has been played, after blocking and waiting for read access permission to the memory space, when the audio file is completely downloaded to the memory.

[0142] Optionally, the processor 401 is also used to receive audio data through a network receiving queue, write the audio data in the network receiving queue into a memory, and add the data amount of the audio data written to the memory to the first data amount of the audio data downloaded from the memory; determine whether the audio data in the memory space reaches a preset storage threshold; if the audio data in the memory space does not reach the preset storage threshold, based on a preset preemptive data read and write rule, obtain write access rights to the memory space, and write the audio data in the network receiving queue or the memory into the memory space.

[0143] Optionally, processor 401 is also used to determine the difference between the first data amount and the second data amount of audio data written into the memory space; when the difference is less than or equal to the third data amount of audio data received by the network receiving queue per unit time, the audio data in the network receiving queue is written into the memory space; when the difference is greater than the third data amount, the audio data in the storage device is written into the memory space.

[0144] Optionally, processor 401 is also used to determine the amount of available storage data in the memory space based on a preset storage threshold; compare the third data amount with the available storage data amount to determine the minimum value as the target data amount; write audio data of the target data amount in the network receiving queue into the memory space; accumulate the amount of audio data written into the memory space into the second data amount, and release the write access permission of the memory space.

[0145] Optionally, the processor 401 is also used to obtain audio data of the same size as the target data amount from the memory according to the second data amount, and write the audio data into the memory space; add the data amount of the audio data written into the memory space to the second data amount, and release the write access permission of the memory space; wherein the target data amount is the minimum value of the third data amount and the available storage data amount of the memory space.

[0146] Optionally, the processor 401 is also used to, after determining whether the audio data in the memory space reaches a preset storage threshold, determine the time difference between the timestamp of the most recent audio data read from the memory space and the current timestamp if the audio data in the memory space reaches the preset storage threshold; if the time difference is greater than the preset time threshold, determine that the audio file playback is abnormal.

[0147] In summary, the electronic device provided by the present embodiment, when receiving the audio data of an audio file, stores all the audio data of the audio file in a memory, and at the same time, based on a cache mechanism, temporarily stores the front audio data of the audio file in a memory space. When the memory space is full, the front audio data of the audio file is read from the memory space to supply the audio module for playing. Because the storage space of the memory is larger than the memory space, when the memory space is full of the front audio data of the audio file, the memory continues to store the rear audio data of the audio file until the entire audio file is stored in the memory. Therefore, while the audio module plays the audio data, the audio file is being downloaded to the memory, and the audio data is downloaded and played, and there is no need to wait until the audio file is completely downloaded to the memory before playing the audio file, avoiding the delayed playback of the audio file, and improving the playback efficiency of the audio data. After the audio file is downloaded, the control audio module reads the rear audio data of the audio file from the memory according to the data amount of the audio data that has been played, and plays, and realizes the smooth playback of the audio file.

[0148] It should be understood that in the embodiment of the present application, the input unit 406 may include a graphics processor (GPU) 4061 and a microphone 4062, and the graphics processor 4061 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 408 may include a display panel 4081, and the display panel 4081 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 409 includes a touch panel 4091 and other input devices 4092. The touch panel 4091 is also called a touch screen. The touch panel 4091 may include two parts: a touch detection device and a touch controller. Other input devices 409 may include but are not limited to a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here. The memory 402 can be used to store software programs and various data, including but not limited to applications and operating systems. The processor 401 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, the user interface, and the application program, etc., and the modem processor mainly processes wireless communication. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401 .

[0149] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned data processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0150] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0151] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned data processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0152] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0153] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0154] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0155] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A data processing method, characterized in that: include: Receiving audio data, and writing the audio data into a memory and a memory space, wherein the storage space of the memory is larger than the memory space; In the case where the audio file is not completely downloaded to the memory, the audio data is read from the memory space and played, and the audio file includes a plurality of the audio data; wherein the reading of the audio data from the memory space and playing includes: in the case where the amount of the audio data in the memory space is greater than or equal to a preset amount of data, based on a preset preemptive data read and write rule, obtaining a read access right to the memory space, and reading the audio data of the preset amount of data from the memory space for playing; When the audio file is completely downloaded to the memory, the unplayed audio data in the audio file is read from the memory for playing according to the data amount of the played audio data.

2. The method according to claim 1, characterized in that Before reading the audio data from the memory space and playing it, the method further includes: Obtaining the amount of audio data in the memory space; After obtaining the amount of audio data in the memory space, the method further includes: When the data amount of the audio data in the memory space is less than the preset data amount, the read access permission of the memory space is blocked and waited.

3. The method according to claim 2, characterized in that After obtaining the read access permission of the memory space based on the preset preemptive data read and write rule, the method further includes: Determining whether the audio file is completely downloaded to the memory; When the audio file is completely downloaded to the memory, the audio module is controlled to read the unplayed audio data in the audio file from the memory according to the amount of the played audio data and play the audio data, and the read access right of the memory space is released; When the audio file is not completely downloaded to the memory, the audio data of the preset data size is read from the memory space and played.

4. The method according to claim 3, characterized in that After the blocking and waiting for the read access permission of the memory space, the method further includes: When the audio data in the memory space reaches a preset storage threshold, based on preset preemptive data read and write rules, read access rights to the memory space are obtained, and audio data of the preset data size is read from the memory space for playback.

5. The method according to claim 3, characterized in that: After the blocking and waiting for the read access permission of the memory space, the method further includes: When the audio file is completely downloaded to the memory, the audio module is controlled to read the unplayed audio data in the audio file from the memory and play it according to the data amount of the played audio data.

6. The method according to claim 1, characterized in that The receiving audio data and writing the audio data into the storage and the memory space includes: receiving the audio data through a network receiving queue, writing the audio data in the network receiving queue into the memory, and accumulating the data amount of the audio data written into the memory into the first data amount of the audio data downloaded into the memory; Determining whether the audio data in the memory space reaches a preset storage threshold; When the audio data in the memory space does not reach a preset storage threshold, based on preset preemptive data read and write rules, the write access permission of the memory space is obtained, and the audio data in the network receive queue or the storage is written into the memory space.

7. The method according to claim 6, characterized in that Writing the audio data in the network receiving queue or the memory into the memory space includes: Determine a difference between the first data amount and a second data amount of the audio data written into the memory space; When the difference is less than or equal to a third amount of audio data received by the network receiving queue within a unit time, writing the audio data in the network receiving queue into the memory space; When the difference is greater than the third data amount, the audio data in the memory is written into the memory space.

8. The method according to claim 7, characterized in that Writing the audio data in the network receiving queue into the memory space includes: Determining the available storage data amount of the memory space according to the preset storage threshold; Compare the third data amount with the available storage data amount to determine that the minimum value is the target data amount; Writing the audio data of the target data volume in the network receiving queue into the memory space; The data volume of the audio data written into the memory space is accumulated into the second data volume, and the write access permission of the memory space is released.

9. The method according to claim 7, characterized in that: Writing the audio data in the memory into the memory space comprises: Acquire audio data having the same size as the target data amount from the memory according to the second data amount, and write the audio data into the memory space; Accumulating the data volume of the audio data written into the memory space into the second data volume, and releasing the write access permission of the memory space; The target data volume is the minimum value between the third data volume and the available storage data volume of the memory space.

10. The method according to claim 6, characterized in that After determining whether the audio data in the memory space reaches a preset storage threshold, the method further includes: When the audio data in the memory space reaches the preset storage threshold, determining a time difference between a timestamp of the audio data most recently read from the memory space and a current timestamp; When the time difference is greater than a preset time threshold, it is determined that the audio file is played abnormally.

11. An electronic device, characterized in that: The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the data processing method according to any one of claims 1 to 10.

12. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the data processing method according to any one of claims 1 to 10 are implemented.

Citation Information

Patent Citations

  • Method and device for playing network videos online and smart television

    CN102724584A