Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP6589087B2 - Content reproduction apparatus and computer program - Google Patents
[go: Go Back, main page]

JP6589087B2 - Content reproduction apparatus and computer program - Google Patents

Content reproduction apparatus and computer program Download PDF

Info

Publication number
JP6589087B2
JP6589087B2 JP2016044645A JP2016044645A JP6589087B2 JP 6589087 B2 JP6589087 B2 JP 6589087B2 JP 2016044645 A JP2016044645 A JP 2016044645A JP 2016044645 A JP2016044645 A JP 2016044645A JP 6589087 B2 JP6589087 B2 JP 6589087B2
Authority
JP
Japan
Prior art keywords
content
cache
reproduction
chunk
song
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.)
Expired - Fee Related
Application number
JP2016044645A
Other languages
Japanese (ja)
Other versions
JP2017162088A (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.)
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 JP2016044645A priority Critical patent/JP6589087B2/en
Publication of JP2017162088A publication Critical patent/JP2017162088A/en
Application granted granted Critical
Publication of JP6589087B2 publication Critical patent/JP6589087B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Management Or Editing Of Information On Record Carriers (AREA)
  • Telephonic Communication Services (AREA)

Description

本発明は、コンテンツを再生するコンテンツ再生装置及びコンピュータプログラムに関する。本明細書において再生の対象となるコンテンツの種類は、音楽に限定されず、電子書籍コンテンツ、動画像コンテンツ、静止画像コンテンツ等の種々の形態のコンテンツが対象となり得る。   The present invention relates to a content playback apparatus and a computer program for playing back content. The type of content to be played back in this specification is not limited to music, and may be content in various forms such as electronic book content, moving image content, and still image content.

近年では、3GやLTE等のモバイル向け通信システムを利用することよって、いつでもどこでもインターネットとの通信を行うことが可能なスマートフォンと呼ばれるモバイル機器が普及しており、そのようなモバイル機器向けにクラウド上のコンテンツ・サーバから音楽データを逐次ダウンロードしながら再生するストリーミング再生機能を提供するクラウド型の音楽配信サービスが提供されている。またさらに近年では、定額制の音楽配信サービスも普及しつつある。定額制の音楽配信サービスでは、毎月一定額のサービス利用料を支払うことにより、視聴時間の制限なく、新譜や旧譜も含めて好きな楽曲をいくらでも視聴することができる。   In recent years, mobile devices called smartphones that can communicate with the Internet anytime and anywhere by using mobile communication systems such as 3G and LTE have become widespread. A cloud-type music distribution service is provided that provides a streaming reproduction function for reproducing music data while sequentially downloading music data from other content servers. Furthermore, in recent years, flat-rate music distribution services are also becoming popular. With a flat-rate music distribution service, you can watch as many songs as you like, including new and old ones, with no restriction on viewing time, by paying a fixed service fee each month.

このようなクラウド型の音楽配信サービスでは、これまでのように自分の聞きたい楽曲をモバイル機器内の内蔵メモリに保存しておく必要がないため、再生可能な曲数に制限が無く、内蔵メモリが楽曲データの保存のために消費されることがないため、限りある内蔵メモリにより多くの他のアプリケーションプログラムをインストールすることができるようになるというメリットがある。このように、内蔵メモリの容量に制限があり、またパソコンのように後からメモリ容量を追加することが困難なモバイル機器において、クラウド型の音楽配信サービスはとても相性がよい。   In such a cloud-type music distribution service, there is no limit to the number of songs that can be played since there is no need to store the songs that you want to listen to in the built-in memory in the mobile device. Is not consumed for storing music data, so that it is possible to install many other application programs in a limited internal memory. As described above, the cloud-type music distribution service is very compatible with a mobile device in which the capacity of the built-in memory is limited and it is difficult to add the memory capacity later, such as a personal computer.

しかしながら、このクラウド型の音楽配信サービスには重大な欠点もある。それは楽曲の再生時に音楽データを逐次クラウド上のサーバからダウンロードする必要があるため、3GやLTEの基地局がモバイル機器の近傍に無く、モバイル機器に圏外表示されるような場所においては、音楽を再生することができなくなってしまうことである。最近では自社では移動体向けの回線網を持たずに、他の回線網を持つ移動体通信事業者(Mobile Network Operator、以降MNO)から回線網を借りて、自社ブランドで通信サービスを行うMVNO(Mobile Virtual Network Operator)とも呼ばれる事業者が、毎月利用可能なモバイル通信のデータ量に上限がある代わりに、通信サービス利用料がMNOよりも低廉なサービス利用料でモバイル通信を利用することが可能な通信サービスの提供を始めている。毎月の通信料を節約することが可能なこのような通信サービスは、格安SIMと呼ばれている。   However, this cloud-type music distribution service has a serious drawback. Because it is necessary to download music data sequentially from the server on the cloud during music playback, music is not available in places where 3G or LTE base stations are not in the vicinity of mobile devices and are displayed outside the service area. It becomes impossible to reproduce. Recently, in-house MVNO that does not have a mobile network but borrows a network from a mobile network operator (hereinafter referred to as MNO) that has another network and provides communication services under its own brand. Mobile Virtual Network Operator) can use mobile communications at a lower service charge than the MNO, instead of having an upper limit on the amount of mobile communication data that can be used every month. We are starting to provide communication services. Such a communication service that can save a monthly communication fee is called a cheap SIM.

このような格安SIMは、毎月利用可能なモバイル通信データ量の上限があるために、クラウド型の音楽配信サービスとは相性があまりよくない。なぜならば、例えば月の途中でその一ヶ月間に利用可能なモバイル通信データ量の上限に達してしまうと、その時点から月末までの間は音楽を聞くことができなくなってしまうからである。そこでこのような不便さに対応するために、モバイル機器がインターネットとの通信ができないオフラインの状態にあっても、何らかの方法により音楽を再生することができるようなオフライン再生機能に対するニーズが高まっている。   Such a low-cost SIM has an upper limit on the amount of mobile communication data that can be used every month, so it is not very compatible with a cloud-type music distribution service. This is because, for example, if the upper limit of the amount of mobile communication data that can be used during the month is reached during the month, music cannot be heard from that point until the end of the month. Therefore, in order to cope with such inconvenience, there is an increasing need for an offline playback function that allows music to be played by some method even when the mobile device is in an offline state where communication with the Internet is not possible. .

そのための具体的な対応策としては、ユーザが選択した特定の楽曲の音楽データのみを携帯機器の内蔵メモリにダウンロードして保存しておくことにより、モバイル機器がオフラインの状態であっても、内蔵メモリに保存しておいた楽曲を再生可能とする技術が考えられ、既に知られている(例えば、特許文献1参照。)。
あるいは別の対応策としては、再生した音楽データを携帯機器の内蔵メモリにコピーしておく、いわゆるキャッシングの機構を設けることにより、インターネットとの通信が行えない状況においてもキャッシュメモリ内に保存されている楽曲については、オフラインで再生することを可能とするコンテンツキャッシュ技術もごく一般的に利用されている。このコンテンツキャッシュ方式で問題になるのは、キャッシュメモリとして利用可能なメモリ容量には限りがあるため、再生した音楽データをどんどんキャッシュメモリに追記していくと、いつかはキャッシュメモリが満杯になってしまい、それ以上音楽データを書き込むことができなくなってしまうことである。このような事態が発生した場合に、どの楽曲をキャッシュメモリに残して、どの楽曲をキャッシュメモリから捨てるべきかを判断するキャッシュ管理アルゴリズムとして、最も過去に利用されたデータを捨てていくLeast Recently Used(以降、LRUと表記)方式や、利用頻度が最も低いデータを捨てるLeast Frequently Used(以降、LFU)方式等が考えられ、キャッシュメモリの管理方式として広く利用されている。
As a specific countermeasure for that, by downloading and storing only the music data of the specific music selected by the user to the built-in memory of the mobile device, even if the mobile device is offline, the built-in A technique for enabling reproduction of music stored in a memory is conceivable and already known (for example, see Patent Document 1).
Alternatively, as another countermeasure, by providing a so-called caching mechanism that copies the reproduced music data to the built-in memory of the portable device, it is stored in the cache memory even in a situation where communication with the Internet is not possible. Content cache technology that enables offline playback of music is also commonly used. The problem with this content cache method is that there is a limit to the amount of memory that can be used as a cache memory, so if you continue to add additional music data to the cache memory, the cache memory will eventually become full. Therefore, it becomes impossible to write music data any more. Least Recently Used as a cache management algorithm to determine which music should be left in the cache memory and which music should be discarded from the cache memory when such a situation occurs A method (hereinafter referred to as “LRU”), a least frequently used (hereinafter referred to as “LFU”) method that discards the least frequently used data, and the like are widely used as a cache memory management method.

特開2013−77079号公報JP 2013-77079 A

しかし、従来の楽曲データをダウンロードする機能を備えたクラウド型音楽再生アプリにおいては、ユーザが手動操作で指定した楽曲の音楽データをモバイル機器側の内蔵メモリにダウンロードして、保存しているのにすぎなかった。例えば、ユーザがお気に入りのアーティストが新譜のアルバムを発売したとする。ユーザが「今後はこのアルバムをよく聞くので、スマートフォンに基地局からの電波が届かない場所に行ったときでも、この新譜は再生できるようにしておきたい」、あるいは「格安SIMのデータ通信量を節約したいので、今後よく聞きそうなこの新譜の音楽データをダウンロードしておこう」と考えた場合には、ユーザはそのアルバムに含まれる楽曲をダウンロードするための操作を手動で行う必要がある。   However, in a cloud-type music playback application that has a function for downloading conventional music data, the music data of the music specified by the user manually is downloaded and stored in the internal memory of the mobile device. It was not too much. For example, assume that a user's favorite artist has released a new album. Users want to be able to play this new music even when they go to a place where radio waves from the base station do not reach the smartphone. If the user wants to save and download the music data of this new music that they are likely to hear well in the future, the user must manually perform an operation for downloading the music included in the album.

さらなる問題として、ユーザがこのような楽曲データのダウンロードばかりを行い続けることはできないという事情も発生する。なぜならばモバイル機器の内蔵メモリの容量には上限があるため、いつかはメモリ容量の上限に達してしまい、それ以上楽曲をダウンロードすることができなくなってしまうからである。もしそのようなメモリ満杯の状態になってしまった場合には、ユーザは今後あまり聞きそうもない楽曲を選び、それらの楽曲データを削除するための操作を手動で行う必要がある。   As a further problem, there is a situation in which the user cannot continue to download such music data. This is because there is an upper limit on the capacity of the built-in memory of the mobile device, so that the upper limit of the memory capacity will be reached at some point, and music can no longer be downloaded. If the memory is full, the user needs to select music that is unlikely to be heard in the future and manually perform an operation for deleting those music data.

すなわち従来の楽曲データをダウンロードする機能を備えたクラウド型音楽再生アプリでは、モバイル端末にダウンロードした楽曲データの管理をユーザが手動で行う必要があった。音楽を聞くという直接の目的とは関係のない事柄にユーザが関心を払う必要があり、場合によってはユーザが手動で操作して新しい楽曲をダウンロードしたり、あるいは古い楽曲データを削除する必要があるために、アプリの使い勝手が悪いという問題があった。   That is, in a conventional cloud-type music playback application having a function of downloading music data, the user has to manage music data downloaded to the mobile terminal manually. The user needs to pay attention to things that have nothing to do with the direct purpose of listening to music, and in some cases the user has to manually manipulate to download new songs or delete old song data Therefore, there was a problem that the usability of the app was bad.

そこで本発明は、このような問題に鑑みてなされたものであり、その目的とするところは、クラウド型音楽再生アプリにおいて、ダウンロードした楽曲データの管理を自動化することにより、ユーザが音楽を再生したい楽曲を選択する以外の余計な仕事から解放して、クラウド型音楽再生アプリの使い勝手を高めることの可能な、新規かつ改良されたコンテンツ再生装置及びコンピュータプログラムを提供することにある。   Therefore, the present invention has been made in view of such problems, and the purpose of the present invention is to allow a user to play music by automating management of downloaded music data in a cloud-type music playing app. It is an object of the present invention to provide a new and improved content reproduction apparatus and computer program that can free from unnecessary work other than selecting music and improve the usability of a cloud-type music reproduction application.

また楽曲データのキャッシング機能を備えたクラウド型音楽再生アプリにおいては、キャッシュデータの管理は確かに自動化されており、ユーザが手動で楽曲データをダウンロードしたり、あるいは古い楽曲を削除する必要は無い。しかし従来から利用されているLRU方式やLFU方式等のキャッシュ管理アルゴリズムには致命的な欠点がある。それは各楽曲データの利用履歴情報(LRU 方式ではアクセス日時、LFU方式ではアクセス頻度)を維持管理する対象が、キャッシュメモリ内に存在している楽曲データのみに限定されることである。そのためにユーザがある時にたまたま気が向いて、キャッシュメモリ上には楽曲データのコピーが存在していない古い楽曲を久しぶりに再生したような場合に、おそらくはユーザがその同じ楽曲を近日中に繰り返し再生する可能性が低いにもかかわらず、そのような古い楽曲データをキャッシュしてしまう。これはLRU方式においては、ユーザが再生した楽曲はその時点では最も直近に利用したデータであることから、常に再優先でキャッシュメモリに残すべきデータであると判断されるからである。つまりLRU方式はデータへのアクセス頻度を全く考慮していないという欠点がある。   In addition, in a cloud-type music playback application having a music data caching function, the management of cache data is certainly automated, and there is no need for the user to manually download music data or delete old music. However, cache management algorithms such as the LRU method and LFU method that have been used in the past have fatal drawbacks. That is, the object of maintaining the usage history information (access date and time in the LRU method, access frequency in the LFU method) of each music data is limited to only the music data existing in the cache memory. For this reason, when a user happens to be there when he or she plays an old song that has no copy of the song data on the cache memory after a long time, the user probably plays the same song repeatedly in the near future. The old music data is cached even though it is unlikely. This is because, in the LRU method, the music reproduced by the user is the most recently used data at that time, so it is determined that the data should always be left in the cache memory with re-priority. In other words, the LRU method has a drawback that it does not consider the frequency of data access at all.

一方、LFU方式はデータのアクセス頻度を考慮しているという点では、一見、本発明と類似している。しかしLFU方式においては、キャッシュ対象のデータに関する利用履歴情報を維持管理する対象がキャッシュメモリ上に存在しているデータのみに限定されているため、直近でアクセスしたデータについては過去のアクセス履歴情報が無くアクセス頻度を知ることができないため、そのような直近でアクセスしたデータは常にキャッシュメモリに書き込むというLRU方式と同じ動作を行うしかなかった。   On the other hand, the LFU system is similar to the present invention at first glance in that it considers the data access frequency. However, in the LFU method, the usage history information related to the data to be cached is limited to the data that exists in the cache memory, so the past access history information is not available for the most recently accessed data. Since there is no access frequency, the most recently accessed data always has the same operation as the LRU method of writing to the cache memory.

またこの事情はLRUやLFU方式以外の、他のキャッシュ管理方式においても共通である。すなわち従来のキャッシュ管理方式においては、キャッシュメモリ上に存在していないデータに関する過去のアクセス履歴情報を持たないために、直近でアクセスしたデータは、たとえそのデータに対するアクセス頻度が過去において低かったとしても、常にキャッシュメモリに書き込んでいた。結果として、従来のキャッシング機能を備えたクラウド型音楽再生アプリにおいては、再生頻度の低い楽曲を再生した場合に、新譜や準新譜の楽曲データをキャッシュから追い出してしまうために、キャッシュのヒット率が低下し、ひいてはモバイル通信データ量を無駄に消費してしまうことにつながっていた。   This situation is also common to other cache management methods other than the LRU and LFU methods. That is, in the conventional cache management method, since there is no past access history information regarding data that does not exist in the cache memory, even if the access frequency for the most recently accessed data is low in the past, Always wrote to cache memory. As a result, in the cloud-type music playback application with the conventional caching function, when playing a song with low playback frequency, the music data of new music or quasi-new music is evicted from the cache. As a result, the amount of mobile communication data was wasted.

一方、本発明では、キャッシュメモリ上に存在する楽曲に加えて、キャッシュメモリ上に存在していない楽曲についても、再生履歴情報を維持管理している所に特徴がある。従って再生履歴情報を参照可能な楽曲については、各楽曲データの再生頻度や再生確率を考慮することにより、クラウド上のコンテンツサーバからダウンロードした楽曲データを、単にそのまま再生するだけのストリーミング再生動作と、後のリピート再生に備えて不揮発のキャッシュメモリに書き込んで残しておくダウンロード再生動作とを適切に切り替えることを可能としている。これにより、従来のキャッシュ機構を備えたクラウド型音楽再生アプリと比較して、本発明はキャッシュのヒット率が高く、貴重なモバイル通信データ量を節約することが可能となっている。本発明の目的は、近年利用が広がっている格安SIMに代表されるような従量課金方式の通信サービスに好適な、新規かつ改良されたコンテンツ再生装置及びコンピュータプログラムを提供することにある。   On the other hand, the present invention is characterized in that the reproduction history information is maintained and managed for music that does not exist on the cache memory in addition to music that exists on the cache memory. Therefore, for music that can be referred to the playback history information, by considering the playback frequency and playback probability of each piece of music data, the streaming playback operation of simply playing back the song data downloaded from the content server on the cloud, and It is possible to appropriately switch between the download reproduction operation that is written and left in the non-volatile cache memory in preparation for later repeat reproduction. As a result, the present invention has a high cache hit rate and can save a valuable amount of mobile communication data as compared with a cloud-type music playback application having a conventional cache mechanism. An object of the present invention is to provide a new and improved content reproduction apparatus and computer program suitable for a communication service of a pay-per-use system represented by a low-priced SIM that has been widely used in recent years.

上記課題を解決するために、本発明の第1の観点によれば、コンテンツを記憶するコンテンツキャッシュ部と、クラウド上のコンテンツサーバに登録されているコンテンツの再生頻度を算出するための再生頻度情報を保持するコンテンツデータベースと、前記コンテンツキャッシュ部を管理するコンテンツキャッシュ管理部と、を備え、前記コンテンツキャッシュ管理部は、再生対象となるコンテンツの前記再生頻度情報に基づいて、前記コンテンツサーバ上のコンテンツをダウンロードしながらリアルタイムに再生するオンザフライ再生動作と、前記コンテンツサーバからダウンロードしたコンテンツデータを前記コンテンツキャッシュ部に書き込みながら同時に再生を行うダウンロード再生動作と、を切り替えることを特徴とする、コンテンツ再生装置が提供される。   In order to solve the above problem, according to a first aspect of the present invention, a content cache unit for storing content and playback frequency information for calculating the playback frequency of content registered in a content server on the cloud And a content cache management unit that manages the content cache unit. The content cache management unit includes content on the content server based on the playback frequency information of the content to be played back. Switching between an on-the-fly playback operation in which the content data is downloaded in real time while downloading the content data, and a download playback operation in which the content data downloaded from the content server is simultaneously played back while being written to the content cache unit. Ntsu playback device is provided.

かかる構成によれば、コンテンツの再生頻度に応じて自動的にオンザフライ再生とダウンロード再生を切り替えることにより、あるときたまたま再生頻度の低いコンテンツを再生したことにより、より再生頻度の高いコンテンツをコンテンツキャッシュから削除してしまうという事態を防止できる。その結果、コンテンツキャッシュのヒット率が向上し、通信データ量をより節約できるようになる。このようにして、クラウド型音楽再生アプリの使い勝手を高めたコンテンツ再生装置とすることができる。   According to such a configuration, by switching between on-the-fly playback and download playback automatically according to the content playback frequency, when content that happens to be played back infrequently is played back, the content that is played back more frequently from the content cache. The situation of deleting can be prevented. As a result, the hit rate of the content cache is improved and the amount of communication data can be further saved. In this way, it is possible to provide a content playback apparatus that improves the usability of the cloud-type music playback application.

また、たまたま久しぶりに再生したが、またしばらくの間は聞きそうもない楽曲のデータをキャッシュに保存することを防止することができるので、書き換え回数に制限のあるメモリ(例えば、NAND−Flashメモリ)に対する書き込み回数を抑制することができる(なお、モバイル端末は内蔵のNAND−Flashメモリの寿命を迎えると、故障状態となり使用不可となってしまう。)。その結果として、モバイル端末の利用可能年数を延ばすことができる。   In addition, since it is possible to prevent the data of a song that has been played after a long absence but is unlikely to be heard for a while from being stored in the cache, a memory with a limited number of rewrites (for example, NAND-Flash memory) (The mobile terminal becomes a malfunction and becomes unusable when the built-in NAND-Flash memory reaches the end of its life). As a result, the usable years of the mobile terminal can be extended.

上記課題を解決するために、本発明の第2の観点によれば、コンテンツを記憶するコンテンツキャッシュ部と、クラウド上のコンテンツサーバに登録されているコンテンツの再生確率を予想するための再生確率予想情報を保持するコンテンツデータベースと、前記コンテンツキャッシュ部を管理するコンテンツキャッシュ管理部と、を備え、前記コンテンツキャッシュ管理部は、再生対象となるコンテンツの前記再生確率予想情報に基づいて、前記コンテンツサーバ上のコンテンツをダウンロードしながらリアルタイムに再生するオンザフライ再生動作と、前記コンテンツサーバからダウンロードしたコンテンツデータを前記コンテンツキャッシュ部に書き込みながら同時に再生を行うダウンロード再生動作と、を切り替えることを特徴とする、コンテンツ再生装置が提供される。   In order to solve the above problems, according to a second aspect of the present invention, a content cache unit for storing content and a playback probability prediction for predicting a playback probability of content registered in a content server on the cloud A content database that holds information, and a content cache management unit that manages the content cache unit, the content cache management unit on the content server based on the playback probability prediction information of the content to be played back Switching between an on-the-fly playback operation in which content is downloaded in real time and a download playback operation in which content data downloaded from the content server is simultaneously played while being written to the content cache unit. , The content reproduction apparatus is provided.

かかる構成によれば、再生確率の高いコンテンツ(例えば、コンテンツサーバへの登録日時が新しいコンテンツ(音楽で言えば新曲))がコンテンツキャッシュに保存されるため、コンテンツキャッシュのヒット率が向上し、モバイル通信帯域を節約することが可能となる。一方で、久しぶりにたまたま再生した旧譜はキャッシュしないので、旧譜を再生することによりコンテンツキャッシュのヒット率が低下することがない。このようにして、クラウド型音楽再生アプリの使い勝手を高めたコンテンツ再生装置とすることができる。   According to this configuration, content with a high playback probability (for example, content with a new registration date and time (new music in terms of music) registered in the content server) is stored in the content cache, so that the content cache hit rate is improved and mobile content is improved. Communication bandwidth can be saved. On the other hand, since the old music that happens to be played after a long time is not cached, the content cache hit rate does not decrease by playing the old music. In this way, it is possible to provide a content playback apparatus that improves the usability of the cloud-type music playback application.

本発明は、さまざまな応用が可能である。
例えば、前記コンテンツキャッシュ部においては、各コンテンツの先頭部分(例えば、3秒程度)とそれ以外の残余部分(又は全体)とに分けて、データが記録されるようにしてもよい。かかる構成によれば、コンテンツの先頭部分のデータを優先して残すなどといった柔軟な制御ができ、コンテンツ再生開始時の再生遅延時間が短縮される。コンテンツの先頭部分がコンテンツキャッシュに存在していれば、ユーザがある曲の再生を指示した場合に、すぐに楽曲の再生を開始することが可能となるため、機器の使い勝手が向上する。
The present invention can be applied in various ways.
For example, in the content cache unit, data may be recorded separately for the top portion (for example, about 3 seconds) of each content and the remaining portion (or the whole). According to such a configuration, flexible control such as preferentially leaving the data at the beginning of the content can be performed, and the reproduction delay time at the start of content reproduction is shortened. If the head portion of the content exists in the content cache, it becomes possible to immediately start playback of the music when the user instructs playback of the music, thereby improving the usability of the device.

また、前記コンテンツキャッシュ部において、容量が満杯になってしまった場合に、前記各コンテンツの残余部分が先に削除されるようにしてもよい。かかる構成によれば、コンテンツの先頭のデータがコンテンツキャッシュに残っている可能性が高まるため、楽曲再生指示を行った場合のレスポンスを高められる可能性が高くなり、機器の使い勝手が向上する。   Further, in the content cache unit, when the capacity is full, the remaining portion of each content may be deleted first. According to such a configuration, there is a high possibility that the top data of the content remains in the content cache. Therefore, there is a high possibility that the response when the music playback instruction is issued increases, and the usability of the device is improved.

また、前記コンテンツキャッシュ部において、前記各コンテンツの先頭部分を保存する先頭部分キャッシュの容量と、前記各コンテンツの残余部分を保存する残余部分キャッシュの容量とが分けて管理され、容量が満杯になってしまった場合に、前記先頭部分キャッシュと前記残余部分キャッシュとで独立して不要データの削除処理が実施されるようにしてもよい。かかる構成によれば、コンテンツの先頭のデータがコンテンツキャッシュに残っている可能性が高まるため、楽曲再生指示を行った場合のレスポンスを高められる可能性が高くなり、機器の使い勝手が向上する。   Further, the content cache unit separately manages the capacity of the head part cache for storing the head part of each content and the capacity of the remaining part cache for storing the remaining part of each content, and the capacity is full. In such a case, an unnecessary data deletion process may be performed independently in the head partial cache and the residual partial cache. According to such a configuration, there is a high possibility that the top data of the content remains in the content cache. Therefore, there is a high possibility that the response when the music playback instruction is issued increases, and the usability of the device is improved.

また、前記コンテンツキャッシュ部は、ユーザが直近で再生する可能性が高いコンテンツを保存する第1コンテンツキャッシュと、ユーザが後日また再生する可能性が高いコンテンツを保存する第2コンテンツキャッシュと、を有するようにしてもよい。第1、第2コンテンツキャッシュそれぞれについて、各コンテンツキャッシュ部の利用状況に応じた最適なデータ管理方法を採用することが可能となるため、キャッシュデータの有効活用が可能となる。また、第1、第2キャッシュそれぞれについて、各キャッシュの利用状況に応じた最適なデータ記録デバイスを利用することが可能となるため、デバイス寿命の消耗を防ぎ、結果として機器の高寿命化を図ることができる。   In addition, the content cache unit includes a first content cache that stores content that is likely to be played back by the user most recently, and a second content cache that stores content that is likely to be played back by the user later. You may do it. For each of the first and second content caches, it is possible to employ an optimum data management method in accordance with the usage status of each content cache unit, so that cache data can be used effectively. In addition, for each of the first and second caches, it is possible to use an optimum data recording device according to the usage status of each cache, so that the device life is prevented from being consumed, and as a result, the life of the device is increased. be able to.

また、前記第1コンテンツキャッシュには、再生中のコンテンツに関連するコンテンツのみ(例えば、再生中のアルバムのコンテンツのみ)が保存されるようにしてもよい。かかる構成によれば、ユーザが再生しているコンテンツ(例えば、再生している曲)を変更する操作を行った場合に、迅速に応答する操作性を提供することができる。   Further, only the content related to the content being reproduced (for example, only the content of the album being reproduced) may be stored in the first content cache. According to such a configuration, it is possible to provide an operability of quickly responding when the user performs an operation of changing the content being reproduced (for example, the song being reproduced).

また、前記第1コンテンツキャッシュは、データの保存先として、メインメモリ等の揮発性メモリにより構成されるようにしてもよい。かかる構成によれば、最もデータの入れ代わりが激しい第1コンテンツキャッシュの保存先としてメインメモリを利用することにより、第2コンテンツキャッシュに利用されるデバイス(例えば、NAND−Flashメモリで構成)の寿命の消耗を防ぎ、機器の高寿命化を図ることができる。   The first content cache may be configured by a volatile memory such as a main memory as a data storage destination. According to such a configuration, the use of the main memory as the storage destination of the first content cache with the most frequent replacement of data makes it possible to reduce the lifetime of a device (for example, a NAND-Flash memory) used for the second content cache. It is possible to prevent wear and increase the life of the device.

また、前記第1コンテンツキャッシュにおけるデータ管理単位は、1つのコンテンツ(例えば、1曲)をさらに細かく分けたチャンク単位であってもよい。かかる構成によれば、第1コンテンツキャッシュの容量の限界までコンテンツデータを先読みすることが可能となるので、キャッシュ容量を目一杯有効活用することができる。よって、それだけ先読みできるコンテンツの長さが増えるので、コンテンツサーバからのダウンロード速度が一時的に低下したような場合であっても、より再生途切れの発生が少ない機器を提供することができる。   The data management unit in the first content cache may be a chunk unit obtained by further dividing one content (for example, one song). According to such a configuration, the content data can be prefetched up to the limit of the capacity of the first content cache, so that the cache capacity can be fully utilized. Accordingly, the length of the content that can be prefetched is increased accordingly, so that even when the download speed from the content server is temporarily reduced, it is possible to provide a device with less occurrence of playback interruption.

また、前記第2コンテンツキャッシュには、後日再生する可能性が高いコンテンツのみが保存され、前記第2コンテンツキャッシュにおけるキャッシュ管理のアルゴリズムは、前記第1コンテンツキャッシュとは別のアルゴリズムが採用されるようにしてもよい。かかる構成によれば、第2コンテンツキャッシュの利用状況に応じて、最適なキャッシュ管理アルゴリズムを採用することが可能となるため、第2コンテンツキャッシュのヒット率がより向上し、結果的に限りあるインターネット通信データ量を節約することが可能となる。   The second content cache stores only content that is likely to be played back at a later date, and an algorithm for cache management in the second content cache is different from the first content cache. It may be. According to such a configuration, it is possible to employ an optimal cache management algorithm according to the usage status of the second content cache, so that the hit rate of the second content cache is further improved, resulting in a limited Internet. It is possible to save the communication data amount.

また、前記第2コンテンツキャッシュは、データの保存先として、NAND−Flashメモリ等で構成された不揮発性メモリにより構成されるようにしてもよい。かかる構成によれば、機器の電源を切ったり、あるいは再起動させた場合であっても、第1コンテンツキャッシュと比較してより大容量を割り当てることが可能な第2コンテンツキャッシュ内のデータを失うことがないため、せっかくキャッシュしたデータをより有効活用することができる。よって、限りあるインターネット通信データ量を無駄にしてしまうことがない。   Further, the second content cache may be configured by a nonvolatile memory configured by a NAND-Flash memory or the like as a data storage destination. According to such a configuration, even when the device is turned off or restarted, data in the second content cache that can be assigned a larger capacity than the first content cache is lost. Therefore, the cached data can be used more effectively. Therefore, a limited amount of Internet communication data is not wasted.

また、前記第2コンテンツキャッシュにおけるデータ管理単位は、コンテンツ単位(例えば、曲単位)であってもよい。かかる構成によれば、第2コンテンツキャッシュの管理データの増大を防ぐことができるため、同じ容量のメモリにより多くの楽曲をキャッシュすることが可能となる。また、第2コンテンツキャッシュのデータの書き換え頻度を大幅に低減することが可能となる。NAND−Flashメモリにはデバイス固有の書き込み上限回数というものがあるが、書き換え頻度を節約することにより、機器の大幅な高寿命化を期待することができる。   The data management unit in the second content cache may be a content unit (for example, a song unit). According to such a configuration, it is possible to prevent an increase in the management data of the second content cache, and thus it becomes possible to cache a large number of music pieces in a memory having the same capacity. In addition, the frequency of rewriting data in the second content cache can be greatly reduced. There is a device-specific upper limit number of writes in the NAND-flash memory. By saving the rewrite frequency, it is possible to expect a significant increase in the lifetime of the device.

また、前記第1コンテンツキャッシュと前記第2コンテンツキャッシュの容量は、個別に設定できるようにしてもよい。かかる構成によれば、ユーザの利用状況・利用環境に応じた最適なキャッシュ容量を選択することが可能なため、例えば毎月の通信量が無制限の通信契約を結んでいる場合には、第2コンテンツキャッシュの容量はごく少な目に設定して、主に第1コンテンツキャッシュのみを利用することにより、一時的に通信速度が低下した場合の音楽再生途切れを防止することと、機器の不揮発性メモリ容量をむやみに消費してしまうことを防ぐことができる。あるいは逆に毎月の通信量に上限がある通信契約を結んでいる場合は、第1コンテンツキャッシュと第2コンテンツキャッシュを共に多めに設定することにより、音楽再生途切れの防止効果と、通信データ量節約の効果を両方享受することが可能となる。   The capacities of the first content cache and the second content cache may be set individually. According to such a configuration, since it is possible to select an optimal cache capacity according to the use situation / use environment of the user, for example, when a communication contract with an unlimited monthly communication volume is made, the second content The cache capacity is set to a very small amount, mainly using only the first content cache, thereby preventing music playback interruption when the communication speed temporarily decreases, and reducing the non-volatile memory capacity of the device. Unnecessary consumption can be prevented. Or, conversely, if you have a communication contract with an upper limit on the monthly communication volume, setting both the first content cache and the second content cache to a large amount prevents music playback interruptions and saves communication data volume. It is possible to enjoy both of the effects.

また、前記コンテンツデータベースは、複数のコンテンツサーバのコンテンツリスト情報を統合した統合コンテンツリスト情報を保持するようにしてもよい。かかる構成によれば、コンテンツの保存先が複数のサーバに分かれている場合であっても、一元化されたコンテンツリストから再生するコンテンツを選択することができるので、使い勝手が良くなる。また、再生したい曲が登録されているコンテンツサーバをいちいち選択する操作から、ユーザを解放することができる。   The content database may hold integrated content list information obtained by integrating content list information of a plurality of content servers. According to such a configuration, even when the content storage destination is divided into a plurality of servers, the content to be reproduced can be selected from the centralized content list, so that the usability is improved. Further, the user can be released from the operation of selecting the content server in which the music to be reproduced is registered.

上記本発明の応用例は、任意に組み合わせることが可能である。また、本発明によれば、コンピュータを、上記のいずれかに記載のコンテンツ再生装置として機能させるためのコンピュータプログラムが提供される。   The application examples of the present invention can be arbitrarily combined. Further, according to the present invention, there is provided a computer program for causing a computer to function as any one of the content playback devices described above.

本発明によれば、クラウド型音楽再生アプリにおいて、ダウンロードした楽曲データの管理を自動化することにより、ユーザが音楽を再生したい楽曲を選択する以外の余計な仕事から解放して、クラウド型音楽再生アプリの使い勝手を高めることの可能なコンテンツ再生装置及びコンピュータプログラムが提供される。本発明のその他の効果については、以下の発明を実施するための形態の項でも説明する。   According to the present invention, in the cloud-type music playback application, the management of the downloaded music data is automated, so that the user is freed from unnecessary work other than selecting the music to be played back. A content playback device and a computer program capable of improving the usability of the user are provided. The other effects of the present invention will be described in the section for carrying out the invention below.

コンテンツ再生システムの全体構成を概略的に示す図である。1 is a diagram schematically showing an overall configuration of a content reproduction system. コンテンツサーバの内容を示す図である。It is a figure which shows the content of a content server. 第1コンテンツキャッシュL1内のデータの配置を示す図である。It is a figure which shows arrangement | positioning of the data in the 1st content cache L1. 不揮発データの配置を示す図である。It is a figure which shows arrangement | positioning of non-volatile data. コンテンツデータベースの内容を示す図である。It is a figure which shows the content of a content database. オンザフライ再生時の動作を示す図である。It is a figure which shows the operation | movement at the time of on-the-fly reproduction. ダウンロード再生時の動作を示す図である。It is a figure which shows the operation | movement at the time of download reproduction | regeneration. キャッシュ再生時の動作を示す図である。It is a figure which shows the operation | movement at the time of cache reproduction | regeneration. 本発明の一実施形態の動作を示すシーケンス図である。It is a sequence diagram which shows operation | movement of one Embodiment of this invention. インタフェース・コマンドの例を一覧にした図である。It is the figure which listed the example of the interface command. メイン・コントローラ110のメインスレッドを示すフローチャートである。3 is a flowchart showing a main thread of the main controller 110. メイン・コントローラ110のUI処理スレッドを示すフローチャートである。3 is a flowchart showing a UI processing thread of the main controller 110. メイン・コントローラ110の再生処理スレッドを示すフローチャートである。4 is a flowchart showing a playback processing thread of the main controller 110. コンテンツキャッシュ管理部190のメインスレッドを示すフローチャートである。6 is a flowchart illustrating a main thread of the content cache management unit 190. コンテンツキャッシュ管理部190の先読みスレッドを示すフローチャートである。6 is a flowchart illustrating a prefetch thread of the content cache management unit 190. 次ダウンロードチャンク決定処理を示すフローチャートである。It is a flowchart which shows the next download chunk determination process. 空きチャンクバッファ検索処理を示すフローチャートである。It is a flowchart which shows an empty chunk buffer search process. キャッシュ再生スレッドを示すフローチャートである。It is a flowchart which shows a cache reproduction | regeneration thread | sled. ダウンロード/オンザフライ再生スレッドを示すフローチャートである。6 is a flowchart showing a download / on-the-fly playback thread. L2−Hキャッシュ書き込み処理を示すフローチャートである。It is a flowchart which shows a L2-H cache write process. L2−Eキャッシュ書き込み処理を示すフローチャートである。It is a flowchart which shows a L2-E cache write process. コンテンツ再生頻度値の算出処理を示すフローチャートである。It is a flowchart which shows the calculation process of a content reproduction frequency value. コンテンツ再生頻度値更新処理スレッドを示すフローチャートである。It is a flowchart which shows a content reproduction frequency value update process thread. コンテンツデータベース170の更新処理スレッドを示すフローチャートである。It is a flowchart which shows the update process thread | sled of the content database 170. FIG. ディレクトリ検索処理を示すフローチャートである。It is a flowchart which shows a directory search process. artistテーブルの不要レコード削除処理を示すフローチャートである。It is a flowchart which shows the unnecessary record deletion process of an artist table. albumテーブルの不要レコード削除処理を示すフローチャートである。It is a flowchart which shows the unnecessary record deletion process of an album table. songテーブルの不要レコード削除処理を示すフローチャートである。It is a flowchart which shows the unnecessary record deletion process of a song table. コンテンツ再生確率予想値の算出処理を示すフローチャートである。It is a flowchart which shows the calculation process of a content reproduction probability estimated value. コンテンツ再生確率予想値更新処理スレッドを示すフローチャートである。It is a flowchart which shows a content reproduction probability estimated value update process thread.

以下に添付図面を参照しながら、本発明の好適な実施形態について詳細に説明する。なお、本明細書及び図面において、実質的に同一の機能構成を有する構成要素については、同一の符号を付することにより重複説明を省略する。   Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. In addition, in this specification and drawing, about the component which has the substantially same function structure, duplication description is abbreviate | omitted by attaching | subjecting the same code | symbol.

(第1の実施形態)
まず、本実施形態に係るコンテンツ再生装置100が適用されるコンテンツ再生システムの全体構成について説明する。図1は、コンテンツ再生システムの全体構成を概略的に示す図である。コンテンツ再生システムは、図1に示したように、コンテンツサーバ10とコンテンツ再生装置100が、インターネットなどのネットワークを介して通信可能となっている。以下、このコンテンツ再生システムの各構成要素について順に説明する。
(First embodiment)
First, the overall configuration of a content reproduction system to which the content reproduction apparatus 100 according to the present embodiment is applied will be described. FIG. 1 is a diagram schematically showing an overall configuration of a content reproduction system. As shown in FIG. 1, in the content reproduction system, the content server 10 and the content reproduction apparatus 100 can communicate via a network such as the Internet. Hereinafter, each component of the content reproduction system will be described in order.

(コンテンツサーバ10)
コンテンツサーバ10は、クラウド上に存在するストレージ(クラウドストレージ)を利用することにより、後述するコンテンツ再生装置100において再生対象となるコンテンツデータを記憶・保持しているサーバである。
(Content server 10)
The content server 10 is a server that stores and holds content data to be played back in the content playback device 100 described later by using storage (cloud storage) that exists on the cloud.

コンテンツサーバ10において記憶・保持されるコンテンツデータの内容について、図2を参照しながら説明する。図2は、コンテンツサーバ10の内容の一部を示す図である。コンテンツサーバ10に記憶・保持されるコンテンツデータは、図2に示したように、アーティストと、アルバム名と、トラック番号と、タイトルと、コンテンツの置き場所であるURL(Uniform Resource Locator)を含んで構成される。なお、図2では、3つのコンテンツデータを(a)〜(c)で表している。これらは1つのコンテンツサーバ10に置かれてもよく、本実施形態のように異なるコンテンツサーバに置かれてもよい。   The contents of content data stored / held in the content server 10 will be described with reference to FIG. FIG. 2 is a diagram illustrating a part of the contents of the content server 10. As shown in FIG. 2, the content data stored / held in the content server 10 includes an artist, an album name, a track number, a title, and a URL (Uniform Resource Locator) where the content is placed. Composed. In FIG. 2, three content data are represented by (a) to (c). These may be placed in one content server 10, or may be placed in different content servers as in the present embodiment.

コンテンツデータにおけるアーティスト、アルバム名、トラック番号、タイトル及びコンテンツのURLの関係は一般的なものと同様である。すなわち、一人のアーティストに対して、アルバム名は一つでもよく二つ以上あってもよい。例えば、図2の例では、アーティスト「The Beatles」に対して、2つのアルバム「Please please me」と「A hard day's night」が対応している。また、アルバム名とトラック番号は、一般には1:複数の関係である。また、各トラックに対してタイトルがあり、各タイトルに対して、1つのコンテンツのURLが対応している。   The relationship between the artist, album name, track number, title, and content URL in the content data is the same as a general one. In other words, for an artist, there may be one album name or two or more album names. For example, in the example of FIG. 2, two albums “Please please me” and “A hard day's night” correspond to the artist “The Beatles”. Also, album names and track numbers generally have a 1: multiple relationship. Each track has a title, and one content URL corresponds to each title.

以上、コンテンツサーバ10について説明した。次に、再び図1を参照しながら、本実施形態に特徴的な構成要素であるコンテンツ再生装置100について説明する。   The content server 10 has been described above. Next, with reference to FIG. 1 again, the content reproduction apparatus 100 that is a characteristic component of the present embodiment will be described.

(コンテンツ再生装置100)
コンテンツ再生装置100は、使用者が携帯して移動できる機器であるモバイル機器を想定したものである。コンテンツ再生装置100は、図1に示したように、メイン・コントローラ110と、ネットワーク通信部120と、操作検知部130と、画面表示部140、音楽再生部150と、コンテンツキャッシュ部160と、コンテンツデータベース170と、コンテンツデータベース更新部180と、コンテンツキャッシュ管理部190と、を主に備えて構成される。以下、コンテンツ再生装置100の各構成要素について、順に説明する。
(Content Playback Device 100)
The content reproduction apparatus 100 is assumed to be a mobile device that is a device that a user can carry and move. As shown in FIG. 1, the content playback apparatus 100 includes a main controller 110, a network communication unit 120, an operation detection unit 130, a screen display unit 140, a music playback unit 150, a content cache unit 160, a content A database 170, a content database update unit 180, and a content cache management unit 190 are mainly provided. Hereinafter, each component of the content reproduction apparatus 100 will be described in order.

メイン・コントローラ110は、コンテンツ再生装置100の全体の制御を行うものであり、図1に示したように、コンテンツ再生装置100の各構成要素と連携動作する。なお、図1中の矢印は便宜上付したものであり、矢印が描かれていても連携動作しないものもあり、矢印が描かれていなくても連携動作するものもある。なお、以下の説明においては、メイン・コントローラ110の制御により行われる動作・作用については、制御主体を特に明示しない。   The main controller 110 controls the entire content reproduction apparatus 100 and operates in cooperation with each component of the content reproduction apparatus 100 as shown in FIG. Note that the arrows in FIG. 1 are given for the sake of convenience. Some arrows do not operate in cooperation even if they are drawn, and some operate in cooperation even if no arrow is drawn. In the following description, the control subject is not clearly indicated for the operation / action performed by the control of the main controller 110.

メイン・コントローラ110における本実施形態に特徴的な制御としては、メイン・コントローラ110は、後述するコンテンツキャッシュ管理部190と連係動作して、再生動作の切り替えを行う。具体的には、メイン・コントローラ110は、コンテンツキャッシュ管理部190と連係動作して、オンザフライ再生動作とダウンロード再生動作とを切り替える。この点については、さらに後述する。   As a control characteristic of the present embodiment in the main controller 110, the main controller 110 operates in conjunction with a content cache management unit 190 described later to switch playback operations. Specifically, the main controller 110 operates in conjunction with the content cache management unit 190 to switch between the on-the-fly playback operation and the download playback operation. This point will be further described later.

ネットワーク通信部120は、コンテンツ再生装置100をインターネットを介して通信を行う機能部である。操作検知部130は、コンテンツ再生装置100のユーザによる操作を検知するものである。ユーザによる操作とは、例えば指による操作、声による操作、コンテンツ再生装置100を動かすことによる操作など、各種操作を含む。画面表示部140は、コンテンツ再生装置100における各種情報を表示する画面である。音楽再生部150は、音声を出力する機能部である。   The network communication unit 120 is a functional unit that communicates with the content reproduction apparatus 100 via the Internet. The operation detection unit 130 detects an operation by the user of the content reproduction device 100. The operation by the user includes various operations such as an operation by a finger, an operation by a voice, and an operation by moving the content reproduction apparatus 100, for example. The screen display unit 140 is a screen that displays various types of information in the content reproduction apparatus 100. The music playback unit 150 is a functional unit that outputs sound.

ここで説明したネットワーク通信部120、操作検知部130、画面表示部140及び音楽再生部150は、汎用的なモバイル機器や音楽プレーヤーにおける一般的な構成要素であり、当業者であれば容易に理解できるため、これ以上の詳細な説明を割愛する。なお、コンテンツ再生装置100に、これ以外の一般的な構成要素を含んでもよいことは言うまでもない。   The network communication unit 120, the operation detection unit 130, the screen display unit 140, and the music playback unit 150 described here are general components in general-purpose mobile devices and music players, and can be easily understood by those skilled in the art. I will omit a more detailed explanation because I can. Needless to say, the content reproduction apparatus 100 may include other general components.

(コンテンツキャッシュ記憶部160)
コンテンツキャッシュ部160は、コンテンツデータのコピーを保存する記憶手段である。本実施形態では、コンテンツキャッシュ部160は、第1コンテンツキャッシュL1と第2コンテンツキャッシュL2から構成されている。
(Content cache storage unit 160)
The content cache unit 160 is a storage unit that stores a copy of content data. In the present embodiment, the content cache unit 160 includes a first content cache L1 and a second content cache L2.

コンテンツキャッシュ部160は、ユーザが直近で再生する可能性が高いコンテンツを保存する第1コンテンツキャッシュL1と、ユーザが後日また再生する可能性が高いコンテンツを保存する第2コンテンツキャッシュL2とを有する。このような構成とすることにより、各コンテンツキャッシュL1、L2それぞれについて、各コンテンツキャッシュL1、L2の利用状況に応じた最適なデータ管理方法を採用することが可能となるため、キャッシュデータの有効活用が可能となる。   The content cache unit 160 includes a first content cache L1 that stores content that is most likely to be played back by the user, and a second content cache L2 that stores content that is likely to be played back by the user again at a later date. By adopting such a configuration, it becomes possible to adopt an optimum data management method according to the usage status of each content cache L1, L2 for each content cache L1, L2, so that cache data can be used effectively. Is possible.

また、各コンテンツキャッシュL1、L2それぞれについて、各コンテンツキャッシュの利用状況に応じた最適なデータ記録デバイスを利用することが可能となるため、デバイス寿命の消耗を防ぎ、結果として機器の高寿命化を図ることができる。本実施形態では、第1コンテンツキャッシュL1として、RAM(メインメモリ)を使用し、第2コンテンツキャッシュL2として、NAND−Flashメモリを使用する場合について説明する。   In addition, since it is possible to use an optimum data recording device corresponding to the usage status of each content cache for each of the content caches L1 and L2, it is possible to prevent consumption of the device life and consequently increase the life of the device. Can be planned. In the present embodiment, a case will be described in which a RAM (main memory) is used as the first content cache L1, and a NAND-flash memory is used as the second content cache L2.

(第1コンテンツキャッシュL1)
以下、第1コンテンツキャッシュL1について説明する。まず、第1コンテンツキャッシュL1の構成について説明し、さらに第1コンテンツキャッシュL1の特徴について説明する。
(First content cache L1)
Hereinafter, the first content cache L1 will be described. First, the configuration of the first content cache L1 will be described, and further the features of the first content cache L1 will be described.

上述したように、第1コンテンツキャッシュL1は、RAM(メインメモリ)上に配置される。図3に示すように、メインメモリの一部の領域が第1コンテンツキャッシュデータ領域161として割り当てられている。第1コンテンツキャッシュデータ領域には、図3に示したように、L1キャッシュ管理テーブル162と、L1キャッシュチャンクバッファ163が配置されている。   As described above, the first content cache L1 is arranged on the RAM (main memory). As shown in FIG. 3, a partial area of the main memory is allocated as the first content cache data area 161. As shown in FIG. 3, an L1 cache management table 162 and an L1 cache chunk buffer 163 are arranged in the first content cache data area.

L1キャッシュ管理テーブル162は、図3に示したように、チャンクのインデックスである「chunk_id」フィールドと、曲のインデックスである「song_id」フィールドと、ある曲を構成する複数のチャンクの中で何番目のチャンクであるかを示す「chunk_no」フィールドと、チャンクデータを送出済みであることを示す「used」フィールドと、チャンクの開始時刻である「chunk_start_time」フィールドとチャンクの終了時刻である「chunk_end_time」フィールドにより構成される。song_idフィールドの1つのsongに対して、chunk_noフィールドの複数のチャンクが対応する。また、chunk_idフィールドの値は、L1キャッシュ・チャンクバッファ163と関連付けられている。   As shown in FIG. 3, the L1 cache management table 162 includes a “chunk_id” field that is a chunk index, a “song_id” field that is a song index, and a number of chunks that constitute a song. "Chunk_no" field indicating whether the chunk is already sent, "used" field indicating that the chunk data has been sent, "chunk_start_time" field that is the start time of the chunk, and "chunk_end_time" field that is the end time of the chunk Consists of. Multiple chunks in the chunk_no field correspond to one song in the song_id field. The value of the chunk_id field is associated with the L1 cache chunk buffer 163.

図3に示した一例では、第1コンテンツキャッシュL1内には、合計5個のチャンクデータが存在している。そして、「chunk_id」=1〜5のチャンクは、「song_id」=1の曲の先頭5個分のチャンクデータに対応している。例えば、「chunk_id」=1のチャンクは、「song_id」=1の曲の0分0秒00〜0分7秒39までの音楽データに対応しており、「chunk_id」=2のチャンクは、「song_id」=1の曲の0分7秒39〜0分12秒78までの音楽データに対応しており、以下同様である。また、「chunk_id」=1〜3のチャンクは送出済みであり、もし他に空きチャンクバッファが見つからない場合には、解放可能であることを示している。   In the example shown in FIG. 3, there are a total of five chunk data in the first content cache L1. The chunks with “chunk_id” = 1 to 5 correspond to the chunk data for the top five pieces of the song with “song_id” = 1. For example, the chunk with “chunk_id” = 1 corresponds to the music data from 0 minute 0 second 00 to 0 minute 7 second 39 of the song with “song_id” = 1, and the chunk with “chunk_id” = 2 It corresponds to music data from 0 min 7 sec 39 to 0 min 12 sec 78 of the song of “song_id” = 1, and so on. In addition, chunks with “chunk_id” = 1 to 3 have been sent out, and if no other empty chunk buffer is found, it indicates that the chunk can be released.

L1キャッシュチャンクバッファ163は、図3に示したように、chunk_idフィールドの値に対応したチャンクが保存される領域である。各チャンクバッファのサイズは、64KB固定である。   As shown in FIG. 3, the L1 cache chunk buffer 163 is an area in which chunks corresponding to the value of the chunk_id field are stored. The size of each chunk buffer is fixed at 64 KB.

第1コンテンツキャッシュL1には、再生中のアルバムのコンテンツのみが保存される。これによりユーザが再生曲を変更する操作を行った場合に、迅速に応答する操作性を提供することができる。   Only the content of the album being reproduced is stored in the first content cache L1. Thereby, when the user performs an operation of changing the reproduced music, it is possible to provide an operability of quickly responding.

また、第1コンテンツキャッシュL1は、上述したように、データの保存先として、メインメモリ等の揮発性メモリにより構成される。最もデータの入れ代わりが激しい第1コンテンツキャッシュL1の保存先として書換回数に制限の無いメインメモリを利用することにより、機器の高寿命化を図ることができる。   Further, as described above, the first content cache L1 is configured by a volatile memory such as a main memory as a data storage destination. By using the main memory with no limit on the number of rewrites as the storage destination of the first content cache L1 where the replacement of data is the most intense, it is possible to extend the life of the device.

また、第1コンテンツキャッシュL1におけるデータ管理単位は、1曲をさらに細かく分けたチャンク単位である。かかる構成によれば、第1コンテンツキャッシュL1の容量の限界までコンテンツデータを先読みすることが可能となるので、キャッシュ容量を目一杯有効活用することができる。それだけ先読みできるコンテンツの長さが増えるので、コンテンツサーバ10からのダウンロード速度が一時的に低下したような場合であっても、より再生途切れの発生が少ない機器を提供することができる。   The data management unit in the first content cache L1 is a chunk unit obtained by further dividing one song. According to such a configuration, the content data can be prefetched up to the limit of the capacity of the first content cache L1, so that the cache capacity can be fully utilized effectively. Since the length of the content that can be pre-read increases accordingly, even when the download speed from the content server 10 temporarily decreases, it is possible to provide a device with less occurrence of playback interruption.

(第2コンテンツキャッシュL2)
以下、第2コンテンツキャッシュL2について説明する。まず、第2コンテンツキャッシュL2の構成について説明し、さらに第2コンテンツキャッシュL2の特徴について説明する。
(Second content cache L2)
Hereinafter, the second content cache L2 will be described. First, the configuration of the second content cache L2 will be described, and further the features of the second content cache L2 will be described.

コンテンツ再生アプリが読み書きする不揮発データは、本実施形態の一例では、不揮発なメモリーデバイスであるNAND−Flashメモリー内に保存されている。図4に示したように、NAND−Flashメモリー内には管理データ領域164と、L2キャッシュコンテンツ保存用領域165が配置されている。   Non-volatile data read / written by the content reproduction application is stored in a NAND-flash memory, which is a non-volatile memory device, in an example of the present embodiment. As shown in FIG. 4, a management data area 164 and an L2 cache content storage area 165 are arranged in the NAND-flash memory.

管理データ領域164には、図4に示したように、コンテンツDBファイル166と、L2キャッシュ管理ファイル167が配置されている。コンテンツDBファイル166内には、図4に示したように、serverテーブルと、artistテーブルと、albumテーブルと、songテーブルが書き込まれている。L2キャッシュ管理ファイル167には、図4に示したように、L2−Hキャッシュ管理テーブルと、L2−Eキャッシュ管理テーブルが書き込まれている。なお、L2−Hは、第2コンテンツキャッシュL2の先頭部分(Head)の意味であり、L2−Eは、第2コンテンツキャッシュL2の全体(Entire)の意味である。   In the management data area 164, as shown in FIG. 4, a content DB file 166 and an L2 cache management file 167 are arranged. In the content DB file 166, as shown in FIG. 4, a server table, an artist table, an album table, and a song table are written. As shown in FIG. 4, the L2-H cache management table and the L2-E cache management table are written in the L2 cache management file 167. Note that L2-H means the head portion (Head) of the second content cache L2, and L2-E means the entire second content cache L2.

L2−Hキャッシュ管理テーブルは、idフィールドと、song_idフィールドと、fileフィールドと、scoreフィールドとから構成される。L2−Hキャッシュ管理テーブルのfileフィールドは、後述するコンテンツヘッド・キャッシュ・ファイルと関連付けられている。L2−Eキャッシュ管理テーブルは、idフィールドと、song_idフィールドと、fileフィールドと、scoreフィールドとから構成される。L2−Eキャッシュ管理テーブルのfileフィールドは、後述するコンテンツ・キャッシュ・ファイルと関連付けられている。   The L2-H cache management table includes an id field, a song_id field, a file field, and a score field. The file field of the L2-H cache management table is associated with a content head cache file described later. The L2-E cache management table includes an id field, a song_id field, a file field, and a score field. The file field of the L2-E cache management table is associated with a content cache file described later.

L2キャッシュコンテンツ保存用領域165は、図4に示したように、L2コンテンツ先頭部分保存エリアL2−Hと、L2コンテンツ全体保存用エリアL2−Eとから構成される。L2コンテンツ先頭部分保存エリアL2−Hは、第2コンテンツキャッシュL2に保存されたコンテンツ(L2コンテンツ)の先頭部分を保存するエリアであり、例えば最大512MBである。L2コンテンツ全体保存用エリアL2−Eは、第2コンテンツキャッシュL2に保存されたコンテンツ(L2コンテンツ)の全体を保存するエリアであり、例えば最大4GBである。   As shown in FIG. 4, the L2 cache content storage area 165 includes an L2 content head part storage area L2-H and an entire L2 content storage area L2-E. The L2 content head part storage area L2-H is an area for storing the head part of content (L2 content) stored in the second content cache L2, and has a maximum size of 512 MB, for example. The entire L2 content storage area L2-E is an area for storing the entire content (L2 content) stored in the second content cache L2, and is, for example, a maximum of 4 GB.

L2コンテンツ先頭部分保存エリアL2−Hには、図4に示したように、コンテンツヘッド・キャッシュ・ファイル00001.head、00002.head、00003.head、00004.head、・・・が保存される。各ファイルサイズは、64KB固定とすることができ、この場合には512MB÷64KB=最大8192曲分保存できる。   In the L2 content head part storage area L2-H, content head cache files 00001.head, 00002.head, 00003.head, 00004.head,... Are stored as shown in FIG. Each file size can be fixed at 64 KB. In this case, 512 MB ÷ 64 KB = maximum 8192 songs can be stored.

L2コンテンツ全体保存用エリアL2−Eには、図4に示したように、コンテンツ・キャッシュ・ファイル00001.cache、00002.cache、00003.cache、00004.cache、・・・が保存される。各ファイルサイズは、コンテンツの長さに依存する可変長の大きさである。例えば、コンテンツの平均ファイルサイズが4MBであるとすると、4GB÷4MB=最大1024曲程度までコンテンツを保存できる。   In the entire L2 content storage area L2-E, content cache files 00001.cache, 00002cache, 00003.cache, 00004.cache,... Are stored as shown in FIG. Each file size is a variable length depending on the length of the content. For example, if the average file size of the content is 4 MB, the content can be stored up to about 4 GB ÷ 4 MB = 1024 songs at maximum.

第2コンテンツキャッシュL2には、後日再生する可能性が高いコンテンツのみが保存され、第2コンテンツキャッシュL2におけるキャッシュ管理のアルゴリズムは、第1コンテンツキャッシュL1とは別のアルゴリズムが採用される。第2コンテンツキャッシュL2の利用状況に応じて、最適なキャッシュ管理アルゴリズムを採用することが可能となるため、第2コンテンツキャッシュL2のヒット率がより向上し、結果的に限りあるインターネット通信データ量を節約することが可能となる。   Only content that is highly likely to be played back at a later date is stored in the second content cache L2, and an algorithm for cache management in the second content cache L2 is different from that of the first content cache L1. Since it is possible to employ an optimal cache management algorithm according to the usage status of the second content cache L2, the hit rate of the second content cache L2 is further improved, resulting in a limited amount of Internet communication data. It is possible to save.

また、第2コンテンツキャッシュL2は、上述したように、データの保存先として、NAND−Flashメモリ等で構成された不揮発性メモリにより構成される。コンテンツ再生装置100の電源を切ったり、あるいは再起動させた場合であっても、第1コンテンツキャッシュL1と比較してより大容量を割り当てることが可能な第2コンテンツキャッシュL2内のデータを失うことがないため、せっかくキャッシュしたデータをより有効活用することができる。このようにして、限りあるインターネット通信データ量を無駄にしてしまうことがない。   In addition, as described above, the second content cache L2 is configured by a nonvolatile memory configured by a NAND-Flash memory or the like as a data storage destination. Loss of data in the second content cache L2 to which a larger capacity can be allocated compared to the first content cache L1 even when the content playback device 100 is turned off or restarted. Therefore, the cached data can be used more effectively. In this way, a limited amount of Internet communication data is not wasted.

また、第2コンテンツキャッシュL2におけるデータ管理単位は、曲単位としている。このように第1コンテンツキャッシュL1よりも大粒度の管理を行うことにより、第2コンテンツキャッシュL2の管理データの増大を防ぐことができるため、同じ容量のメモリにより多くの楽曲をキャッシュすることが可能となる。また、第2コンテンツキャッシュL2のデータの書き換え頻度を大幅に低減することも可能となる。NAND−Flashメモリにはデバイス固有の書き込み上限回数というものがあるが、書き換え頻度を節約することにより、機器の大幅な高寿命化を期待することができる。   The data management unit in the second content cache L2 is a song unit. In this way, by performing management at a finer granularity than the first content cache L1, it is possible to prevent an increase in the management data of the second content cache L2, and therefore it is possible to cache more songs in the same capacity memory It becomes. In addition, the frequency of rewriting data in the second content cache L2 can be significantly reduced. There is a device-specific upper limit number of writes in the NAND-flash memory. By saving the rewrite frequency, it is possible to expect a significant increase in the lifetime of the device.

以上、コンテンツキャッシュ部160を構成する第1コンテンツキャッシュL1と第2コンテンツキャッシュL2について説明した。以下、第1コンテンツキャッシュL1、第2コンテンツキャッシュL2の応用例について説明する。   The first content cache L1 and the second content cache L2 constituting the content cache unit 160 have been described above. Hereinafter, application examples of the first content cache L1 and the second content cache L2 will be described.

コンテンツキャッシュ部160においては、各コンテンツの先頭部分(例えば、3秒程度)とそれ以外の残余部分(又は全体)とに分けて、データを記録することができる。コンテンツの先頭部分のデータを優先して残すなどといった柔軟な制御ができ、コンテンツ再生開始時の再生遅延時間が短縮される。コンテンツの先頭部分がコンテンツキャッシュ部160に存在していれば、ユーザがある曲の再生を指示した場合に、すぐに楽曲の再生を開始することが可能となるため、機器の使い勝手が向上する。   In the content cache unit 160, data can be recorded separately for the top portion (for example, about 3 seconds) of each content and the remaining portion (or the whole) other than that. Flexible control such as preferentially leaving the data at the beginning of the content can be performed, and the playback delay time at the start of content playback is shortened. If the head portion of the content is present in the content cache unit 160, it is possible to immediately start playing the music when the user instructs the music to be played, which improves the usability of the device.

また、コンテンツの先頭部分(例えば、3秒程度)と全体(又は先頭部分を除く残りの部分)を分けて、コンテンツキャッシュ部160にデータを記録するようにしたときは、さらにコンテンツキャッシュ部160に保存可能なコンテンツ全体の曲数よりも、コンテンツの先頭のみを保存可能な曲数を大きくすることができる。   Further, when data is recorded in the content cache unit 160 by dividing the head portion (for example, about 3 seconds) of the content and the whole (or the remaining portion excluding the head portion), the content cache unit 160 It is possible to increase the number of songs that can store only the beginning of the content, compared to the total number of songs that can be stored.

例えば、ある曲の先頭部分のみがキャッシュされていて、全体がキャッシュされていない状況下において、その曲の再生が指示された場合には、コンテンツサーバ10にその曲データの全体ダウンロード要求を発行しながら、同時にコンテンツキャッシュ部160内のコンテンツの先頭データの再生を開始する。その後、ネットワークの通信遅延時間(往復分)+コンテンツサーバ10の応答時間を加えた時間が経過すると、コンテンツサーバ10からコンテンツデータが届き始める。このサーバ応答時間よりも、コンテンツキャッシュ部160に保存するコンテンツの先頭部分の長さを長く設定することによって、コンテンツを途切れずに再生することが可能となる。なお本実施例では、コンテンツの先頭部分のデータサイズを、第2コンテンツキャッシュL2のチャンクサイズと同一に設定することにより、コンテンツキャッシュ管理部が担うコンテンツ制御処理が複雑化することを防止している。   For example, in a situation where only the top part of a certain song is cached and the whole is not cached, when the reproduction of the song is instructed, a request to download the entire song data is issued to the content server 10. At the same time, reproduction of the top data of the content in the content cache unit 160 is started. After that, when the time that is the sum of the network communication delay time (round trip) + the response time of the content server 10 elapses, the content data starts to arrive from the content server 10. By setting the length of the head portion of the content stored in the content cache unit 160 to be longer than the server response time, the content can be reproduced without interruption. In this embodiment, by setting the data size of the top part of the content to be the same as the chunk size of the second content cache L2, it is possible to prevent the content control processing performed by the content cache management unit from becoming complicated. .

ここで、従来技術との対比で説明する。従来、キャッシュのデータを減らすためには、ファイルデータを部分的に削除することが行われていた。ここでいうファイルデータを部分的に削除するとは、各コンテンツの質を低下する方向でデータを改変することを意味している。例えば、以下のような削除が行われていた。
・静止画:画素を間引く(解像度を下げる)。
・動画:フレームを間引く(フレームレート(映像の滑らかさ)を下げる)。
・画像+文字:画像を削除して、文字情報だけ残す。
・音声:ステレオ音声をモノラル音声に変換する。ビットレートを下げる(同時に音質は劣化する)。
この点、本実施形態によれば、各コンテンツの質は維持したまま、コンテンツを時間方向に向かって一部のデータを削除しているため、部分的に削除することの意味合いが全く異なっており、得られる効果は全く別物である。
Here, it demonstrates in contrast with a prior art. Conventionally, in order to reduce cache data, file data has been partially deleted. The partial deletion of the file data here means that the data is altered in a direction of reducing the quality of each content. For example, the following deletion has been performed.
Still image: Thins out pixels (decreases resolution).
・ Video: Thinning out frames (decreasing the frame rate (smoothness of video)).
-Image + Text: Delete the image and leave only text information.
-Audio: Converts stereo audio to monaural audio. Lower the bit rate (at the same time the sound quality deteriorates).
In this respect, according to the present embodiment, since the contents are deleted in the time direction while maintaining the quality of each content, the meaning of partial deletion is completely different. The effect obtained is completely different.

また、コンテンツキャッシュ部160において、容量が満杯になってしまった場合に、各コンテンツの残余部分(コンテンツの先頭のデータ以外の部分)が先に削除されるようにしてもよい。コンテンツの先頭のデータがコンテンツキャッシュ部160に残っている可能性が高まるため、楽曲再生指示を行った場合のレスポンスを高められる可能性が高くなり、機器の使い勝手が向上する。   Further, in the content cache unit 160, when the capacity is full, the remaining portion of each content (a portion other than the top data of the content) may be deleted first. Since there is a high possibility that the top data of the content remains in the content cache unit 160, there is a high possibility that the response when the music reproduction instruction is given increases, and the usability of the device is improved.

また、コンテンツキャッシュ部160において、各コンテンツの先頭部分を保存する先頭部分キャッシュの容量と、各コンテンツの残余部分を保存する残余部分キャッシュの容量とが分けて管理され、容量が満杯になってしまった場合に、先頭部分キャッシュと残余部分キャッシュとで独立して不要データの削除処理が実施されるようにしてもよい。コンテンツの先頭のデータがコンテンツキャッシュ部160に残っている可能性が高まるため、楽曲再生指示を行った場合のレスポンスを高められる可能性が高くなり、機器の使い勝手が向上する。   In addition, the content cache unit 160 manages the capacity of the head part cache for storing the head part of each content separately from the capacity of the remaining part cache for storing the remaining part of each content, and the capacity becomes full. In such a case, the unnecessary data may be deleted independently from the head partial cache and the remaining partial cache. Since there is a high possibility that the top data of the content remains in the content cache unit 160, there is a high possibility that the response when the music reproduction instruction is given increases, and the usability of the device is improved.

また、第1コンテンツキャッシュL1と第2コンテンツキャッシュL2の容量は、個別に設定できるようにしてもよい。ユーザの利用状況・利用環境に応じた最適なキャッシュ容量を選択することを可能なため、以下のような使い方が可能となる。
・例えば、毎月の通信量が無制限の通信契約を結んでいる場合には、第2コンテンツキャッシュL2の容量はごく少な目に設定して、主に第1コンテンツキャッシュL1のみを利用することにより、一時的に通信速度が低下した場合の音楽再生途切れを防止することと、機器の不揮発性メモリ容量をむやみに消費してしまうことを防ぐことができる。
・あるいは逆に毎月の通信量に上限がある通信契約を結んでいる場合は、第1コンテンツキャッシュL1/第2コンテンツキャッシュL2をともに多めに設定することにより、音楽再生途切れの防止効果と、通信データ量節約の効果を両方享受することが可能となる。
Further, the capacities of the first content cache L1 and the second content cache L2 may be set individually. Since it is possible to select an optimal cache capacity according to the user's usage status and usage environment, the following usage is possible.
-For example, if you have a communication contract with unlimited monthly traffic, set the capacity of the second content cache L2 to a very small amount and use only the first content cache L1 temporarily. Therefore, it is possible to prevent interruption of music playback when the communication speed is lowered and to consume the nonvolatile memory capacity of the device unnecessarily.
-Or conversely, if you have a communication contract with an upper limit on the monthly traffic, setting both the first content cache L1 and the second content cache L2 to increase the music reproduction interruption effect and communication It is possible to enjoy both effects of saving data.

(コンテンツデータベース170)
再び図1を参照しながら、コンテンツ再生装置100の構成要素を説明する。
コンテンツデータベース170は、コンテンツサーバ10に登録されているコンテンツに関する再生履歴情報とコンテンツ鮮度情報を保持する機能部である。コンテンツデータベース更新部180は、コンテンツデータベース170の内容を更新する機能部である。
(Content database 170)
With reference to FIG. 1 again, the components of the content reproduction apparatus 100 will be described.
The content database 170 is a functional unit that holds reproduction history information and content freshness information related to content registered in the content server 10. The content database update unit 180 is a functional unit that updates the contents of the content database 170.

コンテンツデータベース170で保持される情報について、図5を参照しながら説明する。図5は、コンテンツデータベース170の内容の一部を示す図である。コンテンツデータベース170で保持される情報は、図5(a)に示したserverテーブルと、図5(b)に示したartistテーブルと、図5(c)に示したalbumテーブルと、図5(d)に示したsongテーブルと、から主に構成される。   Information held in the content database 170 will be described with reference to FIG. FIG. 5 is a diagram showing a part of the contents of the content database 170. The information held in the content database 170 includes the server table shown in FIG. 5A, the artist table shown in FIG. 5B, the album table shown in FIG. 5C, and FIG. The song table shown in FIG.

serverテーブルは、コンテンツサーバ10のトップURLを示すものであり、図5(a)に示した一例では、3つのコンテンツサーバ10のトップURLを示す。artistテーブルは、図5(b)に示したように、識別子である「id」フィールドとアーティスト名である「name」フィールドと、アーティスト名の読みを示す「yomi」フィールドとからなる。albumテーブルは、図5(c)に示したように、識別子である「id」フィールドと、「artist_id」フィールドと、アルバムのタイトル名である「title」フィールドとからなる。ここで、「artist_id」フィールドは、artistテーブルの「id」フィールドに対応するものである。   The server table indicates the top URLs of the content servers 10, and in the example illustrated in FIG. 5A, the top URLs of the three content servers 10 are illustrated. As shown in FIG. 5B, the artist table includes an “id” field that is an identifier, a “name” field that is an artist name, and a “yomi” field that indicates the reading of the artist name. As shown in FIG. 5C, the album table includes an “id” field that is an identifier, an “artist_id” field, and a “title” field that is the title name of the album. Here, the “artist_id” field corresponds to the “id” field of the artist table.

songテーブルは、図5(d)に示したように、識別子である「id」フィールドと、アルバムの識別子である「album_id」フィールドと、アルバム内のトラック番号を表す「trackno」フィールドと、曲のタイトルを表す「title」フィールドと、serverテーブルに対応する「server_id」フィールドと、曲のコンテンツサーバ上の場所を表す「path」フィールドと、曲データの長さをバイト単位で表す「filesize」フィールドと、この曲がコンテンツサーバに書き込まれた日時を記録する「write_date」フィールドと、この曲を最後に再生開始した日時を記録する「play_date1」フィールドと、この曲を最後のその前に再生開始した日時を記録する「play_date2」フィールドとからなる。   As shown in FIG. 5D, the song table includes an “id” field that is an identifier, an “album_id” field that is an album identifier, a “trackno” field that represents a track number in the album, A “title” field that represents the title, a “server_id” field corresponding to the server table, a “path” field that represents the location of the song on the content server, and a “filesize” field that represents the length of the song data in bytes. , “Write_date” field that records the date and time when this song was written to the content server, “play_date1” field that records the date and time when this song was last played, and the date and time when this song was last played And “play_date2” field for recording.

再生頻度値は、例えば以下のプログラムにより計算することができる。scoreの値が再生頻度を示し、値が大きいほど再生頻度が高いことを意味する。
if play_date2 != ""
then
diff = max(play_date1 - play_date2, now_date - play_date1)
score = max(365 - diff, 0) / 365 * 100
else
score = -1
The reproduction frequency value can be calculated by the following program, for example. The score value indicates the reproduction frequency, and the larger the value, the higher the reproduction frequency.
if play_date2! = ""
then
diff = max (play_date1-play_date2, now_date-play_date1)
score = max (365-diff, 0) / 365 * 100
else
score = -1

ここで(play_date1 - play_date2)や(now_date - play_date1)の値は、日数単位で計算される。例えば、あるコンテンツを2015年12月1日の10:00に初めて再生して、ちょうどその12時間後の22:00に同じコンテンツを再生した場合には、(play_date1 - play_date2)の計算値は0.5となる。上記のプログラムにより計算されるscoreの値は、例えば同じコンテンツを立て続けに2回再生した場合にはほぼ100の値となる。一方、play_date1とplay_date2の日数差が大きくなるにつれてscoreの値は低下していき、日数差が365日に達するとscoreの値は0となる。またplay_date1とplay_date2の日数差が小さかったとしても、now_dateとplay_date1の日数差が大きくなるとscoreの値はやはり低下する。これはあるコンテンツを過去において繰り返し何回も再生したことがあるとしても、最後にそのコンテンツを再生してから多くの日数が経過している場合には、そのコンテンツの再生頻度は低くなったと考えられるからである。scoreの値が大きいほどコンテンツの再生頻度が高いと判断されるが、scoreの絶対値そのものには特に意味はない。   Here, the values of (play_date1-play_date2) and (now_date-play_date1) are calculated in units of days. For example, when a certain content is first played back at 10:00 on December 1, 2015 and the same content is played back at 22:00 just 12 hours later, the calculated value of (play_date1-play_date2) is 0. .5. The score value calculated by the above program is approximately 100 when, for example, the same content is reproduced twice in succession. On the other hand, the score value decreases as the number of days difference between play_date1 and play_date2 increases. When the number of days difference reaches 365 days, the score value becomes zero. Also, even if the difference in days between play_date1 and play_date2 is small, the score value also decreases as the difference in days between now_date and play_date1 increases. This is because even if a certain content has been played repeatedly many times in the past, if many days have passed since the last playback of the content, the playback frequency of the content is considered to have decreased. Because it is. It is determined that the higher the score value, the higher the frequency of content playback, but the absolute score value itself has no particular meaning.

以上、コンテンツデータベース170について説明した。コンテンツデータベース170では、上記の他にもさまざまな情報を保持することができる。例えば、コンテンツデータベース170は、複数のコンテンツサーバ(例えば、コンテンツサーバ10と同様の構成を有する複数のコンテンツサーバ)のコンテンツリスト情報を統合した統合コンテンツリスト情報を保持するようにしてもよい。かかる構成によれば、コンテンツの保存先が複数のサーバに分かれている場合であっても、一元化されたコンテンツリストから再生するコンテンツを選択することができるので、使い勝手が良くなる。また、再生したい曲が登録されているコンテンツサーバをいちいち選択する操作から、ユーザを解放することができる。   The content database 170 has been described above. The content database 170 can hold various information other than the above. For example, the content database 170 may hold integrated content list information obtained by integrating content list information of a plurality of content servers (for example, a plurality of content servers having the same configuration as the content server 10). According to such a configuration, even when the content storage destination is divided into a plurality of servers, the content to be reproduced can be selected from the centralized content list, so that the usability is improved. Further, the user can be released from the operation of selecting the content server in which the music to be reproduced is registered.

(コンテンツキャッシュ管理部190)
コンテンツキャッシュ管理部190は、コンテンツキャッシュ部160を管理する機能部である。コンテンツキャッシュ管理部190は、メイン・コントローラ110と連携動作することにより、オンザフライ再生動作と、ダウンロード再生動作を実現する。すなわち、コンテンツキャッシュ管理部190は、再生対象となるコンテンツの再生頻度情報に従って、オンザフライ再生動作とダウンロード再生動作とを切り替える。
(Content cache management unit 190)
The content cache management unit 190 is a functional unit that manages the content cache unit 160. The content cache management unit 190 implements an on-the-fly playback operation and a download playback operation by cooperating with the main controller 110. That is, the content cache management unit 190 switches between the on-the-fly playback operation and the download playback operation according to the playback frequency information of the content to be played back.

コンテンツの再生動作について、図6〜図8を参照しながら説明する。図6〜図8において、図中の破線は、コンテンツデータの流れを示す。オンザフライ再生動作とは、図6に示したように、コンテンツサーバ10上のコンテンツデータを第1コンテンツキャッシュL1にダウンロードしながら、リアルタイムに再生する動作である。   The content reproduction operation will be described with reference to FIGS. 6-8, the broken line in a figure shows the flow of content data. As shown in FIG. 6, the on-the-fly playback operation is an operation for playing back in real time while downloading the content data on the content server 10 to the first content cache L1.

また、ダウンロード再生動作とは、図7に示したように、コンテンツサーバ10から第1コンテンツキャッシュL1にダウンロードしたコンテンツデータを、第2コンテンツキャッシュL2にコピーしながら、同時に再生を行う動作である。なお、ダウンロード再生動作を行うことによって、第2コンテンツキャッシュL2にコンテンツデータが書き込まれる。この第2コンテンツキャッシュL2に書き込まれたコンテンツデータは、キャッシュ再生動作により再生することができる。   In addition, as shown in FIG. 7, the download / playback operation is an operation of simultaneously playing the content data downloaded from the content server 10 to the first content cache L1 while copying it to the second content cache L2. Note that the content data is written in the second content cache L2 by performing the download reproduction operation. The content data written in the second content cache L2 can be reproduced by the cache reproduction operation.

キャッシュ再生動作とは、図8に示したように、第2コンテンツキャッシュL2に書き込まれているコンテンツデータを利用することで、ネットワーク通信が行えないような場合であっても、コンテンツの再生を可能とする動作である。   As shown in FIG. 8, the cache playback operation enables playback of content even when network communication cannot be performed by using content data written in the second content cache L2. It is an operation.

次に、本実施形態におけるコンテンツキャッシュ管理部190の動作について、従来技術との対比で説明する。   Next, the operation of the content cache management unit 190 in this embodiment will be described in comparison with the prior art.

従来技術においては、再生対象のコンテンツがコンテンツキャッシュに存在するかどうかに応じて、ダウンロードデータの再生(=コンテンツキャッシュへの書き込み)か、キャッシュデータの再生(=コンテンツキャッシュの読み出し)のいずれかの動作を行っていた。ここで、ダウンロードデータの再生は、さらに細かく分類すると、ダウンロード再生方式とストリーミング再生方式のいずれかの方式で行われていた。   In the prior art, depending on whether or not the content to be reproduced exists in the content cache, either the reproduction of the download data (= writing to the content cache) or the reproduction of the cache data (= reading of the content cache) Was moving. Here, the reproduction of the download data is classified into one of a download reproduction method and a streaming reproduction method, if further classified.

ダウンロード再生方式とは、まずダウンロードしたコンテンツデータをコンテンツキャッシュに書き込んでいき、1曲分のダウンロードが完了したら、ダウンロード済みコンテンツの再生を開始する再生方式である。また、ストリーミング再生方式とは、コンテンツデータをダウンロードしながら、同時にダウンロードしたコンテンツの再生を行う再生方式である。いずれの再生方式を採用している場合であっても、再生対象のコンテンツデータは必ずコンテンツキャッシュに書き込む必要があった。   The download reproduction method is a reproduction method in which the downloaded content data is first written in the content cache, and when the download of one song is completed, the reproduction of the downloaded content is started. The streaming playback method is a playback method for playing back the downloaded content at the same time as downloading the content data. Regardless of which playback method is used, it is necessary to always write the content data to be played back to the content cache.

ここでコンテンツキャッシュ内に再生頻度が高いコンテンツが書き込まれている状況下において、再生頻度が低く、コンテンツキャッシュにもキャッシュデータが存在していないコンテンツを再生した場合を考えてみる。もしコンテンツキャッシュにダウンロードしたコンテンツデータが収まる分の空き容量があるのであれば、ダウンロードしたデータをコンテンツキャッシュに書き込むだけであり、何も問題はない。   Here, let us consider a case where content having a high reproduction frequency is written in the content cache and a content having a low reproduction frequency and no cache data exists in the content cache. If there is enough free space for the content data downloaded in the content cache, the downloaded data is simply written into the content cache, and there is no problem.

一方、コンテンツキャッシュの空き容量が不足していた場合には、LRU方式ではコンテンツキャッシュ内に存在するすべてのコンテンツの中で最も過去に再生したコンテンツをまず削除した上で、ダウンロードしたコンテンツをコンテンツキャッシュに書き込むことになる。しかしながらその結果として、ある時にたまたま再生したが長い目で見れば再生頻度の低いコンテンツが再生頻度の高いコンテンツをコンテンツキャッシュから追い出してしまうことが発生していた。このために、コンテンツキャッシュのヒット率が低下してしまい、ひいては通信データ量を無駄に消費してしまうことにつながっていた。このような動作を引き起こしてしまう一番の要因は、コンテンツの再生履歴情報(再生日時/再生回数/再生頻度等)が維持管理される対象が、コンテンツキャッシュ内に存在するコンテンツのみだったからである。   On the other hand, if there is not enough free space in the content cache, the LRU method first deletes the most recently played content among all the content existing in the content cache, and then downloads the downloaded content to the content cache. Will write to. However, as a result, it happened that at some point it was played back, but in the long run, content with a low playback frequency would kick out content with a high playback frequency from the content cache. For this reason, the hit rate of the content cache is lowered, and as a result, the amount of communication data is wasted. The main factor causing such an operation is that the content reproduction history information (reproduction date / time, number of reproductions / reproduction frequency, etc.) is maintained only for the content existing in the content cache. .

一方、本実施形態のコンテンツキャッシュ管理部190においては、再生対象のコンテンツがコンテンツキャッシュ部160に存在するかどうかに加えて、再生対象のコンテンツの再生頻度値とコンテンツキャッシュ部160内の各コンテンツの再生頻度値を比較することにより、オンザフライ再生(第2コンテンツキャッシュL2は使用しない)(図6)か、ダウンロード再生(図7)のいずれかの動作を行う。   On the other hand, in the content cache management unit 190 of this embodiment, in addition to whether or not the content to be reproduced exists in the content cache unit 160, the reproduction frequency value of the content to be reproduced and the content of each content in the content cache unit 160 By comparing the reproduction frequency values, either on-the-fly reproduction (the second content cache L2 is not used) (FIG. 6) or download reproduction (FIG. 7) is performed.

すなわち、本実施形態において、再生対象のコンテンツがコンテンツキャッシュ部160内に存在していない場合に、再生対象コンテンツの再生頻度値が相対的に低い場合には、オンザフライ再生(図6)を行い、逆に再生頻度値が高い場合には、従来と同様に、ダウンロード再生(図7)を行う。   That is, in this embodiment, when the playback target content does not exist in the content cache unit 160, if the playback frequency value of the playback target content is relatively low, on-the-fly playback (FIG. 6) is performed. Conversely, when the reproduction frequency value is high, download reproduction (FIG. 7) is performed as in the conventional case.

上述したように、オンザフライ再生では、コンテンツをダウンロードしながら再生を行うが、ダウンロードしたコンテンツを不揮発の第2コンテンツキャッシュL2には書き込まない動作を行う。このオンザフライ再生の導入により、あるときたまたま再生頻度の低いコンテンツを再生したことにより、より再生頻度の高いコンテンツを第2コンテンツキャッシュL2から削除してしまうという事態を防止できる。その結果、第2コンテンツキャッシュL2のヒット率が向上し、通信データ量をより節約できるようになる。   As described above, in on-the-fly playback, playback is performed while downloading content, but the downloaded content is not written to the nonvolatile second content cache L2. With the introduction of this on-the-fly playback, it is possible to prevent a situation in which content with a higher playback frequency is deleted from the second content cache L2 by accidentally playing back a content with a lower playback frequency. As a result, the hit rate of the second content cache L2 is improved, and the amount of communication data can be further saved.

なお、本実施形態において、コンテンツの再生履歴情報(再生日時/再生回数/再生頻度等)が維持管理される対象は、コンテンツサーバ10に存在するすべてのコンテンツとすることができる。そして、もし複数のコンテンツサーバ(クラウドストレージ)が存在するのであれば、各コンテンツサーバが保持しているコンテンツを統合した全コンテンツに対して再生履歴情報を維持管理することができる。   In the present embodiment, the content history information (reproduction date / time / number of reproduction / reproduction frequency, etc.) to be maintained can be all content existing in the content server 10. If there are a plurality of content servers (cloud storage), it is possible to maintain and manage the reproduction history information for all the contents integrated with the contents held by each content server.

ただし、コンテンツの再生履歴情報(再生日時/再生回数/再生頻度等)が維持管理される対象としては、必ずしもすべてのコンテンツである必要はなく、以下のように考えることもできる。
・コンテンツキャッシュ部160に保持しているコンテンツ:A
・コンテンツサーバ10に登録されている全コンテンツ:B
・再生頻度情報を保持するコンテンツ:X
としたときに、「A<X≦B」の関係が成立するような条件で再生頻度条件を保持するようにしてもよい。
However, it is not always necessary that the content reproduction history information (reproduction date / time / number of reproductions / reproduction frequency, etc.) is maintained, and it can be considered as follows.
Content held in content cache unit 160: A
-All contents registered in the content server 10: B
-Content holding playback frequency information: X
In this case, the reproduction frequency condition may be held under such a condition that the relationship of “A <X ≦ B” is satisfied.

(第1の実施形態の動作)
次に、本実施形態の動作について、図9〜図28を参照しながら説明する。図9は、本実施形態の動作を示すシーケンス図である。図10は、図9のシーケンスにおいて構成要素間でやり取りされるインタフェース・コマンドの例を一覧にしたものである。図11〜図28は、図9のうち主要なスレッドの詳細を示すフローチャートである。以下、図9及び図10を参照しつつ、図11〜図28のフローチャートを説明する。
(Operation of the first embodiment)
Next, the operation of this embodiment will be described with reference to FIGS. FIG. 9 is a sequence diagram showing the operation of the present embodiment. FIG. 10 is a list of examples of interface commands exchanged between components in the sequence of FIG. FIGS. 11 to 28 are flowcharts showing details of main threads in FIG. Hereinafter, the flowcharts of FIGS. 11 to 28 will be described with reference to FIGS. 9 and 10.

<メインスレッド:図11>
メイン・コントローラ110のメインスレッドについて、図11を参照しながら説明する。まず、メイン・コントローラ110の再生処理スレッドの実行を開始する(ステップS102)。この処理については、図13を参照しながら後述する。続いて、メイン・コントローラ110のUI処理スレッドの実行を開始する(ステップS104)。この処理については、図12を参照しながら後述する。さらに、コンテンツキャッシュ管理部190のメインスレッドの実行を開始する(ステップS106)。この処理については、図14を参照しながら後述する。
<Main thread: Fig. 11>
The main thread of the main controller 110 will be described with reference to FIG. First, execution of the playback processing thread of the main controller 110 is started (step S102). This process will be described later with reference to FIG. Subsequently, execution of the UI processing thread of the main controller 110 is started (step S104). This process will be described later with reference to FIG. Furthermore, the execution of the main thread of the content cache management unit 190 is started (step S106). This process will be described later with reference to FIG.

なお、ここでスレッドについて補足しておく。従来から良く利用されているサブルーチンの場合には、例えばメインルーチンからサブルーチンを呼び出した場合には、サブルーチンを実行している最中はメインルーチンの方は実行停止状態となり、しかる後にサブルーチンの実行が終了するとメインルーチンの動作が再開されるというような動きとなる。すなわちサブルーチンの場合には、呼び出し側の処理(この例ではメインルーチン)と呼び出された側の処理(この例ではサブルーチン)が同時に実行されることはない。一方スレッドの場合には、例えばメインスレッドから別のスレッドの実行開始を指示すると、呼び出し側の処理(この例ではメインスレッド)と呼び出された側の処理(この例では別スレッド)が同時並行的に実行されるという違いがある。   In addition, it supplements about a thread here. In the case of a subroutine that has been frequently used in the past, for example, when a subroutine is called from a main routine, the execution of the subroutine is stopped while the subroutine is being executed while the subroutine is being executed. When finished, the operation of the main routine is resumed. That is, in the case of a subroutine, the calling process (in this example, the main routine) and the called process (in this example, the subroutine) are not executed at the same time. On the other hand, in the case of a thread, for example, when an instruction to start execution of another thread is issued from the main thread, the process on the call side (main thread in this example) and the process on the called side (in this example, another thread) are performed concurrently. There is a difference that it is executed.

続いて、コンテンツ再生頻度値(又は再生確率予想値)を更新するかを判断する(ステップS108)(なお、後述する第2の実施形態では、コンテンツ再生頻度値を、再生確率予想値と読み替える。以下同様である。)。この判断の具体的な実行タイミングとしては、例えば1日に1回程度、自動的に実行することができる。これはコンテンツ再生頻度値(又は再生確率予想値)(以下、scoreと表記)を算出する際に「現在日時」を参照しているため、時間の経過と共にscore値が変化するからである。しかし、あまり頻繁にこの更新処理を行っても、モバイル機器のバッテリーを無用に消耗させてしまうだけなので、バッテリー消費とscore値をできるだけ正しい値に維持することのバランスを考慮して、更新頻度を設定する必要がある。   Subsequently, it is determined whether or not to update the content reproduction frequency value (or the reproduction probability expected value) (step S108). Note that in the second embodiment described later, the content reproduction frequency value is read as the reproduction probability expected value. The same applies hereinafter.) As a specific execution timing of this determination, for example, it can be automatically executed about once a day. This is because the “current date and time” is referred to when calculating the content reproduction frequency value (or reproduction probability expected value) (hereinafter referred to as “score”), and the score value changes with the passage of time. However, even if this update process is performed too frequently, it will only use up the battery of the mobile device unnecessarily, so consider the balance between battery consumption and keeping the score value as correct as possible. Must be set.

ステップS108の判断の結果、コンテンツ再生頻度値(又は再生確率予想値)を更新する場合は、コンテンツ再生頻度値(又は再生確率予想値)の更新処理スレッドの実行を開始する(ステップS110)。そして、ステップS108に戻る。   If the content playback frequency value (or predicted playback probability value) is to be updated as a result of the determination in step S108, execution of an update processing thread for the content playback frequency value (or predicted playback probability value) is started (step S110). Then, the process returns to step S108.

一方、ステップS108の判断の結果、コンテンツ再生頻度値(又は再生確率予想値)を更新しない場合は、コンテンツデータベース170を更新するかを判断する(ステップS112)。この判断の具体的な実行タイミングとしては、例えば1か月に1回程度自動的に実行させたり、あるいはユーザが手動で「コンテンツデータベース170の更新」を指示した時に実行してもよい。コンテンツデータベース170を更新するためには、インターネット経由でコンテンツサーバ10上のコンテンツファイルにアクセスする必要があるため、むやみにコンテンツデータベース170の更新を行うと、貴重なモバイル通信データ量を無駄に消費してしまう。よってこの更新処理を自動実行することは、モバイル通信データ量の上限のある通信サービスを利用しているユーザにとっては好ましい動作ではない可能性が高い。よって、コンテンツデータベース170の更新処理を自動的に行うかどうかの設定手段を設けて、ユーザが選択可能とするのが良い。   On the other hand, if the content reproduction frequency value (or the reproduction probability expected value) is not updated as a result of the determination in step S108, it is determined whether to update the content database 170 (step S112). As a specific execution timing of this determination, for example, it may be automatically executed about once a month, or may be executed when the user manually instructs “update of the content database 170”. In order to update the content database 170, it is necessary to access content files on the content server 10 via the Internet. Therefore, if the content database 170 is updated unnecessarily, valuable mobile communication data amount is wasted. End up. Therefore, it is highly likely that the automatic execution of this update process is not a preferable operation for a user who uses a communication service with an upper limit on the amount of mobile communication data. Therefore, it is preferable to provide a setting unit for determining whether or not to automatically update the content database 170 so that the user can select it.

ステップS112の判断の結果、コンテンツデータベース170を更新する場合は、コンテンツデータベース170の更新処理スレッドの実行を開始する(ステップS114)。そして、ステップS108に戻る。一方、ステップS112の判断の結果、コンテンツデータベース170を更新しない場合は、そのままステップS108に戻る。   If the content database 170 is updated as a result of the determination in step S112, execution of the update processing thread of the content database 170 is started (step S114). Then, the process returns to step S108. On the other hand, if the content database 170 is not updated as a result of the determination in step S112, the process directly returns to step S108.

<UI処理スレッド(図12)>
上述した図11のステップS104で起動しているメイン・コントローラ110のUI処理スレッドについて、図12を参照しながら説明する。
<UI processing thread (FIG. 12)>
The UI processing thread of the main controller 110 activated in step S104 of FIG. 11 will be described with reference to FIG.

まず、コンテンツデータベース170のartistテーブルを参照して、アーティストリストを得る(ステップS202)。この際のSQL文は図10(a)に示したとおりである。そして、アーティストリストを画面表示部140に表示する(ステップS204)。そして、アーティストが選択されるかを待つ(ステップS206)。あるアーティストが選択された場合には、albumテーブルでartist_idがユーザの選択したアーティストと一致するアルバムを検索して、アルバムリストを得る(ステップS208)。この際のSQL文は図10(b)に示したとおりである。そして、アルバムリストを画面表示部140に表示する(ステップS210)。   First, an artist list is obtained by referring to the artist table of the content database 170 (step S202). The SQL sentence at this time is as shown in FIG. Then, the artist list is displayed on the screen display unit 140 (step S204). Then, it waits for an artist to be selected (step S206). When a certain artist is selected, an album whose artist_id matches the artist selected by the user is searched in the album table to obtain an album list (step S208). The SQL sentence at this time is as shown in FIG. Then, the album list is displayed on the screen display unit 140 (step S210).

ここで、“前の画面に戻る”が選択された場合には(ステップS212)、ステップS202に戻る。“前の画面に戻る”が選択されない場合で、あるアルバムが選択されない場合(ステップS214)は、ステップS212に戻り、あるアルバムが選択された場合には、songテーブルでalbum_idがユーザの選択したアルバムと一致する曲を検索して、曲リストを得る(ステップS216)。この際のSQL文は図10(c)に示したとおりである。そして、曲リストを画面表示部140に表示する(ステップS218)。   If “return to the previous screen” is selected (step S212), the process returns to step S202. If “Return to previous screen” is not selected and a certain album is not selected (step S214), the process returns to step S212. If a certain album is selected, album_id is selected by the user in the song table. Is retrieved to obtain a song list (step S216). The SQL sentence at this time is as shown in FIG. Then, the song list is displayed on the screen display unit 140 (step S218).

“前の画面に戻る”が選択された場合には(ステップS220)、ステップS208に戻る。“前の画面に戻る”が選択されない場合で、ある曲の再生が指示されない場合(ステップS222)は、ステップS220に戻り、ある曲の再生が指示された場合は、選択アルバムと選択曲に基づいて、プレイリスト通知を作成する(ステップS224)。さらに、再生処理スレッドにプレイリスト通知を発行する(ステップS226)。この際のプレイリスト通知内容は図10(d)に示したとおりである。そして、再生処理スレッドに再生開始要求を発行する(ステップS228)。この際の再生開始要求内容は図10(e)に示したとおりである。   When “return to the previous screen” is selected (step S220), the process returns to step S208. If “return to the previous screen” is not selected and playback of a certain song is not instructed (step S222), the process returns to step S220. If playback of a certain song is instructed, based on the selected album and the selected song Then, a playlist notification is created (step S224). Further, a playlist notification is issued to the reproduction processing thread (step S226). The playlist notification contents at this time are as shown in FIG. Then, a reproduction start request is issued to the reproduction processing thread (step S228). The content of the reproduction start request at this time is as shown in FIG.

<再生処理スレッド(図13)>
上述した図11のステップS102で起動しているメイン・コントローラ110の再生処理スレッドについて、図13を参照しながら説明する。
<Reproduction processing thread (FIG. 13)>
The reproduction processing thread of the main controller 110 activated in step S102 of FIG. 11 described above will be described with reference to FIG.

まず、他モジュール/スレッドからのリクエストメッセージを受信する(ステップS302)。リクエストメッセージを受信したかを判断し(ステップS304)、受信しない場合は、ステップS302に戻る。受信した場合は、メッセージ内容を判断する(ステップS306)。メッセージ内容は、「プレイリスト要求」、「再生開始要求」、「再生停止要求」、「コンテンツ再生終了通知」のいずれかであり、メッセージ内容に応じて、以下の処理を行う。   First, a request message from another module / thread is received (step S302). It is determined whether a request message has been received (step S304). If not received, the process returns to step S302. If received, the message content is determined (step S306). The message content is any one of “playlist request”, “reproduction start request”, “reproduction stop request”, and “content reproduction end notification”, and the following processing is performed according to the message content.

メッセージが「プレイリスト通知」である場合、コンテンツキャッシュ管理部190のメインスレッドにプレイリスト通知を発行する(ステップS308)。この際のプレイリスト通知内容は図10(f)に示したとおりである。メッセージが「再生開始要求」である場合、サウンドサービスが提供するサウンド再生APIをコールして、再生対象コンテンツのURLを渡すことによって、コンテンツの再生を開始する(ステップS310)。サウンドサービスはコンテンツキャッシュ管理部に対して、http プロトコルで “GET” リクエストを発行することで、再生対象のコンテンツデータを取得する。この際のコンテンツ要求内容は図10(g)に示したとおりである。メッセージが「再生停止要求」である場合、サウンド再生APIをコールして、コンテンツの再生を停止する(ステップS312)。   If the message is “playlist notification”, a playlist notification is issued to the main thread of the content cache management unit 190 (step S308). The playlist notification contents at this time are as shown in FIG. If the message is a “reproduction start request”, the reproduction of the content is started by calling the sound reproduction API provided by the sound service and passing the URL of the content to be reproduced (step S310). The sound service acquires content data to be played back by issuing a “GET” request to the content cache management unit using the http protocol. The content request contents at this time are as shown in FIG. If the message is “reproduction stop request”, the sound reproduction API is called to stop the reproduction of the content (step S312).

メッセージが「コンテンツ再生終了通知」である場合、プレイリストの全コンテンツの再生が終了したかを判断する(ステップS314)。プレイリストの全コンテンツの再生が終了した場合、ステップS302に戻る。プレイリストの全コンテンツの再生が終了していない場合、再生対象コンテンツを次のコンテンツに変更したプレイリストを作る(ステップS316)。さらに、コンテンツキャッシュ管理部190のメインスレッドにプレイリストを通知し(ステップS318)、サウンド再生APIをコールして、次に再生するコンテンツのURLを渡すことによって、次コンテンツの再生を開始する(ステップS320)。   If the message is a “content reproduction end notification”, it is determined whether reproduction of all contents in the playlist has been completed (step S314). When the reproduction of all the contents of the playlist is completed, the process returns to step S302. If the reproduction of all the contents in the playlist has not been completed, a playlist in which the content to be reproduced is changed to the next content is created (step S316). Further, the play list is notified to the main thread of the content cache management unit 190 (step S318), the sound reproduction API is called, and the URL of the next content to be reproduced is passed to start reproduction of the next content (step S318). S320).

以上、メイン・コントローラ110の動作について説明した。以下、コンテンツキャッシュ管理部190の動作について説明する。   The operation of the main controller 110 has been described above. Hereinafter, the operation of the content cache management unit 190 will be described.

<メインスレッド:図14>
まず、コンテンツキャッシュ管理部190の先読みスレッドの実行を開始する(ステップS402)。この処理については、図15を参照しながら後述する。次に、他モジュール/スレッドからのリクエストメッセージを受信する(ステップS404)。リクエストメッセージを受信しない間は、ステップS404に戻る。リクエストメッセージを受信した場合は、メッセージの内容を判断する(ステップS408)。
<Main thread: Fig. 14>
First, execution of the prefetch thread of the content cache management unit 190 is started (step S402). This process will be described later with reference to FIG. Next, a request message from another module / thread is received (step S404). While the request message is not received, the process returns to step S404. When the request message is received, the content of the message is determined (step S408).

メッセージの内容が「プレイリスト通知」である場合は、プレイリスト通知のsong_list[ ]から第2コンテンツキャッシュL2に存在する曲を取り除き、コンテンツ先読み要求を作成する(ステップS410)。そして、先読みスレッドに対して、コンテンツ先読み要求を発行する(ステップS412)。この際のコンテンツ先読み要求内容は図10(h)に示したとおりである。   If the content of the message is “playlist notification”, the song existing in the second content cache L2 is removed from the song_list [] of the playlist notification, and a content prefetch request is created (step S410). Then, a content prefetch request is issued to the prefetch thread (step S412). The content prefetch request content at this time is as shown in FIG.

一方、メッセージの内容が「コンテンツ要求」である場合は、まずsongテーブル中のidがreq_song_idと一致するレコードに対して、以下の操作を行う(ステップS414)。
play_date2 ← play_date1
play_date1 ← 現在日時
なお、ここで参照しているreq_song_idは、図10(g)のURLに含まれる <req_song_id> の文字列を数値に変換した値のことを意味している。
On the other hand, if the content of the message is “content request”, first, the following operation is performed on the record whose id in the song table matches req_song_id (step S414).
play_date2 ← play_date1
play_date1 ← current date and time Note that req_song_id referred to here means a value obtained by converting a character string of <req_song_id> included in the URL of FIG.

続いて、要求されたコンテンツの全体が第2コンテンツキャッシュL2に存在するかを判断する(ステップS416)。そして、要求されたコンテンツの全体が第2コンテンツキャッシュL2に存在する場合には、キャッシュ再生スレッドの実行を開始する(ステップS418)。この動作については、図18を参照しながら後述する。そして、ステップS404に戻る。一方、要求されたコンテンツの全体が第2コンテンツキャッシュL2に存在しない場合には、ダウンロード/オンザフライ再生スレッドの実行を開始する(ステップS420)。この動作については、図19を参照しながら後述する。そして、ステップS404に戻る。   Subsequently, it is determined whether the entire requested content exists in the second content cache L2 (step S416). If the requested content is entirely present in the second content cache L2, the execution of the cache playback thread is started (step S418). This operation will be described later with reference to FIG. Then, the process returns to step S404. On the other hand, when the entire requested content does not exist in the second content cache L2, the execution of the download / on-the-fly playback thread is started (step S420). This operation will be described later with reference to FIG. Then, the process returns to step S404.

<先読みスレッド:図15>
上述した図11のステップS402で起動している先読みスレッドについて、図15を参照しながら説明する。まず、他モジュール/スレッドからのリクエストメッセージを受信する(ステップS502)。そして、リクエストメッセージを受信したかを判断する(ステップS504)。
<Prefetch thread: FIG. 15>
The prefetch thread activated in step S402 in FIG. 11 described above will be described with reference to FIG. First, a request message from another module / thread is received (step S502). Then, it is determined whether a request message has been received (step S504).

ステップS504でリクエストメッセージを受信した場合は、メッセージ内容を判断する(ステップS506)。メッセージ内容が「ダウンロード完了通知」である場合は、ダウンロードしたデータをchunk_id = cur_chunk_idのチャンクバッファに書き込む(ステップS508)。この動作は、図6、図7の図中(1)の動作に対応するものである。そして、後述するステップS526に進む。   If a request message is received in step S504, the message content is determined (step S506). If the message content is “download completion notification”, the downloaded data is written to the chunk buffer of chunk_id = cur_chunk_id (step S508). This operation corresponds to the operation (1) in FIGS. And it progresses to step S526 mentioned later.

一方、メッセージ内容が「コンテンツ先読み要求」である場合は、まず、以下の処理を行い、次にダウンロードする曲のsong_list[ ] 中のインデックス値をnext_song_indexにセットする(ステップS510)。
next_song_index ← play_index
next_chunk_no ← 1
そして、コンテンツのチャンクデータをダウンロード中かを判断する(ステップS512)。ダウンロード中でない場合は、後述するステップS526に進む。ダウンロード中である場合は、先読み対象のコンテンツに変更があったかどうか確認するために、まず次ダウンロードチャンク決定処理を行う(ステップS514)。この処理については、図16を参照しながら後述する。
On the other hand, if the message content is “content prefetch request”, first, the following processing is performed, and the index value in song_list [] of the next song to be downloaded is set to next_song_index (step S510).
next_song_index ← play_index
next_chunk_no ← 1
Then, it is determined whether the chunk data of the content is being downloaded (step S512). If not being downloaded, the process proceeds to step S526 described later. If the download is in progress, the next download chunk determination process is first performed in order to confirm whether or not the prefetched content has been changed (step S514). This process will be described later with reference to FIG.

次に、next_song_id = cur_song_idかを判断し(ステップS516)、next_song_id = cur_song_idである場合は、さらにnext_chunk_id = cur_chunk_idかを判断し(ステップS518)、next_chunk_id = cur_chunk_idである場合は、先読み対象のコンテンツに変更がなかったものと判断してステップS502に戻る。ステップS516でnext_song_id = cur_song_idでない場合、又は、ステップS518でnext_chunk_id = cur_chunk_idでない場合は先読み対象のコンテンツに変更があったものと判断し、チャンクデータのダウンロードを中断する(ステップS520)。そして、ダウンロード中の中途半端なコンテンツデータが書き込まれている可能性があるchunk_id = cur_chunk_idのチャンクバッファをクリアする(ステップS522)。そして、後述するステップS526に進む。   Next, it is determined whether next_song_id = cur_song_id (step S516). If next_song_id = cur_song_id, it is further determined whether next_chunk_id = cur_chunk_id (step S518). It is determined that there is no error, and the process returns to step S502. If next_song_id = cur_song_id is not satisfied in step S516, or if next_chunk_id = cur_chunk_id is not satisfied in step S518, it is determined that the prefetched content has been changed, and the chunk data download is interrupted (step S520). Then, the chunk buffer of chunk_id = cur_chunk_id in which halfway content data being downloaded may be written is cleared (step S522). And it progresses to step S526 mentioned later.

以上、ステップS504でリクエストメッセージを受信した場合について説明した。一方、ステップS504で、リクエストメッセージを受信しない場合は、チャンクデータのダウンロード中かを判断する(ステップS524)。チャンクデータのダウンロード中の場合は、ステップS502に戻る。チャンクデータのダウンロード中でない場合は、以下のステップS526に進む。   The case where the request message is received in step S504 has been described above. On the other hand, if no request message is received in step S504, it is determined whether chunk data is being downloaded (step S524). If the chunk data is being downloaded, the process returns to step S502. If the chunk data is not being downloaded, the process proceeds to step S526 below.

ステップS526では、次ダウンロードチャンク決定処理を行う(ステップS526)。この処理については、図16を参照しながら後述する。そして、ダウンロードするべきチャンクがあるかを判断する(ステップS528)。ダウンロードするべきチャンクがない場合は、ステップS502に戻る。ダウンロードするべきチャンクがある場合は、空きチャンクバッファ検索処理を行う(ステップS530)。この処理については、図17を参照しながら後述する。   In step S526, next download chunk determination processing is performed (step S526). This process will be described later with reference to FIG. Then, it is determined whether there is a chunk to be downloaded (step S528). If there is no chunk to be downloaded, the process returns to step S502. If there is a chunk to be downloaded, an empty chunk buffer search process is performed (step S530). This process will be described later with reference to FIG.

続いて、空きチャンクバッファが見つかったかどうかを判断する(ステップS532)。空きチャンクバッファが見つからなかった場合は、ステップS502に戻る。空きチャンクバッファが見つかった場合は、チャンクデータのダウンロードを開始する(ステップS534)。この際のダウンロード要求内容は図10(j)に示したとおりである。そして、次の処理を行い(ステップS536)、現在ダウンロード中のコンテンツのsong_idとchunk_noをcur_song_id/cur_chunk_noに保存しておく。
cur_song_id ← next_song_id
cur_chunk_no ← next_chunk_no
Subsequently, it is determined whether an empty chunk buffer has been found (step S532). If no empty chunk buffer is found, the process returns to step S502. If an empty chunk buffer is found, downloading of chunk data is started (step S534). The download request contents at this time are as shown in FIG. Then, the following processing is performed (step S536), and song_id and chunk_no of the currently downloaded content are stored in cur_song_id / cur_chunk_no.
cur_song_id ← next_song_id
cur_chunk_no ← next_chunk_no

<次ダウンロードチャンク決定処理:図16>
上記ステップS514、ステップS526から呼び出している次ダウンロードチャンク決定処理のサブルーチンについて、図16を参照しながら説明する。
<Next download chunk determination processing: FIG. 16>
The subroutine of the next download chunk determination process called from steps S514 and S526 will be described with reference to FIG.

まず、next_song_id ← song_list[next_song_index] とすることにより、次にダウンロードする曲のsong_idをnext_song_idにセットする(ステップS602)。そして、L1キャッシュ管理テーブル162を検索して、song_id = next_song_id, chunk_no = next_chunk_noの条件を満たすチャンクが存在するかどうかを検索する(ステップS604)。なお、ここで参照しているnext_song_indexとは、ステップS510で値を設定したnext_song_index の事を指している。またsong_list[ ] は図10(h)のパラメータsong_list[ ] の事を指している。   First, by setting next_song_id <-song_list [next_song_index], the song_id of the next downloaded song is set to next_song_id (step S602). Then, the L1 cache management table 162 is searched to search for a chunk satisfying the conditions of song_id = next_song_id, chunk_no = next_chunk_no (step S604). The next_song_index referred to here refers to the next_song_index set in step S510. Moreover, song_list [] indicates the parameter song_list [] in FIG.

続いて、条件に合ったチャンクが存在するかどうかを判断する(ステップS606)。チャンクが存在しなかった場合には、次にダウンロードするべきチャンクはnext_song_idとnext_chunk_noに対応するチャンクであると判断して、このサブルーチンから元のステップ(ステップS514又はステップS526)に戻る。もしチャンクが存在した場合には、同じコンテンツの次のチャンクに進めるために、chunk_no ← chunk_no + 1とする(ステップS608)。   Subsequently, it is determined whether there is a chunk that meets the condition (step S606). If the chunk does not exist, it is determined that the next chunk to be downloaded is a chunk corresponding to next_song_id and next_chunk_no, and the process returns to the original step (step S514 or step S526) from this subroutine. If a chunk exists, chunk_no ← chunk_no + 1 is set to advance to the next chunk of the same content (step S608).

そして、コンテンツの終端に達したかどうかを判断する(ステップS610)。コンテンツの終端に達していない場合には、ステップS604に戻る。コンテンツの終端に達した場合には、プレイリスト中の次に再生するコンテンツに進めるために、以下の処理を行う(ステップS612)。
next_song_index ← next_song_index + 1
next_chunk_no ← 1
Then, it is determined whether or not the end of the content has been reached (step S610). If the end of content has not been reached, the process returns to step S604. When the end of the content is reached, the following processing is performed in order to advance to the next content to be reproduced in the playlist (step S612).
next_song_index ← next_song_index + 1
next_chunk_no ← 1

そして、song_list[ ]に次の曲があるかを判断する(ステップS614)。次の曲がある場合は、ステップS602に戻る。もし次の曲がない場合は、これ以上ダウンロードするべきチャンクが無いと判断して、次ダウンロードチャンク決定処理の実行結果としてnext_song_id = 0を返す(ステップS616)。   Then, it is determined whether there is a next song in song_list [] (step S614). If there is a next song, the process returns to step S602. If there is no next song, it is determined that there are no more chunks to be downloaded, and next_song_id = 0 is returned as the execution result of the next download chunk determination process (step S616).

<空きチャンクバッファ検索処理:図17>
上記ステップS530から呼び出している空きチャンクバッファ検索処理のサブルーチンについて、図17を参照しながら説明する。
<Free chunk buffer search processing: FIG. 17>
A subroutine of empty chunk buffer search processing called from step S530 will be described with reference to FIG.

まず、L1キャッシュ管理テーブル162の中から、未使用のチャンクバッファを探す(ステップS702)。そして、未使用のチャンクバッファがあるかどうかを判断する(ステップS704)。未使用のチャンクバッファがある場合は、発見した未使用のチャンクバッファのchunk_idを返す(ステップS706)。そして、サブルーチンを終了し元のステップ(ステップS530)に戻る。   First, an unused chunk buffer is searched from the L1 cache management table 162 (step S702). Then, it is determined whether there is an unused chunk buffer (step S704). If there is an unused chunk buffer, chunk_id of the found unused chunk buffer is returned (step S706). Then, the subroutine is terminated and the process returns to the original step (step S530).

一方、ステップS704で未使用のチャンクバッファが無い場合は、L1キャッシュ管理テーブル162の中から、先読みコンテンツリストに含まれていないコンテンツに属すチャンクを抽出して、該当するチャンクバッファのchunk_idをchunk_id_list[ ]の配列に格納する(ステップS708)。そして、chunk_id_list[ ]は空かどうかを判断する(ステップS710)。そして、chunk_id_list[ ]が空でない場合は、後述するステップS728に進む。   On the other hand, if there is no unused chunk buffer in step S704, the chunk belonging to the content not included in the prefetched content list is extracted from the L1 cache management table 162, and the chunk_id of the corresponding chunk buffer is chunk_id_list [ ] (Step S708). Then, it is determined whether chunk_id_list [] is empty (step S710). If chunk_id_list [] is not empty, the process proceeds to step S728 described later.

ステップS710でchunk_id_list[ ]が空の場合は、L1キャッシュ管理テーブル162の中から、再生済みのコンテンツに属すチャンクを抽出して、該当するチャンクバッファのchunk_idをchunk_id_list[ ]の配列に格納する(ステップS712)。そして、chunk_id_list[ ]は空かどうかを判断する(ステップS714)。そして、chunk_id_list[ ]が空でない場合は、後述するステップS730に進む。なお、ここで言う再生済みのコンテンツとは、図10(h)の例では次に再生する曲が2曲目(play_index=2)であるため、song_list[ ] 中の1曲目の曲(song_id=1)のみが再生済みのコンテンツに該当する。   If chunk_id_list [] is empty in step S710, the chunk belonging to the reproduced content is extracted from the L1 cache management table 162, and the chunk_id of the corresponding chunk buffer is stored in the chunk_id_list [] array (step S710). S712). Then, it is determined whether chunk_id_list [] is empty (step S714). If chunk_id_list [] is not empty, the process proceeds to step S730 to be described later. In the example of FIG. 10 (h), the reproduced content here is the second song (play_index = 2) to be reproduced next, so the first song (song_id = 1) in song_list [] ) Only applies to played content.

一方、ステップS714でchunk_id_list[ ]が空の場合は、L1キャッシュ管理テーブル162の中から、未再生のコンテンツに属し、次ダウンロードチャンクよりも再生順が後のチャンクを抽出して、該当するチャンクバッファのchunk_idをchunk_id_list[ ]の配列に格納する(ステップS716)。そして、chunk_id_list[ ]は空かどうかを判断する(ステップS718)。chunk_id_list[ ]が空でない場合は、後述するステップS730に進む。なお、ここで言う未再生のコンテンツとは、図10(h)の例では次に再生する曲が2曲目(play_index=2)であるため、song_list[ ] 中の3曲目以降の全ての曲が未再生のコンテンツに該当する。また次にダウンロードするチャンクがどれであるかは、次にダウンロードする曲のsong_idを保持しているnext_song_idと、次にダウンロードするチャンク番号を保持しているnext_chunk_noを参照することにより知ることができる。   On the other hand, if chunk_id_list [] is empty in step S714, a chunk belonging to unplayed content and having a playback order after the next downloaded chunk is extracted from the L1 cache management table 162, and the corresponding chunk buffer is extracted. Are stored in the array of chunk_id_list [] (step S716). Then, it is determined whether chunk_id_list [] is empty (step S718). If chunk_id_list [] is not empty, the process proceeds to step S730 to be described later. In the example of FIG. 10 (h), the unreproduced content mentioned here is the second song (play_index = 2) to be reproduced next, so all the songs after the third song in song_list [] Corresponds to unplayed content. Further, it is possible to know which chunk is to be downloaded next by referring to next_song_id holding the song_id of the song to be downloaded next and next_chunk_no holding the chunk number to be downloaded next.

ステップS718でchunk_id_list[ ]が空の場合は、次ダウンロードチャンクが再生中のコンテンツかどうかを判断する。この判断は、具体的にはnext_song_idとreq_song_idの値が等しいかどうかによって判定することができる。なおreq_song_idはステップS414で取得した値に対応している(ステップS720)。次ダウンロードチャンクが再生中のコンテンツである場合は、L1キャッシュ管理テーブル162の中から、再生中のコンテンツに属し、usedフィールドが“1”のチャンクを抽出して、該当するチャンクバッファのchunk_idをchunk_id_list[ ]の配列に格納する(ステップS722)。そして、chunk_id_list[ ]は空かどうかを判断する(ステップS724)。chunk_id_list[ ]が空でない場合は、後述するステップS730に進む。   If chunk_id_list [] is empty in step S718, it is determined whether the next download chunk is a content being played back. Specifically, this determination can be made based on whether the values of next_song_id and req_song_id are equal. Note that req_song_id corresponds to the value acquired in step S414 (step S720). If the next downloaded chunk is the content being played back, the chunk that belongs to the content being played back and whose used field is “1” is extracted from the L1 cache management table 162, and the chunk_id of the corresponding chunk buffer is chunk_id_list. It stores in the array of [] (step S722). Then, it is determined whether or not chunk_id_list [] is empty (step S724). If chunk_id_list [] is not empty, the process proceeds to step S730 to be described later.

上記ステップS720で次ダウンロードチャンクが再生中のコンテンツでない場合又は上記ステップS724でchunk_id_list[ ]が空の場合は、空きチャンクの検索結果として“0”(空きチャンクバッファ無し)を返す(ステップS726)。そして、サブルーチンを終了し元のステップ(ステップS530)に戻る。   If the next downloaded chunk is not the content being played back in step S720 or if chunk_id_list [] is empty in step S724, “0” (no empty chunk buffer) is returned as the search result of the empty chunk (step S726). Then, the subroutine is terminated and the process returns to the original step (step S530).

以上、ステップS708/S712/S716/S722のいずれの検索時にも、利用可能なチャンクバッファで見つからなかった場合について説明した。一方、ステップS708/S712/S716/S722のいずれかの検索時に、利用可能なチャンクバッファで見つかった場合には、以下の動作を行う。   As described above, the case has been described in which no search is made in the available chunk buffer at the time of any of the search in steps S708 / S712 / S716 / S722. On the other hand, if any of the available chunk buffers is found during the search in any of steps S708 / S712 / S716 / S722, the following operation is performed.

まず、ステップS708の検索時に利用可能なチャンクバッファで見つかった場合には、chunk_id_list[ ]の中で、write_dateが最も古いチャンクを探し、そのsong_idをtarget_song_idにセットする(ステップS728)。これによりL1キャッシュ内にキャッシュデータが存在するコンテンツの中で、最も過去に再生したコンテンツのsong_id がtarget_song_idにセットされる。そして、後述するステップS734に進む。   First, if a chunk buffer that can be used at the time of the search in step S708 is found, the chunk_id_list [] is searched for the chunk with the oldest write_date, and its song_id is set to target_song_id (step S728). As a result, among the contents having cache data in the L1 cache, the song_id of the most recently reproduced content is set as the target_song_id. And it progresses to step S734 mentioned later.

また、ステップS712/S716/S722の検索時に利用可能なチャンクバッファで見つかった場合には、L1キャッシュ管理テーブルを参照して chunk_id_list[ ] に収められている各chunk_idの値をsong_idに変換して重複データを削除した結果をsong_id_list[] に格納する(ステップS730)。そして、song_id_list[] の中からダウンロード中のコンテンツからダウンロード順が最も離れているsong_idをtarget_song_idにセットする(ステップS732)。そして、ステップS734に進む。   In addition, when a chunk buffer that can be used at the time of the search in steps S712 / S716 / S722 is found, the chunk_id value stored in chunk_id_list [] is converted to song_id by referring to the L1 cache management table and duplicated. The result of deleting the data is stored in song_id_list [] (step S730). Then, the song_id whose download order is farthest from the content being downloaded from the song_id_list [] is set to the target_song_id (step S732). Then, the process proceeds to step S734.

ステップS734では、chunk_id_list[ ]の中からsong_idがtarget_song_idに一致するチャンクを抽出し、その中でchunk_noが最も大きなチャンクのchunk_idをfree_chunk_idにセットする(ステップS734)。これにより、L1キャッシュ内において最も過去に再生したコンテンツを構成するチャンクデータの中で、コンテンツ中の最後端のチャンクの chunk_idがfree_chunk_idにセットされることになる。   In step S734, chunks whose song_id matches target_song_id are extracted from chunk_id_list [], and the chunk_id of the chunk having the largest chunk_no is set to free_chunk_id (step S734). As a result, among the chunk data constituting the most recently played content in the L1 cache, the chunk_id of the last chunk in the content is set to free_chunk_id.

次に、L1キャッシュ管理テーブルの中で、free_chunk_idに対応するレコードをクリアして(ステップS736)、さらにL1キャッシュチャンクバッファの中でfree_chunk_idに対応するチャンクバッファをクリアすることで、見つけたチャンクバッファを空きチャンクとして利用できるようにする(ステップS738)。次に、空きチャンクの検索結果としてfree_chunk_idを返す(ステップS740)。そして、サブルーチンを終了し、元のステップ(ステップS530)に戻る。   Next, the record corresponding to free_chunk_id is cleared in the L1 cache management table (step S736), and the chunk buffer corresponding to free_chunk_id is further cleared in the L1 cache chunk buffer. It can be used as an empty chunk (step S738). Next, free_chunk_id is returned as an empty chunk search result (step S740). Then, the subroutine is terminated, and the process returns to the original step (step S530).

このように空きチャンクバッファの検索処理を順次行うことにより、結果的に以下の優先順位で空きチャンクバッファの検索が行われることになる。
優先度1:未使用のチャンクバッファ
優先度2:先読みコンテンツリストに含まれていないコンテンツに対応するチャンクバッファ
優先度3:先読みコンテンツリストに含まれている再生済みのコンテンツに対応するチャンクバッファ
優先度4:先読みコンテンツリストに含まれている未再生のコンテンツに対応するチャンクバッファの中で、次ダウンロードチャンクよりも再生順が後のチャンクバッファ
優先度5:再生中のコンテンツに対応するチャンクバッファの中で、コンテンツ要求に対する応答としてチャンクデータを送出済みのチャンクバッファ(但し優先度5に対する検索は、次ダウンロードチャンクが現在再生中のコンテンツの場合のみ行う)
By sequentially performing the empty chunk buffer search process in this way, the empty chunk buffer is searched as a result of the following priority.
Priority 1: Unused chunk buffer Priority 2: Chunk buffer corresponding to content not included in the pre-read content list Priority 3: Chunk buffer corresponding to played content included in the pre-read content list Priority 4: Chunk buffer corresponding to unplayed content included in the pre-read content list, the chunk buffer having the playback order after the next downloaded chunk Priority 5: In the chunk buffer corresponding to the content being played back Then, the chunk buffer to which chunk data has been sent as a response to the content request (however, the search for priority 5 is performed only when the next downloaded chunk is currently being played back)

ここで優先度5の判定は、曲の長さが非常に長く、1曲分のコンテンツデータ全体がL1キャッシュに収まりきらないような場合に、先読みしたコンテンツデータがL1キャッシュチャンクバッファを埋めつくしてしまい、それ以上コンテンツの先読みが行えなくなり、結果としてL1キャッシュのサイズを越えるコンテンツが再生不能となってしまうことを防止するために用意されたものである。   Here, the priority 5 is determined when the length of the song is very long and the entire content data for one song cannot be stored in the L1 cache, the prefetched content data fills the L1 cache chunk buffer. In other words, the content is prepared in order to prevent the content from being prefetched any further, and as a result, the content exceeding the size of the L1 cache cannot be reproduced.

<キャッシュ再生スレッド:図18>
上記ステップS418で説明したキャッシュ再生スレッドについて、図18を参照しながら説明する。要求されたコンテンツを第2コンテンツキャッシュL2から読み出して、コンテンツ要求に対する応答として送出する(ステップS812)。この動作は、図8の図中(4)の動作に対応する。
<Cache playback thread: FIG. 18>
The cache playback thread described in step S418 will be described with reference to FIG. The requested content is read from the second content cache L2, and sent as a response to the content request (step S812). This operation corresponds to the operation (4) in FIG.

<ダウンロード/オンザフライ再生スレッド:図19>
上記ステップS420で説明したダウンロード/オンザフライ再生スレッドについて、図19を参照しながら説明する。まず、play_chunk_no ← 1とする(ステップS902)。そして、play_chunk_no = 1かどうかを判断する(ステップS904)。play_chunk_no = 1でない場合は、後述するステップS910に進む。play_chunk_no = 1である場合は、req_song_idに対応するデータがL2−Hキャッシュ(図4参照)に存在するかどうかを判断する(ステップS906)。req_song_idに対応するデータがL2−Hキャッシュに存在しない場合は、後述するステップS910に進む。req_song_idに対応するデータがL2−Hキャッシュに存在する場合は、L2−Hキャッシュからコンテンツ先頭部分のデータを読み出して、コンテンツ要求に対する応答として送出する(ステップS908)。そして、後述するステップS922に進む。
<Download / on-the-fly playback thread: Fig. 19>
The download / on-the-fly playback thread described in step S420 will be described with reference to FIG. First, play_chunk_no ← 1 is set (step S902). Then, it is determined whether or not play_chunk_no = 1 (step S904). If play_chunk_no = 1 is not true, the process proceeds to step S910 described later. If play_chunk_no = 1, it is determined whether data corresponding to req_song_id exists in the L2-H cache (see FIG. 4) (step S906). When the data corresponding to req_song_id does not exist in the L2-H cache, the process proceeds to step S910 described later. If the data corresponding to req_song_id exists in the L2-H cache, the data at the beginning of the content is read from the L2-H cache and sent as a response to the content request (step S908). And it progresses to step S922 mentioned later.

上述したステップS910では、L1キャッシュ管理テーブル162を検索して、song_id = req_song_id、chunk_no = play_chunk_noのチャンクを探し、見つけたchunk_idをplay_chunk_idにセットする(ステップS910)。そして、チャンクが見つかったかどうかを判断する(ステップS912)。もしチャンクが見つからなかった場合には、ステップS910に戻る。チャンクが見つかった場合は、play_chunk_no = 1かどうかを判断する(ステップS914)。   In step S910 described above, the L1 cache management table 162 is searched to find a chunk of song_id = req_song_id, chunk_no = play_chunk_no, and the found chunk_id is set to play_chunk_id (step S910). And it is judged whether the chunk was found (step S912). If no chunk is found, the process returns to step S910. If a chunk is found, it is determined whether play_chunk_no = 1 (step S914).

play_chunk_no = 1でない場合は、ステップS918に進む。play_chunk_no = 1の場合は、L2−Hキャッシュへの書き込み処理を行う(ステップS916)。この動作については、図20を参照しながら後述する。そして、ステップS918に進む。ステップS918では、play_chunk_idに対応するチャンクデータを、コンテンツ要求に対する応答として送出する(ステップS918)。この動作は、図6、図7の図中(2)の動作に対応する。そして、L1キャッシュ管理テーブル162の中でplay_chunk_idに対応するレコードのusedフィールドを1にセットする(ステップS920)。   If play_chunk_no = 1 is not true, the process proceeds to step S918. If play_chunk_no = 1, a write process to the L2-H cache is performed (step S916). This operation will be described later with reference to FIG. Then, the process proceeds to step S918. In step S918, chunk data corresponding to play_chunk_id is sent as a response to the content request (step S918). This operation corresponds to the operation (2) in FIGS. Then, the used field of the record corresponding to play_chunk_id in the L1 cache management table 162 is set to 1 (step S920).

上述したS922では、応答データの送出時にエラーが発生したかを判断する(ステップS922)。エラーが発生した場合は、サブルーチンを終了して元のステップに戻る。エラーが発生していない場合は、chunk_no ← chunk_no + 1とする(ステップS924)。そして、1曲分の全チャンクの送出が完了したかを判断する(ステップS926)。1曲分の全チャンクの送出が完了していない場合は、ステップS904に戻る。1曲分の全チャンクの送出が完了した場合は、L2−Eキャッシュ書き込み処理を行う(ステップS928)。この動作については、図21を参照しながら後述する。そして、サブルーチンを終了して元のステップに戻る。   In S922 described above, it is determined whether an error has occurred during transmission of the response data (step S922). If an error occurs, the subroutine is terminated and the original step is returned. If no error has occurred, chunk_no ← chunk_no + 1 is set (step S924). Then, it is determined whether transmission of all chunks for one song has been completed (step S926). If transmission of all chunks for one song has not been completed, the process returns to step S904. When transmission of all chunks for one song is completed, L2-E cache write processing is performed (step S928). This operation will be described later with reference to FIG. Then, the subroutine ends and the process returns to the original step.

なお、ダウンロード再生動作とオンザフライ再生動作の切り替えは、L2−Hキャッシュ書き込み処理又はL2−Eキャッシュ書き込み処理において、コンテンツサーバからダウンロードしたコンテンツデータを第1コンテンツキャッシュL1から第2コンテンツキャッシュL2にコピーするかどうかによって、ダウンロード再生とオンザフライ再生のいずれかが選択される。   The switching between the download reproduction operation and the on-the-fly reproduction operation is performed by copying the content data downloaded from the content server from the first content cache L1 to the second content cache L2 in the L2-H cache write processing or the L2-E cache write processing. Depending on whether or not download playback or on-the-fly playback is selected.

<L2−Hキャッシュ書き込み処理:図20>
図19のステップS916から呼び出しているL2−Hキャッシュ書き込み処理のサブルーチンについて、図20を参照しながら説明する。まず、再生中コンテンツの先頭チャンクがL2−Hキャッシュの空き容量に収まるかを判断する(ステップS1002)。空き容量に収まる場合には、ステップS1016に進む。空き容量に収まらない場合は、以下の処理を行う。
<L2-H cache write processing: FIG. 20>
The subroutine of the L2-H cache write process called from step S916 in FIG. 19 will be described with reference to FIG. First, it is determined whether the first chunk of the content being played fits in the free space of the L2-H cache (step S1002). If it falls within the free space, the process proceeds to step S1016. If it does not fit in the free space, the following processing is performed.

まず、再生中のコンテンツの再生頻度値(又は再生確率予想値)(score)を算出する(ステップS1004)。この動作については、図22を参照しながら後述する。そして、L2−Hキャッシュに存在する全コンテンツの中で、再生中のコンテンツよりもscoreが低い全てのコンテンツを抽出して、抽出したコンテンツのsong_id/score/filesizeの組をdelete_candidate[ ]の配列に格納する(ステップS1006)。次に、delete_candidate[ ]の内容をscoreの低い順にソートする(ステップS1008)。そして、delete_candidate[ ]の先頭から何曲分を削除すれば、再生中のコンテンツの先頭部分をL2−Hキャッシュに保存可能なのかを求め、削除が必要なコンテンツのsong_idをdelete_song_id[ ]に格納する(ステップS1010)。   First, the reproduction frequency value (or reproduction probability expected value) (score) of the content being reproduced is calculated (step S1004). This operation will be described later with reference to FIG. Then, out of all the contents existing in the L2-H cache, all contents having a score lower than the content being reproduced are extracted, and the song_id / score / filesize pair of the extracted contents is stored in the array of delete_candidate []. Store (step S1006). Next, the contents of delete_candidate [] are sorted in ascending order of score (step S1008). Then, it is determined how many songs from the beginning of delete_candidate [] can be deleted and the beginning of the content being reproduced can be stored in the L2-H cache, and the song_id of the content that needs to be deleted is stored in delete_song_id [] (Step S1010).

次に、delete_candidate[ ]の全曲を削除してもL2−Hキャッシュに収まらないかを判断する(ステップS1012)。L2−Hキャッシュに収まらない場合は、サブルーチンを終了して、元のステップ(ステップS916)に戻る。L2−Hキャッシュに収まる場合は、delete_song_id[ ]で指定されるコンテンツをL2−Hキャッシュから削除する(ステップS1014)。そして、ステップS1016に進む。   Next, it is determined whether even if all songs of delete_candidate [] are deleted, they do not fit in the L2-H cache (step S1012). If it does not fit in the L2-H cache, the subroutine ends and the process returns to the original step (step S916). If it fits in the L2-H cache, the content specified by delete_song_id [] is deleted from the L2-H cache (step S1014). Then, the process proceeds to step S1016.

上述したステップS1016では、第1コンテンツキャッシュL1から再生中のコンテンツの先頭チャンクのみを読み出して、L2−Hキャッシュに書き込む(ステップS1016)。この動作は、図7の図中(3)の動作に対応する。最終的にL2−Hキャッシュ書き込み処理においてステップS1016を実行した場合には、ダウンロード再生動作を行ったことになる。あるいは逆にステップS1016を実行しなかった場合には、オンザフライ再生動作を行ったことになる。   In step S1016 described above, only the first chunk of the content being reproduced is read from the first content cache L1 and written to the L2-H cache (step S1016). This operation corresponds to the operation (3) in FIG. When step S1016 is finally executed in the L2-H cache write process, the download reproduction operation is performed. Conversely, if step S1016 is not executed, an on-the-fly reproduction operation is performed.

<L2−Eキャッシュ書き込み処理:図21>
図19のステップS928から呼び出しているL2−Eキャッシュ書き込み処理のサブルーチンについて、図21を参照しながら説明する。まず、再生中のコンテンツの全体がL2−Eキャッシュの空き容量に収まるかを判断する(ステップS1102)。空き容量に収まる場合には、ステップS1116に進む。空き容量に収まらない場合は、以下の処理を行う。
<L2-E cache write processing: FIG. 21>
The subroutine of the L2-E cache write process called from step S928 in FIG. 19 will be described with reference to FIG. First, it is determined whether the entire content being played fits in the free capacity of the L2-E cache (step S1102). If it falls within the free space, the process proceeds to step S1116. If it does not fit in the free space, the following processing is performed.

まず、再生中のコンテンツの再生頻度値(又は再生確率予想値)(score)を算出する(ステップS1104)。この動作については、図22を参照しながら後述する。そして、L2−Eキャッシュに存在する全コンテンツの中で、再生中のコンテンツよりもscoreが低い全てのコンテンツを抽出して、抽出したコンテンツのsong_id/score/filesizeの組をdelete_candidate[ ]の配列に格納する(ステップS1106)。次に、delete_candidate[ ]の内容をscoreの低い順にソートする(ステップS1108)。そして、delete_candidate[ ]の先頭から何曲分を削除すれば、再生中のコンテンツをL2−Eキャッシュに保存可能なのかを求め、削除が必要なコンテンツのsong_idをdelete_song_id[ ]に格納する(ステップS1108)。   First, the reproduction frequency value (or reproduction probability expected value) (score) of the content being reproduced is calculated (step S1104). This operation will be described later with reference to FIG. Then, out of all the contents existing in the L2-E cache, all contents whose score is lower than the contents being reproduced are extracted, and the song_id / score / filesize pair of the extracted contents is stored in the array of delete_candidate []. Store (step S1106). Next, the contents of delete_candidate [] are sorted in ascending order of score (step S1108). Then, it is determined how many songs are deleted from the beginning of delete_candidate [] and the content being reproduced can be stored in the L2-E cache, and the song_id of the content that needs to be deleted is stored in delete_song_id [] (step S1108). ).

次に、delete_candidate[ ]の全曲を削除してもL2−Eキャッシュに収まらないかを判断する(ステップS1112)。L2−Eキャッシュに収まらない場合は、サブルーチンを終了して、元のステップ(ステップS928)に戻る。L2−Eキャッシュに収まる場合は、delete_song_id[ ]で指定されるコンテンツをL2−Eキャッシュから削除する(ステップS1114)。そして、ステップS1116に進む。   Next, it is determined whether or not all songs in delete_candidate [] can be stored in the L2-E cache even if they are deleted (step S1112). If it does not fit in the L2-E cache, the subroutine ends and the process returns to the original step (step S928). If it fits in the L2-E cache, the content specified by delete_song_id [] is deleted from the L2-E cache (step S1114). Then, the process proceeds to step S1116.

上述したステップS1116では、第1コンテンツキャッシュL1から再生中のコンテンツに対応する全てのチャンクデータを読み出し、それらを結合したデータをL2−Eキャッシュに書き込む(ステップS1116)。この動作は、図7の図中(3)の動作に対応する。最終的にL2−Eキャッシュ書き込み処理においてステップS1116を実行した場合には、ダウンロード再生動作を行ったことになる。あるいは逆にステップS1116を実行しなかった場合には、オンザフライ再生動作を行ったことになる。   In step S1116 described above, all chunk data corresponding to the content being reproduced is read from the first content cache L1, and the combined data is written in the L2-E cache (step S1116). This operation corresponds to the operation (3) in FIG. When step S1116 is finally executed in the L2-E cache write process, the download reproduction operation is performed. Conversely, if step S1116 is not executed, the on-the-fly reproduction operation is performed.

<コンテンツ再生頻度値の算出処理:図22>
上述したコンテンツ再生頻度値の算出処理のサブルーチンについて、図22を参照しながら説明する。まず、now_date に現在日時をセットする(ステップS1202)。
now_date ← 現在日時
そして、play_date2に日付情報が存在するかを判断する(ステップS1204)。play_date2に日付情報が存在しない場合には、score ← -1とする(ステップS1206)。そして、後述するステップS1212に進む。
<Content Reproduction Frequency Value Calculation Processing: FIG. 22>
A subroutine of the above-described content reproduction frequency value calculation process will be described with reference to FIG. First, the current date is set in now_date (step S1202).
now_date ← current date Then, it is determined whether date information exists in play_date2 (step S1204). If date information does not exist in play_date2, score ← −1 is set (step S1206). And it progresses to step S1212 mentioned later.

一方、play_date2に日付情報が存在する場合は、次の処理を行う(ステップS1208、S1210)。
diff ← max(play_date1- play_date2, now_date - play_date1)
score ← max(365 - diff, 0) / 365 * 100
そして、ステップS1212に進む。
On the other hand, if date information exists in play_date2, the following processing is performed (steps S1208 and S1210).
diff ← max (play_date1- play_date2, now_date-play_date1)
score ← max (365-diff, 0) / 365 * 100
Then, the process proceeds to step S1212.

ステップS1212では、scoreの値を返す(ステップS1212)。そして、サブルーチンを終了し、元のステップに戻る。   In step S1212, the score value is returned (step S1212). Then, the subroutine ends and the process returns to the original step.

<コンテンツ再生頻度値更新処理スレッド:図23>
上述した図11のステップS110で起動しているコンテンツ再生頻度値更新処理スレッドについて、図23を参照しながら説明する。まず、id ← 1とする(ステップS1302)。そして、L2−Hキャッシュ管理テーブルからidに対応するレコードを取り出して、そのsong_idを得る(ステップS1304)。
<Content reproduction frequency value update processing thread: FIG. 23>
The content reproduction frequency value update processing thread activated in step S110 of FIG. 11 described above will be described with reference to FIG. First, id ← 1 is set (step S1302). Then, the record corresponding to id is extracted from the L2-H cache management table, and its song_id is obtained (step S1304).

次に、song_idが空かを判断する(ステップS1306)。song_idが空の場合は、後述するステップS1316に進む。song_idが空でない場合は、コンテンツデータベース170のsongテーブルからidがsong_idと一致するレコードを見つけて、そのコンテンツの再生履歴情報を得る(ステップS1308)。そして、play_date2に日付情報が存在するかを判断する(ステップS1310)。play_date2に日付情報が存在しない場合は、ただちに後述するステップS1316に進む。   Next, it is determined whether or not song_id is empty (step S1306). If song_id is empty, the process proceeds to step S1316 described below. If song_id is not empty, a record whose id matches song_id is found from the song table of the content database 170, and the reproduction history information of the content is obtained (step S1308). Then, it is determined whether date information exists in play_date2 (step S1310). If there is no date information in play_date2, the process immediately proceeds to step S1316 described later.

play_date2に日付情報が存在する場合は、コンテンツの再生頻度値(score)を算出する(ステップS1312)。そして、このレコードのscoreフィールドを更新する(ステップS1314)。そして、ステップS1316に進む。   If date information exists in play_date2, a content reproduction frequency value (score) is calculated (step S1312). Then, the score field of this record is updated (step S1314). Then, the process proceeds to step S1316.

ステップS1316では、id ← id + 1とする(ステップS1316)。そして、全レコードの処理が完了したかを判断する(ステップS1318)。全レコードの処理が完了していない場合は、ステップS1304に戻る。全レコードの処理が完了した場合は、L2−Eキャッシュ管理テーブルについても、上記と同様の処理を行う。   In step S1316, id ← id + 1 is set (step S1316). Then, it is determined whether processing of all records is completed (step S1318). If all the records have not been processed, the process returns to step S1304. When all the records have been processed, the same processing as described above is performed for the L2-E cache management table.

以上、コンテンツキャッシュ管理部190の動作について説明した。以下、コンテンツデータベース更新部180の動作について説明する。   The operation of the content cache management unit 190 has been described above. Hereinafter, the operation of the content database update unit 180 will be described.

<コンテンツデータベース170の更新処理スレッド:図24>
コンテンツデータベース170の更新処理スレッドについて、図24を参照しながら説明する。まず、メインメモリ上にartist_exist[ ]、album_exist[ ]、song_exist[ ]の配列を確保する(ステップS1402)。そして、artist_exist[ ]、album_exist[ ]、song_exist[ ]を0にクリアする(ステップS1404)。
<Update Thread for Content Database 170: FIG. 24>
The update processing thread of the content database 170 will be described with reference to FIG. First, an array of artist_exist [], album_exist [], song_exist [] is secured on the main memory (step S1402). Then, artist_exist [], album_exist [], and song_exist [] are cleared to 0 (step S1404).

以下順に、ディレクトリ検索処理(検索対象=ルートディレクトリ)(ステップS1406)、不要レコード削除処理:artistテーブル(ステップS1408)、不要レコード削除処理:albumテーブル(ステップS1410)、不要レコード削除処理:songテーブル(ステップS1412)を行う。これら処理については、図26〜図28を参照しながら後述する。最後に、artist_exist[ ]、album_exist[ ]、song_exist[ ]を解放する(ステップS1414)。   In the following order, directory search processing (search target = root directory) (step S1406), unnecessary record deletion processing: artist table (step S1408), unnecessary record deletion processing: album table (step S1410), unnecessary record deletion processing: song table ( Step S1412) is performed. These processes will be described later with reference to FIGS. Finally, artist_exist [], album_exist [] and song_exist [] are released (step S1414).

<ディレクトリ検索処理:図25>
ディレクトリ検索処理について、図25を参照しながら説明する。
まず、検索対象のディレクトリに存在するファイル/ディレクトリの検索を開始する(ステップS1502)。そして、次のファイル名又はディレクトリ名を得る(ステップS1504)。そして、見つけたのはファイルだったかどうかを判断する(ステップS1506)。見つけたのがファイルではなくディレクトリであった場合には、そのディレクトリに対してディレクトリ検索処理を再帰呼出しにより実行する(ステップS1508)。見つけたのがファイルである場合は、以下の処理に進む。
<Directory search processing: FIG. 25>
The directory search process will be described with reference to FIG.
First, a search for a file / directory existing in a search target directory is started (step S1502). Then, the next file name or directory name is obtained (step S1504). Then, it is determined whether or not the file was found (step S1506). If the found directory is not a file but a directory, directory search processing is executed on the directory by recursive calling (step S1508). If the file is found, proceed to the following process.

まず、コンテンツファイルの内容を読み出して、artist/album/title/tracknoを得る(ステップS1510)。次にコンテンツファイルから取得したartistが新規アーティストかどうかを判断する(ステップS1512)。もし新規アーティストである場合は、artistテーブルに新規レコードを追加して、追加したレコードのidをartist_idにセットする(ステップS1514)。新規アーティストでない場合は、artistテーブルを検索して、アーティスト名が一致するレコードを探し、そのartist_idを得る(ステップS1516)。その後、artist_exist[artist_id] ← 1とする(ステップS1518)。   First, the contents of the content file are read to obtain artist / album / title / trackno (step S1510). Next, it is determined whether or not the artist acquired from the content file is a new artist (step S1512). If the artist is a new artist, a new record is added to the artist table, and the id of the added record is set to artist_id (step S1514). If it is not a new artist, the artist table is searched to find a record with a matching artist name, and its artist_id is obtained (step S1516). Then, artist_exist [artist_id] ← 1 is set (step S1518).

次に、コンテンツファイルから取得したalbumが新規アルバムかどうかを判断する(ステップS1520)。もし新規アルバムである場合は、albumテーブルに新規レコードを追加して、追加したレコードのidをalbum_idにセットする(ステップS1522)。新規アルバムでない場合は、albumテーブルを検索して、artist_idとアルバム名が一致するレコードを探し、そのalbum_idを得る(ステップS1524)。その後、album_exist[album_id] ← 1とする(ステップS1526)。   Next, it is determined whether the album acquired from the content file is a new album (step S1520). If it is a new album, a new record is added to the album table, and the id of the added record is set to album_id (step S1522). If the album is not a new album, the album table is searched to find a record whose artist_id and album name match, and the album_id is obtained (step S1524). Thereafter, album_exist [album_id] ← 1 is set (step S1526).

次に、コンテンツファイルから取得したtitleが新規の曲かどうかを判断する(ステップS1528)。もし新規の曲である場合は、songテーブルに新規レコードを追加して、追加したレコードのidをsong_idにセットする(ステップS1530)。新規の曲でない場合は、aongテーブルを検索して、artist_id/album_idとタイトルが一致するレコードを探し、そのsong_idを得る(ステップS1532)。その後、song_exist[song_id] ← 1とする(ステップS1534)。   Next, it is determined whether the title acquired from the content file is a new song (step S1528). If it is a new song, a new record is added to the song table, and the id of the added record is set to song_id (step S1530). If it is not a new song, the aong table is searched to find a record whose title matches artist_id / album_id, and the song_id is obtained (step S1532). Thereafter, song_exist [song_id] ← 1 is set (step S1534).

最後に、ディレクトリの検索が終了したかを判断する(ステップS1536)。ディレクトリの検索が終了していない場合は、ステップS1504に戻る。ディレクトリの検索が終了した場合は、サブルーチンを終了して、元のステップに戻る。   Finally, it is determined whether the directory search is completed (step S1536). If the directory search has not ended, the process returns to step S1504. When the directory search is completed, the subroutine ends and the process returns to the original step.

<不要レコード削除処理:artistテーブル:図26>
図24のステップS1408から呼び出しているartistテーブルの不要レコード削除処理のサブルーチンについて、図26を参照しながら説明する。
まず、id ← 1とする(ステップS1602)。そして、artist_exist[id] = 0かどうかを判断する(ステップS1604)。artist_exist[id] = 0でない場合は、ただちにステップS1608に進む。artist_exist[id] = 0の場合は、artistテーブルのidに対応するレコードをクリアし(ステップS1606)、ステップS1608に進む。
<Unnecessary record deletion processing: artist table: FIG. 26>
The unnecessary record deletion processing subroutine called from step S1408 of FIG. 24 will be described with reference to FIG.
First, id ← 1 is set (step S1602). Then, it is determined whether artist_exist [id] = 0 (step S1604). If artist_exist [id] = 0 is not satisfied, the process immediately proceeds to step S1608. If artist_exist [id] = 0, the record corresponding to id in the artist table is cleared (step S1606), and the process proceeds to step S1608.

ステップS1608では、id ← id + 1とする(ステップS1608)。最後に、全レコードの処理が完了したかを判断する(ステップS1610)。全レコードの処理が完了していない場合は、ステップS1604に戻る。全レコードの処理が完了した場合は、サブルーチンを終了して、元のステップ(ステップS1408)に戻る。   In step S1608, id ← id + 1 is set (step S1608). Finally, it is determined whether processing of all records has been completed (step S1610). If all the records have not been processed, the process returns to step S1604. If all the records have been processed, the subroutine ends and the process returns to the original step (step S1408).

<不要レコード削除処理:albumテーブル:図27>
図24のステップS1410から呼び出しているalbumテーブルの不要レコード削除処理のサブルーチンについて、図27を参照しながら説明する。
まず、id ← 1とする(ステップS1702)。そして、album_exist[id] = 0かどうかを判断する(ステップS1704)。album_exist[id] = 0でない場合は、ただちにステップS1708に進む。album_exist[id] = 0の場合は、albumテーブルのidに対応するレコードをクリアし(ステップS1706)、ステップS1708に進む。
<Unnecessary record deletion processing: album table: FIG. 27>
A subroutine for deleting unnecessary records in the album table called from step S1410 in FIG. 24 will be described with reference to FIG.
First, id ← 1 is set (step S1702). Then, it is determined whether album_exist [id] = 0 (step S1704). If album_exist [id] = 0 is not satisfied, the process immediately proceeds to step S1708. If album_exist [id] = 0, the record corresponding to id in the album table is cleared (step S1706), and the process proceeds to step S1708.

ステップS1708では、id ← id + 1とする(ステップS1708)。最後に、全レコードの処理が完了したかを判断する(ステップS1710)。全レコードの処理が完了していない場合は、ステップS1704に戻る。全レコードの処理が完了した場合は、サブルーチンを終了して、元のステップ(ステップS1410)に戻る。   In step S1708, id ← id + 1 is set (step S1708). Finally, it is determined whether processing of all records is completed (step S1710). If all the records have not been processed, the process returns to step S1704. If all the records have been processed, the subroutine ends and the process returns to the original step (step S1410).

<不要レコード削除処理:songテーブル:図28>
図24のステップS1412から呼び出しているsongテーブルの不要レコード削除処理のサブルーチンについて、図28を参照しながら説明する。
まず、id ← 1とする(ステップS1802)。そして、song_exist[id] = 0かどうかを判断する(ステップS1804)。song_exist[id] = 0でない場合は、ただちにステップS1808に進む。song_exist[id] = 0の場合は、songテーブルのidに対応するレコードをクリアし(ステップS1806)、ステップS1808に進む。
<Unnecessary record deletion processing: song table: FIG. 28>
The subroutine for the unnecessary record deletion processing of the song table called from step S1412 in FIG. 24 will be described with reference to FIG.
First, id ← 1 is set (step S1802). Then, it is determined whether or not song_exist [id] = 0 (step S1804). If song_exist [id] is not 0, the process immediately proceeds to step S1808. If song_exist [id] = 0, the record corresponding to id in the song table is cleared (step S1806), and the process proceeds to step S1808.

ステップS1808では、id ← id + 1とする(ステップS1808)。最後に、全レコードの処理が完了したかを判断する(ステップS1810)。全レコードの処理が完了していない場合は、ステップS1804に戻る。全レコードの処理が完了した場合は、サブルーチンを終了して、元のステップ(ステップS1412)に戻る。   In step S1808, id ← id + 1 is set (step S1808). Finally, it is determined whether all records have been processed (step S1810). If all the records have not been processed, the process returns to step S1804. If all the records have been processed, the subroutine ends and the process returns to the original step (step S1412).

(第1の実施形態の効果)
以上説明したように、本実施形態によれば、コンテンツの再生頻度に応じて自動的にオンザフライ再生とダウンロード再生を切り替えることにより、あるときたまたま再生頻度の低いコンテンツを再生したことにより、より再生頻度の高いコンテンツをコンテンツキャッシュ部160から削除してしまうという事態を防止できる。その結果、コンテンツキャッシュ部160のヒット率が向上し、通信データ量をより節約できるようになる。このようにして、クラウド型音楽再生アプリの使い勝手を高めたコンテンツ再生装置100とすることができる。
(Effects of the first embodiment)
As described above, according to the present embodiment, by switching automatically between on-the-fly playback and download playback according to the content playback frequency, by playing content with low playback frequency by chance, the playback frequency is increased. It is possible to prevent a situation in which a high content is deleted from the content cache unit 160. As a result, the hit rate of the content cache unit 160 is improved, and the amount of communication data can be further saved. In this way, it is possible to provide the content reproduction apparatus 100 that improves the usability of the cloud-type music reproduction application.

また、たまたま久しぶりに再生したが、しばらくの間は聞きそうもない楽曲のデータをコンテンツキャッシュ部160に保存することを防止することができるので、書き換え回数に制限のあるメモリ(例えば、NAND−Flashメモリ)に対する書き込み回数を抑制することができる(なお、モバイル端末は内蔵NAND−Flashメモリの寿命を迎えると、故障状態となり使用不可となってしまう。)。その結果として、モバイル端末の利用可能年数を延ばすことができる。   In addition, since it is possible to prevent the music data that has been played after a long absence but is unlikely to be heard for a while from being stored in the content cache unit 160, a memory with a limited number of rewrites (for example, NAND-Flash) The number of times of writing to the memory) can be suppressed (in addition, the mobile terminal becomes a failure state and becomes unusable when the built-in NAND-Flash memory reaches the end of its life). As a result, the usable years of the mobile terminal can be extended.

以上説明したコンテンツ再生装置100は、コンピュータにプログラムを適用することにより、コンピュータをコンテンツ再生装置100として機能させることができる。このコンピュータプログラムは、任意の記録媒体に記録された形で市場を流通させることができるほか、ネットワークを介したダウンロードやその他の形で市場を流通させることができる。   The content reproduction apparatus 100 described above can cause a computer to function as the content reproduction apparatus 100 by applying a program to the computer. This computer program can be distributed in the form recorded on an arbitrary recording medium, and can be distributed via the network or distributed in other forms.

(第2の実施形態)
次に、本発明の第2の実施形態について説明する。本実施形態では、上記第1の実施形態と異なる点を中心に説明するものとし、上記第1の実施形態と実質的に同様の内容については、同一の参照符号を付することにより、重複説明を省略する。
(Second Embodiment)
Next, a second embodiment of the present invention will be described. In the present embodiment, the description will focus on differences from the first embodiment, and the same reference numerals are used to designate substantially the same contents as in the first embodiment, thereby providing a duplicate description. Is omitted.

上記第1の実施形態では、コンテンツの再生頻度に基づいて、ダウンロード再生を行うか、あるいは、オンザフライ再生を行うかを判断していた。本実施形態では、この判断のために、コンテンツが再び再生される確率の予想値(再生確率予想値)を利用することを特徴とする。以下では、再生確率予想値の一例として、各コンテンツの再生頻度に加えて、コンテンツがコンテンツサーバ10に登録された日時(コンテンツ鮮度情報)に基づいて判断する場合について説明する。   In the first embodiment, whether to perform download reproduction or on-the-fly reproduction is determined based on the content reproduction frequency. In the present embodiment, for this determination, an expected value (probability of reproduction probability) of the probability that the content is reproduced again is used. Hereinafter, as an example of the predicted reproduction probability, a case will be described in which determination is made based on the date and time (content freshness information) when the content is registered in the content server 10 in addition to the reproduction frequency of each content.

本実施形態の再生確率予想情報は、上記第1の実施形態の再生頻度情報をさらに発展させた内容である。図5(d)に示したsongテーブルの構造の中に「write_date」、「play_date1」、「play_date2」というフィールドが存在している。「write_date」はそのコンテンツがコンテンツサーバに登録された日時(コンテンツ鮮度情報)を保持している。したがって、すべてのコンテンツの「write_date」フィールドには有効値が書き込まれている。一方、コンテンツがコンテンツサーバ10に登録された時点では、「play_date1」と「play_date2」フィールドの内容は空である。あるコンテンツを再生すると、「play_date1」の内容が「play_date2」にコピーされ、再生時点の日時が「play_date1」に書き込まれる。したがって、コンテンツサーバ10に登録されたコンテンツを初めて再生したときには、「play_date1」にのみ有効値が書き込まれていて、「play_date2」は空となる。   The reproduction probability prediction information of the present embodiment is a further development of the reproduction frequency information of the first embodiment. Fields “write_date”, “play_date1”, and “play_date2” exist in the structure of the song table shown in FIG. “Write_date” holds the date and time (content freshness information) when the content was registered in the content server. Therefore, valid values are written in the “write_date” fields of all contents. On the other hand, when the content is registered in the content server 10, the contents of the “play_date1” and “play_date2” fields are empty. When a certain content is reproduced, the content of “play_date1” is copied to “play_date2”, and the date and time at the time of reproduction is written to “play_date1”. Therefore, when the content registered in the content server 10 is reproduced for the first time, a valid value is written only in “play_date1”, and “play_date2” is empty.

上記第1の実施形態1では再生頻度情報は、
・一度も再生したことがないコンテンツ:score=−1
・初めて再生したコンテンツ:score=−1
・2回以上再生したコンテンツ:score=100〜0
と計算されることになる。よって、上記第1の実施形態では、再生頻度情報を算出することが可能な、2回以上再生したことのあるコンテンツに関しては、より再生頻度が高いコンテンツを優先してコンテンツキャッシュ部160に保存する動作を実現することができる。
In the first embodiment, the reproduction frequency information is
-Content that has never been played: score = -1
・ Content played for the first time: score = -1
-Content played more than once: score = 100-0
Will be calculated. Therefore, in the first embodiment, with respect to content that can be played back more than once and that can be played back, information with higher playback frequency is preferentially stored in the content cache unit 160. Operation can be realized.

しかし、ある新しいコンテンツ(音楽の場合で言えば新譜)がコンテンツサーバ10に新規登録され、その後そのコンテンツを初めて再生した場合には、score値が最低の−1と算出されることになる。よって、そのコンテンツのscore値は、コンテンツサーバ10に登録されている中で、再生頻度を求めることが可能などんな古いコンテンツよりもscore値が上回ることがないので、結果的に新しいコンテンツを初めて再生したときには、決してコンテンツキャッシュ部160に保存されることがなく、そのコンテンツを2回目に再生したときになってやっとコンテンツキャッシュ部160に保存されることとなる。このため、限りある通信帯域を無駄に消費してしまうおそれがある。   However, when a new content (new music in the case of music) is newly registered in the content server 10 and then the content is reproduced for the first time, the score value is calculated to be the lowest -1. Therefore, since the score value of the content does not exceed the score value of any old content for which the reproduction frequency can be obtained while being registered in the content server 10, the new content is reproduced for the first time as a result. In such a case, the content is never stored in the content cache unit 160, and is only stored in the content cache unit 160 when the content is reproduced for the second time. For this reason, there is a possibility that a limited communication band is wasted.

この点、本実施形態の再生確率予想値は、以下のプログラムにより計算される。scoreの値が再生確率を示し、値が大きいほど再生確率が高いことを意味する。
if play_date2 != ""
then
diff = max(play_date1 - play_date2, now_date - play_date1)
score = max(365 - diff, 0) / 365 * 100
else
score = -1
diff = now_date - write_date
bonus = max(30 - diff, 0) / 30 * 100
score = score + bonus
In this regard, the predicted reproduction probability of the present embodiment is calculated by the following program. The score value indicates the reproduction probability, and the larger the value, the higher the reproduction probability.
if play_date2! = ""
then
diff = max (play_date1-play_date2, now_date-play_date1)
score = max (365-diff, 0) / 365 * 100
else
score = -1
diff = now_date-write_date
bonus = max (30-diff, 0) / 30 * 100
score = score + bonus

このbonusの値はscoreの値に加算されるボーナス分のスコアであり、新しいコンテンツがコンテンツサーバ10に登録された日時「write_date」と、現在日時「now_date」の日数差に応じて計算される+100〜0の値である。あるコンテンツがコンテンツサーバ10に登録されてから30日以内にそのコンテンツを再生した場合には、「write_date」と「now_date」の日数差に応じたボーナス値が算出される。ボーナスの値はコンテンツの新規登録された時点では100であり、そこから日数が経過するにつれてボーナス値が低下していき、30日が経過した時点でボーナス値は0となる。   The bonus value is a bonus score added to the score value, and is calculated according to the difference in days between the date and time “write_date” when the new content is registered in the content server 10 and the current date and time “now_date”. A value of ~ 0. When the content is reproduced within 30 days after the content is registered in the content server 10, a bonus value corresponding to the number of days difference between “write_date” and “now_date” is calculated. The bonus value is 100 when a new content is registered, and the bonus value decreases as the number of days elapses. The bonus value becomes 0 when 30 days elapse.

このように本実施形態では、ボーナス値が発生する期間を30日と設定しているが、このことは、新コンテンツに関しては、コンテンツサーバへの登録後1ヶ月以内であれば、まだ一度しか再生履歴がなくとも再生確率値scoreがプラスの値となるため、コンテンツキャッシュ部160に保存される可能性が高くなる。しかし、新しいコンテンツの登録後、1ヶ月が経過しても再生履歴が1度しかなかったような場合には、ボーナス値の加算はなくなる。これによりユーザが一度だけ再生して、その後繰り返し再生されることのなかったコンテンツ(これはおそらくユーザの好みに合わず、リピート再生する意欲をなくしたコンテンツであると考えられる)を、いつまでもコンテンツキャッシュ部160に残しておくことを防止することができる。結果的に、コンテンツキャッシュ部160の限りある容量を有効に活用することが可能となる。   As described above, in this embodiment, the period during which the bonus value is generated is set to 30 days, but this means that new content is still played only once within one month after registration in the content server. Even if there is no history, since the reproduction probability value score is a positive value, the possibility of being stored in the content cache unit 160 increases. However, in the case where there is only one reproduction history even after one month has elapsed after registration of new content, the bonus value is not added. This allows content caches to be played indefinitely for content that the user has played only once and never played back repeatedly (this is probably content that does not match the user's preferences and is not willing to repeat) It is possible to prevent the portion 160 from being left. As a result, the limited capacity of the content cache unit 160 can be used effectively.

次に、従来技術との差異について説明する。従来技術では、コンテンツキャッシュが満杯になってしまった場合に、コンテンツキャッシュにコンテンツを書き込んだ日時に基づいて、削除するべきコンテンツを決定していた。   Next, differences from the prior art will be described. In the prior art, when the content cache is full, the content to be deleted is determined based on the date and time when the content was written to the content cache.

一方、本実施形態においては、コンテンツキャッシュ部160の満杯時に削除するべきコンテンツを選択する際に、各コンテンツの再生頻度に加えて、コンテンツがコンテンツサーバ10に登録された日時(コンテンツ鮮度情報)を判断条件として利用することに特徴がある。例えばある新曲がリリースされ、そのコンテンツデータがコンテンツサーバ10に追加されたとする。このとき、コンテンツデータベース160のsongテーブル(図5(d))には、その新曲を示すレコード(テーブルにおける1行分のデータ)が追加され、そのレコードの「write_date」にはそのコンテンツの登録日時が書き込まれる。また「play_date1」と「play_date2」は空欄のままとなる。   On the other hand, in the present embodiment, when selecting the content to be deleted when the content cache unit 160 is full, in addition to the reproduction frequency of each content, the date and time (content freshness information) when the content was registered in the content server 10 is displayed. It is characterized by being used as a judgment condition. For example, assume that a new song is released and the content data is added to the content server 10. At this time, a record indicating the new song (data for one row in the table) is added to the song table (FIG. 5D) of the content database 160, and the registration date and time of the content is stored in “write_date” of the record. Is written. “Play_date1” and “play_date2” remain blank.

次にこの新曲の再生を指示すると、そのときの日時が「play_date1」に書き込まれる。本実施形態では、各コンテンツの再生頻度として「play_date1」と「play_date2」の差分及び「now_date」と「play_date1」の差分を比較して、大きな方の差分値から計算した値を利用している。しかし、新曲を初めて再生した場合には「play_data2」には有効な値が書き込まれていないため、その曲の再生頻度を求めることができない。第1の実施形態では、再生頻度を計算することができないコンテンツについては、「再生頻度=最低」として取り扱っている。これはあるとき初めて再生したコンテンツが、後日その曲を何度も繰り返し再生する可能性が高いかどうかの判断が付かないからである。   Next, when the reproduction of this new song is instructed, the date and time at that time is written in “play_date1”. In the present embodiment, as the reproduction frequency of each content, the difference between “play_date1” and “play_date2” and the difference between “now_date” and “play_date1” are compared, and a value calculated from the larger difference value is used. However, when a new song is played for the first time, since a valid value is not written in “play_data2”, it is not possible to obtain the playback frequency of that song. In the first embodiment, content whose playback frequency cannot be calculated is handled as “playback frequency = minimum”. This is because it is not possible to judge whether the content played for the first time at a certain time is likely to be played again and again many times later.

このように再生頻度が求められないコンテンツを「再生頻度=低」として取り扱うことで、あるときたまたま気が向いて再生した旧譜(またすぐにその曲を再生する可能性は低い)をコンテンツキャッシュ部160に書き込んでしまうことによる悪影響を回避することができる反面、ある新曲を初めて再生した時にその曲をコンテンツキャッシュ部160に書き込むことができなくなってしまう。一般的に新曲は旧譜よりも繰り返し再生する可能性が高いと考えられるので、コンテンツキャッシュ部160のヒット率を高めるためには、ある新曲を初めて再生したときにその曲データをコンテンツキャッシュ部160に書き込む動作を行うことが望ましい。   By handling content whose playback frequency is not required as "playback frequency = low", the old cache (which is unlikely to play the song immediately) is played in a content cache. On the other hand, it is possible to avoid adverse effects caused by writing to the unit 160, but when a new song is played for the first time, the song cannot be written to the content cache unit 160. In general, it is considered that a new song has a higher possibility of being played repeatedly than an old score. Therefore, in order to increase the hit rate of the content cache unit 160, when the new song is played for the first time, the song data is stored in the content cache unit 160 It is desirable to perform an operation of writing to

第2の実施形態においては、再生対象曲の「play_date2」が空欄の場合には、「write_date」と「now_date」の値から新譜度合い値を求め、再生頻度値と新譜度合い値を元に再生確率予想値を算出し、新規再生曲とコンテンツキャッシュ部160内の楽曲の再生確率予想値を比較する機能を搭載することによって、初めて再生した新曲をコンテンツキャッシュ部160に書き込むような動作を実現している。   In the second embodiment, when “play_date2” of the music to be played is blank, a new score degree value is obtained from the values of “write_date” and “now_date”, and the playback probability is based on the playback frequency value and the new score degree value. By implementing the function of calculating the expected value and comparing the predicted playback probability of the newly played song and the song in the content cache unit 160, the operation of writing the first played new song to the content cache unit 160 is realized. Yes.

(第2の実施形態の動作)
次に、本実施形態の動作について、主に図29、図30を参照しながら説明する。
本実施形態の動作は、上記第1の実施形態の動作(図9〜図28)と以下の点で異なり、その他の点では同様とすることができる。すなわち、本実施形態では、上記第1の実施形態のコンテンツ再生頻度値の算出処理(図22)に代えて、図29に示すコンテンツ再生確率予想値の算出処理を行う。また、上記第1の実施形態のコンテンツ再生頻度値更新処理スレッド(図23)に代えて、図30に示すコンテンツ再生確率予想値更新処理スレッドを実行する。以下、順に説明する。
(Operation of Second Embodiment)
Next, the operation of the present embodiment will be described with reference mainly to FIGS.
The operation of the present embodiment differs from the operation of the first embodiment (FIGS. 9 to 28) in the following points, and can be the same in other points. That is, in this embodiment, instead of the content reproduction frequency value calculation process (FIG. 22) of the first embodiment, the content reproduction probability expected value calculation process shown in FIG. 29 is performed. Further, instead of the content reproduction frequency value update processing thread (FIG. 23) of the first embodiment, a content reproduction probability expected value update processing thread shown in FIG. 30 is executed. Hereinafter, it demonstrates in order.

<コンテンツ再生確率予想値の算出処理:図29>
コンテンツ再生確率予想値の算出処理について、図29を参照しながら説明する。まず、now_date に現在日時をセットする(ステップS1902)。そして、play_date2に日付情報が存在するかを判断する(ステップS1904)。play_date2に日付情報が存在しない場合には、score に -1をセットする(ステップS1906)。そして、後述するステップS1916に進む。
<Calculation processing of predicted content reproduction probability: FIG. 29>
The process for calculating the predicted content reproduction probability will be described with reference to FIG. First, the current date is set in now_date (step S1902). Then, it is determined whether date information exists in play_date2 (step S1904). If date information does not exist in play_date2, -1 is set in score (step S1906). And it progresses to step S1916 mentioned later.

一方、play_date2に日付情報が存在する場合は、次の処理を行う(ステップS1908、S1910)。
diff ← max(play_date1- play_date2, now_date - play_date1)
score ← max(365 - diff, 0) / 365 * 100
そして、ステップS1916に進む。
On the other hand, if date information exists in play_date2, the following processing is performed (steps S1908 and S1910).
diff ← max (play_date1- play_date2, now_date-play_date1)
score ← max (365-diff, 0) / 365 * 100
Then, the process proceeds to step S1916.

ステップS1916以降では、次の処理を行う(ステップS1916、S1918、S1920)。
diff ← now_date - write_date
bonus ← max(30 - diff, 0) / 30 * 100
score ← score + bonus
そしてステップS1922に進む。ステップS1922では、scoreの値を返す(ステップS1922)。
After step S1916, the following processing is performed (steps S1916, S1918, S1920).
diff ← now_date-write_date
bonus ← max (30-diff, 0) / 30 * 100
score ← score + bonus
Then, the process proceeds to step S1922. In step S1922, the score value is returned (step S1922).

<コンテンツ再生確率予想値更新処理スレッド:図30>
上述した図11のステップS114で起動しているコンテンツ再生確率予想値更新処理スレッドについて、図30を参照しながら説明する。
まず、id ← 1とする(ステップS2002)。そして、L2−Hキャッシュ管理テーブルからidに対応するレコードを取り出して、そのsong_idを得る(ステップS2004)。
<Content Reproduction Probability Expected Value Update Processing Thread: FIG. 30>
The content reproduction probability expected value update processing thread activated in step S114 of FIG. 11 described above will be described with reference to FIG.
First, id ← 1 is set (step S2002). Then, the record corresponding to id is extracted from the L2-H cache management table, and its song_id is obtained (step S2004).

次に、song_idは空かを判断する(ステップS2006)。song_idが空の場合は、後述するステップS2016に進む。song_idが空でない場合は、コンテンツデータベース170のsongテーブルからsong_idに対応するレコードを取り出し、コンテンツの履歴情報を取り出す(ステップS2008)。   Next, it is determined whether or not song_id is empty (step S2006). If song_id is empty, the process proceeds to step S2016 described later. If song_id is not empty, a record corresponding to song_id is extracted from the song table of the content database 170, and content history information is extracted (step S2008).

ステップS2012では、コンテンツの再生確率予想値(score)を算出する(ステップS2012)。そして、idに対応するレコードのscoreフィールドを更新する(ステップS2014)。そして、ステップS2016に進む。   In step S2012, a predicted content reproduction probability (score) is calculated (step S2012). Then, the score field of the record corresponding to id is updated (step S2014). Then, the process proceeds to step S2016.

ステップS2016では、id ← id + 1とする(ステップS2016)。そして、全レコードの処理が完了したかを判断する(ステップS2018)。全レコードの処理が完了していない場合は、ステップS2004に戻る。全レコードの処理が完了した場合は、L2−Eキャッシュ管理テーブルについて、上記と同様の処理を行う。   In step S2016, id ← id + 1 is set (step S2016). Then, it is determined whether or not the processing of all records has been completed (step S2018). If all the records have not been processed, the process returns to step S2004. When all the records have been processed, the same processing as described above is performed on the L2-E cache management table.

以下、さらに具体的な一例について説明する。
本実施形態ではコンテンツ鮮度情報として、コンテンツがコンテンツサーバ10に書き込まれた日時(write_date)を用いている。ここで例えば以下のような経緯で、あるコンテンツがコンテンツサーバ10に登録された場合を考えてみる。
Hereinafter, a more specific example will be described.
In this embodiment, the date and time (write_date) when the content was written to the content server 10 is used as the content freshness information. Here, for example, consider a case where a certain content is registered in the content server 10 in the following manner.

・2015年12月25日に、あるコンテンツが新譜としてリリースされたとする。このときのコンテンツのリリース日(1):2015/12/25である。
・2016年1月15日に、本コンテンツ再生装置のユーザがそのコンテンツをオンライン購入し、ダウンロードしたコンテンツデータをユーザPC内のHDDに保存した。このときのファイル更新日時:2016/1/15、ファイル作成日時:2016/1/15である。
・2016年2月1日に、ユーザPCのHDDに保存されていたコンテンツファイルをコンテンツサーバ10にコピーした。このときのファイル更新日時(2):2016/1/15、ファイル作成日時(3):2016/2/1である。
・ It is assumed that a certain content is released as a new score on December 25, 2015. Release date (1) of content at this time: 2015/12/25.
-On January 15, 2016, the user of the content playback apparatus purchased the content online and saved the downloaded content data in the HDD in the user PC. The file update date / time at this time: 2016/1/15, and the file creation date / time: 2016/1/15.
-On February 1, 2016, the content file stored in the HDD of the user PC was copied to the content server 10. File update date and time (2) at this time: 2016/1/15, file creation date and time (3): 2016/2/1.

上記例では、このコンテンツがコンテンツサーバ10に書き込まれた日時は、上記のファイル作成日時(3)の2016/2/1となる。   In the above example, the date and time when this content was written to the content server 10 is 2016/2/1 of the above file creation date and time (3).

コンテンツサーバ10が、本コンテンツ再生装置のユーザがプライベートで構築したものである場合には、コンテンツサーバ10に登録されているコンテンツはユーザの意思に基づいて管理されていることになる。あるときユーザが、20年前にリリースされた古い楽曲データを何らかの方法で入手し、そのコンテンツファイルをコンテンツサーバ10に登録したものとする。この場合、おそらくはユーザはそのコンテンツを聞きたいと考えたからこそ、そのコンテンツファイルを自らが管理するコンテンツサーバ10に登録したのだと考えられる。つまりそのコンテンツはこのユーザにとっては新譜に相当するような目新しい楽曲だということであり、おそらくは近日中にそのコンテンツを再生する確率が高いものと予想される。   When the content server 10 is privately constructed by the user of the content reproduction apparatus, the content registered in the content server 10 is managed based on the user's intention. It is assumed that a user obtains old music data released 20 years ago by some method and registers the content file in the content server 10. In this case, it is probable that the user has registered the content file in the content server 10 that he / she manages, probably because he / she wanted to hear the content. In other words, the content is a novel piece of music equivalent to a new score for this user, and it is likely that the content is likely to be reproduced in the near future.

本実施形態では、このようにコンテンツファイルがコンテンツサーバ10に登録された日時をコンテンツ鮮度情報として利用することにより、楽曲のリリース日が最近だからその楽曲の再生確率が高いと単純に判断する従来の機器よりも、よりユーザの気持ちに添ったコンテンツ再生確率を算出することを可能としている。   In the present embodiment, by using the date and time when the content file is registered in the content server 10 as content freshness information as described above, it is simply determined that the reproduction probability of the music is high because the release date of the music is recent. It is possible to calculate the content reproduction probability that is more in line with the user's feelings than the device.

なお、コンテンツ鮮度情報として利用する情報は、上記のファイル作成日時(3)に限定されるものではなく、ユーザがコンテンツファイルを入手した日時を示すファイル更新日時(2)や、コンテンツのリリース日(1)を用いることも可能である。   The information used as the content freshness information is not limited to the file creation date (3) described above, but is the file update date (2) indicating the date and time when the user obtained the content file, or the content release date ( It is also possible to use 1).

(第2の実施形態の効果)
以上説明したように、本実施形態によれば、コンテンツサーバ10への登録日時が新しいコンテンツ(音楽で言えば新曲)がコンテンツキャッシュ部160に保存される可能性が高まるため、コンテンツキャッシュ部160のヒット率が向上し、モバイル通信帯域を節約することが可能となる。一方で、久しぶりにたまたま再生した旧譜はキャッシュしないので、旧譜を再生することによりコンテンツキャッシュ部160のヒット率が低下することがない。
(Effect of 2nd Embodiment)
As described above, according to the present embodiment, there is a high possibility that content (new music in terms of music) with a new registration date and time in the content server 10 is stored in the content cache unit 160. The hit rate is improved, and the mobile communication band can be saved. On the other hand, since the old music that happens to be played after a long time is not cached, the hit rate of the content cache unit 160 is not lowered by playing the old music.

以上、添付図面を参照しながら本発明の好適な実施形態について説明したが、本発明はかかる例に限定されないことは言うまでもない。当業者であれば、特許請求の範囲に記載された範疇内において、各種の変更例又は修正例に想到し得ることは明らかであり、それらについても当然に本発明の技術的範囲に属するものと了解される。   As mentioned above, although preferred embodiment of this invention was described referring an accompanying drawing, it cannot be overemphasized that this invention is not limited to this example. It will be apparent to those skilled in the art that various changes and modifications can be made within the scope of the claims, and these are naturally within the technical scope of the present invention. Understood.

例えば、上記第1の実施形態では、再生頻度値を求めるための具体例やプログラムについて説明したが、本発明はこれに限定されない。コンテンツの再生頻度を表す情報であれば、任意の情報から再生頻度値を求めるように構成することができる。   For example, in the first embodiment, specific examples and programs for obtaining the reproduction frequency value have been described, but the present invention is not limited to this. As long as the information represents the content reproduction frequency, the reproduction frequency value can be obtained from arbitrary information.

また、上記第2の実施形態では、再生確率予想値の一例として、コンテンツがコンテンツサーバ10に登録された日時(コンテンツ鮮度情報)とコンテンツの再生履歴情報に基づいて算出する場合について説明したが、本発明はこれに限定されない。再生確率を予想できる情報であれば、任意の情報から再生確率予想値を求めるように構成することができる。   In the second embodiment, as an example of the predicted playback probability, the case where the content is calculated based on the date and time (content freshness information) registered in the content server 10 and the playback history information of the content has been described. The present invention is not limited to this. As long as the information can predict the reproduction probability, the reproduction probability prediction value can be obtained from arbitrary information.

また、上記実施形態では、コンテンツ再生装置100として、半導体メモリを有するモバイル機器を前提として説明したが、本発明はこれに限定されない。例えば、半導体メモリ型のコンテンツ再生装置から半導体メモリを取り外したもの(いわゆるクラウド型のコンテンツ再生装置)や、車載向けの音楽再生装置や、据置型のネットワークオーディオプレーヤーや、音楽再生機能を持ったテレビや、電子書籍リーダーにも本発明は適用可能である。   Moreover, although the said embodiment demonstrated the mobile device which has a semiconductor memory as the content reproduction apparatus 100, this invention is not limited to this. For example, a semiconductor memory type content playback device from which a semiconductor memory is removed (a so-called cloud type content playback device), an in-vehicle music playback device, a stationary network audio player, or a television with a music playback function In addition, the present invention can be applied to an electronic book reader.

本発明は、コンテンツを再生するコンテンツ再生装置及びコンピュータプログラムに利用可能である。   The present invention can be used for a content reproduction apparatus and a computer program for reproducing content.

10 コンテンツサーバ
100 コンテンツ再生装置
110 メイン・コントローラ
120 ネットワーク通信部
130 操作検知部
140 画面表示部
150 音楽再生部
160 コンテンツキャッシュ部
L1 第1コンテンツキャッシュ
L2 第2コンテンツキャッシュ
170 コンテンツデータベース
180 コンテンツデータベース更新部
190 コンテンツキャッシュ管理部
DESCRIPTION OF SYMBOLS 10 Content server 100 Content reproduction apparatus 110 Main controller 120 Network communication part 130 Operation detection part 140 Screen display part 150 Music reproduction part 160 Content cache part L1 1st content cache L2 2nd content cache 170 Content database 180 Content database update part 190 Content cache management department

Claims (15)

コンテンツを記憶するコンテンツキャッシュ部と、
クラウド上のコンテンツサーバに登録されているコンテンツの再生頻度を算出するための再生頻度情報を保持するコンテンツデータベースと、
前記コンテンツキャッシュ部を管理するコンテンツキャッシュ管理部と、
を備え、
前記コンテンツキャッシュ管理部は、
再生対象となるコンテンツの前記再生頻度情報に基づいて、前記コンテンツサーバ上のコンテンツをダウンロードしながらリアルタイムに再生するオンザフライ再生動作と、前記コンテンツサーバからダウンロードしたコンテンツデータを前記コンテンツキャッシュ部に書き込みながら同時に再生を行うダウンロード再生動作と、を切り替えることを特徴とする、コンテンツ再生装置。
A content cache unit for storing content;
A content database for holding reproduction frequency information for calculating the reproduction frequency of content registered in a content server on the cloud;
A content cache management unit for managing the content cache unit;
With
The content cache management unit
Based on the playback frequency information of the content to be played back, on-the-fly playback operation for playing back the content on the content server in real time and simultaneously writing the content data downloaded from the content server into the content cache unit A content reproduction apparatus, characterized by switching between a download reproduction operation for performing reproduction.
コンテンツを記憶するコンテンツキャッシュ部と、
クラウド上のコンテンツサーバに登録されているコンテンツの再生確率を予想するための再生確率予想情報を保持するコンテンツデータベースと、
前記コンテンツキャッシュ部を管理するコンテンツキャッシュ管理部と、
を備え、
前記コンテンツキャッシュ管理部は、
再生対象となるコンテンツの前記再生確率予想情報に基づいて、前記コンテンツサーバ上のコンテンツをダウンロードしながらリアルタイムに再生するオンザフライ再生動作と、前記コンテンツサーバからダウンロードしたコンテンツデータを前記コンテンツキャッシュ部に書き込みながら同時に再生を行うダウンロード再生動作と、を切り替えることを特徴とする、コンテンツ再生装置。
A content cache unit for storing content;
A content database that holds reproduction probability prediction information for predicting the reproduction probability of content registered in a content server on the cloud;
A content cache management unit for managing the content cache unit;
With
The content cache management unit
Based on the reproduction probability prediction information of the content to be reproduced, on-the-fly reproduction operation for reproducing the content on the content server in real time, and writing the content data downloaded from the content server to the content cache unit A content playback apparatus that switches between a download playback operation that performs playback simultaneously.
前記コンテンツキャッシュ部においては、各コンテンツの先頭部分とそれ以外の残余部分とに分けて、データが記録されることを特徴とする、請求項1又は2に記載のコンテンツ再生装置。   3. The content reproduction apparatus according to claim 1, wherein the content cache unit records data separately for a head portion of each content and a remaining portion other than that. 前記コンテンツキャッシュ部において、容量が満杯になってしまった場合に、前記各コンテンツの残余部分が先に削除されることを特徴とする、請求項3に記載のコンテンツ再生装置。   4. The content reproduction apparatus according to claim 3, wherein, in the content cache unit, when the capacity becomes full, the remaining portion of each content is deleted first. 前記コンテンツキャッシュ部において、
前記各コンテンツの先頭部分を保存する先頭部分キャッシュの容量と、前記各コンテンツの残余部分を保存する残余部分キャッシュの容量とが分けて管理され、
容量が満杯になってしまった場合に、前記先頭部分キャッシュと前記残余部分キャッシュとで独立して不要データの削除処理が実施されることを特徴とする、請求項3に記載のコンテンツ再生装置。
In the content cache unit,
The capacity of the head part cache for storing the head part of each content and the capacity of the remaining part cache for storing the remaining part of each content are separately managed,
4. The content reproducing apparatus according to claim 3, wherein when the capacity is full, the unnecessary data is deleted independently in the head partial cache and the remaining partial cache.
前記コンテンツキャッシュ部は、
ユーザが直近で再生する可能性が高いコンテンツを保存する第1コンテンツキャッシュと、
ユーザが後日また再生する可能性が高いコンテンツを保存する第2コンテンツキャッシュと、
を有することを特徴とする、請求項1〜5のいずれかに記載コンテンツ再生装置。
The content cache unit
A first content cache for storing content most likely to be played by the user most recently;
A second content cache for storing content that the user is likely to play again at a later date;
The content playback apparatus according to claim 1, wherein the content playback apparatus includes:
前記第1コンテンツキャッシュには、再生中のコンテンツに関連するコンテンツのみが保存されることを特徴とする、請求項6に記載のコンテンツ再生装置。   The content reproduction apparatus according to claim 6, wherein only content related to the content being reproduced is stored in the first content cache. 前記第1コンテンツキャッシュは、揮発性メモリにより構成されることを特徴とする、請求項7に記載のコンテンツ再生装置。   8. The content reproduction apparatus according to claim 7, wherein the first content cache is configured by a volatile memory. 前記第1コンテンツキャッシュにおけるデータ管理単位は、1つのコンテンツをさらに細かく分けたチャンク単位であることを特徴とする、請求項7に記載のコンテンツ再生装置。   8. The content reproduction apparatus according to claim 7, wherein the data management unit in the first content cache is a chunk unit obtained by further dividing one content. 前記第2コンテンツキャッシュには、後日再生する可能性が高いコンテンツのみが保存され、
前記第2コンテンツキャッシュにおけるキャッシュ管理のアルゴリズムは、前記第1コンテンツキャッシュとは別のアルゴリズムが採用されることを特徴とする、請求項6〜9のいずれかに記載のコンテンツ再生装置。
In the second content cache, only content that is likely to be played back at a later date is stored,
The content playback apparatus according to any one of claims 6 to 9, wherein an algorithm different from that of the first content cache is adopted as a cache management algorithm in the second content cache.
前記第2コンテンツキャッシュは、データの保存先として、不揮発性メモリにより構成されることを特徴とする、請求項10に記載のコンテンツ再生装置。   The content reproduction apparatus according to claim 10, wherein the second content cache is configured by a nonvolatile memory as a data storage destination. 前記第2コンテンツキャッシュにおけるデータ管理単位は、コンテンツ単位であることを特徴とする、請求項10又は11に記載のコンテンツ再生装置。   12. The content reproduction apparatus according to claim 10, wherein a data management unit in the second content cache is a content unit. 前記第1コンテンツキャッシュと前記第2コンテンツキャッシュの容量は、個別に設定できることを特徴とする、請求項6〜12のいずれかに記載のコンテンツ再生装置。   The content reproduction apparatus according to any one of claims 6 to 12, wherein capacities of the first content cache and the second content cache can be individually set. 前記コンテンツデータベースは、複数のコンテンツサーバのコンテンツリスト情報を統合した統合コンテンツリスト情報を保持することを特徴とする、請求項1〜13のいずれかに記載のコンテンツ再生装置。   The content playback apparatus according to claim 1, wherein the content database holds integrated content list information obtained by integrating content list information of a plurality of content servers. コンピュータを、請求項1〜14のいずれかに記載のコンテンツ再生装置として機能させるためのコンピュータプログラム。   A computer program for causing a computer to function as the content reproduction apparatus according to claim 1.
JP2016044645A 2016-03-08 2016-03-08 Content reproduction apparatus and computer program Expired - Fee Related JP6589087B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016044645A JP6589087B2 (en) 2016-03-08 2016-03-08 Content reproduction apparatus and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016044645A JP6589087B2 (en) 2016-03-08 2016-03-08 Content reproduction apparatus and computer program

Publications (2)

Publication Number Publication Date
JP2017162088A JP2017162088A (en) 2017-09-14
JP6589087B2 true JP6589087B2 (en) 2019-10-16

Family

ID=59853958

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016044645A Expired - Fee Related JP6589087B2 (en) 2016-03-08 2016-03-08 Content reproduction apparatus and computer program

Country Status (1)

Country Link
JP (1) JP6589087B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3774358B2 (en) * 2000-07-14 2006-05-10 株式会社東芝 Content service method using mobile communication terminal
JP4327733B2 (en) * 2003-01-16 2009-09-09 エヌエックスピー ビー ヴィ Method and apparatus for caching digital content data
JP5353934B2 (en) * 2011-03-28 2013-11-27 ブラザー工業株式会社 Content data playback terminal device, distribution system, and program
US10706096B2 (en) * 2011-08-18 2020-07-07 Apple Inc. Management of local and remote media items

Also Published As

Publication number Publication date
JP2017162088A (en) 2017-09-14

Similar Documents

Publication Publication Date Title
US8281077B2 (en) Local media cache with leader files
US7917572B2 (en) Music composition data transmission recording method and music composition reproduction device
US8495246B2 (en) Method and system for updating playlists
EP1611580B1 (en) Playlist synchronization
US20060156239A1 (en) Persistent group of media items for a media device
US20060156236A1 (en) Media management for groups of media items
JP4022971B2 (en) Storage device and data deletion method
CN101180616B (en) Mechanism and method for managing data storage
CN104715770A (en) Music playing method and device
CN100520946C (en) Memory device for storing different data formats
US20060179129A1 (en) Hotcontent update for a target device
US8539151B2 (en) Data delivery system, terminal apparatus, information processing apparatus, capability notification method, data writing method, capability notification program, and data writing program
JP6589087B2 (en) Content reproduction apparatus and computer program
CN101253567A (en) Recording medium storing management information for content attributes, recording device for the recording medium, and playback device
US20060271599A1 (en) Data transmission/reception system, data transmission/reception method, and recording/reproduction device
JP4261114B2 (en) Information selection system, server device, and program storage medium
JP2004326923A (en) Information processing apparatus, information processing method, program, and storage medium
JP4023233B2 (en) Information output device, information output method, program, and storage medium
CN101427230A (en) Hot content updates on target devices
JP2007066497A (en) Information processing device, playback device, communication method, computer program
JP4184062B2 (en) Distribution system, audio device, and content management method
JP4377884B2 (en) Reproducing apparatus and data receiving method
JP4978306B2 (en) Content file processing apparatus, content file processing method, and content file processing program
CN100593951C (en) Method for managing storing device
EP1992145A1 (en) Managing playlists

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180327

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190423

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20190507

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190514

R150 Certificate of patent or registration of utility model

Ref document number: 6589087

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees