CN108574853A - A kind of content of TV program caching method, device and computer storage media - Google Patents

A kind of content of TV program caching method, device and computer storage media Download PDF

Info

Publication number
CN108574853A
CN108574853A CN201810368969.2A CN201810368969A CN108574853A CN 108574853 A CN108574853 A CN 108574853A CN 201810368969 A CN201810368969 A CN 201810368969A CN 108574853 A CN108574853 A CN 108574853A
Authority
CN
China
Prior art keywords
content
program
cached
cache
temperature
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.)
Withdrawn
Application number
CN201810368969.2A
Other languages
Chinese (zh)
Inventor
冼汉生
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN201810368969.2A priority Critical patent/CN108574853A/en
Publication of CN108574853A publication Critical patent/CN108574853A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • H04N21/23106Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion involving caching operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/235Processing of additional data, e.g. scrambling of additional data or processing content descriptors
    • 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/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • H04N21/26258Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists for generating a list of items to be played back in a given order, e.g. playlist, or scheduling item distribution according to such list
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4331Caching operations, e.g. of an advertisement for later insertion during playback
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/435Processing of additional data, e.g. decrypting of additional data, reconstructing software from modules extracted from the transport stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/462Content or additional data management, e.g. creating a master electronic program guide from data received from the Internet and a Head-end, controlling the complexity of a video stream by scaling the resolution or bit-rate based on the client capabilities

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)

Abstract

The present invention is suitable for software field, provides a kind of content of TV program caching method, device and computer storage media, method and includes:Obtain content of TV program to be cached;Obtain current cache space;If current cache space cannot accommodate content of TV program to be cached, with regard to obtaining the content name of content of TV program to be cached;In the content of TV program table to prestore, the content name of acquisition is matched with the content name cached;If matching is unsuccessful, time interval, the request number of times of the content of TV program cached are just obtained;Model, the time interval of the content of TV program cached, request number of times are generated using preset content temperature, generate the corresponding content temperature of content of TV program cached;Obtain the corresponding content of TV program of minimum contents temperature;Content of TV program to be cached is replaced into the corresponding content of TV program of minimum contents temperature.The caching that the present invention is conducive to improve content of TV program replaces effect.

Description

A kind of content of TV program caching method, device and computer storage media
Technical field
The invention belongs to a kind of software field more particularly to content of TV program caching method, device and computer storages Medium.
Background technology
Content of TV program refers to the works content that TV station propagates by being loaded with the signal of sound, image.In order to allow user Content of TV program is quickly got, content of TV program is cached to the NDN cache nodes of name data network by TV station On, and the spatial cache of NDN cache nodes is smaller, needs in time to be replaced content of TV program, it is slow to make full use of Deposit space.
However, existing content of TV program caching method, Consideration is relatively simple, is unfavorable for improving content of TV program Caching replace effect.The reason is that the replacement policy that existing content of TV program caching method is commonly used has:Recently most It is few to use strategy, strategy be least commonly used and Size strategies.It is minimum to use strategy to least recently used TV programme Content is replaced, and the minimum frequency of use strategy content of TV program few to frequency of use is replaced, Size policy replacements Fall maximum content of TV program.The main problem of these typical cache replacement policies is that Consideration is relatively simple, is being considered Certain limitation is still had on the problems such as temperature before the content of TV program that caches recently, content of TV program, it is difficult to be obtained Preferable caching replaces effect.
Invention content
In view of this, an embodiment of the present invention provides the storages of a kind of content of TV program caching method, device and computer Medium, the caching to improve content of TV program replace effect.
The first aspect of the embodiment of the present invention provides a kind of content of TV program caching method, including:
NDN cache nodes obtain content of TV program to be cached by NDN networks, in the TV programme to be cached Include content name and content asset file in appearance, the channel designation of TV programme is configured in the content asset file, is regarded Frequency and audio;
Obtain current cache space;
If the current cache space cannot accommodate the content of TV program to be cached, just wait caching described in acquisition Content of TV program content name;
In the content of TV program table to prestore, the content name of acquisition is matched with the content name cached;
If matching is unsuccessful, time interval, the request number of times of the content of TV program cached are just obtained;
Model, the time interval of the content of TV program cached, request time are generated using preset content temperature It counts, the corresponding content temperature of content of TV program cached described in generation;
The content temperature is ranked up, minimum contents temperature is obtained;
In the content of TV program cached, the corresponding content of TV program of minimum contents temperature is obtained;
Whether detection current time gets user's request that the minimal cache is worth corresponding content of TV program, such as Fruit current time, the user for not getting the corresponding content of TV program of the minimum contents temperature ask, described in expression most The corresponding content of TV program of small content temperature is not at solicited status, and the content of TV program to be cached is replaced institute State the corresponding content of TV program of minimum contents temperature;
Wherein, the content temperature generation model is specially:
Wherein, Hoti[c] is indicated in period c, the content temperature of the content of TV program i cached;I expressions have cached Content of TV program serial number, i value ranges be 1 to N, N is the total number of the content of TV program cached;Hoti[c- 1] it indicated at a upper period of period c, the content temperature of the content of TV program i cached;It is proportionality coefficient,Ratio of the content temperature of a cycle shared by current period in expression;Requesti[c] is indicated in the period When c, the request number of times of the content of TV program i cached;It indicates in the c in the period, has cached The sum of request number of times of content of TV program, t1 indicate that current time, ti indicate the time of the content of TV program i cached Stamp, the timestamp be exactly at the time of generating the content of TV program i, | t1-ti | indicate the content of TV program i cached Time interval,Probability is asked for time interval, for describing variation with time interval, in TV programme Hold the probability that i is requested by a user.
As a kind of realization method of the present embodiment, in the content of TV program caching method, the NDN cache nodes Content of TV program to be cached is obtained by NDN networks, specially:
NDN cache nodes extract cache tag position by NDN network received data packets in the data packet;
Judge whether the value of the cache tag position is 1;
If the value of the cache tag position is 1, just in the data packet, content of TV program to be cached is obtained.
As a kind of realization method of the present embodiment, in the content of TV program caching method, the NDN cache nodes Content of TV program to be cached is obtained by NDN networks, specially:
NDN cache nodes extract cache tag position by NDN network received data packets in the data packet;
Judge whether the value of the cache tag position is 0;
If the value of the cache tag position is 0, just in the data packet, content of TV program to be cached is obtained.
As a kind of realization method of the present embodiment, in the content of TV program caching method, if described work as Preceding spatial cache cannot accommodate the content of TV program to be cached, the content of content of TV program to be cached described in acquisition Name, specially:
If the current cache space cannot accommodate the content of TV program to be cached, the TV cached is obtained Minimum cache-time of the programme content in current cache space;
Judge whether the minimum cache-time is more than 35 seconds;
If the minimum cache-time is more than 35 seconds, with regard to the content name of content of TV program to be cached described in acquisition.
As a kind of realization method of the present embodiment, in the content of TV program caching method, if described work as Preceding spatial cache cannot accommodate the content of TV program to be cached, and obtain the content of TV program cached in current cache Minimum cache-time in space, specially:
If the current cache space cannot accommodate the content of TV program to be cached, the TV cached is obtained Cache-time of the programme content in current cache space;
The cache-time is ranked up, according to ranking results, the content of TV program cached is obtained and delays currently Deposit the minimum cache-time in space.
The second aspect of the embodiment of the present invention provides a kind of content of TV program buffer storage, including:
Content of TV program acquisition module, it is described to wait delaying for obtaining content of TV program to be cached by NDN networks Include content name and content asset file in the content of TV program deposited, TV programme are configured in the content asset file Channel designation, video and audio;
Current cache space acquisition module, for obtaining current cache space;
Content name acquisition module, if cannot be accommodated in the TV programme to be cached for the current cache space Hold, just the content name of content of TV program to be cached described in acquisition;
Matching module, in the content of TV program table to prestore, by the content name of acquisition and the content name cached It is matched;
First acquisition module, if for matching it is unsuccessful, just obtain the content of TV program cached time interval, Request number of times;
Content temperature generation module, for generating model, the TV programme cached using preset content temperature Time interval, the request number of times of content, generate described in the corresponding content temperature of content of TV program that has cached;
Minimum contents temperature acquisition module obtains minimum contents temperature for being ranked up to the content temperature;
Second acquisition module, in the content of TV program cached, it is corresponding to obtain minimum contents temperature Content of TV program;
Content of TV program cache module, for detecting current time, whether to get minimal cache value corresponding The user of content of TV program asks, if current time, does not get the corresponding TV programme of the minimum contents temperature The user of content asks, and indicates that the corresponding content of TV program of the minimum contents temperature is not at solicited status, is waited for described The content of TV program of caching replaces the corresponding content of TV program of the minimum contents temperature;
Wherein, the content temperature generation model is specially:
Wherein, Hoti[c] is indicated in period c, the content temperature of the content of TV program i cached;I expressions have cached Content of TV program serial number, i value ranges be 1 to N, N is the total number of the content of TV program cached;Hoti[c- 1] it indicated at a upper period of period c, the content temperature of the content of TV program i cached;It is proportionality coefficient,Ratio of the content temperature of a cycle shared by current period in expression;Requesti[c] is indicated in the period When c, the request number of times of the content of TV program i cached;It indicates in the c in the period, has cached The sum of request number of times of content of TV program, t1 indicate that current time, ti indicate the time of the content of TV program i cached Stamp, the timestamp be exactly at the time of generating the content of TV program i, | t1-ti | indicate the content of TV program i cached Time interval,Probability is asked for time interval, for describing variation with time interval, in TV programme Hold the probability that i is requested by a user.
As a kind of realization method of the present embodiment, in the content of TV program buffer storage, in the TV programme Hold acquisition module to be specifically used for:
By NDN network received data packets, cache tag position is extracted in the data packet;
Judge whether the value of the cache tag position is 1;
If the value of the cache tag position is 1, just in the data packet, content of TV program to be cached is obtained;
Alternatively, the content of TV program acquisition module is specifically used for:
By NDN network received data packets, cache tag position is extracted in the data packet;
Judge whether the value of the cache tag position is 0;
If the value of the cache tag position is 0, just in the data packet, content of TV program to be cached is obtained.
As a kind of realization method of the present embodiment, in the content of TV program buffer storage, the content name obtains Module is specifically used for:
If the current cache space cannot accommodate the content of TV program to be cached, the TV cached is obtained Minimum cache-time of the programme content in current cache space;
Judge whether the minimum cache-time is more than 35 seconds;
If the minimum cache-time is more than 35 seconds, with regard to the content name of content of TV program to be cached described in acquisition;
Wherein, it if current cache space cannot accommodate the content of TV program to be cached, obtains Minimum cache-time of the content of TV program of caching in current cache space, specially:
If the current cache space cannot accommodate the content of TV program to be cached, the TV cached is obtained Cache-time of the programme content in current cache space;
The cache-time is ranked up, according to ranking results, the content of TV program cached is obtained and delays currently Deposit the minimum cache-time in space.
The third aspect of the embodiment of the present invention provides a kind of content of TV program buffer storage, including memory, processing Device and it is stored in the computer program that can be run in the memory and on the processor, described in the processor executes The step of above method is realized when computer program.
The fourth aspect of the embodiment of the present invention provides a kind of computer storage media, the computer storage media storage The step of having computer program, the above method is realized when the computer program is executed by processor.
Existing advantageous effect is the embodiment of the present invention compared with prior art:
When the request frequency of content of TV program is identical, the content of TV program for jumping time interval length is preferentially replaced, The short content of TV program in retention time interval, the short content of TV program of time interval is exactly in the TV programme cached recently Hold, and therefore the content of TV program that the preference request of request of data node caches recently can improve cache hit rate, be conducive to The caching for improving content of TV program replaces effect.
Description of the drawings
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description be only the present invention some Embodiment for those of ordinary skill in the art without having to pay creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is a kind of implementation flow chart of content of TV program caching method provided in an embodiment of the present invention;
Fig. 2 is a kind of structure diagram of content of TV program buffer storage provided in an embodiment of the present invention;
Fig. 3 is a kind of schematic diagram of content of TV program buffer storage provided in an embodiment of the present invention.
Specific implementation mode
In being described below, for illustration and not for limitation, it is proposed that such as tool of particular system structure, technology etc Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific The present invention can also be realized in the other embodiments of details.In other situations, it omits to well-known system, device, electricity The detailed description of road and method, in case unnecessary details interferes description of the invention.
In order to illustrate technical solutions according to the invention, illustrated below by specific embodiment.
It should be appreciated that ought use in this specification and in the appended claims, the instruction of term " comprising " is described special Sign, entirety, step, operation, the presence of element and/or component, but be not precluded one or more of the other feature, entirety, step, Operation, element, component and/or its presence or addition gathered.
It is also understood that the term used in this description of the invention is merely for the sake of the mesh for describing specific embodiment And be not intended to limit the present invention.As description of the invention and it is used in the attached claims, unless on Other situations are hereafter clearly indicated, otherwise " one " of singulative, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in description of the invention and the appended claims is Refer to any combinations and all possible combinations of one or more of associated item listed, and includes these combinations.
As used in this specification and in the appended claims, term " if " can be according to context quilt Be construed to " when ... " or " once " or " in response to determination " or " in response to detecting ".Similarly, phrase " if it is determined that " or " if detecting [described condition or event] " can be interpreted to mean according to context " once it is determined that " or " in response to true It is fixed " or " once detecting [described condition or event] " or " in response to detecting [described condition or event] ".
In order to illustrate technical solutions according to the invention, illustrated below by specific embodiment.
Embodiment one
With reference to figure 1, Fig. 1 is a kind of implementation flow chart of content of TV program caching method provided in an embodiment of the present invention, This method is applied to terminal device, and a kind of content of TV program caching method may comprise steps of as shown in Figure 1:
S101, NDN cache node obtain content of TV program to be cached, the TV to be cached by NDN networks Include content name and content asset file in programme content, the channel name of TV programme is configured in the content asset file Title, video and audio;
NDN cache nodes extract cache tag position by NDN network received data packets in the data packet;
Judge whether the value of the cache tag position is 0 or 1;
If the value of the cache tag position is 0 or 1, just in the data packet, obtain in TV programme to be cached Hold.
Wherein, data packet carries cache tag position, content of TV program, using NDN agreements to resolve packet, you can Extract cache tag position, content of TV program.NDN agreements are the prior art, and this will not be repeated here.
S102 obtains current cache space;
S103, if the current cache space cannot accommodate the content of TV program to be cached, just described in acquisition The content name of content of TV program to be cached;
S104 matches the content name of acquisition with the content name cached in the content of TV program table to prestore;
Wherein, content of TV program table includes the content name cached, and the content name each cached has only corresponded to one The content of TV program of caching.
S105 just obtains time interval, the request number of times of the content of TV program cached if matching is unsuccessful;
If matching is unsuccessful, indicates that identical content name is not present in content of TV program table, cannot directly replace and delay The content of TV program deposited needs the time interval, the request number of times that obtain the content of TV program cached.
If successful match, indicate that there are identical content names in content of TV program table, can directly replace identical content name The corresponding content of TV program cached needs the time interval, the request number of times that obtain the content of TV program cached.
S106, using preset content temperature generate model, the content of TV program cached time interval, ask Ask number, the corresponding content temperature of content of TV program cached described in generation;
S107 is ranked up the content temperature, obtains minimum contents temperature;
S108 obtains the corresponding content of TV program of minimum contents temperature in the content of TV program cached;
S109, whether detection current time, which gets the minimal cache, is worth the user of corresponding content of TV program and asks It asks, if current time, does not get user's request of the corresponding content of TV program of the minimum contents temperature, indicate institute It states the corresponding content of TV program of minimum contents temperature and is not at solicited status, the content of TV program to be cached is replaced Fall the corresponding content of TV program of the minimum contents temperature;
Wherein, the content temperature generation model is specially:
Wherein, Hoti[c] is indicated in period c, the content temperature of the content of TV program i cached;I expressions have cached Content of TV program serial number, i value ranges be 1 to N, N is the total number of the content of TV program cached;Hoti[c- 1] it indicated at a upper period of period c, the content temperature of the content of TV program i cached;It is proportionality coefficient,Ratio of the content temperature of a cycle shared by current period in expression;Requesti[c] is indicated in the period When c, the request number of times of the content of TV program i cached;It indicates in the c in the period, has cached The sum of request number of times of content of TV program, t1 indicate that current time, ti indicate the time of the content of TV program i cached Stamp, the timestamp be exactly at the time of generating the content of TV program i, | t1-ti | indicate the content of TV program i cached Time interval,Probability is asked for time interval, for describing variation with time interval, in TV programme Hold the probability that i is requested by a user.
Wherein, whether detection current time, which gets the minimal cache and be worth the user of corresponding content of TV program, is asked It asks, if current time, does not get user's request of the corresponding content of TV program of the minimum contents temperature, indicate institute It states the corresponding content of TV program of minimum contents temperature and is not at solicited status, the content of TV program to be cached is replaced Fall the corresponding content of TV program of the minimum contents temperature, if current time, gets the minimum contents temperature and correspond to Content of TV program user request, indicate that the corresponding content of TV program of the minimum contents temperature is in solicited status, After waiting for the corresponding content of TV program request of the minimum contents temperature, the content of TV program to be cached is replaced Fall the corresponding content of TV program of the minimum contents temperature, what is generated in this way has the technical effect that:It avoids and interrupts the minimum The user of the corresponding content of TV program of content temperature asks, since the user of content of TV program will not be caused to ask to interrupt, Therefore be conducive to enhance the stability of user's request of content of TV program.
Wherein, on the head of the content of TV program i cached, content of TV program i timestamps, the timestamp are obtained At the time of exactly generating the content of TV program i.
Wherein, NDN cache nodes are the cache node named in data network NDN.
Wherein,Probability is asked for time interval, for describing the variation with time interval, TV programme The probability that content is requested by a user.Wherein, time interval refer to current time and generate content of TV program at the time of between when Between it is poor.Because of the content of TV program that the preference request of request of data node caches recently, time interval is shorter, in TV programme It is bigger to hold the probability being requested by a user.
Wherein, model is generated it is found that Hot from content temperatureiWithIt is proportional relationship, when in TV programme When the request frequency of appearance is identical, content temperature is also bigger, is subsequently ranked up to content temperature, obtains minimum contents temperature, The corresponding content of TV program of minimum contents temperature is obtained, content of TV program to be cached is replaced into minimum contents temperature pair The content of TV program answered, what can be generated has the technical effect that:The short content of TV program in retention time interval, time interval are short Content of TV program is exactly the content of TV program cached recently, and the TV Festival that the preference request of request of data node caches recently Therefore mesh content can improve cache hit rate, the caching for being conducive to improve content of TV program replaces effect.
Wherein, HotiAnd Hoti[c-1]、It is positive correlation, which generates model and consider Before content temperature and current period request number of times, and the time is more long, influence it is smaller, such computational methods are preferably The content temperature for embodying content of TV program adapts to the dynamic change of content of TV program request.
Wherein, the download temperature for the content of TV program that content temperature is used to describe to have cached.
Wherein, after S109, a kind of content of TV program caching method further includes:
In the caching remaining time field of the content of TV program to be cached, residual cache time is written, when surplus When remaining cache-time is less than 35 seconds, which can be replaced.
In embodiments of the present invention, when the request frequency of content of TV program is identical, it is long preferentially to replace time interval Content of TV program, the short content of TV program in retention time interval, the short content of TV program of time interval is exactly nearest The content of TV program of caching avoids the content of TV program that occurs replacing and cache recently, reduces the feelings of cache hit rate Condition, therefore cache hit rate can be improved, the caching for being conducive to improve content of TV program replaces effect.
Embodiment two
Corresponding to the method described in foregoing embodiments one, with reference to figure 2, Fig. 2 is a kind of TV provided in an embodiment of the present invention The structure diagram of programme content buffer storage, is applied to terminal device, and terminal device includes but not limited to NDN cache nodes, meter Calculation machine.For purposes of illustration only, only the parts related to this embodiment are shown.For convenience of description, it illustrates only and the present embodiment Relevant part.
With reference to Fig. 2, which includes:
Content of TV program acquisition module 21, it is described to wait for for obtaining content of TV program to be cached by NDN networks Include content name and content asset file in the content of TV program of caching, TV Festival is configured in the content asset file Purpose channel designation, video and audio;
Current cache space acquisition module 22, for obtaining current cache space;
Content name acquisition module 23, if the TV programme to be cached cannot be accommodated for the current cache space Content, with regard to the content name of content of TV program to be cached described in acquisition;
Matching module 24, in the content of TV program table to prestore, by the content name of acquisition and the content cached Name is matched;
First acquisition module 25, if unsuccessful for matching, between the time for just obtaining the content of TV program cached Every, request number of times;
Content temperature generation module 26, for generating model, the TV Festival cached using preset content temperature Time interval, the request number of times of mesh content, generate described in the corresponding content temperature of content of TV program that has cached;
Minimum contents temperature acquisition module 27 obtains minimum contents temperature for being ranked up to the content temperature;
Second acquisition module 28 is corresponded in the content of TV program cached, obtaining minimum contents temperature Content of TV program;
Content of TV program cache module 29, for detecting whether current time gets the minimal cache value correspondence Content of TV program user request, if current time, do not get the corresponding TV Festival of the minimum contents temperature The user of mesh content asks, and indicates that the corresponding content of TV program of the minimum contents temperature is not at solicited status, will be described Content of TV program to be cached replaces the corresponding content of TV program of the minimum contents temperature;
Wherein, the content temperature generation model is specially:
Wherein, Hoti[c] is indicated in period c, the content temperature of the content of TV program i cached;I expressions have cached Content of TV program serial number, i value ranges be 1 to N, N is the total number of the content of TV program cached;Hoti[c- 1] it indicated at a upper period of period c, the content temperature of the content of TV program i cached;It is proportionality coefficient,Ratio of the content temperature of a cycle shared by current period in expression;Requesti[c] is indicated in the period When c, the request number of times of the content of TV program i cached;It indicates in the c in the period, has cached The sum of request number of times of content of TV program, t1 indicate that current time, ti indicate the time of the content of TV program i cached Stamp, the timestamp be exactly at the time of generating the content of TV program i, | t1-ti | indicate the content of TV program i cached Time interval,Probability is asked for time interval, for describing variation with time interval, in TV programme Hold the probability that i is requested by a user.
As a kind of realization method of the present embodiment, in the content of TV program buffer storage, in the TV programme Hold acquisition module to be specifically used for:
By NDN network received data packets, cache tag position is extracted in the data packet;
Judge whether the value of the cache tag position is 1;
If the value of the cache tag position is 1, just in the data packet, content of TV program to be cached is obtained;
Alternatively, the content of TV program acquisition module is specifically used for:
By NDN network received data packets, cache tag position is extracted in the data packet;
Judge whether the value of the cache tag position is 0;
If the value of the cache tag position is 0, just in the data packet, content of TV program to be cached is obtained.
As a kind of realization method of the present embodiment, in the content of TV program buffer storage, the content name obtains Module is specifically used for:
If the current cache space cannot accommodate the content of TV program to be cached, the TV cached is obtained Minimum cache-time of the programme content in current cache space;
Judge whether the minimum cache-time is more than 35 seconds;
If the minimum cache-time is more than 35 seconds, with regard to the content name of content of TV program to be cached described in acquisition;
Wherein, it if current cache space cannot accommodate the content of TV program to be cached, obtains Minimum cache-time of the content of TV program of caching in current cache space, specially:
If the current cache space cannot accommodate the content of TV program to be cached, the TV cached is obtained Cache-time of the programme content in current cache space;
The cache-time is ranked up, according to ranking results, the content of TV program cached is obtained and delays currently Deposit the minimum cache-time in space.
In embodiments of the present invention, when the request frequency of content of TV program is identical, it is long preferentially to replace time interval Content of TV program, the short content of TV program in retention time interval, the short content of TV program of time interval is exactly nearest The content of TV program of caching avoids the content of TV program that occurs replacing and cache recently, reduces the feelings of cache hit rate Condition, therefore cache hit rate can be improved, the caching for being conducive to improve content of TV program replaces effect.
Embodiment three
Fig. 3 is a kind of schematic diagram of content of TV program buffer storage provided in an embodiment of the present invention.As shown in figure 3, should A kind of content of TV program buffer storage 3 of embodiment includes:Processor 30, memory 31 and it is stored in the memory 31 In and the computer program 32 that can be run on the processor 30, such as a kind of content of TV program cache program.The place Reason device 30 realizes the step in a kind of above-mentioned each content of TV program caching method embodiment when executing the computer program 32 Suddenly.
Illustratively, the computer program 32 can be divided into one or more module/units, it is one or Multiple module/units are stored in the memory 31, and are executed by the processor 30, to complete the present invention.Described one A or multiple module/units can be the series of computation machine program instruction section that can complete specific function, which is used for Implementation procedure of the computer program 32 in a kind of content of TV program buffer storage 3 is described.
A kind of content of TV program buffer storage 3 can be the computing devices such as NDN cache nodes, computer.It is described A kind of content of TV program buffer storage may include, but be not limited only to, processor 30, memory 31.
It will be understood by those skilled in the art that Fig. 3 is only a kind of example of content of TV program buffer storage 3, not The restriction to a kind of content of TV program buffer storage 3 is constituted, may include than illustrating more or fewer components, or combination Certain components or different components, such as a kind of content of TV program buffer storage can also be set including input and output Standby, network access equipment, bus etc..
Alleged processor 30 can be central processing unit (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor can also be any conventional processor Deng.
The memory 31 can be a kind of internal storage unit of content of TV program buffer storage 3, such as one The hard disk or memory of kind content of TV program buffer storage 3.The memory 31 can also be a kind of content of TV program The plug-in type hard disk being equipped on the External memory equipment of buffer storage 3, such as a kind of content of TV program buffer storage 3, Intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..Further, the memory 31 can also both include a kind of inside of content of TV program buffer storage 3 Storage unit also includes External memory equipment.The memory 31 is for storing the computer program and a kind of TV Other programs needed for programme content buffer storage and data.The memory 31 can be also used for temporarily storing and export Or the data that will be exported.It is apparent to those skilled in the art that for convenience of description and succinctly, only With the division progress of above-mentioned each functional unit, module for example, in practical application, above-mentioned function can be divided as needed With by different functional units, module completion, i.e., the internal structure of described device is divided into different functional units or module, To complete all or part of the functions described above.Each functional unit, module in embodiment can be integrated in a processing Can also be that each unit physically exists alone in unit, can also during two or more units are integrated in one unit, The form that hardware had both may be used in above-mentioned integrated unit is realized, can also be realized in the form of SFU software functional unit.In addition, Each functional unit, module specific name also only to facilitate mutually distinguish, the protection domain being not intended to limit this application. The specific work process of unit in above system, module, can refer to corresponding processes in the foregoing method embodiment, herein no longer It repeats.
A kind of computer storage media is provided in another embodiment of the invention, and the computer storage media is stored with Computer program, the computer program realize that a kind of above-mentioned each content of TV program caching method is real when being executed by processor Apply the step in example.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may realize that lists described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, depends on the specific application and design constraint of technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed device and method can pass through others Mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the module or unit, Only a kind of division of logic function, formula that in actual implementation, there may be another division manner, such as multiple units or component can be with In conjunction with or be desirably integrated into another system, or some features can be ignored or not executed.Another point, it is shown or discussed Mutual coupling or direct-coupling or communication connection can be by some interfaces, the INDIRECT COUPLING of device or unit or Communication connection can be electrical, machinery or other forms.
The unit illustrated as separating component may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, you can be located at a place, or may be distributed over multiple In network element.Some or all of unit therein can be selected according to the actual needs to realize the mesh of this embodiment scheme 's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also It is that each unit physically exists alone, it can also be during two or more units be integrated in one unit.Above-mentioned integrated list The form that hardware had both may be used in member is realized, can also be realized in the form of SFU software functional unit.
If the integrated module/unit be realized in the form of SFU software functional unit and as independent product sale or In use, can be stored in a computer read/write memory medium.Based on this understanding, the present invention realizes above-mentioned implementation All or part of flow in example method, can also instruct relevant hardware to complete, the meter by computer program Calculation machine program can be stored in a computer storage media, and the computer program is when being executed by processor, it can be achieved that above-mentioned each The step of a embodiment of the method..Wherein, the computer program includes computer program code, the computer program code Can be source code form, object identification code form, executable file or certain intermediate forms etc..The computer-readable medium can To include:Can carry the computer program code any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic disc, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that the computer The video that readable medium includes can carry out increase and decrease appropriate according to legislation in jurisdiction and the requirement of patent practice, such as In certain jurisdictions, according to legislation and patent practice, computer-readable medium is including being electric carrier signal and telecommunications letter Number.
Described device can be the computing devices such as desktop PC, notebook, palm PC and cloud server.It is described Device may include, but be not limited only to, processor, memory.It will be understood by those skilled in the art that the schematic diagram is only to fill The example set, the not restriction of structure twin installation may include than illustrating more or fewer components, or the certain portions of combination Part or different components, such as described device can also include input-output equipment, network access equipment, bus etc..
Alleged processor can be central processing unit (Central Processing Unit, CPU), can also be it His general processor, digital signal processor (Digital Signal Processor, DSP), application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor can also be any conventional processor Deng the processor is the control centre of described device, utilizes the various pieces of various interfaces and connection whole device.
The memory can be used for storing the computer program and/or module, and the processor is by running or executing Computer program in the memory and/or module are stored, and calls the data being stored in memory, described in realization The various functions of device.The memory can include mainly storing program area and storage data field, wherein storing program area can deposit Store up the application program (such as sound-playing function, image player function etc.) etc. needed for operating system, at least one function;Storage Data field can be stored uses created data (such as audio data, phone directory etc.) etc. according to mobile phone.In addition, memory can Can also include nonvolatile memory, such as hard disk, memory, plug-in type hard disk, intelligence to include high-speed random access memory Energy storage card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card), at least one disk memory, flush memory device or other volatile solid-state parts.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although with reference to aforementioned reality Applying example, invention is explained in detail, it will be understood by those of ordinary skill in the art that:It still can be to aforementioned each Technical solution recorded in embodiment is modified or equivalent replacement of some of the technical features;And these are changed Or replace, the spirit and scope for various embodiments of the present invention technical solution that it does not separate the essence of the corresponding technical solution should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of content of TV program caching method, which is characterized in that including:
NDN cache nodes obtain content of TV program to be cached by NDN networks, in the content of TV program to be cached Include content name and content asset file, the channel designation, video in the content asset file configured with TV programme with And audio;
Obtain current cache space;
If the current cache space cannot accommodate the content of TV program to be cached, with regard to electricity to be cached described in acquisition Depending on the content name of programme content;
In the content of TV program table to prestore, the content name of acquisition is matched with the content name cached;
If matching is unsuccessful, time interval, the request number of times of the content of TV program cached are just obtained;
Time interval, the request number of times of model, the content of TV program cached are generated using preset content temperature, it is raw At the corresponding content temperature of the content of TV program cached;
The content temperature is ranked up, minimum contents temperature is obtained;
In the content of TV program cached, the corresponding content of TV program of minimum contents temperature is obtained;
Whether detection current time gets user's request that the minimal cache is worth corresponding content of TV program, if worked as The preceding moment does not get user's request of the corresponding content of TV program of the minimum contents temperature, indicates in the minimum Hold the corresponding content of TV program of temperature and be not at solicited status, by the content of TV program to be cached replace it is described most The corresponding content of TV program of small content temperature;
Wherein, the content temperature generation model is specially:
Wherein, Hoti[c] is indicated in period c, the content temperature of the content of TV program i cached;I indicates the electricity cached Depending on the serial number of programme content, i value ranges are 1 to N, and N is the total number of the content of TV program cached;Hoti[c-1] table Show the content temperature of the content of TV program i cached at a upper period of period c;It is proportionality coefficient, Ratio of the content temperature of a cycle shared by current period in expression;Requesti[c] is indicated in the c in the period, has been delayed The request number of times of the content of TV program i deposited;It indicates in the c in the period, the TV programme cached The sum of request number of times of content, t1 indicate current time, and ti indicates the timestamp of the content of TV program i cached, when described Between stamp be exactly at the time of generating the content of TV program i, | t1-ti | between the time for indicating the content of TV program i cached Every,Probability is asked for time interval, for describing the variation with time interval, content of TV program i is by user The probability of request.
2. the method as described in claim 1, which is characterized in that the NDN cache nodes are obtained to be cached by NDN networks Content of TV program, specially:
NDN cache nodes extract cache tag position by NDN network received data packets in the data packet;
Judge whether the value of the cache tag position is 1;
If the value of the cache tag position is 1, just in the data packet, content of TV program to be cached is obtained.
3. the method as described in claim 1, which is characterized in that the NDN cache nodes are obtained to be cached by NDN networks Content of TV program, specially:
NDN cache nodes extract cache tag position by NDN network received data packets in the data packet;
Judge whether the value of the cache tag position is 0;
If the value of the cache tag position is 0, just in the data packet, content of TV program to be cached is obtained.
4. the method as described in claim 1, which is characterized in that if current cache space cannot accommodate described wait for The content of TV program of caching, the content name of content of TV program to be cached described in acquisition, specially:
If the current cache space cannot accommodate the content of TV program to be cached, the TV programme cached are obtained Minimum cache-time of the content in current cache space;
Judge whether the minimum cache-time is more than 35 seconds;
If the minimum cache-time is more than 35 seconds, with regard to the content name of content of TV program to be cached described in acquisition.
5. method as claimed in claim 4, which is characterized in that if current cache space cannot accommodate described wait for The content of TV program of caching obtains minimum cache-time of the content of TV program cached in current cache space, tool Body is:
If the current cache space cannot accommodate the content of TV program to be cached, the TV programme cached are obtained Cache-time of the content in current cache space;
The cache-time is ranked up, according to ranking results, obtains the content of TV program cached in current cache sky Between in minimum cache-time.
6. a kind of content of TV program buffer storage, which is characterized in that including:
Content of TV program acquisition module is described to be cached for obtaining content of TV program to be cached by NDN networks Include content name and content asset file in content of TV program, the frequency of TV programme is configured in the content asset file Road title, video and audio;
Current cache space acquisition module, for obtaining current cache space;
Content name acquisition module, if the content of TV program to be cached cannot be accommodated for the current cache space, With regard to the content name of content of TV program to be cached described in acquisition;
Matching module, in the content of TV program table to prestore, the content name of acquisition and the content name cached to be carried out Matching;
First acquisition module just obtains time interval, the request of the content of TV program cached if unsuccessful for matching Number;
Content temperature generation module, for generating model, the content of TV program cached using preset content temperature Time interval, request number of times, generate described in the corresponding content temperature of content of TV program that has cached;
Minimum contents temperature acquisition module obtains minimum contents temperature for being ranked up to the content temperature;
Second acquisition module, in the content of TV program cached, obtaining the corresponding TV of minimum contents temperature Programme content;
Content of TV program cache module, for detecting whether current time gets the corresponding TV of the minimal cache value The user of programme content asks, if current time, does not get the corresponding content of TV program of the minimum contents temperature User request, indicate that the corresponding content of TV program of the minimum contents temperature is not at solicited status, wait caching by described Content of TV program replace the corresponding content of TV program of the minimum contents temperature;
Wherein, the content temperature generation model is specially:
Wherein, Hoti[c] is indicated in period c, the content temperature of the content of TV program i cached;I indicates the electricity cached Depending on the serial number of programme content, i value ranges are 1 to N, and N is the total number of the content of TV program cached;Hoti[c-1] table Show the content temperature of the content of TV program i cached at a upper period of period c;It is proportionality coefficient, Ratio of the content temperature of a cycle shared by current period in expression;Requesti[c] is indicated in the c in the period, has been delayed The request number of times of the content of TV program i deposited;It indicates in the c in the period, the TV programme cached The sum of request number of times of content, t1 indicate current time, and ti indicates the timestamp of the content of TV program i cached, when described Between stamp be exactly at the time of generating the content of TV program i, | t1-ti | between the time for indicating the content of TV program i cached Every,Probability is asked for time interval, for describing the variation with time interval, content of TV program i is by user The probability of request.
7. device as claimed in claim 6, which is characterized in that the content of TV program acquisition module is specifically used for:
By NDN network received data packets, cache tag position is extracted in the data packet;
Judge whether the value of the cache tag position is 1;
If the value of the cache tag position is 1, just in the data packet, content of TV program to be cached is obtained;
Alternatively, the content of TV program acquisition module is specifically used for:
By NDN network received data packets, cache tag position is extracted in the data packet;
Judge whether the value of the cache tag position is 0;
If the value of the cache tag position is 0, just in the data packet, content of TV program to be cached is obtained.
8. device as claimed in claim 6, which is characterized in that the content name acquisition module is specifically used for:
If the current cache space cannot accommodate the content of TV program to be cached, the TV programme cached are obtained Minimum cache-time of the content in current cache space;
Judge whether the minimum cache-time is more than 35 seconds;
If the minimum cache-time is more than 35 seconds, with regard to the content name of content of TV program to be cached described in acquisition;
Wherein, if current cache space cannot accommodate the content of TV program to be cached, acquisition has cached Minimum cache-time of the content of TV program in current cache space, specially:
If the current cache space cannot accommodate the content of TV program to be cached, the TV programme cached are obtained Cache-time of the content in current cache space;
The cache-time is ranked up, according to ranking results, obtains the content of TV program cached in current cache sky Between in minimum cache-time.
9. a kind of content of TV program buffer storage, including memory, processor and it is stored in the memory and can be The computer program run on the processor, which is characterized in that the processor is realized such as when executing the computer program The step of any one of claim 1 to 5 the method.
10. a kind of computer storage media, the computer storage media is stored with computer program, which is characterized in that described It is realized when computer program is executed by processor such as the step of any one of claim 1 to 5 the method.
CN201810368969.2A 2018-04-23 2018-04-23 A kind of content of TV program caching method, device and computer storage media Withdrawn CN108574853A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810368969.2A CN108574853A (en) 2018-04-23 2018-04-23 A kind of content of TV program caching method, device and computer storage media

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810368969.2A CN108574853A (en) 2018-04-23 2018-04-23 A kind of content of TV program caching method, device and computer storage media

Publications (1)

Publication Number Publication Date
CN108574853A true CN108574853A (en) 2018-09-25

Family

ID=63575135

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810368969.2A Withdrawn CN108574853A (en) 2018-04-23 2018-04-23 A kind of content of TV program caching method, device and computer storage media

Country Status (1)

Country Link
CN (1) CN108574853A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110908612A (en) * 2019-11-27 2020-03-24 腾讯科技(深圳)有限公司 Cache management method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110908612A (en) * 2019-11-27 2020-03-24 腾讯科技(深圳)有限公司 Cache management method, device, equipment and storage medium
CN110908612B (en) * 2019-11-27 2022-02-22 腾讯科技(深圳)有限公司 Cache management method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109684358B (en) Data query method and device
CN110489417A (en) A kind of data processing method and relevant device
CN107395665A (en) A kind of block chain service handling and business common recognition method and device
CN107992356A (en) Block chain affairs block processes method, electronic device and readable storage medium storing program for executing
CN106657196A (en) Caching content elimination method and caching apparatus
CN107832100A (en) A kind of loading method and its terminal of APK plug-in units
CN109783158A (en) Using starting task processing method and device
CN107870989A (en) webpage generating method and terminal device
CN104866339A (en) Distributed persistent management method, system and device of FOTA data
CN108540568A (en) Computing capability sharing method and smart machine
KR20160056944A (en) Acceleration based on cached flows
CN108573029A (en) A kind of method, apparatus and storage medium obtaining network access relational data
CN111290696A (en) Flow control method and device for application program assembly
CN108551485A (en) A kind of streaming medium content caching method, device and computer storage media
CN113392863A (en) Method and device for acquiring machine learning training data set and terminal
CN108650306A (en) A kind of game video caching method, device and computer storage media
CN109753243A (en) Copy dispositions method, Cloud Server and storage medium
CN108733799A (en) A kind of method for processing report data, device and terminal
CN108573063A (en) A kind of data query method and system
CN113905091B (en) Method and device for processing access request
CN108540569A (en) A kind of software installation packet replacement method, device and computer storage media
CN109783321A (en) Monitoring data management method, device, terminal device
CN108574853A (en) A kind of content of TV program caching method, device and computer storage media
CN114090623A (en) Method and device for creating cache resources, electronic equipment and storage medium
CN110490724A (en) The storage method and device of account data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20180925

WW01 Invention patent application withdrawn after publication