CN109067916B - Online multimedia file downloading method and device and electronic equipment - Google Patents

Online multimedia file downloading method and device and electronic equipment Download PDF

Info

Publication number
CN109067916B
CN109067916B CN201811108426.3A CN201811108426A CN109067916B CN 109067916 B CN109067916 B CN 109067916B CN 201811108426 A CN201811108426 A CN 201811108426A CN 109067916 B CN109067916 B CN 109067916B
Authority
CN
China
Prior art keywords
data packet
cache data
downloading
target
speed
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
CN201811108426.3A
Other languages
Chinese (zh)
Other versions
CN109067916A (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 Jiuzhou Electric Appliance Co Ltd
Original Assignee
Shenzhen Jiuzhou Electric Appliance 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 Jiuzhou Electric Appliance Co Ltd filed Critical Shenzhen Jiuzhou Electric Appliance Co Ltd
Priority to CN201811108426.3A priority Critical patent/CN109067916B/en
Publication of CN109067916A publication Critical patent/CN109067916A/en
Application granted granted Critical
Publication of CN109067916B publication Critical patent/CN109067916B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/438Interfacing the downstream path of the transmission network originating from a server, e.g. retrieving encoded video stream packets from an IP network

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Multimedia (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention relates to the technical field of multimedia file downloading, in particular to an online multimedia file downloading method and device and electronic equipment. The method comprises the following steps: acquiring a current data packet corresponding to the current playing progress of the online multimedia file; determining target cache data packets which are continuously arranged behind the current data packet according to the playing time sequence; detecting the downloading speed of a node for downloading a target cache data packet; and adjusting the downloading mode of the target cache data packet according to the playing speed of the target client and the downloading speed of the node, wherein the downloading mode comprises a first downloading mode in which the target client directly downloads the data packet from the content server and a second downloading mode in which the target client downloads the data packet from the node. Therefore, it can flexibly provide a plurality of download modes to download the online multimedia file.

Description

Online multimedia file downloading method and device and electronic equipment
Technical Field
The invention relates to the technical field of multimedia file downloading, in particular to an online multimedia file downloading method and device and electronic equipment.
Background
When the client plays the online video, it may download the online video in a P2P (Peer-to-Peer) manner. In a P2P network, a client can receive video data sent by a neighboring client (also called a neighboring node), and can also send the video data to a neighboring node, thereby realizing fast caching or downloading of online video.
In the process of implementing the invention, the inventor finds that the traditional technology has at least the following problems: because the client can only select the P2P mode to download the video singly, when the downloading speed of the neighboring node is too slow, the online video played by the client is unsmooth and the like.
Disclosure of Invention
An object of an embodiment of the present invention is to provide an online multimedia file downloading method and apparatus, and an electronic device, which are capable of flexibly providing multiple downloading modes for downloading an online multimedia file.
In order to solve the above technical problems, embodiments of the present invention provide the following technical solutions:
in a first aspect, an embodiment of the present invention provides an online multimedia file downloading method, which is applied to a target client, where the target client operates in a peer-to-peer network, and the method includes:
acquiring a current data packet corresponding to the current playing progress of the online multimedia file;
determining target cache data packets which are continuously arranged behind the current data packet according to the playing time sequence;
detecting the downloading speed of a node for downloading the target cache data packet;
and adjusting the downloading mode of the target cache data packet according to the playing speed of the target client and the downloading speed of the node, wherein the downloading mode comprises a first downloading mode in which the target client directly downloads the data packet from a content server and a second downloading mode in which the target client downloads the data packet from the node.
Optionally, the adjusting the download mode of the target cache data packet according to the play speed of the target client and the download speed of the node includes:
acquiring a play history of the target client, wherein the play history comprises the fast forward times of the target client playing the historical multimedia files according to the fast forward speed and the historical number of the played historical multimedia files;
calculating the ratio of the fast forwarding times to the historical number;
and adjusting the downloading mode of the target cache data packet according to the playing speed of the target client, the downloading speed of the node and the ratio of the fast forwarding times to the historical number.
Optionally, the adjusting the download mode of the target cache data packet according to the play speed of the target client, the download speed of the node, and the ratio between the number of fast forwarding times and the historical number includes:
judging whether the playing speed of the target client is greater than the downloading speed of the node or not;
if the playing speed of the target client is greater than the downloading speed of the node, according to the ratio of the fast forwarding times to the historical number, adjusting the downloading modes of the target cache data packet and cache data packets with preset lengths which are continuously arranged behind the target cache data packet;
and if the playing speed of the target client is lower than the downloading speed of the node, selecting the first downloading mode to download the target cache data packet.
Optionally, the adjusting, according to the ratio between the number of fast forwarding times and the historical number, a download mode of the target cache packet and a cache packet of a preset length consecutively arranged after the target cache packet includes:
judging whether the ratio of the fast forwarding times to the historical number is larger than a preset ratio threshold value or not;
if the ratio between the number of fast forwarding times and the historical number is larger than a preset ratio threshold, judging whether the downloading speed of a node corresponding to a preset-length cache data packet continuously arranged behind the target cache data packet is larger than the fast forwarding speed, if so, selecting the first downloading mode to download the target cache data packet and selecting the second downloading mode to download a preset-length cache data packet continuously arranged behind the target cache data packet, and if not, selecting the first downloading mode to download the target cache data packet and a preset-length cache data packet continuously arranged behind the target cache data packet;
and if the ratio of the fast forward times to the historical number is smaller than a preset ratio threshold, selecting the first download mode to download the target cache data packet and selecting the second download mode to download cache data packets with preset lengths which are continuously arranged behind the target cache data packet.
Optionally, the online multimedia file is divided into a plurality of data packets, and each data packet has a number;
the selecting the first download mode to download the target cache data packet includes:
sending the number of the target cache data packet to the content server;
and receiving the target cache data packet returned by the content server according to the number of the target cache data packet.
In a second aspect, an embodiment of the present invention provides an online multimedia file downloading apparatus, which is applied to a target client, where the target client operates in a peer-to-peer network, and the apparatus includes:
the acquisition module is used for acquiring a current data packet corresponding to the current playing progress of the online multimedia file;
a determining module, configured to determine, according to a playing time sequence, a target cache data packet that is continuously arranged behind the current data packet;
the detection module is used for detecting the downloading speed of the node for downloading the target cache data packet;
and the adjusting module is used for adjusting the downloading mode of the target cache data packet according to the playing speed of the target client and the downloading speed of the node, wherein the downloading mode comprises a first downloading mode in which the target client directly downloads the data packet from a content server and a second downloading mode in which the target client downloads the data packet from the node.
Optionally, the adjusting module includes:
the acquisition unit is used for acquiring the play history of the target client, wherein the play history comprises the fast forward times of the target client playing the historical multimedia files according to the fast forward speed and the historical number of the played historical multimedia files;
the calculating unit is used for calculating the ratio of the fast forwarding times to the historical number;
and the adjusting unit is used for adjusting the downloading mode of the target cache data packet according to the playing speed of the target client, the downloading speed of the node and the ratio of the fast forwarding times to the historical number.
Optionally, the adjusting unit is specifically configured to:
judging whether the playing speed of the target client is greater than the downloading speed of the node or not;
if the playing speed of the target client is greater than the downloading speed of the node, according to the ratio of the fast forwarding times to the historical number, adjusting the downloading modes of the target cache data packet and cache data packets with preset lengths which are continuously arranged behind the target cache data packet;
and if the playing speed of the target client is lower than the downloading speed of the node, selecting the first downloading mode to download the target cache data packet.
Optionally, the adjusting unit is further specifically configured to:
judging whether the ratio of the fast forwarding times to the historical number is larger than a preset ratio threshold value or not;
if the ratio between the number of fast forwarding times and the historical number is larger than a preset ratio threshold, judging whether the downloading speed of a node corresponding to a preset-length cache data packet continuously arranged behind the target cache data packet is larger than the fast forwarding speed, if so, selecting the first downloading mode to download the target cache data packet and selecting the second downloading mode to download a preset-length cache data packet continuously arranged behind the target cache data packet, and if not, selecting the first downloading mode to download the target cache data packet and a preset-length cache data packet continuously arranged behind the target cache data packet;
and if the ratio of the fast forward times to the historical number is smaller than a preset ratio threshold, selecting the first download mode to download the target cache data packet and selecting the second download mode to download cache data packets with preset lengths which are continuously arranged behind the target cache data packet.
In a third aspect, an embodiment of the present invention provides an electronic device, including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform any one of the online multimedia file download methods.
In a fourth aspect, embodiments of the present invention provide a non-transitory computer-readable storage medium storing computer-executable instructions for causing a node server to perform any one of the online multimedia file downloading methods.
In a fifth aspect, embodiments of the present invention provide a computer program product comprising a computer program stored on a non-volatile computer-readable storage medium, the computer program comprising program instructions that, when executed by a target client, cause the target client to perform any of the online multimedia file download methods.
In the method, the device and the electronic equipment for downloading the online multimedia file provided by the embodiments of the present invention, first, a current data packet corresponding to a current playing progress of the online multimedia file is obtained; secondly, determining target cache data packets which are continuously arranged behind the current data packet according to the playing time sequence; thirdly, detecting the downloading speed of the node for downloading the target cache data packet; and finally, adjusting the downloading mode of the target cache data packet according to the playing speed of the target client and the downloading speed of the node, wherein the downloading mode comprises a first downloading mode in which the target client directly downloads the data packet from the content server and a second downloading mode in which the target client downloads the data packet from the node. Therefore, it can flexibly provide a plurality of download modes to download the online multimedia file.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to be construed as limiting the embodiments, unless otherwise specified.
FIG. 1 is a block diagram of an online multimedia file download system according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for downloading an online multimedia file according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of S24 in FIG. 2;
FIG. 4 is a schematic structural diagram of an online multimedia file downloading device according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of the structure of the adjustment module of FIG. 4;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating an architecture of an online multimedia file downloading system according to an embodiment of the present invention. As shown in fig. 1, the online multimedia file download system 100 includes several clients 11 and a content server 12.
The communication method between the clients 11 supports the P2P method, and therefore, the clients 11 operate in the peer-to-peer network.
The client 11 has a display screen, which may be a touch screen or a non-touch screen, and may be a TFT screen (TFT Thin Film Transistor), a TFD screen (TFD Thin Film Diode), a UFB screen (Ultra Thin Film Bright, UFB), an STN screen (Super-Twisted Nematic, STN), an OLED screen (Organic Light-Emitting Diode), an AMOLED screen (Active Matrix/Organic Light-Emitting Diode, AMOLED Active Matrix Organic Light-Emitting Diode panel), and so on.
The client 11 supports the installation of various applications, such as one or more desktop applications from among the following: download applications, drawing applications, presentation applications, word processing applications, spreadsheet applications, gaming applications, telephone applications, video conferencing applications, email applications, instant messaging applications, training support applications, photo applications, digital camera applications, digital video recorder applications, web browsing applications, digital music player applications, digital video player applications, and the like. In some embodiments, some applications include contacts, such as: a telephone application, an email application, an instant messaging application, and the like.
Each client 11 is communicatively coupled to a content server 12. The content server 12 may be a physical server or a logical server virtualized from multiple physical servers. The server may also be a server cluster formed by a plurality of servers capable of communicating with each other, and each functional module may be respectively distributed on each server in the server cluster.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for downloading an online multimedia file according to an embodiment of the present invention. As shown in fig. 2, the online multimedia file downloading method S200 includes:
s21, acquiring a current data packet corresponding to the current playing progress of the online multimedia file;
in the present embodiment, the multimedia file includes a video file, an audio file, or a text file, etc. When the multimedia file is a video file, the current playing progress is the current playing time point of the video, for example, a video with a total duration of 60 minutes, and the current playing time point is the 32 th minute, so the 32 th minute is the current playing progress of the video file. When the multimedia file is an audio file, the understanding of the current playing progress is as described above. When the multimedia file is a text file, the current playing progress is the position of the current content exposed on the current display screen of the target client at the text, for example, the total number of pages of the text file is 100, and if the user browses the 35 th page of the text file, the 35 th page is the current playing progress of the text file.
In the peer-to-peer network, the online multimedia file is divided into a plurality of data packets, each data packet can be stored by different clients, when the target client plays the online multimedia file, the target client sends a file downloading request to the content server, and the content server sends the network address of the target client to other clients, so that the other clients establish P2P communication with the target client according to the network address of the target client.
When the target client plays the online multimedia file, the current playing progress of the online multimedia file and a current data packet corresponding to the current playing progress are determined.
S22, determining a target cache data packet which is continuously arranged behind the current data packet according to the playing time sequence;
in this embodiment, the target client normally plays the online multimedia file according to the playing time sequence. As described above, an online multimedia file is divided into a plurality of data packets according to the playing time sequence, and each data packet is configured with a number according to the playing time sequence. Each packet may be uploaded to the target client by a different neighbor node. For example, an online video is divided into 5 packets, i.e., packets M1, M2, M3, M4, and M5, wherein the packets M1, M2, M3, M4, and M5 are arranged in the playing time sequence. In some embodiments, the data packets M1, M2, M3, M4, and M5 may be uploaded to the target client by different neighbor nodes. In other embodiments, the data packet M1 and the data packet M2 may be uploaded by the same neighbor node, and the data packets M3, M4, and M5 may be uploaded by the same neighbor node.
In this embodiment, the target buffer packet is consecutive to and arranged after the current packet in the playing time order. For example, when the target client plays an online video, the current packet corresponding to the current playing progress is the packet M2, where the packet M3 and the packet M2 are consecutively arranged after the packet M2, and therefore the packet M3 is the target cache packet.
S23, detecting the downloading speed of the node for downloading the target cache data packet;
in this embodiment, the communication distance between the node for downloading the target cache data packet and the target client is relatively short, and may also be relatively long, that is, the node for downloading the target cache data packet may be a neighboring node, or may also be a far neighboring node.
And S24, adjusting the downloading mode of the target cache data packet according to the playing speed of the target client and the downloading speed of the node, wherein the downloading mode comprises a first downloading mode in which the target client directly downloads the data packet from the content server and a second downloading mode in which the target client downloads the data packet from the node.
The content server stores online multimedia files. Generally, since the priority download mode of most clients is the second download mode for downloading the data packet from the node, and fewer clients access the content server, the download speed corresponding to the first download mode is greater than the download speed corresponding to the second download mode.
In this embodiment, when the play speed of the target client is greater than the download speed of the node, the target client selects the first download mode to download the target cache data packet from the content server. And when the playing speed of the target client is lower than the downloading speed of the node, the target client selects a second downloading mode to download the target cache data packet from the node.
In summary, since it can flexibly provide a plurality of download modes to download the online multimedia file, it can ensure that the user can smoothly view the online multimedia file.
Generally, some users habitually play online multimedia files in a fast-forward manner, resulting in easy occurrence of a pause phenomenon. In some embodiments, it can adjust the downloading mode of the target cache data packet according to the user usage habit, so as to smoothly play the multimedia file. Referring to fig. 3, S24 includes:
s241, obtaining a play history of the target client, wherein the play history comprises the fast forward times of the target client playing the historical multimedia files according to the fast forward speed and the historical number of the played historical multimedia files;
for example, in the history of playing, when the multimedia file is played for the first time, the user fast-forwards the multimedia file at 2 times of the normal playing speed, that is, the fast-forwarding speed is 2 times of the normal playing speed, and for the multimedia file with the playing duration of 60 minutes, the user fast-forwards for 6 times. When another multimedia file is played for the second time, the user fast-forwards 8 times for the multimedia file with the playing time of 120 minutes. When another multimedia file is played for the third time, the user fast forwards for 2 times for the multimedia file with the playing time of 120 minutes. Thus, the play history multimedia file has a fast forward count of 6+8+2 to 16, and the play history multimedia file has a history number of 3.
S242, calculating the ratio of the fast forwarding times to the historical number;
and S243, adjusting the downloading mode of the target cache data packet according to the playing speed of the target client, the downloading speed of the node and the ratio of the fast forward times to the total times.
In this embodiment, when adjusting the download mode of the target cache data packet, the target client may determine whether the play speed of the target client is greater than the download speed of the node, and if the play speed of the target client is greater than the download speed of the node, adjust the download mode of the target cache data packet and the cache data packets with the preset length continuously arranged behind the target cache data packet according to a ratio between the number of fast forwarding times and the historical number. For example, the target client determines whether the ratio between the number of fast forwarding times and the historical number is greater than a preset ratio threshold; if the ratio between the number of fast forwarding times and the historical number is larger than a preset ratio threshold, judging whether the downloading speed of a node corresponding to a preset-length cache data packet continuously arranged behind the target cache data packet is larger than the fast forwarding speed, if so, selecting a first downloading mode to download the target cache data packet and selecting a second downloading mode to download a preset-length cache data packet continuously arranged behind the target cache data packet, and if not, selecting the first downloading mode to download the target cache data packet and the preset-length cache data packet continuously arranged behind the target cache data packet.
And if the ratio of the fast forward times to the historical number is smaller than a preset ratio threshold, selecting a first download mode to download the target cache data packet and selecting a second download mode to download the cache data packets with preset lengths which are continuously arranged behind the target cache data packet.
And if the playing speed of the target client is lower than the downloading speed of the node, selecting a first downloading mode to download the target cache data packet.
Therefore, in this way, it can ensure that the user smoothly plays the online multimedia file.
In some embodiments, the online multimedia file is divided into a number of packets, each packet having a corresponding number. When the target client selects the first downloading mode to download the target cache data packet, firstly, the target client sends the number of the target cache data packet to the content server, and then the content server returns the target cache data packet to the target client according to the number of the target cache data packet, so that the target client receives the target cache data packet returned by the content server.
It should be noted that, in the foregoing embodiments, a certain order does not necessarily exist between the foregoing steps, and it can be understood by those skilled in the art from the description of the embodiments of the present invention that, in different embodiments, the foregoing steps may have different execution orders, that is, may be executed in parallel, may also be executed in an exchange manner, and the like.
As another aspect of the embodiments of the present invention, an online multimedia file downloading device is provided in the embodiments of the present invention. The online multimedia file downloading device provided by the embodiment of the invention can be used as one of the software functional units, and comprises a plurality of instructions, wherein the instructions are stored in the memory, and the processor can access the memory and call the instructions to execute so as to complete the online multimedia file downloading method.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an online multimedia file apparatus according to an embodiment of the present invention. As shown in fig. 4, the online multimedia file downloading apparatus 400 is applied to a target client, which operates in a peer-to-peer network. The online multimedia file downloading apparatus 400 includes: an acquisition module 41, a determination module 42, a detection module 43, and an adjustment module 44.
The obtaining module 41 is configured to obtain a current data packet corresponding to a current playing progress of the online multimedia file;
the determining module 42 is configured to determine, according to the playing time sequence, a target cache data packet that is consecutively arranged after the current data packet;
the detecting module 43 is configured to detect a downloading speed of a node for downloading the target cache data packet;
the adjusting module 44 is configured to adjust a downloading mode of the target cache data packet according to the playing speed of the target client and the downloading speed of the node, where the downloading mode includes a first downloading mode in which the target client directly downloads the data packet from a content server and a second downloading mode in which the target client downloads the data packet from the node.
Therefore, it can flexibly provide a plurality of download modes to download the online multimedia file.
In some embodiments, referring to fig. 5, the adjusting module 44 includes: an obtaining unit 441, a calculating unit 442, and an adjusting unit 443.
The obtaining unit 441 is configured to obtain a play history of the target client, where the play history includes the number of fast forwarding times for the target client to play the history multimedia file according to the fast forwarding speed and the history number for playing the history multimedia file;
the calculating unit 442 is configured to calculate a ratio between the number of fast forwarding times and the historical number;
the adjusting unit 443 is configured to adjust a downloading mode of the target cache data packet according to the playing speed of the target client, the downloading speed of the node, and a ratio between the number of fast forwarding times and the history number.
In some embodiments, the adjusting unit 443 is specifically configured to: judging whether the playing speed of the target client is greater than the downloading speed of the node or not; if the playing speed of the target client is greater than the downloading speed of the node, according to the ratio of the fast forwarding times to the historical number, adjusting the downloading modes of the target cache data packet and cache data packets with preset lengths which are continuously arranged behind the target cache data packet; and if the playing speed of the target client is lower than the downloading speed of the node, selecting the first downloading mode to download the target cache data packet.
In some embodiments, the adjusting unit 443 is further specifically configured to: judging whether the ratio of the fast forwarding times to the historical number is larger than a preset ratio threshold value or not; if the ratio between the number of fast forwarding times and the historical number is larger than a preset ratio threshold, judging whether the downloading speed of a node corresponding to a preset-length cache data packet continuously arranged behind the target cache data packet is larger than the fast forwarding speed, if so, selecting the first downloading mode to download the target cache data packet and selecting the second downloading mode to download a preset-length cache data packet continuously arranged behind the target cache data packet, and if not, selecting the first downloading mode to download the target cache data packet and a preset-length cache data packet continuously arranged behind the target cache data packet; and if the ratio of the fast forward times to the historical number is smaller than a preset ratio threshold, selecting the first download mode to download the target cache data packet and selecting the second download mode to download cache data packets with preset lengths which are continuously arranged behind the target cache data packet.
It should be noted that the file distributed storage apparatus can execute the file distributed storage method provided by the embodiment of the present invention, and has corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in the embodiment of the file distributed storage apparatus, reference may be made to the file distributed storage method provided in the embodiment of the present invention.
As yet another aspect of the embodiments of the present invention, an electronic device is provided. As shown in fig. 6, the electronic device 600 includes: one or more processors 61 and memory 62. In fig. 6, one processor 61 is taken as an example.
The processor 61 and the memory 62 may be connected by a bus or other means, such as the bus connection in fig. 6.
The memory 62, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the online multimedia file downloading method in the embodiment of the present invention. The processor 61 executes various functional applications and data processing of the online multimedia file downloading apparatus by running the nonvolatile software programs, instructions and modules stored in the memory 62, that is, the functions of the online multimedia file downloading method of the above-mentioned method embodiment and the various modules of the above-mentioned apparatus embodiment are realized.
The memory 62 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 non-volatile solid state storage device. In some embodiments, the memory 62 may optionally include memory located remotely from the processor 61, and these remote memories may be connected to the processor 61 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The program instructions/modules stored in the memory 62, when executed by the one or more processors 61, perform the online multimedia file download method in any of the above method embodiments, e.g., perform the steps illustrated in fig. 2 and 3 described above; the functions of the various modules and units described in fig. 4-5 may also be implemented.
Embodiments of the present invention also provide a non-volatile computer storage medium, which stores computer-executable instructions, which are executed by one or more processors, such as one processor 61 in fig. 6, and enable the one or more processors to perform the online multimedia file downloading method in any of the above-mentioned method embodiments, such as performing the online multimedia file downloading method in any of the above-mentioned method embodiments, for example, performing the above-mentioned steps described in the above-mentioned method embodiments, such as performing the above-mentioned steps described in fig. 2 and fig. 3; the functions of the various modules and units described in fig. 4-5 may also be implemented.
The above-described embodiments of the apparatus or device are merely illustrative, wherein the unit modules described as separate parts may or may not be physically separate, and the parts displayed as module units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network module units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a general hardware platform, and certainly can also be implemented by hardware. Based on such understanding, the technical solutions mentioned above may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute the method according to each embodiment or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; within the idea of the invention, also technical features in the above embodiments or in different embodiments may be combined, steps may be implemented in any order, and there are many other variations of the different aspects of the invention as described above, which are not provided in detail for the sake of brevity; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (8)

1. An online multimedia file downloading method applied to a target client, wherein the target client operates in a peer-to-peer network, the method comprising:
acquiring a current data packet corresponding to the current playing progress of the online multimedia file;
determining target cache data packets which are continuously arranged behind the current data packet according to the playing time sequence;
detecting the downloading speed of a node for downloading the target cache data packet;
adjusting a downloading mode of the target cache data packet according to the playing speed of the target client and the downloading speed of the node, wherein the downloading mode comprises a first downloading mode in which the target client directly downloads the data packet from a content server and a second downloading mode in which the target client downloads the data packet from the node;
the adjusting the download mode of the target cache data packet according to the play speed of the target client and the download speed of the node comprises:
acquiring a play history of the target client, wherein the play history comprises the fast forward times of the target client playing the historical multimedia files according to the fast forward speed and the historical number of the played historical multimedia files;
calculating the ratio of the fast forwarding times to the historical number;
and adjusting the downloading mode of the target cache data packet according to the playing speed of the target client, the downloading speed of the node and the ratio of the fast forwarding times to the historical number.
2. The method of claim 1, wherein the adjusting the download mode of the target cache packet according to the play-out speed of the target client, the download speed of the node, and the ratio between the number of fast forwarding times and the historical number comprises:
judging whether the playing speed of the target client is greater than the downloading speed of the node or not;
if the playing speed of the target client is greater than the downloading speed of the node, according to the ratio of the fast forwarding times to the historical number, adjusting the downloading modes of the target cache data packet and cache data packets with preset lengths which are continuously arranged behind the target cache data packet;
and if the playing speed of the target client is lower than the downloading speed of the node, selecting the first downloading mode to download the target cache data packet.
3. The method according to claim 2, wherein the adjusting the downloading mode of the target cache packet and the cache packets of the preset length consecutively arranged after the target cache packet according to the ratio between the number of fast forwarding times and the historical number comprises:
judging whether the ratio of the fast forwarding times to the historical number is larger than a preset ratio threshold value or not;
if the ratio between the number of fast forwarding times and the historical number is larger than a preset ratio threshold, judging whether the downloading speed of a node corresponding to a preset-length cache data packet continuously arranged behind the target cache data packet is larger than the fast forwarding speed, if so, selecting the first downloading mode to download the target cache data packet and selecting the second downloading mode to download a preset-length cache data packet continuously arranged behind the target cache data packet, and if not, selecting the first downloading mode to download the target cache data packet and a preset-length cache data packet continuously arranged behind the target cache data packet;
and if the ratio of the fast forward times to the historical number is smaller than a preset ratio threshold, selecting the first download mode to download the target cache data packet and selecting the second download mode to download cache data packets with preset lengths which are continuously arranged behind the target cache data packet.
4. The method of claim 3, wherein the online multimedia file is divided into a plurality of data packets, each of the data packets having a corresponding number;
the selecting the first download mode to download the target cache data packet includes:
sending the number of the target cache data packet to the content server;
and receiving the target cache data packet returned by the content server according to the number of the target cache data packet.
5. An online multimedia file downloading apparatus applied to a target client, the target client operating in a peer-to-peer network, the apparatus comprising:
the acquisition module is used for acquiring a current data packet corresponding to the current playing progress of the online multimedia file;
a determining module, configured to determine, according to a playing time sequence, a target cache data packet that is continuously arranged behind the current data packet;
the detection module is used for detecting the downloading speed of the node for downloading the target cache data packet;
the adjustment module is used for adjusting the downloading mode of the target cache data packet according to the playing speed of the target client and the downloading speed of the node, wherein the downloading mode comprises a first downloading mode in which the target client directly downloads the data packet from a content server and a second downloading mode in which the target client downloads the data packet from the node;
the adjustment module includes:
the acquisition unit is used for acquiring the play history of the target client, wherein the play history comprises the fast forward times of the target client playing the historical multimedia files according to the fast forward speed and the historical number of the played historical multimedia files;
the calculating unit is used for calculating the ratio of the fast forwarding times to the historical number;
and the adjusting unit is used for adjusting the downloading mode of the target cache data packet according to the playing speed of the target client, the downloading speed of the node and the ratio of the fast forwarding times to the historical number.
6. The apparatus according to claim 5, wherein the adjusting unit is specifically configured to:
judging whether the playing speed of the target client is greater than the downloading speed of the node or not;
if the playing speed of the target client is greater than the downloading speed of the node, according to the ratio of the fast forwarding times to the historical number, adjusting the downloading modes of the target cache data packet and cache data packets with preset lengths which are continuously arranged behind the target cache data packet;
and if the playing speed of the target client is lower than the downloading speed of the node, selecting the first downloading mode to download the target cache data packet.
7. The apparatus according to claim 6, wherein the adjusting unit is further specifically configured to:
judging whether the ratio of the fast forwarding times to the historical number is larger than a preset ratio threshold value or not;
if the ratio between the number of fast forwarding times and the historical number is larger than a preset ratio threshold, judging whether the downloading speed of a node corresponding to a preset-length cache data packet continuously arranged behind the target cache data packet is larger than the fast forwarding speed, if so, selecting the first downloading mode to download the target cache data packet and selecting the second downloading mode to download a preset-length cache data packet continuously arranged behind the target cache data packet, and if not, selecting the first downloading mode to download the target cache data packet and a preset-length cache data packet continuously arranged behind the target cache data packet;
and if the ratio of the fast forward times to the historical number is smaller than a preset ratio threshold, selecting the first download mode to download the target cache data packet and selecting the second download mode to download cache data packets with preset lengths which are continuously arranged behind the target cache data packet.
8. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the online multimedia file download method of any of claims 1 to 4.
CN201811108426.3A 2018-09-21 2018-09-21 Online multimedia file downloading method and device and electronic equipment Active CN109067916B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811108426.3A CN109067916B (en) 2018-09-21 2018-09-21 Online multimedia file downloading method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811108426.3A CN109067916B (en) 2018-09-21 2018-09-21 Online multimedia file downloading method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN109067916A CN109067916A (en) 2018-12-21
CN109067916B true CN109067916B (en) 2021-05-11

Family

ID=64762463

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811108426.3A Active CN109067916B (en) 2018-09-21 2018-09-21 Online multimedia file downloading method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN109067916B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110868626B (en) * 2019-11-06 2021-06-11 北京达佳互联信息技术有限公司 Method and device for preloading content data
CN111031383B (en) * 2019-12-06 2022-08-05 RealMe重庆移动通信有限公司 Streaming media transmission method and device and electronic equipment
CN114189715A (en) * 2021-12-07 2022-03-15 北京奇艺世纪科技有限公司 Download address switching method and related equipment
CN115065859B (en) * 2022-06-07 2024-05-07 北京达佳互联信息技术有限公司 Video data acquisition method, device, equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101296359A (en) * 2007-04-24 2008-10-29 宋亚民 Video program digital copyright management method based on advertisement paying
CN102333106A (en) * 2010-07-13 2012-01-25 中国移动通信集团公司 Peer-to-peer (P2P) system resource scheduling method and device and system thereof
CN102883190A (en) * 2011-07-15 2013-01-16 深圳市快播科技有限公司 Optimal bandwidth distribution demand method and device
CN103327415A (en) * 2013-06-05 2013-09-25 北京奇虎科技有限公司 Method and device for accelerating network video downloading
CN106658067A (en) * 2016-12-31 2017-05-10 中国移动通信集团江苏有限公司 Cache setting method and apparatus
CN107333147A (en) * 2017-06-22 2017-11-07 深圳天珑无线科技有限公司 A kind of video buffer control method, terminal and storage device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101296359A (en) * 2007-04-24 2008-10-29 宋亚民 Video program digital copyright management method based on advertisement paying
CN102333106A (en) * 2010-07-13 2012-01-25 中国移动通信集团公司 Peer-to-peer (P2P) system resource scheduling method and device and system thereof
CN102883190A (en) * 2011-07-15 2013-01-16 深圳市快播科技有限公司 Optimal bandwidth distribution demand method and device
CN103327415A (en) * 2013-06-05 2013-09-25 北京奇虎科技有限公司 Method and device for accelerating network video downloading
CN106658067A (en) * 2016-12-31 2017-05-10 中国移动通信集团江苏有限公司 Cache setting method and apparatus
CN107333147A (en) * 2017-06-22 2017-11-07 深圳天珑无线科技有限公司 A kind of video buffer control method, terminal and storage device

Also Published As

Publication number Publication date
CN109067916A (en) 2018-12-21

Similar Documents

Publication Publication Date Title
CN109067916B (en) Online multimedia file downloading method and device and electronic equipment
US10659832B1 (en) Dynamic bitrate selection for streaming media
US9535653B2 (en) Adjusting audio volume of multimedia when switching between multiple multimedia content
US20210067578A1 (en) Streaming media segments
US10244023B2 (en) Active offline storage management for streaming media application used by multiple client devices
Cheng et al. Nettube: Exploring social networks for peer-to-peer short video sharing
CN108347648B (en) Dynamic adjustment of video quality
US9942347B2 (en) Dynamically adjusting media content cache size
WO2016061898A1 (en) Method and system for accessing channel of live broadcast room
US20140298395A1 (en) Methods and systems for playing video on multiple terminals
WO2018015122A1 (en) Systems and methods for using seektables to stream media items
US10250657B2 (en) Streaming media optimization
CN111625743B (en) Resource loading method and device and electronic equipment
US10178431B2 (en) Hybrid stream delivery
CN111654711A (en) Video playing control method, video playing method and device
US8762563B2 (en) Method and apparatus for improving the adaptive bit rate behavior of a streaming media player
JP2017126983A (en) Method and system for sharing live broadcast data
CN110740374A (en) multimedia data processing method, device, computer equipment and storage medium
US10796079B1 (en) Generating a page layout based upon analysis of session variables with respect to a client device
Liang et al. ipass: Incentivized peer-assisted system for asynchronous streaming
TW201501526A (en) Method for providing a content part of a multimedia content to a client terminal, corresponding cache
CN104580276A (en) Information pushing method, device and system, as well as information access device
TW201528806A (en) Method for providing a content part of a multimedia content to a client terminal, corresponding cache
WO2017084321A1 (en) Video subscription method and system, server, and router
Hung et al. An Effective Segment Pre-Fetching for Short-Form Video Streaming

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