JP2017215712A - Sensor relay device and time stamp correction method - Google Patents

Sensor relay device and time stamp correction method Download PDF

Info

Publication number
JP2017215712A
JP2017215712A JP2016108251A JP2016108251A JP2017215712A JP 2017215712 A JP2017215712 A JP 2017215712A JP 2016108251 A JP2016108251 A JP 2016108251A JP 2016108251 A JP2016108251 A JP 2016108251A JP 2017215712 A JP2017215712 A JP 2017215712A
Authority
JP
Japan
Prior art keywords
sensor
packet
time
sensor terminal
reception time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2016108251A
Other languages
Japanese (ja)
Other versions
JP6408513B2 (en
Inventor
賢一 松永
Kenichi Matsunaga
賢一 松永
尚一 大嶋
Shoichi Oshima
尚一 大嶋
アハマド ムサ
Ahmed Musa
アハマド ムサ
近藤 利彦
Toshihiko Kondo
利彦 近藤
森村 浩季
Hiroki Morimura
浩季 森村
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2016108251A priority Critical patent/JP6408513B2/en
Publication of JP2017215712A publication Critical patent/JP2017215712A/en
Application granted granted Critical
Publication of JP6408513B2 publication Critical patent/JP6408513B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Arrangements For Transmission Of Measured Signals (AREA)
  • Small-Scale Networks (AREA)

Abstract

PROBLEM TO BE SOLVED: To avoid collision of time stamps with respect to the same sensor terminal.SOLUTION: A sensor relay device comprises: a reception time detection part 3 for detecting a reception time of a packet that is received from a sensor terminal; an interval calculation part 4 for calculating an interval ΔT of reception times of packets with respect to packets that are received from the same sensor terminal; a smoothing part 5 for smoothing the interval ΔT; a time calculation part 6 for correcting a reception time of a packet received from a sensor terminal by using a smoothed interval ΔT' with respect to the sensor terminal, and calculating a reception time of sensor data included in packets received from the sensor terminal for each piece of sensor data; and a time stamp application part 7 for applying a time stamp indicating a reception time of each piece of sensor data included in a packet received from a sensor terminal to each piece of sensor data in the packet based on a calculation result of the time calculation part 6 with respect to the packet.SELECTED DRAWING: Figure 1

Description

本発明は、センサ端末からのセンサデータを集約してサーバ装置等へ転送するセンサネットワークシステムに係り、特にセンサ端末から送信されたパケットを転送するセンサ中継装置においてパケットのデータに付与するタイムスタンプを補正する技術に関するものである。   The present invention relates to a sensor network system that aggregates sensor data from a sensor terminal and transfers it to a server device or the like, and in particular, a time stamp to be added to packet data in a sensor relay device that transfers packets transmitted from the sensor terminal. This is related to the correction technique.

全ての機器がインターネットに接続されるIoT(Internet of Things)社会では、各種のセンサがネットワークに接続され、多種多量のデータを収集し、そのデータを解析することで人間の役に立つ情報を引き出すことが期待されている。具体的には、加速度、角加速度、心電波形等のある程度リアルタイムの解析を要するデータについても近年の無線関係技術の進化をベースに利用が拡大してきている。例えば図8の例では、センサ端末100−1〜100−Nがセンサデータを無線送信し、センサ中継装置101がセンサ端末100−1〜100−Nからのセンサデータをネットワーク103を介してサーバ装置102に送信するようにしている。   In an IoT (Internet of Things) society in which all devices are connected to the Internet, various sensors are connected to the network, collecting a large amount of data and analyzing the data to extract useful information for humans. Expected. Specifically, the use of data that requires real-time analysis to some extent, such as acceleration, angular acceleration, and electrocardiographic waveform, has been expanded based on recent advances in wireless technology. For example, in the example of FIG. 8, the sensor terminals 100-1 to 100 -N wirelessly transmit sensor data, and the sensor relay device 101 transmits the sensor data from the sensor terminals 100-1 to 100 -N via the network 103 to the server device. 102 is transmitted.

センサ端末100−1〜100−Nからセンサデータを収集するセンサネットワークシステムにおいては、センサデータにタイムスタンプを付与する技術がセンサデータを解析する上でも非常に重要な技術になる。そのためには、各センサ端末間で正確に時刻同期を行うことが不可欠であり、時刻同期に関する研究が進められている(非特許文献1参照)。   In a sensor network system that collects sensor data from the sensor terminals 100-1 to 100-N, a technique for giving a time stamp to the sensor data is a very important technique for analyzing the sensor data. For this purpose, it is indispensable to accurately synchronize the time between the sensor terminals, and research on time synchronization is underway (see Non-Patent Document 1).

正確にタイムスタンプを付与するためにはセンサ端末100−1〜100−Nが計測した物理量がデジタルデータに変換された瞬間にタイムスタンプを付すことが可能なよう、各センサ端末100−1〜100−Nが正確な時計を持つことが最良の手法である。しかし、この手法では、図9に示すように、各センサ端末100−1〜100−Nが非常に正確な水晶発振子を始めとする素子からなる時計104−1〜104−Nを持つことが不可欠となり、コストの観点で使用が難しいという問題があった(非特許文献2参照)。   In order to give the time stamp accurately, each sensor terminal 100-1 to 100-100 can be attached at the moment when the physical quantity measured by the sensor terminals 100-1 to 100-N is converted into digital data. It is best to have -N have an accurate clock. However, in this method, as shown in FIG. 9, each sensor terminal 100-1 to 100-N has a clock 104-1 to 104-N composed of elements including a very accurate crystal oscillator. There is a problem that it is indispensable and difficult to use from the viewpoint of cost (see Non-Patent Document 2).

センサ端末100−1〜100−Nが正確な時計を持たない場合、センサ中継装置101がセンサデータにタイムスタンプを付与することになる。ここで考えるセンサ中継装置101には、図10に示すように複数の無線通信規格の通信回路105−A,105−B,・・・,105−Xが設けられており、センサ端末100−1A〜100−NAが無線通信規格Aの通信回路105−Aに接続され、センサ端末100−1B〜100−NBが無線通信規格Bの通信回路105−Bに接続される、というように各通信回路105−A,105−B,・・・,105−Xにそれぞれの無線通信規格A,B,・・・,Xに対応するセンサ端末が接続されている。これらのセンサ端末のセンサデータにタイムスタンプを付与することを考えると、時刻情報を提供する時計107が必要である。   When the sensor terminals 100-1 to 100-N do not have an accurate clock, the sensor relay device 101 gives a time stamp to the sensor data. The sensor relay device 101 considered here is provided with a plurality of communication circuits 105-A, 105-B,..., 105-X of the wireless communication standard as shown in FIG. Each communication circuit is connected to the communication circuit 105-A of the wireless communication standard A, and the sensor terminals 100-1B to 100-NB are connected to the communication circuit 105-B of the wireless communication standard B. Sensor terminals corresponding to the respective wireless communication standards A, B,..., X are connected to 105-A, 105-B,. Considering that a time stamp is given to sensor data of these sensor terminals, a clock 107 that provides time information is necessary.

センサ中継装置を使用してセンサデータにタイムスタンプを付与する際に、特にサンプリング速度の速い加速度、角加速度、心電波形、筋電波形のデータの場合、センサ端末から送信される1つのパケットの中に複数のデータが含まれていることが多々ある(非特許文献3参照)。このような場合、先頭のタイムスタンプをベースにして既知のサンプリング周期を加算していくことが必要となる。   When attaching a time stamp to sensor data using a sensor relay device, especially in the case of acceleration, angular acceleration, electrocardiogram waveform, myoelectric waveform data with a fast sampling rate, one packet transmitted from the sensor terminal There are many cases in which a plurality of data are included (see Non-Patent Document 3). In such a case, it is necessary to add a known sampling period based on the first time stamp.

例えばセンサ中継装置が、図11に示すようにセンサ端末100−1A,100−NA,100−1Bからパケットを受信し、これらパケットを受信した時刻の情報が得られた場合を考える。図12(A)に示すように、1つのパケット200中にN個のセンサデータD1〜DNが含まれていて、このパケット200の受信時刻がT1で、センサデータの既知のサンプリング周期がTSであれば、1番目からN番目までの各センサデータD1〜DNの受信時刻tD1,tD2,tD3,・・・,tDNは次式のようになる。
D1=T1
D2=T1+Ts
D3=T1+2Ts
DN=T1+(N−1)Ts ・・・(1)
For example, consider a case where the sensor relay device receives packets from the sensor terminals 100-1A, 100-NA, and 100-1B as shown in FIG. As shown in FIG. 12A, one packet 200 includes N pieces of sensor data D 1 to D N , and the reception time of this packet 200 is T 1 , and the sensor data is known at a sampling period. Is T S , the reception times t D1 , t D2 , t D3 ,..., T DN of the first to Nth sensor data D 1 to D N are as follows.
t D1 = T 1
t D2 = T 1 + T s
t D3 = T 1 + 2T s
t DN = T 1 + (N−1) T s (1)

鈴木誠,猿渡俊介,南正輝,森川博之,“無線センサネットワークにおける時刻同期技術の研究動向”,東京大学 先端科学技術研究センター 森川研究室 技術研究報告書,No.2008001,2008年Makoto Suzuki, Shunsuke Saruwatari, Masateru Minami, Hiroyuki Morikawa, “Research Trends of Time Synchronization Technology in Wireless Sensor Networks”, Morikawa Laboratory, Research Center for Advanced Science and Technology, The University of Tokyo, No. 2008001, 2008 “知識ベース 知識の森 4群−5編−3章 センサネットワーク”,電子情報通信学会,2010年,インターネット<http://www.ieice-hbkb.org/files/04/04gun_05hen_03.pdf>"Knowledge Base Knowledge Forest Group 4-5-Chapter 3 Sensor Network", IEICE, 2010, Internet <http://www.ieice-hbkb.org/files/04/04gun_05hen_03.pdf> “Sensor Network Module評価キット Application Note Android Application User Manual”,アルプス電気株式会社,2016年“Sensor Network Module Evaluation Kit Application Note Android Application User Manual”, Alps Electric Co., Ltd., 2016

以上のように、センサ中継装置においてセンサ端末からのセンサデータにタイムスタンプを付与する場合、パケットの受信時刻から、このパケット中に含まれる複数のセンサデータの受信時刻を算出し、この受信時刻を示すタイムスタンプを各センサデータに付与することになる。   As described above, when a time stamp is given to sensor data from a sensor terminal in the sensor relay device, the reception time of a plurality of sensor data included in the packet is calculated from the reception time of the packet, and the reception time is calculated. The time stamp shown is given to each sensor data.

しかし、伝送遅延やパケットエラーによる再送、センサ中継装置のマイクロコンピュータ内における他の処理からの割り込みを受けた場合に、タイムスタンプに遅延が生じ、同一のセンサ端末に関してタイムスタンプの衝突が発生することがあった。例えば図12(B)の例のように1つのセンサ端末からパケット201,202を連続して受信した場合に、パケット201の受信時刻T1とパケット202の受信時刻T2とがT2−T1<(N−1)Tsのとき、パケット201,202でタイムスタンプの衝突が発生する。 However, when a retransmission is caused by a transmission delay or packet error, or when an interrupt is received from another process in the microcomputer of the sensor relay device, a delay occurs in the time stamp, and a time stamp collision occurs with respect to the same sensor terminal. was there. For example, when packets 201 and 202 are continuously received from one sensor terminal as in the example of FIG. 12B, the reception time T 1 of packet 201 and the reception time T 2 of packet 202 are T 2 −T. When 1 <(N−1) T s , a time stamp collision occurs in the packets 201 and 202.

本発明は、上記課題を解決するためになされたもので、同一のセンサ端末に関するタイムスタンプの衝突を回避することができるセンサ中継装置およびタイムスタンプ補正方法を提供することを目的とする。   The present invention has been made to solve the above-described problems, and an object of the present invention is to provide a sensor relay device and a time stamp correction method that can avoid a time stamp collision related to the same sensor terminal.

本発明のセンサ中継装置は、センサ端末からパケットを受信する第1の通信回路と、前記パケットの受信時刻を検出する受信時刻検出部と、同一のセンサ端末から受信したパケットについて前記パケットの受信時刻の間隔を算出する間隔算出部と、前記受信時刻の間隔を平滑化する平滑化部と、センサ端末から受信した処理中のパケットの前記受信時刻を、このセンサ端末に関する前記平滑化後の間隔を用いて修正し、処理中のパケットに含まれるセンサデータの受信時刻をセンサデータ毎に算出する時刻算出部と、処理中のパケットに含まれる各センサデータの受信時刻を示すタイムスタンプを、このパケットに関する前記時刻算出部の算出結果を基にパケット中の各センサデータに付与するタイムスタンプ付与部と、前記タイムスタンプが付与されたパケットを転送する第2の通信回路とを備えることを特徴とするものである。   The sensor relay device of the present invention includes: a first communication circuit that receives a packet from a sensor terminal; a reception time detection unit that detects a reception time of the packet; and a reception time of the packet for packets received from the same sensor terminal An interval calculation unit for calculating the interval of the reception time, a smoothing unit for smoothing the interval of the reception time, and the reception time of the packet being processed received from the sensor terminal, the interval after the smoothing relating to the sensor terminal The time calculation unit that calculates the sensor data reception time included in the packet being processed for each sensor data and the time stamp indicating the reception time of each sensor data included in the packet being processed A time stamp assigning unit for attaching to each sensor data in a packet based on a calculation result of the time calculating unit, and the time stamp It is characterized in further comprising a second communication circuit for transferring the granted packets.

また、本発明のセンサ中継装置の1構成例は、さらに、センサ端末からのアクセス要求に応じて通信を行う際に、アクセス許可/不許可の判断を行う通信制御部と、アクセス不許可とされたセンサ端末のアクセス許可までの待ち時間を計測する待ち時間タイマとを備え、前記時刻算出部は、処理中のパケットを送信したセンサ端末がいったんアクセス不許可とされたセンサ端末であった場合に、処理中のパケットの前記修正後の受信時刻から当該センサ端末の前記待ち時間を減算し、減算処理した受信時刻を用いて、処理中のパケットに含まれるセンサデータの受信時刻をセンサデータ毎に算出することを特徴とするものである。
また、本発明のセンサ中継装置の1構成例は、さらに、各センサ端末の通信の優先順位を予め記憶する優先順位記憶部を備え、前記通信制御部は、前記優先順位記憶部に記憶された優先順位の情報に基づいて、センサ端末からのアクセス要求に対してアクセス許可/不許可の判断を行うことを特徴とするものである。
また、本発明のセンサ中継装置の1構成例において、前記通信制御部は、センサ端末から送信されるパケットのサイズに基づいて、センサ端末からのアクセス要求に対してアクセス許可/不許可の判断を行うことを特徴とするものである。
Further, in the configuration example of the sensor relay device of the present invention, a communication control unit that determines whether access is permitted / not permitted when communication is performed in response to an access request from a sensor terminal, and access is not permitted. A waiting time timer for measuring the waiting time until the access permission of the sensor terminal is received, and the time calculation unit is configured such that when the sensor terminal that has transmitted the packet being processed is a sensor terminal for which access is not permitted once The waiting time of the sensor terminal is subtracted from the corrected reception time of the packet being processed, and the reception time of the sensor data included in the packet being processed is determined for each sensor data using the reception time obtained by the subtraction process. It is characterized by calculating.
In addition, one configuration example of the sensor relay device of the present invention further includes a priority storage unit that stores in advance the communication priority of each sensor terminal, and the communication control unit is stored in the priority storage unit. Based on the priority information, access permission / denial is determined for the access request from the sensor terminal.
Further, in one configuration example of the sensor relay device of the present invention, the communication control unit determines whether to permit / deny access to an access request from the sensor terminal based on a size of a packet transmitted from the sensor terminal. It is characterized by doing.

また、本発明は、センサ端末から送信されたパケットを転送するセンサ中継装置において、パケットのデータに付与するタイムスタンプを補正するタイムスタンプ補正方法であって、センサ端末から送信されたパケットの受信時刻を検出する受信時刻検出ステップと、同一のセンサ端末から受信したパケットについて前記パケットの受信時刻の間隔を算出する間隔算出ステップと、前記受信時刻の間隔を平滑化する平滑化ステップと、センサ端末から受信した処理中のパケットの前記受信時刻を、このセンサ端末に関する前記平滑化後の間隔を用いて修正し、処理中のパケットに含まれるセンサデータの受信時刻をセンサデータ毎に算出する時刻算出ステップと、処理中のパケットに含まれる各センサデータの受信時刻を示すタイムスタンプを、このパケットに関する前記時刻算出ステップの算出結果を基にパケット中の各センサデータに付与するタイムスタンプ付与ステップとを含むことを特徴とするものである。   The present invention also relates to a time stamp correction method for correcting a time stamp to be added to packet data in a sensor relay device for transferring a packet transmitted from a sensor terminal, the reception time of the packet transmitted from the sensor terminal. A reception time detection step for detecting the packet, an interval calculation step for calculating an interval between the reception times of the packets received from the same sensor terminal, a smoothing step for smoothing the interval between the reception times, and a sensor terminal A time calculation step of correcting the reception time of the received packet being processed using the interval after the smoothing related to the sensor terminal, and calculating the reception time of the sensor data included in the packet being processed for each sensor data And a time stamp indicating the reception time of each sensor data included in the packet being processed And it is characterized in that it comprises a time stamping step of applying on the basis of the calculation result of the time calculation step for this packet to the sensor data in the packet.

また、本発明のタイムスタンプ補正方法の1構成例は、さらに、センサ端末からのアクセス要求に応じて通信を行う際に、アクセス許可/不許可の判断を行う通信制御ステップと、アクセス不許可とされたセンサ端末のアクセス許可までの待ち時間を計測する待ち時間計測ステップとを含み、前記時刻算出ステップは、処理中のパケットを送信したセンサ端末がいったんアクセス不許可とされたセンサ端末であった場合に、処理中のパケットの前記修正後の受信時刻から当該センサ端末の前記待ち時間を減算し、減算処理した受信時刻を用いて、処理中のパケットに含まれるセンサデータの受信時刻をセンサデータ毎に算出するステップを含むことを特徴とするものである。
また、本発明のタイムスタンプ補正方法の1構成例において、前記通信制御ステップは、各センサ端末の通信の優先順位を予め記憶する優先順位記憶部を参照し、この優先順位記憶部に記憶された優先順位の情報に基づいて、センサ端末からのアクセス要求に対してアクセス許可/不許可の判断を行うステップを含むことを特徴とするものである。
また、本発明のタイムスタンプ補正方法の1構成例において、前記通信制御ステップは、センサ端末から送信されるパケットのサイズに基づいて、センサ端末からのアクセス要求に対してアクセス許可/不許可の判断を行うステップを含むことを特徴とするものである。
In addition, one configuration example of the time stamp correction method of the present invention further includes a communication control step for determining whether access is permitted or not when performing communication in response to an access request from a sensor terminal, A waiting time measuring step for measuring a waiting time until the access permission of the sensor terminal is performed, and the time calculating step is a sensor terminal in which the sensor terminal that has transmitted the packet being processed is once denied access In this case, the waiting time of the sensor terminal is subtracted from the corrected reception time of the packet being processed, and the reception time of the sensor data included in the packet being processed is calculated using the reception time obtained by the subtraction process. The method includes a step of calculating each time.
Further, in one configuration example of the time stamp correction method of the present invention, the communication control step refers to a priority storage unit that stores in advance the communication priority of each sensor terminal, and is stored in the priority storage unit. The method includes a step of determining whether to permit / deny access to an access request from a sensor terminal based on priority order information.
Further, in one configuration example of the time stamp correction method of the present invention, the communication control step determines whether to permit / deny access to an access request from a sensor terminal based on a size of a packet transmitted from the sensor terminal. Including the step of performing

本発明によれば、センサ中継装置に受信時刻検出部と間隔算出部と平滑化部と時刻算出部とタイムスタンプ付与部とを設けることにより、遅延によってタイムスタンプの衝突が起こり得るセンサ中継装置において、同一のセンサ端末に関するタイムスタンプの衝突を回避することができる。   According to the present invention, in the sensor relay device in which a time stamp collision may occur due to delay by providing the sensor relay device with the reception time detecting unit, the interval calculating unit, the smoothing unit, the time calculating unit, and the time stamp assigning unit. , It is possible to avoid time stamp conflicts for the same sensor terminal.

また、本発明では、さらに、センサ中継装置に通信制御部と待ち時間タイマとを設け、時刻算出部が、処理中のパケットを送信したセンサ端末がいったんアクセス不許可とされたセンサ端末であった場合に、処理中のパケットの修正後の受信時刻から当該センサ端末の待ち時間を減算することにより、同一の無線方式を採用する複数のセンサ端末が同じ空間に存在する状況下において、タイムスタンプの一貫性を保証することが可能になる。   Further, in the present invention, the sensor relay device is further provided with a communication control unit and a waiting time timer, and the time calculation unit is a sensor terminal in which the sensor terminal that transmitted the packet being processed is once denied access In this case, by subtracting the waiting time of the sensor terminal from the corrected reception time of the packet being processed, the time stamp It becomes possible to guarantee consistency.

また、本発明では、さらに、センサ中継装置に優先順位記憶部を設け、通信制御部が、優先順位記憶部に記憶された優先順位の情報に基づいて、センサ端末からのアクセス要求に対してアクセス許可/不許可の判断を行うことにより、高速サンプリングを必要とするセンサデータを送信するセンサ端末について通信の優先順位を高くし、逆に通信頻度が低く、情報量が多くないセンサデータを送信するセンサ端末については通信の優先順位を下げて対応することが可能になる。   In the present invention, the sensor relay device further includes a priority order storage unit, and the communication control unit accesses the access request from the sensor terminal based on the priority order information stored in the priority order storage unit. By determining permission / non-permission, communication priority is increased for sensor terminals that transmit sensor data that requires high-speed sampling, and conversely, sensor data with a low communication frequency and a small amount of information is transmitted. Sensor terminals can be handled by lowering the communication priority.

また、本発明では、通信制御部が、センサ端末から送信されるパケットのサイズに基づいて、センサ端末からのアクセス要求に対してアクセス許可/不許可の判断を行うことにより、リアルタイム性が要求されるデータパケットの短いデータを優先して受信することが可能になる。   Further, in the present invention, the communication control unit determines whether access is permitted or not for the access request from the sensor terminal based on the size of the packet transmitted from the sensor terminal, so that real-time property is required. It is possible to preferentially receive short data of data packets.

本発明の第1の実施の形態に係るセンサ中継装置の構成を示すブロック図である。It is a block diagram which shows the structure of the sensor relay apparatus which concerns on the 1st Embodiment of this invention. 本発明の第1の実施の形態に係るセンサ中継装置の動作を説明するフローチャートである。It is a flowchart explaining operation | movement of the sensor relay apparatus which concerns on the 1st Embodiment of this invention. 受信時刻の間隔のヒストグラムである。It is a histogram of the interval of reception time. 本発明の第2の実施の形態に係るセンサ中継装置の構成を示すブロック図である。It is a block diagram which shows the structure of the sensor relay apparatus which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施の形態に係るセンサ中継装置の動作を説明するフローチャートである。It is a flowchart explaining operation | movement of the sensor relay apparatus which concerns on the 2nd Embodiment of this invention. 本発明の第3の実施の形態に係るセンサ中継装置の構成を示すブロック図である。It is a block diagram which shows the structure of the sensor relay apparatus which concerns on the 3rd Embodiment of this invention. 本発明の第4の実施の形態に係るセンサ中継装置の構成を示すブロック図である。It is a block diagram which shows the structure of the sensor relay apparatus which concerns on the 4th Embodiment of this invention. 従来のセンサネットワークシステムの構成を示すブロック図である。It is a block diagram which shows the structure of the conventional sensor network system. 各センサ端末が時計を有する場合のセンサネットワークシステムの構成を示すブロック図である。It is a block diagram which shows the structure of a sensor network system in case each sensor terminal has a timepiece. センサ中継装置が時計を有する場合のセンサネットワークシステムの構成を示すブロック図である。It is a block diagram which shows the structure of a sensor network system in case a sensor relay apparatus has a timepiece. センサ中継装置においてセンサ端末からのパケットを受信する例を説明する図である。It is a figure explaining the example which receives the packet from a sensor terminal in a sensor relay apparatus. 従来の問題点を説明する図である。It is a figure explaining the conventional problem.

[第1の実施の形態]
以下、本発明の実施の形態について図面を参照して説明する。図1は本発明の第1の実施の形態に係るセンサ中継装置の構成を示すブロック図である。センサ中継装置は、センサ端末と無線通信を行うための通信回路1−A,1−Bと、時計2と、センサ端末から受信したパケットの受信時刻を検出する受信時刻検出部3と、同一のセンサ端末から受信したパケットについてパケットの受信時刻の間隔ΔTを算出する間隔算出部4と、間隔ΔTを平滑化する平滑化部5と、センサ端末から受信したパケットの受信時刻を、このセンサ端末に関する平滑化後の間隔ΔT’を用いて修正し、このセンサ端末から受信したパケットに含まれるセンサデータの受信時刻をセンサデータ毎に算出する時刻算出部6と、センサ端末から受信したパケットに含まれる各センサデータの受信時刻を示すタイムスタンプを、このパケットに関する時刻算出部6の算出結果を基にパケット中の各センサデータに付与するタイムスタンプ付与部7と、タイムスタンプが付与されたパケットを転送するための通信回路8とから構成される。
[First Embodiment]
Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing the configuration of the sensor relay device according to the first embodiment of the present invention. The sensor relay device is the same as the communication circuits 1-A and 1-B for performing wireless communication with the sensor terminal, the clock 2, and the reception time detection unit 3 that detects the reception time of the packet received from the sensor terminal. An interval calculation unit 4 that calculates an interval ΔT of packet reception times for a packet received from the sensor terminal, a smoothing unit 5 that smoothes the interval ΔT, and a reception time of the packet received from the sensor terminal are related to this sensor terminal. It is corrected using the interval ΔT ′ after smoothing, and is included in the packet received from the sensor terminal, and the time calculation unit 6 that calculates the reception time of the sensor data included in the packet received from the sensor terminal for each sensor data. A time stamp indicating the reception time of each sensor data is assigned to each sensor data in the packet based on the calculation result of the time calculation unit 6 regarding this packet. It comprises a time stamp assigning unit 7 and a communication circuit 8 for transferring a packet to which a time stamp is assigned.

図2は本実施の形態のセンサ中継装置の動作を説明するフローチャートである。センサ中継装置には、センサ端末との間の無線通信規格が異なる複数の通信回路1が設けられるが、図1の例では、無線通信規格Aの通信回路1−Aと無線通信規格Bの通信回路1−Bのみ記載している。   FIG. 2 is a flowchart for explaining the operation of the sensor relay device of this embodiment. The sensor relay device is provided with a plurality of communication circuits 1 having different wireless communication standards with the sensor terminal. In the example of FIG. 1, the communication circuit 1-A of the wireless communication standard A and the communication of the wireless communication standard B are used. Only circuit 1-B is shown.

センサ中継装置の受信時刻検出部3は、時計2から得られる時刻情報を基に、各通信回路1−A,1−Bがそれぞれ対応するセンサ端末から受信したパケットの受信時刻を検出する(図2ステップS100)。   The reception time detection unit 3 of the sensor relay device detects the reception time of the packet received from the corresponding sensor terminal by each of the communication circuits 1-A and 1-B based on the time information obtained from the clock 2 (see FIG. 2 step S100).

間隔算出部4は、同一のセンサ端末から受信したパケットについて、あるパケットの受信時刻と次に受信したパケットの受信時刻との差分値である間隔ΔTをセンサ端末毎に算出する(図2ステップS101)。なお、受信したパケットがどのセンサ端末から送信されたかは、例えばパケットのヘッダに付与された送信元アドレスに基づいて識別できることは言うまでもない。   The interval calculation unit 4 calculates, for each sensor terminal, an interval ΔT that is a difference value between the reception time of a packet and the reception time of the next packet for packets received from the same sensor terminal (step S101 in FIG. 2). ). Needless to say, from which sensor terminal the received packet is transmitted can be identified, for example, based on the source address given to the header of the packet.

平滑化部5は、間隔算出部4が算出した間隔ΔTをセンサ端末毎に平滑化する(図2ステップS102)。この時間領域での平滑化処理は、周波数領域でのローパスフィルタ処理に相当する。   The smoothing unit 5 smoothes the interval ΔT calculated by the interval calculating unit 4 for each sensor terminal (step S102 in FIG. 2). This smoothing process in the time domain corresponds to a low-pass filter process in the frequency domain.

時刻算出部6は、センサ端末から受信したパケットの受信時刻を、このセンサ端末に関する平滑化処理後の間隔ΔT’を用いて、タイムスタンプの衝突が起こらないように修正する(図2ステップS103)。   The time calculation unit 6 corrects the reception time of the packet received from the sensor terminal using the interval ΔT ′ after the smoothing process related to the sensor terminal so that the time stamp does not collide (step S103 in FIG. 2). .

センサ端末から受信したパケットの受信時刻をTi-1、同センサ端末から次に受信したパケットの受信時刻をTiとすれば、間隔ΔTはΔT=Ti−Ti-1である。1つのパケット中にN個のセンサデータ(センサ端末において計測した加速度、角加速度、心電波形、筋電波形等の物理量をデジタルデータに変換したもの)が含まれている場合、間隔ΔTの出現頻度は、センサデータのサンプリング周期TSがN個分であるN・TSを中心に広がりを持った分布を描く(図3)。 If the reception time of the packet received from the sensor terminal is T i−1 and the reception time of the next packet received from the sensor terminal is T i , the interval ΔT is ΔT = T i −T i−1 . Appearance of interval ΔT when N pieces of sensor data (acceleration, angular acceleration, electrocardiogram waveform, electromyogram waveform, etc. measured in the sensor terminal are converted into digital data) are included in one packet The frequency draws a distribution having a spread centering on N · T S where the sampling period T S of sensor data is N (FIG. 3).

ここで、同一のセンサ端末について、間隔ΔTが(N−1)TS以上、(N+1)TS以下である場合には各データに対してタイムスタンプを衝突なく割り振ることが可能である。しかし、この範囲を外れるとタイムスタンプの衝突が発生するか、その次のサンプルで衝突が発生することとなる。 Here, for the same sensor terminal, when the interval ΔT is (N−1) T S or more and (N + 1) T S or less, it is possible to assign time stamps to each data without collision. However, if it falls outside this range, a time stamp collision will occur or a collision will occur in the next sample.

そこで、本実施の形態では、パケットの受信時刻の間隔ΔTに対して平滑化処理(周波数領域でのローパスフィルタ処理)を施し、平滑化処理後の間隔ΔT’を基にパケットの受信時刻を修正する。具体的には、1番目に受信したパケットの受信時刻をT1、2番目に受信したパケットの受信時刻をT2とすると、受信時刻の間隔ΔT1は式(2)のようになり、この間隔ΔT1を平滑化した間隔ΔT1’を用いると、修正後の受信時刻T1’,T2’は式(3)、式(4)のようになる。
ΔT1=T2−T1 ・・・(2)
1’=T1 ・・・(3)
2’=ΔT1’+T1’ ・・・(4)
Therefore, in this embodiment, smoothing processing (low-pass filter processing in the frequency domain) is performed on the packet reception time interval ΔT, and the packet reception time is corrected based on the interval ΔT ′ after the smoothing processing. To do. Specifically, assuming that the reception time of the first received packet is T 1 , and the reception time of the second received packet is T 2 , the reception time interval ΔT 1 is as shown in Equation (2). When the interval ΔT 1 ′ obtained by smoothing the interval ΔT 1 is used, the corrected reception times T 1 ′ and T 2 ′ are expressed by the equations (3) and (4).
ΔT 1 = T 2 −T 1 (2)
T 1 '= T 1 (3)
T 2 '= ΔT 1 ' + T 1 '(4)

同様に、3番目に受信したパケットの受信時刻をT3とすると、受信時刻の間隔ΔT2は式(5)のようになり、この間隔ΔT2を平滑化した間隔ΔT2’を用いると、修正後の受信時刻T3’は式(6)のようになる。
ΔT2=T3−T2 ・・・(5)
3’=ΔT2’+T2’ ・・・(6)
Similarly, assuming that the reception time of the third received packet is T 3 , the reception time interval ΔT 2 is as shown in Equation (5). By using the interval ΔT 2 ′ obtained by smoothing this interval ΔT 2 , The corrected reception time T 3 ′ is as shown in Equation (6).
ΔT 2 = T 3 −T 2 (5)
T 3 '= ΔT 2 ' + T 2 '(6)

同様に、4番目に受信したパケットの受信時刻をT4とすると、受信時刻の間隔ΔT3は式(7)のようになり、この間隔ΔT3を平滑化した間隔ΔT3’を用いると、修正後の受信時刻T4’は式(8)のようになる。
ΔT3=T4−T3 ・・・(7)
4’=ΔT3’+T3’ ・・・(8)
Similarly, assuming that the reception time of the fourth received packet is T 4 , the reception time interval ΔT 3 is as shown in Equation (7). By using the interval ΔT 3 ′ obtained by smoothing this interval ΔT 3 , The corrected reception time T 4 ′ is as shown in Expression (8).
ΔT 3 = T 4 −T 3 (7)
T 4 '= ΔT 3 ' + T 3 '(8)

以上を一般化し、(i−1)番目に受信したパケットの受信時刻をTi-1、i番目に受信したパケットの受信時刻をTiとすると、受信時刻の間隔ΔTi-1は式(9)のようになり、この間隔ΔTi-1を平滑化した間隔ΔTi-1’を用いると、修正後の受信時刻Ti’は式(10)のようになる。
ΔTi-1=Ti−Ti-1 ・・・(9)
i’=ΔTi-1’+Ti-1’ ・・・(10)
Generalizing the above, if the reception time of the (i−1) -th received packet is T i−1 and the reception time of the i- th received packet is T i , the reception time interval ΔT i-1 can be expressed as is as 9), 'the use of, receiving time T i of the corrected' interval [Delta] T i-1 of this interval [Delta] T i-1 obtained by smoothing is as equation (10).
ΔT i-1 = T i -T i-1 (9)
T i '= ΔT i-1 ' + T i-1 '(10)

一例として、平滑化処理として移動平均フィルタを用いる場合を考える。この方法によれば、図3の出現頻度に示すように、中心極限定理により、間隔ΔTの平滑化後の分布がN・TSを中心に分布するようになる。つまり、タイムスタンプが衝突を起こす可能性がある値が生じにくくなるため、非常に有効である。なお、図3では、30,31が平滑化前の分布を示し、32が平滑化後の分布を示している。 As an example, consider a case where a moving average filter is used as the smoothing process. According to this method, as shown in the appearance frequency of FIG. 3, the distribution after the smoothing of the interval ΔT is distributed around N · T S by the central limit theorem. That is, it is very effective because a value that may cause a collision of the time stamp is less likely to occur. In FIG. 3, 30 and 31 indicate distributions before smoothing, and 32 indicates a distribution after smoothing.

時刻算出部6は、ステップS103で修正したパケットの受信時刻Ti’とこのパケットに含まれるセンサデータの既知のサンプリング周期TSとから、パケットに含まれるセンサデータの受信時刻をセンサデータ毎に算出する(図2ステップS104)。1つのパケット中にN個のセンサデータが含まれているとすれば、1番目からN番目までの各センサデータの受信時刻tD1,tD2,tD3,・・・,tDNは次式のようになる。
D1=Ti
D2=Ti’+Ts
D3=Ti’+2Ts
DN=Ti’+(N−1)Ts ・・・(11)
The time calculation unit 6 calculates the reception time of the sensor data included in the packet for each sensor data from the reception time T i ′ of the packet corrected in step S103 and the known sampling period T S of the sensor data included in the packet. Calculate (step S104 in FIG. 2). If it contains N sensors data in one packet, the reception time t D1 of the sensor data from the first to N-th, t D2, t D3, ··· , t DN the following formula become that way.
t D1 = T i '
t D2 = T i '+ T s
t D3 = T i '+ 2T s
t DN = T i ′ + (N−1) T s (11)

タイムスタンプ付与部7は、センサ端末から受信したパケットに含まれる各センサデータの受信時刻を示すタイムスタンプを、このパケットに関する時刻算出部6の算出結果を基にパケット中の各センサデータに付与する(図2ステップS105)。
間隔算出部4と平滑化部5と時刻算出部6とタイムスタンプ付与部7とは、以上の処理をセンサ端末毎に独立に行う。
The time stamp assigning unit 7 assigns a time stamp indicating the reception time of each sensor data included in the packet received from the sensor terminal to each sensor data in the packet based on the calculation result of the time calculating unit 6 regarding the packet. (FIG. 2, step S105).
The interval calculation unit 4, the smoothing unit 5, the time calculation unit 6, and the time stamp assigning unit 7 perform the above processing independently for each sensor terminal.

そして、通信回路8は、タイムスタンプが付与されたパケットを、ネットワークを介して送信先(例えばサーバ装置)に転送する(図2ステップS106)。
以上のように、本実施の形態によれば、遅延によってタイムスタンプの衝突が起こり得るセンサ中継装置において、同一のセンサ端末に関するタイムスタンプの衝突を回避することができる。
Then, the communication circuit 8 transfers the packet with the time stamp to the transmission destination (for example, server device) via the network (step S106 in FIG. 2).
As described above, according to the present embodiment, it is possible to avoid time stamp collisions related to the same sensor terminal in a sensor relay device in which time stamp collisions may occur due to delay.

[第2の実施の形態]
次に、本発明の第2の実施の形態について説明する。図4は本発明の第2の実施の形態に係るセンサ中継装置の構成を示すブロック図であり、図1と同一の構成には同一の符号を付してある。本実施の形態のセンサ中継装置は、通信回路1−A,1−Bと、時計2と、受信時刻検出部3と、間隔算出部4と、平滑化部5と、時刻算出部6aと、タイムスタンプ付与部7と、通信回路8と、センサ端末からのアクセス要求に応じて通信を行う際に、アクセス許可/不許可の判断を行う通信制御部9と、アクセス不許可とされたセンサ端末のアクセス許可までの待ち時間を計測する待ち時間タイマ10とから構成される。
[Second Embodiment]
Next, a second embodiment of the present invention will be described. FIG. 4 is a block diagram showing the configuration of the sensor relay device according to the second embodiment of the present invention. The same components as those in FIG. 1 are denoted by the same reference numerals. The sensor relay device of the present embodiment includes communication circuits 1-A, 1-B, a clock 2, a reception time detection unit 3, an interval calculation unit 4, a smoothing unit 5, a time calculation unit 6a, The communication control unit 9 that determines whether access is permitted or not permitted when performing communication in response to an access request from the time stamp assigning unit 7, the communication circuit 8, and the sensor terminal, and the sensor terminal that is not permitted access And a waiting time timer 10 for measuring a waiting time until access is permitted.

本実施の形態では、第1の実施の形態の手法に加えて、同一の無線方式の複数のセンサ端末に対してアクセス要求ベースの接続制御を適用し、待ち時間タイマ10の値を減算することによってタイムスタンプの一貫性を確保する。   In this embodiment, in addition to the technique of the first embodiment, access request based connection control is applied to a plurality of sensor terminals of the same wireless system, and the value of the waiting time timer 10 is subtracted. To ensure time stamp consistency.

図5は本実施の形態のセンサ中継装置の動作を説明するフローチャートである。本実施の形態のセンサ中継装置と接続される各センサ端末は、センサデータを含むパケットを送信する際にアクセス要求を送信する。
なお、アクセス要求と同時にパケットを送信してもよいが、パケットの送信を、アクセス要求の送信とみなしてもよい。
FIG. 5 is a flowchart for explaining the operation of the sensor relay device of this embodiment. Each sensor terminal connected to the sensor relay device of the present embodiment transmits an access request when transmitting a packet including sensor data.
Although the packet may be transmitted simultaneously with the access request, the packet transmission may be regarded as the access request transmission.

センサ中継装置の通信制御部9は、センサ端末からアクセス要求があったときに(図5ステップS107においてYES)、センサ端末からのアクセスを許可するかどうかを判定する(図5ステップS108)。センサ端末からのアクセスを許可する場合の動作は第1の実施の形態で説明したとおりであるので、説明は省略する。   When there is an access request from the sensor terminal (YES in step S107 in FIG. 5), the communication control unit 9 of the sensor relay device determines whether to permit access from the sensor terminal (step S108 in FIG. 5). Since the operation for permitting access from the sensor terminal is as described in the first embodiment, the description thereof is omitted.

通信制御部9は、例えば同一の無線方式の複数のセンサ端末からアクセス要求があったときに、このうち1つのセンサ端末に対してアクセスを許可し、他のセンサ端末からのアクセスを不許可とする。通信制御部9は、アクセス許可と判断したセンサ端末に対してアクセス許可を示すパケットを無線送信し、アクセス不許可と判断したセンサ端末に対してアクセス不許可を示すパケットを無線送信する。アクセス不許可の通知を受けたセンサ端末は、アクセス要求を再度送信する。   For example, when there is an access request from a plurality of sensor terminals of the same wireless method, the communication control unit 9 permits access to one of the sensor terminals and denies access from other sensor terminals. To do. The communication control unit 9 wirelessly transmits a packet indicating access permission to the sensor terminal determined to be permitted to access, and wirelessly transmits a packet indicating access permission to the sensor terminal determined to be access not permitted. The sensor terminal that has received the notification of unauthorized access transmits an access request again.

待ち時間タイマ10は、アクセス不許可とされたセンサ端末があった場合、このセンサ端末のアクセス許可までの待ち時間を計測する(図5ステップS109)。待ち時間タイマ10は、このような待ち時間の計測をアクセス不許可とされたセンサ端末毎に行う。なお、1つのセンサ端末についてアクセス不許可の判断が繰り返される場合には、このセンサ端末が最初に送信したアクセス要求からこのアクセス要求が最終的に許可されるまでの待ち時間を計測することになる。   When there is a sensor terminal for which access is not permitted, the waiting time timer 10 measures the waiting time until access to this sensor terminal is permitted (step S109 in FIG. 5). The waiting time timer 10 performs such waiting time measurement for each sensor terminal for which access is not permitted. In the case where the determination of access disapproval is repeated for one sensor terminal, the waiting time from the access request first transmitted by this sensor terminal until the access request is finally permitted is measured. .

ステップS100〜S102の処理は第1の実施の形態で説明したとおりである。時刻算出部6aは、第1の実施の形態と同様に、センサ端末から受信したパケットの受信時刻を、このセンサ端末に関する平滑化処理後の間隔ΔT’を用いて修正するが(図5ステップS103)、さらに当該センサ端末がいったんアクセス不許可とされたセンサ端末で、待ち時間タイマ10によって待ち時間が計測されていた場合には(図5ステップS110においてYES)、ステップS103で修正した受信時刻から待ち時間を減算する(図5ステップS111)。   The processing in steps S100 to S102 is as described in the first embodiment. Similar to the first embodiment, the time calculation unit 6a corrects the reception time of the packet received from the sensor terminal by using the interval ΔT ′ after the smoothing process related to the sensor terminal (step S103 in FIG. 5). In addition, when the sensor terminal is a sensor terminal whose access is not permitted once and the waiting time is measured by the waiting time timer 10 (YES in step S110 in FIG. 5), from the reception time corrected in step S103 The waiting time is subtracted (step S111 in FIG. 5).

ステップS103で修正したパケットの受信時刻をTi’、待ち時間をWaitiとすれば、減算後の受信時刻Ti”は以下のようになる。
i”=Ti’−Waiti ・・・(12)
If the reception time of the packet modified in step S103 is T i ′ and the waiting time is Wait i , the reception time T i ″ after subtraction is as follows.
T i ″ = T i ′ −Wait i (12)

時刻算出部6aは、待ち時間タイマ10で計測中または保持中の待ち時間のうち、ステップS111で受信時刻の減算処理の対象となったセンサ端末の待ち時間Waitiを0に初期化する(図5ステップS112)。 The time calculation unit 6a initializes the waiting time Wait i of the sensor terminal subjected to the subtraction processing of the reception time in step S111 among the waiting times being measured or held by the waiting time timer 10 to 0 (FIG. 5 step S112).

そして、時刻算出部6aは、処理中のパケットを送信したセンサ端末がいったんアクセス不許可とされたセンサ端末であった場合、ステップS103で修正したパケットの受信時刻Ti’の代わりに、減算処理した受信時刻Ti”を用いて、パケットに含まれるセンサデータの受信時刻をセンサデータ毎に算出する(図5ステップS104)。このときの処理は、式(11)に対して以下の式(13)のようになる。
D1=Ti
D2=Ti”+Ts
D3=Ti”+2Ts
DN=Ti”+(N−1)Ts ・・・(13)
Then, when the sensor terminal that transmitted the packet being processed is a sensor terminal for which access is not permitted, the time calculation unit 6a performs subtraction processing instead of the packet reception time T i ′ corrected in step S103. The reception time of the sensor data included in the packet is calculated for each sensor data using the received time T i ″ (step S104 in FIG. 5). The processing at this time is expressed by the following equation (11): 13).
t D1 = T i
t D2 = T i "+ T s
t D3 = T i "+ 2T s
t DN = T i ″ + (N−1) T s (13)

その他の処理は第1の実施の形態で説明したとおりである。本実施の形態によれば、同一の無線方式を採用する複数のセンサ端末が同じ空間に存在する状況下において、アクセス制御を導入することにより、タイムスタンプの一貫性を保証することが可能になる。加えて、本実施の形態において追加が必要となるのは通信制御部9と待ち時間タイマ10のみであるため、大量のハードウェアリソースを必要とせず、経済的である。   Other processes are as described in the first embodiment. According to the present embodiment, it is possible to guarantee time stamp consistency by introducing access control in a situation where a plurality of sensor terminals adopting the same wireless method exist in the same space. . In addition, since only the communication control unit 9 and the waiting time timer 10 need to be added in the present embodiment, a large amount of hardware resources are not required and it is economical.

[第3の実施の形態]
次に、本発明の第3の実施の形態について説明する。図6は本発明の第3の実施の形態に係るセンサ中継装置の構成を示すブロック図であり、図1、図4と同一の構成には同一の符号を付してある。本実施の形態のセンサ中継装置は、通信回路1−A,1−Bと、時計2と、受信時刻検出部3と、間隔算出部4と、平滑化部5と、時刻算出部6aと、タイムスタンプ付与部7と、通信回路8と、通信制御部9と、待ち時間タイマ10と、各センサ端末の通信の優先順位を予め記憶する優先順位記憶部11とから構成される。
[Third Embodiment]
Next, a third embodiment of the present invention will be described. FIG. 6 is a block diagram showing the configuration of the sensor relay device according to the third embodiment of the present invention. The same components as those in FIGS. 1 and 4 are denoted by the same reference numerals. The sensor relay device of the present embodiment includes communication circuits 1-A, 1-B, a clock 2, a reception time detection unit 3, an interval calculation unit 4, a smoothing unit 5, a time calculation unit 6a, The time stamp adding unit 7, the communication circuit 8, the communication control unit 9, the waiting time timer 10, and a priority storage unit 11 that stores in advance the communication priority of each sensor terminal.

本実施の形態では、第2の実施の形態の手法においてセンサ端末からセンサ中継装置へのアクセスの許可/不許可の判断をセンサ端末ごとの優先順位によって判断する。本実施の形態においても処理の流れは第2の実施の形態と同様であるので、図5の符号を用いて説明する。   In this embodiment, in the method of the second embodiment, whether access from the sensor terminal to the sensor relay device is permitted or not is determined based on the priority order of each sensor terminal. Since the processing flow in this embodiment is the same as that in the second embodiment, description will be made using the reference numerals in FIG.

第2の実施の形態で説明したとおり、センサ中継装置の通信制御部9は、センサ端末からアクセス要求があったときに、このセンサ端末からのアクセスを許可するかどうかを判定するが(図5ステップS108)、例えば同一の無線方式の複数のセンサ端末からアクセス要求があったときに、このうち1つのセンサ端末に対してアクセスを許可し、他のセンサ端末からのアクセスを不許可とする。   As described in the second embodiment, when there is an access request from the sensor terminal, the communication control unit 9 of the sensor relay device determines whether to permit access from the sensor terminal (FIG. 5). Step S108), for example, when there are access requests from a plurality of sensor terminals of the same wireless system, access is permitted to one of the sensor terminals, and access from other sensor terminals is not permitted.

ここで、本実施の形態では、各センサ端末の通信の優先順位の情報が優先順位記憶部11に予め登録されており、通信制御部9は、同一の無線方式の複数のセンサ端末からアクセス要求があった場合、これらのセンサ端末のうち最も優先順位が高いセンサ端末に対してアクセスを許可し、他のセンサ端末からのアクセスを不許可とする。
その他の処理は第2の実施の形態で説明したとおりである。
Here, in this embodiment, communication priority information of each sensor terminal is registered in advance in the priority storage unit 11, and the communication control unit 9 requests access from a plurality of sensor terminals of the same wireless system. If there is, access is permitted to the sensor terminal with the highest priority among these sensor terminals, and access from other sensor terminals is not permitted.
Other processes are as described in the second embodiment.

こうして、本実施の形態では、加速度、角加速度、心電波形、筋電波形等の高速サンプリングを必要とするセンサデータを送信するセンサ端末について通信の優先順位を高くし、逆に温度等の通信頻度が低く、情報量が多くないセンサデータを送信するセンサ端末については通信の優先順位を下げて対応することが可能になる。   Thus, in this embodiment, communication priority is increased for sensor terminals that transmit sensor data that requires high-speed sampling, such as acceleration, angular acceleration, electrocardiogram waveform, and electromyogram waveform, and conversely, communication such as temperature is performed. A sensor terminal that transmits sensor data that is low in frequency and does not have a large amount of information can be handled by lowering the communication priority.

[第4の実施の形態]
次に、本発明の第4の実施の形態について説明する。図7は本発明の第4の実施の形態に係るセンサ中継装置の構成を示すブロック図であり、図1、図4、図6と同一の構成には同一の符号を付してある。本実施の形態のセンサ中継装置は、通信回路1−A,1−Bと、時計2と、受信時刻検出部3と、間隔算出部4と、平滑化部5と、時刻算出部6aと、タイムスタンプ付与部7と、通信回路8と、通信制御部9aと、待ち時間タイマ10とから構成される。
[Fourth Embodiment]
Next, a fourth embodiment of the present invention will be described. FIG. 7 is a block diagram showing the configuration of the sensor relay device according to the fourth embodiment of the present invention. The same components as those in FIGS. 1, 4, and 6 are denoted by the same reference numerals. The sensor relay device of the present embodiment includes communication circuits 1-A, 1-B, a clock 2, a reception time detection unit 3, an interval calculation unit 4, a smoothing unit 5, a time calculation unit 6a, The time stamp adding unit 7, the communication circuit 8, the communication control unit 9 a, and a waiting time timer 10 are included.

本実施の形態では、第2の実施の形態の手法においてセンサ端末からセンサ中継装置へのアクセスの許可/不許可の判断をパケットのサイズによって判断する。本実施の形態においても処理の流れは第2の実施の形態と同様であるので、図5の符号を用いて説明する。   In this embodiment, in the technique of the second embodiment, whether access from the sensor terminal to the sensor relay device is permitted or not is determined based on the packet size. Since the processing flow in this embodiment is the same as that in the second embodiment, description will be made using the reference numerals in FIG.

第2の実施の形態と同様に、センサ中継装置の通信制御部9aは、センサ端末からアクセス要求があったときに、このセンサ端末からのアクセスを許可するかどうかを判断する(図5ステップS108)。ここで、本実施の形態では、パケットのサイズを基準としてアクセス許可/不許可を判断する。具体的には、通信制御部9aは、同一の無線方式の複数のセンサ端末からアクセス要求があった場合、これらのセンサ端末のうちパケットのサイズが最も短いセンサ端末に対してアクセスを許可し、他のセンサ端末からのアクセスを不許可とする。   Similar to the second embodiment, the communication control unit 9a of the sensor relay device determines whether or not to permit access from the sensor terminal when there is an access request from the sensor terminal (step S108 in FIG. 5). ). In this embodiment, access permission / denial is determined based on the packet size. Specifically, when there is an access request from a plurality of sensor terminals of the same wireless method, the communication control unit 9a permits access to the sensor terminal having the shortest packet size among these sensor terminals, Disallow access from other sensor terminals.

本実施の形態の場合、パケットのサイズを検出する必要があるので、アクセス許可/不許可に関わらず、全てのセンサ端末からのパケットを、対応する無線通信規格の通信回路1−A,1−Bで受信する。そして、通信制御部9aでアクセス許可と判断されたパケットのみ有効となって、受信時刻検出部3がこのパケットの受信時刻を検出し(図5ステップS100)、アクセスが不許可となったセンサ端末からのパケットは廃棄される。通信制御部9aからアクセス不許可の通知を受けたセンサ端末は、アクセス要求とパケットとを再度送信することになる。
その他の処理は第2の実施の形態で説明したとおりである。
In the case of the present embodiment, since it is necessary to detect the size of the packet, packets from all sensor terminals are transmitted to the corresponding communication circuits 1-A, 1- 1 of the corresponding wireless communication standards regardless of whether access is permitted or not. Receive at B. Then, only the packet for which access is permitted by the communication control unit 9a is valid, and the reception time detection unit 3 detects the reception time of this packet (step S100 in FIG. 5), and the sensor terminal whose access is not permitted. Packets from are discarded. The sensor terminal that has received the notification of access disapproval from the communication control unit 9a transmits the access request and the packet again.
Other processes are as described in the second embodiment.

本実施の形態では、パケットのサイズが短い場合には優先的にパケット受信を行い、逆にパケットのサイズが長い場合にパケット受信の優先度を下げるので、リアルタイム性が要求されるデータパケットの短いデータを優先して受信することが可能となるため、リアルタイム性が必要なデータと一旦溜めてからの出力が適したデータとが混在した環境で有用である。   In this embodiment, when the packet size is short, the packet reception is performed preferentially. Conversely, when the packet size is long, the packet reception priority is lowered, so that the data packet requiring real-time property is short. Since data can be received preferentially, it is useful in an environment where data that requires real-time characteristics and data that is suitable for output after being stored once are mixed.

第1〜第4の実施の形態で説明したセンサ中継装置の構成のうち、少なくとも時計2と受信時刻検出部3と間隔算出部4と平滑化部5と時刻算出部6,6aとタイムスタンプ付与部7と通信制御部9,9aと待ち時間タイマ10と優先順位記憶部11とは、CPU(Central Processing Unit)、記憶装置及びインタフェースを備えたコンピュータと、これらのハードウェア資源を制御するプログラムによって実現することができる。CPUは、記憶装置に格納されたプログラムに従って第1〜第4の実施の形態で説明した処理を実行する。   Among the configurations of the sensor relay devices described in the first to fourth embodiments, at least the clock 2, the reception time detection unit 3, the interval calculation unit 4, the smoothing unit 5, the time calculation units 6 and 6a, and the time stamp assignment The unit 7, the communication control units 9 and 9a, the waiting time timer 10 and the priority order storage unit 11 are based on a computer having a CPU (Central Processing Unit), a storage device and an interface, and a program for controlling these hardware resources. Can be realized. The CPU executes the processes described in the first to fourth embodiments in accordance with a program stored in the storage device.

本発明は、センサ端末からセンサデータを収集するセンサネットワークシステムに適用することができる。   The present invention can be applied to a sensor network system that collects sensor data from a sensor terminal.

1−A,1−B,8…通信回路、2…時計、3…受信時刻検出部、4…間隔算出部、5…平滑化部、6,6a…時刻算出部、7…タイムスタンプ付与部、9,9a…通信制御部、10…待ち時間タイマ、11…優先順位記憶部。   DESCRIPTION OF SYMBOLS 1-A, 1-B, 8 ... Communication circuit, 2 ... Clock, 3 ... Reception time detection part, 4 ... Interval calculation part, 5 ... Smoothing part, 6, 6a ... Time calculation part, 7 ... Time stamp provision part , 9, 9a ... communication control unit, 10 ... waiting time timer, 11 ... priority storage unit.

Claims (8)

センサ端末からパケットを受信する第1の通信回路と、
前記パケットの受信時刻を検出する受信時刻検出部と、
同一のセンサ端末から受信したパケットについて前記パケットの受信時刻の間隔を算出する間隔算出部と、
前記受信時刻の間隔を平滑化する平滑化部と、
センサ端末から受信した処理中のパケットの前記受信時刻を、このセンサ端末に関する前記平滑化後の間隔を用いて修正し、処理中のパケットに含まれるセンサデータの受信時刻をセンサデータ毎に算出する時刻算出部と、
処理中のパケットに含まれる各センサデータの受信時刻を示すタイムスタンプを、このパケットに関する前記時刻算出部の算出結果を基にパケット中の各センサデータに付与するタイムスタンプ付与部と、
前記タイムスタンプが付与されたパケットを転送する第2の通信回路とを備えることを特徴とするセンサ中継装置。
A first communication circuit for receiving a packet from the sensor terminal;
A reception time detector for detecting the reception time of the packet;
An interval calculation unit that calculates an interval of reception times of the packets for packets received from the same sensor terminal;
A smoothing unit that smoothes the interval between the reception times;
The reception time of the packet being processed received from the sensor terminal is corrected using the interval after the smoothing relating to the sensor terminal, and the reception time of the sensor data included in the packet being processed is calculated for each sensor data. A time calculation unit;
A time stamp giving unit for giving a time stamp indicating a reception time of each sensor data included in the packet being processed to each sensor data in the packet based on a calculation result of the time calculating unit regarding the packet;
And a second communication circuit for transferring the packet with the time stamp.
請求項1記載のセンサ中継装置において、
さらに、センサ端末からのアクセス要求に応じて通信を行う際に、アクセス許可/不許可の判断を行う通信制御部と、
アクセス不許可とされたセンサ端末のアクセス許可までの待ち時間を計測する待ち時間タイマとを備え、
前記時刻算出部は、処理中のパケットを送信したセンサ端末がいったんアクセス不許可とされたセンサ端末であった場合に、処理中のパケットの前記修正後の受信時刻から当該センサ端末の前記待ち時間を減算し、減算処理した受信時刻を用いて、処理中のパケットに含まれるセンサデータの受信時刻をセンサデータ毎に算出することを特徴とするセンサ中継装置。
The sensor relay device according to claim 1,
Furthermore, when performing communication in response to an access request from the sensor terminal, a communication control unit that determines whether access is permitted or not,
A waiting time timer that measures the waiting time until access permission of the sensor terminal that has been denied access,
When the sensor terminal that has transmitted the packet being processed is a sensor terminal that has been denied access, the time calculation unit determines the waiting time of the sensor terminal from the corrected reception time of the packet being processed. A sensor relay device that calculates the reception time of the sensor data included in the packet being processed for each sensor data using the reception time obtained by subtracting.
請求項2記載のセンサ中継装置において、
さらに、各センサ端末の通信の優先順位を予め記憶する優先順位記憶部を備え、
前記通信制御部は、前記優先順位記憶部に記憶された優先順位の情報に基づいて、センサ端末からのアクセス要求に対してアクセス許可/不許可の判断を行うことを特徴とするセンサ中継装置。
The sensor relay device according to claim 2,
Furthermore, a priority storage unit that stores in advance the communication priority of each sensor terminal,
The sensor control apparatus, wherein the communication control unit makes an access permission / non-permission determination for an access request from a sensor terminal based on priority information stored in the priority storage unit.
請求項2記載のセンサ中継装置において、
前記通信制御部は、センサ端末から送信されるパケットのサイズに基づいて、センサ端末からのアクセス要求に対してアクセス許可/不許可の判断を行うことを特徴とするセンサ中継装置。
The sensor relay device according to claim 2,
The communication control unit determines whether access is permitted or not for an access request from a sensor terminal based on a size of a packet transmitted from the sensor terminal.
センサ端末から送信されたパケットを転送するセンサ中継装置において、パケットのデータに付与するタイムスタンプを補正するタイムスタンプ補正方法であって、
センサ端末から送信されたパケットの受信時刻を検出する受信時刻検出ステップと、
同一のセンサ端末から受信したパケットについて前記パケットの受信時刻の間隔を算出する間隔算出ステップと、
前記受信時刻の間隔を平滑化する平滑化ステップと、
センサ端末から受信した処理中のパケットの前記受信時刻を、このセンサ端末に関する前記平滑化後の間隔を用いて修正し、処理中のパケットに含まれるセンサデータの受信時刻をセンサデータ毎に算出する時刻算出ステップと、
処理中のパケットに含まれる各センサデータの受信時刻を示すタイムスタンプを、このパケットに関する前記時刻算出ステップの算出結果を基にパケット中の各センサデータに付与するタイムスタンプ付与ステップとを含むことを特徴とするタイムスタンプ補正方法。
In a sensor relay device for transferring a packet transmitted from a sensor terminal, a time stamp correction method for correcting a time stamp to be added to packet data,
A reception time detection step of detecting a reception time of a packet transmitted from the sensor terminal;
An interval calculation step for calculating an interval of reception times of the packets for packets received from the same sensor terminal;
A smoothing step of smoothing the interval of the reception times;
The reception time of the packet being processed received from the sensor terminal is corrected using the interval after the smoothing relating to the sensor terminal, and the reception time of the sensor data included in the packet being processed is calculated for each sensor data. A time calculation step;
Including a time stamp giving step of giving a time stamp indicating a reception time of each sensor data included in the packet being processed to each sensor data in the packet based on a calculation result of the time calculating step regarding the packet. A characteristic time stamp correction method.
請求項5記載のタイムスタンプ補正方法において、
さらに、センサ端末からのアクセス要求に応じて通信を行う際に、アクセス許可/不許可の判断を行う通信制御ステップと、
アクセス不許可とされたセンサ端末のアクセス許可までの待ち時間を計測する待ち時間計測ステップとを含み、
前記時刻算出ステップは、処理中のパケットを送信したセンサ端末がいったんアクセス不許可とされたセンサ端末であった場合に、処理中のパケットの前記修正後の受信時刻から当該センサ端末の前記待ち時間を減算し、減算処理した受信時刻を用いて、処理中のパケットに含まれるセンサデータの受信時刻をセンサデータ毎に算出するステップを含むことを特徴とするタイムスタンプ補正方法。
The time stamp correction method according to claim 5,
Furthermore, when performing communication in response to an access request from the sensor terminal, a communication control step for determining access permission / denial;
A waiting time measuring step for measuring a waiting time until the access permission of the sensor terminal that is not permitted to be accessed,
In the time calculation step, when the sensor terminal that has transmitted the packet being processed is a sensor terminal that is once denied access, the waiting time of the sensor terminal is determined from the corrected reception time of the packet being processed. And a step of calculating for each sensor data the reception time of the sensor data included in the packet being processed, using the reception time after subtraction.
請求項6記載のタイムスタンプ補正方法において、
前記通信制御ステップは、各センサ端末の通信の優先順位を予め記憶する優先順位記憶部を参照し、この優先順位記憶部に記憶された優先順位の情報に基づいて、センサ端末からのアクセス要求に対してアクセス許可/不許可の判断を行うステップを含むことを特徴とするタイムスタンプ補正方法。
The time stamp correction method according to claim 6,
The communication control step refers to a priority storage unit that stores the communication priority of each sensor terminal in advance, and responds to an access request from the sensor terminal based on the priority information stored in the priority storage unit. A time stamp correction method comprising a step of judging whether access is permitted or not.
請求項6記載のタイムスタンプ補正方法において、
前記通信制御ステップは、センサ端末から送信されるパケットのサイズに基づいて、センサ端末からのアクセス要求に対してアクセス許可/不許可の判断を行うステップを含むことを特徴とするタイムスタンプ補正方法。
The time stamp correction method according to claim 6,
The communication control step includes a step of determining whether access is permitted or not for an access request from a sensor terminal based on a size of a packet transmitted from the sensor terminal.
JP2016108251A 2016-05-31 2016-05-31 Sensor relay device and time stamp correction method Active JP6408513B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016108251A JP6408513B2 (en) 2016-05-31 2016-05-31 Sensor relay device and time stamp correction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016108251A JP6408513B2 (en) 2016-05-31 2016-05-31 Sensor relay device and time stamp correction method

Publications (2)

Publication Number Publication Date
JP2017215712A true JP2017215712A (en) 2017-12-07
JP6408513B2 JP6408513B2 (en) 2018-10-17

Family

ID=60576937

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016108251A Active JP6408513B2 (en) 2016-05-31 2016-05-31 Sensor relay device and time stamp correction method

Country Status (1)

Country Link
JP (1) JP6408513B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019134276A (en) * 2018-01-31 2019-08-08 日本電信電話株式会社 Data collection method, metadata adding device, and program
JP2020141164A (en) * 2019-02-26 2020-09-03 株式会社日立製作所 Communication system and time stamp correction method of communication system
WO2022123651A1 (en) * 2020-12-08 2022-06-16 日本電信電話株式会社 Measurement system, measurement method, measurement device, and program
WO2023105705A1 (en) * 2021-12-09 2023-06-15 日本電信電話株式会社 Timestamp correcting system, sensor system, and timestamp correcting method

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000035802A (en) * 1998-07-16 2000-02-02 Fujitsu Ten Ltd Electronic control system
JP2003016031A (en) * 2001-07-02 2003-01-17 Toshiba Corp Control system for priority connection for client/server system
JP2005039572A (en) * 2003-07-16 2005-02-10 Iwatsu Electric Co Ltd Analysis method and device for reception packet
JP2005073198A (en) * 2003-08-28 2005-03-17 Hitachi Communication Technologies Ltd Packet communication method, and apparatus for performing the method
JP2012168773A (en) * 2011-02-15 2012-09-06 Renesas Electronics Corp Bus system and access control method
JP2014081860A (en) * 2012-10-18 2014-05-08 National Institute Of Advanced Industrial & Technology Sensor network system
JP2017034671A (en) * 2015-07-22 2017-02-09 ローベルト ボッシュ ゲゼルシャフト ミット ベシュレンクテル ハフツング Method and device for confirming validity of time stamp of data transmission

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000035802A (en) * 1998-07-16 2000-02-02 Fujitsu Ten Ltd Electronic control system
JP2003016031A (en) * 2001-07-02 2003-01-17 Toshiba Corp Control system for priority connection for client/server system
JP2005039572A (en) * 2003-07-16 2005-02-10 Iwatsu Electric Co Ltd Analysis method and device for reception packet
JP2005073198A (en) * 2003-08-28 2005-03-17 Hitachi Communication Technologies Ltd Packet communication method, and apparatus for performing the method
JP2012168773A (en) * 2011-02-15 2012-09-06 Renesas Electronics Corp Bus system and access control method
JP2014081860A (en) * 2012-10-18 2014-05-08 National Institute Of Advanced Industrial & Technology Sensor network system
JP2017034671A (en) * 2015-07-22 2017-02-09 ローベルト ボッシュ ゲゼルシャフト ミット ベシュレンクテル ハフツング Method and device for confirming validity of time stamp of data transmission

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019134276A (en) * 2018-01-31 2019-08-08 日本電信電話株式会社 Data collection method, metadata adding device, and program
JP2020141164A (en) * 2019-02-26 2020-09-03 株式会社日立製作所 Communication system and time stamp correction method of communication system
JP7058232B2 (en) 2019-02-26 2022-04-21 株式会社日立製作所 Communication system and communication system time stamp correction method
WO2022123651A1 (en) * 2020-12-08 2022-06-16 日本電信電話株式会社 Measurement system, measurement method, measurement device, and program
JP7452707B2 (en) 2020-12-08 2024-03-19 日本電信電話株式会社 Measurement system, measurement method, measurement device, and program
WO2023105705A1 (en) * 2021-12-09 2023-06-15 日本電信電話株式会社 Timestamp correcting system, sensor system, and timestamp correcting method

Also Published As

Publication number Publication date
JP6408513B2 (en) 2018-10-17

Similar Documents

Publication Publication Date Title
JP6408513B2 (en) Sensor relay device and time stamp correction method
EP3564921B1 (en) Sensing system and time synchronization method
CN113301495B (en) Positioning method, terminal and network equipment
US20160352685A1 (en) Apparatus and method for providing controlling service for iot security
US10866303B2 (en) Determining the location of a mobile computing device
US9439037B2 (en) Location determination in wireless networks
JP6558374B2 (en) Scale number estimation apparatus, scale number management system, scale number estimation method, scale number management method, and computer program
CN110557826B (en) Clock synchronization method and device
CN110636536A (en) Frequency calibration method and device
US8289963B2 (en) Process and system for calculating distances between wireless nodes
JP2010200096A (en) Base station apparatus and wireless resource allocation method
CN109640013B (en) Timing sequence calibration method and chip testing machine
WO2017096837A1 (en) Inter-node distance measurement method and system
Luís et al. Characterization of the opportunistic service time in cognitive radio networks
JP7175328B2 (en) Transmission delay measurement
US10445139B2 (en) Control system in which communication between devices is controlled based on execution condition being satisfied, gateway device used in the control system, and control method for the control system
JP7073920B2 (en) Time setting method, time setting device and program
JP2021520725A5 (en)
JP2019153828A5 (en)
JP4678046B2 (en) COMMUNICATION DEVICE, COMMUNICATION SYSTEM, DELAY TIME MEASUREMENT TIME SETTING METHOD, DELAY TIME CALCULATION METHOD, AND PROGRAM
EP2529495B1 (en) Method and system for managing a temporary block flow in a data communication network environment
JP6554011B2 (en) Timeout time setting device and timeout time setting method
CN113271538B (en) Time service method and device under 5G network, user equipment and communication system
JP2019523491A (en) Security management apparatus and security management method for managing security of client terminal
JP2017195473A (en) Notification device and notification method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20171003

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180821

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: 20180918

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180920

R150 Certificate of patent or registration of utility model

Ref document number: 6408513

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150