CN110809167B - Video playing method and device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN110809167B
CN110809167B CN201810884488.7A CN201810884488A CN110809167B CN 110809167 B CN110809167 B CN 110809167B CN 201810884488 A CN201810884488 A CN 201810884488A CN 110809167 B CN110809167 B CN 110809167B
Authority
CN
China
Prior art keywords
video
period
sub
played
video information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810884488.7A
Other languages
Chinese (zh)
Other versions
CN110809167A (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.)
China Mobile Communications Group Co Ltd
China Mobile Communications Ltd Research Institute
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Communications Ltd Research Institute
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 China Mobile Communications Group Co Ltd, China Mobile Communications Ltd Research Institute filed Critical China Mobile Communications Group Co Ltd
Priority to CN201810884488.7A priority Critical patent/CN110809167B/en
Publication of CN110809167A publication Critical patent/CN110809167A/en
Application granted granted Critical
Publication of CN110809167B publication Critical patent/CN110809167B/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/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • 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
    • 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/232Content retrieval operation locally within server, e.g. reading video streams from disk arrays
    • 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/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention relates to the technical field of video playing, in particular to a video playing method, a video playing device, electronic equipment and a storage medium, wherein the method comprises the following steps: the method comprises the steps that an MEC server receives a video playing request which is sent by a client and carries identification information of a video to be played; judging whether video information of a video to be played is stored in a local cache; if so, sending the video information of the video to be played to the client; if not, sending a video playing request carrying identification information of the video to be played to a service server; and receiving the video information of the video to be played sent by the service server, and sending the video information of the video to be played to the client. In the invention, the MEC server is added in the existing network architecture, so that the MEC server can directly send the video information in the local cache or forward the video information sent by the service server, thereby achieving the purposes of reducing the video calling flow, relieving the network pressure and improving the user experience.

Description

Video playing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of video playing technologies, and in particular, to a video playing method and apparatus, an electronic device, and a storage medium.
Background
With the continuous development of information communication technology, the information communication habit of people gradually changes from voice + file + picture to video, and high-definition and smooth video has already occupied the mainstream as the information transmission mode. Therefore, as a great deal of life and entertainment information of people is transferred to videos and the demands of various industries on the videos are increased, in order to meet the interactive video demands under new situations and the demands of different industries, the video cloud becomes a great development direction of the penetration of cloud computing to the industries at present.
The video cloud is a cloud computing scheme which is based on a cloud computing concept and adopts a video as a cloud end to present a processing result to a terminal. As an application of cloud computing in the video field, a video cloud can cloud a video service, and integrate cloud acquisition, cloud transcoding, cloud storage, cloud management, cloud live broadcast and cloud on-demand broadcast. The process of uploading and downloading videos based on a video cloud is shown in fig. 1, that is, a video acquisition device uploads videos to a server, then transcodes the videos through cloud computing, stores the videos into a service server, and then transmits media content to a Client (Client) through the service server.
When the client initiates video frequency modulation based on the existing network architecture, whether the client is a live video service or a video on demand service, the flow is as shown in fig. 2, that is, the client sends a video frequency modulation request to the base station, then connects with a target video in the service server through the core network, and finally completes the interaction between the client and the target video through layer-by-layer transmission.
Therefore, when multiple people watch the same live video or the same video popular in the public on demand at the same time, all the clients under the same base station need to send the same video calling process, and the service server needs to feed back corresponding video information for each client independently. Due to the repeated sending of the video calling flow and the video information, on one hand, network resources at all levels in a transmission link are occupied, so that network congestion is caused, network paralysis is easily caused when access is increased suddenly, and on the other hand, the response time of a service server is increased, so that the user experience is reduced.
Therefore, the conventional network architecture of the current operator cannot completely meet the service experience as the user wishes, and how to meet various service requirements of the user mobile internet and improve the service experience of the user becomes a difficult problem of the development and evolution of the current mobile network architecture.
Disclosure of Invention
The invention provides a video playing method, a video playing device, electronic equipment and a storage medium, which are used for solving the technical problems of network congestion and reduced user experience caused by complex video calling process in video playing in the prior art.
In order to achieve the above object, the present invention provides a video playing method, including:
the method comprises the steps that a mobile edge computing MEC server receives a video playing request which is sent by a client and carries identification information of a video to be played;
judging whether the video information of the video to be played is stored in a local cache;
if so, sending the video information of the video to be played to the client;
if not, sending a video playing request carrying identification information of the video to be played to a service server; and receiving the video information of the video to be played, which is sent by the service server, and sending the video information of the video to be played to the client.
Specifically, the receiving the video information of the video to be played, which is sent by the service server, includes:
the MEC server receives video information of videos to be played, which are sent by the service server and have different code streams and/or different resolutions;
the sending the video information of the video to be played to the client comprises:
and determining target video information corresponding to the current wireless condition from video information of different code streams and/or different resolutions by adopting a code stream self-adaptive HAS technology based on HTTP, and sending the target video information to the client.
Specifically, when the video playing request is a video on demand request, after the video information of the video to be played is sent to the client, the method further includes:
and recording the receiving time of the MEC server receiving the video playing request sent by the client and the sending time of the video information of the video to be played by the MEC server aiming at the video to be played.
Specifically, the method further comprises:
and updating the video information in the local cache according to a preset updating period.
Specifically, the updating the video information in the local cache according to the preset update cycle includes:
according to each sub-period contained in the pre-divided updating period and the recorded receiving time and sending time corresponding to each video, counting the playing times and the total response time of each video in each sub-period, wherein the response time is the difference value between the sending time and the receiving time corresponding to the video;
calculating to obtain a first reference value of each video in each sub-period according to the playing times and the total response time of each video in each sub-period and whether the video is located in a local cache, wherein the larger the playing times is, the larger the absolute value of the corresponding first reference value is, the smaller the total response time is, the larger the absolute value of the corresponding first reference value is, and when the video is located in the local cache, the first reference value is positive, otherwise, the first reference value is negative;
calculating to obtain second reference values of all videos in the current updating period according to the first reference value of each video in each sub-period and the weight value corresponding to each sub-period;
judging whether the second reference value is smaller than a preset standard value or not;
if yes, updating the video information in the local cache according to the determined absolute value of the first reference value of each video in each sub-period.
Specifically, the calculating the first reference value of each video in each sub-period according to the number of playing times and the total response time of each video in each sub-period, and whether the video is located in the local cache, includes:
for each sub-period, summing the playing times of each video in the sub-period to obtain the total playing times of all the videos in the sub-period;
calculating and obtaining the playing probability of each video in the sub-period according to the playing times of each video in the sub-period and the total playing times of all the videos in the sub-period;
according to the formula
Figure BDA0001755287650000041
Calculating to obtain a first reference value of each video in the sub-period;
wherein r isiFor the first reference value, p, in the sub-period of the ith videoiIs the playing probability of the ith video in the sub-period, rstiAnd a is a preset coefficient and is the total response time length of the ith video in the sub-period, when the ith video is positioned in the local cache, the value of a is positive, otherwise, the value of a is negative.
Specifically, the calculating, according to the first reference value of each video in each sub-period and the weight value corresponding to each sub-period, the second reference values of all videos in the current update period includes:
summing the first reference values of each video in each sub-period, and calculating to obtain third reference values of all videos in each sub-period;
according to the formula
Figure BDA0001755287650000042
Calculating to obtain second reference values of all videos in the current updating period;
wherein R istTo characterize the second reference value of all videos in the current update period, t is the first number of sub-periods included in the update period, k is a natural number, and k is e [0, t), rt-kTo characterize the third reference value, γ, of all videos in the t-k sub-periodst-kAnd the weight value is corresponding to the t-k sub-period.
Specifically, the updating the video information in the local cache according to the determined absolute value of the first reference value of each video in each sub-period includes:
and updating the video information in the local cache according to the determined first reference value of the last sub-period of each video in the current updating period.
Specifically, before the video information in the local cache is updated, the method further includes:
according to the formula
Figure BDA0001755287650000043
Determining a second quantity of video information to be updated in the MEC server, wherein n is the second quantity of the video information to be updated in the MEC server; rtA second reference value representing all videos in the current update period; rmaxIs a preset standard value, MmissA third number of videos not in the local cache in the last sub-period in the current updating period;
the updating the video information in the local cache comprises:
and updating the video information with the local corresponding quantity according to the determined second quantity of the video information to be updated.
Specifically, the updating the local video information with the corresponding quantity according to the determined second quantity of the video information to be updated includes:
according to the determined absolute value of the first parameter value of each video which is not in the local cache in the last sub-period, sorting the videos according to the absolute value of the first parameter value from large to small, and selecting a second number of first videos which are sorted in the front;
according to the determined absolute value of the first parameter value of each played video in the local cache in the last sub-period, sorting the played videos according to the absolute value of the first parameter value from large to small, and selecting a second number of second videos which are sorted later;
and updating the second video of the second quantity into the first video of the second quantity, and storing the video information of the first video.
Specifically, if the second reference value is not less than a preset standard value, the method further includes:
and determining the second reference value as a new preset standard value.
Specifically, the method further comprises:
if the MEC server does not receive the video information of the video to be played, which is sent by the service server, within the preset time length, the MEC server informs the client to send a video playing request carrying the identification information of the video to be played to the service server.
According to another aspect of the present invention, there is also provided an electronic apparatus, including: a processor, a memory, and a transceiver;
the processor is used for reading the program in the memory and executing the following processes: receiving a video playing request which is sent by a client and carries identification information of a video to be played through the transceiver; judging whether the video information of the video to be played is stored in a local cache; if so, sending the video information of the video to be played to the client; if not, sending a video playing request carrying identification information of the video to be played to a service server; receiving the video information of the video to be played sent by the service server, and sending the video information of the video to be played to the client;
the transceiver is used for transmitting and receiving data under the control of the processor.
Specifically, the processor is specifically configured to receive video information of videos to be played, which are sent by the service server and have different code streams and/or different resolutions; and determining target video information corresponding to the current wireless condition from video information with different code streams and/or different resolutions by adopting an HAS technology, and sending the target video information to the client.
Specifically, the processor is further configured to, when the video playing request is a video on demand request, record, for the video to be played, a receiving time at which the MEC server receives the video playing request sent by the client, and a sending time at which the MEC server sends the video information of the video to be played, after sending the video information of the video to be played to the client.
Specifically, the processor is further configured to update the video information in the local cache according to a preset update period.
Specifically, the processor is specifically configured to count the number of playing times and a total response time length of each video in each sub-period according to each sub-period included in the pre-divided update period and the recorded receiving time and sending time corresponding to each video, where the response time length is a difference between the sending time and the receiving time corresponding to the video; calculating to obtain a first reference value of each video in each sub-period according to the playing times and the total response time of each video in each sub-period and whether the video is located in a local cache, wherein the larger the playing times is, the larger the absolute value of the corresponding first reference value is, the smaller the total response time is, the larger the absolute value of the corresponding first reference value is, and when the video is located in the local cache, the first reference value is positive, otherwise, the first reference value is negative; calculating to obtain second reference values of all videos in the current updating period according to the first reference value of each video in each sub-period and the weight value corresponding to each sub-period; judging whether the second reference value is smaller than a preset standard value or not; if yes, updating the video information in the local cache according to the determined absolute value of the first reference value of each video in each sub-period.
Specifically, the processor is specifically configured to sum, for each sub-period, the playing times of each video in the sub-period, and obtain a total playing time of all videos in the sub-period; calculating and acquiring the playing probability of each video in the sub-period according to the playing times of each video in the sub-period and the total playing times of all the videos in the sub-period; according to the formula
Figure BDA0001755287650000061
Calculating to obtain a first reference value of each video in the sub-period; wherein r isiFor the first reference value, p, in the sub-period of the ith videoiIs the playing probability of the ith video in the sub-period, rstiAnd a is a preset coefficient and is the total response time length of the ith video in the sub-period, when the ith video is positioned in the local cache, the value of a is positive, otherwise, the value of a is negative.
Specifically, the processor is specifically configured to sum the first reference values of each video in each sub-period, and calculate to obtain third reference values of all videos in each sub-period; according to the formula
Figure BDA0001755287650000071
Figure BDA0001755287650000072
Calculating to obtain second reference values of all videos in the current updating period; wherein R istTo characterize the second reference value of all videos in the current update period, t is the first number of sub-periods included in the update period, k is a natural number, and k is e [0, t), rt-kTo characterize the third reference value, γ, of all videos in the t-k sub-periodst-kAnd the weight value is corresponding to the t-k sub-period.
Specifically, the processor is specifically configured to update the video information in the local cache according to the determined first reference value of the last sub-period of each video in the current update period.
Specifically, the processor is further configured to, before updating the video information in the local cache, perform a formula-based update on the video information
Figure BDA0001755287650000073
Determining a second quantity of video information to be updated in the MEC server, wherein n is the second quantity of the video information to be updated in the MEC server; rtA second reference value representing all videos in the current update period; rmaxIs a preset standard value, MmissA third number of videos not in the local cache in the last sub-period in the current updating period; and updating the local corresponding amount of video information according to the determined second amount of the video information to be updated.
Specifically, the processor is specifically configured to sort, according to the absolute value of the first parameter value of each determined video that is not located in the local cache in the last sub-period, from large to small according to the absolute value of the first parameter value, and select a second number of first videos that are sorted in the top; according to the determined absolute value of the first parameter value of each played video in the local cache in the last sub-period, sorting the played videos according to the absolute value of the first parameter value from large to small, and selecting a second number of second videos which are sorted later; and updating the second video of the second quantity into the first video of the second quantity, and storing the video information of the first video.
Specifically, the processor is further configured to determine the second reference value as a new preset standard value if the second reference value is not less than the preset standard value.
Specifically, the processor is further configured to notify the client to send a video playing request carrying identification information of a video to be played to the service server if the MEC server does not receive the video information of the video to be played sent by the service server within a preset time period.
According to another aspect of the present invention, there is also provided a video playback apparatus, including:
the receiving module is used for receiving a video playing request which is sent by a client and carries identification information of a video to be played;
the judging module is used for judging whether the video information of the video to be played is stored in a local cache;
the communication module is used for sending the video information of the video to be played to the client if the judgment result of the judgment module is positive; if the judgment result of the judgment module is negative, sending a video playing request carrying the identification information of the video to be played to a service server; and receiving the video information of the video to be played sent by the service server, and sending the video information of the video to be played to the client.
According to another aspect of the present invention, there is also provided a computer-readable storage medium storing a computer program executable by an electronic device, the program, when executed on the electronic device, causing the electronic device to perform the steps of the above-mentioned video playing method.
The invention has the following beneficial effects:
the invention provides a video playing method, a video playing device, electronic equipment and a storage medium, wherein the method comprises the following steps: the method comprises the steps that an MEC server receives a video playing request which is sent by a client and carries identification information of a video to be played; judging whether the video information of the video to be played is stored in a local cache; if so, sending the video information of the video to be played to the client; if not, sending a video playing request carrying identification information of the video to be played to a service server; and receiving the video information of the video to be played sent by the service server, and sending the video information of the video to be played to the client. In the invention, by adding the MEC server in the existing network architecture, after receiving a video playing request sent by a client, the MEC server determines a video to be played based on identification information carried in the video playing request, preferentially judges whether video information of the video to be played is stored in a local cache, and if so, the MEC server can directly send the video information in the local cache to the client; if not, the video information of the video to be played, which is sent by the service server, can be forwarded to the client by sending a video playing request to the service server. Because the MEC server can cache the video information, when a plurality of clients initiate the same video playing request, the MEC server can send the video information in the local cache to the clients with the same video playing request without independently feeding back the corresponding video information for each client by the service server, thereby reducing video calling processes, effectively saving network resources on the core network side, not only avoiding network blockage to a certain extent, relieving network pressure, but also reducing response time and improving user experience.
Drawings
Fig. 1 is a schematic diagram illustrating a video uploading and downloading process based on a video cloud in the prior art;
FIG. 2 is a schematic diagram illustrating a process of a client initiating a video call in the prior art;
fig. 3 is a flowchart of a video playing method provided in an embodiment of the present invention;
FIG. 4 is a schematic diagram of a network architecture provided in an embodiment of the present invention;
fig. 5 is a schematic process diagram of video live broadcasting according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a video on demand process according to an embodiment of the present invention;
FIG. 7 is a flowchart illustrating updating a local cache according to an embodiment of the present invention;
FIG. 8 is a diagram illustrating a process of updating a local cache according to an embodiment of the present invention;
fig. 9 is an electronic device provided in an embodiment of the present invention;
fig. 10 is a block diagram of a video apparatus provided in an embodiment of the present invention;
FIG. 11 is a block diagram of an update module in an embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The first embodiment is as follows:
with the rapid development of the mobile internet, more and more users are used to watch various high definition videos in a network by using applications in a mobile network through diversified clients. When the client plays videos through the existing network architecture, all clients under the same base station need to send the same video call flow, and the service server needs to feed back corresponding video information for each client independently. Because high-definition video consumes a large amount of network resources and bandwidth, the existing video call flow occupies network resources at all levels in a transmission link, so that network congestion is caused, network paralysis is easily caused when access is increased rapidly, and the response time of a service server is increased, so that user experience is reduced.
Therefore, to overcome the above technical problem, an embodiment of the present invention provides a video playing method, as shown in fig. 3, the method includes the following steps:
step S301: and the MEC server receives a video playing request which is sent by the client and carries the identification information of the video to be played.
The MEC (Mobile Edge Computing) server can provide services required by IT and cloud Computing functions of telecommunication users nearby by using a wireless access network, thereby creating a telecommunication-level service environment with high performance, low delay and high bandwidth, accelerating the rapid downloading of various contents, services and applications in the network, and enabling consumers to enjoy uninterrupted high-quality network experience.
In order to effectively integrate the technologies of the mobile network and the internet, the MEC server is added with the functions of calculation, storage and data processing. Therefore, after receiving a video playing request which is sent by the client and carries the identification information of the video to be played, the MEC server can determine the name of the video to be played according to the identification information of the video to be played.
Specifically, in the embodiment of the present invention, the identification information of the video to be played may be a name of the video to be played or an IP address of the video to be played, but it is understood that, in the embodiment of the present invention, the identification information of the video to be played is not specifically limited.
As can be seen from the above, the MEC server has a storage function, so that in order to shorten the response time of the client receiving the video information, the video information of a plurality of videos may be stored in advance in the MEC server, where the video information of the videos may be video streams, video data, or video files of corresponding videos, and this is not limited in the embodiment of the present invention. Therefore, after the MEC server receives the video playing request sent by the client, the MEC server may first determine whether the video information of the video to be played is stored in the local cache according to the identification information of the video to be played carried in the video playing request, that is, the following step S302.
Step S302: and judging whether the video information of the video to be played is stored in the local cache.
Specifically, when determining whether the video information of the video to be played is stored in the local cache, the MEC server needs to perform deep parsing on real-time data in the network and compare the real-time data with the video information of the local cache in detail to determine whether the video information of the video to be played is stored in the local cache. It can be understood that, of course, the MEC server may also determine the name of the video to be played based on the identification information of the video to be played carried in the video playing request, and determine whether the video information of the video to be played is stored in the local cache by determining whether the video name of the video to be played is stored in the local cache. It is to be understood that, in the embodiment of the present invention, a manner of determining whether video information of a video to be played is stored in the local cache is not particularly limited.
Step S303: and if so, sending the video information of the video to be played to the client.
That is, if the MEC server stores the video information of the video to be played in the local cache, the MEC server directly sends the video information of the video to be played to the client.
As can be seen from the above, in the embodiment of the present invention, by adding the MEC server in the existing network architecture, when receiving a video playing request carrying identification information of a video to be played, which is sent by a client, and under the condition that the video information of the video to be played is stored in the local cache, the MEC server can directly send the video information in the local cache to a plurality of clients having the same video playing request, and it is not necessary for the application server to separately feed back corresponding video information to each client, thereby reducing an interaction flow of the core network for layer-by-layer transmission of the video information, effectively saving network resources on the core network side, not only avoiding network congestion to a certain extent, relieving network pressure, but also reducing response time and improving user experience.
Since the video information of the video to be played does not necessarily exist in the MEC server local cache, the method further comprises:
step S304: if not, sending a video playing request carrying identification information of the video to be played to a service server; and receiving the video information of the video to be played sent by the service server, and sending the video information of the video to be played to the client.
That is to say, when the video information of the video to be played is not stored in the local cache of the MEC server, the MEC server may send the video playing request sent by the client to the service server, and at this time, after receiving the video playing request sent by the MEC server, the service server may send the video information of the video to be played to the MEC server according to the identification information of the video to be played carried in the video playing request.
Because the MEC server can cache the video information, when the MEC server receives the same video request sent by other clients, the MEC server can also directly forward the video information to the client with the same video request, so that the other clients can also quickly obtain the video information, and the service server is not required to independently feed back the corresponding video information for each client, thereby not only reducing the response time and improving the user experience, but also reducing the network resources occupied by connecting the target video through a core network and transmitting the target video layer by layer, and avoiding network congestion to a certain extent.
Specifically, a schematic diagram of a network architecture provided in the embodiment of the present invention is shown in fig. 4, where an MEC server is located between a base station and a core network, so that the MEC server may download video information of a plurality of videos from a service server in advance through the core network, and when a client sends a video playing request, the video information may be forwarded and acquired through the base station.
As shown in fig. 4, the MEC server includes a video playing request processing module, a cache management module (i.e., a cache management module), a wireless management module, and a cache storage unit (i.e., a cache storage unit). The cache management module can acquire the network condition of the base station through the wireless management module, select video information with proper code stream and resolution from the cache storage unit, and send the video information to the client by adopting an HAS technology, so that an application server is not required to feed back corresponding video information to each client independently, and the occupation amount of network resources on the core network side is greatly saved.
In addition, because the MEC server is closest to the base station, the accurate condition of the wireless network can be quickly, timely and effectively acquired, the real code stream self-adaption is realized, the wireless network resources are fully utilized, and the user experience is improved.
Example two:
by the above, the MEC server can quickly, timely, effectively and accurately acquire the current wireless network condition of the base station, so that no matter the MEC server sends the video information in the local cache to the client, or sends the video information sent by the application server to the client, the video information can be sent to the client by adopting the HAS technology, and the playing experience of a user is greatly improved.
The HAS (HTTP Adaptive Streaming, HTTP-based code stream adaptation) technology combines the characteristics of the traditional Streaming media technology and HTTP progressive downloading and playing, and transmits video information to a client in an HTTP manner, specifically, the principle of video playing by the HAS technology is as follows:
the HAS technology can divide the media data into blocks, and the time length of each block is the same, generally 2-10 seconds. At the video coding layer, this means that each block consists of several complete video GOPs, i.e. each block has a key I-frame, thereby ensuring that each block is not associated with past and future media blocks.
Since the media chunks are stored in the HTTP Web server, the client may request the Web server for the media chunks in a linear manner and download the media chunks in a conventional HTTP manner, so that the client may play the series of media chunks in sequence when the media chunks are downloaded to the client. Because the media blocks are encoded according to the agreed rule, there is no overlap or discontinuity of content between the media blocks, so that a seamless smooth playing effect can be seen for the user.
Therefore, based on the playing principle of the HAS technology, if a video provides multiple bit rates when being encoded and output, the video corresponds to the media blocks with multiple bit rates. Therefore, the MEC server can decide to download larger or smaller media blocks according to the wireless network condition between each client and the base station, and the code rate self-adaption is realized.
Therefore, on the basis of the above embodiment, in the embodiment of the present invention, the receiving, by the MEC server, the video information of the video to be played, which is sent by the service server, includes:
and the MEC server receives video information of videos to be played, which are sent by the service server and have different code streams and/or different resolutions.
That is to say, after receiving a video playing request sent by the MEC server, the service server may send video information with different code streams and/or different resolutions to the MEC server, if the video playing request is a video live broadcast request, the service server may send live broadcast video information with different code streams and/or different resolutions to the MEC server, and if the video playing request is a video on demand request, the service server may send on-demand video information with different code streams and/or different resolutions to the MEC server.
The sending the video information of the video to be played to the client comprises:
and determining target video information corresponding to the current wireless condition from video information with different code streams and/or different resolutions by adopting an HAS technology, and sending the target video information to the client.
Therefore, the MEC server can obtain the video information of the code rate and the resolution corresponding to the current network according to the wireless network condition between each client and the base station through the video information of the video to be played with different code streams and/or different resolutions sent by the service server to the MEC server, so that good code stream self-adaption is realized, wireless network resources are fully utilized, and user experience is improved.
Example three:
since it is possible that the video information sent by the service server cannot be received after the MEC server sends the play request of the client to the service server, on the basis of the above embodiment, in the embodiment of the present invention, the method further includes:
if the MEC server does not receive the video information of the video to be played, which is sent by the service server, within the preset time length, the MEC server informs the client to send a video playing request carrying the identification information of the video to be played to the service server.
That is to say, when the MEC server does not receive the video information sent by the service server within the preset time, in order to avoid influencing the user experience, the MEC server may actively notify the client to directly send a video playing request carrying the identification information of the video to be played to the service server, so as to ensure that the client can directly obtain the corresponding video information from the service server.
Example four:
when the video playing request sent by the client is a video live broadcast request, the flow is as shown in fig. 5, that is, the client sends the video live broadcast request to the MEC server; after receiving a video live broadcast request sent by a client, an MEC server needs to judge whether a live broadcast video requested to be played by the client exists in a local cache, if so, determining live broadcast video information with a code rate and/or resolution corresponding to a current network from the downloaded live broadcast video information based on an HAS technology, and feeding back the live broadcast video information to the client; if not, the client applies for the MEC server to forward the live video information through the MEC server, if the application is successful, the MEC server sends the video live broadcast request to the service server, acquires the live video information of different code streams and resolutions sent by the service server, determines the live video information of the code rate and the resolution size adaptive to the current network based on the HAS technology, and sends the live video information to the client. If the client does not apply for forwarding the live video information successfully on the MEC server, the MEC server informs the client to directly acquire the corresponding live video information from the service server.
Therefore, in the embodiment of the invention, when a video broadcast request sent by a client requests a video live broadcast request, the MEC server performs real-time interaction with the service server and forwards the obtained live broadcast video information, so that the client can quickly obtain the live broadcast video information, the interaction process and network resources between the client and the target video information can be reduced by connecting the client with a core network and transmitting and completing the target video information layer by layer, and meanwhile, the live broadcast video information with corresponding appropriate code stream and resolution can be selected according to the wireless network condition between each client and a base station, thereby truly realizing code stream self-adaptation, fully utilizing the wireless network resources and improving the user experience.
Example five:
when the video playing request sent by the client is a video on demand request, the flow is as shown in fig. 6, that is, the client sends a video live broadcast request to the MEC server; after receiving a live video request sent by a client, an MEC server can determine the name of an on-demand video requested to be played by the client according to identification information of the video to be played carried in the video on-demand request, then judge whether the name exists in a local cache, if so, determine on-demand video information with the code rate and resolution size suitable for the current network from the cached on-demand video information based on an HAS technology, and send the on-demand video information to the client; if not, the MEC server determines the on-demand video information with the code rate and the resolution size suitable for the current network according to the current network condition, then sends the video on-demand request to the service server, acquires the determined on-demand video information, and then sends the on-demand video information to the client.
It should be noted that, when the name of the on-demand video requested to be played by the client does not exist in the local cache, the MEC server may also send the video-on-demand request to the service server, acquire on-demand video information of different code streams and resolutions sent by the service server, determine the on-demand video information of the code rate and resolution size suitable for the current network based on the HAS technology, and then send the on-demand video information to the client.
When caching the video-on-demand, in order to improve the user experience and reduce the response time of the client for acquiring the video-on-demand information, before sending the video-on-demand information to the client, whether the video-on-demand information needs to be cached is judged according to a replacement strategy, if so, the video-on-demand information is cached locally, and if not, the video-on-demand information is directly sent to the client.
Therefore, in the embodiment of the present invention, the MEC server pre-caches the video information of some hot videos, so that when the MEC server receives a video playing request sent by the client and the video information of the video to be played is stored in the local cache, the MEC server directly sends the video information in the local cache to the client, thereby not only effectively reducing the response time for the client to obtain the video information, and improving the user experience, but also reducing the occupation amount of network resources and relieving the network pressure.
Example six:
in the on-demand process, when the MEC server performs local caching, the MEC server may obtain a hot video for pre-caching according to a video with the largest number of requested playing times in other MEC servers or from a video website, a social media and the like, wherein to avoid occupying more storage space and to reduce network delay of a client for obtaining a video head file, only a small amount of initial video information may be pre-cached during local caching, so as to improve the opening time of a first screen.
However, since the storage space of the MEC server is limited, it is impossible to cache all the video information locally, so when the cached video information is not the video information requested to be played by the client, some video information with longer caching time needs to be kicked out from the cache, and new video information needs to be added.
Therefore, in order to enable the video information corresponding to the video to be directly transmitted to each client when the video playing request transmitted by the client is received through the MEC server, that is, in order to increase the hit rate of the locally cached video information, the method further includes:
and updating the video information in the local cache according to a preset updating period.
On the basis of the above embodiment, in the embodiment of the present invention, after the video information of the video to be played is sent to the client when the video playing request is a video-on-demand request, the method further includes:
and recording the receiving time of the MEC server receiving the video playing request sent by the client and the sending time of the video information of the video to be played by the MEC server aiming at the video to be played.
Specifically, as shown in fig. 7, the updating the video information in the local cache according to the preset update period includes:
step S701: and counting the playing times and the total response time of each video in each sub-period according to each sub-period contained in the pre-divided updating period and the recorded receiving time and the recorded sending time corresponding to each video, wherein the response time is the difference value between the sending time and the receiving time corresponding to the video.
In order that the embodiments of the invention may be readily understood, reference will now be made to the specific embodiments.
If the preset update period is 10min, the duration of each sub-period is 5min, and the corresponding time point of the current update period is 1: 00-1:10, the time point corresponding to the first sub-period is 1: 00:00-1:05:00, and the time point corresponding to the second sub-period is 1: 05:01-1:10:00.
If the video requested to be played by the client in the current update period is video a and video B, the receiving time corresponding to video a is 1: 01: 00. 1: 03: 00. 1:05: 30. 1: 08: 00, the transmission time corresponding to video a is 1: 01: 05. 1: 03: 09. 1:05: 40. 1: 08: 07 if the reception time corresponding to the video B is 1: 02:05, 1: 06: 00. 1: 09:00, the transmission time corresponding to video B is 1: 02: 10. 1: 06: 09. 1: 09: 12.
therefore, for video a, the playing number of times in the first sub-period is 2, the response time of each time is 5s and 9s, respectively, so that the total response time in the first sub-period is 14s, the playing number of times in the second sub-period is 2, the response time of each time is 10s and 7s, respectively, so that the total response time in the second sub-period is 17s, for video B, the playing number of times in the first sub-period is 1, the response time is 5s, the total response time in the first sub-period is 5s, the playing number of times in the second sub-period is 2, and the response time of each time is 9s and 12s, respectively, so that the total response time in the second sub-period is 21 s.
Step S702: and calculating to obtain a first reference value of each video in each sub-period according to the playing times and the total response time of each video in each sub-period and whether the video is located in the local cache, wherein the larger the playing times is, the larger the absolute value of the corresponding first reference value is, the smaller the total response time is, the larger the absolute value of the corresponding first reference value is, and when the video is located in the local cache, the first reference value is positive, otherwise, the first reference value is negative.
Because the playing times of each video reflect the popularity of the video, in the embodiment of the present invention, the first reference value of each video in each sub-period is calculated mainly according to the playing times of the video, the response duration of the video, and other information, where the meaning of the first reference value is to embody the Reward (Reward) corresponding to playing each video in a quantized form, and if the video is more popular and the response duration is smaller, the Reward corresponding to playing the video is higher, and the absolute value of the corresponding first reference value is larger.
When the video information of the local cache is updated, in addition to the reward corresponding to each video playing, whether the video is located in the local cache or not should be considered, if yes, the video is marked by a positive value, and if not, the video is marked by a negative value. Therefore, the playing requirement of the client can be clearly reflected by determining the absolute value of the first reference value corresponding to each video, and whether the video is located in the local cache can be determined by determining the positive and negative of the first reference value corresponding to each video, so that the hit rate of the video information of the local cache can be improved by comprehensively considering whether the video is located in the local cache and the client.
Step S703: and calculating to obtain second reference values of all videos in the current updating period according to the first reference value of each video in each sub-period and the weight value corresponding to each sub-period.
Since the first reference value may be positive or negative, when updating the locally cached video information, the accumulated feedback of the first reference value of each video in each sub-period in the current update period should be considered. Since the longer the update time relative to the current update period is, the shorter the update time relative to the current update period is, the better the update time is, the more important the current update time is, and the more important the current update time is, and the more the updated video information is closer to the update time. Therefore, the meaning of the second reference value is to represent the corresponding return of all the videos played in the current update period in a quantized form.
Step S704: and judging whether the second reference value is smaller than a preset standard value.
Step S705: if yes, updating the video information in the local cache according to the determined absolute value of the first reference value of each video in each sub-period.
Wherein, the preset standard value is a preset judgment standard, if the second reference value is smaller than the preset standard value, it indicates that the corresponding reward of all videos played in the current update period is not high, and the method can be embodied in that most videos requested to be played by the client are not in the local cache, or the response time of the acquired videos is too long, and the reason that the response time of the acquired videos is too long is probably because the videos are not in the local cache, so that at this time, the video information in the local cache needs to be updated according to the absolute value of the first reference value of each video in each sub-period, so as to ensure that the updated video information is closer to the playing requirement of the client, so that the MEC server can directly acquire corresponding video information from the local cache when receiving a video playing request carrying the identification information of the video to be played sent by the client, and the video information is sent to the client, so that the response time is shortened, and the user experience is improved.
However, if the second reference value is not less than the preset standard value, it indicates that the video information in the local cache can meet the playing requirements of most of the clients, and in order to keep the video information in the local cache in a better cache state, the method further includes:
step S706: and if the second reference value is not less than the preset standard value, determining the second reference value as a new preset standard value.
By increasing the value of the preset standard value, videos requested to be played by the client are gradually stored in the local cache in the subsequent updating process, so that when the MEC server receives a video playing request sent by the client, corresponding video information can be directly obtained from the local cache and sent to the client, the response time is shortened, the user experience is improved, the network pressure of a core network side is relieved, and the network resources are saved.
Example seven:
on the basis of the foregoing embodiment, in the embodiment of the present invention, in step S702, according to the number of playing times and the total response time of each video in each sub-period, and whether the video is located in the local cache, calculating the first reference value of each video in each sub-period includes:
for each sub-period, summing the playing times of each video in the sub-period to obtain the total playing times of all the videos in the sub-period;
calculating and acquiring the playing probability of each video in the sub-period according to the playing times of each video in the sub-period and the total playing times of all the videos in the sub-period;
according to the formula
Figure BDA0001755287650000201
Calculating to obtain a first reference value of each video in the sub-period;
wherein r isiFor the first reference value, p, in the sub-period of the ith videoiIs the playing probability of the ith video in the sub-period, rstiAnd a is a preset coefficient and is the total response time length of the ith video in the sub-period, when the ith video is positioned in the local cache, the value of a is positive, otherwise, the value of a is negative.
In the embodiment of the present invention, 10min of the preset update cycle in the above example is also used, the duration of each sub-cycle is 5min, and the time point corresponding to the current update cycle is 1: 00-1:10 is given as an example.
Since the playing times of the video a in the first sub-period is 2 times, and the playing times of the video B in the first sub-period is 1 time, it can be known that the total playing times of all the videos in the first sub-period is 3 times, and the playing times of the video a and the video B in the first sub-period are divided by the total playing times of all the videos in the first sub-period, so that the playing probability of the video a in the first sub-period and the playing probability of the video B in the first sub-period can be obtained.
Similarly, the playing probabilities of the video a and the video B in the second sub-period may also be determined in the same manner, which is not described herein again.
Thus, the MEC server, when recording for each video, may take the following approach:
video set v ═ v1,v2,v3,.....vn}
Play probability p ═ p for each video1,p2,p3......pn}
Total response duration rst ═ rst per video1,rst2,rst3,......rstn}
Wherein v represents all video sets in the sub-period, and p represents the playing probability corresponding to each video; rst represents the total response time duration corresponding to each video.
Then, the playing probability and the total response time length corresponding to each video are respectively substituted into a formula
Figure BDA0001755287650000211
Figure BDA0001755287650000212
The first reference value of each video in the sub-period can be calculated.
If video a is located in the MEC server local cache and video B is not located in the MEC server local cache, then the first reference value for video a is positive and the first reference value for video B is negative when calculated by the above formula.
Example eight:
on the basis of the foregoing embodiment, in the embodiment of the present invention, in step S703, obtaining, by calculation, the second reference values of all videos in the current update period according to the first reference value of each video in each sub-period and the weight value corresponding to each sub-period includes:
summing the first reference values of each video in each sub-period, and calculating to obtain third reference values of all videos in each sub-period;
according to the formula
Figure BDA0001755287650000213
Calculating to obtain second reference values of all videos in the current updating period;
wherein R istTo characterize the second reference value of all videos in the current update period, t is the first number of sub-periods included in the update period, k is a natural number, and k is e [0, t), rt-kTo characterize the third reference value, γ, of all videos in the t-k sub-periodst-kAnd the weight value is corresponding to the t-k sub-period.
Specifically, when calculating the third reference values of all videos in each sub-period, the calculation may be performed according to the following formula:
Figure BDA0001755287650000221
wherein,
Figure BDA0001755287650000222
i.e. the first reference value, r, of each video in each sub-periodtThe sum after adding the first reference value for each sub-period for each video.
In the embodiment of the present invention, still in the above example, 10min of the preset update cycle is provided, the duration of each sub-cycle is 5min, and the time point corresponding to the current update cycle is 1: 00-1:10 is given as an example.
If the first reference value of video a in the first sub-period is a1, the first reference value of video B in the second sub-period is a2, the first reference value of video B in the first sub-period is B1, and the first reference value of video B in the second sub-period is B2, then the third reference value of all videos in the first sub-period is the sum of a1 and B1, and the third reference value of all videos in the second sub-period is the sum of a2 and B2.
If the weighted value corresponding to the first sub-period is gamma1And the weight value corresponding to the second sub-period is gamma2Then at this time Rt=(a1+b1)γ1+(a2+b2)γ2. Thus R istThe value obtained by adding the third reference values of all the videos in each sub-period in the update period and the weighted value corresponding to the period is obtained, that is, the value obtained by multiplying the third reference values of all the videos in each sub-period in the current update period by the weighted value corresponding to the period is obtainedThe accumulated feedback of the first reference value of each sub-period of each video.
Therefore, when calculating the second reference values of all the videos in the current update period, the second reference values of the rewards corresponding to all the videos played in the current update period, that is, R, can also be obtained by directly multiplying the first reference value of each video in each sub-period by the weight value corresponding to the sub-period and adding the first reference value and the weight value to each othert=a1γ1+b1γ1+a2γ2+b2γ2
Example nine:
it can be seen from the foregoing embodiment that, when the second reference value is smaller than the preset standard value, the video information in the local cache needs to be updated according to the determined absolute value of the first reference value of each video in each sub-period.
The first reference value means that the reward corresponding to each video is played in a quantized mode, so that when the video information in the local cache is updated, the video with the larger absolute value of the first reference value can be determined as the updated video in the current updating period. That is, whether the video is located in the local cache or not, the absolute value of the first reference value corresponding to the video may be used as an update standard to ensure that most of the updated video information is a popular video or a video with a short response time.
As can be seen from the above, the longer the update time of the current update period is, the longer the update time is, the shorter the update time is, the current play need is, so that to further enable the new video information to be close to the play need of the client, it is preferable that the first reference value of each video in the last sub-period is used as the update criterion, and the updating the video information in the local cache according to the determined absolute value of the first reference value of each video in each sub-period includes:
and updating the video information in the local cache according to the determined first reference value of the last sub-period of each video in the current updating period.
That is, when the video information in the local cache is updated, a video with a larger absolute value of the first reference value in the last sub-period may be used as the update video.
Example ten:
when the replacement policy is adopted to update the video information in the local cache, there may be a risk of deleting a more popular video in the local cache, so that when the video information in the local cache is updated, a video with a smaller absolute value of the corresponding first reference value in the local cache may be replaced. That is, even if a certain video is already stored in the local cache, if the first reference value corresponding to the video is small, when the video information of the local cache is updated, the video with the small absolute value of the first reference value should be deleted from the local cache, and a corresponding number of videos with the large absolute value of the first reference value should be added to the local cache from the videos that are not stored in the local cache.
Therefore, on the basis of the foregoing embodiment, in the embodiment of the present invention, before the updating the video information in the local cache, the method further includes:
according to the formula
Figure BDA0001755287650000231
Determining a second quantity of video information to be updated in the MEC server, wherein n is the second quantity of the video information to be updated in the MEC server; rtA second reference value representing all videos in the current update period; rmaxIs a preset standard value, MmissA third number of videos not in the local cache in the last sub-period in the current updating period;
the updating the video information in the local cache comprises:
and updating the local corresponding amount of video information according to the determined second amount of the video information to be updated.
As can be seen from the above, when the replacement strategy is adopted to perform local caching on the video informationWhen updating the line, the second reference value R of all the videos in the current updating period in the formula is neededtAnd a preset standard value RmaxAnd dynamically determining the second amount of the video information to be updated according to the third amount that the video is not in the local cache in the last sub-period in the current updating period so as to ensure that the updated video information can be close to the playing requirement of the client.
Specifically, the updating the local video information with the corresponding quantity according to the determined second quantity of the video information to be updated includes:
according to the determined absolute value of the first parameter value of each video which is not in the local cache in the last sub-period, sorting the videos according to the absolute value of the first parameter value from large to small, and selecting a second number of first videos which are sorted in the front;
according to the determined absolute value of the first parameter value of each played video in the local cache in the last sub-period, sorting the played videos according to the absolute value of the first parameter value from large to small, and selecting a second number of second videos which are sorted later;
and updating the second video of the second quantity into the first video of the second quantity, and storing the video information of the first video.
That is, after calculation by the above formula, if the second number of the videos to be updated is 3, it is necessary to select 3 videos with the first parameter value ranked earlier from the videos not located in the local cache in the last sub-cycle, and at the same time, it is necessary to select 3 videos with the first parameter value ranked later from the videos located in the local cache in the last sub-cycle, and replace the 3 videos not located in the local cache with the 3 videos not located in the local cache, that is, replace the video with the larger absolute value of the first parameter value in the missed videos with the smaller absolute value of the first parameter value in the hit videos, so that the updated video information is closer to the playing requirement of the client, and thus the MEC server directly sends the corresponding video information according to the video playing request of the client without the core network transmitting the video information layer by layer, the method can effectively save network resources on the core network side, avoid network blockage to a certain extent, reduce response time and improve user experience.
Example eleven:
when the MEC server updates the locally cached video information, the process is as shown in fig. 8, that is, first, the MEC server may determine a plurality of hot videos through other MEC servers or video websites, cache the first small segments of video information corresponding to the hot videos in advance, then count the response time and the playing times of each video in the t time period, and first, according to a formula, calculate the response time and the playing times of each video in the t time period
Figure BDA0001755287650000251
Calculating the Reward value of each video and then according to a formula
Figure BDA0001755287650000252
Calculating R of the current update periodtJudgment of RtWhether or not less than RmaxAnd if so, according to the formula
Figure BDA0001755287650000253
Determining the quantity of video information needing to be replaced, sequencing the videos which are not in the local cache according to the absolute value of the first parameter value of the last subcycle of each determined video which is not in the local cache from large to small, and selecting the videos with the response quantity in the front sequence to replace the videos in the local cache. If R istNot less than RmaxThen record the current RtAnd reacting R withtCorresponding value as new Rmax
By adopting the above process to update the video information of the local cache, the updated video information can be closer to the playing requirement of the client, so that when the MEC server receives a video playing request which is sent by the client and carries the identification information of the video to be played, the corresponding video information can be directly obtained from the local cache, and the video information is sent to the client, so that the response time is shortened, and the user experience is improved.
Example twelve:
on the basis of the foregoing embodiment, in an embodiment of the present invention, according to another aspect of the embodiment of the present invention, there is provided an electronic apparatus, as shown in fig. 9, the electronic apparatus including: the processor 901, memory 902, and transceiver 903.
In fig. 9, the bus architecture may include any number of interconnected buses and bridges, with one or more processors, represented by processor 901, and various circuits, represented by memory 902, linked together. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. The transceiver 903 may be a number of elements including a transmitter and a receiver that provide a means for communicating with various other apparatus over a transmission medium. The processor 901 is responsible for managing a bus architecture and general processing, and the memory 902 may store data used by the processor 901 in performing operations.
Alternatively, the processor 901 may be a CPU (central processing unit), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or a CPLD (Complex Programmable Logic Device).
The processor 901 is configured to read the program in the memory 902 and execute the following processes: receiving a video playing request which is sent by a client and carries identification information of a video to be played through the transceiver 903; judging whether the video information of the video to be played is stored in a local cache; if yes, sending the video information of the video to be played to the client; if not, sending a video playing request carrying identification information of the video to be played to a service server; receiving the video information of the video to be played sent by the service server, and sending the video information of the video to be played to the client;
the transceiver 903 is configured to transmit and receive data under the control of the processor 901.
Specifically, the processor 901 is specifically configured to receive video information of videos to be played, which are sent by the service server and have different code streams and/or different resolutions; and determining target video information corresponding to the current wireless condition from video information with different code streams and/or different resolutions by adopting an HAS technology, and sending the target video information to the client.
Specifically, the processor 901 is further configured to, when the video playing request is a video on demand request, record, for the video to be played, a receiving time when the MEC server receives the video playing request sent by the client, and a sending time when the MEC server sends the video information of the video to be played, after sending the video information of the video to be played to the client.
Specifically, the processor 901 is further configured to update the video information in the local cache according to a preset update cycle.
Specifically, the processor 901 is specifically configured to count the playing times and the total response time of each video in each sub-period according to each sub-period included in the pre-divided update period and the recorded receiving time and sending time corresponding to each video, where the response time is a difference between the sending time and the receiving time corresponding to the video; calculating to obtain a first reference value of each video in each sub-period according to the playing times and the total response time of each video in each sub-period and whether the video is located in a local cache, wherein the larger the playing times is, the larger the absolute value of the corresponding first reference value is, the smaller the total response time is, the larger the absolute value of the corresponding first reference value is, and when the video is located in the local cache, the first reference value is positive, otherwise, the first reference value is negative; calculating to obtain second reference values of all videos in the current updating period according to the first reference value of each video in each sub-period and the weight value corresponding to each sub-period; judging whether the second reference value is smaller than a preset standard value or not; if yes, updating the video information in the local cache according to the determined absolute value of the first reference value of each video in each sub-period.
Specifically, the processor 901 is specifically configured to sum, for each sub-period, the playing times of each video in the sub-period, and obtain the total playing times of all videos in the sub-period; calculating and acquiring the playing probability of each video in the sub-period according to the playing times of each video in the sub-period and the total playing times of all the videos in the sub-period; according to the formula
Figure BDA0001755287650000271
Calculating to obtain a first reference value of each video in the sub-period; wherein r isiFor the first reference value, p, in the sub-period of the ith videoiIs the playing probability of the ith video in the sub-period, rstiAnd a is a preset coefficient and is the total response time length of the ith video in the sub-period, when the ith video is positioned in the local cache, the value of a is positive, otherwise the value of a is negative.
Specifically, the processor 901 is specifically configured to sum the first reference values of each video in each sub-period, and calculate to obtain third reference values of all videos in each sub-period; according to the formula
Figure BDA0001755287650000272
Figure BDA0001755287650000273
Calculating to obtain second reference values of all videos in the current updating period; wherein R istTo characterize the second reference value of all videos in the current update period, t is the first number of sub-periods included in the update period, k is a natural number, and k is e [0, t), rt-kTo characterize the third reference value, γ, of all videos in the t-k sub-periodst-kAnd the weight value is corresponding to the t-k sub-period.
Specifically, the processor 901 is specifically configured to update the video information in the local cache according to the determined first reference value of the last sub-period of each video in the current update period.
Specifically, the processor 901 is also usedBefore updating the video information in the local cache, according to the formula
Figure BDA0001755287650000281
Determining a second quantity of video information to be updated in the MEC server, wherein n is the second quantity of the video information to be updated in the MEC server; rtA second reference value representing all videos in the current update period; rmaxIs a preset standard value, MmissA third number of videos not in the local cache in the last sub-period in the current updating period; and updating the local corresponding amount of video information according to the determined second amount of the video information to be updated.
Specifically, the processor 901 is specifically configured to sort, according to the absolute value of the first parameter value of each determined video that is not located in the local cache in the last sub-period, from large to small according to the absolute value of the first parameter value, and select a second number of first videos that are sorted in the top; according to the determined absolute value of the first parameter value of each played video in the local cache in the last sub-period, sorting the played videos according to the absolute value of the first parameter value from large to small, and selecting a second number of second videos which are sorted later; and updating the second video of the second quantity into the first video of the second quantity, and storing the video information of the first video.
Specifically, the processor 901 is further configured to determine the second reference value as a new preset standard value if the second reference value is not less than the preset standard value.
Specifically, the processor 901 is further configured to notify the client to send a video playing request carrying identification information of a video to be played to the service server if the MEC server does not receive the video information of the video to be played sent by the service server within a preset time.
Example thirteen:
on the basis of the foregoing embodiments, in an embodiment of the present invention, according to another aspect of the embodiments of the present invention, there is provided a video playing apparatus, as shown in fig. 10, the apparatus includes:
a receiving module 1001, configured to receive a video playing request sent by a client and carrying identification information of a video to be played;
the judging module 1002 is configured to judge whether video information of the video to be played is stored in a local cache;
a communication module 1003, configured to send the video information of the video to be played to the client if the determination result of the determining module 1002 is yes; if the judgment result of the judgment module 1002 is negative, sending a video playing request carrying identification information of a video to be played to a service server; and receiving the video information of the video to be played sent by the service server, and sending the video information of the video to be played to the client.
Specifically, the communication module 1003 is specifically configured to receive video information of videos to be played, which are sent by the service server and have different code streams and/or different resolutions; and determining target video information corresponding to the current wireless condition from video information of different code streams and/or different resolutions by adopting an HAS technology, and sending the target video information to the client.
Specifically, the apparatus further comprises:
a recording module 1004, configured to record, for the video to be played, a receiving time when the MEC server receives the video playing request sent by the client, and a sending time when the MEC server sends the video information of the video to be played.
Specifically, the apparatus further comprises:
the updating module 1005 is configured to update the video information in the local cache according to a preset updating period.
Specifically, as shown in fig. 11, the updating module 1005 includes:
the counting unit 10051 is configured to count the playing times and the total response time of each video in each sub-period according to each sub-period included in the pre-divided update period and the recorded receiving time and sending time corresponding to each video, where the response time is a difference between the sending time and the receiving time corresponding to the video;
a first calculating unit 10052, configured to calculate a first reference value of each video in each sub-period according to the playing frequency and the total response time of each video in each sub-period, and whether the video is located in the local cache, where the larger the playing frequency is, the larger the absolute value of the corresponding first reference value is, the smaller the total response time is, the larger the absolute value of the corresponding first reference value is, and when the video is located in the local cache, the first reference value is positive, and otherwise, the first reference value is negative;
the second calculating unit 10053 is configured to calculate second reference values of all videos in the current update period according to the first reference value of each video in each sub-period and the weight value corresponding to each sub-period;
a determining unit 10054, configured to determine whether the second reference value is smaller than a preset standard value;
an updating unit 10055, configured to update the video information in the local cache according to the determined absolute value of the first reference value of each video in each sub-period if the determination result of the determining unit 10054 is yes.
Specifically, the first calculating unit 10052 is specifically configured to sum, for each sub-period, the playing times of each video in the sub-period, and obtain the total playing times of all videos in the sub-period; calculating and obtaining the playing probability of each video in the sub-period according to the playing times of each video in the sub-period and the total playing times of all the videos in the sub-period; according to the formula
Figure BDA0001755287650000301
Calculating to obtain a first reference value of each video in the sub-period; wherein r isiFor the first reference value, p, in the sub-period of the ith videoiIs the playing probability of the ith video in the sub-period, rstiThe total response time length of the ith video in the sub-period is taken as a preset coefficient, and when the ith video is positioned in a local cacheThe value of a is positive, otherwise the value of a is negative.
Specifically, the second calculating unit 10053 is specifically configured to sum the first reference values of each video in each sub-period, and calculate a third reference value of all videos in each sub-period; according to the formula
Figure BDA0001755287650000302
Calculating to obtain second reference values of all videos in the current updating period; wherein R istTo characterize the second reference value of all videos in the current update period, t is the first number of sub-periods included in the update period, k is a natural number, and k is e [0, t), rt-kTo characterize the third reference value, γ, of all videos in the t-k sub-periodst-kAnd the weight value is corresponding to the t-k sub-period.
Specifically, the updating unit 10055 is specifically configured to update the video information in the local cache according to the determined first reference value of the last sub-period of each video in the current update period.
Specifically, the updating unit 10055 is further specifically configured to perform the following operations according to the formula
Figure BDA0001755287650000303
Determining a second quantity of video information to be updated in the MEC server, wherein n is the second quantity of the video information to be updated in the MEC server; rtA second reference value representing all videos in the current update period; rmaxIs a preset standard value, MmissA third number of videos not in the local cache in the last sub-period in the current updating period; and updating the local corresponding amount of video information according to the determined second amount of the video information to be updated.
Specifically, the updating unit 10055 is further specifically configured to sort, according to the absolute value of the first parameter value of each determined video that is not located in the local cache in the last sub-period, from large to small according to the absolute value of the first parameter value, and select a second number of first videos that are sorted in the top; according to the determined absolute value of the first parameter value of each played video in the local cache in the last sub-period, sorting the played videos according to the absolute value of the first parameter value from large to small, and selecting a second number of second videos which are sorted later; and updating the second video of the second quantity into the first video of the second quantity, and storing the video information of the first video.
Specifically, the apparatus further comprises:
a determining module 1006, configured to determine the second reference value as a new preset standard value if the second reference value is not less than the preset standard value.
Specifically, the apparatus further comprises:
a notifying module 1007, configured to notify the client to send a video playing request carrying identification information of a video to be played to the service server if the MEC server does not receive the video information of the video to be played sent by the service server within a preset time.
Example fifteen:
on the basis of the foregoing embodiments, in an embodiment of the present invention, according to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium storing a computer program executable by an electronic device, the program, when being executed on the electronic device, causing the electronic device to perform the steps of the method of:
the method comprises the steps that an MEC server receives a video playing request which is sent by a client and carries identification information of a video to be played;
judging whether the video information of the video to be played is stored in a local cache;
and if so, sending the video information of the video to be played to the client.
Specifically, if the video information of the video to be played is not stored in the local cache, the method further includes:
the MEC server sends a video playing request carrying identification information of a video to be played to a service server;
and receiving the video information of the video to be played, which is sent by the service server, and sending the video information of the video to be played to a client.
Specifically, the receiving, by the MEC server, the video information of the video to be played, which is sent by the service server, includes:
the MEC server receives video information of videos to be played, which are sent by the service server and have different code streams and/or different resolutions;
the sending the video information of the video to be played to the client comprises:
and determining target video information corresponding to the current wireless condition from video information with different code streams and/or different resolutions by adopting an HAS technology, and sending the target video information to the client.
Specifically, when the video playing request is a video on demand request, after the video information of the video to be played is sent to the client, the method further includes:
and recording the receiving time of the MEC server receiving the video playing request sent by the client and the sending time of the video information of the video to be played by the MEC server aiming at the video to be played.
Specifically, the method further comprises:
and updating the video information in the local cache according to a preset updating period.
Specifically, the updating the video information in the local cache according to the preset update cycle includes:
according to each sub-period contained in the pre-divided updating period and the recorded receiving time and sending time corresponding to each video, counting the playing times and the total response time of each video in each sub-period, wherein the response time is the difference value between the sending time and the receiving time corresponding to the video;
calculating to obtain a first reference value of each video in each sub-period according to the playing times and the total response time of each video in each sub-period and whether the video is located in a local cache, wherein the larger the playing times is, the larger the absolute value of the corresponding first reference value is, the smaller the total response time is, the larger the absolute value of the corresponding first reference value is, and when the video is located in the local cache, the first reference value is positive, otherwise, the first reference value is negative;
calculating to obtain second reference values of all videos in the current updating period according to the first reference value of each video in each sub-period and the weight value corresponding to each sub-period;
judging whether the second reference value is smaller than a preset standard value or not;
if yes, updating the video information in the local cache according to the determined absolute value of the first reference value of each video in each sub-period.
Specifically, the calculating the first reference value of each video in each sub-period according to the number of playing times and the total response time of each video in each sub-period, and whether the video is located in the local cache, includes:
for each sub-period, summing the playing times of each video in the sub-period to obtain the total playing times of all the videos in the sub-period;
calculating and obtaining the playing probability of each video in the sub-period according to the playing times of each video in the sub-period and the total playing times of all the videos in the sub-period;
according to the formula
Figure BDA0001755287650000331
Calculating to obtain a first reference value of each video in the sub-period;
wherein r isiFor the first reference value, p, in the sub-period of the ith videoiIs the playing probability of the ith video in the sub-period, rstiAnd a is a preset coefficient and is the total response time length of the ith video in the sub-period, when the ith video is positioned in the local cache, the value of a is positive, otherwise, the value of a is negative.
Specifically, the calculating, according to the first reference value of each video in each sub-period and the weight value corresponding to each sub-period, the second reference values of all videos in the current update period includes:
summing the first reference values of each video in each sub-period, and calculating to obtain third reference values of all videos in each sub-period;
according to the formula
Figure BDA0001755287650000332
Calculating to obtain second reference values of all videos in the current updating period;
wherein R istTo characterize the second reference value of all videos in the current update period, t is the first number of sub-periods included in the update period, k is a natural number, and k is e [0, t), rt-kTo characterize the third reference value, γ, of all videos in the t-k sub-periodst-kAnd the weight value is corresponding to the t-k sub-period.
Specifically, the updating the video information in the local cache according to the determined absolute value of the first reference value of each video in each sub-period includes:
and updating the video information in the local cache according to the determined first reference value of the last sub-period of each video in the current updating period.
Specifically, before the video information in the local cache is updated, the method further includes:
according to the formula
Figure BDA0001755287650000341
Determining a second quantity of video information to be updated in the MEC server, wherein n is the second quantity of the video information to be updated in the MEC server; rtA second reference value representing all videos in the current update period; rmaxIs a preset standard value, MmissA third number of videos not in the local cache in the last sub-period in the current updating period;
the updating the video information in the local cache comprises:
and updating the local corresponding amount of video information according to the determined second amount of the video information to be updated.
Specifically, the updating the local video information with the corresponding quantity according to the determined second quantity of the video information to be updated includes:
sorting according to the absolute value of the first parameter value of each video which is not in the local cache in the last sub-period from large to small, and selecting a second number of first videos which are sorted in the front;
according to the determined absolute value of the first parameter value of each played video in the local cache in the last sub-period, sorting the played videos according to the absolute value of the first parameter value from large to small, and selecting a second number of second videos which are sorted later;
and updating the second video of the second quantity into the first video of the second quantity, and storing the video information of the first video.
Specifically, if the second reference value is not less than a preset standard value, the method further includes:
and determining the second reference value as a new preset standard value.
Specifically, the method further comprises:
if the MEC server does not receive the video information of the video to be played, which is sent by the service server, within a preset time length, the MEC server informs the client to send a video playing request carrying the identification information of the video to be played to the service server.
The computer readable storage medium in the above embodiments may be any available medium or data storage device that can be accessed by a processor in an electronic device, including but not limited to magnetic memory such as floppy disks, hard disks, magnetic tape, magneto-optical disks (MOs), etc., optical memory such as CDs, DVDs, BDs, HVDs, etc., and semiconductor memory such as ROMs, EPROMs, EEPROMs, non-volatile memory (NAND FLASH), Solid State Disks (SSDs), etc.
For the system/apparatus embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference may be made to some descriptions of the method embodiments for relevant points.
It is to be noted that, in this document, relational terms such as first and second, and the like are used solely to distinguish one entity or operation from another entity or operation without necessarily requiring or implying any actual such relationship or order between such entities or operations.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely application embodiment, or an embodiment combining application and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (18)

1. A video playback method, the method comprising:
the method comprises the steps that a mobile edge computing MEC server receives a video playing request which is sent by a client and carries identification information of a video to be played;
judging whether the video information of the video to be played is stored in a local cache;
if so, sending the video information of the video to be played to the client;
if not, sending a video playing request carrying identification information of the video to be played to a service server; receiving the video information of the video to be played sent by the service server, and sending the video information of the video to be played to the client;
when the video playing request is a video-on-demand request, and after the video information of the video to be played is sent to the client, the method further includes:
for the video to be played, recording the receiving time of the MEC server receiving the video playing request sent by the client and the sending time of the MEC server sending the video information of the video to be played;
wherein the method further comprises:
updating the video information in the local cache according to a preset updating period;
wherein, according to a preset update cycle, updating the video information in the local cache comprises:
according to each sub-period contained in the pre-divided updating period and the recorded receiving time and sending time corresponding to each video, counting the playing times and the total response time of each video in each sub-period, wherein the response time is the difference value between the sending time and the receiving time corresponding to the video;
calculating to obtain a first reference value of each video in each sub-period according to the playing times and the total response time of each video in each sub-period and whether the video is located in a local cache, wherein the larger the playing times is, the larger the absolute value of the corresponding first reference value is, the smaller the total response time is, the larger the absolute value of the corresponding first reference value is, and when the video is located in the local cache, the first reference value is positive, otherwise, the first reference value is negative;
calculating to obtain second reference values of all videos in the current updating period according to the first reference value of each video in each sub-period and the weight value corresponding to each sub-period;
judging whether the second reference value is smaller than a preset standard value or not;
if yes, updating the video information in the local cache according to the determined absolute value of the first reference value of each video in each sub-period.
2. The method of claim 1, wherein the receiving the video information of the video to be played sent by the service server comprises:
the MEC server receives video information of videos to be played, which are sent by the service server and have different code streams and/or different resolutions;
the sending the video information of the video to be played to the client comprises:
and determining target video information corresponding to the current wireless condition from video information of different code streams and/or different resolutions by adopting a code stream self-adaptive HAS technology based on HTTP, and sending the target video information to the client.
3. The method as claimed in claim 1, wherein said calculating the first reference value of each video in each sub-period according to the playing number and the total response duration of each video in each sub-period, and whether the video is located in the local cache, comprises:
for each sub-period, summing the playing times of each video in the sub-period to obtain the total playing times of all the videos in the sub-period;
calculating and acquiring the playing probability of each video in the sub-period according to the playing times of each video in the sub-period and the total playing times of all the videos in the sub-period;
according to the formula
Figure FDA0003530638990000021
Calculating to obtain a first reference value of each video in the sub-period;
wherein r isiFor the first reference value, p, in the sub-period of the ith videoiIs the playing probability of the ith video in the sub-period, rstiAnd a is a preset coefficient and is the total response time length of the ith video in the sub-period, when the ith video is positioned in the local cache, the value of a is positive, otherwise, the value of a is negative.
4. The method of claim 1, wherein the calculating the second reference values of all the videos in the current update period according to the first reference value of each video in each sub-period and the weight value corresponding to each sub-period comprises:
summing the first reference values of each video in each sub-period, and calculating to obtain third reference values of all videos in each sub-period;
according to the formula
Figure FDA0003530638990000031
Calculating to obtain second reference values of all videos in the current updating period;
wherein R istTo characterize the second reference value of all videos in the current update period, t is the first number of sub-periods included in the update period, k is a natural number, and k is e [0, t), bt-kTo characterize the third reference value, γ, of all videos in the t-k sub-periodst-kAnd the weight value is corresponding to the t-k sub-period.
5. The method of claim 1, wherein the updating the video information in the local cache according to the determined absolute value of the first reference value of each video in each sub-period comprises:
and updating the video information in the local cache according to the determined first reference value of the last sub-period of each video in the current updating period.
6. The method of claim 1, wherein prior to updating the video information in the local cache, the method further comprises:
according to the formula
Figure FDA0003530638990000032
Determining a second quantity of video information to be updated in the MEC server, wherein n is the second quantity of the video information to be updated in the MEC server; rtA second reference value representing all videos in the current update period; rmaxIs a preset standard value, MmissA third number of videos not in the local cache in the last sub-period in the current updating period;
the updating the video information in the local cache comprises:
and updating the local corresponding amount of video information according to the determined second amount of the video information to be updated.
7. The method of claim 6, wherein said updating a local corresponding amount of video information based on the determined second amount of video information to be updated comprises:
according to the determined absolute value of the first parameter value of each video which is not in the local cache in the last sub-period, sorting the videos according to the absolute value of the first parameter value from large to small, and selecting a second number of first videos which are sorted in the front;
according to the determined absolute value of the first parameter value of each played video in the local cache in the last sub-period, sorting the played videos according to the absolute value of the first parameter value from large to small, and selecting a second number of second videos which are sorted later;
and updating the second video of the second quantity into the first video of the second quantity, and storing the video information of the first video.
8. The method of claim 1, wherein if the second reference value is not less than a preset standard value, the method further comprises:
and determining the second reference value as a new preset standard value.
9. A mobile edge computing, MEC, server, the MEC server comprising: a processor, a memory, and a transceiver;
the processor is used for reading the program in the memory and executing the following processes: receiving a video playing request which is sent by a client and carries identification information of a video to be played through the transceiver; judging whether the video information of the video to be played is stored in a local cache; if so, sending the video information of the video to be played to the client; if not, sending a video playing request carrying identification information of the video to be played to a service server; receiving the video information of the video to be played sent by the service server, and sending the video information of the video to be played to the client;
the transceiver is used for transmitting and receiving data under the control of the processor;
the processor is further configured to record, for the video to be played, a receiving time at which the MEC server receives the video playing request sent by the client and a sending time at which the MEC server sends the video information of the video to be played, after the video information of the video to be played is sent to the client when the video playing request is a video on demand request;
the processor is further configured to update the video information in the local cache according to a preset update cycle;
the processor is specifically configured to count the playing times and the total response time of each video in each sub-period according to each sub-period included in the pre-divided update period and the recorded receiving time and sending time corresponding to each video, where the response time is a difference between the sending time and the receiving time corresponding to the video; calculating to obtain a first reference value of each video in each sub-period according to the playing times and the total response time length of each video in each sub-period and whether the video is located in a local cache, wherein the larger the playing times is, the larger the absolute value of the corresponding first reference value is, the smaller the total response time length is, the larger the absolute value of the corresponding first reference value is, and when the video is located in the local cache, the first reference value is positive, otherwise, the first reference value is negative; calculating to obtain second reference values of all videos in the current updating period according to the first reference value of each video in each sub-period and the weight value corresponding to each sub-period; judging whether the second reference value is smaller than a preset standard value or not; if yes, updating the video information in the local cache according to the determined absolute value of the first reference value of each video in each sub-period.
10. The MEC server according to claim 9, wherein the processor is specifically configured to receive video information of videos to be played with different code streams and/or different resolutions, which are sent by the service server; and determining target video information corresponding to the current wireless condition from video information of different code streams and/or different resolutions by adopting a code stream self-adaptive HAS technology based on HTTP, and sending the target video information to the client.
11. The MEC server according to claim 9, wherein the processor is specifically configured to sum, for each sub-period, the playing times of each video in the sub-period to obtain a total playing time of all videos in the sub-period; calculating and obtaining the playing probability of each video in the sub-period according to the playing times of each video in the sub-period and the total playing times of all the videos in the sub-period; according to the formula
Figure FDA0003530638990000051
Calculating to obtain a first reference value of each video in the sub-period; wherein r isiFor the first reference value, p, in the sub-period of the ith videoiIs the playing probability of the ith video in the sub-period, rstiAnd a is a preset coefficient and is the total response time length of the ith video in the sub-period, when the ith video is positioned in the local cache, the value of a is positive, otherwise, the value of a is negative.
12. The MEC server according to claim 9, wherein the processor is specifically configured to sum the first reference values of each video in each sub-period, and calculate a third reference value for all videos in each sub-period; according to the formula
Figure FDA0003530638990000052
Calculating to obtain second reference values of all videos in the current updating period; wherein R istA second reference value for representing all videos in the current update period, and t is included in the update periodA first number of sub-periods, k being a natural number, and k ∈ [0, t), bt-kTo characterize the third reference value, γ, of all videos in the t-k sub-periodst-kAnd the weight value is corresponding to the t-k sub-period.
13. The MEC server of claim 9, wherein the processor is specifically configured to update the video information in the local cache according to the determined first reference value of the last sub-period of each video in the current update period.
14. The MEC server of claim 13, wherein the processor is further configured to formulate a formula prior to updating the video information in the local cache
Figure FDA0003530638990000061
Determining a second amount of video information to be updated, wherein n is the second amount of video information to be updated; rtA second reference value representing all videos in the current update period; rmaxIs a preset standard value, MmissA third number of videos not in the local cache in the last sub-period in the current updating period; and updating the local corresponding amount of video information according to the determined second amount of the video information to be updated.
15. The MEC server according to claim 14, wherein the processor is specifically configured to sort, according to the determined absolute value of the first parameter value of each video that is not located in the local cache in the last sub-period, the first parameter values from large to small, and select a second number of first videos that are sorted in the top; according to the determined absolute value of the first parameter value of each played video in the local cache in the last sub-period, sorting the played videos according to the absolute value of the first parameter value from large to small, and selecting a second number of second videos which are sorted later; and updating the second video of the second quantity into the first video of the second quantity, and storing the video information of the first video.
16. The MEC server of claim 9, wherein the processor is further configured to determine the second reference value as a new preset standard value if the second reference value is not less than the preset standard value.
17. A mobile edge computing, MEC, server, the MEC server comprising:
the receiving module is used for receiving a video playing request which is sent by a client and carries identification information of a video to be played;
the judging module is used for judging whether the video information of the video to be played is stored in a local cache;
the communication module is used for sending the video information of the video to be played to the client if the judgment result of the judgment module is positive; if the judgment result of the judgment module is negative, sending a video playing request carrying the identification information of the video to be played to a service server; receiving the video information of the video to be played sent by the service server, and sending the video information of the video to be played to the client;
wherein the MEC server further comprises:
the recording module is used for recording the receiving time of the MEC server for receiving the video playing request sent by the client and the sending time of the video information of the video to be played by the MEC server aiming at the video to be played;
wherein the MEC server further comprises:
the updating module is used for updating the video information in the local cache according to a preset updating period;
wherein the update module comprises:
the statistical unit is used for counting the playing times and the total response time of each video in each sub-period according to each sub-period contained in the pre-divided updating period and the recorded receiving time and the sending time corresponding to each video, wherein the response time is the difference value between the sending time and the receiving time corresponding to the video;
the first calculating unit is used for calculating and obtaining a first reference value of each video in each sub-period according to the playing times and the total response time of each video in each sub-period and whether the video is located in the local cache, wherein the larger the playing times is, the larger the absolute value of the corresponding first reference value is, the smaller the total response time is, the larger the absolute value of the corresponding first reference value is, and when the video is located in the local cache, the first reference value is positive, otherwise, the first reference value is negative;
the second calculating unit is used for calculating to obtain second reference values of all videos in the current updating period according to the first reference value of each video in each sub-period and the weight value corresponding to each sub-period;
the judging unit is used for judging whether the second reference value is smaller than a preset standard value or not;
and the updating unit is used for updating the video information in the local cache according to the determined absolute value of the first reference value of each video in each sub-period if the judgment result of the judging unit is yes.
18. A computer-readable storage medium, characterized in that it stores a computer program executable by a processor, which program, when run on the processor, causes the processor to carry out the steps of the method according to any one of claims 1-8.
CN201810884488.7A 2018-08-06 2018-08-06 Video playing method and device, electronic equipment and storage medium Active CN110809167B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810884488.7A CN110809167B (en) 2018-08-06 2018-08-06 Video playing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810884488.7A CN110809167B (en) 2018-08-06 2018-08-06 Video playing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110809167A CN110809167A (en) 2020-02-18
CN110809167B true CN110809167B (en) 2022-06-03

Family

ID=69487089

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810884488.7A Active CN110809167B (en) 2018-08-06 2018-08-06 Video playing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110809167B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111654711A (en) * 2020-06-17 2020-09-11 三星电子(中国)研发中心 Video playing control method, video playing method and device
CN113301396B (en) * 2021-05-12 2023-01-31 中国联合网络通信集团有限公司 Video service method based on edge calculation and edge calculation server
CN113608869A (en) * 2021-07-21 2021-11-05 中央广播电视总台 Task scheduling method and device, electronic equipment and computer storage medium
CN114257879B (en) * 2021-12-17 2023-05-12 深圳市瑞云科技有限公司 Method and system for playing video
CN114051152A (en) * 2022-01-17 2022-02-15 飞狐信息技术(天津)有限公司 Video playing method and device, storage medium and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105072172A (en) * 2015-07-31 2015-11-18 网宿科技股份有限公司 Content delivery network based hot spot statistic and pushing method and system
CN106851343A (en) * 2017-01-23 2017-06-13 百度在线网络技术(北京)有限公司 For the method and apparatus of net cast
CN108063773A (en) * 2018-02-11 2018-05-22 清华大学 A kind of application service cut-in method and device based on mobile edge calculations
WO2018095537A1 (en) * 2016-11-25 2018-05-31 Nokia Technologies Oy Application provisioning to mobile edge
CN108200178A (en) * 2018-01-04 2018-06-22 海信集团有限公司 A kind of method and apparatus for downloading resource

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105072172A (en) * 2015-07-31 2015-11-18 网宿科技股份有限公司 Content delivery network based hot spot statistic and pushing method and system
WO2018095537A1 (en) * 2016-11-25 2018-05-31 Nokia Technologies Oy Application provisioning to mobile edge
CN106851343A (en) * 2017-01-23 2017-06-13 百度在线网络技术(北京)有限公司 For the method and apparatus of net cast
CN108200178A (en) * 2018-01-04 2018-06-22 海信集团有限公司 A kind of method and apparatus for downloading resource
CN108063773A (en) * 2018-02-11 2018-05-22 清华大学 A kind of application service cut-in method and device based on mobile edge calculations

Also Published As

Publication number Publication date
CN110809167A (en) 2020-02-18

Similar Documents

Publication Publication Date Title
CN110809167B (en) Video playing method and device, electronic equipment and storage medium
US20210051350A1 (en) Method, computer device, and storage medium for media code rate self-adaptation
US11457088B2 (en) Adaptive transfer rate for retrieving content from a server
CN110198495B (en) Method, device, equipment and storage medium for downloading and playing video
KR102472155B1 (en) How to Broadcast Streaming Content in a Peer to Peer (P2P) Network
US11758203B2 (en) Adaptive bitrate video cache
CN110022482B (en) Video playing starting method, video service system and storage medium
CN110636339B (en) Scheduling method and device based on code rate and electronic equipment
CN110933517B (en) Code rate switching method, client and computer readable storage medium
CN108668146B (en) Method and equipment for adjusting streaming media code rate
CN108551586A (en) 360 degree of video stream server end code check self-adapting distribution methods of multi-user and system
US20120023504A1 (en) Network optimization
CN102546711B (en) Storage adjustment method, device and system for contents in streaming media system
CN106688239A (en) Video downloading method, apparatus, and system
US12108115B2 (en) Method for playing on a player of a client device a content streamed in a network
CN103974084A (en) Streaming media data block caching method, file recommendation method and streaming media server
CN105245562A (en) Method for operating a cache arranged along a transmission path between client terminals and at least one server, and corresponding cache
Sun et al. Optimal strategies for live video streaming in the low-latency regime
CN107645475B (en) File resource distribution system and method in heterogeneous network
US20220191260A1 (en) Method for playing on a player of a client device a content streamed in a network
KR102304476B1 (en) Multipath-based block transmission system and streaming method for adaptive streaming service
CN112672227B (en) Service processing method, device, node and storage medium based on edge node
KR20220130837A (en) A method for playing content streamed from the network on a player on a client device
CN111225243B (en) Video block scheduling method and system
US20200195996A1 (en) Methods and Apparatus for Streaming Data

Legal Events

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