TWI566543B - Communication server and operation method thereof - Google Patents

Communication server and operation method thereof Download PDF

Info

Publication number
TWI566543B
TWI566543B TW104113557A TW104113557A TWI566543B TW I566543 B TWI566543 B TW I566543B TW 104113557 A TW104113557 A TW 104113557A TW 104113557 A TW104113557 A TW 104113557A TW I566543 B TWI566543 B TW I566543B
Authority
TW
Taiwan
Prior art keywords
data
communication unit
connection
received
frequency
Prior art date
Application number
TW104113557A
Other languages
Chinese (zh)
Other versions
TW201633744A (en
Inventor
黃意明
陳宗達
Original Assignee
友達光電股份有限公司
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 友達光電股份有限公司 filed Critical 友達光電股份有限公司
Publication of TW201633744A publication Critical patent/TW201633744A/en
Application granted granted Critical
Publication of TWI566543B publication Critical patent/TWI566543B/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Recording Measured Values (AREA)
  • Retry When Errors Occur (AREA)
  • Computer And Data Communications (AREA)
  • Telephonic Communication Services (AREA)

Description

通訊伺服器及其運算方法 Communication server and its operation method

本發明是有關於一種通訊伺服器,尤其是有關於一種用以與資料記錄器溝通的通訊伺服器,其接收並運算由資料記錄器傳送而來的資料。 The present invention relates to a communication server, and more particularly to a communication server for communicating with a data logger that receives and computes data transmitted by a data logger.

資料記錄器一般來說包含微處理器以及記憶體,因此具有隨著時間而記錄資料的功能,通常應用在需要長時間記錄資料的環境之下,例如太陽能電廠、無人氣象站等等。圖1為習知的資料記錄器應用在太陽能電廠的示意圖。如圖1所示,太陽能電廠100之中具有資料記錄器10、變頻器20、日照計30、商用電表40、開關50以及路由器60。變頻器20用以將太陽能板(圖未示)所產生的直流電(DC)轉換為交流電(AC),日照計30用以測量太陽光的光度,商用電表40用以計費電量,並由開關50做切換控制。資料記錄器10分別與變頻器20、日照計30、商用電表40、開關50以及路由器60電性連接以接收多筆資料,並將所接收之多筆資料透過路由器60傳送至遠端伺服器70做運算後產生圖表化的資料統計圖。 Data loggers generally include a microprocessor and memory, and therefore have the ability to record data over time, typically in environments where long-term data logging is required, such as solar power plants, unmanned weather stations, and the like. 1 is a schematic diagram of a conventional data logger applied to a solar power plant. As shown in FIG. 1, the solar power plant 100 includes a data recorder 10, a frequency converter 20, a sunshine meter 30, a commercial electricity meter 40, a switch 50, and a router 60. The frequency converter 20 is configured to convert direct current (DC) generated by a solar panel (not shown) into alternating current (AC), the solar meter 30 is used to measure the luminosity of the sunlight, and the commercial electric meter 40 is used to charge the electricity, and is switched by the switch. 50 do switching control. The data logger 10 is electrically connected to the frequency converter 20, the sunshine meter 30, the commercial electricity meter 40, the switch 50, and the router 60 to receive a plurality of data, and transmits the received plurality of data to the remote server 70 through the router 60. A graph of the data statistics is generated after the calculation.

然而,若因為網路品質不穩定而使得資料記錄器 10與遠端伺服器70之間的連線中斷,而連線中斷時便會造成資料傳輸的中斷並且使遠端伺服器70原本應接收到的資料有所遺漏,直到當資料記錄器10與遠端伺服器70之間的連線恢復時,資料記錄器10才會將這些被遺漏的資料進行補傳送的動作,也就是將被遺漏的資料重新傳送至遠端伺服器70。某些較高規格的資料記錄器10具有檔案系統的架構,因此可以在連線恢復後將斷線時所遺漏的多筆資料共同包裝成單一個檔案而補傳送至遠端伺服器70做運算,而這種做法由於僅需要進行一次補傳送以及一次運算,因此對遠端伺服器70並不會造成太大的負擔,但是其缺點在於需要花費較高的設備成本。 However, if the data quality is unstable due to network quality The connection between the 10 and the remote server 70 is interrupted, and when the connection is interrupted, the data transmission is interrupted and the data that the remote server 70 should have received is omitted until the data recorder 10 and the data recorder 10 When the connection between the remote servers 70 is resumed, the data logger 10 will retransmit the missing data, that is, retransmit the missing data to the remote server 70. Some higher-standard data loggers 10 have a file system architecture, so that after the connection is restored, a plurality of pieces of data missed during the disconnection can be collectively packaged into a single file and sent to the remote server 70 for operation. However, this method does not impose a large burden on the remote server 70 because only one retransmission and one operation are required, but the disadvantage is that it requires a high equipment cost.

某些較低規格的資料記錄器10並不具有檔案系統的架構,因此採用微處理器(MCU)而僅能在每次傳送單筆資料至遠端伺服器70,也就是說,若採用微處理器架構的資料記錄器10無法將多筆資料包裝成單一個檔案而一次性的傳送時,則必須在連線恢復後從記憶體的起始位置開始依序將遺漏的資料進行補傳送。然而,由於微處理器屬於單執行緒之硬體架構,因此其必須依序地處理多筆資料,在此期間資料記錄器10會呈現不受命令的狀態,若處理資料的時間較長,容易導致使用者誤以為資料記錄器10有故障情形,在使用上較不方便。 Some lower specification data loggers 10 do not have a file system architecture, so a microprocessor (MCU) can be used to transmit a single piece of data to the remote server 70 at a time, that is, if micro When the data logger 10 of the processor architecture cannot package multiple pieces of data into a single file and transfer them at one time, the missing data must be sequentially transferred from the starting position of the memory after the connection is restored. However, since the microprocessor belongs to the hardware architecture of a single thread, it must process multiple pieces of data sequentially, during which the data logger 10 will be in an uncommented state, and if the data is processed for a long time, it is easy. The user is mistaken for the fault of the data logger 10, which is inconvenient to use.

承上述,由於資料記錄器10必須在連線恢復後從記憶體的起始位置開始依序將遺漏的資料進行補傳送,此時若記憶體的容量不足時,會導致部分儲存於記憶體中的資料被覆寫(over write),而使得遠端伺服器70無法判斷資料記錄器10所補傳送的資料是否已全部補傳送完畢,也無法判斷 連線恢復後所接收的資料是否為補傳送的資料,此時便需要透過人工判讀的方式來確認遺漏的資料是否已經全部補傳送完畢,但是當資料記錄器10的數量較多時便難以透過人工的方式進行判讀。除此之外,在連線恢復後,遠端伺服器70或許能藉由將資料記錄器10補傳送的每一筆資料進行運算,並比對多個運算結果之後而得知遺漏的資料是否已補傳送完畢,不過這種做法會大大地增加遠端伺服器70的運算負擔。 In view of the above, since the data logger 10 must sequentially replenish the missing data from the starting position of the memory after the connection is restored, if the capacity of the memory is insufficient, some of the data may be stored in the memory. The data is overwritten, so that the remote server 70 cannot judge whether the data supplemented by the data logger 10 has been completely transferred, and cannot be judged. Whether the data received after the connection is restored is the supplementary data. At this time, it is necessary to confirm whether the missing data has been completely transferred by manual interpretation. However, when the number of data recorders 10 is large, it is difficult to pass. Interpretation in a manual manner. In addition, after the connection is restored, the remote server 70 may be able to calculate each piece of data transmitted by the data logger 10 and compare the results of the multiple operations to know whether the missing data has been The completion of the transfer is completed, but this practice greatly increases the computational load on the remote server 70.

本發明提供一種通訊伺服器,其可改善上述的問題。 The present invention provides a communication server that can improve the above problems.

本發明另提供一種適用於上述通訊伺服器的運算方法。 The present invention further provides an arithmetic method suitable for the above communication server.

本發明提出的一種通訊伺服器用以與資料記錄器溝通,其包括通訊單元以及處理單元。處理單元電性耦接通訊單元並透過通訊單元與資料記錄器建立連線。通訊單元透過所述連線而接收由資料記錄器所傳送之資料。處理單元藉由偵測通訊單元接收資料之頻率是否超過預設頻率而判斷所接收之資料是否包含補拋資料,而其中補拋資料係為處理單元在所述連線中斷的時段應收到而因為所述連線中斷而未在所述連線中斷的時段收到的資料。 The communication server provided by the invention is used for communicating with a data logger, which comprises a communication unit and a processing unit. The processing unit is electrically coupled to the communication unit and establishes a connection with the data logger through the communication unit. The communication unit receives the data transmitted by the data logger through the connection. The processing unit determines whether the received data includes the patch data by detecting whether the frequency of the data received by the communication unit exceeds the preset frequency, and wherein the patch data is received by the processing unit during the interruption period of the connection. The data received during the period in which the connection was interrupted because the connection was interrupted.

本發明又提出的一種適用於上述通訊伺服器的運算方法,其包括下列步驟:建立連線並透過所述連線而使通訊單元接收資料記錄器所傳送之資料;偵測通訊單元接收資料之頻率是否超過預設頻率;當偵測通訊單元接收資料之頻率超過預設頻率時,判斷通訊單元所接收之資料包含補拋 資料;以及,當偵測通訊單元接收資料之頻率不超過預設頻率時,判斷通訊單元接收完畢所述的補拋資料。 The invention further provides an operation method suitable for the above communication server, which comprises the steps of: establishing a connection and transmitting the data transmitted by the data recorder through the connection; and detecting the data received by the communication unit. Whether the frequency exceeds the preset frequency; when detecting that the frequency of receiving the data by the communication unit exceeds the preset frequency, determining that the data received by the communication unit includes the replacement And; when detecting that the frequency of receiving the data by the communication unit does not exceed the preset frequency, determining that the communication unit receives the patch data.

本發明之通訊伺服器因藉由偵測通訊單元接收資料的頻率是否超過預設頻率來判斷所接收之資料是否包含連線中斷時無法傳送而於連線恢復後重新傳送的補傳送資料,因此即使與通訊伺服器連線的資料記錄器僅為單執行緒的硬體架構,透過上述的判斷機制仍然可以判斷出連線恢復後所傳送的資料是否為補傳送資料。 The communication server of the present invention determines whether the received data contains the supplementary transmission data that cannot be transmitted when the connection is interrupted and is retransmitted after the connection is restored, by detecting whether the frequency of the data received by the communication unit exceeds the preset frequency. Even if the data logger connected to the communication server is only a single-threaded hardware architecture, it can be judged through the above-mentioned judgment mechanism whether the data transmitted after the connection is restored is the supplementary transmission data.

10、210‧‧‧資料記錄器 10, 210‧‧‧ data logger

20‧‧‧變頻器 20‧‧‧Inverter

30‧‧‧日照計 30‧‧‧ Days

40‧‧‧商用電表 40‧‧‧Commercial electricity meter

50‧‧‧開關 50‧‧‧ switch

60‧‧‧路由器 60‧‧‧ router

70、200‧‧‧遠端通訊伺服器 70, 200‧‧‧ remote communication server

201‧‧‧通訊單元 201‧‧‧Communication unit

202‧‧‧處理單元 202‧‧‧Processing unit

A、B‧‧‧時段 A, B‧‧ hours

A1、A2、A3‧‧‧正常資料 A1, A2, A3‧‧‧ normal information

B1~Bn‧‧‧補拋資料 B1~Bn‧‧‧Remove data

401~404‧‧‧步驟 401~404‧‧‧Steps

圖1為習知的資料記錄器應用在太陽能電廠的示意圖;圖2為本發明一實施例之通訊伺服器的示意圖;圖3為本發明一實施例之通訊伺服器的資料接收頻率示意圖;圖4為本發明一實施例之通訊伺服器的運算方法流程圖。 1 is a schematic diagram of a conventional data logger applied to a solar power plant; FIG. 2 is a schematic diagram of a communication server according to an embodiment of the present invention; FIG. 3 is a schematic diagram of a data receiving frequency of a communication server according to an embodiment of the present invention; 4 is a flowchart of a computing method of a communication server according to an embodiment of the present invention.

圖2為本發明一實施例之通訊伺服器的示意圖。如圖2所示,通訊伺服器200用以與資料記錄器210溝通,通訊伺服器200包括通訊單元201以及處理單元202。處理單元202電性耦接通訊單元201並透過通訊單元201與資料記錄器210建立連線以進行資料溝通。通訊單元201透過所述連線而接收資料記錄器210所傳送之資料。處理單元202藉由偵測通訊單元201接收資料之頻率是否超過預設頻率而 判斷所接收之資料是否包含補拋資料。前述的補拋資料係為處理單元202在所述連線中斷的時段應收到而因為所述連線中斷而未在所述連線中斷的時段收到的資料。詳細而言,資料紀錄器210用以定期收集(例如每小時一次)與其連接的電子設備的資訊(例如太陽能日照計的讀數、商用電表的讀數或者是太陽能面板的當前發電量),並且將其傳送給通訊伺服器200。 2 is a schematic diagram of a communication server according to an embodiment of the present invention. As shown in FIG. 2, the communication server 200 is configured to communicate with a data logger 210. The communication server 200 includes a communication unit 201 and a processing unit 202. The processing unit 202 is electrically coupled to the communication unit 201 and establishes a connection with the data logger 210 through the communication unit 201 for data communication. The communication unit 201 receives the data transmitted by the data logger 210 through the connection. The processing unit 202 detects whether the frequency of the data received by the communication unit 201 exceeds a preset frequency. Determine whether the received data contains supplementary data. The foregoing patch data is data that the processing unit 202 should receive during the period in which the connection is interrupted and is not received during the period in which the connection is interrupted because the connection is interrupted. In detail, the data logger 210 is used to periodically collect (for example, once per hour) information about the electronic device connected thereto (for example, a reading of a solar illuminometer, a reading of a commercial electric meter, or a current power generation amount of a solar panel), and Transfer to the communication server 200.

當所述通訊伺服器200與資料紀錄器210之間的連線中斷時,原本應該要被傳送至通訊伺服器200的資料會因為所述連線中斷而無法被傳送,因此當所述連線恢復時,通訊伺服器200會重新接收在連線中斷期間所遺漏的資料(也就是補拋資料)。然而在連線恢復後,通訊伺服器200所接收的資料也有可能是在該時段所例行接收的資料(簡稱為正常資料),因此通訊伺服器200的處理單元202便藉由判斷通訊單元201接收資料的頻率來判斷所接收的資料是否為補拋資料。 When the connection between the communication server 200 and the data logger 210 is interrupted, the data that should be transmitted to the communication server 200 may not be transmitted because the connection is interrupted, so when the connection is made Upon recovery, the communication server 200 will re-receive the data (ie, the patch) that was missed during the interruption of the connection. However, after the connection is restored, the data received by the communication server 200 may also be the data routinely received during the period (referred to as normal data), so the processing unit 202 of the communication server 200 determines the communication unit 201. The frequency of receiving data is used to determine whether the received data is a supplementary data.

圖3為本發明一實施例之通訊伺服器的資料接收頻率示意圖。如圖3所示,通訊伺服器200之通訊單元201由所述連線接收之資料包含補拋資料B1~Bn以及正常資料A1~A3。在本實施例中,正常資料A1、A2、A3代表通訊伺服器200以預設頻率所接收之資料,時段A代表通訊單元201除了接收由資料記錄器210所傳送的正常資料A1、A2之外還接收補拋資料B1~Bn,而時段B則代表僅接收正常資料A2、A3。通訊伺服器200係在理想狀況之下以預設頻率接收正常資料,然而,通訊伺服器200與資料記錄器210之間的連線品質有可能不穩定因而導致通訊伺服器200接收正常資 料的頻率與預設頻率有所誤差,因此一般在實施時,會加入安全係數的設計。所述的安全係數例如是預設頻率的一個誤差範圍值,也就是說,假設當通訊伺服器200在理想狀況下每5分鐘會接收到一筆正常資料,而當連線品質不穩時,通訊伺服器200例如是在第6分鐘內所接收到資料亦屬於正常資料。由圖3可知,因為資料記錄器210會在斷線之後而又重新建立連線後,將斷線期間無法傳送而累積在資料記錄器210的資料進行補傳送而形成所謂補拋資料B1~Bn,因此通訊單元201接收到補拋資料B1~Bn的頻率大於接收正常資料A1、A2的頻率,因此當處理單元202偵測到通訊單元201接收資料的頻率超過預設頻率時(例如時段A),便可以判斷通訊單元201接收的資料為補拋資料B1~Bn,直到當處理單元202偵測到通訊單元201接收資料的頻率為預設頻率時(例如時段B),便可以判斷通訊單元201已完成補拋資料的接收。然而,處理單元202也可以多次地偵測通訊單元201接收資料的頻率是否為預設頻率,以確保通訊單元201已完成補拋資料的接收。除此之外,當通訊單元201藉由所述連線而同時接收正常資料以及補拋資料時,還可以優先接收正常資料,以避免資料記錄器210內的記憶體(圖未示)所儲存的正常資料因為記憶體空間不足而被覆寫。例如,若通訊單元201每5分鐘接收一筆正常資料,每5秒鐘接收一筆補拋資料,則當上述5分鐘與5秒鐘的時間週期重疊時,優先接收正常資料。 FIG. 3 is a schematic diagram of data receiving frequency of a communication server according to an embodiment of the present invention. As shown in FIG. 3, the data received by the communication unit 201 of the communication server 200 from the connection includes the patch data B1~Bn and the normal data A1~A3. In the present embodiment, the normal data A1, A2, A3 represent the data received by the communication server 200 at the preset frequency, and the time period A represents the communication unit 201 in addition to the normal data A1, A2 transmitted by the data logger 210. It also receives the supplementary data B1~Bn, while the time period B represents only the normal data A2 and A3. The communication server 200 receives normal data at a preset frequency under ideal conditions. However, the connection quality between the communication server 200 and the data logger 210 may be unstable, thereby causing the communication server 200 to receive normal resources. The frequency of the material is inaccurate with the preset frequency, so the design of the safety factor is generally added during implementation. The safety factor is, for example, an error range value of the preset frequency, that is, it is assumed that when the communication server 200 receives an ordinary data every 5 minutes under ideal conditions, when the connection quality is unstable, the communication is performed. For example, the server 200 receives the data in the 6th minute and is also a normal data. As can be seen from FIG. 3, since the data logger 210 re-establishes the connection after the disconnection, the data accumulated in the data logger 210 cannot be transferred during the disconnection period, and the data is replenished to form the so-called patch data B1~Bn. Therefore, the communication unit 201 receives the frequency of the patch data B1~Bn is greater than the frequency of receiving the normal data A1, A2, so when the processing unit 202 detects that the frequency of the data received by the communication unit 201 exceeds the preset frequency (for example, the period A) Then, it can be judged that the data received by the communication unit 201 is the patch data B1~Bn, until the processing unit 202 detects that the frequency of the data received by the communication unit 201 is a preset frequency (for example, the period B), the communication unit 201 can be judged. The receipt of the supplementary data has been completed. However, the processing unit 202 can also detect whether the frequency of the data received by the communication unit 201 is a preset frequency multiple times to ensure that the communication unit 201 has completed receiving the data. In addition, when the communication unit 201 receives the normal data and the supplementary data by the connection, the normal data can be preferentially received to avoid the storage of the memory (not shown) in the data logger 210. The normal data is overwritten because of insufficient memory space. For example, if the communication unit 201 receives a normal data every 5 minutes and receives a supplemental data every 5 seconds, when the above 5-minute and 5-second time periods overlap, the normal data is preferentially received.

此外,當資料記錄器210所傳送的補拋資料為巨集檔案(單一整合資料型檔案)時,則處理單元202還可以判斷補拋資料已接收完畢而對巨集檔案進行解譯及呈現。一 般來說,巨集檔案的定義係為,將一系列的指令或是資料包含在同一個檔案之中,也就是說,一個巨集檔案之中包含了大量及多元的資訊。而在本實施例中,巨集檔案係為包含至少一個補拋資料且是以檔案形式所傳送,若資料記錄器210的規格較高而具有將多筆補拋資料共同包裝成單一個檔案形式的能力,則通訊伺服器200僅需要在連線恢復後接收包含有多筆補拋資料的單一個巨集檔案即可對連線中斷時期所遺漏的資料進行重算,也就是說,僅需要接收一次資料以及進行一次的運算便可以將連線中斷時所遺漏的資料重新做解譯及呈現,例如當應用在太陽能發電廠時,所述連線中斷時遺漏的資料會被重新計算以得知連線中斷期間特定時間點的對應發電量,並將這些重新計算後的資料以例如圖表的方式呈現以供使用者更直觀地了解電廠發電的狀況。然而,若資料記錄器210的規格不足以將多筆補拋資料包裝成單一個檔案形式,則通訊伺服器200必須一筆一筆地將連線中斷時所遺漏的資料重新接收。 In addition, when the patch data transmitted by the data logger 210 is a macro file (single integrated data file), the processing unit 202 can also determine that the patch file has been received and the macro file is interpreted and presented. One Generally speaking, the definition of a macro file is to include a series of instructions or materials in the same file. That is to say, a macro file contains a large amount of information. In this embodiment, the macro file system is configured to include at least one padding data and is transmitted in the form of a file. If the specification of the data logger 210 is high, the multi-patch data is collectively packaged into a single file format. The ability of the communication server 200 only needs to receive a single macro file containing multiple pieces of data to be recalculated after the connection is restored, that is, the data missing during the connection interruption period is recalculated, that is, only needed Receiving data and performing one operation can re-interpret and present the data missed when the connection is interrupted. For example, when applied to a solar power plant, the missing data will be recalculated when the connection is interrupted. The corresponding power generation amount at a specific time point during the interruption of the connection line is known, and the recalculated data is presented in the form of, for example, a graph for the user to more intuitively understand the state of power generation of the power plant. However, if the specification of the data logger 210 is insufficient to package a plurality of patches of data into a single file format, the communication server 200 must re-receive the data missed when the connection is interrupted.

承上述,當資料記錄器210所傳送的補拋資料不是巨集檔案而是多筆單一資料時,則處理單元202便藉由偵測通訊單元201接收資料之頻率是否不超過預設頻率而判斷補拋資料是否已接收完畢。 In the above, when the patch data transmitted by the data logger 210 is not a macro file but a plurality of single data, the processing unit 202 determines whether the frequency of the data received by the communication unit 201 does not exceed the preset frequency. Whether the patch data has been received.

接下來將對本發明做更詳細的說明。通訊伺服器200之處理單元20還用以儲存多個參數,這些參數包括系統連線旗標、系統斷線時間點以及補拋資料旗標。當所述連線中斷時,處理單元20即記錄系統連線旗標為斷線狀態、記錄系統斷線時間點以及記錄補拋資料旗標為未完成狀態。當所述連線中斷後又再重新連線時,處理單元202即記錄系統 連線旗標為連線狀態,且當處理單元202偵測通訊單元201接收資料之頻率不超過預設頻率時,即對補拋資料進行解譯及呈現並記錄補拋資料旗標為完成狀態。 The invention will now be described in more detail. The processing unit 20 of the communication server 200 is further configured to store a plurality of parameters including a system connection flag, a system disconnection time point, and a patch data flag. When the connection is interrupted, the processing unit 20 records the system connection flag as the disconnection state, the recording system disconnection time point, and the record fill data flag as an incomplete state. When the connection is interrupted and then reconnected, the processing unit 202 is a recording system. The connection flag is in a connected state, and when the processing unit 202 detects that the frequency of the data received by the communication unit 201 does not exceed the preset frequency, the data is interpreted and presented, and the padding data flag is recorded as a completion status. .

如下表1所示,以表1中末三筆參數來做說明。 As shown in Table 1 below, the last three parameters in Table 1 are used for explanation.

當所述連線於2014年5月5日3點(2014/05/05 03:00:00)中斷時,處理單元202會將系統連線旗標設置為0以表示斷線狀態,並將補拋資料旗標也設置為0以表示資料補拋為未完成狀態,最後一併將此斷線時間點(2014/05/05 03:00:00)系統連線旗標、補拋資料旗標的狀態參數儲存。接著,當所述連線於2014年5月5日9點(2014/05/05 09:00:00)恢復時,處理單元202會將系統連線旗標設置為1以表示連線狀態,並在判斷資料補拋完畢之後將補拋資料旗標也設置為1以表示資料補拋為完成狀態,最後將此補拋資料旗標為1的狀態參數儲存。除此之外,補拋資料旗標為1的狀態參數在所述連線多次中斷時,可以當作處理單元202在對補拋資料 做重算時的有效參數,以下將搭配表2來做說明。 When the connection is interrupted at 3 o'clock (2014/05/05 03:00:00) on May 5, 2014, the processing unit 202 sets the system connection flag to 0 to indicate the disconnection state, and The patch data flag is also set to 0 to indicate that the data is added to the incomplete state, and the last time and the disconnection time point (2014/05/05 03:00:00) system connection flag, fill the data flag The target status parameters are stored. Then, when the connection is restored at 9:00 (2014/05/05 09:00:00) on May 5, 2014, the processing unit 202 sets the system connection flag to 1 to indicate the connection status. And after judging that the data is filled, the patch data flag is also set to 1 to indicate that the data is added to the completion state, and finally the state parameter of the patch data flag is 1 is stored. In addition, the state parameter of the patch data flag of 1 can be regarded as the effective parameter of the processing unit 202 when recalculating the patch data when the connection is interrupted multiple times. To explain.

如下表2所示,以補拋資料旗標為1的兩筆參數來做說明。 As shown in Table 2 below, the two parameters of the fill data flag are set to be explained.

表2中第一筆補拋資料旗標為1的時間點為2014年2月25日12點(2014/2/25 12:00:17),第二筆補拋資料旗標為1的時間點為2014年5月5日9點(2014/5/5 09:00:00),在上述兩個時間點之間的系統連線旗標參數有多筆0與1的狀態,表示在上述兩個時間點之間所述連線曾經多次中斷,而期間補拋資料旗標參數均為0,表示當通訊伺服器200尚未接收完畢補拋資料時連線便又中斷了,直到第二筆補拋資料旗標為1的時間點才真正接收完畢補拋資料。此時,僅需要查詢到這兩筆補拋資料旗標為1的時間點,便能得知重算補拋資料所需的時間起始點。 The time point of the first pen-filling data flag in Table 1 is 12:00 on February 25, 2014 (2014/2/25 12:00:17), and the second pen-filling data flag is 1 The point is 9:00 on May 5, 2014 (2014/5/5 09:00:00). The system connection flag parameter between the above two time points has multiple 0 and 1 states, which are indicated above. The connection between the two time points has been interrupted several times, and the parameters of the patch data flag are 0, indicating that the connection is interrupted when the communication server 200 has not received the data. When the pen fill data flag is 1, the time is actually received. At this point, it is only necessary to query the time points when the two fill data flags are 1, and the time starting point required for recalculating the data is known.

補充說明的是,當處理單元202偵測通訊單元201接收資料之頻率不超過預設頻率而判斷補拋資料接收完 畢時,則處理單元202即對補拋資料進行解譯及呈現並記錄補拋資料旗標為1,也就是資料補拋完成狀態。 It is added that when the processing unit 202 detects that the frequency of the data received by the communication unit 201 does not exceed the preset frequency, it is determined that the data is received. At the end of time, the processing unit 202 interprets and presents the patch data and records the patch data flag as 1, that is, the data fill completion status.

圖4為本發明一實施例之通訊伺服器的運算方法流程圖。先前所說明的通訊伺服器200以及其運算方式可以總結歸納出一個運算流程,如圖4所示,其包括步驟401~404。步驟401:建立連線並透過所述連線而使通訊單元接收資料記錄器所傳送之資料。步驟402:偵測通訊單元接收資料之頻率是否超過預設頻率。步驟403:當偵測通訊單元接收資料之頻率超過預設頻率時,判斷通訊單元所接收之資料包含補拋資料。步驟404:當偵測通訊單元接收資料之頻率不超過預設頻率時,判斷通訊單元接收完畢補拋資料。其中,當判斷通訊單元接收完畢補拋資料時,處理單元即對補拋資料進行解譯及呈現,例如根據後續收到的資料更新試算表或統計表,並且輸出/顯示更新之後的試算表或統計表等。 4 is a flow chart of a method for computing a communication server according to an embodiment of the present invention. The previously described communication server 200 and its operation mode can be summarized into an operation flow, as shown in FIG. 4, which includes steps 401 to 404. Step 401: Establish a connection and pass the connection to enable the communication unit to receive the data transmitted by the data logger. Step 402: Detect whether the frequency of the data received by the communication unit exceeds a preset frequency. Step 403: When detecting that the frequency of receiving the data by the communication unit exceeds the preset frequency, determining that the data received by the communication unit includes the patch data. Step 404: When detecting that the frequency of receiving the data by the communication unit does not exceed the preset frequency, determining that the communication unit receives the completion of the data. Wherein, when it is judged that the communication unit receives the completed data, the processing unit interprets and presents the supplementary data, for example, updates the trial or statistical table according to the subsequently received data, and outputs/displays the updated trial balance or Statistics and so on.

綜上所述,本發明透過偵測通訊伺服器接收資料的頻率是否超過預設頻率來判斷所接收的資料是否包含補拋資料,在通訊伺服器接收完補拋資料之後便對所接收的補拋資料進行解譯以及呈現,以將連線中斷時所遺漏的資料補足。本發明透過上述的通訊伺服器運算機制來判斷資料是否補拋完畢,因此適用於單執行緒以及多執行緒的資料記錄器,不需要增加設備成本,也不會對通訊伺服器造成過大的負擔。 In summary, the present invention determines whether the received data contains the patch data by detecting whether the frequency of the data received by the communication server exceeds the preset frequency, and the received packet is received after the communication server receives the patch data. The data is interpreted and presented to complement the information missing from the interruption of the connection. The present invention determines whether the data is completed or not by the above-mentioned communication server operation mechanism, so the data logger for single thread and multi-thread is not required to increase the equipment cost, and does not impose an excessive burden on the communication server. .

雖然本發明已以較佳實施例揭露如上,然其並非用以限定本發明,任何熟習此技藝者,在不脫離本發明之精神和範圍內,當可作些許之更動與潤飾,因此本發明之保 護範圍當視後附之申請專利範圍所界定者為準。 While the present invention has been described in its preferred embodiments, the present invention is not intended to limit the invention, and the present invention may be modified and modified without departing from the spirit and scope of the invention. Protection The scope of protection is subject to the definition of the scope of the patent application attached.

401、402、403、404‧‧‧步驟 401, 402, 403, 404‧ ‧ steps

Claims (10)

一種通訊伺服器,用以與一資料記錄器通信,該通訊伺服器包括:一通訊單元;以及一處理單元,電性耦接該通訊單元並透過該通訊單元與該資料記錄器建立一連線,該通訊單元透過該連線而接收該資料記錄器所傳送之資料,該處理單元用以根據該通訊單元接收資料之頻率是否超過一預設頻率而判斷所接收之資料是否包含一補拋資料,其中該補拋資料係為該處理單元在該連線中斷的時段應收到而因為連線中斷而未在該連線中斷的時段收到的資料。 A communication server for communicating with a data logger, the communication server comprising: a communication unit; and a processing unit electrically coupled to the communication unit and establishing a connection with the data logger through the communication unit The communication unit receives the data transmitted by the data logger through the connection, and the processing unit determines whether the received data includes a supplementary data according to whether the frequency of the data received by the communication unit exceeds a predetermined frequency. The patch data is data that the processing unit should receive during the period when the connection is interrupted and is not received during the period when the connection is interrupted because the connection is interrupted. 如申請專利範圍第1項所述之通訊伺服器,其中當該補拋資料為一巨集檔案時,則該處理單元即判斷該補拋資料已接收完畢而對該巨集檔案進行解譯及呈現,其中該巨集檔案係包含至少一個補拋資料且是以檔案形式所傳送。 For example, in the communication server described in claim 1, wherein when the patch data is a macro file, the processing unit determines that the patch data has been received and the macro file is interpreted and Presented, wherein the macro file system contains at least one patch data and is transmitted in an archive form. 如申請專利範圍第1項所述之通訊伺服器,其中該處理單元藉由偵測該通訊單元接收資料之頻率不超過該預設頻率而判斷該補拋資料已接收完畢。 The communication server of claim 1, wherein the processing unit determines that the patch data has been received by detecting that the frequency of the data received by the communication unit does not exceed the preset frequency. 如申請專利範圍第3項所述之通訊伺服器,其中該處理單元還用以儲存一系統連線旗標、一系統斷線時間點以及一補拋資料旗標,當該連線中斷時,該處理單元即記錄該系統連線旗標為一斷線狀態、記錄該系統斷線時間點以及記錄該補 拋資料旗標為一未完成狀態。 The communication server of claim 3, wherein the processing unit is further configured to store a system connection flag, a system disconnection time point, and a fill data flag. When the connection is interrupted, The processing unit records the system connection flag as a disconnection state, records the system disconnection time point, and records the complement The data flag is thrown to an incomplete state. 如申請專利範圍第4項所述之通訊伺服器,其中當該連線中斷後又再重新連線時,該處理單元即記錄該系統連線旗標為一連線狀態,且當該處理單元偵測該通訊單元接收資料之頻率不超過該預設頻率時,即對該補拋資料進行解譯或呈現、或者解譯及呈現,並記錄該補拋資料旗標為一完成狀態。 The communication server of claim 4, wherein when the connection is interrupted and then reconnected, the processing unit records the system connection flag as a connection state, and when the processing unit When detecting that the frequency of receiving the data by the communication unit does not exceed the preset frequency, the patch data is interpreted or presented, or interpreted and presented, and the patch data flag is recorded as a completed state. 如申請專利範圍第3至4任一項所述之通訊伺服器,其中當該處理單元偵測該通訊單元接收資料之頻率不超過該預設頻率而判斷該補拋資料接收完畢時,則該處理單元即對該補拋資料進行解譯及呈現並記錄該補拋資料旗標為一完成狀態。 The communication server according to any one of claims 3 to 4, wherein when the processing unit detects that the frequency of the data received by the communication unit does not exceed the preset frequency and determines that the supplemental data is received, the The processing unit interprets and presents the patch data and records the patch data flag as a completed state. 如申請專利範圍第1項所述之通訊伺服器,其中該通訊單元由該連線所接收之資料更包含一正常資料,該通訊單元接收該補拋資料之頻率大於接收該正常資料之頻率,其中該通訊單元以該預設頻率所接收之資料即為該正常資料。 The communication server of claim 1, wherein the information received by the communication unit by the connection further comprises a normal data, and the communication unit receives the supplementary data at a frequency greater than a frequency of receiving the normal data. The data received by the communication unit at the preset frequency is the normal data. 如申請專利範圍第7項所述之通訊伺服器,其中當該通訊單元藉由該連線而同時接收該正常資料以及該補拋資料時,優先接收該正常資料。 The communication server of claim 7, wherein the communication unit preferentially receives the normal data when the normal data and the supplementary data are simultaneously received by the communication unit. 一種通訊伺服器運算方法,適用於一通訊伺服器以及與該通訊伺服器通信之一資料記錄器,該通訊伺服器包括一通訊單元以及一處理單元,該通訊伺服器運算方法包括: 建立一連線並透過該連線而使該通訊單元接收該資料記錄器所傳送之資料;偵測該通訊單元接收資料之頻率是否超過一預設頻率;當偵測該通訊單元接收資料之頻率超過該預設頻率時,判斷該通訊單元所接收之資料包含一補拋資料;以及當偵測該通訊單元接收資料之頻率不超過該預設頻率時,判斷該通訊單元接收完畢該補拋資料。 A communication server operation method is applicable to a communication server and a data logger communicating with the communication server, the communication server includes a communication unit and a processing unit, and the communication server operation method comprises: Establishing a connection through which the communication unit receives the data transmitted by the data logger; detecting whether the frequency of the data received by the communication unit exceeds a predetermined frequency; and detecting the frequency of receiving the data by the communication unit When the preset frequency is exceeded, it is determined that the data received by the communication unit includes a patching data; and when detecting that the frequency of receiving the data by the communication unit does not exceed the preset frequency, determining that the communication unit receives the patching data . 如申請專利範圍第9項所述之通訊伺服器運算方法,其中,當判斷該通訊單元接收完畢該補拋資料時,該處理單元即對該補拋資料進行解譯及呈現其中至少之一。 The communication server operation method of claim 9, wherein the processing unit interprets and presents at least one of the patch data when the communication unit determines that the patch data is received.
TW104113557A 2015-03-03 2015-04-28 Communication server and operation method thereof TWI566543B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510094245.XA CN104683466B (en) 2015-03-03 2015-03-03 Server and its operation method

Publications (2)

Publication Number Publication Date
TW201633744A TW201633744A (en) 2016-09-16
TWI566543B true TWI566543B (en) 2017-01-11

Family

ID=53318032

Family Applications (1)

Application Number Title Priority Date Filing Date
TW104113557A TWI566543B (en) 2015-03-03 2015-04-28 Communication server and operation method thereof

Country Status (4)

Country Link
JP (1) JP6448011B2 (en)
CN (1) CN104683466B (en)
TW (1) TWI566543B (en)
WO (1) WO2016138669A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106341291B (en) * 2016-09-08 2019-11-15 北京小米移动软件有限公司 It is connected to the network the test method and device of stability

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101449525A (en) * 2006-04-29 2009-06-03 皇家飞利浦电子股份有限公司 Method for controlling energy consumption of sensor network nodes and device thereof
US20100128653A1 (en) * 2007-03-30 2010-05-27 British Telecommunications Pulbic Limited Ad hoc communication system
TW201023087A (en) * 2008-12-05 2010-06-16 Ind Tech Res Inst Wireless sensor network and data sensing method thereof
CN102945040A (en) * 2012-11-30 2013-02-27 北京航天测控技术有限公司 Remote vehicle monitoring device and system
US20140019397A1 (en) * 2012-07-12 2014-01-16 Roger K. Alexander System and method for efficient data collection in distributed sensor measurement systems

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3097113B2 (en) * 1990-08-01 2000-10-10 ミノルタ株式会社 Image forming apparatus management system and centralized management apparatus
CN101150501A (en) * 2007-10-31 2008-03-26 广州市新邮通信设备有限公司 Self-adapted adjustment method for network speed in radio bandwidth access network
CN101765226B (en) * 2008-12-25 2012-07-25 财团法人工业技术研究院 Wireless sensor network and data sensing method thereof
JP2010166543A (en) * 2008-12-18 2010-07-29 Japan Radio Co Ltd Radio node apparatus
WO2014067126A1 (en) * 2012-11-02 2014-05-08 华为技术有限公司 Method and device for transmitting data packet

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101449525A (en) * 2006-04-29 2009-06-03 皇家飞利浦电子股份有限公司 Method for controlling energy consumption of sensor network nodes and device thereof
US20100128653A1 (en) * 2007-03-30 2010-05-27 British Telecommunications Pulbic Limited Ad hoc communication system
TW201023087A (en) * 2008-12-05 2010-06-16 Ind Tech Res Inst Wireless sensor network and data sensing method thereof
US20140019397A1 (en) * 2012-07-12 2014-01-16 Roger K. Alexander System and method for efficient data collection in distributed sensor measurement systems
CN102945040A (en) * 2012-11-30 2013-02-27 北京航天测控技术有限公司 Remote vehicle monitoring device and system

Also Published As

Publication number Publication date
JP2018513434A (en) 2018-05-24
CN104683466B (en) 2018-01-09
CN104683466A (en) 2015-06-03
WO2016138669A1 (en) 2016-09-09
JP6448011B2 (en) 2019-01-09
TW201633744A (en) 2016-09-16

Similar Documents

Publication Publication Date Title
US9252597B2 (en) Electric power management apparatus, system and method
EP2455719B1 (en) System and method for providing power to a power meter connected to a power line
US8321162B2 (en) Minimizing circulating current using time-aligned data
US8943166B2 (en) Data transfer device, data transfer method, and data transfer system
WO2015177613A1 (en) Monitoring apparatus, and monitoring system using same
TW201828226A (en) Communication device, metering system and power outage notification method
CN107732340B (en) A kind of clock restorative procedure based on intelligent power terminal clock battery undervoltage
TWI566543B (en) Communication server and operation method thereof
JP2017508391A (en) Method for matching data and event gap transmitted / received in network using different communication technologies
JP6563926B2 (en) Synchronous phasor data management system and method
CN104917642B (en) A kind of Port Mirroring data transmission method and its system
US20150338867A1 (en) Sensor apparatus and associated methods
JP5931190B2 (en) Communication apparatus and data collection method
JP2016067134A (en) Transformer station monitoring control system, transformer station server, and transformer station monitoring control system protection control device
KR101524211B1 (en) Apparatus and method for ami communication preventing mass concurrent ack packets
US20150244208A1 (en) Energy management apparatus and method of controlling the same
TW201251252A (en) A power management method of outlet port and the device thereof
JP6238120B2 (en) Distribution board and communication system
CN109390923A (en) Power distribution control method and device for low-voltage direct-current power distribution equipment
CN104283315B (en) Method for improving percent of pass of state estimation data on data forwarding side in transformer substation
KR101776608B1 (en) Apparatus for interconnecting remote meter reading data and system for interconnecting remote meter reading data and method for interconnecting remote meter reading data
CN107579509A (en) A kind of method for solving sampling frequency deviation and being influenceed on current protection directional element
CN105093006B (en) A kind of electrical equipment monitoring method remembered based on electrical quantity band
JP2021069261A (en) Control device, server device, and management method
JP2019213329A (en) Monitoring system and transmitter