Data transmission method, device, system, electronic device and storage medium

文档序号:90004 发布日期:2021-10-08 浏览:28次 中文

阅读说明:本技术 数据发送方法、装置、系统、电子设备和存储介质 (Data transmission method, device, system, electronic device and storage medium ) 是由 李尾冬 于 2021-06-23 设计创作,主要内容包括:本发明公开了一种数据发送方法、装置、系统、电子设备和存储介质。其中,方法包括:在接收到所述边缘节点发送的用于获取在用户节点进行播放的缓存数据的数据发送请求时,获取所述用户节点历史播放过的至少一个音视频的历史播放时长;根据所述至少一个音视频的历史播放时长计算所述用户节点本次播放所述缓存数据的本次播放时长;基于所述本次播放时长,将所述用户节点本次播放的所述缓存数据分多次发送至所述边缘节点。采用本发明提供的方案能实现差异化地多次发送缓存数据,减少缓存数据的发送成本。(The invention discloses a data transmission method, a data transmission device, a data transmission system, electronic equipment and a storage medium. The method comprises the following steps: when a data sending request sent by the edge node and used for obtaining cache data played at a user node is received, obtaining the historical playing duration of at least one audio and video played by the user node in a historical manner; calculating the playing time length of the user node playing the cache data at this time according to the historical playing time length of the at least one audio and video; and sending the cache data played by the user node for the time to the edge node for multiple times based on the playing time. By adopting the scheme provided by the invention, the cache data can be sent for multiple times in a differentiated manner, and the sending cost of the cache data is reduced.)

1. A data sending method is applied to a central node in a Content Delivery Network (CDN), the central node is connected with at least one edge node, the edge node is connected with at least one user node, and the method comprises the following steps:

when a data sending request sent by the edge node and used for obtaining cache data played at a user node is received, obtaining the historical playing duration of at least one audio and video played by the user node in a historical manner;

calculating the playing time length of the user node playing the cache data at this time according to the historical playing time length of the at least one audio and video;

and sending the cache data played by the user node for the time to the edge node for multiple times based on the playing time.

2. The method of claim 1, further comprising:

and when a disconnection request sent by the edge node is received, stopping sending the cache data to the edge node.

3. The method according to claim 1, wherein the calculating a playing time length of the user node playing the cached data this time according to the historical playing time length of the at least one audio/video includes:

determining a first playing time interval for the user node to play the cache data this time;

acquiring a first playing time length of at least one first audio/video with the playing time interval being the same as the first playing time interval based on the first playing time interval;

and determining the playing time length of the user node playing the cache data according to the first playing time length.

4. The method according to claim 3, wherein the determining, according to the first play duration, a play duration of the user node playing the cached data this time includes:

acquiring the ratio of first audios and videos with different durations in the first playing duration in all the first audios and videos;

and calculating the playing time length of the cache data played this time by the user node according to the time length numbers of the different time lengths and the ratio.

5. The method according to claim 1, wherein the sending the cache data played by the user node this time to the edge node for multiple times based on the playing time length includes:

determining the sending interval time length and the unit data volume for sending the cache data according to the playing time length by using a preset mapping relation; the mapping relation comprises the corresponding relation between the playing time length, the sending interval time length and the unit data volume;

and sending the cache data to the edge node at intervals for multiple times based on the sending interval duration and the unit data quantity.

6. A data sending method is applied to an edge node in a Content Delivery Network (CDN), the edge node is connected with at least one user node, and the edge node is connected with a center node, and the method comprises the following steps:

when receiving an audio and video playing request sent by the user node, sending a data sending request to the central node; the central node acquires the historical playing time of at least one audio and video which is played by the user node in a historical way according to the data sending request, calculates the playing time of the user node playing the cache data at this time according to the historical playing time of the at least one audio and video, and sends the cache data for multiple times based on the playing time at this time;

receiving cache data sent by the central node for multiple times;

and sending the cache data to the user node so that the user node can play audio and video.

7. The method according to claim 6, wherein when receiving an audio/video playing request sent by the user node, sending a data sending request to the central node, includes:

after receiving an audio and video playing request sent by the user node, judging whether cache data corresponding to the audio and video playing request is stored or not;

and sending the data sending request to the central node under the condition that the cache data is not stored.

8. The method of claim 6, further comprising:

receiving a plurality of audio and video playing requests respectively sent by a plurality of user nodes; the multiple audio/video playing requests request to play the same cache data;

defining an audio and video playing request with the earliest sending time as a specified playing request in the plurality of audio and video playing requests;

sending a data sending request corresponding to the appointed playing request to the central node; the central node acquires the historical playing time length of at least one audio and video which is played by the appointed user node in a historical way and corresponds to the appointed playing request according to the data sending request, calculates the playing time length of the cache data played by the appointed user node at this time according to the historical playing time length of the at least one audio and video, and sends the cache data for multiple times based on the playing time length at this time.

9. A data sending apparatus, applied to a central node in a content delivery network CDN, where the central node is connected to at least one edge node, and the edge node is connected to at least one user node, the data sending apparatus includes:

the acquisition module is used for acquiring the historical playing duration of at least one audio and video which is played by the user node in a historical manner when receiving a data transmission request which is sent by the edge node and used for acquiring cache data played by the user node;

the calculation module is used for calculating the playing time of the cache data played by the user node at this time according to the historical playing time of the at least one audio and video;

and the sending module is used for sending the cache data played by the user node at this time to the edge node for multiple times based on the playing time.

10. A data sending apparatus, which is applied to an edge node in a content delivery network CDN, where the edge node is connected to at least one user node, and the edge node is connected to a central node, where the data sending apparatus includes:

the request module is used for sending a data sending request to the central node when receiving an audio and video playing request sent by the user node; the central node acquires the historical playing time of at least one audio and video which is played by the user node in a historical way according to the data sending request, calculates the playing time of the user node playing the cache data at this time according to the historical playing time of the at least one audio and video, and sends the cache data for multiple times based on the playing time at this time;

the receiving module is used for receiving the cache data sent by the central node for multiple times;

and the sending module is used for sending the cache data to the user node so as to enable the user node to play audio and video.

11. A data transmission system, comprising: a central node, an edge node and a user node; wherein the content of the first and second substances,

the central node comprising the apparatus of claim 9;

the edge node comprising the apparatus of claim 10;

and the user node is used for sending an audio and video playing request to the edge node.

12. An electronic device, comprising: a processor and a memory for storing a computer program capable of running on the processor; wherein the content of the first and second substances,

the processor is adapted to perform the steps of the method of any one of claims 1 to 8 when running the computer program.

13. A storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, performs the steps of the method of any one of claims 1 to 8.

Technical Field

The present invention relates to the field of data caching technologies, and in particular, to a data sending method, an apparatus, a system, an electronic device, and a storage medium.

Background

At present, in an audio and video live broadcast service, after a user node initiates an audio and video play request to an edge node, the edge node requests play data of the audio and video to a central node, and the central node sends the play data to the edge node at one time, so that the edge node caches the play data, and barrier-free and delay-free play of the user node is realized.

However, in the above process, if the user only plays the audio/video for a short time and then closes the audio/video (that is, the edge node only needs to send part of the playing data to the user node to meet the user requirement), the central node sends all the playing data to the edge node at one time (for example, the user only plays for 1 second, that is, the edge node only sends 1 second of the playing data to the user node to meet the user requirement, but the central node sends 10 seconds of the playing data to the edge node), so that the central node sends more unnecessary playing data, which increases the data sending cost of the central node and causes unnecessary resource waste.

Disclosure of Invention

In order to solve the related technical problems, embodiments of the present invention provide a data transmission method, apparatus, system, electronic device, and storage medium.

The technical scheme of the embodiment of the invention is realized as follows:

the embodiment of the invention provides a data transmission method, which is applied to a central node in a Content Delivery Network (CDN), wherein the central node is connected with at least one edge node, and the edge node is connected with at least one user node, and the method comprises the following steps:

when a data sending request sent by an edge node and used for acquiring cache data played at a user node is received, acquiring the historical playing duration of at least one audio and video played by the user node in history; calculating the playing time length of the current playing of the cache data of the user node according to the historical playing time length of at least one audio and video; and sending the cache data played by the user node to the edge node for multiple times based on the playing time.

In the above scheme, the method further comprises:

and when a disconnection request sent by the edge node is received, stopping sending the cache data to the edge node.

In the above scheme, calculating the playing time length of the current playing of the cache data by the user node according to the historical playing time length of at least one audio and video includes:

determining a first playing time interval for playing the cache data by the user node; acquiring at least one first audio/video first playing time length of which the playing time interval and the first playing time interval are the same time interval based on the first playing time interval; and determining the playing time length of the current playing of the cache data by the user node according to the first playing time length.

In the above scheme, determining the play time length for playing the cache data this time by the user node according to the first play time length includes:

acquiring the ratio of first audios and videos with different durations in a first playing duration in all the first audios and videos; and calculating the playing time length of the current playing of the cache data by the user node according to the time length numbers and the specific values of different time lengths.

In the above scheme, based on the playing time length, sending the cache data played by the user node this time to the edge node for multiple times, includes:

determining the sending interval time length and the unit data volume of sending the cache data according to the playing time length by using a preset mapping relation; the mapping relation comprises the corresponding relation between the playing time length, the sending interval time length and the unit data volume; and sending the cache data to the edge node at intervals of multiple times based on the sending interval duration and the unit data quantity.

The embodiment of the present invention further provides another data sending method, which is applied to an edge node in a CDN, where the edge node is connected to at least one user node, and the edge node is connected to a central node, and the method includes:

when receiving an audio and video playing request sent by a user node, sending a data sending request to a central node; the central node acquires the historical playing time of at least one audio and video which is historically played by the user node according to the data sending request, calculates the playing time of the current playing of the cache data of the user node according to the historical playing time of the at least one audio and video, and sends the cache data for multiple times based on the playing time; receiving cache data sent by a central node for multiple times; and sending the cache data to the user node so that the user node can play audio and video.

In the above scheme, when receiving an audio/video playing request sent by a user node, sending a data sending request to a central node, includes:

after receiving an audio and video playing request sent by a user node, judging whether cache data corresponding to the audio and video playing request is stored or not; and sending a data sending request to the central node under the condition that the cache data is not stored.

In the above scheme, the method further comprises:

receiving a plurality of audio and video playing requests respectively sent by a plurality of user nodes; the method comprises the following steps that a plurality of audio and video playing requests request to play the same cache data; defining an audio and video playing request with the earliest sending time as a specified playing request in a plurality of audio and video playing requests; sending a data sending request corresponding to the appointed playing request to the central node; the central node acquires the historical playing time length of at least one audio and video which is played by the appointed user node in the historical way and corresponds to the appointed playing request according to the data sending request, calculates the playing time length of the cache data played by the appointed user node at this time according to the historical playing time length of the at least one audio and video, and sends the cache data for multiple times based on the playing time length at this time.

The embodiment of the present invention further provides a first data sending apparatus, which is applied to a central node in a CDN, where the central node is connected to at least one edge node, and the edge node is connected to at least one user node, and the data sending apparatus includes:

the acquisition module is used for acquiring the historical playing duration of at least one audio and video which is played by the user node in history when receiving a data transmission request which is sent by the edge node and is used for acquiring cache data played by the user node;

the calculation module is used for calculating the playing time of the current playing of the cache data of the user node according to the historical playing time of at least one audio and video;

and the sending module is used for sending the cache data played by the user node to the edge node for multiple times based on the playing time.

The embodiment of the present invention further provides a second data sending apparatus, which is applied to an edge node in a CDN, where the edge node is connected to at least one user node, and the edge node is connected to a central node, and the data sending apparatus includes:

the request module is used for sending a data sending request to the central node when receiving an audio and video playing request sent by the user node; the central node acquires the historical playing time of at least one audio and video which is historically played by the user node according to the data sending request, calculates the playing time of the current playing of the cache data of the user node according to the historical playing time of the at least one audio and video, and sends the cache data for multiple times based on the playing time;

the receiving module is used for receiving the cache data sent by the central node for multiple times;

and the sending module is used for sending the cache data to the user node so as to enable the user node to play the audio and video.

An embodiment of the present invention further provides a data transmission system, including: a central node, an edge node and a user node; wherein the content of the first and second substances,

a central node including the first data transmission apparatus;

an edge node including the second data transmission device;

and the user node is used for sending an audio and video playing request to the edge node.

An embodiment of the present invention further provides an electronic device, including: a processor and a memory for storing a computer program capable of running on the processor; wherein the content of the first and second substances,

the processor is adapted to perform the steps of any of the methods described above when running the computer program.

The embodiment of the invention also provides a storage medium, wherein a computer program is stored in the storage medium, and when the computer program is executed by a processor, the steps of any one of the methods are realized.

According to the data sending method, the data sending device, the data sending system, the electronic equipment and the storage medium, when a data sending request which is sent by an edge node and used for obtaining cache data played at a user node is received, the historical playing duration of at least one audio and video which is played by the user node in a historical mode is obtained; calculating the playing time length of the current playing of the cache data of the user node according to the historical playing time length of at least one audio and video; and sending the cache data played by the user node to the edge node for multiple times based on the playing time. The scheme of the embodiment of the invention can realize the differentiated repeated transmission of the cache data and reduce the transmission cost of the cache data.

Drawings

Fig. 1 is a schematic flow chart of a data transmission method according to an embodiment of the present invention;

FIG. 2 is a diagram illustrating a data transmission architecture according to an embodiment of the present invention;

fig. 3 is a flowchart illustrating another data transmission method according to an embodiment of the present invention;

FIG. 4 is a schematic structural diagram of a data transmission apparatus according to an embodiment of the present invention;

FIG. 5 is a schematic structural diagram of another data transmission apparatus according to an embodiment of the present invention;

fig. 6 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention.

Detailed Description

The present invention will be described in further detail with reference to the accompanying drawings and examples.

An embodiment of the present invention provides a data sending method, which is applied to a central node in a CDN, where the central node is connected to at least one edge node, and the edge node is connected to at least one user node, as shown in fig. 1, the method includes:

step 101: when a data sending request sent by an edge node and used for acquiring cache data played at a user node is received, acquiring the historical playing duration of at least one audio and video played by the user node in history;

step 102: calculating the playing time length of the current playing of the cache data of the user node according to the historical playing time length of at least one audio and video;

step 103: and sending the cache data played by the user node to the edge node for multiple times based on the playing time.

In practical application, the central node records and stores data information of videos and audios which are played by the user node historically, and can form a database, so that the central node can analyze the previous playing habits of the user according to the data information in the database (for example, the user habits enable the videos and audios to be played completely, or the user habits enable the videos and audios to be played for only a few minutes and then be closed), and then cache data are sent according to the previous playing habits of the user (for example, the cache data are sent once, or the cache data are sent for multiple times at certain intervals). Specifically, when recording and storing the data information, the central node may record and store the data information in the form of each audio/video and the corresponding playing time of each audio/video, or may record and store the data information in the form of several audio/videos played within a period of time.

Here, it should be noted that, when the central node performs data storage in the form of playing several audios and videos within a period of time, the historical playing time length of each audio and video may be defined as a ratio of the time length of the period of time divided by the number of played audios and videos. Namely, when the historical playing time length of the audio and video is obtained, the ratio of the time length of the period of time divided by the number of the played audio and video is used as the historical playing time length of the audio and video. Specifically, the number of audio and video plays in a period of time is recorded by taking the length of time as the period of time, and the number can be set based on the data storage condition or the size of the device memory.

When the central node stores the data information, the data information may be directly stored in a local side of the central node, or the data information may be stored in a remote storage side connected to the central node. That is, when the central node acquires data information of the user node (for example, historical playing time), the data information may be directly acquired from a local end of the central node, or may be acquired from a remote storage end connected to the central node.

Next, referring to fig. 2, the process of this embodiment will be described by taking an example in which the central node stores the data information in a remote statistical center. In fig. 2, a central node sends an instruction command for predicting user behavior to a statistical center, the statistical center returns a stored play duration result of a user node corresponding to the instruction command after receiving the instruction command, the central node counts the user behavior after obtaining the play duration result, predicts the current play duration of the user, and then sends cache data to an edge node for multiple times according to the prediction result, so that the edge node sends the data to the user node for playing the cache data. Compared with the mode of sending the cache data to the edge node at one time in the prior art, the mode of the embodiment does not affect the experience of the user, and the purpose of saving the internal cost is achieved.

Here, when the central node receives the disconnection request sent by the edge node, the central node stops sending the cache data to the edge node, because the cache data is sent for multiple times in the embodiment, and in the sending process, after the disconnection request sent by the edge node is received, the sending of subsequent cache data is stopped in time, so that the central node does not send out subsequent unnecessary cache data, thereby realizing the reduction of the data sending cost of the central node and reducing unnecessary resource waste.

Further, in an embodiment, calculating the current playing time length of the current playing of the cache data by the user node according to the historical playing time length of at least one audio/video includes:

determining a first playing time interval for playing the cache data by the user node;

acquiring at least one first audio/video first playing time length of which the playing time interval and the first playing time interval are the same time interval based on the first playing time interval;

and determining the playing time length of the current playing of the cache data by the user node according to the first playing time length.

In practical applications, a plurality of division modes may be set to set the playing period, for example, 0:00 to 12:00 of each day may be set as one playing period, and 0:00 of 12:00 to the next day may be divided into one playing period. The division may also be performed with the sunrise and sunset of each day as a boundary, for example, a playing period is divided between the sunrise and the sunset, and a playing period is divided between the sunset and the next sunrise. In addition, the time length of one hour can be divided into the divided time lengths, for example, 12:00 to 1:00 is divided into one playing period, 1:00 to 2:00 of each day is divided into one playing period, and so on.

When determining the first playing period in which the user node plays the cached data this time, the first playing period may be determined by which playing period the edge node transmits the data transmission request belongs to. For example, the time when the edge node sends the data sending request is 12:40, and when 12:00 to 1:00 every day is a playing time period, the central node determines that the first playing time period in which the user node plays the cached data this time is the playing time period of 12:00 to 1: 00.

There may be a plurality of first audios and videos with the same playing time interval as the first playing time interval, each first audio and video corresponds to one playing time duration, and N first audios and videos have N playing time durations. The method can be used for calculating the playing time length after the first playing time length is determined.

Further, in an embodiment, determining the current playing time length for the user node to play the cached data according to the first playing time length includes:

acquiring the ratio of first audios and videos with different durations in a first playing duration in all the first audios and videos;

and calculating the playing time length of the current playing of the cache data by the user node according to the time length numbers and the specific values of different time lengths.

Specifically, the playing time length of this time can be determined in various ways according to the time length numbers and the specific values of different time lengths. For example, the products obtained by multiplying the time length values of different time lengths by the ratio may be added, and the addition result may be determined as the time length of the current playing; the time length value corresponding to the ratio with the largest value in the ratios can also be determined as the playing time length of this time. In addition, other ways of determining may be used.

After the playing time length of the user node is determined, the following method can be adopted to send the cache data so as to realize the differentiated sending of the cache data.

In an embodiment, based on the playing time length, sending the cache data played by the user node this time to the edge node for multiple times, includes:

determining the sending interval time length and the unit data volume of sending the cache data according to the playing time length by using a preset mapping relation; the mapping relation comprises the corresponding relation between the playing time length and the sending interval time length as well as the unit data volume;

and sending the cache data to the edge node for multiple times based on the sending interval duration and the unit data quantity.

In practical applications, the mapping relationship may be set according to experience or experimental results. Specifically, the playing time lengths of this time at three levels, namely, low, medium and high levels, may be set, and the playing time lengths of this time at three levels, namely, low, medium and high levels correspond to the transmission interval time lengths and the unit data amounts of the three levels, respectively. After the playing time length of the user node is determined, the grade of the determined playing time length can be judged, so that the sending interval time length and the unit data volume corresponding to the grade are obtained. During setting, in order to realize a better sending effect, when the playing time is shorter, the corresponding sending interval time is shorter, and the unit data volume is smaller; when the playing time length is longer, the corresponding sending interval time length is longer, and the unit data volume is larger. In addition, the mapping relationship may also be set in other ways.

According to the data transmission method provided by the embodiment of the invention, when a data transmission request which is sent by an edge node and used for acquiring cache data played at a user node is received, the historical playing duration of at least one audio/video which is historically played by the user node is acquired; calculating the playing time length of the current playing of the cache data of the user node according to the historical playing time length of at least one audio and video; and sending the cache data played by the user node to the edge node for multiple times based on the playing time. The scheme of the embodiment of the invention can realize the differentiated repeated transmission of the cache data and reduce the transmission cost of the cache data.

An embodiment of the present invention further provides another data sending method, which is applied to an edge node in a CDN, where the edge node is connected to at least one user node, and the edge node is connected to a central node, and as shown in fig. 3, the method includes:

step 301: when receiving an audio and video playing request sent by a user node, sending a data sending request to a central node; the central node acquires the historical playing time of at least one audio and video which is historically played by the user node according to the data sending request, calculates the playing time of the current playing of the cache data of the user node according to the historical playing time of the at least one audio and video, and sends the cache data for multiple times based on the playing time;

step 302: receiving cache data sent by a central node for multiple times;

step 303: and sending the cache data to the user node so that the user node can play audio and video.

In practical application, after receiving an audio and video playing request sent by a user node, an edge node firstly judges whether cache data corresponding to the audio and video playing request is stored; if the cache data is not stored, a data sending request is sent to the central node, so that the data corresponding to the audio and video playing request is obtained from the central node.

In addition, the data transmission cost of the central node is reduced, and the resource waste is reduced; in an embodiment, the method further comprises:

and when a disconnection request sent by the user node is received, stopping receiving the cache data sent by the central node.

Here, the disconnection request characterizes that the user node stops playing the cached data. In practical application, when the user stops playing the audio and video, the edge node receives the disconnection request sent by the user node.

When a disconnection request sent by a user node is received, the cache data sent by the central node is timely stopped being received, so that the central node does not successfully send subsequent unnecessary cache data, the data sending cost of the central node is reduced, and unnecessary resource waste is reduced.

In addition, in practical application, there may be a situation that a plurality of user nodes correspond to the same edge node and request the same cache data from the same edge node (i.e. a plurality of user nodes request to play the same audio/video), and at this time, in order to reduce the data transmission cost and meet the use needs of a plurality of users, the following method may be adopted:

in an embodiment, the method further comprises:

receiving a plurality of audio and video playing requests respectively sent by a plurality of user nodes; the method comprises the following steps that a plurality of audio and video playing requests request to play the same cache data;

defining an audio and video playing request with the earliest sending time as a specified playing request in a plurality of audio and video playing requests;

sending a data sending request corresponding to the appointed playing request to the central node; the central node acquires the historical playing time length of at least one audio and video which is played by the appointed user node in the historical way and corresponds to the appointed playing request according to the data sending request, calculates the playing time length of the cache data played by the appointed user node at this time according to the historical playing time length of the at least one audio and video, and sends the cache data for multiple times based on the playing time length at this time.

Here, when determining the sending mode of the cache data according to the historical playing time of the user node, the central node only determines the historical playing time of the audio and video played by the first user node initiating the audio and video playing request, so that, because the edge node does not store the corresponding cache data when the first user initiating the audio and video playing request initiates the playing request, the sending mode of the cache data is determined according to the historical playing time of the first user node initiating the audio and video playing request, and the sending mode of the cache data can be controlled within a reasonable range (for example, the sending interval time and the unit data amount) under the condition of meeting the playing requirement of the first user node initiating the audio and video playing request, thereby reducing the sending cost of the data and reducing the resource consumption; meanwhile, when the subsequent user node sends an audio/video playing request, the cache data stored in the edge node is sent to other subsequent user nodes for audio/video playing, and the playing requirements of other user nodes can be met. Therefore, the embodiment can effectively reduce the data sending cost of the central node and reduce the resource consumption under the condition of meeting the playing requirements of a plurality of user nodes.

In addition, it should be noted here that when the first user initiating the audio/video play request stops playing audio/video, that is, the first user node initiating the audio/video play request disconnects the process of receiving and sending the cache data, according to the initiation sequence of the requests, the next user node initiating the audio/video play request is used as the new first user node initiating the audio/video play request, and in the process of continuing to send the cache data, the central node determines the new cache data sending mode according to the historical play duration of the audio/video played by the new first user node initiating the audio/video play request.

According to the data transmission method provided by the embodiment of the invention, the central node counts the historical playing time of the user node to form an intelligent library, the current playing time of the user is pre-judged in advance according to the historical data, and then the cache is sent in sections (for example, 10s cache data is sent to the edge node in 5 times instead of being sent to the edge node at one time), so that the central node does not continue to send subsequent cache data under the condition that the client is disconnected in advance, the data transmission cost of the central node is reduced, the resource consumption is reduced, and the service competitiveness is improved.

In order to implement the method according to the embodiment of the present invention, a first data sending apparatus is further provided in the embodiment of the present invention, and is applied to a central node in a CDN, where the central node is connected to at least one edge node, and the edge node is connected to at least one user node, as shown in fig. 4, the data sending apparatus 400 includes: an acquisition module 401, a calculation module 402 and a sending module 403; wherein the content of the first and second substances,

the acquisition module 401 is configured to acquire a historical playing time length of at least one audio/video that has been historically played by a user node when receiving a data transmission request that is sent by an edge node and used for acquiring cache data played at the user node;

the calculating module 402 is configured to calculate a current playing time length for the user node to play the cached data according to a historical playing time length of at least one audio/video;

the sending module 403 is configured to send, based on the playing time length, the cache data played by the user node this time to the edge node for multiple times.

In practical applications, the obtaining module 401, the calculating module 402 and the sending module 403 may be implemented by a processor in the data sending apparatus.

It should be noted that: the data transmission device provided in the above embodiment is only illustrated by the division of the above program modules when transmitting data, and in practical applications, the above processing allocation may be completed by different program modules as needed, that is, the internal structure of the terminal may be divided into different program modules to complete all or part of the above described processing. In addition, the data sending apparatus provided in the foregoing embodiment and the data sending method embodiment belong to the same concept, and specific implementation processes thereof are described in the method embodiment and are not described herein again.

In order to implement the method according to the embodiment of the present invention, a second data sending apparatus is further provided in the embodiment of the present invention, and is applied to an edge node in the CDN, where the edge node is connected to at least one user node, and the edge node is connected to a central node, as shown in fig. 5, the data sending apparatus 500 includes: a request module 501, a receiving module 502 and a sending module 503; wherein the content of the first and second substances,

the request module 501 is configured to send a data sending request to a central node when receiving an audio/video playing request sent by a user node; the central node acquires the historical playing time of at least one audio and video which is historically played by the user node according to the data sending request, calculates the playing time of the current playing of the cache data of the user node according to the historical playing time of the at least one audio and video, and sends the cache data for multiple times based on the playing time;

a receiving module 502, configured to receive cache data sent by a central node for multiple times;

the sending module 503 is configured to send the cache data to the user node, so that the user node performs audio and video playing.

In practical applications, the requesting module 501, the receiving module 502 and the sending module 503 can be implemented by a processor in the data sending device.

It should be noted that: the data transmission device provided in the above embodiment is only illustrated by the division of the above program modules when transmitting data, and in practical applications, the above processing allocation may be completed by different program modules as needed, that is, the internal structure of the terminal may be divided into different program modules to complete all or part of the above described processing. In addition, the data sending apparatus provided in the foregoing embodiment and the data sending method embodiment belong to the same concept, and specific implementation processes thereof are described in the method embodiment and are not described herein again.

In order to implement the method according to the embodiment of the present invention, an embodiment of the present invention further provides a data transmission system, including: a central node, an edge node and a user node; wherein, the central node comprises the first data sending device; the edge node comprises the second data transmission device; and the user node is used for sending an audio and video playing request to the edge node.

Based on the hardware implementation of the program module, and in order to implement the method according to the embodiment of the present invention, an embodiment of the present invention further provides an electronic device, as shown in fig. 6, where the electronic device 600 includes:

a communication interface 601, which is capable of performing information interaction with other devices (such as network devices, terminals, etc.);

the processor 602 is connected with the communication interface 601 to implement information interaction with other devices, and is used for executing the method provided by one or more technical solutions when running a computer program;

a memory 603 for storing a computer program capable of running on the processor 602.

It should be noted that: the specific process of the processor 602 for performing the above operations is detailed in the method embodiment, and is not described here again.

Of course, in practice, the various components in the electronic device 600 are coupled together by a bus system 604. It is understood that the bus system 604 is used to enable communications among the components. The bus system 604 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 604 in fig. 6.

The memory 603 in the embodiments of the present invention is used to store various types of data to support the operation of the electronic device 600. Examples of such data include: any computer program for operating on the electronic device 600.

The method disclosed in the above embodiments of the present invention may be applied to the processor 602, or implemented by the processor 602. The processor 602 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 602. The Processor 602 may be a general purpose Processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. Processor 602 may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present invention. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed by the embodiment of the invention can be directly implemented by a hardware decoding processor, or can be implemented by combining hardware and software modules in the decoding processor. The software modules may be located in a storage medium located in the memory 603, and the processor 602 reads the information in the memory 603 and performs the steps of the aforementioned methods in conjunction with its hardware.

In an exemplary embodiment, the electronic Device 600 may be implemented by one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, Micro Controllers (MCUs), microprocessors (microprocessors), or other electronic components for performing the foregoing methods.

It is to be understood that the memory 603 of embodiments of the present invention may be either volatile memory or nonvolatile memory, and may include both volatile and nonvolatile memory. Among them, the nonvolatile Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a magnetic random access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical disk, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced DRAM), Synchronous Dynamic Random Access Memory (SLDRAM), Direct Memory (DRmb Access), and Random Access Memory (DRAM). The described memory for embodiments of the present invention is intended to comprise, without being limited to, these and any other suitable types of memory.

In an exemplary embodiment, the present invention further provides a storage medium, i.e. a computer storage medium, in particular a computer readable storage medium, for example comprising a memory 603 storing a computer program, which is executable by a processor 602 of an electronic device 600 to perform the aforementioned method steps. The computer readable storage medium may be Memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface Memory, optical disk, or CD-ROM.

It should be noted that: first, second, etc. are used to distinguish between similar objects and not necessarily to describe a particular order or sequence.

In addition, the technical solutions described in the embodiments of the present invention may be arbitrarily combined without conflict.

The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种智能设备及其控制方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类