[go: up one dir, main page]

CN114416013B - Data transmission method, device, electronic device and computer readable storage medium - Google Patents

Data transmission method, device, electronic device and computer readable storage medium Download PDF

Info

Publication number
CN114416013B
CN114416013B CN202210001992.4A CN202210001992A CN114416013B CN 114416013 B CN114416013 B CN 114416013B CN 202210001992 A CN202210001992 A CN 202210001992A CN 114416013 B CN114416013 B CN 114416013B
Authority
CN
China
Prior art keywords
duration
time interval
preset
data
audio data
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202210001992.4A
Other languages
Chinese (zh)
Other versions
CN114416013A (en
Inventor
卢日星
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen TCL New Technology Co Ltd
Original Assignee
Shenzhen TCL New Technology Co Ltd
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 Shenzhen TCL New Technology Co Ltd filed Critical Shenzhen TCL New Technology Co Ltd
Priority to CN202210001992.4A priority Critical patent/CN114416013B/en
Publication of CN114416013A publication Critical patent/CN114416013A/en
Application granted granted Critical
Publication of CN114416013B publication Critical patent/CN114416013B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/073Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a memory management context, e.g. virtual memory or cache management
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Communication Control (AREA)

Abstract

本申请实施例公开了一种数据发送方法、装置、电子设备及计算机可读存储介质,包括:按照预设播放时长的数据包和预设初始时间间隔向播放端发送解码后的音频数据,预设初始时间间隔小于预设播放时长;确定播放端的缓存空间中可存储音频数据的总存储时长;根据预设初始时间间隔、预设播放时长和总存储时长,确定修改预设初始时间间隔的修改节点;在修改节点,将预设初始时间间隔修改为预设播放时长;根据修改后的预设初始时间间隔向播放端发送数据包,直到所有数据包全部发送完成为止;修改节点的确定无需播放端可用空间数据的实时反馈,减少对传输带宽的占用,简化音频数据传输的控制过程,提高音频数据播报的流畅性。

The embodiments of the present application disclose a data sending method, device, electronic device and computer-readable storage medium, including: sending decoded audio data to a playback end according to a data packet of a preset playback duration and a preset initial time interval, wherein the preset initial time interval is less than the preset playback duration; determining a total storage duration of audio data that can be stored in a cache space of the playback end; determining a modification node for modifying the preset initial time interval according to the preset initial time interval, the preset playback duration and the total storage duration; at the modification node, modifying the preset initial time interval to the preset playback duration; sending data packets to the playback end according to the modified preset initial time interval until all data packets are sent; the determination of the modification node does not require real-time feedback of available space data of the playback end, thereby reducing the occupancy of the transmission bandwidth, simplifying the control process of audio data transmission, and improving the fluency of audio data broadcasting.

Description

Data transmission method, device, electronic equipment and computer readable storage medium
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a data transmission method, a data transmission device, electronic equipment and a computer readable storage medium.
Background
With the rapid development of computer technology, the variety of voice broadcasting devices is increasing, and the quality of one voice broadcasting device is evaluated, which mainly depends on the smoothness of the broadcasting of the voice broadcasting device.
The voice broadcasting device mainly comprises two processes, namely a sending process after decoding audio data and a broadcasting process after receiving the decoded audio data, wherein the phenomenon of sound loss occurs when the audio data is sent too fast and the phenomenon of blocking occurs too slowly, so that a flow control protocol can be established between sending and broadcasting for guaranteeing the smoothness of voice broadcasting, the sending size and speed of the audio data are controlled according to the size of a buffer space of a real-time transmission broadcasting end, the transmission of available memory data of the buffer space needs to be carried out in real time, the transmission bandwidth is occupied, and the control process is complex.
Disclosure of Invention
The embodiment of the application provides a data sending method, a data sending device, electronic equipment and a computer readable storage medium, which can simplify the control process of audio data transmission and reduce the occupation of transmission bandwidth.
The embodiment of the application provides a data transmission method, which comprises the following steps:
Transmitting the decoded audio data to a playing end according to a data packet with preset playing duration and a preset initial time interval, wherein the preset initial time interval is smaller than the preset playing duration;
determining the total storage time length of the storable audio data in the cache space of the playing end;
determining a modification node for modifying the preset initial time interval according to the preset initial time interval, the preset playing time length and the total storage time length;
at the modification node, modifying the preset initial time interval into a preset playing duration;
and sending the data packets to the playing end according to the modified preset initial time interval until all the data packets are sent completely.
Correspondingly, the embodiment of the application also provides a data sending device, which comprises:
the initial sending module is used for sending the decoded audio data to the playing end according to the data packet with the preset playing duration and the preset initial time interval, wherein the preset initial time interval is smaller than the preset playing duration;
the time length determining module is used for determining the total storage time length of the storable audio data in the cache space of the playing end;
The node determining module is used for determining a modifying node for modifying the preset initial time interval according to the preset initial time interval, the preset playing time length and the total storage time length;
the modification interval module is used for modifying the preset initial time interval into the preset playing duration at the modification node;
and the target sending module is used for sending the data packets to the playing end according to the modified preset initial time interval until all the data packets are sent completely.
Optionally, in some embodiments of the present invention, the node determining module includes:
The first determining unit is used for determining the superposition playing time length of the superposition of the audio data to be played in the buffer space in each preset initial time interval according to the preset initial time interval and the preset playing time length;
And the second determining unit is used for determining a modification node for modifying the preset initial time interval according to the overlapped playing time length and the total storage time length.
Optionally, in some embodiments of the present invention, the modifying node includes accumulating a target number of transmissions of the transmitted data packet, and the second determining unit includes:
The first determining subunit is used for determining the critical sending times of the data packet according to the overlapped playing time length and the total storage time length;
And the second determining subunit is used for determining the target sending times of sending the data packet according to the critical sending times, wherein the target sending times are smaller than or equal to the critical sending times.
Optionally, in some embodiments of the present invention, the modification node includes a total transmittable data duration corresponding to transmittable audio data, and the second determining unit includes:
A third determining subunit, configured to determine a critical sending number of times that the data packet can be sent according to the overlapping playing duration and the total storage duration;
a fourth determining subunit, configured to determine a critical cumulative sending duration that the data packet can be sent according to the critical sending times and a preset playing duration;
And the fifth determining subunit is used for determining the total time length of the transmittable data according to the critical accumulated transmission time length, wherein the total time length of the transmittable data is smaller than or equal to the critical accumulated transmission time length.
Optionally, in some embodiments of the present invention, the apparatus further comprises:
The first modification unit is used for modifying the preset playing time length to obtain a preset playing modification time length, wherein the preset playing modification time length is longer than or smaller than the preset playing time length;
the modification interval module includes:
and the second modification unit is used for modifying the preset initial time interval into a preset play modification duration.
Optionally, in some embodiments of the present invention, the apparatus further comprises:
The first acquisition unit is used for acquiring the consumed time of the audio data in the transmission process of the data transmission link;
A third determining unit, configured to determine an actual transmission time interval in which audio data is actually required to be transmitted according to a preset initial time interval and a consumed time;
An initial transmission module, comprising:
and the sending unit is used for sending the decoded audio data to the playing end according to the data packet with the preset playing time length, the actual sending time interval and the data transmission link.
Optionally, in some embodiments of the present invention, the duration determination module:
The second acquisition unit is used for acquiring the data format and the code rate of the audio data and the memory of the cache space;
and the fourth determining unit is used for determining the total storage duration of the audio data which can be stored in the buffer memory space according to the memory, the data format and the code rate.
The embodiment of the application divides the audio data transmission into a first stage and a second stage, in the first stage, the time interval for transmitting the audio is set to be smaller than the playing time length of each data packet, so that the playing end can still store the audio data with a certain playing time length after playing the data in each time interval, the phenomenon of blocking caused by the lack of the data of the playing end is avoided, in the second stage, the modifying node of the time interval is determined according to the total storage time length of the caching space of the playing end and the time interval and the playing time length of the data packet in the first stage, and in the modifying node, the time interval and the playing time length are adjusted to be the same, so that the playing end receives and plays the audio data to reach the balance of input and output, the overflow of the caching space data is prevented, the audio data is stored in the caching space is ensured, and the smooth playing of the audio of the playing end is realized.
Drawings
In order to more clearly illustrate the technical solutions of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic view of a scenario of a data transmission method provided by an embodiment of the present application;
Fig. 2 is a schematic flow chart of a data transmission method according to an embodiment of the present application;
Fig. 3 is a schematic structural diagram of a data transmitting apparatus according to an embodiment of the present application;
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made more apparent and fully hereinafter with reference to the accompanying drawings, in which some, but not all embodiments of the application are shown. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to fall within the scope of the application.
The embodiment of the application provides a data transmission method, a data transmission device, electronic equipment and a storage medium. Specifically, the embodiment of the application provides a data transmitting device suitable for electronic equipment, wherein the electronic equipment can be a terminal or a server and other equipment. The terminal can be equipment with a voice broadcasting function, such as an air conditioner, a smart phone, a smart television, a sound box, a loudspeaker and the like. The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs, content Delivery Network), basic cloud computing services such as big data and artificial intelligent platforms, and the servers may be directly or indirectly connected through wired or wireless communication modes.
It may be understood that the data transmission method in the embodiment of the present application may be performed on a terminal, may be performed on a server, or may be performed jointly by the terminal and the server.
For example, referring to fig. 1, in the embodiment of the present application, a method for jointly executing a data transmission by a terminal and a server is taken as an example, where other devices may be added to assist in completing the data transmission method on the basis of the terminal and the server, and the types of the other devices are not limited herein, and the specific execution process between the terminal and the server is as follows:
the main control chip in the terminal equipment A acquires the audio data from the server B, decodes the acquired audio data and then sends the decoded audio data to the voice chip of the terminal equipment A, and the voice chip broadcasts the decoded audio data.
When the main control chip sends the decoded audio data, the decoded audio data is sent to the voice chip (playing end) according to the data packet with the preset playing time length and the preset time interval in the first stage, and then the second stage is sent after the modified node is reached, wherein when the second stage is sent, the time interval for sending the data packet is adjusted to be the same as the playing time length corresponding to the data packet, so that the time length for the voice chip to receive the audio data and the time length for playing the audio data in the second stage are balanced, and the audio data sending in the second stage is maintained until all the data packets are sent.
The time interval for sending the audio data in the first stage is smaller than the playing time corresponding to the data packet, and the audio data with fixed playing time length is sequentially stored in the voice chip, so that the voice chip is ensured to continuously store the audio data in the whole broadcasting process, and the fluency of audio broadcasting is ensured.
After continuously storing the audio data with a fixed playing duration, the available storage space in the voice chip is smaller and smaller, so as to avoid the overflow of the data in the storage space and further cause the abnormality such as noise and the like in the audio data broadcasting, the modification node of the time interval can be determined according to the capacity of the storage space of the voice chip, for example, when the storage space is full is determined according to the transmission time interval and the playing duration of the first stage and the memory of the storage space, and the full time is the modification node corresponding to the transmission time interval.
The time interval for transmitting the audio data, the playing time of the data packet and the memory of the voice chip in the first stage are determined, so that the modification node can be predetermined, the time interval for transmitting the audio data is automatically triggered after the modification node is reached, the control process for transmitting the audio data is automatically completed, real-time transmission of the available capacity of the buffer space is not needed in the process, the control complexity of the transmission process is reduced, and the transmission bandwidth is saved.
The embodiment of the application divides the audio data transmission into a first stage and a second stage, in the first stage, the time interval for transmitting the audio is set to be smaller than the playing time length of each data packet, so that the playing end can still store the audio data with a certain playing time length after playing the data in each time interval, the phenomenon of blocking caused by the lack of the data of the playing end is avoided, in the second stage, the modifying node of the time interval is determined according to the total storage time length of the caching space of the playing end and the time interval and the playing time length of the data packet in the first stage, and in the modifying node, the time interval and the playing time length are adjusted to be the same, so that the playing end receives and plays the audio data to reach the balance of input and output, the overflow of the caching space data is prevented, the audio data is stored in the caching space is ensured, and the smooth playing of the audio of the playing end is realized.
The following will describe in detail. It should be noted that the following description order of embodiments is not a limitation of the priority order of embodiments.
Referring to fig. 2, fig. 2 is a flowchart of a data transmission method according to an embodiment of the application. The specific flow of the data transmission method can be as follows:
101. And sending the decoded audio data to a playing end according to the data packet with the preset playing duration and the preset initial time interval, wherein the preset initial time interval is smaller than the preset playing duration.
The method comprises the steps that a data packet with preset playing time length refers to audio data to be transmitted according to the fixed playing time length, and the audio data with the fixed playing time length is sequentially sent to a playing end based on a preset initial time interval, wherein the playing end can broadcast the decoded audio data after receiving the decoded audio data.
The preset playing duration and the preset initial time interval can be flexibly set according to actual needs, and are not limited herein, wherein in the embodiment of the application, the preset initial time interval is set to be smaller than the preset playing duration, so that the playing duration of the playing end is smaller than the playing duration of the received audio data in each time interval, the playing end can still store part of the audio data to be played with the remaining duration after receiving the data each time and playing the audio data in the time interval, and the playing end can continuously and stably superimpose the audio data with the fixed playing duration, so that the playing end can smoothly play.
In the embodiment of the application, the audio data is transmitted according to the data segments (data packets) with fixed playing time length, the sequence of the audio data broadcasting frames is not broken, and the audio data is still transmitted according to the sequence, and the playing end also broadcasts according to the broadcasting frames of the audio data when broadcasting the audio data, that is, the audio data received in each interval is not broadcast in real time, for example, the audio data output mode of the broadcasting end is similar to the first-in first-out mode in the queue.
Wherein, since the audio data consumes a part of time on the transmission link during the transmission process, the time interval for actually starting to transmit the data needs to be actually adjusted for the consumed time on the transmission link, that is, optionally, in some embodiments, the method further includes:
acquiring consumed time of audio data in the transmission process of the audio data on a data transmission link;
determining an actual transmission time interval for actually transmitting the audio data according to a preset initial time interval and consumed time;
The step of transmitting the decoded audio data to the playing end according to the data packet with the preset playing duration and the preset initial time interval may specifically include:
and transmitting the decoded audio data to a playing end according to the data packet with the preset playing duration, the actual transmitting time interval and the data transmission link.
In the embodiment of the application, the preset initial time interval is set according to the time when the playing end receives the audio data, and the preset initial time interval and the preset playing time length reach a certain balance according to the preset initial time interval, but after the sending end sends the data, the audio data can be transmitted on the data transmission link for a certain time in the transmission process, so that the time actually received by the receiving end is influenced by the transmission time of the audio data.
102. And determining the total storage time length of the audio data which can be stored in the cache space of the playing end.
Because the time interval of audio data transmission is smaller than the playing time length, audio data with a certain playing time length can be continuously overlapped and accumulated in the buffer space of the playing end, but the memory of the buffer space is fixed, so that when the buffer space is full of audio data (modifying nodes), the audio data is required to be adjusted and sent, and overflow of the audio data in the buffer space is prevented.
Because the audio data is transmitted according to a fixed time interval and a fixed playing time length, the total storage time length capable of storing the audio data in the buffer memory space of the playing end is required to be determined, the time interval for transmitting the audio data is adjusted according to the total storage time length, and a reference basis is provided for the subsequent balance of the audio data receiving and the audio data broadcasting of the playing end.
The playing time length of the audio data that can be stored in the buffer space is different for the audio data with different data formats and code rates, so that the playing time length that the buffer space can buffer the audio data can be determined according to the formats and the code rates of the audio data, that is, optionally, in some embodiments, the step of determining the total storage time length of the audio data that can be stored in the buffer space of the playing end includes:
acquiring a data format and a code rate of audio data and a memory of a cache space;
and determining the total storage duration of the audio data stored in the buffer memory space according to the memory, the data format and the code rate.
The data format and the code rate of the audio data are important parameters for judging the time length of the buffer space capable of storing the audio data, but the method is not limited to the fact that the total storage time length is judged only through the data format and the code rate, wherein corresponding judging conditions or factors can be added for achieving higher accuracy of the total storage time length.
Among them, the data format of the audio data includes moving picture experts compression standard audio layer 3 (MP 3, moving Picture Experts Group Audio Layer III), moving picture experts group (MPEG, moving Pictures Experts Group), or window media audio (WMA, windows Media Audio), etc.
103. And determining a modification node for modifying the preset initial time interval according to the preset initial time interval, the preset playing time length and the total storage time length.
The modification node is a node which is to be full of audio data in the cache space, and after the node is reached, the modification node can prevent the overflow of the audio data in the cache space by triggering the adjustment of the preset initial time interval, so that the playing end can smoothly broadcast the audio data.
The specific node where the audio data is stored in the buffer space can be determined by the time interval for sending the audio data, the playing time of the data packet and the total storage time of the buffer space.
Specifically, in the embodiment of the present application, by sending the time interval of the audio data and the playing duration of the data packet, the single accumulated and overlapped audio data playing duration in the buffer space in each time interval may be determined, and by overlapping the playing duration and the total storage duration of the buffer space, the node full of the audio data in the buffer space may be determined, where the node is a modification node that is expected to adjust the time interval of sending the audio data in the embodiment of the present application, that is, optionally, in some embodiments, the step of "determining a modification node for modifying the preset initial time interval" includes:
determining the superposition playing time length of superposition of the audio data to be played in the buffer space in each preset initial time interval according to the preset initial time interval and the preset playing time length;
And determining a modification node for modifying the preset initial time interval according to the superimposed playing time length and the total storage time length.
The overlapping playing duration can be obtained by calculating a difference value between a preset playing duration and a preset initial time interval, for example, the audio data is sent at 30ms intervals, the playing duration corresponding to the data packet is 60ms, the audio data is broadcasted for 30ms in each interval time, and the audio data with the duration of 30ms is overlapped in the buffer space.
The node full of the buffer space can be determined by superposing the playing time length of each time interval and the total storage time length of the buffer space, and the node is the modification node expected to be adjusted in the embodiment of the application.
Wherein, the modifying node may be a number of times of sending the audio data, that is, the number of times of sending the audio data according to the preset initial time interval, that is, optionally, in some embodiments, the step of "determining a modifying node for modifying the preset initial time interval" includes:
determining the critical sending times of the data packet according to the overlapped playing time length and the total storage time length;
And determining the target transmission times of the data packet according to the critical transmission times, wherein the target transmission times are smaller than or equal to the critical transmission times.
After the overlapping playing time length and the total storage time length are determined, the maximum sending times (critical sending times) of the audio data which can be sent can be determined, namely, when the maximum sending times are reached, the buffer space is full of the audio data because of the overlapping playing time length, therefore, the target sending times can be determined according to the critical sending times, the condition that the audio data overflows in the buffer space after the audio data are sent according to the target sending times cannot occur, namely, the target sending times are selected to be smaller than or equal to the critical sending times.
Therefore, after the audio data is sent according to the preset initial time interval and the preset playing time length, the preset initial time interval can be adjusted after the number of times of sending the audio data reaches the target sending number of times, so that overflow of the audio data in the buffer space is prevented, and smooth playing of the audio data at the playing end is ensured.
In the embodiment of the application, the transmission times only need to be recorded, and the transmission is controlled according to the recording result, and the available space data of the buffer space transmitted by the playing end does not need to be received in the transmission process, so that the occupation of the transmission bandwidth of the audio data is reduced, and meanwhile, the complexity of the transmission control of the audio data is also reduced.
The memory size of the buffer space is fixed, and the playing time length corresponding to the audio data sent by each time interval is also fixed, so that the total time length of the audio data sent by the sending end can be determined when the buffer space is about to be full of data, and the total time length of the audio data sent by the sending end can be used as a modification node for adjusting the preset initial time interval when the buffer space is about to be full;
That is, the modification node may also be an audio data total duration corresponding to the audio data sent by the sending end, and when the audio data total duration sent by the sending end reaches a certain value, the adjustment and modification of the preset initial time interval are performed, that is, optionally, in some embodiments, the step of "determining a modification node for modifying the preset initial time interval" includes:
determining the critical sending times of the data packet according to the overlapped playing time length and the total storage time length;
Determining critical accumulated sending duration for sending the data packet according to the critical sending times and the preset playing duration;
And determining the total time length of the transmittable data according to the critical accumulated transmission time length, wherein the total time length of the transmittable data is smaller than or equal to the critical accumulated transmission time length.
The total transmittable data duration (i.e., the total transmittable data duration) may be determined according to the number of times of transmission of the audio data and the playing duration of the audio data transmitted each time when the buffer space is full, for example, the product of the number of times of transmission and the playing duration of the audio data transmitted each time is taken as the total transmittable data duration (total transmittable data duration) of the transmitting end when the buffer space is full, which is understood as that after the transmitting end transmits the audio data of the total transmittable data duration to the playing end, the buffer space of the playing end will be full of the audio data.
The total time length of the transmittable data can be determined according to the preset playing time length of the data packet and the total storage time of the buffer space before the audio data is transmitted, so that the time interval for transmitting the audio data can be adjusted and controlled according to the actual time length of the transmitting end for transmitting the audio data, adjustment judgment is not needed according to feedback of the playing end, and transmission bandwidth occupied by the feedback process is saved.
104. And at the modification node, modifying the preset initial time interval into a preset playing duration.
The node is modified, namely, the node with the full cache space of the playing end is adjusted to be the same as the preset playing time length, so that the playing end can realize the balance of receiving audio data and playing the audio data, namely, the playing time length of the audio data added by the playing end in one time interval is equal to the playing time length corresponding to the audio data played in the time interval, and the smoothness of audio broadcasting is achieved while the overflow of the audio data is prevented.
The balance of receiving and broadcasting by the broadcasting terminal can be achieved only by adjusting the preset initial time interval to be the same as the preset broadcasting time length, so in the embodiment of the application, the preset broadcasting time length can be adjusted at the modification node, that is, optionally, in some embodiments, the method further comprises:
Modifying the preset playing time length to obtain a preset playing modification time length, wherein the preset playing modification time length is longer or shorter than the preset playing time length;
Then, the step of "determining a modification node for modifying the preset initial time interval" includes:
And modifying the preset initial time interval into a preset play modification time length.
The preset playing duration may be adjusted to be the same as the preset initial time interval, or the preset playing duration may be adjusted to be other values, and then the preset initial time interval is correspondingly adjusted.
The above adjustment method for the preset initial time interval increases flexibility of realization of fluency of the audio data.
105. And sending the data packets to the playing end according to the modified preset initial time interval until all the data packets are sent completely.
According to the adjusted preset initial time interval, audio data are sent to the playing end, so that the playing end can achieve balance of input and output during audio data receiving and playing and time reporting, overflow of the audio data is prevented, and fluency of the audio data playing and reporting of the playing end is improved.
The embodiment of the application divides the audio data transmission into a first stage and a second stage, in the first stage, the time interval for transmitting the audio is set to be smaller than the playing time length of each data packet, so that the playing end can still store the audio data with a certain playing time length after playing the data in each time interval, the phenomenon of blocking caused by the lack of the data by the playing end is avoided, in the second stage, the modifying node of the time interval is determined according to the total storage time length of the caching space of the playing end and the time interval and the playing time length of the data packet in the first stage, and in the modifying node, the time interval and the playing time length are adjusted to be the same, so that the playing end receives and plays the audio data to reach the balance of input and output, the overflow of the caching space data is prevented, the audio data is stored in the caching space is ensured, the smooth playing of the audio of the playing end is realized, the determining of the modifying node is not required to be determined according to the real-time feedback of the playing end, and the occupation of the audio data transmission bandwidth is reduced.
In order to facilitate better implementation of the data transmission method, the application also provides a data transmission device based on the data transmission method. Wherein the meaning of the nouns is the same as in the data transmission method, and specific implementation details can refer to the description in the method embodiment.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a data transmission device provided by the present application, where the data transmission device may include an initial transmission module 201, a duration determination module 202, a node determination module 203, a modification interval module 204, and a target transmission module 205, and may specifically be as follows:
The initial sending module 201 is configured to send the decoded audio data to the playing end according to a data packet with a preset playing duration and a preset initial time interval, where the preset initial time interval is smaller than the preset playing duration.
The method comprises the steps that a data packet with preset playing time length refers to audio data to be transmitted according to the fixed playing time length, and the audio data with the fixed playing time length is sequentially sent to a playing end based on a preset initial time interval, wherein the playing end can broadcast the decoded audio data after receiving the decoded audio data.
The preset playing duration and the preset initial time interval can be flexibly set according to actual needs, and are not limited herein, wherein in the embodiment of the application, the preset initial time interval is set to be smaller than the preset playing duration, so that the playing duration of the playing end is smaller than the playing duration of the received audio data in each time interval, the playing end can still store part of the audio data to be played with the remaining duration after receiving the data each time and playing the audio data in the time interval, and the playing end can continuously and stably superimpose the audio data with the fixed playing duration, so that the playing end can smoothly play.
Optionally, in some embodiments of the present invention, the apparatus further comprises:
The first acquisition unit is used for acquiring the consumed time of the audio data in the transmission process of the data transmission link;
A third determining unit, configured to determine an actual transmission time interval in which audio data is actually required to be transmitted according to a preset initial time interval and a consumed time;
An initial transmission module, comprising:
and the sending unit is used for sending the decoded audio data to the playing end according to the data packet with the preset playing time length, the actual sending time interval and the data transmission link.
In the embodiment of the application, the preset initial time interval is set according to the time when the playing end receives the audio data, and the preset initial time interval and the preset playing time length reach a certain balance according to the preset initial time interval, but after the sending end sends the data, the audio data can be transmitted on the data transmission link for a certain time in the transmission process, so that the time actually received by the receiving end is influenced by the transmission time of the audio data.
The duration determining module 202 is configured to determine a total storage duration of storable audio data in a buffer space of the playing end.
Because the time interval of audio data transmission is smaller than the playing time length, audio data with a certain playing time length can be continuously overlapped and accumulated in the buffer space of the playing end, but the memory of the buffer space is fixed, so that when the buffer space is full of audio data (modifying nodes), the audio data is required to be adjusted and sent, and overflow of the audio data in the buffer space is prevented.
Because the audio data is transmitted according to a fixed time interval and a fixed playing time length, the total storage time length capable of storing the audio data in the buffer memory space of the playing end is required to be determined, the time interval for transmitting the audio data is adjusted according to the total storage time length, and a reference basis is provided for the subsequent balance of the audio data receiving and the audio data broadcasting of the playing end.
Optionally, in some embodiments of the present invention, the duration determination module:
The second acquisition unit is used for acquiring the data format and the code rate of the audio data and the memory of the cache space;
and the fourth determining unit is used for determining the total storage duration of the audio data which can be stored in the buffer memory space according to the memory, the data format and the code rate.
The playing time length of the audio data which can be stored in the buffer space is different for the audio data with different data formats and code rates, so that the playing time length of the audio data which can be buffered in the buffer space can be determined according to the formats and the code rates of the audio data.
The node determining module 203 is configured to determine a modification node for modifying the preset initial time interval according to the preset initial time interval, the preset playing duration, and the total storage duration.
The modification node is a node which is to be full of audio data in the cache space, and after the node is reached, the modification node can prevent the overflow of the audio data in the cache space by triggering the adjustment of the preset initial time interval, so that the playing end can smoothly broadcast the audio data.
The specific node where the audio data is stored in the buffer space can be determined by the time interval for sending the audio data, the playing time of the data packet and the total storage time of the buffer space.
Optionally, in some embodiments of the present invention, the node determining module includes:
The first determining unit is used for determining the superposition playing time length of the superposition of the audio data to be played in the buffer space in each preset initial time interval according to the preset initial time interval and the preset playing time length;
And the second determining unit is used for determining a modification node for modifying the preset initial time interval according to the overlapped playing time length and the total storage time length.
The overlapping playing duration can be obtained by calculating a difference value between a preset playing duration and a preset initial time interval, for example, the audio data is sent at 30ms intervals, the playing duration corresponding to the data packet is 60ms, the audio data is broadcasted for 30ms in each interval time, and the audio data with the duration of 30ms is overlapped in the buffer space.
The node full of the buffer space can be determined by superposing the playing time length of each time interval and the total storage time length of the buffer space, and the node is the modification node expected to be adjusted in the embodiment of the application.
Optionally, in some embodiments of the present invention, the modifying node includes accumulating a target number of transmissions of the transmitted data packet, and the second determining unit includes:
The first determining subunit is used for determining the critical sending times of the data packet according to the overlapped playing time length and the total storage time length;
And the second determining subunit is used for determining the target sending times of sending the data packet according to the critical sending times, wherein the target sending times are smaller than or equal to the critical sending times.
After the overlapping playing time length and the total storage time length are determined, the maximum sending times (critical sending times) of the audio data which can be sent can be determined, namely, when the maximum sending times are reached, the buffer space is full of the audio data because of the overlapping playing time length, therefore, the target sending times can be determined according to the critical sending times, the condition that the audio data overflows in the buffer space after the audio data are sent according to the target sending times cannot occur, namely, the target sending times are selected to be smaller than or equal to the critical sending times.
Therefore, after the audio data is sent according to the preset initial time interval and the preset playing time length, the preset initial time interval can be adjusted after the number of times of sending the audio data reaches the target sending number of times, so that overflow of the audio data in the buffer space is prevented, and smooth playing of the audio data at the playing end is ensured.
In the embodiment of the application, the transmission times only need to be recorded, and the transmission is controlled according to the recording result, and the available space data of the buffer space transmitted by the playing end does not need to be received in the transmission process, so that the occupation of the transmission bandwidth of the audio data is reduced, and meanwhile, the complexity of the transmission control of the audio data is also reduced.
Optionally, in some embodiments of the present invention, the modification node includes a total transmittable data duration corresponding to transmittable audio data, and the second determining unit includes:
A third determining subunit, configured to determine a critical sending number of times that the data packet can be sent according to the overlapping playing duration and the total storage duration;
a fourth determining subunit, configured to determine a critical cumulative sending duration that the data packet can be sent according to the critical sending times and a preset playing duration;
And the fifth determining subunit is used for determining the total time length of the transmittable data according to the critical accumulated transmission time length, wherein the total time length of the transmittable data is smaller than or equal to the critical accumulated transmission time length.
The total transmittable data duration (i.e., the total transmittable data duration) may be determined according to the number of times of transmission of the audio data and the playing duration of the audio data transmitted each time when the buffer space is full, for example, the product of the number of times of transmission and the playing duration of the audio data transmitted each time is taken as the total transmittable data duration (total transmittable data duration) of the transmitting end when the buffer space is full, which is understood as that after the transmitting end transmits the audio data of the total transmittable data duration to the playing end, the buffer space of the playing end will be full of the audio data.
The total time length of the transmittable data can be determined according to the preset playing time length of the data packet and the total storage time of the buffer space before the audio data is transmitted, so that the time interval for transmitting the audio data can be adjusted and controlled according to the actual time length of the transmitting end for transmitting the audio data, adjustment judgment is not needed according to feedback of the playing end, and transmission bandwidth occupied by the feedback process is saved.
The modification interval module 204 is configured to modify, at the modification node, the preset initial time interval to a preset play duration.
The node is modified, namely, the node with the full cache space of the playing end is adjusted to be the same as the preset playing time length, so that the playing end can realize the balance of receiving audio data and playing the audio data, namely, the playing time length of the audio data added by the playing end in one time interval is equal to the playing time length corresponding to the audio data played in the time interval, and the smoothness of audio broadcasting is achieved while the overflow of the audio data is prevented.
Optionally, in some embodiments of the present invention, the apparatus further comprises:
The first modification unit is used for modifying the preset playing time length to obtain a preset playing modification time length, wherein the preset playing modification time length is longer than or smaller than the preset playing time length;
the modification interval module includes:
and the second modification unit is used for modifying the preset initial time interval into a preset play modification duration.
The preset playing duration may be adjusted to be the same as the preset initial time interval, or the preset playing duration may be adjusted to be other values, and then the preset initial time interval is correspondingly adjusted.
The above adjustment method for the preset initial time interval increases flexibility of realization of fluency of the audio data.
The target sending module 205 is configured to send data packets to the playing end according to the modified preset initial time interval until all the data packets are sent completely.
According to the adjusted preset initial time interval, audio data are sent to the playing end, so that the playing end can achieve balance of input and output during audio data receiving and playing and time reporting, overflow of the audio data is prevented, and fluency of the audio data playing and reporting of the playing end is improved.
In the embodiment of the application, the initial sending module 201 sends the decoded audio data to the playing end according to the data packet with the preset playing time length and the preset initial time interval, the time length determining module 202 obtains the total storage time length capable of storing the audio data in the buffer space of the playing end, the node determining module 203 determines the modification node for modifying the preset initial time interval according to the preset initial time interval, the preset playing time length and the total storage time length, the modification interval module 204 modifies the preset initial time interval at the modification node to keep the preset initial time interval identical with the preset playing time length, and finally the target sending module 205 sends the data packet to the playing end according to the modified preset initial time interval until all the data packets are completely sent.
The embodiment of the application divides the audio data transmission into a first stage and a second stage, in the first stage, the time interval for transmitting the audio is set to be smaller than the playing time length of each data packet, so that the playing end can still store the audio data with a certain playing time length after playing the data in each time interval, the phenomenon of blocking caused by the lack of the data of the playing end is avoided, in the second stage, the modifying node of the time interval is determined according to the total storage time length of the caching space of the playing end and the time interval and the playing time length of the data packet in the first stage, and in the modifying node, the time interval and the playing time length are adjusted to be the same, so that the playing end receives and plays the audio data to achieve the balance of input and output, the overflow of the caching space data is prevented, the audio data is stored in the caching space is ensured, the smooth playing of the audio of the playing end is realized, the determining of the modifying node is not required to be determined according to the real-time feedback of the playing end, and the occupation of the transmission bandwidth of the audio data is reduced.
In addition, the application further provides an electronic device, as shown in fig. 4, which shows a schematic structural diagram of the electronic device according to the application, specifically:
The electronic device may include one or more processing cores 'processors 401, one or more computer-readable storage media's memory 402, power supply 403, and input unit 404, among other components. Those skilled in the art will appreciate that the electronic device structure shown in fig. 4 is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or may be arranged in different components. Wherein:
The processor 401 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 402, and calling data stored in the memory 402, thereby performing overall monitoring of the electronic device. Optionally, the processor 401 may include one or more processing cores, and preferably the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, an application program, etc., and the modem processor mainly processes wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by executing the software programs and modules stored in the memory 402. The memory 402 may mainly include a storage program area that may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), etc., and a storage data area that may store data created according to the use of the electronic device, etc. In addition, memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
The electronic device further comprises a power supply 403 for supplying power to the various components, preferably the power supply 403 may be logically connected to the processor 401 by a power management system, so that functions of managing charging, discharging, and power consumption are performed by the power management system. The power supply 403 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The electronic device may further comprise an input unit 404, which input unit 404 may be used for receiving input digital or character information and generating keyboard, mouse, joystick, optical or trackball signal inputs in connection with user settings and function control.
Although not shown, the electronic device may further include a display unit or the like, which is not described herein. In particular, in this embodiment, the processor 401 in the electronic device loads executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 executes the application programs stored in the memory 402, so as to implement various functions as follows:
The method comprises the steps of sending decoded audio data to a playing end according to a data packet with preset playing time length and a preset initial time interval, determining the total storage time length of the audio data which can be stored in a buffer space of the playing end, determining a modifying node for modifying the preset initial time interval according to the preset initial time interval, the preset playing time length and the total storage time length, modifying the preset initial time interval to the preset playing time length at the modifying node, and sending the data packet to the playing end according to the modified preset initial time interval until all data packets are sent completely.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
The embodiment of the application divides the audio data transmission into a first stage and a second stage, in the first stage, the time interval for transmitting the audio is set to be smaller than the playing time length of each data packet, so that the playing end can still store the audio data with a certain playing time length after playing the data in each time interval, the phenomenon of blocking caused by the lack of the data by the playing end is avoided, in the second stage, the modifying node of the time interval is determined according to the total storage time length of the caching space of the playing end and the time interval and the playing time length of the data packet in the first stage, and in the modifying node, the time interval and the playing time length are adjusted to be the same, so that the playing end receives and plays the audio data to reach the balance of input and output, the overflow of the caching space data is prevented, the audio data is stored in the caching space is ensured, the smooth playing of the audio of the playing end is realized, the determining of the modifying node is not required to be determined according to the real-time feedback of the playing end, and the occupation of the audio data transmission bandwidth is reduced.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, the present application provides a computer readable storage medium having stored thereon a computer program that can be loaded by a processor to perform the steps of any of the data transmission methods provided by the present application. For example, the instructions may perform the steps of:
The method comprises the steps of sending decoded audio data to a playing end according to a data packet with preset playing time length and a preset initial time interval, determining the total storage time length of the audio data which can be stored in a buffer space of the playing end, determining a modifying node for modifying the preset initial time interval according to the preset initial time interval, the preset playing time length and the total storage time length, modifying the preset initial time interval to the preset playing time length at the modifying node, and sending the data packet to the playing end according to the modified preset initial time interval until all data packets are sent completely.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
The storage medium may include a Read Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, an optical disk, or the like.
The instructions stored in the storage medium can execute any step in the data transmission provided by the present application, so that the beneficial effects of any data transmission method provided by the present application can be achieved, and detailed descriptions of the foregoing embodiments are omitted herein.
The foregoing describes a data transmission method, apparatus, electronic device and storage medium in detail, and specific examples are provided herein to illustrate the principles and embodiments of the present application, and the above examples are provided to assist in understanding the method and core ideas of the present application, and meanwhile, to those skilled in the art, according to the ideas of the present application, there are various changes in the specific embodiments and application scope, so that the disclosure should not be construed as limiting the present application.

Claims (7)

1.一种数据发送方法,其特征在于,包括:1. A data transmission method, comprising: 按照预设播放时长的数据包和预设初始时间间隔向播放端发送解码后的音频数据,所述预设初始时间间隔小于所述预设播放时长;Sending the decoded audio data to the playback end according to the data packet of preset playback duration and the preset initial time interval, wherein the preset initial time interval is less than the preset playback duration; 确定所述播放端的缓存空间中可存储所述音频数据的总存储时长;Determine the total storage time of the audio data that can be stored in the cache space of the playback end; 根据所述预设初始时间间隔、所述预设播放时长和所述总存储时长,确定修改所述预设初始时间间隔的修改节点,所述修改节点是所述缓存空间将要存满音频数据的节点;Determining a modification node for modifying the preset initial time interval according to the preset initial time interval, the preset playback duration, and the total storage duration, wherein the modification node is a node at which the cache space is about to be full of audio data; 在所述修改节点,将所述预设初始时间间隔修改为所述预设播放时长;At the modification node, modifying the preset initial time interval to the preset playback duration; 根据所述修改后的预设初始时间间隔向所述播放端发送所述数据包,直到所有数据包全部发送完成为止;Sending the data packets to the playback end according to the modified preset initial time interval until all data packets are sent; 所述确定修改所述预设初始时间间隔的修改节点,包括:The determining of a modification node for modifying the preset initial time interval includes: 根据所述预设初始时间间隔和所述预设播放时长,确定每个所述预设初始时间间隔内,所述缓存空间中待播放音频数据叠加的叠加播放时长;Determine, according to the preset initial time interval and the preset playback duration, the superimposed playback duration of the audio data to be played in the cache space within each of the preset initial time intervals; 根据所述叠加播放时长和所述总存储时长,确定修改所述预设初始时间间隔的修改节点;Determining a modification node for modifying the preset initial time interval according to the superimposed playback duration and the total storage duration; 所述修改节点包括累计发送所述数据包的目标发送次数,所述确定修改所述预设初始时间间隔的修改节点,包括:The modification node includes accumulating a target number of times of sending the data packet, and the modification node for determining to modify the preset initial time interval includes: 根据所述叠加播放时长和所述总存储时长,确定所述数据包可发送的临界发送次数;Determining a critical number of times that the data packet can be sent according to the superimposed playback duration and the total storage duration; 根据所述临界发送次数确定发送所述数据包的目标发送次数,且所述目标发送次数小于或者等于所述临界发送次数;Determine a target sending number of times for sending the data packet according to the critical sending number, and the target sending number of times is less than or equal to the critical sending number of times; 所述修改节点包括可发送的所述音频数据所对应的可发送数据总时长,所述确定修改所述预设初始时间间隔的修改节点,包括:The modification node includes a total duration of transmittable data corresponding to the transmittable audio data, and the determination of modifying the modification node of the preset initial time interval includes: 根据所述叠加播放时长和所述总存储时长,确定所述数据包可发送的临界发送次数;Determining a critical number of times that the data packet can be sent according to the superimposed playback duration and the total storage duration; 根据所述临界发送次数和所述预设播放时长,确定所述数据包可发送的临界累计发送时长;Determine, according to the critical number of transmissions and the preset playback duration, a critical accumulated transmission duration during which the data packet can be transmitted; 根据所述临界累计发送时长确定所述可发送数据总时长,且所述可发送数据总时长小于或者等于所述临界累计发送时长。The total duration of data that can be sent is determined according to the critical accumulated sending duration, and the total duration of data that can be sent is less than or equal to the critical accumulated sending duration. 2.根据权利要求1所述的方法,其特征在于,该方法还包括:2. The method according to claim 1, characterized in that the method further comprises: 对所述预设播放时长进行修改,得到预设播放修改时长,且所述预设播放修改时长大于或者小于所述预设播放时长;Modifying the preset playback duration to obtain a preset modified playback duration, wherein the preset modified playback duration is greater than or less than the preset playback duration; 所述将所述预设初始时间间隔修改为所述预设播放时长,包括:The step of modifying the preset initial time interval to the preset playback duration includes: 将所述预设初始时间间隔修改为所述预设播放修改时长。The preset initial time interval is modified to the preset playback modification duration. 3.根据权利要求1所述的方法,其特征在于,该方法还包括:3. The method according to claim 1, characterized in that the method further comprises: 获取所述音频数据在数据传输链路上传输过程中的消耗时间;Obtaining the time consumed in the transmission of the audio data on the data transmission link; 根据所述预设初始时间间隔和所述消耗时间,确定实际需要发送所述音频数据的实际发送时间间隔;Determine, according to the preset initial time interval and the consumed time, an actual sending time interval for sending the audio data; 所述按照预设播放时长的数据包和预设初始时间间隔向播放端发送解码后的音频数据,包括:The step of sending the decoded audio data to the playback end according to the data packet with preset playback duration and the preset initial time interval includes: 按照所述预设播放时长的数据包、所述实际发送时间间隔和所述数据传输链路,向所述播放端发送所述解码后的音频数据。The decoded audio data is sent to the playback end according to the data packet with the preset playback duration, the actual sending time interval and the data transmission link. 4.根据权利要求1所述的方法,其特征在于,所述确定所述播放端的缓存空间中可存储所述音频数据的总存储时长,包括:4. The method according to claim 1, characterized in that the determining the total storage time of the audio data that can be stored in the cache space of the playback end comprises: 获取所述音频数据的数据格式和码率,以及所述缓存空间的内存;Acquire the data format and bit rate of the audio data, and the memory of the cache space; 根据所述内存、所述数据格式和所述码率,确定所述缓存空间可存储所述音频数据的总存储时长。The total storage time length of the audio data that can be stored in the cache space is determined according to the memory, the data format and the bit rate. 5.一种数据发送装置,其特征在于,包括:5. A data sending device, comprising: 初始发送模块,用于按照预设播放时长的数据包和预设初始时间间隔向播放端发送解码后的音频数据,所述预设初始时间间隔小于所述预设播放时长;An initial sending module, used to send the decoded audio data to the playback end according to a data packet of a preset playback duration and a preset initial time interval, wherein the preset initial time interval is less than the preset playback duration; 时长确定模块,用于确定所述播放端的缓存空间中可存储所述音频数据的总存储时长;A duration determination module, used to determine the total storage duration of the audio data that can be stored in the cache space of the playback end; 节点确定模块,用于根据所述预设初始时间间隔、所述预设播放时长和所述总存储时长,确定修改所述预设初始时间间隔的修改节点,所述修改节点是所述缓存空间将要存满音频数据的节点;A node determination module, used to determine a modification node for modifying the preset initial time interval according to the preset initial time interval, the preset playback duration and the total storage duration, wherein the modification node is a node at which the cache space is about to be full of audio data; 修改间隔模块,用于在所述修改节点,将所述预设初始时间间隔修改为所述预设播放时长;An interval modification module, used for modifying the preset initial time interval to the preset playback duration at the modification node; 目标发送模块,用于根据所述修改后的预设初始时间间隔向所述播放端发送所述数据包,直到所有数据包全部发送完成为止;A target sending module, used for sending the data packets to the playback end according to the modified preset initial time interval until all data packets are sent; 所述确定修改所述预设初始时间间隔的修改节点,包括:The determining of a modification node for modifying the preset initial time interval includes: 根据所述预设初始时间间隔和所述预设播放时长,确定每个所述预设初始时间间隔内,所述缓存空间中待播放音频数据叠加的叠加播放时长;Determine, according to the preset initial time interval and the preset playback duration, the superimposed playback duration of the audio data to be played in the cache space within each of the preset initial time intervals; 根据所述叠加播放时长和所述总存储时长,确定修改所述预设初始时间间隔的修改节点;Determining a modification node for modifying the preset initial time interval according to the superimposed playback duration and the total storage duration; 所述修改节点包括累计发送所述数据包的目标发送次数,所述确定修改所述预设初始时间间隔的修改节点,包括:The modification node includes accumulating a target number of times of sending the data packet, and the modification node for determining to modify the preset initial time interval includes: 根据所述叠加播放时长和所述总存储时长,确定所述数据包可发送的临界发送次数;Determining a critical number of times that the data packet can be sent according to the superimposed playback duration and the total storage duration; 根据所述临界发送次数确定发送所述数据包的目标发送次数,且所述目标发送次数小于或者等于所述临界发送次数;Determine a target sending number of times for sending the data packet according to the critical sending number, and the target sending number of times is less than or equal to the critical sending number of times; 所述修改节点包括可发送的所述音频数据所对应的可发送数据总时长,所述确定修改所述预设初始时间间隔的修改节点,包括:The modification node includes a total duration of transmittable data corresponding to the transmittable audio data, and the determination of modifying the modification node of the preset initial time interval includes: 根据所述叠加播放时长和所述总存储时长,确定所述数据包可发送的临界发送次数;Determining a critical number of times that the data packet can be sent according to the superimposed playback duration and the total storage duration; 根据所述临界发送次数和所述预设播放时长,确定所述数据包可发送的临界累计发送时长;Determine, according to the critical number of transmissions and the preset playback duration, a critical accumulated transmission duration during which the data packet can be transmitted; 根据所述临界累计发送时长确定所述可发送数据总时长,且所述可发送数据总时长小于或者等于所述临界累计发送时长。The total duration of data that can be sent is determined according to the critical accumulated sending duration, and the total duration of data that can be sent is less than or equal to the critical accumulated sending duration. 6.一种电子设备,其特征在于,所述电子设备包括存储器、处理器及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如权利要求1-4任一项所述数据发送方法的步骤。6. An electronic device, characterized in that the electronic device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the data sending method according to any one of claims 1 to 4 when executing the computer program. 7.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1-4任一项所述数据发送方法的步骤。7. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the data sending method according to any one of claims 1 to 4 are implemented.
CN202210001992.4A 2022-01-04 2022-01-04 Data transmission method, device, electronic device and computer readable storage medium Active CN114416013B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210001992.4A CN114416013B (en) 2022-01-04 2022-01-04 Data transmission method, device, electronic device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210001992.4A CN114416013B (en) 2022-01-04 2022-01-04 Data transmission method, device, electronic device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN114416013A CN114416013A (en) 2022-04-29
CN114416013B true CN114416013B (en) 2025-03-11

Family

ID=81271050

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210001992.4A Active CN114416013B (en) 2022-01-04 2022-01-04 Data transmission method, device, electronic device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN114416013B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115412375B (en) * 2022-11-01 2023-04-18 山东省信息技术产业发展研究院(中国赛宝(山东)实验室) Industrial Internet data protection system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103957431A (en) * 2014-04-30 2014-07-30 深圳创维数字技术股份有限公司 Streaming media transmission control method and streaming media server
CN110798458A (en) * 2019-10-22 2020-02-14 歌尔股份有限公司 Data synchronization method, device, equipment and computer readable storage medium

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100461757C (en) * 2005-10-20 2009-02-11 华为技术有限公司 Real-time streaming media transmission method and system
CN102006476A (en) * 2010-11-19 2011-04-06 厦门雅迅网络股份有限公司 Optimal processing method for transmitting and receiving real-time video data
CN105704554A (en) * 2016-01-22 2016-06-22 广州视睿电子科技有限公司 Audio playing method and device
CN105812902B (en) * 2016-03-17 2018-09-04 联发科技(新加坡)私人有限公司 Method, equipment and the system of data playback
CN106452643B (en) * 2016-10-08 2018-07-27 广东欧珀移动通信有限公司 playing control method, device, terminal and playing system
CN109640159A (en) * 2018-12-27 2019-04-16 迅雷计算机(深圳)有限公司 Caching method for determining speed, device, system and storage medium based on player
CN111510770B (en) * 2019-01-30 2021-08-24 上海哔哩哔哩科技有限公司 Method, apparatus, computer device and readable storage medium for switching resolution
CN111327956A (en) * 2020-02-13 2020-06-23 杭州海康威视系统技术有限公司 Video playing method and device and electronic equipment
CN111294634B (en) * 2020-02-27 2022-02-18 腾讯科技(深圳)有限公司 Live broadcast method, device, system, equipment and computer readable storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103957431A (en) * 2014-04-30 2014-07-30 深圳创维数字技术股份有限公司 Streaming media transmission control method and streaming media server
CN110798458A (en) * 2019-10-22 2020-02-14 歌尔股份有限公司 Data synchronization method, device, equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN114416013A (en) 2022-04-29

Similar Documents

Publication Publication Date Title
CN111628847B (en) Data transmission method and device
US11863841B2 (en) Video playing control method and system
CN109089130B (en) Method and device for adjusting timestamp of live video
EP2649792B1 (en) Pre-buffering audio/video stream pairs
CN104394486B (en) A kind of video stream processing method and device based on cloud desktop
CN104040992B (en) There is the Media Stream of improved efficiency in mobile network
CN112839238B (en) Screen projection playing method and device and storage medium
US10044633B2 (en) Method for distributing available bandwidth of a network amongst ongoing traffic sessions run by devices of the network, corresponding device
US11563992B2 (en) Video playback quality detection method and apparatus
CN113242436B (en) Live broadcast data processing method and device and electronic equipment
CN111726657A (en) Playback processing method, device and server of live video
JP2024109848A (en) Client, server, receiving method and transmitting method
CN111225209A (en) Video data plug flow method, device, terminal and storage medium
CN114416013B (en) Data transmission method, device, electronic device and computer readable storage medium
JP2002215516A (en) Information terminal, downloading control method, and computer program
US20230125350A1 (en) Video stream transmission control method and apparatus, device, and medium
CN116017046B (en) Video processing method, device, equipment and storage medium
CN115167806B (en) A network audio broadcast gradient audio processing method and server
CN114422866B (en) Video processing method and device, electronic equipment and storage medium
CN118055277A (en) Video processing method, device, equipment and computer storage medium
CN116866676A (en) A cross-network screencasting method and system
CN114244843A (en) Streaming media download method, electronic device and storage medium
CN113207011A (en) Pre-loading method for short video processing
CN114586371A (en) Method, system and medium for streaming video content using adaptive buffers
CN113765886B (en) Multimedia playing method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant