TWI647929B - Wireless system data transmission method - Google Patents
Wireless system data transmission method Download PDFInfo
- Publication number
- TWI647929B TWI647929B TW106126320A TW106126320A TWI647929B TW I647929 B TWI647929 B TW I647929B TW 106126320 A TW106126320 A TW 106126320A TW 106126320 A TW106126320 A TW 106126320A TW I647929 B TWI647929 B TW I647929B
- Authority
- TW
- Taiwan
- Prior art keywords
- server
- relay device
- command
- data
- base station
- Prior art date
Links
Landscapes
- Mobile Radio Communication Systems (AREA)
Abstract
一種無線系統的資料傳輸方法,無線系統包含有一第一伺服器與一第二伺服器、一中繼裝置及至少一設備,該方法包含:中繼裝置經網路與第一伺服器連線;判斷中繼裝置是否有儲存設備所傳來的狀態資訊,若是,傳送狀態資訊至第一伺服器;若否,傳送一第一交談指令至第一伺服器;由該第一伺服器接收該中繼裝置所傳送的資料並轉傳至該第二伺服器進行處理;以及由該中繼裝置傳送一第二交談指令至第一伺服器,並於傳送後中斷與第一伺服器間的連線。由第一伺服器專司與中繼裝置通訊可藉此判斷中繼裝置是否有正常傳輸資料,以確保資料傳輸的可靠度。 A data transmission method for a wireless system, the wireless system includes a first server and a second server, a relay device, and at least one device, the method comprising: the relay device is connected to the first server via the network; Determining whether the relay device has status information transmitted by the storage device, and if so, transmitting status information to the first server; if not, transmitting a first chat command to the first server; receiving the middle server by the first server And transmitting the data transmitted by the device to the second server for processing; and transmitting, by the relay device, a second chat command to the first server, and interrupting the connection with the first server after the transmitting . The first server specializes in communication with the relay device to determine whether the relay device has normal transmission data to ensure the reliability of data transmission.
Description
本發明係與無線系統有關;特別是指一種無線系統的資料傳輸方法。 The invention relates to a wireless system; in particular to a data transmission method of a wireless system.
按,一般可遙控的設備皆配備有遙控器,讓使用者無須在設備的安裝位置即可操控設備,為生活添增了許多便利性。而隨著使用者所擁有的設備的數量愈來愈多,將使得遙控器數量也愈多。遙控器的數量增多不僅不易收藏,在某些情況下,如同一類型的設備,其遙控器外觀類似,使得使用者難以分辨遙控器與設備的配對關係。 Press, the general remote control device is equipped with a remote control, so that users can control the device without having to install the device, which adds a lot of convenience to life. And as the number of devices owned by users increases, the number of remote controls will increase. The increase in the number of remote controls is not only difficult to collect, but in some cases, such as the same type of device, the remote control has a similar appearance, making it difficult for the user to distinguish the remote control from the device.
為此,遂有業者推出一種中繼裝置,該中繼裝置可讓使用者以一電子裝置(例如,電腦、行動電話)透過網路與該中繼裝置連線。使用者由該電子裝置上執行控制指令並傳送至該中繼裝置後,由該中繼裝置將所接收的控制指令轉換成對應的控制訊號並發送至特定的設備,如此,即可在同一個電子裝置上控制不同的設備作動,有效解決遙控器數量過多的缺失。 To this end, the manufacturer has introduced a relay device that allows a user to connect to the relay device via an electronic device (for example, a computer or a mobile phone). After the user executes the control command on the electronic device and transmits the control command to the relay device, the relay device converts the received control command into a corresponding control signal and sends it to a specific device, so that the same device can be The electronic device controls different devices to effectively solve the problem of excessive number of remote controls.
在雲端技術蓬勃發展的今日,中繼裝置亦會經由網際網路連線到伺服器,以將設備的狀態資訊經由中繼裝置傳送至伺服器,以作後續的運用。資料在網際網路傳送時,難免會遇到資料丟失的情形,導 致伺服器無法得知中繼裝置是否有傳送狀態資訊。是以,如何確保中繼裝置與伺服器間資料傳輸的可靠度,乃是目前急需解決的問題。 Today, when cloud technology is booming, the relay device will also connect to the server via the Internet to transmit the device's status information to the server via the relay device for subsequent use. When data is transmitted over the Internet, it is inevitable that data will be lost. The server cannot know whether the relay device has transmission status information. Therefore, how to ensure the reliability of data transmission between the relay device and the server is an urgent problem to be solved.
有鑑於此,本發明之目的在於提供一種無線系統的資料傳輸方法,可確保資料傳輸的可靠度。 In view of the above, an object of the present invention is to provide a data transmission method for a wireless system, which can ensure the reliability of data transmission.
緣以達成上述目的,本發明提供的一種無線系統的資料傳輸方法,其中該無線系統包含有一第一伺服器、一第二伺服器、一中繼裝置及至少一設備,該第一伺服器與該中繼裝置分別連線至網路,該第二伺服器與該第一伺服器通訊,該中繼裝置訊號連接該設備,該中繼裝置供接收來自該設備的狀態資訊並儲存之;該資料傳輸方法包含有下列步驟:A、由該中繼裝置經網路與該第一伺服器連線,以供該中繼裝置與該第一伺服器相互傳輸資料;B、判斷該中繼裝置是否有儲存該設備所傳來的該狀態資訊:若是,由該中繼裝置傳送該狀態資訊至該第一伺服器;若否,由該中繼裝置傳送一第一交談指令至該第一伺服器,其中,該第一交談指令係對應無儲存該狀態資訊;C、由該第一伺服器接收該中繼裝置所傳送的資料並轉傳至該第二伺服器進行處理;以及由該中繼裝置傳送一第二交談指令至該第一伺服器,並於傳送後中斷與該第一伺服器間的連線,其中,該第二交談指令係請求該第一伺服器中斷與該中繼裝置之連線。 In order to achieve the above object, the present invention provides a data transmission method for a wireless system, wherein the wireless system includes a first server, a second server, a relay device, and at least one device, the first server and the The relay device is respectively connected to the network, the second server is in communication with the first server, and the relay device is connected to the device, and the relay device is configured to receive status information from the device and store the same; The data transmission method includes the following steps: A. The relay device is connected to the first server via a network, so that the relay device and the first server transmit data to each other; B. determining the relay device. Whether there is stored status information transmitted by the device: if yes, the relay device transmits the status information to the first server; if not, the relay device transmits a first chat command to the first servo The first conversation command corresponds to not storing the status information; C. receiving, by the first server, the data transmitted by the relay device and transferring the data to the second server for processing; and The device transmits a second chat command to the first server, and interrupts the connection with the first server after the transfer, wherein the second chat command requests the first server to interrupt the relay device Connection.
本發明之效果在於中繼裝置即使無儲存的狀態資訊亦會傳送第一交談指令至伺服器,讓伺服器可藉此判斷中繼裝置是否有正常傳輸資料,以確保資料傳輸的可靠度。讓第一伺服器專司與中繼裝置通訊,第二伺服器專司資料的處理,更能提升與中繼裝置間連線的可靠度。 The effect of the invention is that the relay device transmits the first conversation command to the server even if there is no stored state information, so that the server can determine whether the relay device has normal transmission data to ensure the reliability of the data transmission. The first server specializes in communication with the relay device, and the second server specializes in processing the data, thereby improving the reliability of the connection with the relay device.
10‧‧‧設備 10‧‧‧ Equipment
10a‧‧‧空調系統 10a‧‧‧Air conditioning system
10b‧‧‧壁爐 10b‧‧‧Fireplace
10c‧‧‧一氧化碳偵測器 10c‧‧‧ Carbon monoxide detector
20‧‧‧中繼裝置 20‧‧‧Relay device
202‧‧‧第一計數器 202‧‧‧First counter
204‧‧‧第二計數器 204‧‧‧Second counter
30‧‧‧無線基地台 30‧‧‧Wireless base station
40‧‧‧電子裝置 40‧‧‧Electronic devices
50‧‧‧第一伺服器 50‧‧‧First server
52‧‧‧第二伺服器 52‧‧‧Second server
54‧‧‧第三伺服器 54‧‧‧ third server
56‧‧‧資料庫 56‧‧‧Database
I‧‧‧網際網路 I‧‧‧Internet
S201~S203‧‧‧步驟 S201~S203‧‧‧Steps
S301、S302‧‧‧步驟 S301, S302‧‧‧ steps
S401~S403‧‧‧步驟 S401~S403‧‧‧Steps
S500~S504‧‧‧步驟 S500~S504‧‧‧Steps
S601~S603‧‧‧步驟 S601~S603‧‧‧Steps
S700~S704‧‧‧步驟 S700~S704‧‧‧Steps
圖1為本發明第一較佳實施例無線系統之架構圖。 1 is a block diagram of a wireless system in accordance with a first preferred embodiment of the present invention.
圖2為本發明第一較佳實施例之資料傳輸方法中繼裝置之作動流程圖。 2 is a flow chart showing the operation of the relay device of the data transmission method according to the first preferred embodiment of the present invention.
圖3為本發明第一較佳實施例之資料傳輸方法伺服器之作動流程圖。 FIG. 3 is a flow chart of the operation of the data transmission method server according to the first preferred embodiment of the present invention.
圖4為本發明第三較佳實施例之資料傳輸方法流程圖。 4 is a flow chart of a data transmission method according to a third preferred embodiment of the present invention.
圖5A、圖5B為本發明第五較佳實施例之資料傳輸方法流程圖。 5A and FIG. 5B are flowcharts of a data transmission method according to a fifth preferred embodiment of the present invention.
圖6為本發明第六較佳實施例之資料傳輸方法流程圖。 FIG. 6 is a flowchart of a data transmission method according to a sixth preferred embodiment of the present invention.
圖7A、圖7B為本發明第七較佳實施例之資料傳輸方法流程圖。 7A and 7B are flowcharts of a data transmission method according to a seventh preferred embodiment of the present invention.
圖8為本發明之無線系統的另一架構圖。 Figure 8 is another architectural diagram of the wireless system of the present invention.
為能更清楚地說明本發明,茲舉一較佳實施例並配合圖式詳細說明如後。為能更清楚地說明本發明,茲舉較佳實施例並配合圖示詳細說明如後。請參閱圖1,為本發明第一較佳實施例之無線系統,包含有至少一設備10、一中繼裝置20、一無線基地台(Access Point)30、一電子裝置40、一第一伺服器50、一第二伺服器52與一第三伺服器54。其中:至少一設備10的數量於本實施例中為複數個,該些設備10位於用戶端,包括可受控的設備及偵測設備,本實施例中可受控設備係以空調系統10a、壁爐10b為例,偵測設備係以一氧化碳偵測器10c為例。 各該設備10透過RF(Radio frequency)訊號與中繼裝置20訊號連接,但不以此為限,亦可透過Wi-Fi、Zigbee、藍牙、紅外線等訊號連接。可受控設備係接收控制指令而進行對應的作動,例如:開啟、關閉、調整溫度等,且可受控設備亦將本身的狀態資訊編譯成RF訊號後發送,所述之狀態資訊可為目前設備10的開啟或關閉狀態、目前的溫度、異常訊息等資訊。偵測設備同樣會將狀態資訊編譯成RF訊號後發送,所述之狀態資訊可為所偵測的物理量,例如:一氧化碳濃度。 In order to explain the present invention more clearly, a preferred embodiment will be described in detail with reference to the drawings. In order that the present invention may be more clearly described, the preferred embodiments are illustrated in the accompanying drawings. 1 is a wireless system according to a first embodiment of the present invention, including at least one device 10, a relay device 20, a wireless access point (Access Point) 30, an electronic device 40, and a first servo. The device 50, a second server 52 and a third server 54. The number of the at least one device 10 is a plurality of devices in the embodiment, and the devices 10 are located at the user end, and include a controllable device and a detecting device. In this embodiment, the control device is an air conditioning system 10a. The fireplace 10b is taken as an example, and the detecting device is exemplified by the carbon monoxide detector 10c. Each device 10 is connected to the relay device 20 through an RF (Radio Frequency) signal, but not limited thereto, and can also be connected through Wi-Fi, Zigbee, Bluetooth, infrared, and the like. The controllable device receives the control command and performs corresponding actions, such as: turning on, off, adjusting the temperature, etc., and the controlled device also compiles its own state information into an RF signal, and the status information can be currently Information such as the on or off state of the device 10, the current temperature, an abnormal message, and the like. The detecting device also compiles the status information into an RF signal, and the status information may be the detected physical quantity, for example, a carbon monoxide concentration.
該中繼裝置20位於用戶端且透過Wi-Fi訊號與該無線基地台30訊號連接,藉以連線至網路,網路包含有網際網路I及區域網路之其中至少一者,本實施例中該中繼裝置20係透過該無線基地台30連線至區域網路,該無線基地台30再連線至網際網路I。中繼裝置20用以接收RF訊號並轉換成Wi-Fi訊號後發送,以及接收Wi-Fi訊號並轉換成RF訊號後發送。該中繼裝置20用以接收該些設備10所傳來之具有狀態資訊的RF訊號,解譯後取得狀態資訊並儲存於記憶體(圖未示)中。此外,該中繼裝置20具有一第一計數器202與一第二計數器204,第一計數器202與第二計數器204之功能容後再述。 The relay device 20 is located at the user end and is connected to the wireless base station 30 through a Wi-Fi signal to connect to the network, and the network includes at least one of the Internet I and the regional network. In the example, the relay device 20 is connected to the regional network through the wireless base station 30, and the wireless base station 30 is reconnected to the Internet 1. The relay device 20 is configured to receive the RF signal and convert it into a Wi-Fi signal for transmission, and receive the Wi-Fi signal and convert it into an RF signal for transmission. The relay device 20 is configured to receive the RF signals with status information sent by the devices 10, and obtain status information after being interpreted and stored in a memory (not shown). In addition, the relay device 20 has a first counter 202 and a second counter 204. The functions of the first counter 202 and the second counter 204 are described later.
該電子裝置40在本實施例中為平板電腦,其可連接至網際網路I再連線至無線基地台30,或直接與無線基地台30連線至同一區域網路中。該電子裝置40內建有一應用程式(Application)可供使用者輸入控制設備10的控制指令(如開啟、關閉、調整溫度等)。使用者可透過該電子裝置40的應用程式指定欲控制的設備10,在該電子裝置40直接連接至網際網路I的狀態下,則將使用者所輸入之一個或多個控制指令透過網際網路I傳送到第三伺服器56,其中,該電子裝置40所傳送的控制指令包括該中繼裝置20的識別碼、至少一個所欲控制的設備10之代碼、及指令 碼(例如開啟、關閉、調整溫度皆有對應的指令碼),藉以指定中繼裝置20及所欲控制的設備10。 In this embodiment, the electronic device 40 is a tablet computer that can be connected to the Internet I and then reconnected to the wireless base station 30, or directly connected to the wireless base station 30 to the same regional network. The electronic device 40 has an application built in for the user to input control commands (such as turning on, off, adjusting temperature, etc.) of the control device 10. The user can specify the device 10 to be controlled through the application of the electronic device 40. When the electronic device 40 is directly connected to the Internet I, one or more control commands input by the user are transmitted through the Internet. The path I is transmitted to the third server 56, wherein the control command transmitted by the electronic device 40 includes an identification code of the relay device 20, at least one code of the device 10 to be controlled, and an instruction. The code (for example, the on, off, and temperature adjustments have corresponding instruction codes) to specify the relay device 20 and the device 10 to be controlled.
第一至第三伺服器50,52,54位於遠端且分別連線至網路,本實施例係第一伺服器50與第三伺服器54連線到網際網路I,而第一伺服器50與第二伺服器52之間係直接相連而可相互通訊,但不以此為限,亦可第二伺服器52連線到網際網路I而與第一伺服器50通訊。第二伺服器52與第三伺服器54連接一資料庫56。第三伺服器54專司與電子裝置40通訊,且接收電子裝置40傳來的控制指令後,將控制指令儲存於該資料庫56,以供第二伺服器52提取。第一伺服器50與第二伺服器52可於同一台伺服器主機或分別於二台伺服器主機上執行,第二伺服器52與資料庫56亦可於同一台伺服器主機或分別於二台伺服器主機執行,第三伺服器54則可與第二伺服器52於同一台伺服器主機或分別於二台伺服器主機上執行。 The first to third servers 50, 52, 54 are located at the remote end and are respectively connected to the network. In this embodiment, the first server 50 and the third server 54 are connected to the Internet I, and the first servo The device 50 and the second server 52 are directly connected to each other to communicate with each other, but not limited thereto, and the second server 52 can be connected to the Internet I to communicate with the first server 50. The second server 52 is connected to the third server 54 to a database 56. The third server 54 communicates with the electronic device 40, and after receiving the control command sent from the electronic device 40, stores the control command in the database 56 for the second server 52 to extract. The first server 50 and the second server 52 can be executed on the same server host or on two server hosts respectively, and the second server 52 and the database 56 can also be on the same server host or respectively. The server is executed by the host server, and the third server 54 can be executed on the same server host as the second server 52 or on the two server hosts.
藉由上述之架構,即可進行本實施例的資料傳輸方法,該方法包含有下列步驟,其中:請配合圖2,為中繼裝置20之作動流程:步驟S201,由該中繼裝置20透過無線基地台30經網際網路I與該第一伺服器50連線,以供該中繼裝置20與該第一伺服器50可相互傳輸資料。 The data transmission method of the embodiment can be performed by the above-mentioned architecture. The method includes the following steps: wherein, in conjunction with FIG. 2, the flow of the relay device 20 is performed: step S201, the relay device 20 transmits The wireless base station 30 is connected to the first server 50 via the Internet I, so that the relay device 20 and the first server 50 can mutually transmit data.
步驟S202,該中繼裝置20判斷目前是否有儲存任一設備10所傳來的狀態資訊:若是,由該中繼裝置20傳送所儲存的狀態資訊至該第一伺服器50; 若否,由該中繼裝置20傳送一第一交談指令至該第一伺服器50,其中,該第一交談指令係對應目前中繼裝置20無儲存任一設備10的狀態資訊,亦即,向第一、第二伺服器50,52表示目無狀態資訊可上傳。 Step S202, the relay device 20 determines whether there is currently stored state information transmitted by any device 10: if yes, the relay device 20 transmits the stored state information to the first server 50; If not, the first conversation command is transmitted by the relay device 20 to the first server 50, wherein the first conversation command corresponds to the current relay device 20 not storing the status information of any device 10, that is, The first and second servers 50, 52 indicate that the stateless information can be uploaded.
步驟S203,在該中繼裝置20傳送完狀態資訊或第一交談指令後,中繼裝置20傳送一第二交談指令(即請求中斷指令)至該第一伺服器50,並於傳送後中斷與該第一伺服器50間的連線,其中,該第二交談指令係請求該第一伺服器50中斷與該中繼裝置20之連線。本實施例中,係於傳送完該第二交談指令後經一預定時間始由中繼裝置20中斷與第一伺服器50間之通道的連線,其中預定時間為1秒以上。1秒的時間係為了確保第二交談指令可以順利地送到第一伺服器50,以避免發生第二交談指令未送到第一伺服器50之前,第一伺服器50先關閉與中繼裝置20間之通道,導致第一伺服器50無法收到第二交談指令。 Step S203, after the relay device 20 transmits the status information or the first chat command, the relay device 20 transmits a second chat command (ie, requests an interrupt command) to the first server 50, and interrupts after the transfer. The connection between the first server 50, wherein the second conversation command requests the first server 50 to disconnect the connection with the relay device 20. In this embodiment, the connection between the channel and the first server 50 is interrupted by the relay device 20 after a predetermined time has elapsed after the second conversation command is transmitted, wherein the predetermined time is 1 second or longer. 1 second is to ensure that the second chat command can be smoothly sent to the first server 50 to prevent the first server 50 from being turned off and the relay device before the second chat command is sent to the first server 50. The 20 channels cause the first server 50 to fail to receive the second talk command.
請配合圖3為第一伺服器50與第二伺服器52之作動流程 Please cooperate with FIG. 3 to operate the first server 50 and the second server 52.
步驟S301,是接續於步驟S201連線之後,第一伺服器50等待接收中繼裝置20所傳來的資料。第一伺服器50收到中繼裝置20所傳來的資料後,將該中繼裝置20所傳送的資料轉傳至該第二伺服器52進行處理,並維持與中繼裝置20連線。 In step S301, after the connection is continued in step S201, the first server 50 waits to receive the data transmitted by the relay device 20. After receiving the data transmitted by the relay device 20, the first server 50 transfers the data transmitted by the relay device 20 to the second server 52 for processing, and maintains connection with the relay device 20.
步驟S302,由第二伺服器52解析所收到的資料之類型,其中:若為設備10的狀態資訊,則第二伺服器52將每次所接收的狀態資訊儲存於資料庫56並更新資料庫56中所對應之設備狀態,並繼續等待接收中繼裝置20所傳來的資料。第三伺服器54由資料庫56提取設備狀態傳送到電子裝置40。 Step S302, the second server 52 parses the type of the received data, wherein: if it is the status information of the device 10, the second server 52 stores the received status information in the database 56 and updates the data. The device status corresponding to the library 56 continues to wait for receiving data transmitted by the relay device 20. The third server 54 transfers the device status from the database 56 to the electronic device 40.
若為第一交談指令,則代表無設備10的狀態資訊第二伺服器52繼續等待接收中繼裝置20所傳來的資料。 If it is the first conversation command, the second server 52, which represents the status information without the device 10, continues to wait for receiving the data transmitted by the relay device 20.
若為第二交談指令,代表完成資料的傳輸,第二伺服器52通知第一伺服器50關閉與中繼裝置20間的通道,以中斷連線,等待該中繼裝置20再次連線或其它的中繼裝置20連線,藉此,讓第一伺服器50的連線資源釋出,在多個中繼裝置20的架構時,使其它的中繼裝置20可連線,而不會被原本連線的中繼裝置20所獨佔。 If it is the second conversation command, on behalf of completing the transmission of the data, the second server 52 notifies the first server 50 to close the channel with the relay device 20 to interrupt the connection, and wait for the relay device 20 to reconnect or other. The relay device 20 is connected, whereby the connection resources of the first server 50 are released, and when the plurality of relay devices 20 are constructed, the other relay devices 20 can be connected without being connected. The originally connected relay device 20 is exclusive.
若非為設備10的狀態資訊、第一交談指令及第二交談指令之其中一者,代表所收到的資料格式不符,即資料於傳送過程中丟失,第二伺服器52傳送一第三交談指令(即請求中斷指令)至該第一伺服器50,並由該第一伺服器50轉傳該中繼裝置20。於該第一伺服器50傳送該第三交談指令後,由該第一伺服器50中斷與該中繼裝置20間的連線,其中,該第三交談指令係請求該中繼裝置20中斷與該第一伺服器50之連線。本實施例中,係於傳送完該第三交談指令後經一預定時間始由第一伺服器50中斷與該中繼裝置20間之通道的連線,其中預定時間為1秒以上。1秒的時間係為了確保第三交談指令可以順利地送到中繼裝置20,以避免發生第三交談指令未送到中繼裝置20之前,中繼裝置20先關閉與第一伺服器50間之通道,導致中繼裝置20無法收到第三交談指令。中繼裝置20收到第三交談指令後,重回步驟S201,經網際網路與該第一伺服器50連線。 If the status information of the device 10, the first conversation command, and the second conversation command are not representative, the data format is not satisfied, that is, the data is lost during the transmission, and the second server 52 transmits a third conversation command. (ie, requesting an interrupt instruction) to the first server 50, and the relay device 20 is relayed by the first server 50. After the first server 50 transmits the third conversation command, the first server 50 interrupts the connection with the relay device 20, wherein the third conversation command requests the relay device 20 to interrupt The connection of the first server 50. In this embodiment, the connection between the channel and the relay device 20 is interrupted by the first server 50 after a predetermined time has elapsed after the third conversation command is transmitted, wherein the predetermined time is 1 second or longer. The time of 1 second is to ensure that the third conversation command can be smoothly sent to the relay device 20 to prevent the relay device 20 from being turned off and before the first server 50 before the third conversation command is sent to the relay device 20. The channel causes the relay device 20 to fail to receive the third talk command. After receiving the third conversation command, the relay device 20 returns to step S201 and connects to the first server 50 via the Internet.
在第二實施例中,係以第一實施例為基礎,於步驟S302中更包括,第二伺服器52判斷來自中繼裝置20的資料為狀態資訊與第一交談指令之其中一者時,該第二伺服器52判斷該資料庫56中目前是否有儲存來自電子裝置40之待傳送至任一設備10的至少一個控制指令: 若是,則第二伺服器52傳送資料庫56所儲存的控制指令至第一伺服器50,經由第一伺服器50轉傳至中繼裝置20,中繼裝置20接收後,將控制指令發送至對應的設備10,令設備10進行對應的作動;若否,則該第二伺服器52傳送一第四交談指令至第一伺服器50,經由第一伺服器50轉傳至中繼裝置20,其中,第四交談指令係對應無待傳送至設備10的控制指令。 In the second embodiment, based on the first embodiment, in step S302, the second server 52 further determines that the data from the relay device 20 is one of the status information and the first conversation command. The second server 52 determines whether at least one control command from the electronic device 40 to be transmitted to any of the devices 10 is currently stored in the database 56: If yes, the second server 52 transmits the control command stored in the database 56 to the first server 50, and transmits it to the relay device 20 via the first server 50. After receiving the relay device 20, the control command is sent to the relay device 20. The corresponding device 10 causes the device 10 to perform corresponding operations; if not, the second server 52 transmits a fourth chat command to the first server 50, and is transferred to the relay device 20 via the first server 50. The fourth chat command corresponds to a control command that is not to be transmitted to the device 10.
上述第一、第二實施例中,係在步驟S202中繼裝置20傳送完狀態資訊或第一交談指令後,即進行步驟S203,如此一來,中繼裝置20無論有無儲存的狀態資訊皆會與第一伺服器50溝通,第一伺服器50可藉此判斷中繼裝置20是否有異常(例如中繼裝置20連線後皆未傳送任何資料或所傳送的資料格式不符),以確保資料傳輸的可靠度。當然,步驟S202可以執行至少一次,或在以下實施例中進行步驟S203之前,讓中繼裝置20多次傳送狀態資訊或第一交談指令。又,由於係由第一伺服器50專司與中繼裝置20的通訊,第二伺服器52專司資料的處理,因此,可以確保第一伺服器50與中繼裝置20之間通訊的順暢,避免資料丟失,提高通訊的可靠度。 In the foregoing first and second embodiments, after the relay device 20 transmits the status information or the first conversation command in step S202, step S203 is performed, so that the relay device 20 will be stored with or without status information. Communicating with the first server 50, the first server 50 can determine whether the relay device 20 is abnormal (for example, the relay device 20 does not transmit any data after the connection is connected or the transmitted data format does not match) to ensure data. The reliability of the transmission. Of course, step S202 can be performed at least once, or before the step S203 is performed in the following embodiment, the relay device 20 is caused to transmit the status information or the first chat command a plurality of times. Moreover, since the first server 50 communicates with the relay device 20, the second server 52 handles the processing of the data, thereby ensuring smooth communication between the first server 50 and the relay device 20. To avoid data loss and improve the reliability of communication.
圖4所示者為本發明第三較佳實施例之無線系統的資料傳輸方法,其具有大致相同於第一實施例之步驟,不同的是:步驟S401中包含,將該中繼裝置20中的該第一計數器202的數值設定為一第一起始值,本實施例中第一起始值為0。 FIG. 4 is a data transmission method of a wireless system according to a third preferred embodiment of the present invention, which has substantially the same steps as the first embodiment, except that the relay device 20 is included in step S401. The value of the first counter 202 is set to a first starting value, and the first starting value is 0 in this embodiment.
步驟S402中包含,將該第一計數器202的數值經一預定運算後調整為另一數值,本實施例中係將第一計數器的數值加上一第一預 定數值,第一預定數值以1為例。當然預定運算亦可為減去第一預定數值。 In step S402, the value of the first counter 202 is adjusted to another value after a predetermined operation. In this embodiment, the first counter is added with a first pre-value. The fixed value, the first predetermined value is taken as an example of 1. Of course, the predetermined operation may also be to subtract the first predetermined value.
步驟S403中包含,判斷該第一計數器202的數值是否達到一第一終止值:若是,則傳送該第二交談指令至該第一伺服器50,並於傳送後中斷與該第一伺服器50間的連線。本實施例中,係於傳送完該第二交談指令後經一預定時間始由中繼裝置20中斷與第一伺服器50間之通道的連線,其中預定時間為1秒以上。 Step S403 includes: determining whether the value of the first counter 202 reaches a first end value: if yes, transmitting the second chat command to the first server 50, and interrupting the first server 50 after the transmitting The connection between the two. In this embodiment, the connection between the channel and the first server 50 is interrupted by the relay device 20 after a predetermined time has elapsed after the second conversation command is transmitted, wherein the predetermined time is 1 second or longer.
若否,回到步驟S402執行。 If no, the process returns to step S402.
本實施例中第一終止值係以20為例,換言之,中繼裝置20與第一伺服器50連線後將會傳送20次狀態資訊或第一交談指令,除非如第一實施例步驟S302第二伺服器52所收到的資料非為設備10的狀態資訊、第一交談指令及第二交談指令之其中一者,傳送次數才會提前中斷。 In this embodiment, the first termination value is taken as an example. In other words, the relay device 20 transmits the status information or the first conversation command 20 times after being connected to the first server 50, unless the step S302 is as in the first embodiment. The data received by the second server 52 is not one of the status information of the device 10, the first conversation command, and the second chat command, and the number of transmissions is interrupted in advance.
藉此,讓每次中繼裝置20與第一伺服器50連線後,可多次傳送狀態資訊或第一交談指令。特別是應用於多個中繼裝置20的架構時,讓每個中繼裝置20與第一伺服器50連線後,都可以保有一定的傳送次數之權限。 Thereby, each time the relay device 20 is connected to the first server 50, the status information or the first chat command can be transmitted multiple times. In particular, when applied to the architecture of the plurality of relay devices 20, each relay device 20 can maintain a certain number of transmission times after being connected to the first server 50.
在第四實施例中,係以第三實施例為基礎,無線系統的資料傳輸方法更包含,於中繼裝置20與無線基地台30連線經一段時間後,由中繼裝置20中斷與無線基地台30間的連線,並由該中繼裝置20重新與該無線基地台30連線。本實施例中,於中斷與無線基地台30間的連線後,中繼裝置20係先自我重新啟動,再由中繼裝置20重新與無線基地台30連線。如此,可以讓中繼裝置20與無線基地台30的連線更穩定,避免資料丟失。 In the fourth embodiment, based on the third embodiment, the data transmission method of the wireless system further includes: after the relay device 20 and the wireless base station 30 are connected for a period of time, the relay device 20 interrupts and wirelessly The connection between the base stations 30 is reconnected to the wireless base station 30 by the relay device 20. In this embodiment, after the connection with the wireless base station 30 is interrupted, the relay device 20 first restarts itself, and then the relay device 20 reconnects with the wireless base station 30. In this way, the connection between the relay device 20 and the wireless base station 30 can be made more stable, and data loss can be avoided.
圖5A與圖5B所示者為本發明第五較佳實施例之無線系統的資料傳輸方法,其具有大致相同於第三實施例之步驟,不同的是:在步驟S501之前包含步驟S500,由該中繼裝置20與該無線基地台30連線,以及將中繼裝置20的第二計數器204的數值設定為一第二起始值,本實施例中第二起始值為0。 FIG. 5A and FIG. 5B are diagrams showing a data transmission method of a wireless system according to a fifth preferred embodiment of the present invention, which has substantially the same steps as the third embodiment, except that step S500 is included before step S501. The relay device 20 is connected to the wireless base station 30, and the value of the second counter 204 of the relay device 20 is set to a second starting value. In this embodiment, the second starting value is zero.
步驟S502中除了將第一計數器202的數值調整為另一數值之外,更包含將第二計數器204的數值經一預定運算後調整為另一數值,本實施例中係將第二計數器204的數值加上一第二預定數值,第二預定數值以1為例。當然預定運算亦可為減去第二預定數值。 In step S502, in addition to adjusting the value of the first counter 202 to another value, the value of the second counter 204 is further adjusted to another value after a predetermined operation. In this embodiment, the second counter 204 is The value is added to a second predetermined value, and the second predetermined value is taken as an example. Of course, the predetermined operation can also be subtracted from the second predetermined value.
步驟S503於中繼裝置20中斷與第一伺服器50之間的連線後,更包含步驟S504(圖5B參照),由中繼裝置20判斷第二計數器204的數值是否達到一第二終止值:若是,由中繼裝置20中斷與該無線基地台30間的連線,並回到步驟S500執行。本實施例中,於中斷與無線基地台30間的連線後,中繼裝置20先自我重新啟動,再回到步驟S500執行。 Step S503, after the relay device 20 interrupts the connection with the first server 50, further includes step S504 (refer to FIG. 5B), and the relay device 20 determines whether the value of the second counter 204 reaches a second end value. If so, the relay device 20 interrupts the connection with the wireless base station 30, and returns to step S500 for execution. In this embodiment, after the connection with the wireless base station 30 is interrupted, the relay device 20 first restarts itself, and then returns to step S500 for execution.
若否,回到步驟S501執行。 If no, the process returns to step S501.
本實施例同樣可以達到讓中繼裝置20與無線基地台30連線經一段時間後重新連線之目的,讓中繼裝置20與無線基地台30的連線更穩定。 In this embodiment, the connection between the relay device 20 and the wireless base station 30 can be reconnected after a period of time, and the connection between the relay device 20 and the wireless base station 30 is more stable.
圖6所示者為本發明第六較佳實施例之無線系統的資料傳輸方法,其具有大致相同於第一實施例之步驟,不同的是:步驟S601中包含,由該中繼裝置20向該第一伺服器50取得一第一時間資料,本步驟中,係由中繼裝置230傳送一時間要求指令予 第一伺服器50,第一伺服器50收到後,則回傳第一時間資料給中繼裝置20,其中,第一時間資料包含第一伺服器50目前的系統時間。 FIG. 6 is a data transmission method of a wireless system according to a sixth preferred embodiment of the present invention, which has substantially the same steps as the first embodiment, except that the step S601 includes, by the relay device 20 The first server 50 obtains a first time data. In this step, the relay device 230 transmits a time request command to the relay device 230. After receiving the first server 50, the first server 50 returns the first time data to the relay device 20, wherein the first time data includes the current system time of the first server 50.
步驟S603中包含,該中繼裝置20傳送該時間要求指令予第一伺服器50,以向該第一伺服器50取得包含第一伺服器50目前的系統時間之一第二時間資料,且中繼裝置20判斷第一時間資料與第二時間資料之間的時間差是否達到一第一預定時間差:若是,則傳送第二交談指令至第一伺服器50,並於傳送後中斷與該第一伺服器50間的連線;本實施例中,係於傳送完該第二交談指令後經一預定時間始由中繼裝置20中斷與第一伺服器50間之通道的連線,其中預定時間為1秒以上;若否,回到步驟S602執行。 Step S603 includes: the relay device 20 transmits the time request command to the first server 50, to obtain, from the first server 50, a second time data including one of the current system time of the first server 50, and The device 20 determines whether the time difference between the first time data and the second time data reaches a first predetermined time difference: if yes, transmitting the second chat command to the first server 50, and interrupting the first servo after the transmitting In the embodiment, the connection between the channel and the first server 50 is interrupted by the relay device 20 after a predetermined time is transmitted after the second conversation command is transmitted, wherein the predetermined time is 1 second or longer; if not, return to step S602 to execute.
本實施例中,中繼裝置20與第一伺服器50連線後,在對應該第一預定時間差之時段內,將會傳送多次狀態資訊或第一交談指令,除非如第一實施例步驟S302第二伺服器52所收到的資料非為設備的狀態資訊、第一交談指令及第二交談指令之其中一者,傳送次數才會提前中斷。藉此,讓每次中繼裝置20與第一伺服器50連線後,可多次傳送狀態資訊或第一交談指令。特別是應用於多個中繼裝置20的架構時,讓每個中繼裝置20與第一伺服器50連線後,都可以保有一定的傳送次數之權限。 In this embodiment, after the relay device 20 is connected to the first server 50, the status information or the first conversation command will be transmitted multiple times during the period corresponding to the first predetermined time difference, unless the steps are as in the first embodiment. The data received by the second server 52 of the S302 is not one of the status information of the device, the first conversation command and the second conversation command, and the number of transmissions is interrupted in advance. Thereby, each time the relay device 20 is connected to the first server 50, the status information or the first chat command can be transmitted multiple times. In particular, when applied to the architecture of the plurality of relay devices 20, each relay device 20 can maintain a certain number of transmission times after being connected to the first server 50.
本實施例的資料傳輸方法同樣可以如第四實施例,於中繼裝置20與無線基地台30連線經一段時間後,由中繼裝置20中斷與無線基地台30間的連線後,中繼裝置20先自我重新啟動,再由中繼裝置20重新與無線基地台30連線。如此,可以讓中繼裝置20與無線基地台30的連線更穩定,避免資料丟失。 The data transmission method of this embodiment can also be the same as the fourth embodiment. After the relay device 20 and the wireless base station 30 are connected for a period of time, after the connection between the wireless base station 30 and the wireless base station 30 is interrupted by the relay device 20, After the device 20 first restarts itself, the relay device 20 reconnects with the wireless base station 30. In this way, the connection between the relay device 20 and the wireless base station 30 can be made more stable, and data loss can be avoided.
圖7A與圖7B所示者為本發明第七較佳實施例之無線系統的資料傳輸方法,其具有大致相同於第六實施例之步驟,不同的是:在步驟S701之前包含步驟S700,由該中繼裝置20與該無線基地台30連線。 FIG. 7A and FIG. 7B are diagrams showing a data transmission method of a wireless system according to a seventh preferred embodiment of the present invention, which has substantially the same steps as the sixth embodiment, except that step S700 is included before step S701. The relay device 20 is connected to the wireless base station 30.
經步驟S702後進行步驟S703,而步驟S703於中繼裝置20中斷與第一伺服器50之間的連線後,更包含步驟S704(圖7B參照),由中繼裝置20判斷該第一時間資料與該第二時間資料之間的時間差是否達到一第二預定時間差:若是,由中繼裝置20中斷與該無線基地台30間的連線,並回到步驟S700執行。本實施例中,於中斷與無線基地台30間的連線後,中繼裝置20係先自我重新啟動,再回到步驟S700執行。 After step S702, step S703 is performed. Step S703, after the relay device 20 interrupts the connection with the first server 50, further includes step S704 (refer to FIG. 7B), and the relay device 20 determines the first time. Whether the time difference between the data and the second time data reaches a second predetermined time difference: if so, the connection with the wireless base station 30 is interrupted by the relay device 20, and the process returns to step S700. In this embodiment, after the connection with the wireless base station 30 is interrupted, the relay device 20 restarts itself first, and then returns to step S700 to execute.
若否,回到步驟S701執行。 If no, the process returns to step S701.
本實施例同樣可以達到讓中繼裝置20與無線基地台30連線經一段時間後重新連線之目的,讓中繼裝置20與無線基地台30的連線更穩定。 In this embodiment, the connection between the relay device 20 and the wireless base station 30 can be reconnected after a period of time, and the connection between the relay device 20 and the wireless base station 30 is more stable.
圖8所示為本發明之無線系統的另一架構,其具有大致相同於前述各實施例之無線系統的架構,不同的是,本實施例的第一伺服器50、第二伺服器52及資料庫56係位於用戶端,處理用戶端內的資料。第一伺服器50與第二伺服器52與無線基地台20連線,藉以連接至區域網路,電子裝置40則可由網際網路I連至無線基地台20,或直接與無線基地台20連至區域網路中。本實施例中係將第三伺服器54之功能併入第二伺服器52中,讓第二伺服器52可與電子裝置40通訊,以接收控制指令並儲存於資料庫56中,當然,亦可第二伺服器52與第三伺服器54分開。通常用戶端需處理的資料量較小,因此,可以將第一伺服器50、第二伺服器 52與資料庫56於同一伺服器主機中執行。圖8之無線系統同樣可以應用前述第一至第七實施例的資料傳輸方法,差別在於中繼裝置20與第一伺服器50所連接的網路是區域網路。 FIG. 8 shows another architecture of the wireless system of the present invention, which has an architecture similar to that of the wireless system of the foregoing embodiments, except that the first server 50 and the second server 52 of the embodiment are The database 56 is located at the user end and processes the data in the client. The first server 50 and the second server 52 are connected to the wireless base station 20 to connect to the regional network, and the electronic device 40 can be connected to the wireless base station 20 by the Internet I or directly connected to the wireless base station 20. To the regional network. In this embodiment, the function of the third server 54 is incorporated into the second server 52, so that the second server 52 can communicate with the electronic device 40 to receive the control command and store it in the database 56. The second server 52 can be separated from the third server 54. Usually, the amount of data to be processed by the client is small, so the first server 50 and the second server can be used. 52 and database 56 are executed in the same server host. The wireless system of FIG. 8 can also apply the data transmission methods of the first to seventh embodiments described above, with the difference that the network to which the relay device 20 and the first server 50 are connected is a regional network.
據上所述,本發明無線系統的資料傳輸方法,可讓中繼裝置20即使無儲存的狀態資訊亦會傳送第一交談指令至第一伺服器50,讓第一伺服器50可藉此判斷中繼裝置20是否正常傳輸資料,以確保資料傳輸的可靠度。更值得一提的是,讓第一伺服器50專司與中繼裝置20通訊,第二伺服器52專司資料的處理,更能提升與中繼裝置20間連線的可靠度。 According to the above, the data transmission method of the wireless system of the present invention allows the relay device 20 to transmit the first conversation command to the first server 50 even if there is no stored status information, so that the first server 50 can determine Whether the relay device 20 normally transmits data ensures the reliability of data transmission. It is worth mentioning that the first server 50 is allowed to communicate with the relay device 20, and the second server 52 is dedicated to the processing of the data, thereby improving the reliability of the connection with the relay device 20.
以上所述僅為本發明較佳可行實施例而已,舉凡應用本發明說明書及申請專利範圍所為之等效變化,理應包含在本發明之專利範圍內。 The above is only a preferred embodiment of the present invention, and equivalent changes to the scope of the present invention and the scope of the patent application are intended to be included in the scope of the present invention.
Claims (15)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW106126320A TWI647929B (en) | 2017-08-04 | 2017-08-04 | Wireless system data transmission method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW106126320A TWI647929B (en) | 2017-08-04 | 2017-08-04 | Wireless system data transmission method |
Publications (2)
Publication Number | Publication Date |
---|---|
TWI647929B true TWI647929B (en) | 2019-01-11 |
TW201911815A TW201911815A (en) | 2019-03-16 |
Family
ID=65804182
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW106126320A TWI647929B (en) | 2017-08-04 | 2017-08-04 | Wireless system data transmission method |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI647929B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070297391A1 (en) * | 2000-04-06 | 2007-12-27 | Hisao Furukawa | Terminal-to-terminal communication connection control method using IP transfer network |
US20110176483A1 (en) * | 2009-07-23 | 2011-07-21 | Ravi Palanki | Synchronization of devices in a wireless communication network |
CN104660312A (en) * | 2013-11-25 | 2015-05-27 | 上海益尚信息科技有限公司 | Novel full-rate transmission method for establishing connection between mobile terminal and base stations in MIMO system |
TW201615026A (en) * | 2014-10-03 | 2016-04-16 | Grand Mate Co Ltd | Proximal and remote control coordination method of wireless system |
WO2017054661A1 (en) * | 2015-09-28 | 2017-04-06 | 中兴通讯股份有限公司 | Wireless relay method, wireless relay, and wireless relay system |
-
2017
- 2017-08-04 TW TW106126320A patent/TWI647929B/en active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070297391A1 (en) * | 2000-04-06 | 2007-12-27 | Hisao Furukawa | Terminal-to-terminal communication connection control method using IP transfer network |
US20110176483A1 (en) * | 2009-07-23 | 2011-07-21 | Ravi Palanki | Synchronization of devices in a wireless communication network |
CN104660312A (en) * | 2013-11-25 | 2015-05-27 | 上海益尚信息科技有限公司 | Novel full-rate transmission method for establishing connection between mobile terminal and base stations in MIMO system |
TW201615026A (en) * | 2014-10-03 | 2016-04-16 | Grand Mate Co Ltd | Proximal and remote control coordination method of wireless system |
WO2017054661A1 (en) * | 2015-09-28 | 2017-04-06 | 中兴通讯股份有限公司 | Wireless relay method, wireless relay, and wireless relay system |
Also Published As
Publication number | Publication date |
---|---|
TW201911815A (en) | 2019-03-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6751094B2 (en) | Method, apparatus and system for supporting wireless communication | |
KR101941060B1 (en) | Signal Processing Method and Apparatus for Performing Communication with Mobile Robot | |
EP2908540B1 (en) | A method of pairing wireless devices | |
EP3298753B1 (en) | Renewing registrations for client applications installed on different proximate client devices | |
JP6279938B2 (en) | Connection management apparatus, communication system, connection management method and program | |
US10863559B2 (en) | Method and apparatus for communicating in a wireless communication network | |
CN107508916B (en) | Server link management method for intelligent robot | |
CN111264079B (en) | Data transmission method, electronic device, system and storage medium | |
CN103546352A (en) | Remote control method and device based on wireless login | |
US10187844B2 (en) | Wireless network communication system and communication method thereof | |
JP4701018B2 (en) | Communication apparatus and communication method | |
TWI647929B (en) | Wireless system data transmission method | |
US8305976B1 (en) | Efficient wireless communication network entry for wireless communication devices | |
TWI647931B (en) | Wireless system data transmission method | |
CN110933775A (en) | Method and device for establishing signal connection and electronic equipment | |
TWI650974B (en) | Wireless system data transmission method | |
US10368387B2 (en) | Method for transmitting data in wireless system | |
CN109547913B (en) | Data transmission method for radio system | |
CN109391519B (en) | Data transmission method for radio system | |
CN109391652B (en) | Data transmission method for radio system | |
AU2023202265B2 (en) | Systems and methods for controlling grilling appliances via edge computing platforms | |
TW201916729A (en) | Wireless system connection method including a wireless base station, an electronic device, a relay device, and a device | |
US20230345560A1 (en) | Wireless communication device and wireless communication method | |
EP3337133A1 (en) | A device and method for remotely controlling a low range wireless device | |
JP2016171523A (en) | Communication device, control method thereof, program, and communication system |