Video pushing method and device, electronic equipment and storage medium
By obtaining the allocation log information of the client query request, determining the scarcity of video file seeds and downloading seeds from CDN, the problem of inaccuracy of seed push on video platform and excessive bandwidth usage is solved, and efficient and real-time video file push is achieved .
Patent Information
- Application Number
- CN202411156380.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-08-22
AI Technical Summary
In the prior art, video platforms have inaccuracy when calculating the number of video file seed pushes, resulting in excessive bandwidth use of content distribution network (CDN) and high push delay, which cannot effectively meet the real-time needs of users.
By obtaining the client's query request allocation log information, determining the scarcity of video file seeds, and sending the push information to the storage device in the target area, downloading the video file seeds from the CDN, realizing targeted push to the client, covering more Users, reduce CDN bandwidth requirements.
Targeted push of video file seeds is realized, the CDN bandwidth demand is reduced, the push efficiency is improved, the problems of scarcity of seeds and high push delay are solved, and bandwidth costs are significantly saved.
Smart Images

Figure CN119155488A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of multimedia processing technology, and in particular to a video pushing method, device, electronic equipment and storage medium. Background Art
[0002] Video platforms generate a large number of video files every day, including new programs, advertisements, and transcoded programs. When users browse and watch these video contents, they may generate bandwidth requirements for the Content Delivery Network (CDN).
[0003] Currently, it is usually for all service areas of the video platform, by regularly counting the number of video file playbacks and seeds, calculating the number of video file seed pushes based on specific experience values, and based on the number of video file seed pushes, downloading the video file seeds from the CDN to the storage device, so that the video file can be pushed to the client for playback through the storage device.
[0004] However, calculating the number of video file seeds to be pushed for all service areas of the video platform will make the number of video file seeds that need to be pushed in each service area inaccurate. For example, some service areas have a sufficient number of video file seeds and do not need to download the video file seeds from the CDN. However, based on the number of video file seeds pushed calculated according to a specific empirical value, the storage device in the service area may download some of the video file seeds from the CDN, which will result in more CDN bandwidth usage. Summary of the invention
[0005] The embodiments of the present invention provide a video push method, device, electronic device and storage medium to solve the technical problem of excessive use of CDN bandwidth in related technologies. The specific technical solution is as follows:
[0006] In a first aspect of an embodiment of the present invention, a video push method is first provided, which is applied to a first server, and the method includes:
[0007] Acquire allocation log information of a query request sent by a client, wherein the query request is used to request a seed of a video file from a service area of the first server, and the allocation log information is used to instruct the client of the query request to allocate the seed of the video file;
[0008] Determine first information according to the allocation log information, where the first information is used to indicate the allocation status of the seed of the video file to the client of the query request;
[0009] Determine push information according to the first information; the push information includes area information of a target area, the target area is a service area where seeds of the video file are scarce, the first information includes a target user request of the service area, and / or, when the number of seeds of the video file that can be allocated in the service area in the first information is less than a preset threshold, it is determined that the seeds of the video file in the service area are scarce, and the target user request is a query request for seeds of the video file that are not allocated in the service area;
[0010] The push information is sent to the storage device in the target area indicated by the area information; the push information is used to instruct the storage device in the target area to download the seed of the video file from the content distribution network CDN, and the storage device is used to push the seed of the video file to the client.
[0011] In a second aspect of an embodiment of the present invention, a video push device is further provided, which is applied to a first server, and the device includes:
[0012] an acquisition module, configured to acquire allocation log information of a query request sent by a client, wherein the query request is used to request a seed of a video file from a service area of the first server, and the allocation log information is used to instruct the client of the query request to allocate the seed of the video file;
[0013] A first determination module, configured to determine first information according to the allocation log information, wherein the first information is used to indicate the allocation of the seed of the video file to the client of the query request;
[0014] a second determination module, configured to determine push information according to the first information; the push information includes area information of a target area, the target area is a service area where seeds of the video file are scarce, the first information includes a target user request of the service area, and / or, when the number of seeds of the video file that can be allocated in the service area in the first information is less than a preset threshold, it is determined that the seeds of the video file in the service area are scarce, and the target user request is a query request for seeds of the video file that are not allocated in the service area;
[0015] A sending module is used to send the push information to a storage device in a target area indicated by the area information; the push information is used to instruct the storage device in the target area to download the seed of the video file from a content distribution network CDN, and the storage device is used to push the seed of the video file to the client.
[0016] In a third aspect of the embodiment of the present invention, a video push system is further provided, the system comprising: a client, a first server and a storage device; wherein:
[0017] The client is used to request a seed of a video file;
[0018] The first server is used to obtain allocation log information of a query request sent by a client, the query request is used to request a seed of a video file from a service area of the first server, and the allocation log information is used to indicate the allocation of the seed of the video file to the client of the query request; determine first information according to the allocation log information, the first information is used to indicate the allocation of the seed of the video file to the client of the query request; determine push information according to the first information; the push information includes area information of a target area, the target area is a service area where the seed of the video file is scarce, the first information includes a target user request of the service area, and / or, when the number of seeds of the video file that can be allocated by the service area in the first information is less than a preset threshold, it is determined that the seed of the video file in the service area is scarce, and the target user request is a query request for the seed of the video file that is not allocated in the service area;
[0019] The storage device is used to download the seed of the video file from the content distribution network CDN according to the push information, and push the seed of the video file to the client.
[0020] In a fourth aspect of an embodiment of the present invention, there is further provided an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0021] Memory, used to store computer programs;
[0022] The processor is used to implement any of the above-mentioned video pushing methods when executing the program stored in the memory.
[0023] In a fifth aspect of the embodiments of the present invention, a computer-readable storage medium is further provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer executes any of the above-mentioned video pushing methods.
[0024] In a sixth aspect of the embodiments of the present invention, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute any of the above-mentioned video pushing methods.
[0025] In the embodiment of the present invention, by obtaining the allocation log information of the query request sent by the client, the allocation of the seed of the video file to the client of the query request is determined according to the allocation log information, and the scarcity of the seed of the video file in the service area is determined according to the allocation of the seed of the video file to the client of the query request, and when it is determined that the seed of the video file in the service area is scarce, the push information is sent to the storage device in the target area to instruct the storage device in the target area to download the seed of the video file from the CDN. In this way, the seed of the video file can be downloaded from the CDN according to the actual demand of the user for the seed of the video file, so as to achieve the targeted push of the seed of the video file to the client of the query request, so that the pushed seed can cover more users, thereby effectively reducing the CDN bandwidth demand. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.
[0027] Figure 1 This is a flow chart of a video push method according to an embodiment of the present invention;
[0028] Figure 2 is a schematic diagram of the arrangement of the first hash value in an embodiment of the present invention;
[0029] Figure 3 A schematic diagram of the structure of a video push system according to an embodiment of the present invention;
[0030] Figure 4 This is a schematic diagram of the structure of a video push device in an embodiment of the present invention;
[0031] Figure 5 The figure is a schematic diagram of the structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0032] The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0033] See also Figure 1 , Figure 1 Flow chart of the video push method in an embodiment of the present invention. The video push method includes:
[0034] Step S101, obtaining allocation log information of a query request sent by a client, wherein the query request is used to request a seed of a video file from a service area of a first server, and the allocation log information is used to instruct the client of the query request to allocate a seed of the video file;
[0035] Step S102, determining first information according to the allocation log information, where the first information is used to indicate the allocation of the video file seed to the client making the query request;
[0036] Step S103, according to the first information, determining push information; the push information includes area information of the target area, the target area is a service area where seeds of the video file are scarce, and the first information includes a target user request of the service area, and / or, when the number of seeds of the video file that can be allocated in the service area in the first information is less than a preset threshold, it is determined that the seeds of the video file in the service area are scarce, and the target user request is a query request for seeds of the video file that are not allocated in the service area;
[0037] Step S104, sending push information to the storage device in the target area indicated by the area information; the push information is used to instruct the storage device in the target area to download the seed of the video file from the content distribution network CDN, and the storage device is used to push the seed of the video file to the client.
[0038] The video push method provided in the embodiment of the present invention is applied to a video push system, and is used to process a video query of a client, and return the video file queried by the client to the client. The video push system may include at least a first server, a storage device, and a client. The client may request a seed of a video file from a service area of the first server. The client requesting a seed of a video file from the service area of the first server means that the client requests a seed of a video file from a storage device in the service area. The first server may serve at least one area, and the service area may be divided according to the region where the client is located. Each service area may be preset, and video services may be provided to clients within the service area. The service area may be divided from a national, provincial, and other scopes, that is, the service area may refer to a national scope area, a provincial scope area, and the like.
[0039] In order to ensure the implementation of seed push of video files to multiple clients, the video push system usually needs to distribute the seeds of the video files to the clients of the query requests. The first server is used to implement the seed push of video files to multiple clients according to the allocation log information, and the first server can implement the seed push of video files to the clients in its service area according to the allocation log information of the query requests sent by the clients in its service area.
[0040] If the first server is not used to distribute the seed of the video file, the video push system may further include a scheduling server, which may be a peer-to-peer (P2P) scheduling server. The P2P scheduling server is used to receive a query request for a video from a client, distribute the seed of the requested video file to the client, and generate distribution log information, which may include a record of distributing the seed of the requested video file to the client.
[0041] In some embodiments, the first server can be used to download allocation log information from a P2P scheduling server to determine push information based on the allocation log information, and based on the push information, push the seed of the video file to the client of the query request in the target area. The push information can guide the storage device to download the seed of the video file from the CDN and P2P server. The seed of the video file downloaded by the storage device can be uploaded to the client to respond to the client's query request and complete the seed push of the video file.
[0042] In step S101, the P2P scheduling server can obtain the client's query request for the video in real time. The query request is used to request the seed of the video file from the service area of the client. The P2P scheduling server can allocate the seed of the video file requested by the client for each query request, and record each allocation result to obtain an allocation log. The first server can be the same server as the P2P scheduling server, or it can be a different server. Taking different servers as an example, the first server can download the allocation log from the P2P scheduling server at a regular interval, analyze the allocation log, and classify it according to the seed identifier of the video file. The downloaded allocation log can be classified into the allocation log information of the seed of each video file.
[0043] For example, the first server can continuously download the allocation log from the P2P scheduling server. For timeliness, the first server can count the allocation log every 5 minutes. In the 5 minutes from 14:00 to 14:05, the P2P scheduling server obtains 200,000 query requests for the seeds of video file 1 and 500,000 query requests for the seeds of video file 2. The P2P scheduling server can allocate the seeds of the video file requested by the client to each query request based on the seeds of the video file and generate an allocation log. The first server downloads the allocation log for this period and can classify it to obtain the allocation log information of the seeds of video file 1 and the allocation log information of the seeds of video file 2.
[0044] In this step, the allocation log of the query request of the P2P scheduling server is queried in real time, and push information is generated according to the allocation log. Since the real-time request has few video files, the amount of calculation is small, and it can truly reflect the scarcity of users' access to seeds, the processing speed is very fast, such as the processing speed only takes 5-20 minutes, which can achieve a near real-time effect, thereby improving the push efficiency.
[0045] In step S102, the allocation log generated by the P2P scheduling server may record the client identifier, the seed identifier of the video file, the query request identifier, the number of seeds that can be allocated, etc. The allocation log information may be analyzed to determine the first information, which is used to indicate the allocation of the seeds of the video file to the client of the query request. The first information may include the number of seeds in the service area, the total number of query requests in the service area, the number of allocated seeds, the number of allocated query requests, the number of seeds that have not been allocated, and the number of query requests that have not been allocated, i.e., the number of target user requests, etc.
[0046] In some embodiments, the total number of query requests in the service area, the number of allocated query requests, and the number of unallocated query requests can be counted based on the query request identifiers and the seed identifiers of the video files in the allocation log information.
[0047] For example, the total number of different query request identifiers in the allocation log information can be determined as the total number of query requests in the service area, and whether there is a corresponding relationship between the query request identifier and the seed identifier of the video file in the query allocation log can be determined to determine whether the query request in the allocation log information is allocated with the seed of the video file. Accordingly, the number of query requests to which the seed of the video file has been allocated in the service area can be determined by counting the number of corresponding relationships between the query request identifier and the seed identifier of the video file, and the number of query requests to which the seed of the video file has not been allocated can be determined by counting the number of query requests to which the seed of the video file has not been allocated, that is, the number of target user requests.
[0048] In some embodiments, the number of seeds allocated in the service area can also be determined by counting the number of correspondences between the query request identifier and the seed identifier of the video file. The number of seeds that can be allocated in the allocation log information can be obtained to obtain the number of seeds in the service area. Accordingly, the number of seeds in the service area is subtracted from the number of seeds that have been allocated to obtain the number of seeds that have not yet been allocated.
[0049] In step S103, the push information is used to instruct the storage device in the target area to download the seed of the video file from the CDN. The push information may include the area information of the target area, which is used to indicate which service area needs to download the seed of the video file from the CDN.
[0050] In some embodiments, the scarcity of seeds of video files in the service area can be determined based on whether there are query requests, i.e., target user requests, in the service area for which seeds have not yet been allocated. For example, if the first information includes the target user requests of the service area, it is determined that the seeds of the video files in the service area are scarce, and the supply is less than the demand. This means that the number of seeds of video files in the service area cannot meet the actual needs of users in the service area. Accordingly, the service area is the target area, and the storage device in the target area needs to download some additional seeds of the video files from the CDN for video push on the client. If the first information does not include the target user requests of the service area, it is determined that the seeds of the video files in the service area are relatively sufficient, and the supply is greater than the demand.
[0051] In some embodiments, the scarcity of seeds of video files in a service area can be determined based on the number of seeds of the video files in the service area. For example, if the number of seeds of video files that can be allocated in the service area in the first information is less than a preset threshold, it can be said that the service area has insufficient reserves of seeds for video files and may not be able to meet the increasing needs of users. It can be determined that the seeds of video files in the service area are scarce, and the service area can also be determined as a target area. Some seeds of the video file can be appropriately downloaded from the CDN to increase the number of seeds reserved in the target area. Among them, the preset threshold can be set according to actual needs and is not specifically limited here.
[0052] In some embodiments, the scarcity of seeds of the video file in the service area may also be determined by combining whether there is a target user request in the service area and the number of seeds of the video file in the service area. For example, if there is a target user request in the service area and the number of seeds of the video file in the service area is less than a preset threshold, it is determined that the seeds of the video file in the service area are scarce.
[0053] In some embodiments, when it is determined that the seeds of the video files in the service area are scarce, the area identifier of the service area, such as area 1, or the geographical information of the service area, such as province A, may be determined as the area information of the target area.
[0054] In step S104, in some embodiments, the first server may maintain a connection with the storage device in the service area. Accordingly, the first server may directly send the push information to the storage device in the target area according to the area information.
[0055] In some embodiments, the video push information may further include a second server. The second server, as a distribution device for the push information, may maintain a connection with a storage device in the service area. The first server may send the push information to the storage device in the target area based on the area information with the help of the second server. For example, the first server may store the push information in a database, the second server may obtain the push information from the database, and distribute the push information to the storage device in the target area based on the area information.
[0056] When the storage device in the target area receives the push information, it can download some seeds of the video file from the CDN according to the push information. In this way, if the seeds of the video file in the target area are scarce according to the actual needs of the user, the storage device in the target area can download some seeds of the video file from the CDN for the client's video push. In this way, the video file can be pushed according to the real user needs, rather than simply pushing the full amount (i.e. calculating the number of plays and seeds of the video files in the full range for video push), so that the pushed seeds can cover more users.
[0057] In this embodiment, by obtaining the allocation log information of the query request sent by the client, the allocation of the video file seed to the client of the query request is determined according to the allocation log information, and the scarcity of the video file seed in the service area is determined according to the allocation of the video file seed to the client of the query request. When it is determined that the video file seed is scarce in the service area, the push information is sent to the storage device in the target area to instruct the storage device in the target area to download the video file seed from the CDN. In this way, the video file seed can be downloaded from the CDN according to the actual demand of the user for the video file seed, so as to achieve the targeted push of the video file seed to the client of the query request, so that the pushed seed can cover more users, thereby effectively reducing the CDN bandwidth demand.
[0058] In addition, based on the real-time query of the video file seed distribution results, the video file is pushed from the CDN to the storage device in the corresponding target area in a targeted manner, so that the storage device in the target area has the corresponding seed to push to the client. Thus, by real-time tracking of user needs, accurate data analysis, and scientific calculation of push volume, the problems of seed scarcity and high push latency caused by video files can be solved, thereby significantly reducing CDN bandwidth usage and saving bandwidth costs.
[0059] In addition, the new video files generated by video companies every day may bring huge CDN bandwidth, and the reason is often due to the scarcity of video file seeds in the service area or the high latency of video push. For example, for all service areas of the video platform, the number of video file plays and seeds is regularly counted, and the number of video file seed pushes is calculated according to a specific experience value. Due to the large amount of data of the statistical video files, it will take a long time, which will lead to high latency of video push. This embodiment solves these problems. Based on the user's real-time query request and the P2P scheduling server's allocation of seeds according to the query request, its allocation log information can truly reflect the scarcity of seeds in the service area. Only the video files with query requests are analyzed. Compared with the full analysis of all video files and video requirements in the entire service area, this method greatly reduces the amount of calculation, so that the push of video files can achieve a near real-time effect, thereby improving the push efficiency.
[0060] It should be noted that, when the storage device in the target area receives the push information, it can download the torrents of the video file from the CDN and the P2P server in series or in parallel. For example, the torrents of the video file can be downloaded from the CDN and the P2P server in parallel. When all the torrents of the video file in the target area are downloaded from the P2P server, the torrents of the video file can be downloaded from the CDN according to the push information at the same time.
[0061] It should be noted that the push information may also include: the area information of other service areas except the target area in each service area, and the number of seeds of the video file downloaded from the P2P server. The storage devices of other service areas except the target area in each service area may also download the seeds of the video file from the P2P server according to the push information. In this way, if the seeds of the video file in the service area are not scarce, the storage devices in the service area may download the seeds of the video file from the P2P server, which may also help to increase the P2P traffic.
[0062] In some embodiments, upon receiving the push information, the storage device in the target area may download the seeds of the video file from the CDN according to a preset number. For example, for a target area where the number of seeds of the video file is less than a preset threshold, although the number of seeds of the video file in the target area counted in real time currently meets the actual needs of users in the service area, the storage device in the target area may also download some seeds of the video file from the CDN according to the preset number to reserve the number of seeds in the service area.
[0063] In some embodiments, the push information may also include a push quantity, which may indicate the demand for video file seeds in the target area, that is, the number of seeds to download the video file from the CDN. In some embodiments, the additional demand for video file seeds in each service area may be analyzed from the service area at the provincial level, that is, the number of seeds that need to be downloaded from the CDN in addition to the seeds at the P2P server.
[0064] In some embodiments, the push quantity in the push information may be a preset quantity. Optionally, the push information also includes a push quantity, which is the number of seeds of the video file downloaded by the storage device in the target area from the CDN. The step S103 specifically includes:
[0065] Determine the push quantity as the ratio of the number of target user requests for the seed of the video file in the target area to the number of users served by the seed of the video file;
[0066] The first information also includes the number of target user requests.
[0067] For example, by analyzing the distribution log information of the seed of video file 1, it is found that for region 1, there are 100,000 distribution records, and 10,000 users are not allocated seeds; for region 2, there are 100,000 distribution records, and 100,000 users are not allocated seeds. Accordingly, it can be determined that the number of target user requests for the seed of video file 1 in region 1 is 10,000, and the number of target user requests for the seed of video file 1 in region 2 is 100,000. Assuming that one seed of video file 1 can serve 10 users, the additional demand for the seed of video file 1 in region 1 is 1,000, that is, the push quantity is 1,000, and the additional demand for the seed of video file 1 in region 2 is 10,000, that is, the push quantity is 10,000.
[0068] For another example, it is counted that for region 3, all user requests are allocated to seeds, so the additional demand for seeds of video file 1 in region 3 is 0, and its push quantity can be 0, that is, the seeds of the video file are not additionally downloaded from the CDN to region 3.
[0069] In this embodiment, the push quantity is determined by the ratio of the number of target user requests for the seed of the video file in the target area to the number of users served by the seed of one video file, and the push quantity calculated according to the number of target user requests is sent to the storage device in the target area. In this way, the storage device in the target area can download the seed of the video file from the CDN according to the push quantity, so that the seed of the video file can be pushed to the client accurately according to the actual demand of the user for the seed of the video file.
[0070] Optionally, the push information further includes the push priority of the target area, the first information further includes: the number of seeds of the video file in the target area and the number of query requests for the seeds of the video file in the target area, and step S103 further includes:
[0071] Determine the scarcity of video file seeds in the target area according to the ratio of the number of video file seeds in the target area to the number of query requests; the ratio is inversely proportional to the scarcity, and the scarcity indicates the probability of video file seeds being allocated to a single user;
[0072] The push priority of the target area is determined based on the scarcity; the scarcity is directly proportional to the push priority.
[0073] In this embodiment, if there is only one target area, its push priority is the highest level. If there are at least two target areas, the push process can specifically calculate the push priority of each target area according to the scarcity of video file seeds in each target area, where the scarcity can be obtained based on the number of seeds of video files / the number of query requests in the target area. The smaller the probability of a single user being assigned a seed, the higher the push priority, and vice versa.
[0074] For example, if the number of seeds of video files in target area 1 is 10,000 and the number of query requests is 200,000, the probability of a single user being assigned a seed is 1 / 20, and the number of seeds of video files in target area 2 is 30,000 and the number of query requests is 1,000,000, then the probability of a single user being assigned a seed is 3 / 100. The probability of a single user in target area 2 being assigned a seed is lower than that in target area 1, indicating that the seeds in target area 2 are more scarce, and their push priority is higher than that in target area 1. On the contrary, if the seeds in target area 2 are less scarce than those in target area 1, their push priority is lower than that in target area 1.
[0075] In this embodiment, by setting a high push priority for a service area with a high degree of scarcity, the number of seeds in the target area can be quickly filled, and the maximum number of users can be covered with the least push, thereby improving the push efficiency.
[0076] In some embodiments, the push information may also include device identification information of a first storage device in the target area. The first storage device is a storage device that needs to download the video file from the CDN. The device identification information of the first storage device in the target area may be stored in the form of a push list or a data object, etc., which is explained below using a push list.
[0077] In some embodiments, a correspondence between the video identification information of the seed of the video file and the device identification information of the storage device in the target area can be established, and a push list can be generated based on the correspondence, so that the push information can be sent to the storage device corresponding to the device identification information in the push list. In this embodiment, by setting a storage device that downloads the seed of the video file from the CDN, it is possible to avoid repeated pushes from the CDN to the storage device in the target area.
[0078] Optionally, the push information further includes device identification information of a first storage device in the target area, where the first storage device is a storage device that needs to download the video file from the CDN. Step S103 further includes:
[0079] When the first information includes a target user request of the service area and / or the number of seeds of the video file that can be allocated in the service area in the first information is less than a preset threshold, obtaining device identification information of a second storage device in the target area, where the second storage device is a storage device that has completed seed downloading of the video file from the CDN;
[0080] Determine a target hash value from at least two first hash values according to the push quantity and the device identification information of the second storage device, wherein the at least two first hash values are hash values corresponding to the device identification information of the storage device in the target area, the device identification information of each storage device corresponds to a first hash value, and the target hash value is different from the first hash value corresponding to the device identification information of the second storage device;
[0081] The device identification information of the storage device corresponding to the target hash value is determined as the device identification information of the first storage device.
[0082] In this embodiment, when the target area is determined, the first server may obtain pre-stored device identification information of the second storage device in the target area, or may receive device identification information of the second storage device in the target area sent by the storage device in the target area.
[0083] When determining the target area, the first server may also obtain the first hash value of the device identification information of each storage device in the target area that is pre-stored, or may determine the first hash value corresponding to the device identification information using a hash algorithm based on the device identification information of each storage device in the target area.
[0084] According to the push quantity, the target hash value of the push quantity can be screened out from at least two first hash values. For example, if the push quantity is 2, two target hash values are screened out from at least two first hash values. The screening of the target hash value needs to be determined based on the device identification information of the second storage device. The device identification information of the storage device corresponding to the screened target hash value needs to be different from the device identification information of the second storage device, that is, the target hash value is different from the first hash value corresponding to the device identification information of the second storage device, so as to ensure that the storage device for downloading the seed of the video file from the CDN is different each time, so as to avoid repeated seed push to the same storage device.
[0085] When the target hash value is screened out, the device identification information of the storage device corresponding to the target hash value can be determined as the device identification information of the first storage device, and a corresponding relationship between the video identification information of the seed of the video file and the device identification information of the first storage device is established to generate a push list. The push information can include the push list.
[0086] In this embodiment, by setting a storage device for downloading the seed of the video file from the CDN, and determining the target hash value from at least two first hash values according to the push quantity and the device identification information of the second storage device, the device identification information of the storage device corresponding to the target hash value is different from the device identification information of the storage device that has completed the seed download of the video file. In this way, according to the device identification information of the storage device corresponding to the target hash value, the seed of the video file is pushed from the CDN to the first storage device, which can avoid the situation of repeated push from the CDN to the storage device in the target area.
[0087] In some embodiments, the target hash value can be determined in combination with the video identification information of the seed of the video file. This can be applicable to the seed push scenario where there are multiple different video files in the target area, so as to avoid the situation where the seed of each video file is repeatedly pushed from the CDN to the storage device in the target area.
[0088] In some embodiments, the second hash value corresponding to the video identification information can be determined using a hash algorithm based on the video identification information of the seed of the video file. The video identification information can include information such as a video uniform resource locator (URL) identifier, which can be obtained from the allocation log information. The video identification information of the seed of the video file is unique, and accordingly, the second hash value is also unique. The device identification information can be information such as a device ID.
[0089] In some embodiments, in order to maintain hash consistency, the same hash algorithm, ie, a consistent hash algorithm, may be used to determine the first hash value and the second hash value.
[0090] A target hash value smaller than the second hash value and equal to the pushed quantity may be selected from at least two first hash values, or a target hash value larger than the second hash value and equal to the pushed quantity may be selected from at least two first hash values.
[0091] When selecting, a target hash value larger than the second hash value can be selected in order of size. For example, if the second hash value is 199, the push quantity is 2, and at least two first hash values include 155, 200, 205, 300, and 600, then in order of size, the target hash values selected from the first hash values after 199 are 200 and 205.
[0092] In some embodiments, to avoid repeatedly pushing the seed of the video file to the same storage device, the first server may record the push list generated each time, such as recording the first push list generated at the first moment, and the first push list may include the correspondence between the video identification information of the seed of the video file and the device identification information of the second storage device. At the second moment, the target hash value may be selected from at least two first hash values according to the first push list generated at the first moment, and the target hash value selected at the second moment may be different from the target hash value selected at the first moment, that is, the hash value corresponding to the device identification information of the second storage device.
[0093] Optionally, the first hash value corresponding to the device identification information of the second storage device is greater than the second hash value and less than the target hash value, so that the device identification information of the first storage device determined each time is different, and the second hash value is the hash value corresponding to the video identification information of the seed of the video file.
[0094] In some embodiments, the first hash values of the device identification information of the storage devices in the target area may be sorted in ascending order, such as Figure 2 As shown, they can be arranged in a ring. The target hash values selected at the first moment are 200 and 205, which are greater than the first hash value 199, corresponding to storage devices AA and BB respectively, and the first push list includes [AA, BB]. At the second moment, the push quantity is still 2, and the target hash value selected at the second moment needs to be greater than the second hash value, and can be different from the target hash value selected at the first moment, that is, after the target hash value 205 selected at the first moment, target hash values 300 and 600 can be selected, which are also greater than 200 and 205, corresponding to storage devices CC and DD respectively, then the second push list generated at the second moment may include [AA, BB, CC, DD].
[0095] In this embodiment, according to the relationship between the hash values, the target hash value selected each time is limited to be greater than the hash value of the video identification information of the video file, and the target hash value selected this time is limited to be greater than the target hash value selected previously. This ensures that the target hash value selected each time is inconsistent, so as to ensure that the storage device of the target area pushed each time for the seed of the video file is different, thereby improving the seed coverage of the video file in the storage device of the target area, and further improving the efficiency of pushing the seed of the video file to the client.
[0096] Afterwards, a second push list can be generated according to the second hash value and the target hash value. The second push list can be a list obtained by splicing a sublist with the first push list, that is, the second push list can include the first push list, and the sublist includes the correspondence between the video identification information corresponding to the second hash value and the device identification information corresponding to the target hash value. The second push list can also be the sublist, that is, the second push list only includes the device identification information of the first storage device in the target area that needs to be downloaded from the CDN this time. The second push list is used to indicate the storage device that can download the video file seed from the CDN.
[0097] For example, the first push list is [[VV], [AA, BB]], and the sublist is [[VV], [CC, DD]], then the second push list is [[VV], [AA, BB, CC, DD]], where VV is the video identification information corresponding to the second hash value 199.
[0098] Afterwards, the first server can send the push information containing the second push list to the first storage device in the target area. Correspondingly, the first storage device in the target area can download the seed of the video file from the CDN according to the second push list. For example, in the second push list [[VV],[AA,BB,CC,DD]] generated at the second moment, the seed of the video file with the video identification information of VV has a corresponding second hash value of 199. If two copies of the video file seed need to be pushed to the storage device in the target area, then the seeds will be pushed to the storage device in the target area with the device identification information of CC and DD.
[0099] For example, in the second push list [[LL],[AA',BB',CC',DD']] generated at the second moment, the seed of the video file with the video identification information of LL has a corresponding second hash value of 2. It is necessary to push 4 copies of the video file seeds to the storage device in the target area, which are pushed to the storage devices in the target area with the device identification information of AA', BB', CC' and DD'.
[0100] It should be noted that the hash values of the video identification information of the seeds of different video files are different, and the push lists are also different; however, the push list is consistent each time the storage device to be pushed is determined for the same video file. If the seed of the video file with video identification information VV needs to push 2 copies to the target area, then the storage devices to be pushed are determined to be AA and BB. If the video file VV needs to push 4 copies to the target area, then the storage devices to be pushed are determined to be AA, BB, CC, and DD. Correspondingly, at the storage device end of the target area, when the second push list is obtained, if 2 copies have been pushed at the first moment, respectively pushed to storage devices AA and BB, then 2 more copies need to be pushed at the second moment, and the storage devices to be pushed are CC and DD. This can avoid repeated pushes to the storage devices.
[0101] In some embodiments, the video push system may further include a database and a second server, and the database may be a Redis database. Optionally, after step S103, the method may further include:
[0102] Store the push information in the database;
[0103] The second server can access the database to read the push information, the second server is permanently connected to the storage device in the target area, and the second server is used to distribute the push information to the storage device in the target area.
[0104] That is, the first server can store the push information in the Redis database, and the second server, as a distribution server, can read the push information from the database and distribute it to the storage device in the target area by using the long connection between the second server and the storage device. The storage device can be a server that can be used to upload video files to the client for playback, so as to realize video push to the client.
[0105] In this embodiment, the first server determines the push information according to the allocation log information, and establishes a connection between the first server and the second server through the database, so that the second server can obtain the push information determined by the first server and send the push information to the storage device in the target area. In this way, the determination and distribution of the push information are performed by two servers, and the two servers can cooperate in parallel to complete the real-time video push, thereby ensuring the efficiency and real-time nature of the video push.
[0106] It should be noted that after the storage device downloads a segment of a video file, ie, a seed, it can immediately register the video information with the P2P scheduling server to provide upload resources for the P2P scheduling server to distribute the seed of the video file to the client and update the distribution log.
[0107] Figure 3FIG. 1 is a schematic diagram of the structure of a video push system according to an embodiment of the present invention. Figure 3 As shown, the system includes: a client 301, a first server 302 and a storage device 303; wherein,
[0108] Client 301, used to request the seed of the video file;
[0109] The first server 302 is used to obtain allocation log information of a query request sent by a client, the query request is used to request a seed of a video file from a service area of the first server, and the allocation log information is used to indicate the allocation of the seed of the video file to the client of the query request; determine first information according to the allocation log information, the first information is used to indicate the allocation of the seed of the video file to the client of the query request; determine push information according to the first information; the push information includes area information of a target area, the target area is a service area where the seed of the video file is scarce, the first information includes a target user request of the service area, and / or, when the number of seeds of the video file that can be allocated to the service area in the first information is less than a preset threshold, it is determined that the seed of the video file in the service area is scarce, and the target user request is a query request for seeds of unallocated video files in the service area;
[0110] The storage device 303 is used to download the seed of the video file from the content distribution network CDN according to the push information, and push the seed of the video file to the client.
[0111] Alternatively, if Figure 3 As shown, the system also includes a database 304 and a second server 305, and the second server 305 is permanently connected to the storage device 303; wherein,
[0112] The first server 302 is further used to store the push information in the database;
[0113] The second server 305 is used to read the push information from the database and send the push information to the storage device in the target area.
[0114] Alternatively, if Figure 3 As shown, the system also includes a scheduling server 306; wherein,
[0115] The storage device 303 is also used to send the video information of the seed of the video file to the scheduling server when the seed download of the video file from the CDN is completed;
[0116] The scheduling server 306 is used to register the seed of the video file according to the video information, and distribute the seed of the requested video file to the client according to the registered video information to obtain distribution log information.
[0117] like Figure 3 As shown, the specific process of the push process applied to the video push system is as follows:
[0118] The client 301 queries the P2P scheduling server 306 and obtains the seed of the video file;
[0119] The P2P scheduling server 306 writes the client information and the allocated seed information into the allocation log;
[0120] The first server 302 periodically downloads the allocation log from the P2P scheduling server 306, analyzes the allocation log, analyzes the scarcity of the seeds of the video file requested by the client from each service area, and determines the push information of the service area for the service area where the seeds of the video file are scarce;
[0121] The first server 302 writes the push information into the Redis database 304;
[0122] The second server 305 reads the push information from the Redis database;
[0123] The storage device 303 uses the second server 305 to establish a long connection with the storage device, so as to obtain the push information in real time;
[0124] The storage device 303 downloads the seed of the video file from the CDN / P2P server according to the push information;
[0125] After downloading a seed of a video file, the storage device 303 immediately registers the video information with the P2P scheduling server 306 for the P2P scheduling server to distribute the seed, and informs the P2P scheduling server that it is ready to upload resources.
[0126] like Figure 4 As shown, the embodiment of the present invention further provides a video push device 400, including:
[0127] The acquisition module 401 is used to acquire the allocation log information of the query request sent by the client, wherein the query request is used to request the seed of the video file from the service area of the first server, and the allocation log information is used to instruct the client of the query request to allocate the seed of the video file;
[0128] A first determination module 402 is used to determine first information according to the allocation log information, where the first information is used to indicate the allocation of the seed of the video file to the client of the query request;
[0129] A second determination module 403 is configured to determine push information according to the first information; the push information includes area information of a target area, the target area is a service area where seeds of the video file are scarce, the first information includes a target user request of the service area, and / or, when the number of seeds of the video file that can be allocated in the service area in the first information is less than a preset threshold, it is determined that the seeds of the video file in the service area are scarce, and the target user request is a query request for seeds of the video file that are not allocated in the service area;
[0130] The sending module 404 is used to send the push information to the storage device in the target area indicated by the area information; the push information is used to instruct the storage device in the target area to download the seed of the video file from the content distribution network CDN, and the storage device is used to push the seed of the video file to the client.
[0131] Optionally, the push information further includes a push quantity, where the push quantity is the number of seeds of the video file downloaded by the storage device in the target area from the CDN. The second determining module 403 is further configured to:
[0132] Determine the push quantity as the ratio of the number of target user requests for the seed of the video file in the target area to the number of users served by one seed of the video file;
[0133] The first information also includes the number of requests from the target user.
[0134] Optionally, the push information further includes device identification information of a first storage device in the target area, where the first storage device is a storage device that needs to download the video file from the CDN. The second determining module 403 is further configured to:
[0135] When the first information includes a target user request of the service area, and / or the number of seeds of the video file that can be allocated by the service area in the first information is less than a preset threshold, obtaining device identification information of a second storage device in the target area, the second storage device being a storage device that has completed seed downloading of the video file from the CDN;
[0136] Determine a target hash value from at least two first hash values according to the push quantity and the device identification information of the second storage device, wherein the at least two first hash values are hash values corresponding to the device identification information of the storage devices in the target area, the device identification information of each storage device corresponds to a first hash value, and the target hash value is different from the first hash value corresponding to the device identification information of the second storage device;
[0137] The device identification information of the storage device corresponding to the target hash value is determined as the device identification information of the first storage device.
[0138] Optionally, the first hash value corresponding to the device identification information of the second storage device is greater than the second hash value and less than the target hash value, so that the device identification information of the first storage device determined each time is different, and the second hash value is the hash value corresponding to the video identification information of the seed of the video file.
[0139] Optionally, the push information further includes a push priority of the target area, the first information further includes: the number of seeds of the video file in the target area and the number of query requests for the seeds of the video file in the target area, the second determination module 403 is further used to:
[0140] Determining the scarcity of the video file seeds in the target area according to the ratio of the number of seeds of the video file in the target area to the number of query requests; the ratio is in inverse proportion to the scarcity, and the scarcity indicates the probability of the video file seeds being allocated to a single user;
[0141] The push priority of the target area is determined according to the scarcity; the scarcity is directly proportional to the push priority.
[0142] Optionally, the device further comprises:
[0143] A storage module, used for storing the push information in a database;
[0144] The second server can access the database to read the push information, the second server is in a long connection with the storage device in the target area, and the second server is used to distribute the push information to the storage device in the target area.
[0145] The embodiment of the present invention further provides an electronic device, such as Figure 5 As shown, it includes a processor 501 , a communication interface 502 , a memory 503 and a communication bus 504 , wherein the processor 501 , the communication interface 502 , and the memory 503 communicate with each other via the communication bus 504 .
[0146] Memory 503, used for storing computer programs;
[0147] The processor 501 is used to execute the program stored in the memory 503, and implements the following steps:
[0148] Acquire allocation log information of a query request sent by a client, wherein the query request is used to request a seed of a video file from a service area of the first server, and the allocation log information is used to instruct the client of the query request to allocate the seed of the video file;
[0149] Determine first information according to the allocation log information, where the first information is used to indicate the allocation status of the seed of the video file to the client of the query request;
[0150] Determine push information according to the first information; the push information includes area information of a target area, the target area is a service area where seeds of the video file are scarce, the first information includes a target user request of the service area, and / or, when the number of seeds of the video file that can be allocated in the service area in the first information is less than a preset threshold, it is determined that the seeds of the video file in the service area are scarce, and the target user request is a query request for seeds of the video file that are not allocated in the service area;
[0151] The push information is sent to the storage device in the target area indicated by the area information; the push information is used to instruct the storage device in the target area to download the seed of the video file from the content distribution network CDN, and the storage device is used to push the seed of the video file to the client.
[0152] Optionally, the push information further includes a push quantity, where the push quantity is the number of seeds of the video file downloaded by the storage device in the target area from the CDN, and when the computer program is executed by the processor 501, it is further used for:
[0153] Determine the push quantity as the ratio of the number of target user requests for the seed of the video file in the target area to the number of users served by one seed of the video file;
[0154] The first information also includes the number of requests from the target user.
[0155] Optionally, the push information further includes device identification information of a first storage device in the target area, where the first storage device is a storage device that needs to download the video file from the CDN, and when the computer program is executed by the processor 501, it is further used to:
[0156] When the first information includes a target user request of the service area, and / or the number of seeds of the video file that can be allocated by the service area in the first information is less than a preset threshold, obtaining device identification information of a second storage device in the target area, the second storage device being a storage device that has completed seed downloading of the video file from the CDN;
[0157] Determine a target hash value from at least two first hash values according to the push quantity and the device identification information of the second storage device, wherein the at least two first hash values are hash values corresponding to the device identification information of the storage devices in the target area, the device identification information of each storage device corresponds to a first hash value, and the target hash value is different from the first hash value corresponding to the device identification information of the second storage device;
[0158] The device identification information of the storage device corresponding to the target hash value is determined as the device identification information of the first storage device.
[0159] Optionally, the first hash value corresponding to the device identification information of the second storage device is greater than the second hash value and less than the target hash value, so that the device identification information of the first storage device determined each time is different, and the second hash value is the hash value corresponding to the video identification information of the seed of the video file.
[0160] Optionally, the push information further includes a push priority of the target area, the first information further includes: the number of seeds of the video file in the target area and the number of query requests for the seeds of the video file in the target area, and the computer program when executed by the processor 501 is further used for:
[0161] Determining the scarcity of the video file seeds in the target area according to the ratio of the number of seeds of the video file in the target area to the number of query requests; the ratio is in inverse proportion to the scarcity, and the scarcity indicates the probability of the video file seeds being allocated to a single user;
[0162] The push priority of the target area is determined according to the scarcity; the scarcity is directly proportional to the push priority.
[0163] Optionally, when the computer program is executed by the processor 501, it is further used for:
[0164] Storing the push information in a database;
[0165] The second server can access the database to read the push information, the second server is in a long connection with the storage device in the target area, and the second server is used to distribute the push information to the storage device in the target area.
[0166] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0167] The communication interface is used for communication between the above electronic device and other devices.
[0168] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Alternatively, the memory may also be at least one storage device located away from the aforementioned processor.
[0169] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0170] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions. When the computer-readable storage medium is executed on a computer, the computer executes the video pushing method described in any one of the above embodiments.
[0171] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes the video pushing method described in any one of the above embodiments.
[0172] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0173] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0174] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0175] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A video push method, characterized in that: Applied to a first server, the method comprises: Acquire allocation log information of a query request sent by a client, wherein the query request is used to request a seed of a video file from a service area of the first server, and the allocation log information is used to instruct the client of the query request to allocate the seed of the video file; Determine first information according to the allocation log information, where the first information is used to indicate the allocation status of the seed of the video file to the client of the query request; Determine push information according to the first information; the push information includes area information of a target area, the target area is a service area where seeds of the video file are scarce, the first information includes a target user request of the service area, and / or, when the number of seeds of the video file that can be allocated in the service area in the first information is less than a preset threshold, it is determined that the seeds of the video file in the service area are scarce, and the target user request is a query request for seeds of the video file that are not allocated in the service area; The push information is sent to the storage device in the target area indicated by the area information; the push information is used to instruct the storage device in the target area to download the seed of the video file from the content distribution network CDN, and the storage device is used to push the seed of the video file to the client.
2. The method according to claim 1, characterized in that The push information also includes a push quantity, which is the number of seeds of the video file downloaded by the storage device in the target area from the CDN. Determining the push information according to the first information includes: Determine the push quantity as the ratio of the number of target user requests for the seed of the video file in the target area to the number of users served by one seed of the video file; The first information also includes the number of requests from the target user.
3. The method according to claim 1 or 2, characterized in that: The push information further includes device identification information of a first storage device in the target area, where the first storage device is a storage device that needs to download the seed of the video file from the CDN. The determining the push information according to the first information includes: When the first information includes a target user request of the service area, and / or the number of seeds of the video file that can be allocated by the service area in the first information is less than a preset threshold, obtaining device identification information of a second storage device in the target area, the second storage device being a storage device that has completed seed downloading of the video file from the CDN; Determine a target hash value from at least two first hash values according to the push quantity and the device identification information of the second storage device, wherein the at least two first hash values are hash values corresponding to the device identification information of the storage devices in the target area, the device identification information of each storage device corresponds to a first hash value, and the target hash value is different from the first hash value corresponding to the device identification information of the second storage device; The device identification information of the storage device corresponding to the target hash value is determined as the device identification information of the first storage device.
4. The method according to claim 3, characterized in that The first hash value corresponding to the device identification information of the second storage device is greater than the second hash value and less than the target hash value, so that the device identification information of the first storage device determined each time is different, and the second hash value is the hash value corresponding to the video identification information of the seed of the video file.
5. The method according to claim 1 or 2, characterized in that: The push information further includes the push priority of the target area, the first information further includes: the number of seeds of the video file in the target area and the number of query requests for the seeds of the video file in the target area, and the determining of the push information according to the first information includes: Determining the scarcity of the video file seeds in the target area according to the ratio of the number of seeds of the video file in the target area to the number of query requests; the ratio is in inverse proportion to the scarcity, and the scarcity indicates the probability of the video file seeds being allocated to a single user; The push priority of the target area is determined according to the scarcity; the scarcity is directly proportional to the push priority.
6. The method according to claim 1, characterized in that After determining the push information according to the first information, the method further includes: Storing the push information in a database; The second server can access the database to read the push information, the second server is permanently connected to the storage device in the target area, and the second server is used to distribute the push information to the storage device in the target area.
7. A video push device, characterized in that: Applied to a first server, the device comprises: an acquisition module, configured to acquire allocation log information of a query request sent by a client, wherein the query request is used to request a seed of a video file from a service area of the first server, and the allocation log information is used to instruct the client of the query request to allocate the seed of the video file; A first determination module, configured to determine first information according to the allocation log information, wherein the first information is used to indicate the allocation of the seed of the video file to the client of the query request; a second determination module, configured to determine push information according to the first information; the push information includes area information of a target area, the target area is a service area where seeds of the video file are scarce, the first information includes a target user request of the service area, and / or, when the number of seeds of the video file that can be allocated in the service area in the first information is less than a preset threshold, it is determined that the seeds of the video file in the service area are scarce, and the target user request is a query request for seeds of the video file that are not allocated in the service area; A sending module is used to send the push information to a storage device in a target area indicated by the area information; the push information is used to instruct the storage device in the target area to download the seed of the video file from a content distribution network CDN, and the storage device is used to push the seed of the video file to the client.
8. A video push system, characterized in that: The system comprises: a client, a first server and a storage device; wherein, The client is used to request a seed of a video file; The first server is used to obtain allocation log information of a query request sent by a client, the query request is used to request a seed of a video file from a service area of the first server, and the allocation log information is used to indicate the allocation of the seed of the video file to the client of the query request; determine first information according to the allocation log information, the first information is used to indicate the allocation of the seed of the video file to the client of the query request; determine push information according to the first information; the push information includes area information of a target area, the target area is a service area where the seed of the video file is scarce, the first information includes a target user request of the service area, and / or, when the number of seeds of the video file that can be allocated by the service area in the first information is less than a preset threshold, it is determined that the seed of the video file in the service area is scarce, and the target user request is a query request for the seed of the video file that is not allocated in the service area; The storage device is used to download the seed of the video file from the content distribution network CDN according to the push information, and push the seed of the video file to the client.
9. The system according to claim 8, characterized in that The system further includes a database and a second server, wherein the second server is permanently connected to the storage device; wherein, The first server is further configured to store the push information in the database; The second server is used to read the push information from the database and send the push information to the storage device in the target area.
10. The system according to claim 8, characterized in that The system also includes a scheduling server; wherein, The storage device is further configured to send video information of the seed of the video file to the scheduling server when the seed download of the video file from the CDN is completed; The scheduling server is used to register the seed of the video file according to the video information, and distribute the requested seed of the video file to the client according to the registered video information to obtain the distribution log information.
11. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 1-6 when executing a program stored in a memory.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
File pushing method, system and device, electronic equipment and medium
CN110620828A
File downloading method and device based on complex network, equipment and storage medium
CN114650281A
Load balancing method and device and electronic equipment
CN115695434A
Live sub-stream sharing method and device
CN115842810A
Method and system for providing a CDN with granular quality of service
US20110078230A1
