JP2015231172A - File creation time correction device - Google Patents
File creation time correction device Download PDFInfo
- Publication number
- JP2015231172A JP2015231172A JP2014117232A JP2014117232A JP2015231172A JP 2015231172 A JP2015231172 A JP 2015231172A JP 2014117232 A JP2014117232 A JP 2014117232A JP 2014117232 A JP2014117232 A JP 2014117232A JP 2015231172 A JP2015231172 A JP 2015231172A
- Authority
- JP
- Japan
- Prior art keywords
- time
- file
- function
- file creation
- standard
- 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.)
- Pending
Links
Landscapes
- Electric Clocks (AREA)
- Television Signal Processing For Recording (AREA)
Abstract
Description
本発明は、局所時計機能および標準時刻取得機能を持つ装置において、ファイル作成時刻修正機能に関するものである。 The present invention relates to a file creation time correction function in an apparatus having a local clock function and a standard time acquisition function.
現代のあらゆる情報機器においては、内部に時計装置を搭載し、新たなファイルが作成された場合には、その時刻情報をファイルの属性の一部として記録している。このとき、一般的なコンシューマ向け情報機器に搭載される時計装置の正確さについては、時計内部に搭載される水晶発振子の精度に依存している。具体的には一般的な精度の製品を用いたとすると、月差±1分程度となる。 In all modern information devices, a clock device is installed inside, and when a new file is created, the time information is recorded as part of the file attribute. At this time, the accuracy of the timepiece device mounted on a general consumer information device depends on the accuracy of the crystal oscillator mounted inside the timepiece. Specifically, if a product with general accuracy is used, the monthly difference is about ± 1 minute.
一方、GPSやネットワーク経由で、外部から標準時刻を取得し、内部時計の狂いを定期的に修正する機能が実用化されている。 On the other hand, a function for acquiring a standard time from the outside via GPS or a network and periodically correcting an internal clock error has been put into practical use.
図4に従来例を示す。図5はローカル時計(402)およびネットワーク接続機能(409)を持ったコンピュータ装置の例である。プロセッサ(403)は、上記ネットワーク接続機能を用いて、定期的に通信を行い、標準時刻を取得する。401は、時計補正機能であり、取得した標準時刻でローカル時計を補正する。404は、ファイルシステムであり、最新の補正されたローカル時刻を、新たにファイルを生成する場合に、ファイル生成時刻情報として付加する。 FIG. 4 shows a conventional example. FIG. 5 shows an example of a computer device having a local clock (402) and a network connection function (409). The processor (403) periodically communicates using the network connection function to acquire the standard time. Reference numeral 401 denotes a clock correction function that corrects the local clock with the acquired standard time. Reference numeral 404 denotes a file system, which adds the latest corrected local time as file generation time information when a new file is generated.
いっぽう、408はタイムサーバ装置であり、407のGPS通信機能を用いて、定期的に衛星から標準時刻を取得する。コンピュータ装置内のネットワーク接続装置とタイムサーバ間において、標準時刻を送受する通信手段として、NTP(Network Time Protocol)が定義されている。コンピュータ装置では、このような仕組みを用いて、定期的に標準時刻情報を取得し、内部時計の狂いの修正を行なうことが可能である。 On the other hand, reference numeral 408 denotes a time server device, which regularly acquires a standard time from a satellite using the GPS communication function of 407. NTP (Network Time Protocol) is defined as a communication means for transmitting and receiving standard time between a network connection device in a computer device and a time server. In the computer device, using such a mechanism, it is possible to periodically acquire standard time information and correct the internal clock error.
内部時計修正後は、それ以降に作成されたファイルについては、当然ながら修正された時刻をファイル作成時刻とする。ただし、既作成ファイルについては、敢えて時刻修正を行わないことが多い。これはコンピュータ装置内で新規作成されるファイル数は多く、毎度すべてのファイルの作成時刻を修正するのは負荷が大きい。また、ファイル属性によっては、時刻が前後するとシステム上問題が生じる可能性がある。特に内部時計が進んでいた場合、ファイルの作成時刻を過去に戻すため、不都合が起こる可能性が高い。 After the internal clock has been corrected, for the files created after that, the corrected time is naturally taken as the file creation time. However, there are many cases where the time adjustment is not performed for the created file. This is because a large number of files are newly created in the computer device, and it is heavy to correct the creation times of all the files each time. Further, depending on the file attribute, there is a possibility that a system problem may occur when the time is around. In particular, when the internal clock is advanced, the file creation time is returned to the past, so there is a high possibility of inconvenience.
また、常時ネットワーク接続されたコンピュータ装置については、頻繁に時刻補正を行っているため標準時刻との誤差の絶対量が小さい、というような理由からによる。 In addition, for computer devices that are always connected to the network, the time is frequently corrected, so that the absolute amount of error from the standard time is small.
図5に、時計機能が組み込まれた撮像装置(たとえばディジタルカメラなど)の例を示す。図4と同様に、ネットワーク接続機能を持ち、タイムサーバから標準時刻を取得し、内部時計を補正する。 FIG. 5 shows an example of an imaging apparatus (for example, a digital camera) in which a clock function is incorporated. Similar to FIG. 4, it has a network connection function, acquires the standard time from the time server, and corrects the internal clock.
504はファイルシステムであり、記録メディアから所定のファイルに対してアクセスする。 A file system 504 accesses a predetermined file from a recording medium.
505は、ファイル作成時刻修正装置であり、上記修正した時刻情報を用いて、おのおののファイル作成時刻を修正する。 Reference numeral 505 denotes a file creation time correction device that corrects each file creation time using the corrected time information.
コンピュータ装置と異なり、必要に応じてすべてのファイルの作成日付を修正してもかまわない。 Unlike computer devices, the creation date of all files may be modified as needed.
その理由は、撮像装置において作成されたファイルは、静止画/動画などであり、ファイル作成時刻を修正してもシステムの動作に影響を及ぼすことがなく、むしろ正確な時刻に修正することのほうにユーザメリット(撮影時刻を正確に伝える)が大きいからである。 The reason is that the files created in the imaging device are still images / moving images, etc. Even if the file creation time is modified, it does not affect the operation of the system. This is because the user merit (accurately reports the shooting time) is great.
特許文献1においては、標準時刻を取得できない場合でも、自発的に時刻ずれを補正する方法が記載されている。 Patent Document 1 describes a method of correcting time lag spontaneously even when the standard time cannot be acquired.
特許文献2においては、撮像装置において撮影済みのファイルに対する撮影時刻の補正方法について記載されている。 Japanese Patent Application Laid-Open No. 2005-228561 describes a method for correcting a shooting time for a file that has been shot in an imaging apparatus.
しかしながら、このような従来例には、以下のような問題点があった。 However, such a conventional example has the following problems.
・ネットワーク経由で標準時刻を修正する場合に、修正間隔の間に作成されたファイルの正確な作成時刻を再現できない。 -When the standard time is corrected via the network, the exact creation time of the file created during the correction interval cannot be reproduced.
・特に、頻繁にネットワーク接続が行われない装置(カメラなどの撮像装置)においては、修正間隔が長くなる傾向があるため、蓄積誤差量が大きくなる。
といった問題があった。
In particular, in an apparatus (an imaging apparatus such as a camera) that is not frequently connected to the network, the correction interval tends to be long, so the amount of accumulated error increases.
There was a problem.
本発明のファイル作成時刻修正装置は、内部時計機能、外部から標準時刻を取得する機能、前記内部時計の時刻を取得済み標準時刻で修正する機能、ファイル作成機能、および既作成済ファイルの作成時刻を修正する機能を持った装置であって、標準時刻を取得するごとにその値を記録する機能と、前記すくなくとも2回の取得された標準時刻値、内部時計時刻値、および既作成済みファイルのファイル作成時刻値を入力として、前記既作成済みのファイル作成時刻補正値を演算により求め、ファイル作成時刻を前記補正値で置き換える機能を具備したことを特徴としている。 The file creation time correction device of the present invention includes an internal clock function, a function of acquiring a standard time from the outside, a function of correcting the time of the internal clock with the acquired standard time, a file creation function, and a creation time of an already created file And a function for recording the value every time the standard time is acquired, and the standard time value acquired at least twice, the internal clock time value, and the already created file The present invention is characterized in that a file creation time value is input, the already created file creation time correction value is obtained by calculation, and the file creation time is replaced with the correction value.
本発明によれば、複数回の記録された標準時刻から、補間演算されたファイル作成時刻を求めることにより、より正確なファイル作成時刻修正を行うことができる。 According to the present invention, it is possible to correct a file creation time more accurately by obtaining an interpolated file creation time from a plurality of standard times recorded.
[実施例1]
図1に本発明の実施例を載せる。101〜109は、従来の図5とそれぞれ501〜509と同等の機能を有している。111は、補正時刻記録装置であり、ネットワーク接続して取得した標準時刻を少なくとも1回分以上記録する。112はファイル作成時刻修正値演算部であり以下のような演算を行う。
[Example 1]
FIG. 1 shows an embodiment of the present invention. Reference numerals 101 to 109 have functions equivalent to those of the conventional FIG. 5 and 501 to 509, respectively. Reference numeral 111 denotes a correction time recording device that records at least one standard time acquired by connecting to a network. A file creation time correction value calculation unit 112 performs the following calculation.
図2にこの演算部で行っている演算処理に関して説明図を載せる。最新に取得された標準時刻をT(s)、標準時刻記録装置から読み出された直近の標準時刻をT(s-1)、内部時計が示す時刻をT(m)とし、また任意のファイルの作成時刻をT(f)とした場合、補正されたファイルの作成時刻T’(f)は、以下の式で表される。
T’(f)=T(f)+(T(f)−T(s-1))/(T(s)−T(s-1))*(T(s)−T(m))・・・(式1)
ここで、T(f)−T(s-1)は前回の標準時刻取得時刻からファイル作成時までの経過時間、T(s)−T(s-1)は取得した2回の標準時刻の差分経過時間、T(s)−T(m)は標準時刻と内部時計が示す時刻とのズレ量である。
FIG. 2 is an explanatory diagram regarding the arithmetic processing performed in this arithmetic unit. T (s) is the latest standard time acquired, T (s-1) is the latest standard time read from the standard time recording device, T (m) is the time indicated by the internal clock, and any file Assuming that the creation time is T (f), the corrected file creation time T ′ (f) is expressed by the following equation.
T ′ (f) = T (f) + (T (f) −T (s−1)) / (T (s) −T (s−1)) * (T (s) −T (m)) ... (Formula 1)
Here, T (f) -T (s-1) is the elapsed time from the previous standard time acquisition time to the file creation time, and T (s) -T (s-1) is the two standard times acquired. The difference elapsed time, T (s) −T (m), is the amount of deviation between the standard time and the time indicated by the internal clock.
図2の場合は、内部時刻が標準時刻よりも進んでいる場合(T(m) > T(s))を示しているが、標準時刻と内部時計が示す時刻とのズレ量に対して、ファイル作成時刻に対して、T(s-1)からT(s)までの経過時間で内分して、ズレ量に対して線形補間を行っていることがわかる。 In the case of FIG. 2, the internal time is ahead of the standard time (T (m)> T (s)), but with respect to the amount of deviation between the standard time and the time indicated by the internal clock, It can be seen that the file creation time is divided internally by the elapsed time from T (s-1) to T (s), and linear interpolation is performed for the deviation amount.
図3にこの補正アルゴリズムのフローチャートを載せる。S302は、標準時刻取得工程であり、ネットワークから標準時刻を取得しこれをT(s)とする。S303は前回取得された標準時刻をシステム上の記憶装置から読み出す工程であり、読み出された時刻をT(s-1)とする。S304は、内部時計(ローカル時計)から時刻を読み出す工程であり読み出された時刻をT(m)とする。S305は内部時計修正工程であり、内部時計の値をT(s)で置き換える。置き換え後の値をT’(m)とする。 FIG. 3 shows a flowchart of this correction algorithm. S302 is a standard time acquisition step, in which the standard time is acquired from the network, and this is defined as T (s). S303 is a step of reading the previously acquired standard time from the storage device on the system, and the read time is T (s-1). S304 is a step of reading the time from the internal clock (local clock), and the read time is T (m). S305 is an internal clock correction process, in which the value of the internal clock is replaced with T (s). The value after replacement is T ′ (m).
S306はファイル作成時刻取得工程であり、任意のファイルのオリジナルファイル作成時刻T(f)を取得する。S307は、当該ファイルがすでにファイル作成時刻を1度でも修正されたかどうかを判定する。従って、あらかじめすべての既存ファイルに対して、ファイル作成時刻が修正済みかどうかのフラグ情報を記録しておく必要がある。 S306 is a file creation time acquisition step, in which an original file creation time T (f) of an arbitrary file is acquired. In step S307, it is determined whether or not the file has already been modified even once. Therefore, it is necessary to record flag information indicating whether or not the file creation time has been corrected for all existing files in advance.
S308は補正値の計算工程であり、式1に示したごとくファイル作成時刻の補正値を求める。 S308 is a correction value calculation step, and the correction value of the file creation time is obtained as shown in Equation 1.
S309のファイル作成時刻補正工程においては、式1で求めた作成時刻を、対応するファイルに記載されているオリジナルの作成時刻に上書きする。S310では所定ファイルに対して補正済みフラグをセットする工程である。なお、当該補正済みフラグは、所定のファイル内に新たに書き込んでもかまわないが、別途ファイルとしてすべてのファイルに対して一括して管理してもかまわない。 In the file creation time correction step of S309, the creation time obtained by Equation 1 is overwritten with the original creation time described in the corresponding file. In step S310, a corrected flag is set for a predetermined file. The corrected flag may be newly written in a predetermined file, but may be managed collectively for all files as separate files.
S311は、最終ファイル判定工程であり、以上のような処理がすべての(あるいは指定された範囲の)ファイルに対して処理されたかどうかを判定する。 S311 is a final file determination step, in which it is determined whether or not the above processing has been performed on all files (or in a specified range).
S312は、今回取得した標準時刻を、ローカル時計に反映させるだけでなく、別途T(s)として保存しておく工程である。 S312 is a step of not only reflecting the currently acquired standard time on the local clock but also storing it as T (s) separately.
以上のような工程を経ることにより、前回の時刻補正時以降に作成されたファイルに対してのみ、時刻補正が行われることになる。 Through the above-described steps, time correction is performed only on files created after the previous time correction.
このような処理は、コンピュータのように常時タイムサーバと通信が可能な装置(時刻のズレが小さい)よりも、むしろディジタルカメラなど、常時ネットワークには接続されず、時刻補正間隔が長くなる装置において、より有効である。 Rather than a device that can always communicate with a time server (small time shift), such as a computer, such a process is not connected to a network at all times, such as a digital camera, and the time correction interval is long. Is more effective.
また、1度補正を行ったファイルについては、次の標準時刻取得時には補正を行わなくすることによって、時刻補正を行うファイル数を制限する効果を得、ファイルシステムに対する負荷を最小限におさえることも可能である。 For files that have been corrected once, the correction is not performed when the next standard time is acquired, so that the effect of limiting the number of files for time correction can be obtained and the load on the file system can be minimized. Is possible.
[実施例2]
実施例1では、連続的に2回取得した標準時刻T(s-1)、T(s)から直線補間によって、標準時刻とのズレ量を内分することによってT(f)を補正した。実際には、水晶振動子によっては初期精度意外にも、経年変化や温度変化によって、ズレ量が変動する可能性がある。
したがって、実施例2では、図6に示すごとく、複数回取得された標準時刻からズレ量の変動に対する非線形関数G(t)を求め、この関数を適用することにより、より正確に時刻補正が可能になる。このとき、補正値は、
T’(f) = T(f) + G(T(f) -T(s-1)) ・・・(式2)
と求められる。
[Example 2]
In Example 1, T (f) was corrected by internally dividing the amount of deviation from the standard time by linear interpolation from the standard times T (s-1) and T (s) acquired twice consecutively. Actually, depending on the crystal resonator, the amount of misalignment may fluctuate due to aging or temperature change, unexpectedly in the initial accuracy.
Therefore, in the second embodiment, as shown in FIG. 6, a nonlinear function G (t) with respect to the variation of the deviation amount is obtained from the standard time acquired a plurality of times, and the time can be corrected more accurately by applying this function. become. At this time, the correction value is
T '(f) = T (f) + G (T (f) -T (s-1)) (Formula 2)
Is required.
また、実施例1では、各々の作成済みファイルに対して、時刻補正がなされたかどうかのフラグを別途記録し、これを以降の時刻補正処理をするかどうかの判定材料として記録していた。これは、最新の取得標準時刻T(s)と各ファイルの補正時刻T’(f)を比較し、T’(f) > T(s)の場合(ファイル作成時刻が最新の標準時刻よりも後である)にのみ、補正をかけるという処理によって、代用することも可能であり、この場合は補正済みフラグが不要となる利点がある。 In the first embodiment, for each created file, a flag indicating whether or not time correction has been performed is separately recorded, and this is recorded as a material for determining whether or not to perform subsequent time correction processing. This compares the latest acquisition standard time T (s) with the correction time T '(f) of each file. If T' (f)> T (s) (the file creation time is less than the latest standard time) It is possible to substitute only by the process of applying the correction only (afterwards), and in this case, there is an advantage that the corrected flag is unnecessary.
101 時計補正機能、102 内部ローカル(局所)時計、103 プロセッサ、
104 ファイルシステム、105 ファイル生成/修正機能、106 撮像機能、
107 GPS受信機能、108 タイムサーバ、109 ネットワーク伝送機能、
110 撮像システム全体、S301 開始工程、S302 標準時刻取得工程、
S303 前回補正時刻読み出し工程、S304 ローカル時刻取得工程、
S305 ローカル時計補正工程、S306 ファイル作成日付取得工程、
S307 ファイル作成時刻処理済み有無判定工程、S308 補正値演算工程、
S309 ファイル作成時刻補正工程、
S310 補正済みフラグをセットし記録する工程、
S311 全ファイル処理したか判定する工程、S312 最新標準時刻記録工程、
S313 終了工程
101 Clock correction function, 102 Internal local (local) clock, 103 Processor,
104 file system, 105 file generation / modification function, 106 imaging function,
107 GPS reception function, 108 time server, 109 network transmission function,
110 overall imaging system, S301 start process, S302 standard time acquisition process,
S303 previous correction time reading step, S304 local time acquisition step,
S305 local clock correction step, S306 file creation date acquisition step,
S307 file creation time processed presence / absence determination step, S308 correction value calculation step,
S309 file creation time correction step,
S310 setting and recording a corrected flag;
S311 Step for determining whether all files have been processed, S312 Latest standard time recording step,
S313 end process
Claims (6)
今回取得された標準時刻をT(s)、内部時計時刻をT(m)、作成されたファイルの作成時刻をT(f)とすると、補正されたファイル作成時刻T(f)’は、
T(f)’ = T(f) + (T(f) − T(s-1)) / (T(s) − T(s-1))*(T(s) − T(m))
で求めることを特徴とする請求項1に記載のファイル作成時刻修正装置。 T (s-1), the standard time obtained last time,
If the standard time acquired this time is T (s), the internal clock time is T (m), and the creation time of the created file is T (f), the corrected file creation time T (f) '
T (f) '= T (f) + (T (f) − T (s-1)) / (T (s) − T (s-1)) * (T (s) − T (m))
The file creation time correction device according to claim 1, wherein the file creation time correction device is obtained by:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014117232A JP2015231172A (en) | 2014-06-06 | 2014-06-06 | File creation time correction device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014117232A JP2015231172A (en) | 2014-06-06 | 2014-06-06 | File creation time correction device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2015231172A true JP2015231172A (en) | 2015-12-21 |
Family
ID=54887747
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2014117232A Pending JP2015231172A (en) | 2014-06-06 | 2014-06-06 | File creation time correction device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2015231172A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020095385A1 (en) * | 2018-11-07 | 2020-05-14 | 株式会社マクニカ | Data logger device |
JP2020161973A (en) * | 2019-03-26 | 2020-10-01 | ブラザー工業株式会社 | Optical scanning device, control method, and program |
-
2014
- 2014-06-06 JP JP2014117232A patent/JP2015231172A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020095385A1 (en) * | 2018-11-07 | 2020-05-14 | 株式会社マクニカ | Data logger device |
JP2020161973A (en) * | 2019-03-26 | 2020-10-01 | ブラザー工業株式会社 | Optical scanning device, control method, and program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110674146B (en) | Data synchronization method, synchronization end, end to be synchronized, equipment and storage medium | |
CN107231533B (en) | synchronous exposure method and device and terminal equipment | |
CN107277385B (en) | Multi-camera system synchronous exposure control method and device and terminal equipment | |
US20220224512A1 (en) | Ring chain architecture | |
US20160065435A1 (en) | Communication device and communication system | |
US20150207877A1 (en) | Time synchronization client, a system and a non-transitory computer readable medium | |
EP2811672A1 (en) | Communication apparatus, communication system, and communication method for time synchronization | |
TWI557558B (en) | Logging system, loggiing device and data logging method | |
JP2015231172A (en) | File creation time correction device | |
US8578200B2 (en) | Conversion of timestamps between multiple entities within a computing system | |
US9537592B2 (en) | Systems and methods for synching a host computer with a variety of external devices | |
JP2011124812A5 (en) | ||
CN110212911B (en) | Frequency calibration method and device and storage medium | |
KR102388889B1 (en) | Time synchronizing device, time synchronizing method, and time synchronizing program stored in recording medium | |
JP5031388B2 (en) | Information processing apparatus, information processing method, and control program | |
DE112019006851T5 (en) | SLAVE EQUIPMENT, TIME SYNCHRONIZATION PROGRAM, EMBEDDED SYSTEM AND TIME SYNCHRONIZATION METHOD | |
CN109255579A (en) | A kind of data target determines method and apparatus | |
US11138264B2 (en) | Rapid video search system and method of using the same | |
US20230054344A1 (en) | Image processing apparatus, control method, and storage medium | |
US20230199047A1 (en) | Information processing system, server device, and computer program product | |
KR102544034B1 (en) | Broadcast control device, broadcast control method, program, and recording medium | |
JP2005073111A (en) | Digital data broadcast receiving method and digital data broadcast receiving apparatus | |
KR101473929B1 (en) | Method for meta information of original works automatic registration through derivative works, and the device thereof | |
JP6296182B2 (en) | Information processing apparatus, display method and program in information processing apparatus | |
CN116366899A (en) | Video clock generation method and device |