WO2023015404A1 - Method for playing audio, apparatus, electronic device, and storage medium - Google Patents

Method for playing audio, apparatus, electronic device, and storage medium Download PDF

Info

Publication number
WO2023015404A1
WO2023015404A1 PCT/CN2021/111435 CN2021111435W WO2023015404A1 WO 2023015404 A1 WO2023015404 A1 WO 2023015404A1 CN 2021111435 W CN2021111435 W CN 2021111435W WO 2023015404 A1 WO2023015404 A1 WO 2023015404A1
Authority
WO
WIPO (PCT)
Prior art keywords
time
audio data
decoding
offset
playback
Prior art date
Application number
PCT/CN2021/111435
Other languages
French (fr)
Chinese (zh)
Inventor
张金梁
Original Assignee
深圳Tcl新技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳Tcl新技术有限公司 filed Critical 深圳Tcl新技术有限公司
Priority to PCT/CN2021/111435 priority Critical patent/WO2023015404A1/en
Publication of WO2023015404A1 publication Critical patent/WO2023015404A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/439Processing of audio elementary streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/04Synchronising
    • H04N5/06Generation of synchronising signals

Definitions

  • the present application relates to the technical field of display control, in particular to an audio playback method, device, electronic equipment and storage medium.
  • the audio player After the audio player receives the audio data, it needs to perform back-end data processing such as decoding on the audio data. Therefore, a certain decoding time needs to be reserved for the processing of the audio data before playing the audio data.
  • Embodiments of the present application provide an audio playback method, device, electronic equipment, and storage medium, which can increase the time reserved for back-end decoding processing and realize synchronization of audio playback.
  • the embodiment of the present application provides an audio playback method, including:
  • the audio data set includes at least one frame of audio data
  • the audio data is played according to the terminal device.
  • an audio playback device including:
  • a decoding module configured to decode an audio data set to be played on the terminal device, where the audio data set includes at least one frame of audio data;
  • a recording module configured to record the start decoding reference time and the actual decoding processing time of the audio data decoding process of each frame
  • An acquisition module configured to acquire a reference offset time and an expected playback time corresponding to the audio data
  • An adjustment module configured to adjust the decoding start reference time according to the reference offset time for each frame of audio data, to obtain the decoding start adjustment time
  • a determination module configured to determine a reference playback time of the audio data according to the start decoding adjustment time and the actual decoding processing time
  • a timing module configured to update the reference playing time according to time changes
  • a playing module configured to play the audio data according to the terminal device when the adjusted reference playing time reaches a desired playing time.
  • the audio data includes current audio data
  • the obtaining module includes:
  • a sampling unit configured to sample at least one frame of historical audio data, where the historical audio data is of the same data type as the current audio data;
  • the first acquisition unit is used to respectively acquire the historical reference playback time and the historical expected playback time after decoding the historical audio data of each frame;
  • a first determining unit configured to respectively determine the offset time of each frame of the historical audio data according to the historical reference playing time and the historical expected playing time;
  • the second determining unit is configured to determine a reference offset time of the current audio data according to at least one of the offset times.
  • the second determining unit includes:
  • a first determining subunit configured to determine an average value of at least one offset time to obtain an average offset time
  • the second determining subunit is configured to determine the reference offset time of the current audio data according to the average offset time.
  • the second determination unit is specifically further configured to:
  • the second determination unit is specifically further configured to:
  • the sampling unit is also specifically used for:
  • the historical audio data Used to acquire historical audio data according to a preset frequency, the historical audio data including at least one frame;
  • the reference offset time includes an actual offset time
  • the adjustment module includes:
  • a second acquiring unit configured to acquire the reserved processing time of the audio data
  • a third determining unit configured to determine the actual offset time of the audio data according to the reserved processing time and the actual decoding processing time
  • the third obtaining unit is configured to adjust the decoding start reference time according to the actual offset time to obtain the decoding start adjustment time.
  • the second acquiring unit includes:
  • the third determining subunit is configured to determine the reserved processing time of the audio data according to the reference time of starting decoding of the audio data and the expected playing time.
  • the second acquiring unit is specifically further configured to:
  • the recording module is specifically used to:
  • It is used for determining the actual decoding processing time of the audio data according to the decoding start time and the decoding end time.
  • the determination module is specifically used to:
  • It is used for determining the reference playing time of the audio data according to the basic reference playing time and the end decoding time.
  • the acquisition module is specifically used to:
  • the obtaining module is also specifically used to:
  • the mapping relationship set includes a mapping relationship between a preset audio data type and a preset reference offset time
  • the method is used to acquire the reference offset time corresponding to the audio data according to the mapping relationship set and the audio data type.
  • the reference playback time changes with time, and after the change reaches the desired playback time, the audio data is played, that is, when the reference playback time of the audio data meets the desired playback time After the time, the audio data is played synchronously; the reference playback time is reduced according to the reduction of the reference time for decoding, and the actual decoding processing time of the audio data is not affected or limited. Therefore, this kind of audio data
  • the corresponding reference playback time reduction method provides enough decoding time for the decoding process of audio data, and avoids audio and picture asynchrony, frame loss, or freezes in audio data playback due to too long decoding processing time. Phenomenon.
  • FIG. 1 is a schematic diagram of a scene of an audio playback method provided by the present application
  • Fig. 2 is a schematic flow chart of the audio playing method provided by the present application.
  • Fig. 3 is another schematic flow chart of the audio playing method provided by the present application.
  • Fig. 4 is another schematic flow chart of the audio playback method provided by the present application.
  • FIG. 5 is a schematic structural diagram of an audio playback device provided by the present application.
  • FIG. 6 is a schematic structural diagram of an electronic device provided by the present application.
  • Embodiments of the present application provide an audio playback method, device, electronic equipment, and storage medium.
  • the audio playback method provided by the embodiment of the present application can be performed by an electronic device, where the electronic device includes a terminal device or a server; where the terminal device can be a TV, a mobile phone, a notebook, a desktop or a tablet computer, etc.; the server can be It is an independent physical server, or it can be a server cluster or distributed system composed of multiple physical servers, and it can also provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, and middleware services , domain name service, security service, content delivery network (CDN, ContentDelivery Network), and cloud servers for basic cloud computing services such as big data and artificial intelligence platforms, etc.
  • the servers can be directly or indirectly connected through wired or wireless communication.
  • the terminal device and the server jointly execute the audio playback method as an example, wherein data transmission can be performed between the terminal device and the server through a wired network, a wireless network, or broadcasting, wherein, between the terminal device and the server Basically, other devices can also be added to assist in completing the audio playback method, and the types of other devices are not limited here; wherein, the specific process of the terminal device and the server jointly executing the audio playback method is as follows:
  • the terminal device receives the audio data set (audio data packet) to be played from the server, and then the processor in the terminal device decodes the received audio data set, and records each frame of audio data to start the decoding process The decoding reference time and the actual decoding processing time of each frame of audio data.
  • the terminal device also obtains the reference offset time and expected playback time of each frame of audio data from the audio data. Then, for each frame of audio data, according to the reference The offset time adjusts the start decoding reference time to obtain the start decoding adjustment time, and then, according to the start decoding adjustment time and the actual decoding processing time, determine the reference playback time after the audio data decoding process is completed, and finally, at the reference playback time.
  • the terminal device plays the audio data; wherein, if the terminal device is a TV, the audio data can be played directly without using an additional audio player.
  • the reference time of the audio data (such as the reference time of starting decoding) is synchronized with the reference clock on the terminal device, and the reference clock is coordinated and synchronized with the accurate time according to the Network Time Protocol (NTP, Network Time Protocol).
  • NTP Network Time Protocol
  • the source of accurate time is Coordinated Universal Time (UTC, Universal Time Coordinated), for example, the Beijing time displayed by the reference clock on the terminal device, when the terminal device starts decoding audio data at 6:00 Beijing time, the reference time to start decoding is also 6:00;
  • the reference playback time is the time when the audio data can be played after decoding.
  • the reference playback time is also synchronized with the Beijing time, that is, the Beijing time after the audio data is decoded is the reference playback time of the audio data.
  • the reference clock The timing of the clock is updated according to the data transmission, and there is time consumption in the transmission of data, so there is a time error in the timing of the reference clock. Therefore, in the embodiment of the present application, the reference clock is determined based on the reference time of starting decoding and the actual decoding processing time of decoding.
  • the actual decoding processing time is timed according to the feedback of the crystal vibration, so the time record is very accurate, therefore, you can get an actual reference playing time after the audio data decoding processing, at this time, get The timestamp of the reference playback time is no longer synchronized with the timestamp of the reference clock, but the reference playback time still increases according to the time (which can be Beijing time).
  • the reference playback time is At 8 o'clock, the Beijing time can be 8:01 at this time, that is, the time stamps of the reference broadcast time and Beijing time are no longer the same;
  • the audio data when the reference playback time of the audio data is equal to the expected playback time, the audio data can be played, but the decoding process of the audio data takes a certain amount of time, and the reference playback time of the audio data after decoding often exceeds the corresponding expectation of the audio data. Playing time, therefore, it is necessary to call back the reference playing time after audio data decoding to make it synchronized with the expected playing time or synchronize with the expected playing time after the reference playing time increases with time, and then play the audio data.
  • NTP Network Time Protocol
  • server or clock source such as quartz clock, GPS, etc.
  • high-precision time correction on LAN with The difference between the standard is less than 1 millisecond, tens of milliseconds on the WAN).
  • NTP can obtain UTC time from atomic clocks, observatories, satellites, or from the Internet.
  • the expected playback time is the time when the audio data is expected to be displayed, such as the display time tag (PTS, Presentation Time Stamp).
  • PTS Display Time Tag
  • the audio data can be played, that is, the audio
  • the expected playback time of the data is synchronized with the international standard time.
  • the expected playback time of the audio data is later than the reference playback time of the terminal device, the audio data cannot be played accurately. Dun and so on.
  • the reference playback time changes with time, and after the change reaches the desired playback time, the audio data is played, that is, when the reference playback time of the audio data meets the desired playback time After the time, the audio data is played synchronously; the reference playback time is reduced according to the reduction of the reference time for decoding, and the actual decoding processing time of the audio data is not affected or limited. Therefore, this kind of audio data
  • the corresponding reference playback time reduction method provides enough decoding time for the decoding process of audio data, and avoids audio and picture asynchrony, frame loss, or freezes in audio data playback due to too long decoding processing time. Phenomenon.
  • FIG. 2 is a schematic flowchart of an audio playback method provided by an embodiment of the present application.
  • the specific process of the audio playback method can be as follows:
  • the audio data received by the terminal device to be played is often coded and compressed data.
  • the transmitted data packet TLV is the ISDBS3 standard data packet
  • the TLV packet corresponding to the 4K ultra-high-definition program is generally
  • the data volume of the program content is very large. Therefore, in order to improve the transmission efficiency, it is generally necessary to encode and compress the audio data.
  • the audio data received by the terminal device is compressed data that needs to be decoded. The terminal device can only decode the audio data after decoding the audio data. Play audio data.
  • the decoding start reference time is synchronized with the reference clock on the terminal device, that is, when the audio data starts to be decoded, the time of the reference clock is the audio data decoding start reference time;
  • the actual decoding processing time of the audio data is the actual time used in the audio data decoding process.
  • the actual decoding processing time of the audio data can be accurately timed according to the hardware timing device, that is, optionally, in some embodiments, the step "recording the actual decoding processing time of the audio data decoding processing of each frame" may specifically include :
  • Timing feedback is performed according to the beating of the crystal oscillator, and the start decoding time and the end decoding time of the audio data are obtained respectively;
  • the actual decoding processing time of the audio data is determined according to the decoding start time and the decoding end time.
  • timing can be performed by crystal oscillator feedback, such as an oscillator, when the terminal device is turned on, it starts timing from 0:00:00 seconds, and the timing process is fed back by the 27M crystal oscillator beating.
  • crystal oscillator feedback such as an oscillator
  • using an oscillator for timing is more accurate.
  • timing is performed when the audio data starts to be decoded, and the start decoding time is obtained.
  • the end decoding time of the audio data is obtained, and the audio data can be obtained according to the difference between the end decoding time and the start decoding time. Actual decoding processing time for decoding.
  • Adjustment that is, adjusting the data of the reference playback time referenced by the audio data playback, rather than adjusting the data corresponding to the reference clock, that is, not adjusting the display time on the terminal device;
  • the reference offset time can be determined according to the difference between the reference play time and the expected play time of the audio data, and the reference play time is rolled back to the above difference, so that the adjusted reference play time is less than or equal to the expected play time.
  • the adjustment of the reference time is also a millisecond difference that is difficult for the human body to perceive.
  • the original reference playback time of audio data is 7:0500ms, that is, the terminal device reference clock
  • the display time of the clock is 7:00
  • the reference offset time is 200ms. Therefore, the adjusted reference playback time is 7:0300ms.
  • the display time of the reference clock is still 7:00, and the millisecond level of 200ms Adjustment is difficult for users to perceive, but the time of 200ms is difficult to ignore for audio decoding.
  • the method of shifting time adjusts the reference playback time so that the audio data can be played, and provides enough time for audio data decoding, reducing the performance requirements for hardware products, and it is also difficult for users to perceive this part of the time difference.
  • the reference offset time of the current audio data can be determined according to the offset of the historical data in the past, that is, optionally, in some embodiments, the step "acquire the reference offset time corresponding to the audio data Offset time", which can specifically include:
  • the historical reference playing time and the historical expected playing time respectively determine the offset time of each frame of the historical audio data
  • a reference offset time of the current audio data is determined according to at least one of the offset times.
  • the reference offset time that the reference playback time of the current audio data should be adjusted can be inferred, because the sampling is the same historical audio data type as the current audio data Therefore, the acquisition of the reference offset time is more accurate.
  • the historical audio data to be sampled can be replaced according to a certain frequency, that is, optionally, in some embodiments, the step "sampling at least one frame of historical audio data", Specifically can include:
  • the historical audio data including at least one frame
  • the reference offset of the current audio data may be determined by averaging the offset times corresponding to the historical audio data, that is, optionally, in some embodiments, the step "according to at least one of the offset times , to determine the reference offset time of the current audio data", which may specifically include:
  • a reference offset time of the current audio data is determined according to the average offset time.
  • the average value indicates the overall offset of the historical audio data of the same data type as the current audio data, and the overall offset can reflect the range to be adjusted for the reference playback time of the current audio data. Therefore, the historical audio data
  • the average offset time is used as the reference offset time of the current audio data, which has certain accuracy and reference value.
  • the step of "determining the reference offset time of the current audio data according to at least one of the offset times" may specifically include:
  • the average integer offset time is determined as a reference offset time of the current audio data.
  • the method of rounding can be a method of converting zeros into wholes, for example, adjusting the value after the decimal point to 1, so that the adjusted reference playback time is less than the expected playback time, so as to ensure that the audio data can be played smoothly.
  • the reference offset time of an integer can intuitively know the interval to be adjusted of the reference playback time of the audio data.
  • the decoding time is at the level of milliseconds, in order to improve the calculation efficiency, the time below the unit of milliseconds can be ignored, that is, only the integer part of each offset time can be used as a consideration for the selection of the reference offset time, and each The offset time is rounded first, and the average value of these offset times is calculated, that is, optionally, in some embodiments, the step "determine the reference offset of the current audio data according to at least one of the offset times shift time", which may specifically include:
  • the integer average offset time is determined as a reference offset time of the current audio data.
  • each offset time can be rounded up to zero, for example, the data after the decimal point of each offset data is adjusted to 1, that is, the integer part is increased by 1 ms.
  • the reference offset time indicates the basic offset data or the overall offset of the historical audio data of the same data type as the current audio data. Therefore, the adjustment of the reference playback time by the reference offset time can basically meet the requirements of the reference The playing time is adjusted to be less than or equal to the expected playing time.
  • the above-mentioned reference offset time is obtained on the basis of taking the average value, and the average value of each audio data offset time represents the overall offset situation of the audio data set, therefore, the obtained by the above method
  • the reference offset time can satisfy the adjustment requirement of the reference playback time to a certain extent.
  • the error offset that still exists in the audio data based on the adjustment of the reference offset time based on the actual offset time corresponding to the audio data on the basis of the reference offset time. shift time, adjust the reference play time of the audio data simultaneously according to the reference offset time and the error offset time, that is, optionally, in some embodiments, the step "according to the reference offset time to start decoding The reference time is adjusted to obtain the start decoding adjustment time", which may include:
  • the decoding start reference time is adjusted according to the reference offset time and the error offset time to obtain an adjustment start decoding time.
  • the reference offset time is calculated by the average value of the offset time of historical audio data, so, according to the actual offset time and the reference offset time to determine the error offset time, and then, after the reference playback time is adjusted according to the reference offset time, further adjustments are made according to the error offset time, which can improve the accuracy of the reference playback time adjustment of the audio data , that is, ensure that the adjusted reference playback time is less than or equal to the expected playback time.
  • the actual audio data corresponding to each frame of audio can be determined, and the error offset can be determined according to the actual audio data and the reference offset time Time, then, on the basis of adjusting the reference playback time according to the reference offset time, further adjustment is made according to the error offset time.
  • the reference offset time also includes the actual offset time
  • the step of "adjusting the decoding start reference time according to the reference offset time to obtain the decoding start adjustment time" may specifically include:
  • the decoding start reference time is adjusted according to the actual offset time to obtain the decoding start adjustment time.
  • the audio data decoding start reference time is adjusted according to the actual offset time of the audio data.
  • the reserved processing time is the processing time reserved for the decoding of audio data, wherein, the acquisition of the reserved processing time can be obtained according to the decoding start reference time and the expected playback time, that is, optional, in some embodiments , the step of "obtaining the reserved processing time of the audio data" may specifically include:
  • the reserved processing time of the audio data is determined according to the decoding start reference time of the audio data and the expected playing time.
  • the reserved processing time of audio data can be obtained according to the difference between the expected playback time and the reference time of starting decoding, and the actual deviation of audio data decoding can be obtained by comparing the reserved processing time with the actual decoding processing time. shift time.
  • the expected playing time of the audio data may be directly extracted from the data information of the audio data, that is, optionally, in some embodiments, the step "obtaining the expected playing time corresponding to the audio data" may specifically include:
  • the expected playing time of the audio data is directly extracted from the audio data.
  • the reference offset time of the audio data may also be determined according to the type of the audio data, that is, optionally, in some embodiments, the step of "acquiring the reference offset time corresponding to the audio data" may specifically include :
  • mapping relationship set includes a mapping relationship between a preset audio data type and a preset reference offset time
  • mapping relationship set can be determined according to the relationship between the type of historical audio data and the offset time in the past, for example, according to the statistics of the type of historical audio data and the offset time, comprehensively determine the reference offset corresponding to the data type of the audio data shift time.
  • the decoding reference time before the audio data decoding process and the reference playback time after the decoding process are on the same timeline, that is, the change of the reference playback time will bring about the change of the reference playback time, so the decoding of the start
  • the adjustment of the decoding reference time at the start of processing is equivalent to the adjustment of the reference playback time after decoding processing.
  • FIG. 3 is a schematic flow diagram of reference playback time adjustment in the embodiment of the present application.
  • the reference time for starting decoding when the audio data starts to be processed can be adjusted.
  • the final reference playback time after audio data processing is also changed and adjusted accordingly, which is equivalent to updating and adjusting the final reference playback time after starting to decode the reference time adjustment, as follows:
  • 111 Obtain the audio data set, that is, the audio data packet (TLV stream);
  • the hardware device playing audio data can obtain a reference play time that is less than or equal to the expected play time, that is, after the reference time to start decoding is adjusted, in The reference playback time obtained by the hardware device after decoding is the adjusted reference playback time.
  • the sum of the start decoding reference time of the audio data and the actual decoding processing time is the reference time after the decoding of the audio data. Due to referring to the offset time of the historical audio data, the start reference time of the current audio data is adjusted to make the audio data The reference playing time after the data is decoded is less than or equal to the expected playing time of the audio data.
  • the reference playing time of the audio data may be determined according to the time information before the audio data decoding processing and the time information after the decoding processing, that is, optionally, in some embodiments, the step "according to the start decoding and adjusting the time and the The actual decoding processing time determines the reference playing time of the audio data", which may specifically include:
  • a reference playback time of the audio data is determined according to the basic reference playback time and the end decoding time.
  • the difference between the start decoding adjustment time and the start decoding time can obtain the basic reference playback time of the audio data, and the sum of the basic reference playback time and the end decoding time can reach the reference playback time of the audio data, that is, the reference playback time and the start time
  • the difference in decoding adjustment time is the difference between the end decoding time and the start decoding time.
  • the reference playing time is acquired by the basic reference playing time, so that the adjustment of the reference offset time can be adjusted when the decoding of the audio data starts, that is, the reference time of starting decoding of the audio data is adjusted.
  • the adjusted decoding start adjustment time can synchronously act on the final reference playback time.
  • the reference playback time is the reference playback time of the audio data, and when the reference playback time reaches the desired playback time, the audio data can be played;
  • the reference playback time of the current audio data can be inferred according to the offset time of the historical audio data
  • the reference playback time is called back according to the reference offset time, so that the reference playback time is not kept within the time of the reference clock Sync, but adjust to a time that is less than or equal to the desired playback time.
  • the audio data can be played, wherein, since the audio data is decoded at the millisecond level, so The time difference between the adjusted reference playback time and the expected playback time should also be at the millisecond level.
  • the difference between the reference playing time corresponding to each audio data after adjustment is also relatively fixed, and can still be Realize continuous playback of audio.
  • Obtain the audio data set that is, the audio data packet (TLV stream)
  • step 122 Obtain the timestamp of the expected playback time of each frame of audio data from the audio data set, and check the timestamp of the expected playback time to judge the validity of the timestamp data. If it is valid, enter step 123; otherwise, continue to step 122. 122;
  • step 123 Record the start decoding time of audio data decoding, and check the timestamp of the start decoding time to judge the validity of the timestamp data. If it is valid, enter step 124, otherwise, continue to step 123;
  • step 127 Determine the error offset time of the reference playback time according to the reference offset time and the actual offset time, and continue to adjust the basic reference playback time according to the error offset time on the basis of adjusting the reference playback time (essentially or adjust the reference time for starting decoding), obtain the basic reference playback adjustment time, and check the validity of the basic reference playback adjustment time, if invalid, proceed to step 127, and if valid, proceed to step 128;
  • the adjustment process first adjust the reference time for starting decoding according to the reference offset time, and then determine the adjusted error offset time according to the actual decoding processing time; then, continue to adjust according to the error offset time,
  • the accuracy of adjusting the reference time to start decoding can be improved, that is, the accuracy of the final reference playback time of audio data can be improved.
  • the reference playback time changes with time, and after the change reaches the desired playback time, the audio data is played, that is, when the reference playback time of the audio data meets the desired playback time After the time, the audio data is played synchronously; the reference playback time is reduced according to the reduction of the reference time for decoding, and the actual decoding processing time of the audio data is not affected or limited. Therefore, this kind of audio data
  • the corresponding reference playback time reduction method provides enough decoding time for the decoding process of audio data, and avoids audio and picture asynchrony, frame loss, or freezes in audio data playback due to too long decoding processing time. Phenomenon.
  • the present application also provides an audio playing device based on the above audio playing method.
  • the meanings of the nouns are the same as those in the above audio playing method, and for specific implementation details, please refer to the description in the method embodiments.
  • FIG. 5 is a schematic structural diagram of an audio playback device provided by the present application, wherein the audio playback device may include a decoding module 201, a recording module 202, an acquisition module 203, an adjustment module 204, a determination module 205, a timing module 206 and Play module 207, specifically can be as follows:
  • the decoding module 201 is configured to decode an audio data set to be played on a terminal device, where the audio data set includes at least one frame of audio data.
  • the audio data received by the terminal device to be played is often coded and compressed data.
  • the transmitted data packet TLV is the ISDBS3 standard data packet
  • the TLV packet corresponding to the 4K ultra-high-definition program is generally
  • the data volume of the program content is very large. Therefore, in order to improve the transmission efficiency, it is generally necessary to encode and compress the audio data.
  • the audio data received by the terminal device is compressed data that needs to be decoded. The terminal device can only decode the audio data after decoding the audio data. Play audio data.
  • the recording module 202 is configured to record the decoding reference time and the actual decoding processing time of the audio data decoding processing of each frame.
  • the decoding start reference time is synchronized with the reference clock on the terminal device, that is, when the audio data starts to be decoded, the time of the reference clock is the audio data decoding start reference time;
  • the actual decoding processing time of the audio data is the actual time used in the audio data decoding process.
  • the recording module 202 is specifically used to:
  • It is used for determining the actual decoding processing time of the audio data according to the decoding start time and the decoding end time.
  • this A timing device based on the beating of the crystal oscillator is applied to realize the timing of the actual decoding time of the audio data, and the timing processing using the beating feedback of the crystal oscillator is more accurate.
  • An acquisition module 203 configured to acquire a reference offset time and an expected playback time corresponding to the audio data
  • Adjustment that is, adjusting the data of the reference playback time referenced by the audio data playback, rather than adjusting the data corresponding to the reference clock, that is, not adjusting the display time on the terminal device;
  • the reference offset time can be determined according to the difference between the reference play time and the expected play time of the audio data, and the reference play time is rolled back to the above difference, so that the adjusted reference play time is less than or equal to the expected play time.
  • the adjustment of the reference time is also a millisecond difference that is difficult for the human body to perceive.
  • the original reference playback time of audio data is 7:0500ms, that is, the reference clock
  • the display time of the clock is 7:00
  • the reference offset time is 200ms. Therefore, the adjusted reference playback time is 7:0300ms.
  • the display time of the reference clock is still 7:00, and the millisecond level of 200ms Adjustment is difficult for users to perceive, but the time of 200ms is difficult to ignore for audio decoding.
  • the method of shifting time adjusts the reference playback time so that the audio data can be played, and provides enough time for audio data decoding, reducing the performance requirements for hardware products, and it is also difficult for users to perceive this part of the time difference.
  • the audio data includes current audio data
  • the obtaining module 203 includes:
  • a sampling unit configured to sample at least one frame of historical audio data, where the historical audio data is of the same data type as the current audio data;
  • the first acquisition unit is used to respectively acquire the historical reference playback time and the historical expected playback time after decoding the historical audio data of each frame;
  • a first determining unit configured to respectively determine the offset time of each frame of the historical audio data according to the historical reference playing time and the historical expected playing time;
  • the second determining unit is configured to determine a reference offset time of the current audio data according to at least one of the offset times.
  • the reference offset time that the reference playback time of the current audio data should be adjusted can be inferred, because the sampling is the same historical audio data type as the current audio data Therefore, the acquisition of the reference offset time is more accurate.
  • the second determining unit includes:
  • a first determining subunit configured to determine an average value of at least one offset time to obtain an average offset time
  • the second determining subunit is configured to determine the reference offset time of the current audio data according to the average offset time.
  • the average value indicates the overall offset of the historical audio data of the same data type as the current audio data, and the overall offset can reflect the range to be adjusted for the reference playback time of the current audio data. Therefore, the historical audio data
  • the average offset time is used as the reference offset time of the current audio data, which has certain accuracy and reference value.
  • the second determination unit is specifically further configured to:
  • the second determination unit is specifically further configured to:
  • the sampling unit is also specifically used for:
  • the historical audio data Used to acquire historical audio data according to a preset frequency, the historical audio data including at least one frame;
  • the acquiring module 203 is specifically used to:
  • the acquiring module 203 is specifically further configured to:
  • the mapping relationship set includes a mapping relationship between a preset audio data type and a preset reference offset time
  • the method is used to acquire the reference offset time corresponding to the audio data according to the mapping relationship set and the audio data type.
  • the adjustment module 204 is configured to adjust the decoding start reference time according to the reference offset time for each frame of audio data to obtain the decoding start adjustment time.
  • the adjustment of the start decoding reference time can be adjusted according to the reference offset time, and can also be adjusted according to the actual offset time, or on the basis of the adjustment of the reference offset time, the error offset time can be adjusted to ensure the reference playback Accuracy of time adjustments.
  • the reference offset time includes an actual offset time
  • the adjustment module 204 includes:
  • a second acquiring unit configured to acquire the reserved processing time of the audio data
  • a third determining unit configured to determine the actual offset time of the audio data according to the reserved processing time and the actual decoding processing time
  • the third obtaining unit is configured to adjust the decoding start reference time according to the actual offset time to obtain the decoding start adjustment time.
  • the second acquiring unit includes:
  • the third determining subunit is configured to determine the reserved processing time of the audio data according to the reference time of starting decoding of the audio data and the expected playback time.
  • the second acquiring unit is specifically further configured to:
  • a determining module 205 configured to determine a reference playback time of the audio data according to the start decoding adjustment time and the actual decoding processing time;
  • the determination module 205 is specifically used to:
  • It is used for determining the reference playing time of the audio data according to the basic reference playing time and the end decoding time.
  • a timing module 206 configured to update the reference playing time according to time changes
  • the playing module 207 is configured to play the audio data according to the terminal device when the adjusted reference playing time reaches a desired playing time.
  • the audio data acquired by the terminal device is firstly decoded by the decoding module 201.
  • the recording module 202 records the decoding reference playback time before the audio data decoding process and the actual decoding processing time of the decoding process.
  • the expected playing time of each frame of audio data and the corresponding reference offset time of each frame of audio data are extracted from the audio data by the acquisition module 203, and then the adjustment module 204 adjusts the reference playback time for starting decoding according to the reference offset time ( turn down), so that the start decoding reference play time is no longer synchronized with the time of the reference clock, and then, the determination module 204 determines the reference play time after the decoding process of the audio data according to the start decoding adjustment time and the actual decoding processing time (that is, the reference The playback time is determined according to the start decoding adjustment time and the actual decoding processing time, rather than being synchronized with the time of the reference clock), at the same time, the timing module 206 re-times the adjusted reference playback time, when the re-timed reference playback After the current time corresponding to the time is equal to the expected playback time of the audio data, the corresponding audio data is played by the playback module 207; in the embodiment of the present application, the reference playback time is changed with
  • this method of reducing the reference playback time corresponding to the audio data provides sufficient decoding time for the decoding processing of the audio data , to avoid audio and video out-of-sync, frame loss, or stuttering in the playback of audio data due to the long decoding processing time.
  • FIG. 6 shows a schematic structural diagram of the electronic device involved in the present application, specifically:
  • the electronic device may include a processor 401 of one or more processing cores, a memory 402 of one or more computer-readable storage media, a power supply 403, an input unit 404 and other components.
  • a processor 401 of one or more processing cores may include a processor 401 of one or more processing cores, a memory 402 of one or more computer-readable storage media, a power supply 403, an input unit 404 and other components.
  • FIG. 6 does not constitute a limitation on the electronic device, and may include more or less components than shown in the figure, or combine some components, or arrange different components. in:
  • the processor 401 is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device, by running or executing software programs and/or modules stored in the memory 402, and calling the Data, perform various functions of electronic equipment and process data, so as to monitor electronic equipment as a whole.
  • the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes operating systems, user interfaces, and application programs, etc. , the modem processor mainly handles wireless communications. It can be understood that the foregoing modem processor may not be integrated into the processor 401 .
  • the memory 402 can be used to store software programs and modules, and the processor 401 executes various functional applications and decoding processing by running the software programs and modules stored in the memory 402 .
  • the memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program (such as a sound playback function, an image playback function, etc.) required by at least one function; Data created by the use of electronic devices, etc.
  • the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices.
  • the memory 402 may further include a memory controller to provide the processor 401 with access to the memory 402 .
  • the electronic device also includes a power supply 403 for supplying power to various components.
  • the power supply 403 can be logically connected to the processor 401 through a power management system, so that functions such as charging, discharging, and power consumption management can be implemented through the power management system.
  • the power supply 403 may also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.
  • the electronic device can also include an input unit 404, which can be used to receive input numbers or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
  • an input unit 404 which can be used to receive input numbers or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
  • the electronic device may also include a display unit, etc., which will not be repeated here.
  • the processor 401 in the electronic device loads the executable file corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 401 runs the executable file stored in the The application program in memory 402, thereby realizes various functions, as follows:
  • the audio data set includes at least one frame of audio data; record the start decoding reference time and actual decoding processing time of each frame of the audio data decoding process; obtain the audio The reference offset time and expected playback time corresponding to the data; for each frame of audio data, adjust the reference time to start decoding according to the reference offset time to obtain the adjustment time to start decoding; adjust the time according to the start decoding and The actual decoding processing time determines the reference playback time of the audio data; the reference playback time is updated according to time changes; when the adjusted reference playback time reaches the expected playback time, according to the terminal device Play the above audio data.
  • the reference playback time of the audio data By reducing the reference playback time of the audio data, the reference playback time changes with time, and after the change reaches the expected playback time, the audio data is played, that is, when the reference playback time of the audio data meets the expected playback time, the The audio data is played synchronously; the reference playback time is reduced according to the reduction of the decoding reference time, and the actual decoding processing time of the audio data is not affected or limited. Therefore, this kind of audio data corresponds to the reference
  • the method of reducing the playback time provides enough decoding time for the decoding process of the audio data, and avoids audio and picture asynchrony, frame loss or freezes in the playback of audio data due to too long decoding processing time.
  • the present application provides a storage medium in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any audio playback method provided in the present application.
  • the command can perform the following steps:
  • the audio data set includes at least one frame of audio data; record the start decoding reference time and actual decoding processing time of each frame of the audio data decoding process; obtain the audio The reference offset time and expected playback time corresponding to the data; for each frame of audio data, adjust the reference time to start decoding according to the reference offset time to obtain the adjustment time to start decoding; adjust the time according to the start decoding and The actual decoding processing time determines the reference playback time of the audio data; the reference playback time is updated according to time changes; when the adjusted reference playback time reaches the expected playback time, according to the terminal device Play the above audio data.
  • the storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or CD, etc.

Abstract

Disclosed in embodiments of the present application are a method for playing audio, an apparatus, an electronic device, and a storage medium. An embodiment comprises: decoding an audio dataset to be played on a terminal device, the audio dataset comprising at least one frame of audio data; recording a start decoding reference time and actual decoding time for decoding each frame of audio data; obtaining an expected play time and a benchmark offset time corresponding to audio data; adjusting the start decoding reference time for each frame of audio data according to the benchmark offset time, and obtaining a start decoding adjusted time; determining a reference play time of audio data according to the start decoding adjusted time and the actual decoding time; adjusting the reference play time according to a time change; and playing audio data according to the terminal device once the adjusted reference play time reaches the expected play time. The adjusted audio play time of the audio data is made to be less than or equal to the expected play time, and audio data is made to be able to play synchronously.

Description

音频播放方法、装置、电子设备及存储介质Audio playback method, device, electronic device and storage medium 技术领域technical field
本申请涉及显示控制技术领域,具体涉及一种音频播放方法、装置、电子设备及存储介质。The present application relates to the technical field of display control, in particular to an audio playback method, device, electronic equipment and storage medium.
背景技术Background technique
随着音频播放技术的快速发展,音频播放器的种类越来越多,而音频同步是音频播放的重要基础,为了保证音频同步播放,音频服务器在发送音频数据之前需要先校准与其连接的音频播放器中的系统参考时间;With the rapid development of audio playback technology, there are more and more types of audio players, and audio synchronization is an important basis for audio playback. In order to ensure audio synchronization playback, the audio server needs to calibrate the audio player connected to it before sending audio data. The system reference time in the device;
但是,音频播放器在接收到音频数据后,需要对音频数据进行解码等后端数据处理,所以,在播放音频数据之前需要为音频数据的处理预留一定的解码时间。However, after the audio player receives the audio data, it needs to perform back-end data processing such as decoding on the audio data. Therefore, a certain decoding time needs to be reserved for the processing of the audio data before playing the audio data.
技术问题technical problem
不同音频数据的后端解码处理时间难以统一和确定,并且,部分音频数据的数据量庞大,解码处理的时间较长,而解码处理的速率对产品硬件的要求较高,因此,在硬件性能达到瓶颈后,音频期望播放时间无法准确的与音频播放器所在设备终端的参考时间保持同步,音频播放容易出现音画不同步、丢帧或者卡顿等现象。It is difficult to unify and determine the back-end decoding processing time of different audio data, and the data volume of some audio data is huge, and the decoding processing time is relatively long, and the decoding processing rate has high requirements on the product hardware. Therefore, when the hardware performance reaches After the bottleneck, the expected playback time of the audio cannot be accurately synchronized with the reference time of the device terminal where the audio player is located, and audio playback is prone to out-of-sync audio and picture, frame loss, or freezing.
技术解决方案technical solution
本申请实施例提供一种音频播放方法、装置、电子设备及存储介质,可以增大为后端解码处理预留的时间,实现音频播放的同步。Embodiments of the present application provide an audio playback method, device, electronic equipment, and storage medium, which can increase the time reserved for back-end decoding processing and realize synchronization of audio playback.
本申请实施例提供了一种音频播放方法,包括:The embodiment of the present application provides an audio playback method, including:
对终端设备上待播放的音频数据集进行解码处理,所述音频数据集包括至少一帧音频数据;Decoding the audio data set to be played on the terminal device, the audio data set includes at least one frame of audio data;
记录每帧所述音频数据解码处理的开始解码参考时间和实际解码处理时间;Record the start decoding reference time and the actual decoding processing time of the audio data decoding processing of each frame;
获取所述音频数据所对应的基准偏移时间和期望播放时间;Acquiring the reference offset time and expected playing time corresponding to the audio data;
针对每帧音频数据,根据所述基准偏移时间对所述开始解码参考时间进行调整,得到开始解码调整时间;For each frame of audio data, adjust the decoding start reference time according to the reference offset time to obtain the decoding start adjustment time;
根据所述开始解码调整时间和所述实际解码处理时间确定所述音频数据的参考播放时间;determining a reference playback time of the audio data according to the start decoding adjustment time and the actual decoding processing time;
根据时间变化对所述参考播放时间进行更新;updating the reference playing time according to the time change;
当所述调整后的参考播放时间达到期望播放时间后,根据所述终端设备对所述音频数据进行播放。When the adjusted reference playing time reaches a desired playing time, the audio data is played according to the terminal device.
相应的,本申请实施例还提供了一种音频播放装置,包括:Correspondingly, the embodiment of the present application also provides an audio playback device, including:
解码模块,用于对终端设备上待播放的音频数据集进行解码处理,所述音频数据集包括至少一帧音频数据;A decoding module, configured to decode an audio data set to be played on the terminal device, where the audio data set includes at least one frame of audio data;
记录模块,用于记录每帧所述音频数据解码处理的开始解码参考时间和实际解码处理时间;A recording module, configured to record the start decoding reference time and the actual decoding processing time of the audio data decoding process of each frame;
获取模块,用于获取所述音频数据所对应的基准偏移时间和期望播放时间;An acquisition module, configured to acquire a reference offset time and an expected playback time corresponding to the audio data;
调整模块,用于针对每帧音频数据,根据所述基准偏移时间对所述开始解码参考时间进行调整,得到开始解码调整时间;An adjustment module, configured to adjust the decoding start reference time according to the reference offset time for each frame of audio data, to obtain the decoding start adjustment time;
确定模块,用于根据所述开始解码调整时间和所述实际解码处理时间确定所述音频数据的参考播放时间;A determination module, configured to determine a reference playback time of the audio data according to the start decoding adjustment time and the actual decoding processing time;
计时模块,用于根据时间变化对所述参考播放时间进行更新;A timing module, configured to update the reference playing time according to time changes;
播放模块,用于当所述调整后的参考播放时间达到期望播放时间后,根据所述终端设备对所述音频数据进行播放。A playing module, configured to play the audio data according to the terminal device when the adjusted reference playing time reaches a desired playing time.
可选的,在本申请的一些实施例中,所述音频数据包括当前音频数据,所述获取模块包括:Optionally, in some embodiments of the present application, the audio data includes current audio data, and the obtaining module includes:
采样单元,用于对至少一帧历史音频数据进行采样,所述历史音频数据与所述当前音频数据的数据类型相同;a sampling unit, configured to sample at least one frame of historical audio data, where the historical audio data is of the same data type as the current audio data;
第一获取单元,用于分别获取每帧所述历史音频数据解码处理后的历史参考播放时间和历史期望播放时间;The first acquisition unit is used to respectively acquire the historical reference playback time and the historical expected playback time after decoding the historical audio data of each frame;
第一确定单元,用于根据所述历史参考播放时间和所述历史期望播放时间,分别确定每帧所述历史音频数据的偏移时间;A first determining unit, configured to respectively determine the offset time of each frame of the historical audio data according to the historical reference playing time and the historical expected playing time;
第二确定单元,用于根据至少一个所述偏移时间,确定所述当前音频数据的基准偏移时间。The second determining unit is configured to determine a reference offset time of the current audio data according to at least one of the offset times.
可选的,在本申请的一些实施例中,第二确定单元包括:Optionally, in some embodiments of the present application, the second determining unit includes:
第一确定子单元,用于确定至少一个所述偏移时间的平均值,得到平均偏移时间;A first determining subunit, configured to determine an average value of at least one offset time to obtain an average offset time;
第二确定子单元,用于根据所述平均偏移时间确定所述当前音频数据的基准偏移时间。The second determining subunit is configured to determine the reference offset time of the current audio data according to the average offset time.
可选的,在本申请的一些实施例中,第二确定单元具体还用于:Optionally, in some embodiments of the present application, the second determination unit is specifically further configured to:
用于确定至少一个所述偏移时间的平均值,得到平均偏移时间;For determining an average value of at least one of the offset times to obtain an average offset time;
用于对所述平均偏移时间进行取整,得到所述历史音频数据所对应的平均整数偏移时间;It is used to round the average offset time to obtain the average integer offset time corresponding to the historical audio data;
用于将所述平均整数偏移时间确定为所述当前音频数据的基准偏移时间。and determining the average integer offset time as a reference offset time of the current audio data.
可选的,在本申请的一些实施例中,第二确定单元具体还用于:Optionally, in some embodiments of the present application, the second determination unit is specifically further configured to:
用于分别对所述至少一个偏移时间进行取整,得到至少一个整数偏移时间;for rounding the at least one offset time respectively to obtain at least one integer offset time;
用于根据所述至少一个整数偏移时间,确定所述每帧音频数据的整数平均偏移时间;For determining the integer average offset time of each frame of audio data according to the at least one integer offset time;
用于将所述整数平均偏移时间确定为所述当前音频数据的基准偏移时间。used to determine the integer average offset time as a reference offset time of the current audio data.
可选的,在本申请的一些实施例中,采样单元具体还用于:Optionally, in some embodiments of the present application, the sampling unit is also specifically used for:
用于根据预设频率获取历史音频数据,所述历史音频数据包括至少一帧;Used to acquire historical audio data according to a preset frequency, the historical audio data including at least one frame;
用于对所述至少一帧历史音频数据进行采样。It is used for sampling the at least one frame of historical audio data.
可选的,在本申请的一些实施例中,所述基准偏移时间包括实际偏移时间,所述调整模块包括:Optionally, in some embodiments of the present application, the reference offset time includes an actual offset time, and the adjustment module includes:
第二获取单元,用于获取所述音频数据的预留处理时间;a second acquiring unit, configured to acquire the reserved processing time of the audio data;
第三确定单元,用于根据所述预留处理时间和所述实际解码处理时间,确定所述音频数据的实际偏移时间;A third determining unit, configured to determine the actual offset time of the audio data according to the reserved processing time and the actual decoding processing time;
第三获取单元,用于根据所述实际偏移时间对所述开始解码参考时间进行调整,得到开始解码调整时间。The third obtaining unit is configured to adjust the decoding start reference time according to the actual offset time to obtain the decoding start adjustment time.
可选的,在本申请的一些实施例中,所述第二获取单元包括:Optionally, in some embodiments of the present application, the second acquiring unit includes:
第三确定子单元,用于根据所述音频数据的开始解码参考时间和所述期望播放时间,确定所述音频数据的预留处理时间。The third determining subunit is configured to determine the reserved processing time of the audio data according to the reference time of starting decoding of the audio data and the expected playing time.
可选的,在本申请的一些实施例中,所述第二获取单元具体还用于:Optionally, in some embodiments of the present application, the second acquiring unit is specifically further configured to:
用于获取所述音频数据的预留处理时间;A reserved processing time for obtaining said audio data;
用于根据所述预留处理时间和所述实际解码处理时间,确定所述音频数据的实际偏移时间;For determining the actual offset time of the audio data according to the reserved processing time and the actual decoding processing time;
用于根据所述基准偏移时间和所述实际偏移时间,确定所述音频数据的误差偏移时间;for determining an error offset time of the audio data according to the reference offset time and the actual offset time;
用于根据所述基准偏移时间和所述误差偏移时间对所述开始解码参考时间进行调整,得到开始解码调整时间。It is used to adjust the decoding start reference time according to the reference offset time and the error offset time to obtain the decoding start adjustment time.
可选的,在本申请的一些实施例中,记录模块具体用于:Optionally, in some embodiments of the present application, the recording module is specifically used to:
用于根据晶振跳动做计时反馈,分别获取所述音频数据的开始解码时间和结束解码时间;It is used to do timing feedback according to the beating of the crystal oscillator, and obtain the start decoding time and the end decoding time of the audio data respectively;
用于根据所述开始解码时间和所述结束解码时间,确定所述音频数据的实际解码处理时间。It is used for determining the actual decoding processing time of the audio data according to the decoding start time and the decoding end time.
可选的,在本申请的一些实施例中,确定模块具体用于:Optionally, in some embodiments of the present application, the determination module is specifically used to:
用于获取所述音频数据解码处理的开始解码时间和结束解码时间;used to obtain the start decoding time and the end decoding time of the audio data decoding process;
用于根据所述开始解码调整时间和所述开始解码时间,确定所述音频数据的基础参考播放时间;It is used to determine the basic reference playback time of the audio data according to the decoding start adjustment time and the decoding start time;
用于根据所述基础参考播放时间和所述结束解码时间,确定所述音频数据的参考播放时间。It is used for determining the reference playing time of the audio data according to the basic reference playing time and the end decoding time.
可选的,在本申请的一些实施例中,获取模块具体用于:Optionally, in some embodiments of the present application, the acquisition module is specifically used to:
用于直接从所述音频数据中提取所述音频数据的期望播放时间。for extracting the desired play time of the audio data directly from the audio data.
可选的,在本申请的一些实施例中,获取模块具体还用于:Optionally, in some embodiments of the present application, the obtaining module is also specifically used to:
用于识别所述音频数据的音频数据类型;an audio data type for identifying said audio data;
用于获取映射关系集合,所述映射关系集合包括预设音频数据类型与预设基准偏移时间的映射关系;It is used to obtain a mapping relationship set, the mapping relationship set includes a mapping relationship between a preset audio data type and a preset reference offset time;
用于根据所述映射关系集合和所述音频数据类型,获取所述音频数据所对应的基准偏移时间。The method is used to acquire the reference offset time corresponding to the audio data according to the mapping relationship set and the audio data type.
有益效果Beneficial effect
本申请实施例通过将音频数据的参考播放时间调小,使参考播放时间随着时间变化,且变化后达到期望播放时间后,对音频数据进行播放,即当音频数据的参考播放时间满足期望播放时间后,对音频数据实现同步播放;其中,参考播放时间是根据开始解码参考时间的调小而调小的,而音频数据的实际解码处理时间不受影响或限制,因此,该种将音频数据所对应的参考播放时间调小的方式,为音频数据的解码处理提供了足够的解码时长,避免因为解码处理时间过长,而使音频数据的播放出现音画不同步、丢帧或者卡顿等现象。In the embodiment of the present application, by reducing the reference playback time of audio data, the reference playback time changes with time, and after the change reaches the desired playback time, the audio data is played, that is, when the reference playback time of the audio data meets the desired playback time After the time, the audio data is played synchronously; the reference playback time is reduced according to the reduction of the reference time for decoding, and the actual decoding processing time of the audio data is not affected or limited. Therefore, this kind of audio data The corresponding reference playback time reduction method provides enough decoding time for the decoding process of audio data, and avoids audio and picture asynchrony, frame loss, or freezes in audio data playback due to too long decoding processing time. Phenomenon.
附图说明Description of drawings
下面结合附图,通过对本申请的具体实施方式详细描述,将使本申请的技术方案及其有益效果显而易见。The technical solutions and beneficial effects of the present application will be apparent through the detailed description of the specific embodiments of the present application below in conjunction with the accompanying drawings.
图1是本申请提供的音频播放方法的场景示意图;FIG. 1 is a schematic diagram of a scene of an audio playback method provided by the present application;
图2是本申请提供的音频播放方法的流程示意图;Fig. 2 is a schematic flow chart of the audio playing method provided by the present application;
图3是本申请提供的音频播放方法的另一种流程示意图;Fig. 3 is another schematic flow chart of the audio playing method provided by the present application;
图4是本申请提供的音频播放方法的再一种流程示意图;Fig. 4 is another schematic flow chart of the audio playback method provided by the present application;
图5是本申请提供的音频播放装置的结构示意图。FIG. 5 is a schematic structural diagram of an audio playback device provided by the present application.
图6是本申请提供的电子设备的结构示意图。FIG. 6 is a schematic structural diagram of an electronic device provided by the present application.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional features and advantages of the present application will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
本发明的实施方式Embodiments of the present invention
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional features and advantages of the present application will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。It should be understood that the specific embodiments described here are only used to explain the present application, and are not intended to limit the present application.
本申请实施例提供一种音频播放方法、装置、电子设备及存储介质。具体地,本申请实施例提供的音频播放方法可以由电子设备来执行,其中,电子设备包括终端设备或者服务器;其中,终端设备可以为电视、手机、笔记本、台式机或者平板电脑等;服务器可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、内容分发网络(CDN,ContentDelivery Network)、以及大数据和人工智能平台等基础云计算服务的云服务器等,服务器可以通过有线或无线通信方式进行直接或间接地连接。Embodiments of the present application provide an audio playback method, device, electronic equipment, and storage medium. Specifically, the audio playback method provided by the embodiment of the present application can be performed by an electronic device, where the electronic device includes a terminal device or a server; where the terminal device can be a TV, a mobile phone, a notebook, a desktop or a tablet computer, etc.; the server can be It is an independent physical server, or it can be a server cluster or distributed system composed of multiple physical servers, and it can also provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, and middleware services , domain name service, security service, content delivery network (CDN, ContentDelivery Network), and cloud servers for basic cloud computing services such as big data and artificial intelligence platforms, etc. The servers can be directly or indirectly connected through wired or wireless communication.
具体地,本申请实施例以终端设备和服务器共同执行音频播放方法为例,其中,终端设备和服务器之间可以通过有线网络、无线网络或者广播的形式进行数据传输,其中,在终端和服务器的基础上也可以增加其他设备来辅助完成音频播放方法,在此对其他设备的类型不做限定;其中,终端设备和服务器共同执行音频播放方法的具体过程如下:Specifically, in this embodiment of the present application, the terminal device and the server jointly execute the audio playback method as an example, wherein data transmission can be performed between the terminal device and the server through a wired network, a wireless network, or broadcasting, wherein, between the terminal device and the server Basically, other devices can also be added to assist in completing the audio playback method, and the types of other devices are not limited here; wherein, the specific process of the terminal device and the server jointly executing the audio playback method is as follows:
终端设备从服务器接收到待播放的音频数据集(音频数据包),随后,由终端设备中的处理器对接收到的音频数据集进行解码处理,并且,记录每帧音频数据开始解码处理的开始解码参考时间,以及每帧音频数据的实际解码处理时间,另外,终端设备还从音频数据中获取到每帧音频数据的基准偏移时间和期望播放时间,随后,针对每帧音频数据,根据基准偏移时间对开始解码参考时间进行调整,得到开始解码调整时间,然后,根据开始解码调整时间和实际解码处理时间确定音频数据解码处理完的参考播放时间,最后,在参考播放时间随着时间进行计时变化后,且当参考播放时间等于期望播放时间后,由终端设备对音频数据进行播放;其中,如果终端设备是电视,则不需要使用额外的音频播放器,可直接对音频数据进行播放。The terminal device receives the audio data set (audio data packet) to be played from the server, and then the processor in the terminal device decodes the received audio data set, and records each frame of audio data to start the decoding process The decoding reference time and the actual decoding processing time of each frame of audio data. In addition, the terminal device also obtains the reference offset time and expected playback time of each frame of audio data from the audio data. Then, for each frame of audio data, according to the reference The offset time adjusts the start decoding reference time to obtain the start decoding adjustment time, and then, according to the start decoding adjustment time and the actual decoding processing time, determine the reference playback time after the audio data decoding process is completed, and finally, at the reference playback time. After the timing changes, and when the reference playing time is equal to the expected playing time, the terminal device plays the audio data; wherein, if the terminal device is a TV, the audio data can be played directly without using an additional audio player.
其中,音频数据的参考时间(如开始解码参考时间)是与终端设备上的参考时钟保持同步的,参考时钟是根据网络时间协议(NTP,Network Time Protocol)与准确时间保持协调同步的,其中,准确时间的来源是国际标准时间(UTC, Universal Time Coordinated),例如,终端设备上参考时钟显示的北京时间,当终端设备开始对音频数据进行解码的时间为北京时间为6点时,则开始解码参考时间也为6点;Among them, the reference time of the audio data (such as the reference time of starting decoding) is synchronized with the reference clock on the terminal device, and the reference clock is coordinated and synchronized with the accurate time according to the Network Time Protocol (NTP, Network Time Protocol). Among them, The source of accurate time is Coordinated Universal Time (UTC, Universal Time Coordinated), for example, the Beijing time displayed by the reference clock on the terminal device, when the terminal device starts decoding audio data at 6:00 Beijing time, the reference time to start decoding is also 6:00;
而参考播放时间是音频数据解码后可以进行播放的时间,理论上该参考播放时间也是与北京时间保持同步的,即音频数据解码后的北京时间即为音频数据的参考播放时间,但是,参考时钟的计时是根据数据传输后更新得到的,而数据的传输存在时间消耗,因此,参考时钟的计时存在时间误差,所以,本申请实施例根据开始解码参考时间和解码的实际解码处理时间来确定参考播放时间,其中,实际解码处理时间是根据晶振跳动的反馈做计时的,所以时间的记录是非常准确的,因此,便可以得到一个音频数据解码处理后的实际的参考播放时间,此时,得到的参考播放时间的时间戳便与参考时钟的时间戳不再同步,但参考播放时间的增长仍是按照时间(可以为北京时间)增长的,例如,当音频数据解码处理后的参考播放时间为8点整时,则此时北京时间可以为八点零一分,即参考播放时间与北京时间的时间戳不再相同;The reference playback time is the time when the audio data can be played after decoding. Theoretically, the reference playback time is also synchronized with the Beijing time, that is, the Beijing time after the audio data is decoded is the reference playback time of the audio data. However, the reference clock The timing of the clock is updated according to the data transmission, and there is time consumption in the transmission of data, so there is a time error in the timing of the reference clock. Therefore, in the embodiment of the present application, the reference clock is determined based on the reference time of starting decoding and the actual decoding processing time of decoding. Playing time, wherein, the actual decoding processing time is timed according to the feedback of the crystal vibration, so the time record is very accurate, therefore, you can get an actual reference playing time after the audio data decoding processing, at this time, get The timestamp of the reference playback time is no longer synchronized with the timestamp of the reference clock, but the reference playback time still increases according to the time (which can be Beijing time). For example, when the audio data is decoded and processed, the reference playback time is At 8 o'clock, the Beijing time can be 8:01 at this time, that is, the time stamps of the reference broadcast time and Beijing time are no longer the same;
其中,当音频数据的参考播放时间等于期望播放时间后,便可以对音频数据进行播放,但音频数据的解码处理需要一定的时间,而音频数据解码后参考播放时间往往超过音频数据所对应的期望播放时间,因此,需要对音频数据解码处理后的参考播放时间进行回调,使其与期望播放时间同步或者在参考播放时间随时间增长后与期望播放时间同步,然后对音频数据进行播放。Among them, when the reference playback time of the audio data is equal to the expected playback time, the audio data can be played, but the decoding process of the audio data takes a certain amount of time, and the reference playback time of the audio data after decoding often exceeds the corresponding expectation of the audio data. Playing time, therefore, it is necessary to call back the reference playing time after audio data decoding to make it synchronized with the expected playing time or synchronize with the expected playing time after the reference playing time increases with time, and then play the audio data.
其中,网络时间协议(NTP,Network Time Protocol)是用来使计算机时间同步化的一种协议,它可以使计算机对其服务器或时钟源(如石英钟,GPS等等)做同步化,它可以提供高精准度的时间校正(LAN上与标准间差小于1毫秒,WAN上几十毫秒)。其中,NTP获得UTC的时间来源可以是原子钟、天文台、卫星,也可以从Internet上获取。Among them, Network Time Protocol (NTP, Network Time Protocol) is a protocol used to synchronize the computer time, it can make the computer synchronize its server or clock source (such as quartz clock, GPS, etc.), it can provide high-precision time correction (on LAN with The difference between the standard is less than 1 millisecond, tens of milliseconds on the WAN). Among them, NTP can obtain UTC time from atomic clocks, observatories, satellites, or from the Internet.
其中,期望播放时间是音频数据期望显示的时间,如显示时间标签(PTS,Presentation Time Stamp),当音频数据的期望播放时间与终端设备的参考播放时间同步时,音频数据才能进行播放,即音频数据的期望播放时间是与国际标准时间保持同步,当音频数据的期望播放时间晚于终端设备的参考播放时间时,则音频数据就不能进行准确播放,例如,出现音画不同、丢帧或者卡顿等现象。Among them, the expected playback time is the time when the audio data is expected to be displayed, such as the display time tag (PTS, Presentation Time Stamp). When the expected playback time of the audio data is synchronized with the reference playback time of the terminal device, the audio data can be played, that is, the audio The expected playback time of the data is synchronized with the international standard time. When the expected playback time of the audio data is later than the reference playback time of the terminal device, the audio data cannot be played accurately. Dun and so on.
本申请实施例通过将音频数据的参考播放时间调小,使参考播放时间随着时间变化,且变化后达到期望播放时间后,对音频数据进行播放,即当音频数据的参考播放时间满足期望播放时间后,对音频数据实现同步播放;其中,参考播放时间是根据开始解码参考时间的调小而调小的,而音频数据的实际解码处理时间不受影响或限制,因此,该种将音频数据所对应的参考播放时间调小的方式,为音频数据的解码处理提供了足够的解码时长,避免因为解码处理时间过长,而使音频数据的播放出现音画不同步、丢帧或者卡顿等现象。In the embodiment of the present application, by reducing the reference playback time of audio data, the reference playback time changes with time, and after the change reaches the desired playback time, the audio data is played, that is, when the reference playback time of the audio data meets the desired playback time After the time, the audio data is played synchronously; the reference playback time is reduced according to the reduction of the reference time for decoding, and the actual decoding processing time of the audio data is not affected or limited. Therefore, this kind of audio data The corresponding reference playback time reduction method provides enough decoding time for the decoding process of audio data, and avoids audio and picture asynchrony, frame loss, or freezes in audio data playback due to too long decoding processing time. Phenomenon.
以下分别进行详细说明。需说明的是,以下实施例的描述顺序不作为对实施例优先顺序的限定。Each will be described in detail below. It should be noted that the order of description of the following embodiments is not intended to limit the order of priority of the embodiments.
请参阅图2,图2为本申请实施例提供的音频播放方法的流程示意图。该音频播放方法的具体流程可以如下:Please refer to FIG. 2 . FIG. 2 is a schematic flowchart of an audio playback method provided by an embodiment of the present application. The specific process of the audio playback method can be as follows:
101、对终端设备上待播放的音频数据集进行解码处理,所述音频数据集包括至少一帧音频数据。101. Perform decoding processing on an audio data set to be played on a terminal device, where the audio data set includes at least one frame of audio data.
其中,终端设备接收到待播放的音频数据往往是经过编码压缩过的数据,例如,数字电视中,传输的数据包TLV是以ISDBS3标准的数据包,而4K超高清节目所对应的TLV包一般节目内容数据量非常大,因此,为提高传输效率,一般是需要对音频数据进行编码压缩,则终端设备接收到的音频数据则是需要解码的压缩数据,终端设备在对音频数据进行解码后才能进行音频数据的播放。Among them, the audio data received by the terminal device to be played is often coded and compressed data. For example, in digital TV, the transmitted data packet TLV is the ISDBS3 standard data packet, and the TLV packet corresponding to the 4K ultra-high-definition program is generally The data volume of the program content is very large. Therefore, in order to improve the transmission efficiency, it is generally necessary to encode and compress the audio data. The audio data received by the terminal device is compressed data that needs to be decoded. The terminal device can only decode the audio data after decoding the audio data. Play audio data.
102、记录每帧所述音频数据解码处理的开始解码参考时间和实际解码处理时间。102. Record the decoding reference time and actual decoding processing time of the audio data decoding processing of each frame.
其中,开始解码参考时间是与终端设备上参考时钟保持同步的,即音频数据开始进行解码处理时,参考时钟的时间即为音频数据的开始解码参考时间;Wherein, the decoding start reference time is synchronized with the reference clock on the terminal device, that is, when the audio data starts to be decoded, the time of the reference clock is the audio data decoding start reference time;
其中,音频数据的实际解码处理时间是音频数据解码过程所使用的实际时间。Wherein, the actual decoding processing time of the audio data is the actual time used in the audio data decoding process.
其中,音频数据的实际解码处理时间可根据硬件计时设备准确计时,即,可选的,在一些实施例中,步骤“记录每帧所述音频数据解码处理的实际解码处理时间”,具体可以包括:Wherein, the actual decoding processing time of the audio data can be accurately timed according to the hardware timing device, that is, optionally, in some embodiments, the step "recording the actual decoding processing time of the audio data decoding processing of each frame" may specifically include :
根据晶振跳动做计时反馈,分别获取所述音频数据的开始解码时间和结束解码时间;Timing feedback is performed according to the beating of the crystal oscillator, and the start decoding time and the end decoding time of the audio data are obtained respectively;
根据所述开始解码时间和所述结束解码时间,确定所述音频数据的实际解码处理时间。The actual decoding processing time of the audio data is determined according to the decoding start time and the decoding end time.
例如,可以由晶振反馈进行计时,如振荡器,终端设备开机时,从0点0分0秒开始计时,计时过程由27M晶振跳动做计时反馈,其中,利用振荡器进行计时较为精准。For example, timing can be performed by crystal oscillator feedback, such as an oscillator, when the terminal device is turned on, it starts timing from 0:00:00 seconds, and the timing process is fed back by the 27M crystal oscillator beating. Among them, using an oscillator for timing is more accurate.
其中,在音频数据开始解码时进行计时,获取到开始解码时间,在音频数据解码完成时,获取音频数据的结束解码时间,根据结束解码时间和开始解码时间的差值,便可获取到音频数据解码的实际解码处理时间。Among them, timing is performed when the audio data starts to be decoded, and the start decoding time is obtained. When the audio data decoding is completed, the end decoding time of the audio data is obtained, and the audio data can be obtained according to the difference between the end decoding time and the start decoding time. Actual decoding processing time for decoding.
103、获取所述音频数据所对应的基准偏移时间和期望播放时间。103. Acquire a reference offset time and an expected playback time corresponding to the audio data.
其中,当音频数据的参考播放时间大于期望播放时间后,音频数据便不能进行准确的播放,会出现音画不同步、丢着或者卡顿等现象,因此,需要对音频数据的参考播放时间进行调整,即调整音频数据播放所参考的参考播放时间的数据,而并非是调整参考时钟所对应的数据,即并未调整终端设备上的显示时间;Among them, when the reference playback time of the audio data is greater than the expected playback time, the audio data cannot be played accurately, and there will be phenomena such as out-of-sync, lost, or stuck audio and video. Therefore, it is necessary to adjust the reference playback time of the audio data. Adjustment, that is, adjusting the data of the reference playback time referenced by the audio data playback, rather than adjusting the data corresponding to the reference clock, that is, not adjusting the display time on the terminal device;
其中,基准偏移时间可以根据音频数据的参考播放时间和期望播放时间的差值来确定,将参考播放时间回退上述差值,使调整后的参考播放时间小于或者等于期望播放时间。Wherein, the reference offset time can be determined according to the difference between the reference play time and the expected play time of the audio data, and the reference play time is rolled back to the above difference, so that the adjusted reference play time is less than or equal to the expected play time.
其中,由于音频数据的解码时间是毫秒级别的,所以,对参考时间的调整也是人体难以感知的毫秒差异,例如,当音频数据的原参考播放时间为7点零500ms时,即终端设备参考时钟的显示时间是7点整,而基准偏移时间是200ms,因此,调整后的参考播放时间是7点零300ms,此时参考时钟的显示时间仍然是7点整,且200ms这种毫秒级别的调整,用户是难以感知到的,但200ms的时间对音频解码来说是难以忽略的,由于,当原参考播放时间超过期望播放时间后,音频数据便不能准确播放,所以可以通过调整那部分基准偏移时间的方式,对参考播放时间进行调整,使音频数据能够播放,且为音频数据解码提供了足够的时长,降低对硬件产品的性能要求,并且,用户也是难以感知这部分时间差异的。Among them, since the decoding time of audio data is at the millisecond level, the adjustment of the reference time is also a millisecond difference that is difficult for the human body to perceive. For example, when the original reference playback time of audio data is 7:0500ms, that is, the terminal device reference clock The display time of the clock is 7:00, and the reference offset time is 200ms. Therefore, the adjusted reference playback time is 7:0300ms. At this time, the display time of the reference clock is still 7:00, and the millisecond level of 200ms Adjustment is difficult for users to perceive, but the time of 200ms is difficult to ignore for audio decoding. Since, when the original reference playback time exceeds the expected playback time, the audio data cannot be played accurately, so you can adjust that part of the reference The method of shifting time adjusts the reference playback time so that the audio data can be played, and provides enough time for audio data decoding, reducing the performance requirements for hardware products, and it is also difficult for users to perceive this part of the time difference.
在本申请实施例中,当前音频数据的基准偏移时间可以根据以往历史数据的偏移情况来确定,即,可选的,在一些实施例中,步骤“获取所述音频数据所对应的基准偏移时间”,具体可以包括:In this embodiment of the present application, the reference offset time of the current audio data can be determined according to the offset of the historical data in the past, that is, optionally, in some embodiments, the step "acquire the reference offset time corresponding to the audio data Offset time", which can specifically include:
对至少一帧历史音频数据进行采样,所述历史音频数据与所述当前音频数据的数据类型相同;Sampling at least one frame of historical audio data, where the historical audio data is of the same data type as the current audio data;
分别获取每帧所述历史音频数据解码处理后的历史参考播放时间和历史期望播放时间;Respectively obtain the historical reference playback time and the historical expected playback time after the decoding of the historical audio data of each frame;
根据所述历史参考播放时间和所述历史期望播放时间,分别确定每帧所述历史音频数据的偏移时间;According to the historical reference playing time and the historical expected playing time, respectively determine the offset time of each frame of the historical audio data;
根据至少一个所述偏移时间,确定所述当前音频数据的基准偏移时间。A reference offset time of the current audio data is determined according to at least one of the offset times.
其中,根据同样数据类型的历史音频数据的偏移时间的获取,可推测出当前音频数据的参考播放时间应当调整的基准偏移时间,由于采样的是与当前音频数据的数据类型相同的历史音频数据,所以,基准偏移时间的获取较为准确。Among them, according to the acquisition of the offset time of the historical audio data of the same data type, the reference offset time that the reference playback time of the current audio data should be adjusted can be inferred, because the sampling is the same historical audio data type as the current audio data Therefore, the acquisition of the reference offset time is more accurate.
其中,为保证基准偏移时间的准确性,可以根据一定的频率更换待采样的历史音频数据,即,可选的,在一些实施例中,步骤“对至少一帧历史音频数据进行采样”,具体可以包括:Wherein, in order to ensure the accuracy of the reference offset time, the historical audio data to be sampled can be replaced according to a certain frequency, that is, optionally, in some embodiments, the step "sampling at least one frame of historical audio data", Specifically can include:
根据预设频率获取历史音频数据,所述历史音频数据包括至少一帧;Acquiring historical audio data according to a preset frequency, the historical audio data including at least one frame;
对所述至少一帧历史音频数据进行采样。Sampling the at least one frame of historical audio data.
其中,根据不同的、新的历史音频数据作为基准偏移时间的获取参考,具备一定的及时性和准确性。Wherein, according to different and new historical audio data as a reference for obtaining the reference offset time, it has certain timeliness and accuracy.
其中,可以对历史音频数据所对应的偏移时间进行求平均的方式来确定当前音频数据的基准偏移,即,可选的,在一些实施例中,步骤“根据至少一个所述偏移时间,确定所述当前音频数据的基准偏移时间”,具体可以包括:Wherein, the reference offset of the current audio data may be determined by averaging the offset times corresponding to the historical audio data, that is, optionally, in some embodiments, the step "according to at least one of the offset times , to determine the reference offset time of the current audio data", which may specifically include:
确定至少一个所述偏移时间的平均值,得到平均偏移时间;determining an average value of at least one of said offset times to obtain an average offset time;
根据所述平均偏移时间确定所述当前音频数据的基准偏移时间。A reference offset time of the current audio data is determined according to the average offset time.
其中,平均值表明了与当前音频数据相同数据类型的历史音频数据的整体的偏移情况,该整体偏移情况可放映当前音频数据的参考播放时间的待调整范围,因此,将历史音频数据的平均偏移时间作为当前音频数据的基准偏移时间,具备一定的准确性和可参考价值。Among them, the average value indicates the overall offset of the historical audio data of the same data type as the current audio data, and the overall offset can reflect the range to be adjusted for the reference playback time of the current audio data. Therefore, the historical audio data The average offset time is used as the reference offset time of the current audio data, which has certain accuracy and reference value.
其中,由于解码时间是毫秒级别,因此,为提高计算效率,可以将单位毫秒一下的时间可以忽略,因此可以对偏移时间进行整数级别的偏移值的调整,即,可选的,在一些实施例中,步骤“根据至少一个所述偏移时间,确定所述当前音频数据的基准偏移时间”,具体可以包括:Wherein, since the decoding time is at the level of milliseconds, in order to improve the calculation efficiency, the time in units of milliseconds can be ignored, so the offset time can be adjusted by an integer-level offset value, that is, optional, in some In an embodiment, the step of "determining the reference offset time of the current audio data according to at least one of the offset times" may specifically include:
确定至少一个所述偏移时间的平均值,得到平均偏移时间;determining an average value of at least one of said offset times to obtain an average offset time;
对所述平均偏移时间进行取整,得到所述历史音频数据所对应的平均整数偏移时间;Rounding the average offset time to obtain the average integer offset time corresponding to the historical audio data;
将所述平均整数偏移时间确定为所述当前音频数据的基准偏移时间。The average integer offset time is determined as a reference offset time of the current audio data.
其中,取整的方式可以是化零为整的方式,例如,将小数点后的数值调整为1,使调整后的参考播放时间小于期望播放时间,保证音频数据能够顺利播放。Wherein, the method of rounding can be a method of converting zeros into wholes, for example, adjusting the value after the decimal point to 1, so that the adjusted reference playback time is less than the expected playback time, so as to ensure that the audio data can be played smoothly.
其中,整数的基准偏移时间,可直观的了解到音频数据参考播放时间的待调节区间。Wherein, the reference offset time of an integer can intuitively know the interval to be adjusted of the reference playback time of the audio data.
其中,由于解码时间是毫秒级别,因此,为提高计算效率,可以将单位毫秒以下的时间可以忽略,即可以仅将各个偏移时间的整数部分作为基准偏移时间选取的考虑因素,可以对各个偏移时间先进行取整,在计算这些偏移时间的平均值,即,可选的,在一些实施例中,步骤“根据至少一个所述偏移时间,确定所述当前音频数据的基准偏移时间”,具体可以包括:Among them, since the decoding time is at the level of milliseconds, in order to improve the calculation efficiency, the time below the unit of milliseconds can be ignored, that is, only the integer part of each offset time can be used as a consideration for the selection of the reference offset time, and each The offset time is rounded first, and the average value of these offset times is calculated, that is, optionally, in some embodiments, the step "determine the reference offset of the current audio data according to at least one of the offset times shift time", which may specifically include:
分别对所述至少一个偏移时间进行取整,得到至少一个整数偏移时间;respectively rounding the at least one offset time to obtain at least one integer offset time;
根据所述至少一个整数偏移时间,确定所述每帧音频数据的整数平均偏移时间;determining an integer average offset time of each frame of audio data based on the at least one integer offset time;
将所述整数平均偏移时间确定为所述当前音频数据的基准偏移时间。The integer average offset time is determined as a reference offset time of the current audio data.
其中,为保证调整后的参考播放时间小于或者等于期望播放时间,可以将各个偏移时间进行化零为整,例如,将各个偏移数据小数点后数据调整为1,即将整数部分增大1ms。Wherein, in order to ensure that the adjusted reference playback time is less than or equal to the expected playback time, each offset time can be rounded up to zero, for example, the data after the decimal point of each offset data is adjusted to 1, that is, the integer part is increased by 1 ms.
其中,基准偏移时间表明与当前音频数据的数据类型相同的历史音频数据的基本偏移数据或整体偏移情况,因此,利用基准偏移时间对参考播放时间的调整,基本上可以满足将参考播放时间调整为小于或者等于期望播放时间。Among them, the reference offset time indicates the basic offset data or the overall offset of the historical audio data of the same data type as the current audio data. Therefore, the adjustment of the reference playback time by the reference offset time can basically meet the requirements of the reference The playing time is adjusted to be less than or equal to the expected playing time.
其中,上述基准偏移时间均是在取平均值的基础上获取的,而各个音频数据偏移时间的平均值,代表该音频数据集的整体的偏移情况,因此,利用上述方式获取到的基准偏移时间可在一定程度上满足参考播放时间的调整需求。Among them, the above-mentioned reference offset time is obtained on the basis of taking the average value, and the average value of each audio data offset time represents the overall offset situation of the audio data set, therefore, the obtained by the above method The reference offset time can satisfy the adjustment requirement of the reference playback time to a certain extent.
但是,针对精度要求较高的音频数据,还可以在基准偏移时间的基础上,根据音频数据所对应的实际偏移时间,确定音频数据在基准偏移时间的调整基础上仍存在的误差偏移时间,根据基准偏移时间和误差偏移时间同时对音频数据的参考播放时间进行调整,即,可选的,在一些实施例中,步骤“根据所述基准偏移时间对所述开始解码参考时间进行调整,得到开始解码调整时间”,具体可以包括:However, for audio data that requires high precision, it is also possible to determine the error offset that still exists in the audio data based on the adjustment of the reference offset time based on the actual offset time corresponding to the audio data on the basis of the reference offset time. shift time, adjust the reference play time of the audio data simultaneously according to the reference offset time and the error offset time, that is, optionally, in some embodiments, the step "according to the reference offset time to start decoding The reference time is adjusted to obtain the start decoding adjustment time", which may include:
获取所述音频数据的预留处理时间;Acquiring the reserved processing time of the audio data;
根据所述预留处理时间和所述实际解码处理时间,确定所述音频数据的实际偏移时间;determining an actual offset time of the audio data according to the reserved processing time and the actual decoding processing time;
根据所述基准偏移时间和所述实际偏移时间,确定所述音频数据的误差偏移时间;determining an error offset time of the audio data according to the reference offset time and the actual offset time;
根据所述基准偏移时间和所述误差偏移时间对所述开始解码参考时间进行调整,得到开始解码调整时间。The decoding start reference time is adjusted according to the reference offset time and the error offset time to obtain an adjustment start decoding time.
其中,由于基准偏移时间是历史音频数据的偏移时间的平均值计算得来的,所以,根据基准偏移时间对参考播放时间进行调整后,仍存在一定的误差,所以,根据实际偏移时间和基准偏移时间来确定误差偏移时间,然后,在参考播放时间根据基准偏移时间进行调整后,再根据误差偏移时间做进一步调整,可提高音频数据的参考播放时间调整的准确性,即保证调整后的参考播放时间小于或者等于期望播放时间。Among them, since the reference offset time is calculated by the average value of the offset time of historical audio data, there is still a certain error after adjusting the reference playback time according to the reference offset time, so, according to the actual offset time and the reference offset time to determine the error offset time, and then, after the reference playback time is adjusted according to the reference offset time, further adjustments are made according to the error offset time, which can improve the accuracy of the reference playback time adjustment of the audio data , that is, ensure that the adjusted reference playback time is less than or equal to the expected playback time.
例如,如果基准偏移时间是整数的,则会损失一定的精度,因此,为满足精度需求,可以确定每帧音频所对应的实际音频数据,根据实际音频数据和基准偏移时间确定误差偏移时间,然后,在参考播放时间根据基准偏移时间调整的基础上,在根据误差偏移时间做进一步调整。For example, if the reference offset time is an integer, certain precision will be lost. Therefore, in order to meet the accuracy requirements, the actual audio data corresponding to each frame of audio can be determined, and the error offset can be determined according to the actual audio data and the reference offset time Time, then, on the basis of adjusting the reference playback time according to the reference offset time, further adjustment is made according to the error offset time.
其中,针对精度要求较高的音频数据,可以根据音频数据解码后的实际偏移时间来进行调整,即基准偏移时间还包括实际偏移时间,则,可选的,在一些实施例中,步骤“根据所述基准偏移时间对所述开始解码参考时间进行调整,得到开始解码调整时间”,具体可以包括:Wherein, for audio data requiring high precision, it can be adjusted according to the actual offset time after decoding the audio data, that is, the reference offset time also includes the actual offset time, then, optionally, in some embodiments, The step of "adjusting the decoding start reference time according to the reference offset time to obtain the decoding start adjustment time" may specifically include:
获取所述音频数据的预留处理时间;Acquiring the reserved processing time of the audio data;
根据所述预留处理时间和所述实际解码处理时间,确定所述音频数据的实际偏移时间;determining an actual offset time of the audio data according to the reserved processing time and the actual decoding processing time;
根据所述实际偏移时间对所述开始解码参考时间进行调整,得到开始解码调整时间。The decoding start reference time is adjusted according to the actual offset time to obtain the decoding start adjustment time.
其中,在音频数据解码后,且在音频数据输出之前,根据音频数据的实际偏移时间对音频数据的开始解码参考时间进行调整。Wherein, after the audio data is decoded and before the audio data is output, the audio data decoding start reference time is adjusted according to the actual offset time of the audio data.
其中,预留处理时间是为音频数据的解码预留的处理时间,其中,预留处理时间的获取可以根据开始解码参考时间与期望播放时间来获取,即,可选的,在一些实施例中,步骤“获取所述音频数据的预留处理时间”,具体可以包括:Wherein, the reserved processing time is the processing time reserved for the decoding of audio data, wherein, the acquisition of the reserved processing time can be obtained according to the decoding start reference time and the expected playback time, that is, optional, in some embodiments , the step of "obtaining the reserved processing time of the audio data" may specifically include:
根据所述音频数据的开始解码参考时间和所述期望播放时间,确定所述音频数据的预留处理时间。The reserved processing time of the audio data is determined according to the decoding start reference time of the audio data and the expected playing time.
其中,根据期望播放时间与开始解码参考时间的差值,即可获取到音频数据的预留处理时间,通过预留处理时间和实际解码处理时间的比较,即可获取到音频数据解码的实际偏移时间。Among them, the reserved processing time of audio data can be obtained according to the difference between the expected playback time and the reference time of starting decoding, and the actual deviation of audio data decoding can be obtained by comparing the reserved processing time with the actual decoding processing time. shift time.
其中,音频数据的期望播放时间可以直接从音频数据的数据信息中提取,即,可选的,在一些实施例中,步骤“获取所述音频数据所对应的期望播放时间”,具体可以包括:Wherein, the expected playing time of the audio data may be directly extracted from the data information of the audio data, that is, optionally, in some embodiments, the step "obtaining the expected playing time corresponding to the audio data" may specifically include:
直接从所述音频数据中提取所述音频数据的期望播放时间。The expected playing time of the audio data is directly extracted from the audio data.
其中,音频数据的基准偏移时间还可以根据音频数据的类型进行确定,即,可选的,在一些实施例中,步骤“获取所述音频数据所对应的基准偏移时间”,具体可以包括:Wherein, the reference offset time of the audio data may also be determined according to the type of the audio data, that is, optionally, in some embodiments, the step of "acquiring the reference offset time corresponding to the audio data" may specifically include :
识别所述音频数据的音频数据类型;identifying an audio data type of the audio data;
获取映射关系集合,所述映射关系集合包括预设音频数据类型与预设基准偏移时间的映射关系;Obtain a mapping relationship set, the mapping relationship set includes a mapping relationship between a preset audio data type and a preset reference offset time;
根据所述映射关系集合和所述音频数据类型,获取所述音频数据所对应的基准偏移时间。Acquire a reference offset time corresponding to the audio data according to the set of mapping relationships and the audio data type.
其中,映射关系集合可以根据以往历史音频数据的类型与偏移时间的关系进行确定,例如,根据对历史音频数据的类型以及偏移时间的统计,综合确定音频数据的数据类型所对应的基准偏移时间。Wherein, the mapping relationship set can be determined according to the relationship between the type of historical audio data and the offset time in the past, for example, according to the statistics of the type of historical audio data and the offset time, comprehensively determine the reference offset corresponding to the data type of the audio data shift time.
104、针对每帧音频数据,根据所述基准偏移时间对所述开始解码参考时间进行调整,得到开始解码调整时间。104. For each frame of audio data, adjust the decoding start reference time according to the reference offset time to obtain a decoding start adjustment time.
其中,由于音频数据解码处理前的开始解码参考时间和解码处理后的参考播放时间处于同一时间线上,即,开始解码参考时间的变化会带来参考播放时间的变化,所以,对开始进行解码处理的开始解码参考时间的调整相当于对解码处理后的参考播放时间的调整。Wherein, since the decoding reference time before the audio data decoding process and the reference playback time after the decoding process are on the same timeline, that is, the change of the reference playback time will bring about the change of the reference playback time, so the decoding of the start The adjustment of the decoding reference time at the start of processing is equivalent to the adjustment of the reference playback time after decoding processing.
其中,请参阅图3,图3是本申请实施例中参考播放时间调整的流程示意图,可以对音频数据开始处理时的开始解码参考时间进行调整,例如,对开始解码参考时间进行回调后,使音频数据处理后的最终的参考播放时间也随之进行变化调整,即相当于在开始解码参考时间调整后,对最终的参考播放时间进行更新调整,具体如下:Wherein, please refer to FIG. 3. FIG. 3 is a schematic flow diagram of reference playback time adjustment in the embodiment of the present application. The reference time for starting decoding when the audio data starts to be processed can be adjusted. For example, after calling back the reference time for starting decoding, use The final reference playback time after audio data processing is also changed and adjusted accordingly, which is equivalent to updating and adjusting the final reference playback time after starting to decode the reference time adjustment, as follows:
111、获取到音频数据集,即音频数据包(TLV stream);111. Obtain the audio data set, that is, the audio data packet (TLV stream);
112、在对音频数据包中音频数据开始解码时,记录音频数据开始解码时终端设备的参考时钟的实时时间(即音频数据的开始解码参考时间)和实际解码处理时间;112. When decoding the audio data in the audio data packet, record the real-time time of the reference clock of the terminal device when the audio data starts to be decoded (that is, the reference time for starting decoding of the audio data) and the actual decoding processing time;
113、获取音频数据所对应的期望播放时间;113. Obtain the expected playing time corresponding to the audio data;
114、根据基准偏移时间和误差偏移时间对开始解码参考时间进行调整,使调整后的开始解码调整时间与实际解码处理时间的和(即参考播放时间)小于或者等于音频数据所对应的期望播放时间;114. Adjust the decoding start reference time according to the reference offset time and the error offset time, so that the sum of the adjusted start decoding adjustment time and the actual decoding processing time (that is, the reference playback time) is less than or equal to the expectation corresponding to the audio data play time;
115、对调整后(即音频数据解码后)的参考播放时间进行继续计时更新,使参考播放时间变化为音频数据所对应的期望播放时间,此时对音频数据进行播放。115. Continue timing and updating the adjusted reference play time (that is, after the audio data is decoded), so that the reference play time is changed to the expected play time corresponding to the audio data, and the audio data is played at this time.
其中,通过在音频数据开始解码时,对开始解码参考时间进行调整,使播放音频数据的硬件设备能够获取到一个小于或者等于期望播放时间的参考播放时间,即在开始解码参考时间调整后,在解码后硬件设备得到的参考播放时间即是调整后的参考播放时间。Wherein, by adjusting the reference time to start decoding when the audio data starts to decode, the hardware device playing audio data can obtain a reference play time that is less than or equal to the expected play time, that is, after the reference time to start decoding is adjusted, in The reference playback time obtained by the hardware device after decoding is the adjusted reference playback time.
105、根据所述开始解码调整时间和所述实际解码处理时间确定所述音频数据的参考播放时间,且所述参考播放时间小于或者等于所述期望播放时间。105. Determine a reference playback time of the audio data according to the decoding start adjustment time and the actual decoding processing time, and the reference playback time is less than or equal to the expected playback time.
其中,音频数据的开始解码参考时间与实际解码处理时间的和便是音频数据解码后的参考时间,由于参照历史音频数据的偏移时间,对当前音频数据的开始接参考时间进行调整,使音频数据解码后的参考播放时间小于或者等于音频数据的期望播放时间。Wherein, the sum of the start decoding reference time of the audio data and the actual decoding processing time is the reference time after the decoding of the audio data. Due to referring to the offset time of the historical audio data, the start reference time of the current audio data is adjusted to make the audio data The reference playing time after the data is decoded is less than or equal to the expected playing time of the audio data.
其中,可以根据音频数据解码处理前的时间信息和解码处理后的时间信息确定音频数据的参考播放时间,即,可选的,在一些实施例中,步骤“根据所述开始解码调整时间和所述实际解码处理时间确定所述音频数据的参考播放时间”,具体可以包括:Wherein, the reference playing time of the audio data may be determined according to the time information before the audio data decoding processing and the time information after the decoding processing, that is, optionally, in some embodiments, the step "according to the start decoding and adjusting the time and the The actual decoding processing time determines the reference playing time of the audio data", which may specifically include:
获取所述音频数据解码处理的开始解码时间和结束解码时间;Obtain the start decoding time and end decoding time of the audio data decoding process;
根据所述开始解码调整时间和所述开始解码时间,确定所述音频数据的基础参考播放时间;determining a basic reference playback time of the audio data according to the start decoding adjustment time and the start decoding time;
根据所述基础参考播放时间和所述结束解码时间,确定所述音频数据的参考播放时间。A reference playback time of the audio data is determined according to the basic reference playback time and the end decoding time.
其中,开始解码调整时间与开始解码时间的差,可以得到音频数据的基础参考播放时间,而基础参考播放时间和结束解码时间的和便可以达到音频数据的参考播放时间,即参考播放时间与开始解码调整时间的差,便于结束解码时间与开始解码时间的差。Among them, the difference between the start decoding adjustment time and the start decoding time can obtain the basic reference playback time of the audio data, and the sum of the basic reference playback time and the end decoding time can reach the reference playback time of the audio data, that is, the reference playback time and the start time The difference in decoding adjustment time is the difference between the end decoding time and the start decoding time.
其中,通过基础参考播放时间获取参考播放时间的方式,使基准偏移时间的调整可以在音频数据的解码开始时进行调整,即对音频数据的开始解码参考时间进行调整。Wherein, the reference playing time is acquired by the basic reference playing time, so that the adjustment of the reference offset time can be adjusted when the decoding of the audio data starts, that is, the reference time of starting decoding of the audio data is adjusted.
其中,通过对音频数据开始解码前的基础参考播放时间的调整,使调整后的开始解码调整时间能够同步作用在最终的参考播放时间上。Wherein, by adjusting the basic reference playback time before audio data decoding starts, the adjusted decoding start adjustment time can synchronously act on the final reference playback time.
106、根据时间变化对所述参考播放时间进行更新。106. Update the reference playing time according to the time change.
其中,参考播放时间是音频数据参考播放的时间,当参考播放时间达到期望播放时间后,便可以对音频数据进行播放;Wherein, the reference playback time is the reference playback time of the audio data, and when the reference playback time reaches the desired playback time, the audio data can be played;
其中,由于根据历史音频数据的偏移时间,可以推测出当前音频数据的基准偏移时间,因此,根据基准偏移时间对参考播放时间进行了回调,使参考播放时间不在于参考时钟的时间保持同步,而是调整为小于或者等于期望播放时间的时间。Among them, since the reference offset time of the current audio data can be inferred according to the offset time of the historical audio data, the reference playback time is called back according to the reference offset time, so that the reference playback time is not kept within the time of the reference clock Sync, but adjust to a time that is less than or equal to the desired playback time.
107、当所述调整后的参考播放时间达到期望播放时间后,根据所述终端设备对所述音频数据进行播放。107. When the adjusted reference playing time reaches a desired playing time, play the audio data according to the terminal device.
其中,当参考播放时间继续计时后,当参考播放时间所对应的时间戳与期望播放时间的时间戳相同后,便可对音频数据进行播放,其中,由于音频数据的解码是毫秒级别的,所以调整后的参考播放时间与期望播放时间的时间差也应该是毫秒级别的。Wherein, when the reference playback time continues to count, when the timestamp corresponding to the reference playback time is the same as the timestamp of the expected playback time, the audio data can be played, wherein, since the audio data is decoded at the millisecond level, so The time difference between the adjusted reference playback time and the expected playback time should also be at the millisecond level.
其中,由于音频数据集中各个音频数据的期望播放时间所对应的时间戳的差是比较固定的,因此,调整后的各个音频数据所对应的参考播放时间之间的差也是比较固定的,仍可实现对音频的连续播放。Wherein, because the time stamp difference corresponding to the expected playing time of each audio data in the audio data set is relatively fixed, therefore, the difference between the reference playing time corresponding to each audio data after adjustment is also relatively fixed, and can still be Realize continuous playback of audio.
其中,请参阅图4,在本申请实施例中,根据基准偏移时间对音频数据的参考播放时间的调整的具体过程如下:Wherein, please refer to FIG. 4, in the embodiment of the present application, the specific process of adjusting the reference playback time of audio data according to the reference offset time is as follows:
121、获取到音频数据集,即音频数据包(TLV stream),从音频数据集中获取音频数据的开始解码参考时间的时间戳,并对开始解码参考时间的时间戳进行校验,判断时间戳数据的有效性,有效则进入步骤122,否则,继续进行步骤121;121. Obtain the audio data set, that is, the audio data packet (TLV stream), obtain the time stamp of the start decoding reference time of the audio data from the audio data set, and verify the time stamp of the start decoding reference time, and judge the time stamp data , if valid, enter step 122, otherwise, proceed to step 121;
122、从音频数据集中获取每帧音频数据的期望播放时间的时间戳,并对期望播放时间的时间戳进行校验,判断时间戳数据的有效性,有效则进入步骤123,否则,继续进行步骤122;122. Obtain the timestamp of the expected playback time of each frame of audio data from the audio data set, and check the timestamp of the expected playback time to judge the validity of the timestamp data. If it is valid, enter step 123; otherwise, continue to step 122. 122;
123、记录音频数据开始解码的开始解码时间,并对开始解码时间的时间戳进行校验,判断时间戳数据的有效性,有效则进入步骤124,否则,继续进行步骤123;123. Record the start decoding time of audio data decoding, and check the timestamp of the start decoding time to judge the validity of the timestamp data. If it is valid, enter step 124, otherwise, continue to step 123;
124、获取基础参考播放时间;124. Obtain the basic reference playing time;
125、根据基准偏移时间对基础参考播放时间进行调整(实质上还是对开始解码参考时间进行调整);125. Adjust the basic reference playback time according to the reference offset time (in essence, adjust the reference time to start decoding);
126、获取实际偏移时间;126. Obtain the actual offset time;
127、根据基准偏移时间和实际偏移时间,确定参考播放时间的误差偏移时间,并在根据基准偏移时间调整的基础上,根据误差偏移时间继续对基础参考播放时间继续调整(实质上还是对开始解码参考时间进行调整),得到基础参考播放调整时间,并对基础参考播放调整时间的有效性进行校验,无效则继续进行步骤127,有效则进行步骤128;127. Determine the error offset time of the reference playback time according to the reference offset time and the actual offset time, and continue to adjust the basic reference playback time according to the error offset time on the basis of adjusting the reference playback time (essentially or adjust the reference time for starting decoding), obtain the basic reference playback adjustment time, and check the validity of the basic reference playback adjustment time, if invalid, proceed to step 127, and if valid, proceed to step 128;
128、将基础参考播放调整时间更新到音频播放的硬件设备中,并随着实际解码处理时间确定调整后的参考播放时间。128. Update the basic reference playback adjustment time to the audio playback hardware device, and determine the adjusted reference playback time along with the actual decoding processing time.
其中,在调整过程中,先根据基准偏移时间进行对开始解码参考时间的调整,随后,根据实际解码处理时间,确定调整后的误差偏移时间;然后,根据误差偏移时间进行继续调整,可提高对开始解码参考时间调整的准确性,即提高音频数据的最终参考播放时间的准确性。Wherein, in the adjustment process, first adjust the reference time for starting decoding according to the reference offset time, and then determine the adjusted error offset time according to the actual decoding processing time; then, continue to adjust according to the error offset time, The accuracy of adjusting the reference time to start decoding can be improved, that is, the accuracy of the final reference playback time of audio data can be improved.
本申请实施例通过将音频数据的参考播放时间调小,使参考播放时间随着时间变化,且变化后达到期望播放时间后,对音频数据进行播放,即当音频数据的参考播放时间满足期望播放时间后,对音频数据实现同步播放;其中,参考播放时间是根据开始解码参考时间的调小而调小的,而音频数据的实际解码处理时间不受影响或限制,因此,该种将音频数据所对应的参考播放时间调小的方式,为音频数据的解码处理提供了足够的解码时长,避免因为解码处理时间过长,而使音频数据的播放出现音画不同步、丢帧或者卡顿等现象。In the embodiment of the present application, by reducing the reference playback time of audio data, the reference playback time changes with time, and after the change reaches the desired playback time, the audio data is played, that is, when the reference playback time of the audio data meets the desired playback time After the time, the audio data is played synchronously; the reference playback time is reduced according to the reduction of the reference time for decoding, and the actual decoding processing time of the audio data is not affected or limited. Therefore, this kind of audio data The corresponding reference playback time reduction method provides enough decoding time for the decoding process of audio data, and avoids audio and picture asynchrony, frame loss, or freezes in audio data playback due to too long decoding processing time. Phenomenon.
为便于更好的实施本申请的音频播放方法,本申请还提供一种基于上述音频播放方法的音频播放装置。其中名词的含义与上述音频播放方法中相同,具体实现细节可以参考方法实施例中的说明。In order to better implement the audio playing method of the present application, the present application also provides an audio playing device based on the above audio playing method. The meanings of the nouns are the same as those in the above audio playing method, and for specific implementation details, please refer to the description in the method embodiments.
请参阅图5,图5为本申请提供的音频播放装置的结构示意图,其中该音频播放装置可以包括解码模块201、记录模块202、获取模块203、调整模块204、确定模块205、计时模块206和播放模块207,具体可以如下:Please refer to FIG. 5. FIG. 5 is a schematic structural diagram of an audio playback device provided by the present application, wherein the audio playback device may include a decoding module 201, a recording module 202, an acquisition module 203, an adjustment module 204, a determination module 205, a timing module 206 and Play module 207, specifically can be as follows:
解码模块201,用于对终端设备上待播放的音频数据集进行解码处理,所述音频数据集包括至少一帧音频数据。The decoding module 201 is configured to decode an audio data set to be played on a terminal device, where the audio data set includes at least one frame of audio data.
其中,终端设备接收到待播放的音频数据往往是经过编码压缩过的数据,例如,数字电视中,传输的数据包TLV是以ISDBS3标准的数据包,而4K超高清节目所对应的TLV包一般节目内容数据量非常大,因此,为提高传输效率,一般是需要对音频数据进行编码压缩,则终端设备接收到的音频数据则是需要解码的压缩数据,终端设备在对音频数据进行解码后才能进行音频数据的播放。Among them, the audio data received by the terminal device to be played is often coded and compressed data. For example, in digital TV, the transmitted data packet TLV is the ISDBS3 standard data packet, and the TLV packet corresponding to the 4K ultra-high-definition program is generally The data volume of the program content is very large. Therefore, in order to improve the transmission efficiency, it is generally necessary to encode and compress the audio data. The audio data received by the terminal device is compressed data that needs to be decoded. The terminal device can only decode the audio data after decoding the audio data. Play audio data.
记录模块202,用于记录每帧所述音频数据解码处理的开始解码参考时间和实际解码处理时间。The recording module 202 is configured to record the decoding reference time and the actual decoding processing time of the audio data decoding processing of each frame.
其中,开始解码参考时间是与终端设备上参考时钟保持同步的,即音频数据开始进行解码处理时,参考时钟的时间即为音频数据的开始解码参考时间;Wherein, the decoding start reference time is synchronized with the reference clock on the terminal device, that is, when the audio data starts to be decoded, the time of the reference clock is the audio data decoding start reference time;
其中,音频数据的实际解码处理时间是音频数据解码过程所使用的实际时间。Wherein, the actual decoding processing time of the audio data is the actual time used in the audio data decoding process.
可选的,在本申请的一些实施例中,记录模块202具体用于:Optionally, in some embodiments of the present application, the recording module 202 is specifically used to:
用于根据晶振跳动做计时反馈,分别获取所述音频数据的开始解码时间和结束解码时间;It is used to do timing feedback according to the beating of the crystal oscillator, and obtain the start decoding time and the end decoding time of the audio data respectively;
用于根据所述开始解码时间和所述结束解码时间,确定所述音频数据的实际解码处理时间。It is used for determining the actual decoding processing time of the audio data according to the decoding start time and the decoding end time.
其中,由于参考时间是接收到参考时钟的时间后更新的,而在数据传输和更新过程中也需要经历时间消耗,所以根据参考时间来获取音频数据的实际解码时间是不准确的,因此,本申请根据晶振跳动的计时装置来实现对音频数据的实际解码时间的计时,而利用晶振跳动反馈做的计时处理,较为准确。Among them, since the reference time is updated after receiving the time of the reference clock, and time consumption is also required in the process of data transmission and update, it is not accurate to obtain the actual decoding time of audio data according to the reference time. Therefore, this A timing device based on the beating of the crystal oscillator is applied to realize the timing of the actual decoding time of the audio data, and the timing processing using the beating feedback of the crystal oscillator is more accurate.
获取模块203,用于获取所述音频数据所对应的基准偏移时间和期望播放时间;An acquisition module 203, configured to acquire a reference offset time and an expected playback time corresponding to the audio data;
其中,当音频数据的参考播放时间大于期望播放时间后,音频数据便不能进行准确的播放,会出现音画不同步、丢着或者卡顿等现象,因此,需要对音频数据的参考播放时间进行调整,即调整音频数据播放所参考的参考播放时间的数据,而并非是调整参考时钟所对应的数据,即并未调整终端设备上的显示时间;Among them, when the reference playback time of the audio data is greater than the expected playback time, the audio data cannot be played accurately, and there will be phenomena such as out-of-sync, lost, or stuck audio and video. Therefore, it is necessary to adjust the reference playback time of the audio data. Adjustment, that is, adjusting the data of the reference playback time referenced by the audio data playback, rather than adjusting the data corresponding to the reference clock, that is, not adjusting the display time on the terminal device;
其中,基准偏移时间可以根据音频数据的参考播放时间和期望播放时间的差值来确定,将参考播放时间回退上述差值,使调整后的参考播放时间小于或者等于期望播放时间。Wherein, the reference offset time can be determined according to the difference between the reference play time and the expected play time of the audio data, and the reference play time is rolled back to the above difference, so that the adjusted reference play time is less than or equal to the expected play time.
其中,由于音频数据的解码时间是毫秒级别的,所以,对参考时间的调整也是人体难以感知的毫秒差异,例如,当音频数据的原参考播放时间为7点零500ms时,即终端设备参考时钟的显示时间是7点整,而基准偏移时间是200ms,因此,调整后的参考播放时间是7点零300ms,此时参考时钟的显示时间仍然是7点整,且200ms这种毫秒级别的调整,用户是难以感知到的,但200ms的时间对音频解码来说是难以忽略的,由于,当原参考播放时间超过期望播放时间后,音频数据便不能准确播放,所以可以通过调整那部分基准偏移时间的方式,对参考播放时间进行调整,使音频数据能够播放,且为音频数据解码提供了足够的时长,降低对硬件产品的性能要求,并且,用户也是难以感知这部分时间差异的。Among them, since the decoding time of audio data is at the level of milliseconds, the adjustment of the reference time is also a millisecond difference that is difficult for the human body to perceive. For example, when the original reference playback time of audio data is 7:0500ms, that is, the reference clock The display time of the clock is 7:00, and the reference offset time is 200ms. Therefore, the adjusted reference playback time is 7:0300ms. At this time, the display time of the reference clock is still 7:00, and the millisecond level of 200ms Adjustment is difficult for users to perceive, but the time of 200ms is difficult to ignore for audio decoding. Since, when the original reference playback time exceeds the expected playback time, the audio data cannot be played accurately, so you can adjust that part of the reference The method of shifting time adjusts the reference playback time so that the audio data can be played, and provides enough time for audio data decoding, reducing the performance requirements for hardware products, and it is also difficult for users to perceive this part of the time difference.
可选的,在本申请的一些实施例中,所述音频数据包括当前音频数据,所述获取模块203包括:Optionally, in some embodiments of the present application, the audio data includes current audio data, and the obtaining module 203 includes:
采样单元,用于对至少一帧历史音频数据进行采样,所述历史音频数据与所述当前音频数据的数据类型相同;a sampling unit, configured to sample at least one frame of historical audio data, where the historical audio data is of the same data type as the current audio data;
第一获取单元,用于分别获取每帧所述历史音频数据解码处理后的历史参考播放时间和历史期望播放时间;The first acquisition unit is used to respectively acquire the historical reference playback time and the historical expected playback time after decoding the historical audio data of each frame;
第一确定单元,用于根据所述历史参考播放时间和所述历史期望播放时间,分别确定每帧所述历史音频数据的偏移时间;A first determining unit, configured to respectively determine the offset time of each frame of the historical audio data according to the historical reference playing time and the historical expected playing time;
第二确定单元,用于根据至少一个所述偏移时间,确定所述当前音频数据的基准偏移时间。The second determining unit is configured to determine a reference offset time of the current audio data according to at least one of the offset times.
其中,根据同样数据类型的历史音频数据的偏移时间的获取,可推测出当前音频数据的参考播放时间应当调整的基准偏移时间,由于采样的是与当前音频数据的数据类型相同的历史音频数据,所以,基准偏移时间的获取较为准确。Among them, according to the acquisition of the offset time of the historical audio data of the same data type, the reference offset time that the reference playback time of the current audio data should be adjusted can be inferred, because the sampling is the same historical audio data type as the current audio data Therefore, the acquisition of the reference offset time is more accurate.
可选的,在本申请的一些实施例中,第二确定单元包括:Optionally, in some embodiments of the present application, the second determining unit includes:
第一确定子单元,用于确定至少一个所述偏移时间的平均值,得到平均偏移时间;A first determining subunit, configured to determine an average value of at least one offset time to obtain an average offset time;
第二确定子单元,用于根据所述平均偏移时间确定所述当前音频数据的基准偏移时间。The second determining subunit is configured to determine the reference offset time of the current audio data according to the average offset time.
其中,平均值表明了与当前音频数据相同数据类型的历史音频数据的整体的偏移情况,该整体偏移情况可放映当前音频数据的参考播放时间的待调整范围,因此,将历史音频数据的平均偏移时间作为当前音频数据的基准偏移时间,具备一定的准确性和可参考价值。Among them, the average value indicates the overall offset of the historical audio data of the same data type as the current audio data, and the overall offset can reflect the range to be adjusted for the reference playback time of the current audio data. Therefore, the historical audio data The average offset time is used as the reference offset time of the current audio data, which has certain accuracy and reference value.
可选的,在本申请的一些实施例中,第二确定单元具体还用于:Optionally, in some embodiments of the present application, the second determination unit is specifically further configured to:
用于确定至少一个所述偏移时间的平均值,得到平均偏移时间;For determining an average value of at least one of the offset times to obtain an average offset time;
用于对所述平均偏移时间进行取整,得到所述历史音频数据所对应的平均整数偏移时间;It is used to round the average offset time to obtain the average integer offset time corresponding to the historical audio data;
用于将所述平均整数偏移时间确定为所述当前音频数据的基准偏移时间。and determining the average integer offset time as a reference offset time of the current audio data.
可选的,在本申请的一些实施例中,第二确定单元具体还用于:Optionally, in some embodiments of the present application, the second determination unit is specifically further configured to:
用于分别对所述至少一个偏移时间进行取整,得到至少一个整数偏移时间;for rounding the at least one offset time respectively to obtain at least one integer offset time;
用于根据所述至少一个整数偏移时间,确定所述每帧音频数据的整数平均偏移时间;For determining the integer average offset time of each frame of audio data according to the at least one integer offset time;
用于将所述整数平均偏移时间确定为所述当前音频数据的基准偏移时间。used to determine the integer average offset time as a reference offset time of the current audio data.
可选的,在本申请的一些实施例中,采样单元具体还用于:Optionally, in some embodiments of the present application, the sampling unit is also specifically used for:
用于根据预设频率获取历史音频数据,所述历史音频数据包括至少一帧;Used to acquire historical audio data according to a preset frequency, the historical audio data including at least one frame;
用于对所述至少一帧历史音频数据进行采样。It is used for sampling the at least one frame of historical audio data.
可选的,在本申请的一些实施例中,获取模块203具体用于:Optionally, in some embodiments of the present application, the acquiring module 203 is specifically used to:
用于直接从所述音频数据中提取所述音频数据的期望播放时间。for extracting the desired play time of the audio data directly from the audio data.
可选的,在本申请的一些实施例中,获取模块203具体还用于:Optionally, in some embodiments of the present application, the acquiring module 203 is specifically further configured to:
用于识别所述音频数据的音频数据类型;an audio data type for identifying said audio data;
用于获取映射关系集合,所述映射关系集合包括预设音频数据类型与预设基准偏移时间的映射关系;It is used to obtain a mapping relationship set, the mapping relationship set includes a mapping relationship between a preset audio data type and a preset reference offset time;
用于根据所述映射关系集合和所述音频数据类型,获取所述音频数据所对应的基准偏移时间。The method is used to acquire the reference offset time corresponding to the audio data according to the mapping relationship set and the audio data type.
调整模块204,用于针对每帧音频数据,根据所述基准偏移时间对所述开始解码参考时间进行调整,得到开始解码调整时间。The adjustment module 204 is configured to adjust the decoding start reference time according to the reference offset time for each frame of audio data to obtain the decoding start adjustment time.
其中,开始解码参考时间的调整可以根据基准偏移时间进行调整,还可以根据实际偏移时间进行调整,或者在基准偏移时间调整的基础上,进行误差偏移时间的调整,以保证参考播放时间调整的准确性。Among them, the adjustment of the start decoding reference time can be adjusted according to the reference offset time, and can also be adjusted according to the actual offset time, or on the basis of the adjustment of the reference offset time, the error offset time can be adjusted to ensure the reference playback Accuracy of time adjustments.
可选的,在本申请的一些实施例中,所述基准偏移时间包括实际偏移时间,所述调整模块204包括:Optionally, in some embodiments of the present application, the reference offset time includes an actual offset time, and the adjustment module 204 includes:
第二获取单元,用于获取所述音频数据的预留处理时间;a second acquiring unit, configured to acquire the reserved processing time of the audio data;
第三确定单元,用于根据所述预留处理时间和所述实际解码处理时间,确定所述音频数据的实际偏移时间;A third determining unit, configured to determine the actual offset time of the audio data according to the reserved processing time and the actual decoding processing time;
第三获取单元,用于根据所述实际偏移时间对所述开始解码参考时间进行调整,得到开始解码调整时间。The third obtaining unit is configured to adjust the decoding start reference time according to the actual offset time to obtain the decoding start adjustment time.
可选的,在本申请的一些实施例中,所述第二获取单元包括:Optionally, in some embodiments of the present application, the second acquiring unit includes:
第三确定子单元,用于根据所述音频数据的开始解码参考时间和所述期望播放时间,确定所述音频数据的预留处理时间。The third determining subunit is configured to determine the reserved processing time of the audio data according to the reference time of starting decoding of the audio data and the expected playback time.
可选的,在本申请的一些实施例中,所述第二获取单元具体还用于:Optionally, in some embodiments of the present application, the second acquiring unit is specifically further configured to:
用于获取所述音频数据的预留处理时间;A reserved processing time for obtaining said audio data;
用于根据所述预留处理时间和所述实际解码处理时间,确定所述音频数据的实际偏移时间;For determining the actual offset time of the audio data according to the reserved processing time and the actual decoding processing time;
用于根据所述基准偏移时间和所述实际偏移时间,确定所述音频数据的误差偏移时间;for determining an error offset time of the audio data according to the reference offset time and the actual offset time;
用于根据所述基准偏移时间和所述误差偏移时间对所述开始解码参考时间进行调整,得到开始解码调整时间。It is used to adjust the decoding start reference time according to the reference offset time and the error offset time to obtain the decoding start adjustment time.
确定模块205,用于根据所述开始解码调整时间和所述实际解码处理时间确定所述音频数据的参考播放时间;A determining module 205, configured to determine a reference playback time of the audio data according to the start decoding adjustment time and the actual decoding processing time;
可选的,在本申请的一些实施例中,确定模块205具体用于:Optionally, in some embodiments of the present application, the determination module 205 is specifically used to:
用于获取所述音频数据解码处理的开始解码时间和结束解码时间;used to obtain the start decoding time and the end decoding time of the audio data decoding process;
用于根据所述开始解码调整时间和所述开始解码时间,确定所述音频数据的基础参考播放时间;It is used to determine the basic reference playback time of the audio data according to the decoding start adjustment time and the decoding start time;
用于根据所述基础参考播放时间和所述结束解码时间,确定所述音频数据的参考播放时间。It is used for determining the reference playing time of the audio data according to the basic reference playing time and the end decoding time.
计时模块206,用于根据时间变化对所述参考播放时间进行更新;A timing module 206, configured to update the reference playing time according to time changes;
播放模块207,用于当所述调整后的参考播放时间达到期望播放时间后,根据所述终端设备对所述音频数据进行播放。The playing module 207 is configured to play the audio data according to the terminal device when the adjusted reference playing time reaches a desired playing time.
本申请实施例首先由解码模块201对终端设备获取到的音频数据进行解码处理,同时,由记录模块202记录音频数据解码处理前的开始解码参考播放时间和解码过程的实际解码处理时间,其次,由获取模块203从音频数据中提取每帧音频数据的期望播放时间和每帧音频数据所对应的基准偏移时间,然后,由调整模块204根据基准偏移时间对开始解码参考播放时间进行调整(调小),使开始解码参考播放时间不再与参考时钟的时间保持同步,然后,由确定模块204根据开始解码调整时间和实际解码处理时间来确定音频数据解码处理后的参考播放时间(即参考播放时间是根据开始解码调整时间和实际解码处理时间确定的,而并非是与参考时钟的时间同步),同时,计时模块206对调整后的参考播放时间进行重新计时,当重新计时后的参考播放时间所对应的当前时间等于音频数据的期望播放时间后,由播放模块207对相应的音频数据进行播放;本申请实施例通过将音频数据的参考播放时间调小,使参考播放时间随着时间变化,且变化后达到期望播放时间后,对音频数据进行播放,即当音频数据的参考播放时间满足期望播放时间后,对音频数据实现同步播放;其中,参考播放时间是根据开始解码参考时间的调小而调小的,而音频数据的实际解码处理时间不受影响或限制,因此,该种将音频数据所对应的参考播放时间调小的方式,为音频数据的解码处理提供了足够的解码时长,避免因为解码处理时间过长,而使音频数据的播放出现音画不同步、丢帧或者卡顿等现象。In the embodiment of the present application, the audio data acquired by the terminal device is firstly decoded by the decoding module 201. At the same time, the recording module 202 records the decoding reference playback time before the audio data decoding process and the actual decoding processing time of the decoding process. Secondly, The expected playing time of each frame of audio data and the corresponding reference offset time of each frame of audio data are extracted from the audio data by the acquisition module 203, and then the adjustment module 204 adjusts the reference playback time for starting decoding according to the reference offset time ( turn down), so that the start decoding reference play time is no longer synchronized with the time of the reference clock, and then, the determination module 204 determines the reference play time after the decoding process of the audio data according to the start decoding adjustment time and the actual decoding processing time (that is, the reference The playback time is determined according to the start decoding adjustment time and the actual decoding processing time, rather than being synchronized with the time of the reference clock), at the same time, the timing module 206 re-times the adjusted reference playback time, when the re-timed reference playback After the current time corresponding to the time is equal to the expected playback time of the audio data, the corresponding audio data is played by the playback module 207; in the embodiment of the present application, the reference playback time is changed with time by reducing the reference playback time of the audio data , and after the change reaches the expected playback time, the audio data is played, that is, when the reference playback time of the audio data meets the expected playback time, the audio data is played synchronously; wherein, the reference playback time is based on the start of decoding reference time. Small and small, and the actual decoding processing time of the audio data is not affected or limited, therefore, this method of reducing the reference playback time corresponding to the audio data provides sufficient decoding time for the decoding processing of the audio data , to avoid audio and video out-of-sync, frame loss, or stuttering in the playback of audio data due to the long decoding processing time.
此外,本申请还提供一种电子设备,如图6所示,其示出了本申请所涉及的电子设备的结构示意图,具体来讲:In addition, the present application also provides an electronic device, as shown in FIG. 6 , which shows a schematic structural diagram of the electronic device involved in the present application, specifically:
该电子设备可以包括一个或者一个以上处理核心的处理器401、一个或一个以上计算机可读存储介质的存储器402、电源403和输入单元404等部件。本领域技术人员可以理解,图6中示出的电子设备结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。其中:The electronic device may include a processor 401 of one or more processing cores, a memory 402 of one or more computer-readable storage media, a power supply 403, an input unit 404 and other components. Those skilled in the art can understand that the structure of the electronic device shown in FIG. 6 does not constitute a limitation on the electronic device, and may include more or less components than shown in the figure, or combine some components, or arrange different components. in:
处理器401是该电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器402内的软件程序和/或模块,以及调用存储在存储器402内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。可选的,处理器401可包括一个或多个处理核心;优选的,处理器401可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器401中。The processor 401 is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device, by running or executing software programs and/or modules stored in the memory 402, and calling the Data, perform various functions of electronic equipment and process data, so as to monitor electronic equipment as a whole. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes operating systems, user interfaces, and application programs, etc. , the modem processor mainly handles wireless communications. It can be understood that the foregoing modem processor may not be integrated into the processor 401 .
存储器402可用于存储软件程序以及模块,处理器401通过运行存储在存储器402的软件程序以及模块,从而执行各种功能应用以及解码处理。存储器402可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据电子设备的使用所创建的数据等。此外,存储器402可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器402还可以包括存储器控制器,以提供处理器401对存储器402的访问。The memory 402 can be used to store software programs and modules, and the processor 401 executes various functional applications and decoding processing by running the software programs and modules stored in the memory 402 . The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program (such as a sound playback function, an image playback function, etc.) required by at least one function; Data created by the use of electronic devices, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices. Correspondingly, the memory 402 may further include a memory controller to provide the processor 401 with access to the memory 402 .
电子设备还包括给各个部件供电的电源403,优选的,电源403可以通过电源管理系统与处理器401逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源403还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。The electronic device also includes a power supply 403 for supplying power to various components. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, so that functions such as charging, discharging, and power consumption management can be implemented through the power management system. The power supply 403 may also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.
该电子设备还可包括输入单元404,该输入单元404可用于接收输入的数字或字符信息,以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。The electronic device can also include an input unit 404, which can be used to receive input numbers or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
尽管未示出,电子设备还可以包括显示单元等,在此不再赘述。具体在本实施例中,电子设备中的处理器401会按照如下的指令,将一个或一个以上的应用程序的进程对应的可执行文件加载到存储器402中,并由处理器401来运行存储在存储器402中的应用程序,从而实现各种功能,如下:Although not shown, the electronic device may also include a display unit, etc., which will not be repeated here. Specifically, in this embodiment, the processor 401 in the electronic device loads the executable file corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 401 runs the executable file stored in the The application program in memory 402, thereby realizes various functions, as follows:
对终端设备上待播放的音频数据集进行解码处理,所述音频数据集包括至少一帧音频数据;记录每帧所述音频数据解码处理的开始解码参考时间和实际解码处理时间;获取所述音频数据所对应的基准偏移时间和期望播放时间;针对每帧音频数据,根据所述基准偏移时间对所述开始解码参考时间进行调整,得到开始解码调整时间;根据所述开始解码调整时间和所述实际解码处理时间确定所述音频数据的参考播放时间;根据时间变化对所述参考播放时间进行更新;当所述调整后的参考播放时间达到期望播放时间后,根据所述终端设备对所述音频数据进行播放。Perform decoding processing on the audio data set to be played on the terminal device, the audio data set includes at least one frame of audio data; record the start decoding reference time and actual decoding processing time of each frame of the audio data decoding process; obtain the audio The reference offset time and expected playback time corresponding to the data; for each frame of audio data, adjust the reference time to start decoding according to the reference offset time to obtain the adjustment time to start decoding; adjust the time according to the start decoding and The actual decoding processing time determines the reference playback time of the audio data; the reference playback time is updated according to time changes; when the adjusted reference playback time reaches the expected playback time, according to the terminal device Play the above audio data.
以上各个操作的具体实施可参见前面的实施例,在此不再赘述。For the specific implementation of the above operations, reference may be made to the foregoing embodiments, and details are not repeated here.
通过将音频数据的参考播放时间调小,使参考播放时间随着时间变化,且变化后达到期望播放时间后,对音频数据进行播放,即当音频数据的参考播放时间满足期望播放时间后,对音频数据实现同步播放;其中,参考播放时间是根据开始解码参考时间的调小而调小的,而音频数据的实际解码处理时间不受影响或限制,因此,该种将音频数据所对应的参考播放时间调小的方式,为音频数据的解码处理提供了足够的解码时长,避免因为解码处理时间过长,而使音频数据的播放出现音画不同步、丢帧或者卡顿等现象。By reducing the reference playback time of the audio data, the reference playback time changes with time, and after the change reaches the expected playback time, the audio data is played, that is, when the reference playback time of the audio data meets the expected playback time, the The audio data is played synchronously; the reference playback time is reduced according to the reduction of the decoding reference time, and the actual decoding processing time of the audio data is not affected or limited. Therefore, this kind of audio data corresponds to the reference The method of reducing the playback time provides enough decoding time for the decoding process of the audio data, and avoids audio and picture asynchrony, frame loss or freezes in the playback of audio data due to too long decoding processing time.
本领域普通技术人员可以理解,上述实施例的各种方法中的全部或部分步骤可以通过指令来完成,或通过指令控制相关的硬件来完成,该指令可以存储于一计算机可读存储介质中,并由处理器进行加载和执行。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by instructions controlling related hardware, and the instructions can be stored in a computer-readable storage medium, and is loaded and executed by the processor.
为此,本申请提供一种存储介质,其中存储有多条指令,该指令能够被处理器进行加载,以执行本申请所提供的任一种音频播放方法中的步骤。例如,该指令可以执行如下步骤:To this end, the present application provides a storage medium in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any audio playback method provided in the present application. For example, the command can perform the following steps:
对终端设备上待播放的音频数据集进行解码处理,所述音频数据集包括至少一帧音频数据;记录每帧所述音频数据解码处理的开始解码参考时间和实际解码处理时间;获取所述音频数据所对应的基准偏移时间和期望播放时间;针对每帧音频数据,根据所述基准偏移时间对所述开始解码参考时间进行调整,得到开始解码调整时间;根据所述开始解码调整时间和所述实际解码处理时间确定所述音频数据的参考播放时间;根据时间变化对所述参考播放时间进行更新;当所述调整后的参考播放时间达到期望播放时间后,根据所述终端设备对所述音频数据进行播放。Perform decoding processing on the audio data set to be played on the terminal device, the audio data set includes at least one frame of audio data; record the start decoding reference time and actual decoding processing time of each frame of the audio data decoding process; obtain the audio The reference offset time and expected playback time corresponding to the data; for each frame of audio data, adjust the reference time to start decoding according to the reference offset time to obtain the adjustment time to start decoding; adjust the time according to the start decoding and The actual decoding processing time determines the reference playback time of the audio data; the reference playback time is updated according to time changes; when the adjusted reference playback time reaches the expected playback time, according to the terminal device Play the above audio data.
以上各个操作的具体实施可参见前面的实施例,在此不再赘述。For the specific implementation of the above operations, reference may be made to the foregoing embodiments, and details are not repeated here.
其中,该存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。Wherein, the storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or CD, etc.
由于该存储介质中所存储的指令,可以执行本申请所提供的任一种音频播放方法中的步骤,因此,可以实现本申请所提供的任一种音频播放方法所能实现的有益效果,详见前面的实施例,在此不再赘述。Due to the instructions stored in the storage medium, the steps in any audio playback method provided in this application can be executed, therefore, the beneficial effects that can be achieved by any audio playback method provided in this application can be realized. See the previous embodiments, and details will not be repeated here.
以上对本申请所提供的一种音频播放方法、装置、电子设备以及存储介质进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。A kind of audio playing method, device, electronic equipment and storage medium provided by this application have been introduced in detail above. In this paper, specific examples have been used to illustrate the principle and implementation of the present invention. The description of the above embodiments is only for To help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation and application range. In summary, the content of this specification is not It should be understood as a limitation of the present invention.
以上所述仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或流程变换,或直接或间接运用在其它相关的技术领域,均同理包括在本申请的专利保护范围内。The above is only the preferred embodiment of the application, and does not limit the patent scope of the application. Any equivalent structure or process transformation made by using the specification and drawings of the application, or directly or indirectly used in other related technical fields , are all included in the patent protection scope of the present application in the same way.

Claims (20)

  1. 一种音频播放方法,其特征在于,包括:An audio playback method, characterized in that, comprising:
    对终端设备上待播放的音频数据集进行解码处理,所述音频数据集包括至少一帧音频数据;Decoding the audio data set to be played on the terminal device, the audio data set includes at least one frame of audio data;
    记录每帧所述音频数据解码处理的开始解码参考时间和实际解码处理时间;Record the start decoding reference time and the actual decoding processing time of the audio data decoding processing of each frame;
    获取所述音频数据所对应的基准偏移时间和期望播放时间;Acquiring the reference offset time and expected playing time corresponding to the audio data;
    针对每帧音频数据,根据所述基准偏移时间对所述开始解码参考时间进行调整,得到开始解码调整时间;For each frame of audio data, adjust the decoding start reference time according to the reference offset time to obtain the decoding start adjustment time;
    根据所述开始解码调整时间和所述实际解码处理时间确定所述音频数据的参考播放时间,且所述参考播放时间小于或者等于所述期望播放时间;determining a reference playback time of the audio data according to the start decoding adjustment time and the actual decoding processing time, and the reference playback time is less than or equal to the expected playback time;
    根据时间变化对所述参考播放时间进行更新;updating the reference playing time according to the time change;
    当所述调整后的参考播放时间达到期望播放时间后,根据所述终端设备对所述音频数据进行播放。When the adjusted reference playing time reaches a desired playing time, the audio data is played according to the terminal device.
  2. 根据权利要求1所述的方法,其特征在于,所述音频数据包括当前音频数据,所述获取所述音频数据所对应的基准偏移时间,包括:The method according to claim 1, wherein the audio data includes current audio data, and the acquiring the reference offset time corresponding to the audio data includes:
    对至少一帧历史音频数据进行采样,所述历史音频数据与所述当前音频数据的数据类型相同;Sampling at least one frame of historical audio data, where the historical audio data is of the same data type as the current audio data;
    分别获取每帧所述历史音频数据解码处理后的历史参考播放时间和历史期望播放时间;Respectively obtain the historical reference playback time and the historical expected playback time after the decoding of the historical audio data of each frame;
    根据所述历史参考播放时间和所述历史期望播放时间,分别确定每帧所述历史音频数据的偏移时间;According to the historical reference playing time and the historical expected playing time, respectively determine the offset time of each frame of the historical audio data;
    根据至少一个所述偏移时间,确定所述当前音频数据的基准偏移时间。A reference offset time of the current audio data is determined according to at least one of the offset times.
  3. 根据权利要求2所述的方法,其特征在于,所述根据至少一个所述偏移时间,确定所述当前音频数据的基准偏移时间,包括:The method according to claim 2, wherein the determining the reference offset time of the current audio data according to at least one of the offset times comprises:
    确定至少一个所述偏移时间的平均值,得到平均偏移时间;determining an average value of at least one of said offset times to obtain an average offset time;
    根据所述平均偏移时间确定所述当前音频数据的基准偏移时间。A reference offset time of the current audio data is determined according to the average offset time.
  4. 根据权利要求2所述的方法,其特征在于,所述根据至少一个所述偏移时间,确定所述当前音频数据的基准偏移时间,包括:The method according to claim 2, wherein the determining the reference offset time of the current audio data according to at least one of the offset times comprises:
    确定至少一个所述偏移时间的平均值,得到平均偏移时间;determining an average value of at least one of said offset times to obtain an average offset time;
    对所述平均偏移时间进行取整,得到所述历史音频数据所对应的平均整数偏移时间;Rounding the average offset time to obtain the average integer offset time corresponding to the historical audio data;
    将所述平均整数偏移时间确定为所述当前音频数据的基准偏移时间。The average integer offset time is determined as a reference offset time of the current audio data.
  5. 根据权利要求2所述的方法,其特征在于,所述根据至少一个所述偏移时间,确定所述当前音频数据的基准偏移时间,包括:The method according to claim 2, wherein the determining the reference offset time of the current audio data according to at least one of the offset times comprises:
    分别对所述至少一个偏移时间进行取整,得到至少一个整数偏移时间;respectively rounding the at least one offset time to obtain at least one integer offset time;
    根据所述至少一个整数偏移时间,确定所述每帧音频数据的整数平均偏移时间;determining an integer average offset time of each frame of audio data based on the at least one integer offset time;
    将所述整数平均偏移时间确定为所述当前音频数据的基准偏移时间。The integer average offset time is determined as a reference offset time of the current audio data.
  6. 根据权利要求2所述的方法,其特征在于,所述对至少一帧历史音频数据进行采样,包括:The method according to claim 2, wherein said sampling at least one frame of historical audio data comprises:
    根据预设频率获取历史音频数据,所述历史音频数据包括至少一帧;Acquiring historical audio data according to a preset frequency, the historical audio data including at least one frame;
    对所述至少一帧历史音频数据进行采样。Sampling the at least one frame of historical audio data.
  7. 根据权利要求1所述的方法,其特征在于,所述基准偏移时间包括实际偏移时间,所述根据所述基准偏移时间对所述开始解码参考时间进行调整,得到开始解码调整时间,包括:The method according to claim 1, wherein the reference offset time includes an actual offset time, and the reference time for starting decoding is adjusted according to the reference offset time to obtain an adjustment time for starting decoding, include:
    获取所述音频数据的预留处理时间;Acquiring the reserved processing time of the audio data;
    根据所述预留处理时间和所述实际解码处理时间,确定所述音频数据的实际偏移时间;determining an actual offset time of the audio data according to the reserved processing time and the actual decoding processing time;
    根据所述实际偏移时间对所述开始解码参考时间进行调整,得到开始解码调整时间。The decoding start reference time is adjusted according to the actual offset time to obtain the decoding start adjustment time.
  8. 根据权利要求7所述的方法,其特征在于,所述获取所述音频数据的预留处理时间,包括:The method according to claim 7, wherein said obtaining the reserved processing time of said audio data comprises:
    根据所述音频数据的开始解码参考时间和所述期望播放时间,确定所述音频数据的预留处理时间。The reserved processing time of the audio data is determined according to the decoding start reference time of the audio data and the expected playing time.
  9. 根据权利要求1所述的方法,其特征在于,所述根据所述基准偏移时间对所述开始解码参考时间进行调整,得到开始解码调整时间,包括:The method according to claim 1, wherein the adjusting the reference time for starting decoding according to the reference offset time to obtain the adjustment time for starting decoding comprises:
    获取所述音频数据的预留处理时间;Acquiring the reserved processing time of the audio data;
    根据所述预留处理时间和所述实际解码处理时间,确定所述音频数据的实际偏移时间;determining an actual offset time of the audio data according to the reserved processing time and the actual decoding processing time;
    根据所述基准偏移时间和所述实际偏移时间,确定所述音频数据的误差偏移时间;determining an error offset time of the audio data according to the reference offset time and the actual offset time;
    根据所述基准偏移时间和所述误差偏移时间对所述开始解码参考时间进行调整,得到开始解码调整时间。The decoding start reference time is adjusted according to the reference offset time and the error offset time to obtain an adjustment start decoding time.
  10. 根据权利要求1所述的方法,其特征在于,所述记录每帧所述音频数据解码处理的实际解码处理时间,包括:The method according to claim 1, wherein the recording the actual decoding processing time of the audio data decoding processing of each frame comprises:
    根据晶振跳动做计时反馈,分别获取所述音频数据的开始解码时间和结束解码时间;Timing feedback is performed according to the beating of the crystal oscillator, and the start decoding time and the end decoding time of the audio data are obtained respectively;
    根据所述开始解码时间和所述结束解码时间,确定所述音频数据的实际解码处理时间。The actual decoding processing time of the audio data is determined according to the decoding start time and the decoding end time.
  11. 根据权利要求1所述的方法,其特征在于,所述根据所述开始解码调整时间和所述实际解码处理时间确定所述音频数据的参考播放时间,包括:The method according to claim 1, wherein the determining the reference playback time of the audio data according to the start decoding adjustment time and the actual decoding processing time comprises:
    获取所述音频数据解码处理的开始解码时间和结束解码时间;Obtain the start decoding time and end decoding time of the audio data decoding process;
    根据所述开始解码调整时间和所述开始解码时间,确定所述音频数据的基础参考播放时间;determining a basic reference playback time of the audio data according to the start decoding adjustment time and the start decoding time;
    根据所述基础参考播放时间和所述结束解码时间,确定所述音频数据的参考播放时间。A reference playback time of the audio data is determined according to the basic reference playback time and the end decoding time.
  12. 根据权利要求1所述的方法,其特征在于,所述获取所述音频数据所对应的期望播放时间,包括:The method according to claim 1, wherein the obtaining the expected playback time corresponding to the audio data comprises:
    直接从所述音频数据中提取所述音频数据的期望播放时间。The expected playing time of the audio data is directly extracted from the audio data.
  13. 根据权利要求1所述的方法,其特征在于,所述获取所述音频数据所对应的基准偏移时间,包括:The method according to claim 1, wherein the acquiring the reference offset time corresponding to the audio data comprises:
    识别所述音频数据的音频数据类型;identifying an audio data type of the audio data;
    获取映射关系集合,所述映射关系集合包括预设音频数据类型与预设基准偏移时间的映射关系;Obtain a mapping relationship set, the mapping relationship set includes a mapping relationship between a preset audio data type and a preset reference offset time;
    根据所述映射关系集合和所述音频数据类型,获取所述音频数据所对应的基准偏移时间。Acquire a reference offset time corresponding to the audio data according to the set of mapping relationships and the audio data type.
  14. 一种音频播放装置,其特征在于,包括:An audio playback device, characterized in that it comprises:
    解码模块,用于对终端设备上待播放的音频数据集进行解码处理,所述音频数据集包括至少一帧音频数据;A decoding module, configured to decode an audio data set to be played on the terminal device, where the audio data set includes at least one frame of audio data;
    记录模块,用于记录每帧所述音频数据解码处理的开始解码参考时间和实际解码处理时间;A recording module, configured to record the start decoding reference time and the actual decoding processing time of the audio data decoding process of each frame;
    获取模块,用于获取所述音频数据所对应的基准偏移时间和期望播放时间;An acquisition module, configured to acquire a reference offset time and an expected playback time corresponding to the audio data;
    调整模块,用于针对每帧音频数据,根据所述基准偏移时间对所述开始解码参考时间进行调整,得到开始解码调整时间;An adjustment module, configured to adjust the decoding start reference time according to the reference offset time for each frame of audio data, to obtain the decoding start adjustment time;
    确定模块,用于根据所述开始解码调整时间和所述实际解码处理时间确定所述音频数据的参考播放时间;A determination module, configured to determine a reference playback time of the audio data according to the start decoding adjustment time and the actual decoding processing time;
    计时模块,用于根据时间变化对所述参考播放时间进行更新;A timing module, configured to update the reference playing time according to time changes;
    播放模块,用于当所述调整后的参考播放时间达到期望播放时间后,根据所述终端设备对所述音频数据进行播放。A playing module, configured to play the audio data according to the terminal device when the adjusted reference playing time reaches a desired playing time.
  15. 根据权利要求14所述的装置,其特征在于,所述音频数据包括当前音频数据,所述获取模块包括:The device according to claim 14, wherein the audio data includes current audio data, and the acquiring module includes:
    采样单元,用于对至少一帧历史音频数据进行采样,所述历史音频数据与所述当前音频数据的数据类型相同;a sampling unit, configured to sample at least one frame of historical audio data, where the historical audio data is of the same data type as the current audio data;
    第一获取单元,用于分别获取每帧所述历史音频数据解码处理后的历史参考播放时间和期望播放时间;The first acquisition unit is used to respectively acquire the historical reference playback time and the expected playback time after decoding the historical audio data of each frame;
    第一确定单元,用于根据所述历史参考播放时间和所述期望播放时间,分别确定每帧所述历史音频数据的偏移时间;A first determining unit, configured to respectively determine the offset time of each frame of the historical audio data according to the historical reference playing time and the expected playing time;
    第二确定单元,用于根据至少一个所述偏移时间,确定所述当前音频数据的基准偏移时间。The second determining unit is configured to determine a reference offset time of the current audio data according to at least one of the offset times.
  16. 根据权利要求15所述的装置,其特征在于,所述第二确定单元包括:The device according to claim 15, wherein the second determining unit comprises:
    第一确定子单元,用于确定至少一个所述偏移时间的平均值,得到平均偏移时间;A first determining subunit, configured to determine an average value of at least one offset time to obtain an average offset time;
    第二确定子单元,用于根据所述平均偏移时间确定所述当前音频数据的基准偏移时间。The second determining subunit is configured to determine the reference offset time of the current audio data according to the average offset time.
  17. 根据权利要求14所述的装置,其特征在于,所述基准偏移时间包括实际偏移时间,所述调整模块包括:The device according to claim 14, wherein the reference offset time comprises an actual offset time, and the adjustment module comprises:
    第二获取单元,用于获取所述音频数据的预留处理时间;a second acquiring unit, configured to acquire the reserved processing time of the audio data;
    第三确定单元,用于根据所述预留处理时间和所述实际解码处理时间,确定所述音频数据的实际偏移时间;A third determining unit, configured to determine the actual offset time of the audio data according to the reserved processing time and the actual decoding processing time;
    第三获取单元,用于根据所述实际偏移时间对所述开始解码参考时间进行调整,得到开始解码调整时间。The third obtaining unit is configured to adjust the decoding start reference time according to the actual offset time to obtain the decoding start adjustment time.
  18. 根据权利要求17所述的装置,其特征在于,所述第二获取单元包括:The device according to claim 17, wherein the second acquiring unit comprises:
    第三确定子单元,用于根据所述音频数据的开始解码参考时间和所述期望播放时间,确定所述音频数据的预留处理时间。The third determining subunit is configured to determine the reserved processing time of the audio data according to the audio data decoding start reference time and the expected playing time.
  19. 一种电子设备,包括存储器,处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述程序时实现:An electronic device, comprising a memory, a processor, and a computer program stored in the memory and operable on the processor, wherein, when the processor executes the program, it realizes:
    对终端设备上待播放的音频数据集进行解码处理,所述音频数据集包括至少一帧音频数据;Decoding the audio data set to be played on the terminal device, the audio data set includes at least one frame of audio data;
    记录每帧所述音频数据解码处理的开始解码参考时间和实际解码处理时间;Record the start decoding reference time and the actual decoding processing time of the audio data decoding processing of each frame;
    获取所述音频数据所对应的基准偏移时间和期望播放时间;Acquiring the reference offset time and expected playing time corresponding to the audio data;
    针对每帧音频数据,根据所述基准偏移时间对所述开始解码参考时间进行调整,得到开始解码调整时间;For each frame of audio data, adjust the decoding start reference time according to the reference offset time to obtain the decoding start adjustment time;
    根据所述开始解码调整时间和所述实际解码处理时间确定所述音频数据的参考播放时间;determining a reference playback time of the audio data according to the start decoding adjustment time and the actual decoding processing time;
    根据时间变化对所述参考播放时间进行更新;updating the reference playing time according to the time change;
    当所述调整后的参考播放时间达到期望播放时间后,根据所述终端设备对所述音频数据进行播放。When the adjusted reference playing time reaches a desired playing time, the audio data is played according to the terminal device.
  20. 一种计算机可读存储介质,其特征在于,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现:A computer-readable storage medium, characterized in that a computer program is stored thereon, wherein when the computer program is executed by a processor, it realizes:
    对终端设备上待播放的音频数据集进行解码处理,所述音频数据集包括至少一帧音频数据;Decoding the audio data set to be played on the terminal device, the audio data set includes at least one frame of audio data;
    记录每帧所述音频数据解码处理的开始解码参考时间和实际解码处理时间;Record the start decoding reference time and the actual decoding processing time of the audio data decoding processing of each frame;
    获取所述音频数据所对应的基准偏移时间和期望播放时间;Acquiring the reference offset time and expected playing time corresponding to the audio data;
    针对每帧音频数据,根据所述基准偏移时间对所述开始解码参考时间进行调整,得到开始解码调整时间;For each frame of audio data, adjust the decoding start reference time according to the reference offset time to obtain the decoding start adjustment time;
    根据所述开始解码调整时间和所述实际解码处理时间确定所述音频数据的参考播放时间;determining a reference playback time of the audio data according to the start decoding adjustment time and the actual decoding processing time;
    根据时间变化对所述参考播放时间进行更新;updating the reference playing time according to the time change;
    当所述调整后的参考播放时间达到期望播放时间后,根据所述终端设备对所述音频数据进行播放。When the adjusted reference playing time reaches a desired playing time, the audio data is played according to the terminal device.
PCT/CN2021/111435 2021-08-09 2021-08-09 Method for playing audio, apparatus, electronic device, and storage medium WO2023015404A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/111435 WO2023015404A1 (en) 2021-08-09 2021-08-09 Method for playing audio, apparatus, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/111435 WO2023015404A1 (en) 2021-08-09 2021-08-09 Method for playing audio, apparatus, electronic device, and storage medium

Publications (1)

Publication Number Publication Date
WO2023015404A1 true WO2023015404A1 (en) 2023-02-16

Family

ID=85199741

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/111435 WO2023015404A1 (en) 2021-08-09 2021-08-09 Method for playing audio, apparatus, electronic device, and storage medium

Country Status (1)

Country Link
WO (1) WO2023015404A1 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060282774A1 (en) * 2005-06-10 2006-12-14 Michele Covell Method and system for improving interactive media response systems using visual cues
US20210065749A1 (en) * 2019-09-04 2021-03-04 Sagemcom Broadband Sas Method of decoding an incoming audio/video stream

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060282774A1 (en) * 2005-06-10 2006-12-14 Michele Covell Method and system for improving interactive media response systems using visual cues
US20210065749A1 (en) * 2019-09-04 2021-03-04 Sagemcom Broadband Sas Method of decoding an incoming audio/video stream
CN112449233A (en) * 2019-09-04 2021-03-05 萨基姆宽带联合股份公司 Method for decoding an incoming audio/video system

Similar Documents

Publication Publication Date Title
US10491371B2 (en) Method and apparatus for time synchronisation in wireless networks
US8233648B2 (en) Ad-hoc adaptive wireless mobile sound system
US8321593B2 (en) Time synchronization of media playback in multiple processes
EP1570368B1 (en) Stream sourcing content delivery system
CN103200461B (en) A kind of multiple stage playback terminal synchronous playing system and player method
US11812103B2 (en) Dynamic playout of transition frames while transitioning between playout of media streams
CN109089130B (en) Method and device for adjusting timestamp of live video
WO2020018190A1 (en) Dynamic control of fingerprinting rate to facilitate time-accurate revision of media content
US9621682B2 (en) Reduced latency media distribution system
KR20210030478A (en) Dynamic reduction of replacement content playback to support aligning the end of the replacement content with the end of the replacement content
TW201802700A (en) Systems and methods for controlling isochronous data streams
TWI507022B (en) Buffer output method for multimedia stream and multimedia stream buffer module
CN111147906A (en) Synchronous playing system and synchronous playing method
CN108495239A (en) Method, apparatus, equipment and the storage medium that more equipment room audio precise synchronizations play
CN109040819A (en) Playback progress synchronous method, device, equipment and storage medium
KR20210078985A (en) Method of display playback synchronization of digital contents in multiple connected devices and apparatus using the same
CN104618737B (en) The slow synchronous method of stream media system clock and its device
CN108259998A (en) Player and control method for playing back, device, electronic equipment and play system
WO2023015404A1 (en) Method for playing audio, apparatus, electronic device, and storage medium
JP4742836B2 (en) Receiver
CN108696762A (en) A kind of synchronous broadcast method, device and system
US20240137202A1 (en) Method and apparatus for time synchronisation in wireless networks

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21953043

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE