CN110636327A - Video caching method and device, electronic equipment and storage medium - Google Patents

Video caching method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110636327A
CN110636327A CN201911034022.9A CN201911034022A CN110636327A CN 110636327 A CN110636327 A CN 110636327A CN 201911034022 A CN201911034022 A CN 201911034022A CN 110636327 A CN110636327 A CN 110636327A
Authority
CN
China
Prior art keywords
video
mobile terminal
downloading request
performance parameters
related performance
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.)
Granted
Application number
CN201911034022.9A
Other languages
Chinese (zh)
Other versions
CN110636327B (en
Inventor
尤国懿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Chaoyouai Technology Co Ltd
Original Assignee
Chengdu Chaoyouai Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Chaoyouai Technology Co Ltd filed Critical Chengdu Chaoyouai Technology Co Ltd
Priority to CN201911034022.9A priority Critical patent/CN110636327B/en
Publication of CN110636327A publication Critical patent/CN110636327A/en
Application granted granted Critical
Publication of CN110636327B publication Critical patent/CN110636327B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • H04N21/23106Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion involving caching operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4331Caching operations, e.g. of an advertisement for later insertion during playback
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/438Interfacing the downstream path of the transmission network originating from a server, e.g. retrieving MPEG packets from an IP network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB

Abstract

The application relates to a video caching method and device, electronic equipment and a storage medium, and belongs to the field of video processing. The video caching method is applied to a server, and comprises the following steps: when a video downloading request sent by a mobile terminal is received, acquiring related performance parameters carried in the video downloading request; determining a compression coding type according to the related performance parameters; and sending the video which is compressed according to the compression coding type and corresponds to the video downloading request to the mobile terminal. In the embodiment of the application, when a video downloading request sent by the mobile terminal is received, the optimal downloading standard is determined according to the related performance parameters representing the performance of the mobile terminal, and the video file compressed by the optimal downloading standard is returned, so that the phenomenon that hardware resources are good but a lower video compression standard is adopted is eliminated, and the situation that the user experience is influenced by forcibly using a high-level compression standard is avoided.

Description

Video caching method and device, electronic equipment and storage medium
Technical Field
The application belongs to the technical field of video processing, and particularly relates to a video caching method and device, electronic equipment and a storage medium.
Background
With the development of mobile terminal products and the explosion of network video resources, video caching has become an important way for people to watch and store videos. On one hand, due to the constraints of network bandwidth, the running speed of a mobile end product and the like, when a high-resolution video is watched on line or fast-forward and double-speed playing is carried out, a pause phenomenon can occur, the watching experience is seriously influenced, and if the video is cached locally, the fast-forward or double-speed playing operation can be smoothly carried out. On the other hand, for some videos without the time limit, after the videos are downloaded to the local, permanent collection of video resources can be achieved.
The existing mainstream caching modes mainly include two types, one is an h.264 compression coding standard, the other is an h.265 compression coding standard, and the existing mobile terminal does not support decoding of the h.265 compression coding standard due to the self performance, so that the h.264 compression coding standard is directly used for caching by default when a video is cached.
Disclosure of Invention
In view of this, an object of the present application is to provide a video caching method, an apparatus, an electronic device, and a storage medium, so as to select an optimal caching manner for a video download request sent by a mobile terminal when the video download request is received, so as to improve user experience.
The embodiment of the application is realized as follows:
in a first aspect, an embodiment of the present application provides a video caching method, which is applied to a server, and the method includes: when a video downloading request sent by a mobile terminal is received, acquiring related performance parameters carried in the video downloading request; determining a compression coding type according to the related performance parameters; and sending the video which is compressed according to the compression coding type and corresponds to the video downloading request to the mobile terminal. In the embodiment of the application, when a video downloading request sent by a mobile terminal is received, relevant performance parameters representing the performance of the mobile terminal are obtained, the optimal downloading standard is determined according to the relevant performance parameters, and a video file compressed by the optimal downloading standard is returned, so that the phenomenon of resource waste caused by the fact that hardware resources are good but a lower video compression standard is adopted is eliminated, and the situation that the advanced compression standard is forcibly used but is limited by the performance of the mobile terminal and does not support the standard, so that the user experience is influenced is avoided.
With reference to one possible implementation manner of the embodiment of the first aspect, determining a compression encoding type according to the related performance parameter includes: obtaining the score of each parameter in the related performance parameters according to a preset scoring rule; acquiring a preset weight of each parameter in the related performance, and calculating a comprehensive score according to the preset weight of each parameter and the score of each parameter; and determining the compression coding type according to the comprehensive score. In the embodiment of the application, the influence of different parameters on the compression coding standard is comprehensively measured, and the compression coding type is determined according to the comprehensive score obtained by multiplying and accumulating the preset weight and the corresponding score of each parameter, so that the optimal caching mode and good user watching experience of a video are ensured, and the optimization effects of halving the bandwidth, halving the storage and improving the efficiency are realized as far as possible on the basis of keeping the video quality.
With reference to a possible implementation manner of the embodiment of the first aspect, the obtaining a preset weight of each parameter in the related performance by the video download request further carrying a product model of the mobile terminal includes: searching whether the product model exists or not from a database, wherein preset weights of relevant performance parameters corresponding to different product models are stored in the database; if yes, acquiring a preset weight of each parameter in the relevant performance corresponding to the product model; and if not, acquiring default preset weight of each parameter in the related performance. In the embodiment of the application, the advantages and the disadvantages of mobile end products of various models are analyzed from the characteristics of each mobile end, the weight ratio suitable for the product is worked out under the influence of comprehensively measuring various factors on the selection of the compression standard, and the optimal download standard suitable for different products is pertinently determined.
With reference to a possible implementation manner of the embodiment of the first aspect, the obtaining the relevant performance parameter carried in the video download request includes: and acquiring hardware support conditions, CPU performance, GPU floating point operation capability, network bandwidth and residual storage space of a specified decoding type carried in the video downloading request. In the embodiment of the application, a plurality of factors influencing the compression coding standard are comprehensively considered, and the reliability and the accuracy of the finally determined optimal download standard are ensured.
In a second aspect, an embodiment of the present application further provides a video caching method, which is applied to a mobile terminal, and the method includes: when receiving a downloading operation triggered by a user, acquiring related performance parameters representing the performance of the local machine, sending a video downloading request carrying the related performance parameters to a server so that the server acquires the related performance parameters, determining a compression coding type according to the related performance parameters, and sending a video which is compressed by the compression coding type and corresponds to the video downloading request to the mobile terminal; and receiving a compressed video corresponding to the video downloading request sent by the server in response to the video downloading request, and caching the compressed video.
With reference to a possible implementation manner of the second aspect, the video download request further carries a product model of the mobile terminal, and accordingly, before obtaining the relevant performance parameter representing the performance of the mobile terminal, the method further includes: and acquiring the product model of the mobile terminal.
In a third aspect, an embodiment of the present application further provides a video caching apparatus, which is applied to a server, and the apparatus includes: the device comprises an acquisition module, a determination module and a sending module; the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring related performance parameters carried in a video downloading request when the video downloading request sent by a mobile terminal is received; the determining module is used for determining the compression coding type according to the related performance parameters; and the sending module is used for sending the video which is compressed according to the compression coding type and corresponds to the video downloading request to the mobile terminal.
In a fourth aspect, an embodiment of the present application further provides a video caching device, which is applied to a mobile terminal, and the device includes: acquiring a sending module and a receiving cache module; the acquisition and transmission module is used for acquiring related performance parameters representing the performance of the local computer when receiving downloading operation triggered by a user, transmitting a video downloading request carrying the related performance parameters to a server so that the server acquires the related performance parameters, determines a compression coding type according to the related performance parameters, and transmits a video which is compressed by the compression coding type and corresponds to the video downloading request to the mobile terminal; and the receiving and caching module is used for receiving the compressed video corresponding to the video downloading request sent by the server in response to the video downloading request and caching the compressed video.
In a fifth aspect, an embodiment of the present application further provides an electronic device, including: the memory is connected with the processor; the memory is used for storing programs; the processor is configured to invoke the program stored in the memory to perform the method according to the embodiment of the first aspect and/or any possible implementation manner in combination with the embodiment of the first aspect, or perform the method according to the embodiment of the second aspect and/or any possible implementation manner in combination with the embodiment of the second aspect.
In a sixth aspect, embodiments of the present application further provide a storage medium, where the storage medium stores a computer program, where the computer program is executed by a processor to perform the method as set forth in the foregoing first aspect and/or in connection with any one of the possible implementations of the first aspect, or to perform the method as set forth in the foregoing second aspect and/or in connection with any one of the possible implementations of the second aspect.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the embodiments of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and drawings.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts. The foregoing and other objects, features and advantages of the application will be apparent from the accompanying drawings. Like reference numerals refer to like parts throughout the drawings. The drawings are not intended to be to scale as practical, emphasis instead being placed upon illustrating the subject matter of the present application.
Fig. 1 shows a flowchart of a video caching method applied in a mobile terminal according to an embodiment of the present application.
Fig. 2 shows a flowchart of a video caching method applied in a server according to an embodiment of the present application.
Fig. 3 shows a module schematic diagram of a video caching apparatus applied in a mobile terminal according to an embodiment of the present application.
Fig. 4 shows a schematic block diagram of a video caching apparatus applied in a server according to an embodiment of the present application.
Fig. 5 shows a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, relational terms such as "first," "second," and the like may be used solely in the description herein to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Further, the term "and/or" in the present application is only one kind of association relationship describing the associated object, and means that three kinds of relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone.
Referring to fig. 1, steps included in a video caching method applied to a mobile terminal according to an embodiment of the present application will be described with reference to fig. 1. In the embodiment of the Application, at least one Application (APP) is installed in the mobile terminal and corresponds to the server.
Step S101: when receiving a downloading operation triggered by a user, acquiring related performance parameters representing the performance of the local computer, and sending a video downloading request carrying the related performance parameters to a server.
When a user wants to cache a certain video, the user clicks the corresponding "download" flag, and the mobile terminal can receive the download operation triggered by the user, and further obtain the relevant performance parameters representing the performance of the local computer, for example, parameters such as hardware support for a specified decoding type, CPU (Central Processing Unit) performance, GPU (graphics Processing Unit) floating point arithmetic capability, network bandwidth, and remaining storage space. It should be noted that the relevant performance parameter may only include one parameter for hardware support of a specific decoding type, or may add at least one remaining parameter based on the parameter, that is, in this case, the relevant performance parameter may include: for example, the hardware support of the specified decoding type + at least one parameter of CPU performance, GPU floating point arithmetic capability, network bandwidth, and remaining memory space may include the above 5 parameters. Of course, the related performance parameters may include other parameters besides the above 5 parameters.
Optionally, the specific decoding type may be a decoding type of an h.265 compression coding standard, and it is understood that the specific decoding type may be set as needed to adapt to different compression coding standards.
After the related performance parameters representing the performance of the local machine are obtained, a video downloading request carrying the related performance parameters is sent to the server, so that the server obtains the related performance parameters, determines a compression coding type according to each related performance parameter, and sends the video which is compressed by the compression coding type and corresponds to the video downloading request to the mobile terminal.
When receiving a video download request sent by a mobile terminal, a server acquires a related performance parameter carried by the video download request from the video download request, and determines a compression coding type required by a video cache according to the related performance parameter, and if the related performance parameter only includes a parameter of a hardware support condition for a specified decoding type, the server can directly determine the compression coding type according to the hardware support condition, for example, if hardware decoding of an h.265 compression coding standard is supported, the compression coding type is determined to be the h.265 compression coding type, and if the hardware decoding of the h.265 compression coding standard is not supported, the compression coding type is determined to be the h.264 compression coding type.
If the related performance parameters include 2 or more parameters, the process of the server according to the determination of the compression encoding type may be: obtaining the score of each parameter in the relevant performance parameters according to a preset scoring rule; acquiring the preset weight of each parameter in the relevant performance, and calculating a comprehensive score according to the acquired preset weight of each parameter and the score of each parameter; and finally, determining the compression coding type according to the comprehensive score. For convenience of understanding, the related performance parameters include five parameters, namely hardware support of a specified decoding type, CPU performance, GPU floating point arithmetic capability, network bandwidth and remaining storage space: because the hard decoding of the specified type is only supported or not, only 0 minute or 100 minutes exist, if the hardware supports the hard decoding of the specified decoding type, the score is 100, otherwise, the score is 0. The scoring rule of the CPU performance is shown in table 1, and assuming that the main frequency of the CPU is 2GHz, the corresponding score is 70.
TABLE 1
CPU dominant frequency (HZ) Score value
≤1G 60
(1G,1.5G] 65
(1.5,2G] 70
(2G,2.5G] 80
(2.5,3G] 90
More than two cores and one dominant frequency greater than 2.5G 100
The scoring rule of the GPU floating point operation capability is shown in table 2, and assuming that the GPU floating point operation capability is 180GFLOPs, the corresponding score is 80.
TABLE 2
GPU Floating-Point Performance (GFLOPs) Score value
≤100 60
(100,150] 70
(150,200] 80
(200,300] 90
>300 100
The scoring rule of the remaining memory space is shown in table 3, and assuming that the remaining memory space is 10G, the corresponding score is 80.
TABLE 3
Surplus storage space (G) Score value
≥20 60
(15,20) 70
(10,15] 80
(3,10] 90
[1,3] 100
The scoring rule of the network bandwidth is shown in table 4, and assuming that the network bandwidth is 185Mbps, the corresponding score is 70.
TABLE 4
Network bandwidth (Mbps) Score value
≥200 60
(100,200) 70
(50,100] 80
(30,50] 90
<30 100
It should be noted that, when the scoring rule is formulated, since the smaller the network bandwidth and the smaller the remaining storage space, the higher the demand level for the high compression standard is, and since the high compression standard can save half of the space and bandwidth, the smaller the remaining storage space and the smaller the network bandwidth, the higher the score is.
As an implementation manner, the preset weights corresponding to the same type of parameters of different models of mobile terminals are the same, for example, the preset weight of the specified decoding type is 0.8, the preset weight of the CPU performance is 0.4, the preset weight of the GPU floating point operation capability is 0.3, the preset weight of the network bandwidth is 0.1, and the preset weight of the remaining storage space is 0.1.
As another embodiment, the preset weights corresponding to the same type of parameters of different models of mobile terminals are not identical. For example, the configuration data of software and hardware such as chips, CPUs, GPUs and the like of various types of mobile end products can be known in advance through browsing various channels such as brand official network data and release instructions of various mainstream mobile end products, and the weight groups of related performance parameters of different types of products can be obtained through an analytic hierarchy process and stored in a database by combining data collection results. The database stores preset weights of relevant performance parameters corresponding to different product models. The main criteria for determining the weight sets of different models are based on the importance level, and the weights are adjusted according to the factors of considering the short board of the mobile terminal. For example, a GPU of a certain model of mobile phone generally needs to increase the weight of the GPU factor for implementing h.265 compression for the model of product, while the network bandwidth and the video size mainly depend on the personal requirement and the real-time network status, and the weight of the two influencing factors between different models of products is basically kept unchanged. In this embodiment, the video download request further carries a product model of the mobile terminal, and correspondingly obtains the preset weight of each parameter in the related performance, which may be to search whether the product model exists in the database; if yes, acquiring the preset weight of each parameter in the relevant performance corresponding to the product model; and if not, acquiring default preset weight of each parameter in the related performance. For example, the weight group assignment for a model of product is as follows: the weights assigned to the decoding type, GPU floating point arithmetic performance, CPU performance, remaining memory space, and network bandwidth are 0.8, 0.4, 0.4, 0.1, and 0.1, respectively.
It should be noted that the preset weights of the above example only indicate the degree of influence on the high compression standard, and therefore the sum of the preset weights of the 5 parameters may not be 1. Since hardware decoding has an advantage of several orders of magnitude in decoding time, hardware decoding only requires 0.5 second if soft decoding is 10 seconds with a CPU, and whether or not hard decoding of a specified type is supported is the most important factor affecting the selection of a compression standard. H.265 decoding is particularly expensive in floating point operations, so the stronger the floating point operation capability of the GPU, the less important it is to reduce decoding time. The CPU can perform soft decoding, and can support the h.265 decoding standard when the performance is particularly strong, but the resource consumption is also huge, so if the two factors are poor, the CPU processing capability is also general, the decoding of the h.265 compression coding standard cannot be completed, and the weight is small. H.265 compression can save half of the storage space and network bandwidth over h.264 compression, so these two factors can only be used as measures for how urgent the high compression standard is applied, and the impact on the decision is small.
When the video downloading request further carries the product model of the mobile terminal, correspondingly, the method further comprises: and acquiring the product model of the mobile terminal. The obtaining of the product model of the mobile terminal may be obtaining the product model of the mobile terminal before obtaining the relevant performance parameter representing the performance of the mobile terminal, for example, when a user opens a corresponding application program. Of course, the model of the mobile terminal may be obtained when the download operation triggered by the user is received, that is, the related performance parameters representing the performance of the mobile terminal may be obtained at the same time.
After the preset weight of each parameter and the fraction of each parameter are obtained, a comprehensive score can be calculated, i.e. the obtained fraction of each parameter is multiplied by the corresponding weight and accumulated to obtain a final score, wherein the specific formula is as follows:
wherein j represents the main parameters influencing the selection of the coding standard, n represents the total number of the parameters influencing the selection of the coding standard, wjRepresenting the weight, s, taken by the parameter j in the selection of criteriajRepresents the score of the parameter j, and r is the composite score. For convenience of understanding, for example, assuming that the preset weight of a specific decoding type is 0.8, the corresponding score is 100 (supporting hard decoding of the specific type), the preset weight of CPU performance is 0.4, the corresponding score is 70, the preset weight of GPU floating point arithmetic capability is 0.3, the corresponding score is 80, the preset weight of network bandwidth is 0.1, the corresponding score is 90, the preset weight of the remaining storage space is 0.1, and the corresponding score is 80, the comprehensive score is:
0.8*100+0.4*70+0.3*80+0.1*90+0.1*80=80+28+24+9+8=149。
and determining the compression coding type according to the comprehensive score, for example, if the r value is greater than 85, selecting to use the H.265 compression coding standard, and otherwise, using the H.264 compression coding standard. Wherein it is determined that the demarcation threshold using the h.265 and h.264 compression coding standards cannot be less than the composite value of a specified type of hard decoding, such as 0.8 x 100-80. And after determining the compression coding type, the server sends the video which is compressed by the compression coding type and corresponds to the video downloading request to the mobile terminal. For example, if the determined compression coding type is the h.265 compression coding standard type, the video file compressed by the h.265 compression coding standard is sent to the mobile terminal.
Step S102: and receiving a compressed video corresponding to the video downloading request sent by the server in response to the video downloading request, and caching the compressed video.
After sending the video downloading request to the server, the mobile terminal receives the compressed video corresponding to the video downloading request sent by the server in response to the video downloading request, caches the compressed video, and selects a corresponding decoding mode to decode and play when the user plays the cache.
Referring to fig. 2, an embodiment of the present application further provides a video caching method applied to a server, and the steps included in the method will be described with reference to fig. 2.
Step S201: when a video downloading request sent by a mobile terminal is received, the related performance parameters carried in the video downloading request are obtained.
The server acquires the relevant performance parameters carried in the video downloading request when receiving the video downloading request sent by the mobile terminal.
The related performance parameter only includes a parameter for hardware support of a specific decoding type, or other parameters may be added on the basis of the parameter, that is, at this time, the related performance parameter may include: for at least one parameter of the hardware support condition + CPU performance, GPU floating point arithmetic capability, network bandwidth, and remaining storage space of the specified decoding type, for example, the above 5 parameters are included at the same time, that is, at this time, the obtaining of the relevant performance parameter carried in the video download request includes: and acquiring hardware support conditions, CPU performance, GPU floating point operation capacity, network bandwidth and residual storage space of the specified decoding type carried in the video downloading request.
Step S202: and determining the type of compression coding according to the related performance parameters.
If the related performance parameter only includes a parameter of a hardware support situation for a specific decoding type, the compression encoding type may be determined directly according to the hardware support situation, for example, if hardware decoding of the h.265 compression encoding standard is supported, the compression encoding type is determined to be the h.265 compression encoding type, and if not, the compression encoding type is determined to be the h.264 compression encoding type.
If the related performance parameters include 2 or more parameters, the process of the server according to the determination of the compression encoding type may be: obtaining the score of each parameter in the relevant performance parameters according to a preset scoring rule; acquiring the preset weight of each parameter in the relevant performance, and calculating a comprehensive score according to the acquired preset weight of each parameter and the score of each parameter; and finally, determining the compression coding type according to the comprehensive score. The specific process of calculating the composite score is described in detail above, and is not described here to avoid redundancy.
When the preset weight of each parameter in the related performance parameters is obtained, as an implementation manner, the preset weights corresponding to the same type of parameters of different models of mobile terminals may be the same. As another embodiment, the preset weights corresponding to the same type of parameters of different models of mobile terminals are not identical. At this time, the video download request also carries the product model of the mobile terminal, and correspondingly obtains the preset weight of each parameter in the relevant performance, which may be to search whether the product model exists in the database; if yes, acquiring the preset weight of each parameter in the relevant performance corresponding to the product model; and if not, acquiring default preset weight of each parameter in the related performance.
Step S203: and sending the video which is compressed according to the compression coding type and corresponds to the video downloading request to the mobile terminal.
And after the corresponding compression coding type is determined, the server sends the video which is compressed by the compression coding type and corresponds to the video downloading request to the mobile terminal. The compression process may be to compress the video polarity corresponding to the video download request by the compression coding type after determining the compression coding type; or compressed in advance, that is, the server stores video files compressed by different compression types.
As shown in fig. 3, an embodiment of the present application further provides a video buffering apparatus 100 applied in a mobile terminal, including: the acquisition and transmission module 110 and the reception and caching module 120.
The obtaining and sending module 110 is configured to, when a downloading operation triggered by a user is received, obtain a relevant performance parameter representing performance of the local device, send a video downloading request carrying the relevant performance parameter to a server, so that the server obtains the relevant performance parameter, determine a compression coding type according to the relevant performance parameter, and send a video compressed by the compression coding type corresponding to the video downloading request to the mobile terminal.
A receiving and caching module 120, configured to receive a compressed video corresponding to the video downloading request sent by the server in response to the video downloading request, and cache the compressed video.
Optionally, when the video download request further carries the product model of the mobile terminal, correspondingly, the obtaining and sending module 110 is further configured to obtain the product model of the mobile terminal before obtaining the related performance parameter representing the performance of the mobile terminal.
The video buffering apparatus 100 according to the embodiment of the present application has the same implementation principle and technical effect as those of the foregoing method embodiments, and for brevity, reference may be made to the corresponding contents in the foregoing method embodiments for which no mention is made in part.
As shown in fig. 4, an embodiment of the present application further provides a video caching apparatus 200 applied in a server, including: an acquisition module 210, a determination module 220, and a sending module 230.
The obtaining module 210 is configured to obtain, when a video downloading request sent by a mobile terminal is received, a relevant performance parameter carried in the video downloading request. Optionally, the obtaining module 210 is specifically configured to obtain a hardware support condition, a CPU performance, a GPU floating point arithmetic capability, a network bandwidth, and a remaining storage space for a specified decoding type, which are carried in the video downloading request.
A determining module 220, configured to determine a compression coding type according to the related performance parameter. Optionally, the determining module 220 is specifically configured to: obtaining the score of each parameter in the related performance according to a preset scoring rule; acquiring a preset weight of each parameter in the related performance, and calculating a comprehensive score according to the preset weight of each parameter and the score of each parameter; and determining the compression coding type according to the comprehensive score. The video downloading request further carries a product model of the mobile terminal, and at this time, the determining module 220 is further configured to: searching whether the product model exists or not from a database, wherein preset weights of relevant performance parameters corresponding to different product models are stored in the database; if yes, acquiring a preset weight of each parameter in the relevant performance corresponding to the product model; and if not, acquiring default preset weight of each parameter in the related performance.
A sending module 230, configured to send the video compressed by the compression coding type corresponding to the video downloading request to the mobile terminal.
The video buffering apparatus 200 according to the embodiment of the present application has the same implementation principle and technical effect as those of the foregoing method embodiments, and for brevity, reference may be made to the corresponding contents in the foregoing method embodiments for which no mention is made in part.
As shown in fig. 5, an embodiment of the present application further provides an electronic device 300. The electronic device 300 includes: a communication module 310, a memory 320, a communication bus 330, and a processor 340.
The communication module 310, the memory 320, and the processor 340 may be electrically connected to each other through one or more communication buses 330 or signal lines, so as to implement data transmission or interaction. Wherein the communication module 310 (e.g., WiFi module) is used for transceiving data. The memory 320 is used for storing a computer program, such as a software functional module shown in fig. 3 or fig. 4, that is, the video caching device 100 or the video caching device 200. The video caching apparatus 100 or 200 includes at least one software functional module, which may be stored in the memory 320 in the form of software or firmware (firmware) or solidified in an Operating System (OS) of the electronic device 300. The processor 340 is configured to execute an executable module stored in the memory 320, such as a software functional module or a computer program included in the video caching apparatus 100 or the video caching apparatus 200. For example, when the processor 340 executes a software function module or a computer program included in the video caching apparatus 100, the processor 340 is configured to, when a download operation triggered by a user is received, obtain a relevant performance parameter representing a performance of the local apparatus, send a video download request carrying the relevant performance parameter to a server, so that the server obtains the relevant performance parameter, determine a compression coding type according to the relevant performance parameter, and send a video compressed by the compression coding type corresponding to the video download request to the mobile terminal; and the processor 340 is further configured to receive a compressed video corresponding to the video downloading request sent by the server in response to the video downloading request, and cache the compressed video. For another example, when the processor 340 executes a software function module or a computer program included in the video caching apparatus 200, the processor 340 is configured to, when receiving a video download request sent by a mobile terminal, obtain a relevant performance parameter carried in the video download request; the processor 340 is further configured to determine a compression encoding type according to the related performance parameter; and the processor 340 is further configured to send the video compressed by the compression coding type corresponding to the video downloading request to the mobile terminal.
The Memory 320 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like.
Processor 340 may be an integrated circuit chip having signal processing capabilities. The processor may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor 340 may be any conventional processor or the like.
The electronic device 300 may be a mobile terminal or a server. The server includes, but is not limited to, a web server, a database server, a cloud server, and the like. The mobile terminal can be a smart phone, a tablet, a notebook and other devices.
The present embodiment also provides a non-volatile computer-readable storage medium (hereinafter, referred to as a storage medium), where the storage medium stores a computer program, and the computer program is executed by a computer as described above, when the computer is executed by the mobile terminal, the steps included in the video caching method shown in fig. 1 are executed, or the computer program is executed by a computer as described above, when the computer is executed by the server, the steps included in the video caching method shown in fig. 2 are executed.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. 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.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a notebook computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A video caching method is applied to a server, and the method comprises the following steps:
when a video downloading request sent by a mobile terminal is received, acquiring related performance parameters carried in the video downloading request;
determining a compression coding type according to the related performance parameters;
and sending the video which is compressed according to the compression coding type and corresponds to the video downloading request to the mobile terminal.
2. The method of claim 1, wherein determining a type of compression encoding based on the associated performance parameter comprises:
obtaining the score of each parameter in the related performance according to a preset scoring rule;
acquiring a preset weight of each parameter in the related performance, and calculating a comprehensive score according to the preset weight of each parameter and the score of each parameter;
and determining the compression coding type according to the comprehensive score.
3. The method according to claim 2, wherein the video download request further carries a product model of the mobile terminal, and the obtaining of the preset weight of each parameter in the related performance comprises:
searching whether the product model exists or not from a database, wherein preset weights of relevant performance parameters corresponding to different product models are stored in the database;
if yes, acquiring a preset weight of each parameter in the relevant performance corresponding to the product model;
and if not, acquiring default preset weight of each parameter in the related performance.
4. The method according to any one of claims 1-3, wherein obtaining the relevant performance parameters carried in the video download request comprises:
and acquiring hardware support conditions, CPU performance, GPU floating point operation capability, network bandwidth and residual storage space of a specified decoding type carried in the video downloading request.
5. A video caching method is applied to a mobile terminal, and the method comprises the following steps:
when receiving a downloading operation triggered by a user, acquiring related performance parameters representing the performance of the local machine, sending a video downloading request carrying the related performance parameters to a server so that the server acquires the related performance parameters, determining a compression coding type according to the related performance parameters, and sending a video which is compressed by the compression coding type and corresponds to the video downloading request to the mobile terminal;
and receiving a compressed video corresponding to the video downloading request sent by the server in response to the video downloading request, and caching the compressed video.
6. The method according to claim 5, wherein the video download request further carries a product model of the mobile terminal, and accordingly, before obtaining the relevant performance parameters characterizing the performance of the mobile terminal, the method further comprises:
and acquiring the product model of the mobile terminal.
7. A video caching apparatus, applied to a server, the apparatus comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring related performance parameters carried in a video downloading request when the video downloading request sent by a mobile terminal is received;
the determining module is used for determining the compression coding type according to the related performance parameters;
and the sending module is used for sending the video which is compressed according to the compression coding type and corresponds to the video downloading request to the mobile terminal.
8. A video caching apparatus, applied to a mobile terminal, the apparatus comprising:
the acquisition and transmission module is used for acquiring related performance parameters representing the performance of the local computer when receiving downloading operation triggered by a user, transmitting a video downloading request carrying the related performance parameters to a server so that the server acquires the related performance parameters, determines a compression coding type according to the related performance parameters, and transmits a video which is compressed by the compression coding type and corresponds to the video downloading request to the mobile terminal;
and the receiving and caching module is used for receiving the compressed video corresponding to the video downloading request sent by the server in response to the video downloading request and caching the compressed video.
9. An electronic device, comprising: the memory is connected with the processor;
the memory is used for storing programs;
the processor, configured to invoke a program stored in the memory to perform the method according to any one of claims 1-4, or to perform the method according to any one of claims 5-6.
10. A storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, performs the method according to any one of claims 1-4, or performs the method according to any one of claims 5-6.
CN201911034022.9A 2019-10-28 2019-10-28 Video caching method and device, electronic equipment and storage medium Active CN110636327B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911034022.9A CN110636327B (en) 2019-10-28 2019-10-28 Video caching method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911034022.9A CN110636327B (en) 2019-10-28 2019-10-28 Video caching method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110636327A true CN110636327A (en) 2019-12-31
CN110636327B CN110636327B (en) 2022-02-01

Family

ID=68978010

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911034022.9A Active CN110636327B (en) 2019-10-28 2019-10-28 Video caching method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110636327B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111405312A (en) * 2020-04-26 2020-07-10 广州酷狗计算机科技有限公司 Live broadcast stream pushing method, device, terminal, server and storage medium
CN115208870A (en) * 2022-06-21 2022-10-18 北京快乐茄信息技术有限公司 Compression algorithm determination method and device, electronic equipment and storage medium

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080260029A1 (en) * 2007-04-17 2008-10-23 Bo Zhang Statistical methods for prediction weights estimation in video coding
WO2009045683A1 (en) * 2007-09-28 2009-04-09 Athanasios Leontaris Video compression and tranmission techniques
CN101547365A (en) * 2009-05-08 2009-09-30 北京北纬通信科技股份有限公司 Method and device of coding video for guaranteeing display quality of specific regions
CN101656887A (en) * 2009-09-23 2010-02-24 杭州华三通信技术有限公司 Method and device for selecting rate control algorithm
CN101702774A (en) * 2009-10-23 2010-05-05 深圳中兴力维技术有限公司 Mobile video code stream customizing device and method applied to mobile video monitoring system
EP2450877A1 (en) * 2010-11-09 2012-05-09 Sony Computer Entertainment Europe Limited System and method of speech evaluation
CN102780728A (en) * 2011-05-13 2012-11-14 腾讯科技(深圳)有限公司 Media file transcoding and downloading method and client
CN103167318A (en) * 2011-12-13 2013-06-19 中国电信股份有限公司 Streaming media processing method, device, server and system
CN103221955A (en) * 2012-11-06 2013-07-24 华为技术有限公司 Content recommending method, system and apparatus
CN103561279A (en) * 2013-10-10 2014-02-05 中兴通讯股份有限公司 Method and system for playing multi-media file and cloud transcoding service device
EP2785068A1 (en) * 2013-03-26 2014-10-01 Fujitsu Limited Video image data delivery device, method and system
US8879464B2 (en) * 2009-01-29 2014-11-04 Avaya Inc. System and method for providing a replacement packet
CN105338358A (en) * 2014-07-25 2016-02-17 阿里巴巴集团控股有限公司 Image decoding method and device
CN106231353A (en) * 2016-07-22 2016-12-14 北京小米移动软件有限公司 VoIP communication means and device
CN106817351A (en) * 2015-12-01 2017-06-09 大唐移动通信设备有限公司 A kind of method and device of media negotiation
CN108521609A (en) * 2018-02-27 2018-09-11 北京达佳互联信息技术有限公司 Determine the method, apparatus and terminal of pushing video type

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080260029A1 (en) * 2007-04-17 2008-10-23 Bo Zhang Statistical methods for prediction weights estimation in video coding
WO2009045683A1 (en) * 2007-09-28 2009-04-09 Athanasios Leontaris Video compression and tranmission techniques
US8879464B2 (en) * 2009-01-29 2014-11-04 Avaya Inc. System and method for providing a replacement packet
CN101547365A (en) * 2009-05-08 2009-09-30 北京北纬通信科技股份有限公司 Method and device of coding video for guaranteeing display quality of specific regions
CN101656887A (en) * 2009-09-23 2010-02-24 杭州华三通信技术有限公司 Method and device for selecting rate control algorithm
CN101702774A (en) * 2009-10-23 2010-05-05 深圳中兴力维技术有限公司 Mobile video code stream customizing device and method applied to mobile video monitoring system
EP2450877A1 (en) * 2010-11-09 2012-05-09 Sony Computer Entertainment Europe Limited System and method of speech evaluation
CN102780728A (en) * 2011-05-13 2012-11-14 腾讯科技(深圳)有限公司 Media file transcoding and downloading method and client
CN103167318A (en) * 2011-12-13 2013-06-19 中国电信股份有限公司 Streaming media processing method, device, server and system
CN103221955A (en) * 2012-11-06 2013-07-24 华为技术有限公司 Content recommending method, system and apparatus
EP2785068A1 (en) * 2013-03-26 2014-10-01 Fujitsu Limited Video image data delivery device, method and system
CN103561279A (en) * 2013-10-10 2014-02-05 中兴通讯股份有限公司 Method and system for playing multi-media file and cloud transcoding service device
CN105338358A (en) * 2014-07-25 2016-02-17 阿里巴巴集团控股有限公司 Image decoding method and device
CN106817351A (en) * 2015-12-01 2017-06-09 大唐移动通信设备有限公司 A kind of method and device of media negotiation
CN106231353A (en) * 2016-07-22 2016-12-14 北京小米移动软件有限公司 VoIP communication means and device
CN108521609A (en) * 2018-02-27 2018-09-11 北京达佳互联信息技术有限公司 Determine the method, apparatus and terminal of pushing video type

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
石中博: ""基于内容分析的图像视频编码研究"", 《中国博士学位论文全文数据库》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111405312A (en) * 2020-04-26 2020-07-10 广州酷狗计算机科技有限公司 Live broadcast stream pushing method, device, terminal, server and storage medium
CN115208870A (en) * 2022-06-21 2022-10-18 北京快乐茄信息技术有限公司 Compression algorithm determination method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN110636327B (en) 2022-02-01

Similar Documents

Publication Publication Date Title
TWI693823B (en) Information display method and device
CN110636327B (en) Video caching method and device, electronic equipment and storage medium
CN104965659B (en) A kind of preloading method and device of page info
CN105681874A (en) Network video online playing method and device
US20110320715A1 (en) Identifying trending content items using content item histograms
CN104980773B (en) streaming media processing method and device, terminal and server
CN112312135B (en) Video publishing method and device, computer equipment and storage medium
US20170302721A1 (en) Cloud streaming service system, cloud streaming service method using optimal GPU, and apparatus for same
US20200145310A1 (en) Search result suggestions based on dynamic network latency classification
US20190327467A1 (en) Hologram streaming machine
CN105916030A (en) Method, device and system for recording breakpoint information of video on demand
CN108235075B (en) Video quality grade matching method, computer readable storage medium and terminal
US20150066433A1 (en) Measuring user interface performance consistency
CN105933741A (en) Advertisement playing method and device, and advertisement putting method, device and system
US20170257658A1 (en) Method for automatically pushing video based on analysis of user behavior and electronic device
CN103699614A (en) Method and device for determining default save path during resource downloading
CN111107438A (en) Video loading method and device and electronic equipment
US20240146998A1 (en) Systems, apparatus, and methods to improve watermark detection in acoustic environments
TW201445987A (en) Transmitting information based on reading speed
CN113055745A (en) Video playing processing method, device, equipment and storage medium
US20160125440A1 (en) Methods and apparatus to identify publisher advertising behavior
CN112911390B (en) Video data playing method and terminal equipment
CN115329179A (en) Data acquisition resource amount control method, device, equipment and storage medium
CN110856028B (en) Media data playing method, equipment and storage medium
CN114244843A (en) Streaming media downloading method, electronic equipment and storage medium

Legal Events

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