CN114745371A - Point-to-point downloading method, device, equipment and medium - Google Patents

Point-to-point downloading method, device, equipment and medium Download PDF

Info

Publication number
CN114745371A
CN114745371A CN202210499320.0A CN202210499320A CN114745371A CN 114745371 A CN114745371 A CN 114745371A CN 202210499320 A CN202210499320 A CN 202210499320A CN 114745371 A CN114745371 A CN 114745371A
Authority
CN
China
Prior art keywords
user
video file
information
target
target video
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.)
Pending
Application number
CN202210499320.0A
Other languages
Chinese (zh)
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.)
Hunan MgtvCom Interactive Entertainment Media Co Ltd
Original Assignee
Hunan MgtvCom Interactive Entertainment Media 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 Hunan MgtvCom Interactive Entertainment Media Co Ltd filed Critical Hunan MgtvCom Interactive Entertainment Media Co Ltd
Priority to CN202210499320.0A priority Critical patent/CN114745371A/en
Publication of CN114745371A publication Critical patent/CN114745371A/en
Pending legal-status Critical Current

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
    • 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
    • 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
    • H04L67/1061Peer-to-peer [P2P] networks using node-based peer discovery mechanisms
    • H04L67/1065Discovery involving distributed pre-established resource-based relationships among peers, e.g. based on distributed hash tables [DHT] 

Landscapes

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

Abstract

The application provides a point-to-point downloading method, electronic equipment acquires a downloading request of a requesting user including target video file information and target transport stream TS information in the target video file information, then acquires a user identification ID corresponding to a user including a video file according to the target video file information, then acquires the TS information in the target video file information included by the user according to the user identification ID, then determines the user including the target transport stream TS information as a target user, and then returns the user identification ID of the target user to the requesting user so that the requesting user acquires a downloading file from the target user according to the target user identification ID.

Description

Point-to-point downloading method, device, equipment and medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a peer-to-peer downloading method, device, and apparatus, and a computer-readable storage medium.
Background
Peer to peer (P2P) downloads may pick up data from multiple points and provide the data externally. For example, when a certain user watches a certain video at a terminal, the terminal may share the video to other users as a node, thereby saving bandwidth cost of a Content Delivery Network (CDN). Has high efficiency when the heat door resources are heated.
However, for a video being watched by a user, one video file is generally cut into a plurality of small files, and a terminal generally saves a played video in units of small files, reports relevant information to a scheduling service, and finally saves the relevant information in a remote dictionary service (Redis) cluster. Since the same popular video may be watched by more users (for example, hundreds of thousands or even millions of users) at the same time, the hash value of a small file is used as a key (key) for storage, the Redis cluster needs to store a large amount of videos, and the data amount is too large. Whereas if the Redis cluster takes the hash value of the entire video file as key, there may be a case where the p2p user only viewed a partial segment of the video, resulting in no data requested by the user.
Therefore, a peer-to-peer downloading method with less memory and high accuracy is needed.
Disclosure of Invention
The invention aims to: a point-to-point downloading method, device, equipment, computer readable storage medium and computer program product with small storage capacity and high accuracy are provided, and point-to-point accurate downloading of users can be realized under the condition of not storing a large number of data files.
In a first aspect, the present application provides a peer-to-peer downloading method, where the method includes:
acquiring a downloading request of a requesting user, wherein the downloading request comprises target video file information and target Transport Stream (TS) information in the target video file information;
acquiring a user identification ID corresponding to a user including the target video file according to the target video file information;
acquiring TS information in the target video file information included by the user according to the user identification ID;
determining a user including the target transport stream TS information as a target user;
and returning the user identification ID of the target user to the requesting user.
In some possible implementations, the method further includes:
video file information, a user identification ID corresponding to a user including a video file and TS information in the target video file information included by the user identification ID are obtained from a remote dictionary service Redis cluster.
In some possible implementation manners, the obtaining, according to the target video file information, a user identification ID including a target video file includes:
and inquiring the user identification ID comprising the target video file by taking the target video file information as a key.
In some possible implementations, the querying, with the target video file information as a key, a user identification ID including the target video file information includes:
and inquiring the user identification ID comprising the target video file information by taking the hash value of the target video file information as a key.
In some possible implementation manners, the obtaining, according to the user identification ID, TS information in the target video file information included in the user ID includes:
and inquiring TS information in the target video file information included by the user ID by taking the user ID as a key.
In some possible implementations, the TS information in the video file information is identified by an index number of the video file information.
In some possible implementations, the method further includes:
when the target transport stream TS information does not exist in TS information in the target video file information included by the user, video file information, a user identification ID corresponding to the user including the video file, and the TS information in the target video file information included by the user are obtained from a remote dictionary service Redis cluster.
In a second aspect, the present application provides a peer-to-peer downloading device, comprising:
the communication unit is used for acquiring a downloading request of a requesting user, wherein the downloading request comprises target video file information and target Transport Stream (TS) information in the target video file information;
the first acquisition unit is used for acquiring a user Identification (ID) comprising a target video file according to the target video file information;
a second obtaining unit, configured to obtain, according to the user identifier ID, TS information in the target video file information included in the user;
a determination unit for determining a user including the target transport stream TS information as a target user;
and the returning unit is used for returning the user identification ID of the target user to the requesting user.
In some possible implementations, the device communication unit is further to:
the method comprises the steps of obtaining video file information, a user identification ID corresponding to a user including a video file and TS information in target video file information included by the user from a remote dictionary service Redis cluster.
In some possible implementation manners, the first obtaining unit is specifically configured to:
and inquiring the user identification ID comprising the target video file by taking the target video file information as a key.
In some possible implementation manners, the first obtaining unit is specifically configured to:
and inquiring the user identification ID comprising the target video file by taking the hash value of the target video file information as a key.
In some possible implementation manners, the second obtaining unit is specifically configured to:
and inquiring TS information in the target video file information included by the user ID by taking the user ID as a key.
In some possible implementations, the TS information in the video file information is identified by an index number of the video file information.
In some possible implementations, the communication unit is specifically configured to:
and when the TS information in the target video file information included by the user ID does not exist in the TS information of the target transport stream TS information, acquiring video file information, a user identification ID including a video file and the TS information in the target video file information included by the user identification ID from a remote dictionary service Redis cluster.
In a third aspect, the present application provides an electronic device, comprising: a storage device having a computer program stored thereon; processing means for executing the computer program in the storage means to implement the steps of the method of the first aspect of the present disclosure.
In a fourth aspect, the present application provides a computer readable medium having stored thereon a computer program which, when executed by a processing apparatus, performs the steps of the method of the first aspect of the present disclosure.
In a fifth aspect, the present application provides a computer program product comprising instructions which, when run on an apparatus, cause the apparatus to perform the steps of the method of the first aspect described above.
From the above technical solution, the present disclosure has at least the following advantages:
in the technical scheme, the electronic device acquires a download request of a request user including target video file information and target transport stream TS information in the target video file information, then acquires a user identification ID corresponding to a user including the video file according to the target video file information, then acquires TS information in the target video file information respectively included by the user according to the user identification ID, then determines the user including the target transport stream TS information as a target user, and then returns the user identification ID of the target user to the request user, so that the request user acquires a download file from the target user according to the target user identification ID. Therefore, the user identification ID is obtained according to the video file information, and then the TS information in the video file information corresponding to the user identification ID is obtained, so that the condition that the data volume is large due to the fact that the TS information is used as a unit for storage is avoided, the condition that the TS information cannot be distinguished due to the fact that the video file information is used as a unit for storage can be avoided, and a point-to-point downloading mode with low storage capacity and high accuracy is provided.
The present application can further combine to provide more implementations on the basis of the implementations provided by the above aspects.
Additional features and advantages of the present application will be described in detail in the detailed description which follows.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
In order to more clearly illustrate the technical method of the embodiments of the present application, the drawings used in the embodiments will be briefly described below.
Fig. 1 is a schematic flowchart of a peer-to-peer downloading method according to an embodiment of the present disclosure;
fig. 2 is an index diagram of a peer-to-peer downloading method according to an embodiment of the present disclosure;
fig. 3 is a flowchart illustrating a peer-to-peer downloading method according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a peer-to-peer downloading device according to an embodiment of the present application;
fig. 5 is a schematic view of an electronic device according to an embodiment of the present application.
Detailed Description
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
In order to facilitate understanding of the technical solutions of the present application, some technical terms related to the present application are described below.
Peer to peer (P2P) downloads may pick up data from multiple points and provide the data externally. In general, when a user watches videos, the watched videos are retained in the cache of the terminal, and in the case of downloading P2P, the terminal may serve as a node to share the cached videos with other users. As described above, the P2P download can save the bandwidth cost of the Content Delivery Network (CDN), and is highly efficient in downloading portal resources.
Typically, a video (for example, HTTP Live Streaming (HLS)) viewed by a user is cut into small videos in a multiple Transport Stream (TS) format. The terminal saves the played (or cached) video by taking the TS as a unit, reports the progress information to a scheduling service, and finally saves the progress information to a Remote Dictionary service (Redis) cluster. In this way, when other users need to watch the video, the other users can obtain the TS file from the scheduling service, and at the same time, which terminal users have the requested TS file content, so as to obtain the TS file from the terminal.
Since there may be millions to tens of millions of users online at the same time, a popular video may be viewed by hundreds of thousands or even millions of users simultaneously, and each user may save 1 to 3 complete video files, while a video file may be divided into hundreds to thousands of ts files.
Therefore, if the hash value of the ts file is used as a key (key) to store all the user information of the ts file in the redis cluster, the redis cluster needs to store more information, and the data volume may exceed the TB level, which may cause the data volume in the redis cluster to explode and require more machines.
However, if only the hash value of the video file is taken as a key, there may be a case where a certain user only views a certain segment in the video, and thus a certain segment is also stored in the terminal thereof, so that there may be a case where data not including the data intended by the requesting user is included.
In view of the foregoing, the present application provides a peer-to-peer downloading method, which may be executed by an electronic device. An electronic device refers to a device having data processing capabilities and may be, for example, a server or a terminal. The terminal includes, but is not limited to, an id system, a smart phone, a tablet computer, a notebook computer, a Personal Digital Assistant (PDA), and the like. The server may be a cloud server, such as a central server in a central cloud computing cluster, or an edge server in an edge cloud computing cluster. Of course, the server may also be a server in a local data center. The local data center refers to a data center directly controlled by a user. In this embodiment, the electronic device may be a service scheduling device, and undertakes a service scheduling function.
Specifically, the service scheduling device obtains a download request of a requesting user including a target video file and target transport stream TS information in the target video file, and then obtains a user identification ID corresponding to the user including the target video file according to the target video file, where the user identification ID represents that the user includes the target video file. Further, TS information included in the target video file and included by the user is obtained according to the user identification ID, the user including the target transport stream TS information is determined as the target user, and then the user identification ID of the target user is returned to the requesting user, so that the requesting user can obtain the target transport stream TS information in the target video file to be downloaded according to the target user identification ID.
The service scheduling device may obtain a user identifier ID corresponding to a user including the target video file according to the target video file, and then determine whether TS information of the target video file included by the user includes target transport stream TS information according to the user identifier ID, thereby determining whether the user is determined to be the target user. The required space is small because the corresponding user identification ID is saved by taking the video file as a unit, and the TS information can be further determined according to the user identification ID, so that the method has high accuracy.
In order to make the technical solution of the present disclosure clearer and easier to understand, the following describes a peer-to-peer downloading method provided by the embodiment of the present disclosure, taking an electronic device as a service scheduling device as an example. Fig. 1 is a flowchart illustrating a peer-to-peer downloading method provided in the present application.
As shown in fig. 1, the method comprises the steps of:
s102: the service scheduling device obtains a download request of a requesting user.
The downloading request includes information of a target video file to be downloaded by a requesting user and information of a target Transport Stream (TS) in the target video file. The target video file may be represented by a hash value of the video file, which may be denoted as a cluster identifier (swarmID), for example. The TS information of the target transport stream in the target video file can be represented by a file Index number of the TS information, for example, TS Index, which indicates that the TS information is the several TS in the target video file.
S104: and the service scheduling equipment acquires the user identification ID corresponding to the user comprising the target video file according to the target video file information.
The service scheduling device includes a plurality of video files and an Identity Document (ID) of the video files. The user identifier including the video file indicates that the user equipment includes the video file, and specifically, may be any one of TS information included in the video file in the user equipment.
When a user watches the video file, the video file is included in the cache of the user terminal. When the user only watches the partial segment of the video file, the TS information corresponding to the partial segment of the video file is included in the cache.
In some possible implementations, the service scheduling device may periodically acquire P2P node information of the hot video from the redis cluster and cache the information to the local. Therefore, after acquiring the download request, the service scheduling device may acquire the user identifier ID including the target video file according to the target video file.
Specifically, the service scheduling apparatus may query a user identification ID (peerID) including the sweep ID as a value (value) with the sweep ID of the target video as a key (key). As shown in fig. 2, in the primary index, one sweep ID may be queried to obtain a plurality of user ID: peer1ID, peer2ID, etc.
S106: and the service scheduling equipment acquires the TS information in the target video file included by the user according to the user identification ID.
The user identification ID acquired by the service scheduling device is the user identification ID comprising the target video file. The service scheduling device may further query and obtain TS information of the target video file included in the user identification ID according to the obtained user identification ID.
Specifically, the service scheduling device uses the user identifier ID as a key to search and acquire the sweep ID and ts information respectively included in the user identifier ID. As shown in the secondary index of fig. 2, one peerID may correspond to one sweep ID and a plurality of TS information.
The TS information may be an index number of the target video segment in the target video file. A video file may be divided into a plurality of video segments according to a fixed length of time. For example, a video file having a duration of 1 hour may be divided into 60 video segments in units of one minute. The video segments can be indexed in chronological order, for example, a video segment with an index number of 1 represents 0 to 1 minute of a video file.
The TS information may be stored in the form of a bitmap string. The bitmap is used for marking the value corresponding to a certain element (key) by a Bit, and the Bit is used as a unit for storing data, so that the storage space can be greatly saved. As shown in fig. 2, if ts information is stored in the bitmap character string manner, it can be determined whether a corresponding ts file is stored according to whether the corresponding bit data is 1. For example, if the bit data is 1, it indicates that a ts file corresponding to the index number is stored.
The TS information may also be stored in a section manner. For example, the TS information corresponding to the user ID may be a [ startTsIndex, endTsIndex ] interval. startTsIndex represents the minimum index number of the ts file corresponding to the current user identification ID, and endTsIndex represents the maximum index number of the ts file corresponding to the current user identification ID. In some possible implementations, a vacant ts is allowed between startTsIndex and endTsIndex. When the TS information of the target transport stream of the requesting user is located within the [ startTsIndex, endTsIndex ], it indicates that the user ID owns the TS file desired by the requesting user.
S108: the service scheduling apparatus determines a user including the target transport stream TS information as a target user.
The user including the target transport stream TS information indicates that the cache of the user includes the target transport stream TS information in the target video file desired by the requesting user, so that the requesting user can obtain the target transport stream TS information from the cache of the target user. Accordingly, the service scheduling apparatus can determine a user including the target transport stream TS information as a target user.
S110: and the service scheduling equipment returns the user identification ID of the target user to the requesting user.
The target user is a user including the TS information required by the requesting user, so that after the service scheduling device returns the user identification ID of the target user to the requesting user, the requesting user can obtain the required TS information from the target user according to the user identification ID, thereby implementing point-to-point downloading.
In some possible implementation manners, the service scheduling device obtains, from the redis cluster, a user identification ID corresponding to a user including the video file and TS information in a target video file included by the user. When the TS information in the target video files respectively included by the users does not include the target transport stream TS information, the service scheduling device may obtain again the user identification ID corresponding to the user including the video file and the TS information in the target video file included by the user from the redis cluster to determine again whether the TS information in the target video files respectively included by the users includes the target transport stream TS information, thereby determining the target user.
Based on the above description, the present application provides a peer-to-peer downloading method, which may be performed by a scheduling service device. As shown in fig. 3, a requesting user inquires about which nodes have requested TS data from a scheduling service device, the scheduling service device obtains a download request of the requesting user, obtains a user identifier ID corresponding to a user including a video file according to a target video file in a REDIS cluster, obtains TS information in the target video file respectively included by the user according to the user identifier ID, determines the user including the TS information of a target transport stream as a target user, and returns the ID corresponding to the target user to the requesting user. The query of the scheduling service device based on the target video file may be performed in a redis cluster, or the corresponding information may be obtained from the redis cluster in advance. Therefore, the point-to-point downloading method with less storage capacity and high accuracy is realized.
Although the operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous.
It should be understood that the various steps recited in method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Fig. 4 is a schematic diagram illustrating a peer-to-peer downloading apparatus according to an exemplary disclosed embodiment, where, as shown in fig. 4, the downloading apparatus 400 includes:
a communication unit 402, configured to obtain a download request of a requesting user, where the download request includes target video file information and target transport stream TS information in the target video file information;
a first obtaining unit 404, configured to obtain a user identification ID including a target video file according to the target video file information;
a second obtaining unit 406, configured to obtain, according to the user identifier ID, TS information in the target video file information included in the user;
a determining unit 408 for determining a user including the TS information of the target transport stream as a target user;
a returning unit 410, configured to return the user identification ID of the target user to the requesting user.
In some possible implementations, the device communication unit is further to:
the method comprises the steps of obtaining video file information, a user identification ID corresponding to a user including a video file and TS information in target video file information included by the user from a remote dictionary service Redis cluster.
In some possible implementation manners, the first obtaining unit is specifically configured to:
and inquiring the user identification ID comprising the target video file by taking the target video file information as a key.
In some possible implementation manners, the first obtaining unit is specifically configured to:
and inquiring the user identification ID comprising the target video file by taking the hash value of the target video file information as a key.
In some possible implementation manners, the second obtaining unit is specifically configured to:
and inquiring TS information in the target video file information included by the user ID by taking the user ID as a key.
In some possible implementations, the TS information in the video file information is identified by an index number of the video file information.
In some possible implementations, the communication unit is specifically configured to:
and when the TS information in the target video file information included by the user ID does not exist in the TS information of the target transport stream TS information, acquiring video file information, a user identification ID including a video file and the TS information in the target video file information included by the user identification ID from a remote dictionary service Redis cluster.
The functions of the above modules have been elaborated in the method steps in the previous embodiment, and are not described herein again.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first obtaining unit may also be described as a "unit obtaining at least two internet protocol addresses".
Referring now to FIG. 5, a block diagram of an electronic device 500 suitable for use in implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, electronic device 500 may include a processing means (e.g., central processing unit, graphics processor, etc.) 501 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM503, various programs and data necessary for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM502, and the RAM503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
Generally, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 507 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; storage devices 508 including, for example, magnetic tape, hard disk, etc.; and a communication device 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 illustrates an electronic device 500 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or installed from the storage means 508, or installed from the ROM 502. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing device 501.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
In particular, the processes described above with reference to the flow diagrams may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or installed from the storage means 506, or installed from the ROM 502. The computer program, when executed by the processing apparatus 801, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims. With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims (10)

1. A peer-to-peer downloading method, the method comprising:
acquiring a downloading request of a requesting user, wherein the downloading request comprises target video file information and target Transport Stream (TS) information in the target video file information;
acquiring a user identification ID corresponding to a user including the target video file according to the target video file information;
acquiring TS information in the target video file included by the user according to the user identification ID;
determining a user including the target transport stream TS information as a target user;
and returning the user identification ID of the target user to the requesting user.
2. The method of claim 1, further comprising:
the method comprises the steps of obtaining video file information, a user identification ID corresponding to a user including a video file and TS information in a target video file included by the user from a remote dictionary service Redis cluster.
3. The method according to claim 1, wherein the obtaining a user identification ID including a target video file according to the target video file information comprises:
and inquiring a user identification ID corresponding to the user including the target video file by taking the target video file information as a key.
4. The method according to claim 3, wherein said querying the user ID of the target video file by using the target video file information as a key comprises:
and inquiring the user identification ID comprising the target video file by taking the hash value of the target video file information as a key.
5. The method according to claim 1, wherein said obtaining TS information in the target video file information included in the user ID according to the user ID comprises:
and inquiring TS information in the target video file, which is included by the user identification ID, by taking the user identification ID as a key.
6. The method according to any one of claims 1 to 5, wherein the TS information in the video file information is identified by an index number of the video file information.
7. The method of claim 1, further comprising:
and when the TS information in the target video file included by the user does not exist in the TS information of the target transport stream TS information, acquiring a user identification ID corresponding to the user including the video file and the TS information in the target video file information included by the user from a remote dictionary service Redis cluster.
8. A peer-to-peer downloading apparatus, the apparatus comprising:
the communication unit is used for acquiring a downloading request of a requesting user, wherein the downloading request comprises target video file information and target Transport Stream (TS) information in the target video file information;
the first acquisition unit is used for acquiring a user identification ID corresponding to a user including a target video file according to the target video file information;
a second obtaining unit, configured to obtain, according to the user identifier ID, TS information in the target video file information included in the user;
a determination unit for determining a user including the target transport stream TS information as a target user;
and the returning unit is used for returning the user identification ID of the target user to the requesting user.
9. An apparatus, comprising a processor and a memory;
the processor is to execute instructions stored in the memory to cause the device to perform the method of any of claims 1 to 7.
10. A computer-readable storage medium comprising instructions that direct a device to perform the method of any of claims 1-7.
CN202210499320.0A 2022-05-09 2022-05-09 Point-to-point downloading method, device, equipment and medium Pending CN114745371A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210499320.0A CN114745371A (en) 2022-05-09 2022-05-09 Point-to-point downloading method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210499320.0A CN114745371A (en) 2022-05-09 2022-05-09 Point-to-point downloading method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN114745371A true CN114745371A (en) 2022-07-12

Family

ID=82285716

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210499320.0A Pending CN114745371A (en) 2022-05-09 2022-05-09 Point-to-point downloading method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN114745371A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1710857A (en) * 2004-06-18 2005-12-21 千橡寰宇科技发展(北京)有限公司 Method and method for realizing document accelerated download
CN101764831A (en) * 2008-12-24 2010-06-30 中国移动通信集团公司 Method and system for sharing stream media data, and stream media node
CN101959054A (en) * 2009-07-14 2011-01-26 中国电信股份有限公司 Integrated P2P (Peer-To-Peer) VOD (Video-On-Demand) system and partner node selecting method
CN102244665A (en) * 2010-05-13 2011-11-16 中国移动通信集团公司 Bitmap management and node collection inquiry method, node and index server
CN103986747A (en) * 2014-04-14 2014-08-13 曦威胜科技开发(深圳)有限公司 Method for sharing and downloading files in P2P protocol
CN104581374A (en) * 2014-12-31 2015-04-29 深圳市同洲电子股份有限公司 Methods for obtaining slicing files and generating sub m3u8 files, node and server
WO2017035795A1 (en) * 2015-09-01 2017-03-09 深圳好视网络科技有限公司 Method and device for transmitting streaming media data

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1710857A (en) * 2004-06-18 2005-12-21 千橡寰宇科技发展(北京)有限公司 Method and method for realizing document accelerated download
CN101764831A (en) * 2008-12-24 2010-06-30 中国移动通信集团公司 Method and system for sharing stream media data, and stream media node
CN101959054A (en) * 2009-07-14 2011-01-26 中国电信股份有限公司 Integrated P2P (Peer-To-Peer) VOD (Video-On-Demand) system and partner node selecting method
CN102244665A (en) * 2010-05-13 2011-11-16 中国移动通信集团公司 Bitmap management and node collection inquiry method, node and index server
CN103986747A (en) * 2014-04-14 2014-08-13 曦威胜科技开发(深圳)有限公司 Method for sharing and downloading files in P2P protocol
CN104581374A (en) * 2014-12-31 2015-04-29 深圳市同洲电子股份有限公司 Methods for obtaining slicing files and generating sub m3u8 files, node and server
WO2017035795A1 (en) * 2015-09-01 2017-03-09 深圳好视网络科技有限公司 Method and device for transmitting streaming media data

Similar Documents

Publication Publication Date Title
CN111581563B (en) Page response method and device, storage medium and electronic equipment
CN110516159B (en) Information recommendation method and device, electronic equipment and storage medium
CN112632323A (en) Video playing method, device, equipment and medium
CN110795446A (en) List updating method and device, readable medium and electronic equipment
CN112015816A (en) Data synchronization method, device, medium and electronic equipment
CN112272226A (en) Picture loading method and device and readable storage medium
CN110636367A (en) Video loading method and device, terminal equipment and medium
CN111163336B (en) Video resource pushing method and device, electronic equipment and computer readable medium
CN112035529A (en) Caching method and device, electronic equipment and computer readable storage medium
CN112906394A (en) Address recognition method, device, equipment and storage medium
CN111225255B (en) Target video push playing method and device, electronic equipment and storage medium
CN111262907B (en) Service instance access method and device and electronic equipment
CN113139082A (en) Multimedia content processing method, apparatus, device and medium
CN112732302A (en) Configuration updating method and device of application program and electronic equipment
CN111797353A (en) Information pushing method and device and electronic equipment
CN110781066A (en) User behavior analysis method, device, equipment and storage medium
CN114745371A (en) Point-to-point downloading method, device, equipment and medium
CN111628913B (en) Online time length determining method and device, readable medium and electronic equipment
CN113360348A (en) Exception request processing method and device, electronic equipment and storage medium
CN112115154A (en) Data processing and data query method, device, equipment and computer readable medium
CN111597439A (en) Information processing method and device and electronic equipment
CN110716885B (en) Data management method and device, electronic equipment and storage medium
CN113612676B (en) Social group message synchronization method, device, equipment and storage medium
CN110855767B (en) Method, device, equipment and storage medium for responding operation request
CN111787107B (en) Message processing method and device, readable medium and electronic equipment

Legal Events

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