本發明的一個目的在於提供一種適用於ClassA模式的下行基地台選擇方案,在為工作在ClassA模式的節點選擇下行基地台時,能夠同時兼顧基地台性能和延遲。
根據本發明的第一個態樣,提供了一種下行基地台選擇方法,包括:回應於接收到節點透過基地台發送的上行訊息,判斷上行訊息是否首次接收到;在判定上行訊息是首次接收到的情況下,對上行訊息進行處理,以確定是否需要向節點發送下行訊息;在需要向節點發送下行訊息的情況下,判斷基地台是否屬於節點的候選基地台集合,其中,候選基地台集合中的候選基地台針對節點的訊號指標大於預定臨界值;在判定基地台屬於節點的候選基地台集合的情況下,將基地台確定為下行基地台,以由該基地台將下行訊息發送給節點。
可選地,該方法還包括:在判定上行訊息不是首次接收到的情況下,將發送上行訊息的基地台的基地台資訊加入到基地台佇列中。
可選地,該方法還包括:在判定基地台不屬於節點的候選基地台集合的情況下,判斷基地台佇列中的基地台是否屬於節點的候選基地台集合;在判定基地台佇列中的基地台屬於節點的候選基地台集合的情況下,將該基地台確定為下行基地台。
可選地,該方法還包括:在判定基地台不屬於節點的候選基地台集合的情況下,判斷後續接收到的上行訊息所對應的基地台是否屬於節點的候選基地台集合;在判定後續接收到的上行訊息所對應的基地台屬於節點的候選基地台集合的情況下,將該基地台確定為下行基地台。
可選地,該方法還包括:在判定後續接收到的上行訊息所對應的基地台均不屬於節點的候選基地台集合的情況下,從接收到的上行訊息所對應的至少部分基地台中選擇訊號品質最好的基地台作為下行基地台。
可選地,該方法還包括:針對上行訊息設定鎖服務,判斷上行訊息是否首次接收到的步驟包括:請求獲取上行訊息對應的鎖,在成功獲取鎖的情況下,判定上行訊息是首次接收到的,在獲取鎖失敗的情況下,判定上行訊息不是首次接收到的。
可選地,該方法還包括:在判定基地台屬於節點的候選基地台集合的情況下,進一步判斷基地台是否滿足上行訊息所指示的下行基地台要求;在判定基地台滿足上行訊息所指示的下行基地台要求的情況下,將基地台確定為下行基地台。
根據本發明的第二個態樣,還提供了一種下行基地台選擇方法,包括:回應於接收到節點透過基地台發送的上行訊息,根據節點透過基地台發送過的一個或多個上行訊息的訊號品質資料,確定基地台針對節點的訊號品質指標,在訊號品質指標大於預定臨界值的情況下,將基地台添加到節點的候選基地台集合;判斷是否首次接收到上行訊息,在判定上行訊息是首次接收到的情況下,對上行訊息進行處理,以確定是否需要向節點發送下行訊息,在需要向節點發送下行訊息的情況下,判斷基地台是否屬於節點的候選基地台集合,在判定基地台屬於節點的候選基地台集合的情況下,將基地台作為下行基地台,以由該基地台將下行訊息發送給節點。
根據本發明的第三個態樣,還提供了一種下行基地台選擇方法,包括:回應於接收到節點透過基地台發送的上行訊息,判斷基地台是否屬於節點的候選基地台集合,其中,候選基地台集合中的候選基地台針對節點的訊號指標大於預定臨界值;在判定基地台屬於節點的候選基地台集合的情況下,判斷上行訊息是否被處理;在判定上行訊息未被處理的情況下,對上行訊息進行處理,以確定是否需要向節點發送下行訊息;在需要向節點發送下行訊息的情況下,將基地台確定為下行基地台,以由該基地台將下行訊息發送給節點。
可選地,該方法還包括:在判定基地台不屬於節點的候選基地台集合的情況下,判斷上行訊息是否被處理;在判定上行訊息未被處理的情況下,將本次接收到的上行訊息或其對應的基地台添加到候選集;在預定時間間隔後,判斷上行訊息是否被處理;在判定上行訊息仍未被處理的情況下,從候選集中選取訊號品質最佳的基地台;對選取的基地台所對應的上行訊息進行處理,以確定是否需要向節點發送下行訊息;在需要向節點發送下行訊息的情況下,將選取的基地台確定為下行基地台。
可選地,該方法還包括:針對上行訊息設定鎖服務,對上行訊息進行處理的步驟包括:獲取上行訊息對應的鎖,在成功獲取鎖的情況下,對上行訊息進行處理,判斷上行訊息是否被處理的步驟包括:請求獲取上行訊息對應的鎖,在獲取鎖失敗的情況下,判定上行訊息被處理。
根據本發明的第四個態樣,還提供了一種下行基地台選擇方法,包括:回應於接收到節點透過基地台發送的上行訊息,根據節點透過基地台發送過的一個或多個上行訊息的訊號品質資料,確定基地台針對節點的訊號品質指標,在訊號品質指標大於預定臨界值的情況下,將基地台添加到節點的候選基地台集合;判斷基地台是否屬於節點的候選基地台集合,其中,候選基地台集合中的基地台針對節點的訊號指標大於預定臨界值,在判定基地台屬於節點的候選基地台集合的情況下,判斷上行訊息是否被處理,在判定上行訊息未被處理的情況下,對上行訊息進行處理,以確定是否需要向節點發送下行訊息,在需要向節點發送下行訊息的情況下,將基地台確定為下行基地台,以由該基地台將下行訊息發送給節點。
根據本發明的第五個態樣,還提供了一種下行基地台選擇方法,包括:回應於接收到節點透過基地台發送的上行訊息,根據節點透過基地台發送過的一個或多個上行訊息的訊號品質資料,確定基地台針對節點的訊號品質指標;在訊號品質指標大於預定臨界值的情況下,將基地台添加到節點的候選基地台集合。
可選地,訊號品質資料包括上行訊息被基地台接收時的訊號強度及/或訊號雜訊比。
可選地,確定基地台針對節點的訊號品質指標的步驟包括:利用滑動平均演算法或加權平均演算法對節點透過基地台發送過的一個或多個上行訊息的訊號品質資料進行處理,以得到基地台針對節點的訊號品質指標。
可選地,該方法還包括:在訊號品質指標小於預定臨界值的情況下,將基地台從候選基地台集合中刪除。
根據本發明的第六個態樣,還提供了一種下行基地台選擇裝置,包括:第一判斷模組,用於回應於接收到節點透過基地台發送的上行訊息,判斷上行訊息是否首次接收到;處理模組,用於在判定上行訊息是首次接收到的情況下,對上行訊息進行處理,以確定是否需要向節點發送下行訊息;第二判斷模組,用於在需要向節點發送下行訊息的情況下,判斷基地台是否屬於節點的候選基地台集合,其中,候選基地台集合中的候選基地台針對節點的訊號指標大於預定臨界值;確定模組,用於在判定基地台屬於節點的候選基地台集合的情況下,將基地台確定為下行基地台,以由該基地台將下行訊息發送給節點。
根據本發明的第七個態樣,還提供了一種下行基地台選擇裝置,包括:第一處理模組和第二處理模組,其中,回應於接收到節點透過基地台發送的上行訊息,第一處理模組和第二處理模組並存執行,其中,第一處理模組根據節點透過基地台發送過的一個或多個上行訊息的訊號品質資料,確定基地台針對節點的訊號品質指標,在訊號品質指標大於預定臨界值的情況下,將基地台添加到節點的候選基地台集合;第二處理模組判斷是否首次接收到上行訊息,在判定上行訊息是首次接收到的情況下,對上行訊息進行處理,以確定是否需要向節點發送下行訊息,在需要向節點發送下行訊息的情況下,判斷基地台是否屬於節點的候選基地台集合,在判定基地台屬於節點的候選基地台集合的情況下,將基地台作為下行基地台,以由該基地台將下行訊息發送給節點。
根據本發明的第八個態樣,還提供了一種下行基地台選擇裝置,包括:第一判斷模組,用於回應於接收到節點透過基地台發送的上行訊息,判斷基地台是否屬於節點的候選基地台集合,其中,候選基地台集合中的候選基地台針對節點的訊號指標大於預定臨界值;第二判斷模組,用於在判定基地台屬於節點的候選基地台集合的情況下,判斷上行訊息是否被處理;處理模組,用於在判定上行訊息未被處理的情況下,對上行訊息進行處理,以確定是否需要向節點發送下行訊息;確定模組,用於在需要向節點發送下行訊息的情況下,將基地台確定為下行基地台,以由該基地台將下行訊息發送給節點。
根據本發明的第九個態樣,還提供了一種下行基地台選擇裝置,包括:第一處理模組和第二處理模組,其中,回應於接收到節點透過基地台發送的上行訊息,第一處理模組和第二處理模組並存執行,其中,第一處理模組根據節點透過基地台發送過的一個或多個上行訊息的訊號品質資料,確定基地台針對節點的訊號品質指標,在訊號品質指標大於預定臨界值的情況下,將基地台添加到節點的候選基地台集合;第二處理模組判斷基地台是否屬於節點的候選基地台集合,其中,候選基地台集合中的基地台針對節點的訊號指標大於預定臨界值,在判定基地台屬於節點的候選基地台集合的情況下,判斷上行訊息是否被處理,在判定上行訊息未被處理的情況下,對上行訊息進行處理,以確定是否需要向節點發送下行訊息,在需要向節點發送下行訊息的情況下,將基地台確定為下行基地台,以由該基地台將下行訊息發送給節點。
根據本發明的第十個態樣,還提供了一種下行基地台選擇裝置,包括:訊號品質指標確定模組,用於回應於接收到節點透過基地台發送的上行訊息,根據節點透過基地台發送過的一個或多個上行訊息的訊號品質資料,確定基地台針對節點的訊號品質指標;候選基地台集合添加模組,用於在訊號品質指標大於預定臨界值的情況下,將基地台添加到節點的候選基地台集合。
根據本發明的第十一個態樣,還提供了一種計算設備,包括:處理器;以及記憶體,其上儲存有可執行碼,當可執行碼被處理器執行時,使處理器執行如本發明第一個態樣至第五個態樣中任一個態樣述及的方法。
根據本發明的第十二個態樣,還提供了一種非暫時性機器可讀儲存媒體,其上儲存有可執行碼,當可執行碼被電子設備的處理器執行時,使處理器執行如本發明第一個態樣至第五個態樣中任一個態樣述及的方法。
本發明透過確定節點的候選基地台集合,可以為下行基地台的選取提供依據,從而可以在低延遲情況下也可以選擇性能較好的基地台作為節點的下行基地台,提高下行資料包的成功率。An object of the present invention is to provide a downlink base station selection scheme suitable for ClassA mode, which can simultaneously take into account base station performance and delay when selecting downlink base stations for nodes working in ClassA mode.
According to the first aspect of the present invention, a method for selecting a downlink base station is provided, which includes: in response to receiving an uplink message sent by a node through the base station, determining whether the uplink message is received for the first time; In the case of processing the uplink message to determine whether it is necessary to send a downlink message to the node; in the case of sending a downlink message to the node, it is determined whether the base station belongs to the set of candidate base stations of the node, where the set of candidate base stations The signal index of the candidate base station for the node is greater than the predetermined threshold; in the case of determining that the base station belongs to the set of candidate base stations of the node, the base station is determined as the downlink base station, so that the base station sends the downlink message to the node.
Optionally, the method further includes: adding the base station information of the base station sending the uplink message to the base station queue in the case where it is determined that the uplink message is not received for the first time.
Optionally, the method further includes: in the case of determining that the base station does not belong to the set of candidate base stations of the node, determining whether the base station in the base station queue belongs to the set of candidate base stations of the node; in determining the base station queue If the base station of belongs to the set of candidate base stations of the node, the base station is determined as the downlink base station.
Optionally, the method further includes: in the case of determining that the base station does not belong to the node's candidate base station set, determining whether the base station corresponding to the subsequently received uplink message belongs to the node's candidate base station set; If the base station corresponding to the received uplink message belongs to the set of candidate base stations of the node, the base station is determined as the downlink base station.
Optionally, the method further includes: in the case where it is determined that none of the base stations corresponding to the subsequently received uplink messages belong to the candidate base station set of the node, selecting a signal from at least part of the base stations corresponding to the received uplink message The base station with the best quality is used as the downlink base station.
Optionally, the method further includes: setting a lock service for the uplink message, and determining whether the uplink message is received for the first time includes: requesting to obtain the lock corresponding to the uplink message, and in the case of successfully obtaining the lock, determining that the uplink message is received for the first time Yes, if the lock acquisition fails, it is determined that the uplink message is not received for the first time.
Optionally, the method further includes: in the case of determining that the base station belongs to the set of candidate base stations of the node, further determining whether the base station meets the requirements of the downlink base station indicated by the uplink message; In the case of a downlink base station request, the base station is determined as a downlink base station.
According to the second aspect of the present invention, there is also provided a method for selecting a downlink base station, which includes: responding to receiving an uplink message sent by a node through a base station, according to the number of one or more uplink messages sent by the node through the base station. The signal quality data determines the signal quality index of the base station for the node. When the signal quality index is greater than the predetermined threshold, the base station is added to the set of candidate base stations for the node; it is judged whether the uplink message is received for the first time, and the uplink message is judged When it is received for the first time, the uplink message is processed to determine whether a downlink message needs to be sent to the node, and when a downlink message needs to be sent to the node, it is determined whether the base station belongs to the set of candidate base stations of the node. When the station belongs to the set of candidate base stations of the node, the base station is used as the downlink base station, and the base station sends the downlink message to the node.
According to a third aspect of the present invention, a method for selecting a downlink base station is also provided, which includes: in response to receiving an uplink message sent by the node through the base station, determining whether the base station belongs to the set of candidate base stations of the node, wherein the candidate The signal index of the candidate base stations in the base station set for the node is greater than the predetermined threshold; in the case of determining that the base station belongs to the candidate base station set of the node, determine whether the uplink message is processed; in the case of determining that the uplink message is not processed , Process the uplink message to determine whether it is necessary to send a downlink message to the node; in the case of needing to send a downlink message to the node, the base station is determined as the downlink base station, so that the base station sends the downlink message to the node.
Optionally, the method further includes: in the case of determining that the base station does not belong to the node's candidate base station set, determining whether the uplink message is processed; in the case of determining that the uplink message has not been processed, the uplink message received this time The message or its corresponding base station is added to the candidate set; after a predetermined time interval, it is determined whether the uplink message is processed; when it is determined that the uplink message has not been processed, the base station with the best signal quality is selected from the candidate set; The uplink message corresponding to the selected base station is processed to determine whether a downlink message needs to be sent to the node; in the case where a downlink message needs to be sent to the node, the selected base station is determined as the downlink base station.
Optionally, the method further includes: setting a lock service for the uplink message, and the step of processing the uplink message includes: obtaining a lock corresponding to the uplink message, and in the case of successfully obtaining the lock, processing the uplink message to determine whether the uplink message is The steps to be processed include: requesting to obtain the lock corresponding to the uplink message, and in the case of failure to obtain the lock, determining that the uplink message is processed.
According to a fourth aspect of the present invention, there is also provided a method for selecting a downlink base station, which includes: responding to receiving an uplink message sent by a node through a base station, according to one or more uplink messages sent by the node through the base station. The signal quality data determines the base station's signal quality index for the node. When the signal quality index is greater than the predetermined threshold, the base station is added to the node's candidate base station set; to determine whether the base station belongs to the node's candidate base station set, Among them, the signal indicators of the base stations in the set of candidate base stations for the node are greater than the predetermined threshold. When it is determined that the base station belongs to the set of candidate base stations of the node, it is determined whether the uplink message is processed. In this case, the uplink message is processed to determine whether a downlink message needs to be sent to the node. In the case of a downlink message needs to be sent to the node, the base station is determined as the downlink base station, so that the base station sends the downlink message to the node .
According to a fifth aspect of the present invention, a method for selecting a downlink base station is also provided, which includes: responding to receiving an uplink message sent by a node through a base station, according to one or more uplink messages sent by the node through the base station. The signal quality data determines the signal quality index of the base station for the node; when the signal quality index is greater than a predetermined threshold, the base station is added to the set of candidate base stations for the node.
Optionally, the signal quality data includes the signal strength and/or signal-to-noise ratio when the uplink message is received by the base station.
Optionally, the step of determining the signal quality index of the base station for the node includes: using a moving average algorithm or a weighted average algorithm to process the signal quality data of one or more uplink messages sent by the node through the base station to obtain The base station's signal quality index for the node.
Optionally, the method further includes: deleting the base station from the set of candidate base stations when the signal quality index is less than a predetermined threshold.
According to the sixth aspect of the present invention, a device for selecting a downlink base station is also provided, including: a first judgment module for judging whether the uplink message is received for the first time in response to receiving the uplink message sent by the node through the base station ; The processing module is used to process the uplink message when it is determined that the uplink message is received for the first time to determine whether a downlink message needs to be sent to the node; the second judgment module is used to send the downlink message to the node In the case of determining whether the base station belongs to the set of candidate base stations of the node, the signal index of the candidate base station in the candidate base station set for the node is greater than the predetermined threshold; the determination module is used to determine whether the base station belongs to the node In the case of a set of candidate base stations, the base station is determined as a downlink base station, and the base station sends the downlink message to the node.
According to a seventh aspect of the present invention, there is also provided a downlink base station selection device, including: a first processing module and a second processing module, wherein, in response to receiving the uplink message sent by the node through the base station, the first A processing module and a second processing module coexist and execute. The first processing module determines the signal quality index of the base station for the node based on the signal quality data of one or more uplink messages sent by the node through the base station. When the signal quality index is greater than the predetermined threshold, the base station is added to the set of candidate base stations of the node; the second processing module determines whether the uplink message is received for the first time, and when it determines that the uplink message is received for the first time, The message is processed to determine whether a downlink message needs to be sent to the node. In the case of sending a downlink message to the node, it is judged whether the base station belongs to the set of candidate base stations of the node. In the case of determining whether the base station belongs to the set of candidate base stations of the node The base station is used as the downlink base station, so that the base station sends the downlink message to the node.
According to an eighth aspect of the present invention, a device for selecting a downlink base station is also provided, including: a first judgment module for judging whether the base station belongs to the node in response to receiving the uplink message sent by the node through the base station Candidate base station set, wherein the signal index of the candidate base station for the node in the candidate base station set is greater than a predetermined threshold; the second judgment module is used for judging when the base station belongs to the candidate base station set of the node Whether the upstream message is processed; the processing module is used to process the upstream message when it is determined that the upstream message has not been processed to determine whether the downstream message needs to be sent to the node; the determining module is used to send the node to the node In the case of a downlink message, the base station is determined as the downlink base station, so that the base station sends the downlink message to the node.
According to a ninth aspect of the present invention, there is also provided a downlink base station selection device, including: a first processing module and a second processing module, wherein, in response to receiving the uplink message sent by the node through the base station, the first A processing module and a second processing module coexist and execute. The first processing module determines the signal quality index of the base station for the node based on the signal quality data of one or more uplink messages sent by the node through the base station. When the signal quality index is greater than the predetermined critical value, the base station is added to the set of candidate base stations of the node; the second processing module determines whether the base station belongs to the set of candidate base stations of the node, wherein the base station in the set of candidate base stations For the signal index of the node greater than the predetermined threshold, in the case of determining that the base station belongs to the set of candidate base stations of the node, it is determined whether the uplink message is processed, and in the case of determining that the uplink message is not processed, the uplink message is processed to It is determined whether it is necessary to send a downlink message to the node, and in the case that a downlink message needs to be sent to the node, the base station is determined as a downlink base station, so that the base station sends the downlink message to the node.
According to the tenth aspect of the present invention, there is also provided a downlink base station selection device, including: a signal quality index determination module, which is used to respond to receiving an uplink message sent by the node through the base station, according to the node sending through the base station The signal quality data of one or more uplink messages passed to determine the signal quality index of the base station for the node; the candidate base station set addition module is used to add the base station to the base station when the signal quality index is greater than the predetermined threshold. The set of candidate base stations for the node.
According to an eleventh aspect of the present invention, there is also provided a computing device, including: a processor; and a memory, on which executable code is stored, and when the executable code is executed by the processor, the processor executes such as The method described in any one of the first aspect to the fifth aspect of the present invention.
According to a twelfth aspect of the present invention, there is also provided a non-transitory machine-readable storage medium having executable code stored thereon. When the executable code is executed by the processor of the electronic device, the processor executes such as The method described in any one of the first aspect to the fifth aspect of the present invention.
The present invention can provide a basis for the selection of downlink base stations by determining the set of candidate base stations of the node, so that a base station with better performance can be selected as the downlink base station of the node under the condition of low delay, and the success of the downlink data packet can be improved. rate.
下面將參照所附圖式更詳細地描述本公開的優選實施方式。雖然所附圖式中顯示了本公開的優選實施方式,然而應該理解,可以以各種形式實現本公開而不應被這裡闡述的實施方式所限制。相反,提供這些實施方式是為了使本公開更加透徹和完整,並且能夠將本公開的範圍完整地傳達給本領域的技術人員。
[術語解釋]
LoRa:一種基於擴頻技術的低功耗遠距離無線傳輸方案。
LoRaWAN:LoRa聯盟推出的一個基於開源的MAC層協議的低功耗廣域網路(Low Power Wide Area Network,LPWAN)標準。這一技術可以為電池供電的無線設備提供一個低功耗、可擴展的長距離無線網路。
NS:Network Server,網路伺服器,是物聯網解決方案中的核心部分-核心網。
基地台:也即閘道,將節點的無線網路訊號透過回傳網路,透傳到NS的設備。
Rxpk:上行訊息,即基地台上傳給NS的資料訊息。
Txpk:下行訊息,即NS下行給基地台的資料訊息。
tmst:基地台內部計數器。
Rssi:節點資料包被基地台接收時的訊號強度。
Snr:節點資料包被基地台接收時的訊號雜訊比。
EUI:設備唯一標識碼,是一個類似IEEE EUI64的全球唯一ID,相當於是設備的MAC位址。
gwEui:基地台的唯一標識碼。
[方案概述]
本發明提出了一種適用於ClassA模式的下行基地台選擇方案,在為工作在ClassA模式的節點(也即終端)選擇下行基地台時,能夠同時兼顧基地台的性能和延遲,使得選取的下行基地台的性能較好,且整個過程的延遲較低。
本發明的基地台選擇方案主要包括兩部分。第一部分是針對節點的候選基地台集合的確定(或者說更新),候選基地台集合用於為下行基地台的選取提供依據。第二部分是針對上行訊息的處理以及下行基地台的選取。其中,第一部分和第二部分可以併發執行,互不影響,實踐中可以分別交由兩個系統進程處理。下面分別就這兩部分的實現原理進行說明。
第一部分主要是回應於接收到節點透過某一基地台發送的上行訊息,根據該節點透過該基地台發送過的一個或多個上行訊息的訊號品質資料(例如Rssi及/或Snr),計算該基地台針對該節點的訊號指標,如可以透過滑動平均演算法或加權平均演算法的方式,得到訊號指標。然後可以將訊號指標與預定臨界值進行比較,如果訊號指標大於預定臨界值,可以認為該基地台的訊號接收狀況良好,適於作為下行基地台,可以將其加入到節點的候選基地台集合。如果訊號指標小於預定臨界值,可以認為該基地台的訊號接收狀況不穩定,不適於作為下行基地台,在候選基地台集合中存在該基地台的情況下,可以將該基地台從候選基地台集合中刪除。由此,回應於接收到節點透過一個或多個基地台上傳的上行訊息,可以對節點的候選基地台集合進行更新,更新後的候選基地台集合中的候選基地台均可以視為是適於向該節點發送下行訊息的下行基地台。由此,所得到的候選基地台集合可以為下行基地台的選取提供依據。
第二部分主要是針對上行訊息的處理以及下行基地台的選取。在本發明中,對於接收到的節點透過多個基地台上傳的多個重複上行訊息,可以針對首次接收到的上行訊息進行處理,然後再在需要發送下行訊息的情況下,選擇下行基地台。另外,也可以先選擇下行基地台,然後再對選擇的下行基地台所對應的上行訊息進行處理。也就是說,處理上行訊息所對應的基地台可以與下行基地台保持一致,也可以不一致。
例如,在首次接收到節點透過基地台發送的上行訊息後,可以首先判斷該基地台是否屬於該節點的候選基地台集合,在判定屬於的情況下,針對該上行訊息進行處理,並將該基地台作為下行基地台。在判定不屬於的情況下,可以不對該上行訊息進行處理,而繼續判斷後續接收到相同上行訊息(也即重複上行訊息)所經過的基地台是否屬於該節點的候選基地台集合,在判定存在屬於候選基地台集合的基地台的情況下,再針對該基地台上傳的上行訊息進行處理,並將該基地台作為下行基地台。
再例如,在首次接收到節點透過基地台發送的上行訊息後,可以直接對該上行訊息進行處理,然後再判斷該基地台是否屬於該節點的候選基地台集合,在判定屬於的情況下,可以直接將該基地台作為該節點的下行基地台,在判定不屬於的情況下,再繼續判斷該節點發送該上行訊息後續所經過的基地台是否屬於候選基地台集合,如果存在屬於候選基地台集合的基地台,則將其作為下行基地台,否則再從節點發送同一上行訊息所經過的基地台中選取訊號品質較好的基地台作為下行基地台。
綜上,透過確定節點的候選基地台集合,可以為下行基地台的選取提供依據,從而可以在低延遲情況下也可以選擇性能較好的基地台作為節點(也即終端)的下行基地台,提高下行資料包(也即下行訊息)的成功率。
下面就本發明涉及的各態樣做進一步說明。
[候選基地台集合]
圖1示出根據本發明例示性實施例的獲取節點的候選基地台集合的方法的示意性流程圖。其中,圖1所示的方法可以由網路伺服器(NS)執行。
參見圖1,在步驟S110,回應於接收到節點透過基地台發送的上行訊息,根據該節點透過該基地台發送過的一個或多個上行訊息的訊號品質資料,確定該基地台針對該節點的訊號品質指標。
根據節點透過基地台發送過的一個或多個上行訊息的訊號品質資料,可以透過多種方式來計算該基地台針對該節點的訊號品質指標。例如,可以透過計算這一個或多個上行訊息的訊號品質資料的平均值,來得到該基地台針對該節點的訊號品質指標。再例如,也可以透過加權平均演算法或滑動平均演算法對節點透過基地台發送過的一個或多個上行訊息的訊號品質資料進行處理,以得到該基地台針對該節點的訊號品質指標。另外,也可以透過其他多種統計方式,來計算基地台針對節點的訊號品質指標,此處不再贅述。
下面僅就透過加權平均演算法或滑動平均演算法來得到訊號品質指標的過程進行例示性說明。
示例1:加權平均演算法。
可以為節點透過該基地台發送過的多個上行訊息的訊號品質資料分別賦予不同的權重。作為示例,權重的大小與接收到基地台發送相應的上行訊息的時間成正比,即接收到該基地台的上行訊息的時間越接近當前時間,權重越大,否則越小。然後可以透過加權求和取平均值的方式得到該基地台針對該節點的訊號品質指標。
示例2,滑動平均演算法。
計算公式如下:S(t)=a*y(t)+(1-a)*S(t-1)。其中S(t)表示基地台當前的訊號品質指標。y(t)表示接收到基地台當前發送的上行訊息的訊號品質資料。S(t-1)表示基地台的歷史訊號品質指標,也即之前確定的基地台的訊號品質指標,如可以是上一次確定的基地台的訊號品質指標。a為滑動因數,其與最近接收到節點透過該基地台發送的兩次上行訊息的時間間隔成正比。
可選地,a的取值範圍可以是在[0,1]之間。當最近接收到節點透過該基地台發送的兩次上行訊息的時間間隔較小時,a比較靠近0,當最近接收到節點透過該基地台發送的兩次上行訊息的時間間隔較大時,a比較靠近1。例如,a可以透過如下公式確定:
其中,alpha是伸縮因數,t是當前接收到節點透過該基地台發送的上行訊息的時間,t_last是上一次接收到該基地台rxpk的時間,該公式的含義是,當最近接收到節點透過該基地台發送的兩次上行訊息的時間間隔較小時,a比較靠近0,當最近接收到節點透過該基地台發送的兩次上行訊息的時間間隔較大時,a比較靠近1。
由此,對於上報週期較短的節點,可以認為在這段時間內基地台與節點間的通道品質不會有劇烈變化,訊號品質指標受歷史值(歷史訊號品質指標)影響較大,訊號品質指標的曲線變化相對平緩。對於上報週期較長的節點,可以認為基地台與節點間的通道品質在這段時間內可能有較大變化,因此訊號品質指標受當前值(基地台當前發送的上行訊息的訊號品質資料)影響較大。
在本發明中,訊號品質資料可以包括上行訊息被基地台接收時的訊號強度(Rssi)及/或訊號雜訊比(Snr)。因此,訊號品質指標也可以包括訊號強度指標及/或訊號雜訊比指標,可以分別記為Rssi′和Snr′。訊號強度指標可以是根據節點透過基地台發送過的一個或多個上行訊息的訊號強度確定的,訊號雜訊比指標可以是根據節點透過基地台發送過的一個或多個上行訊息的訊號雜訊比確定的。關於訊號強度指標及/或訊號雜訊比指標的計算過程,可以參見上文相關描述,此處不再贅述。
在步驟S120,在訊號品質指標大於預定臨界值的情況下,將基地台添加到節點的候選基地台集合。
訊號品質指標可以表徵當前情況下基地台針對節點的訊號優劣情況。在訊號品質指標較大的情況下,可以認為該基地台與該節點間的鏈路品質較好,適於作為該節點的下行基地台。在訊號品質指標小於預定臨界值的情況下,可以認為該基地台與該節點間的鏈路品質不好,不適於作為該節點的下行基地台。
作為示例,可以在訊號品質指標大於預定臨界值的情況下,將該基地台作為該節點的候選基地台,添加到該節點的候選基地台集合。在訊號品質指標小於預定臨界值的情況下,將該基地台從該節點的候選基地台集合中刪除(候選基地台集合中存在該基地台的情況下)。其中,預定臨界值可以根據實際情況設定,此處不再贅述。
在訊號品質指標包括訊號強度指標和訊號雜訊比指標的情況下,可以分別為訊號強度指標和訊號雜訊比指標設定第一預定臨界值和第二預定臨界值。可以在訊號強度指標大於第一預定臨界值且訊號雜訊比指標大於第二預定臨界值的情況下,將該基地台作為該節點的候選基地台,添加到該節點的候選基地台集合。否則,將該基地台從該節點的候選基地台集合中刪除。
作為示例,可以將候選基地台集合中的候選基地台設定一個過期時間,超過一定時間自動將該基地台從候選集合中剔除,每當節點有新的上行訊息時,更新候選基地台集合,通常情況下本次更新只對下一次該節點的ClassA模式的下行基地台的選取生效。
[下行基地台的選擇]
圖2示出根據本發明例示性實施例的下行基地台選擇方法的示意性流程圖。其中,圖2所示的方法可以由網路伺服器(NS)執行。
如圖2所示,回應於接收到節點透過基地台發送的上行訊息,可以執行步驟S111至步驟S114所示的流程,也可以執行步驟S210至步驟S295所示的流程。可選地,回應於接收到節點透過基地台發送的上行訊息,可以並存執行步驟S111至步驟S114所示的流程,以及步驟S210至步驟S295所示的流程。
步驟S111至步驟S114主要是分析基地台是否屬於節點的候選基地台,以對節點的候選基地台集合進行更新。步驟S111至步驟S114涉及的細節部分可以參見上文結合圖1的描述,此處僅就圖2中示出的流程進行例示性說明。
參見圖2,首先在步驟S111,回應於接收到基地台發送的上行訊息,確定基地台針對節點的訊號品質指標。其中,確定訊號品質指標的具體實現流程可以參見上文結合圖1中步驟S110的描述,此處不再贅述。
在步驟S112,判斷訊號品質指標是否大於預定臨界值。
在訊號品質指標大於預定臨界值的情況下,可以執行步驟S113,將該基地台添加到該節點的候選基地台集合。
在訊號品質指標小於預定臨界值的情況下,可以執行步驟S114,在該節點的候選基地台集合中存在該基地台的情況下,將該基地台從候選基地台集合刪除。由此,可以實現對節點的候選基地台集合的即時更新。
步驟S210至步驟S295主要用於處理上行訊息,並在需要發送下行訊息的情況下選擇合適的下行基地台。下面就步驟S210至步驟S295的具體實現過程進行例示性說明。
參見圖2,回應於接收到節點透過基地台發送的上行訊息,執行步驟S210,判斷上行訊息是否首次接收到。這裡可以透過獲取鎖(如分散式鎖)的方式來判斷上行訊息是否首次接收到。具體地,可以針對上行訊息設定鎖服務,僅當首次接收到上行訊息時,可以獲取鎖,當後續接收到節點透過其他基地台發送的重複上行訊息時,無法獲取鎖。如此,回應於接收到節點透過基地台發送的上行訊息,可以請求獲取上行訊息對應的鎖,在成功獲取鎖的情況下,判定上行訊息是首次接收到的,在獲取鎖失敗的情況下,判定上行訊息不是首次接收到的。
在判定上行訊息是首次接收到的情況下,可以執行步驟S220,處理該上行訊息。處理上行訊息的過程可以是現有的NS處理上行訊息的邏輯。這裡主要是分析上行訊息,以確定是否需要向節點發送下行訊息。可選地,在執行步驟S220的過程中,還可以分析節點上傳的上行訊息中是否存在其他特殊要求,例如可以分析上行訊息中是否存在針對下行基地台有特殊要求的指令,如可以分析上行訊息中是否含有deviceTimeReq命令,該命令要求基地台需要有gps時間。
在步驟S230,判斷是否需要發送下行訊息。這裡可以基於步驟S220的處理結果進行判斷。
在不需要發送下行訊息的情況下,無需為節點選擇下行基地台。在需要發送下行訊息(例如有下行指令,或者上行訊息需要ack)的情況下,在步驟S240,判斷該基地台是否屬於節點的候選基地台集合。其中,候選基地台集合可以是透過並存執行方案1確定的。在該基地台屬於節點的候選基地台集合的情況下,將該基地台確定為下行基地台(步驟S250),並向該基地台發送下行訊息(步驟S260)。
在該基地台不屬於節點的候選基地台集合的情況下,可以判斷後續接收到的相同上行訊息(與首次接收到的上行訊息屬於相同上行訊息的重複上行訊息)所對應的基地台是否屬於節點的候選基地台集合。在判定後續接收到的上行訊息所對應的基地台屬於節點的候選基地台集合的情況下,將該基地台確定為下行基地台。
在判定後續接收到的上行訊息所對應的基地台均不屬於節點的候選基地台集合的情況下,可以從當前接收到的所有相同上行訊息所對應的至少部分基地台中選擇訊號品質(訊號接收強度及/或訊號雜訊比)最好的基地台作為下行基地台。例如,可以從節點發送上行訊息所經過的所有基地台中選擇訊號接收強度及/或訊號雜訊比最好的基地台作為下行基地台。
作為示例,在判定上行訊息不是首次接收到的情況下,可以執行步驟S270,將發送該上行訊息的基地台的基地台資訊加入到基地台佇列中,例如可以將基地台資訊加入到節點本次發送的上行訊息所對應的基地台佇列中。其中,基地台資訊可以包括gwEUI、tmst、rssi、snr等資訊。如此,基地台佇列中可以包括當前接收到相同上行訊息所經過的所有基地台的基地台資訊。然後可以執行步驟S280,判斷基地台佇列中的基地台是否屬於候選基地台集合。這裡,可以按照基地台佇列中基地台的添加順序,逐個判斷。如果基地台佇列中存在屬於候選基地台集合的基地台,則可以將該基地台確定為下行基地台(步驟S250),並向該基地台發送下行訊息(步驟S260)。如果基地台佇列中不存在屬於候選基地台集合的基地台,則在步驟S290,從基地台佇列中選取訊號品質(訊號接收強度及/或訊號雜訊比)最佳的基地台,作為下行基地台。在步驟S295,向選取的基地台發送下行訊息。
可選地,在基地台佇列中的基地台均不屬於候選基地台集合的情況下,可以延遲一段時間,重複執行步驟S280。實踐中可以使用延遲佇列實現非同步延遲,不阻塞當前執行緒,提高系統通量率,同時為了保證候選集站集合中的基地台到達後及時被發現,可以縮短睡眠時間,針對步驟S280進行多次的嘗試。
可選地,如果上行訊息中存在針對下行基地台有特殊要求的指令,在選取下行基地台時,還可以進一步考慮基地台是否滿足上行訊息所指示的下行基地台要求。例如,在判定基地台屬於節點的候選基地台集合的情況下,可以進一步判斷基地台是否滿足上行訊息所指示的下行基地台要求,在判定基地台滿足上行訊息所指示的下行基地台要求的情況下,再將該基地台確定為下行基地台。再例如,在從節點發送上行訊息所經過的基地台中選取品質最好的基地台時,也可以從滿足上行訊息所指示的下行基地台要求的基地台中進行選取。
圖3示出根據本發明另一例示性實施例的下行基地台選擇方法的示意性流程圖。其中,圖3所示的方法可以由網路伺服器(NS)執行。
如圖3所示,回應於接收到節點透過基地台發送的上行訊息,可以執行步驟S111至步驟S114所示的流程,也可以執行步驟S310至步驟S329所示的流程。可選地,回應於接收到節點透過基地台發送的上行訊息,可以並存執行步驟S111至步驟S114所示的流程,以及步驟S310至步驟S329所示的流程。關於步驟S111至步驟S114可以參見上文結合圖2的描述,此處不再贅述。
在本實施例中,步驟S310至步驟S329主要是先選擇下行基地台,然後再對選擇的下行基地台所對應的上行訊息進行處理。下面主要就本實施例中步驟S310至步驟S329的具體實現過程進行例示性說明。
參見圖3,回應於接收到節點透過基地台發送的上行訊息,執行步驟S310,判斷基地台是否屬於節點的候選基地台集合。其中,候選基地台集合中的候選基地台針對節點的訊號指標大於預定臨界值,候選基地台集合可以是透過並存執行方案1確定的。
在判定基地台屬於候選基地台集合的情況下,執行步驟S311,判斷上行訊息是否被處理。本發明述及的針對上行訊息的處理,是指對於節點透過一個或多個基地台發送的多個重複上行訊息,從中選擇一個上行訊息進行處理,這多個重複上行訊息可以視為是內容相同的訊息。如果上行訊息已經被處理,則根據本實施例的處理邏輯,表明下行基地台已經選擇完畢。如果上行訊息未被處理,表明下行基地台還未確定,則可以執行步驟S312,對上行訊息進行處理。這裡主要是分析上行訊息,以確定是否需要向節點發送下行訊息。
在本實施例中,判斷上行訊息是否被處理的操作,可以透過是否能夠獲取鎖(如分散式鎖)的方式判斷。例如,可以針對節點發送的同一上行訊息設定鎖服務,在對上行訊息進行處理時,可以請求獲取上行訊息對應的鎖,在成功獲取鎖的情況下,可以對上行訊息進行處理。如果不能獲取鎖,或者鎖存在,則表明上行訊息已經被處理。
在步驟S313,判斷是否需要發送下行訊息。這裡可以基於步驟S312的處理結果進行判斷。在不需要發送下行訊息的情況下,無需為節點選擇下行基地台。在需要發送下行訊息的情況下,在步驟S314,將該基地台確定為下行基地台。在步驟S315,向該基地台發送下行訊息。
在步驟S310的結果為基地台不屬於該節點候選基地台集合的情況下,可以執行步驟S321,判斷上行訊息是否被處理。如果上行訊息已經被處理,則根據本實施例的處理邏輯,表明下行基地台已經選擇完畢。
如果上行訊息未被處理,表明下行基地台還沒有確定,則可以執行步驟S322,將本次接收到的上行訊息或其對應的基地台添加到候選集。
在步驟S323,延時處理。在延時處理的過程中,回應於接收到節點透過其他一個或多個基地台發送的重複的上行訊息,可以繼續按照方案2的處理邏輯進行處理。由此,延時處理後,候選集中包括了多個重複上行訊息或者節點發送同一上行訊息所經過的多個基地台。其中,步驟S323可以由一個延時佇列實現非同步延遲,不阻塞當前執行緒,提高系統通量率。並且延時處理的時間間隔可以根據實際情況設定,不宜過大。
在延時處理完成(或者預定時間間隔後),可以執行步驟S324,判斷上行訊息是否被處理。如果上行訊息被處理,表明下行基地台已經確定。
如果上行訊息未被處理,表明當前接收到節點發送上行訊息所經過的基地台都不屬於候選基地台集合,因此可以執行步驟S325,從候選集中選擇訊號品質(訊號接收強度及/或訊號雜訊比)最好的基地台,然後執行步驟S326,對選擇的基地台所對應的上行訊息進行處理。處理上行訊息的過程可以是現有的NS處理上行訊息的邏輯。這裡主要是分析上行訊息,以確定是否需要向節點發送下行訊息。
在步驟S327,判斷是否需要發送下行訊息。這裡可以基於步驟S326的處理結果進行判斷。在不需要發送下行訊息的情況下,無需為節點選擇下行基地台。在需要發送下行訊息的情況下,在步驟S328,將該基地台確定為下行基地台。在步驟S329,向該基地台發送下行訊息。
綜上,本發明的下行基地台選擇方案在延遲和性能之間做到了很好的平衡,透過分析候選集合基地台,保證A模式的下行基地台的性能在可預期的範圍內。同時因為訊號先到達的基地台,性能也相對較好,因此本發明可以實現在大部分場景下沒有因等待而產生的額外延遲,即使在需要延遲等待其他基地台訊號到達的少數場景下,也可以取得相對較少的延遲,而不必等待所有基地台訊號都已到達。本發明可以在上行訊號處理完成之後進行下行基地台的選取,如果節點上行訊息中有特殊的指令對路由基地台有特殊要求,可以很方便的進行處理。
本發明的下行基地台選擇方案至少存在如下有益效果。
1、NS接收到的上行訊息中包含了基地台接收到上行訊息的內部時間(tmst),不同基地台tmst不同,因此如果想要提前選定好下行基地台,就需要進行時間同步,所有基地台的時鐘保持一致,如此將非常複雜,延遲勢必較高。因此,ClassA模式的下行基地台必須要即時地從上行已達基地台中選取。本發明透過候選基地台集合可以為下行基地台的即時選取提供依據。不需要時間同步,可以在低延遲情況下選擇性能較好的基地台作為終端的下行基地台,提高下行資料包的成功率。
2、實現了ClassA模式的排重與路由的解耦,上行訊息的處理在NS沒有額外的等待延遲。
3、提出了候選基地台集合的概念,候選集合基地台為下行路由基地台的決策提供資料支援,同時候選集合基地台的分析和處理是獨立的進程,不會對節點上下行的核心流程產生影響。
4、使用滑動平均演算法或者加權平均演算法即時分析基地台的訊號品質,可以保證候選基地台集合的即時性和高穩固性。
5、本發明可以實現另類的A上B下的模式,即處理的上行訊息的來源基地台是A基地台,但是下行基地台(發送下行訊息的基地台)是B基地台。下行訊息從B基地台到達,從而可以獲取到B基地台的內部時間tmst,避免了複雜的時間同步工作。
6、本發明實現的A上B下的模式,也可以使得擴展性很好,後續如果針對ClassA模式的路由基地台有新的限制要求時,可以很方便地進行擴充。
[下行基地台選擇裝置]
圖4至圖7是示出根據本發明在不同實施例的下行基地台選擇裝置的結構的示意性方塊圖。其中,下行基地台選擇裝置的功能模組可以由實現本發明原理的硬體、軟體或硬體和軟體的結合來實現。本領域技術人員可以理解的是,圖4至圖7所描述的功能模組可以組合起來或者劃分成子模組,從而實現上述發明的原理。因此,本文的描述可以支持對本文描述的功能模組的任何可能的組合、或者劃分、或者更進一步的限定。
下行基地台選擇裝置可以具有的功能模組以及各功能模組可以執行的操作做簡要說明,對於其中涉及的細節部分可以參見上文描述,這裡不再贅述。
參見圖4,下行基地台選擇裝置400包括第一判斷模組410、處理模組420、第二判斷模組430以及確定模組440。
第一判斷模組410用於回應於接收到節點透過基地台發送的上行訊息,判斷上行訊息是否首次接收到。處理模組420用於在判定上行訊息是首次接收到的情況下,對上行訊息進行處理,以確定是否需要向節點發送下行訊息。第二判斷模組430用於在需要向節點發送下行訊息的情況下,判斷基地台是否屬於節點的候選基地台集合,其中,候選基地台集合中的候選基地台針對節點的訊號指標大於預定臨界值。確定模組440用於在判定基地台屬於節點的候選基地台集合的情況下,將基地台確定為下行基地台,以由該基地台將下行訊息發送給節點。
作為本發明的一個示例,第二判斷模組430在判定基地台不屬於節點的候選基地台集合的情況下,可以判斷後續接收到的上行訊息所對應的基地台是否屬於節點的候選基地台集合。在判定後續接收到的上行訊息所對應的基地台屬於節點的候選基地台集合的情況下,可以由確定模組440將該基地台確定為下行基地台。
可選地,下行基地台選擇裝置400還可以包括選擇模組。在判定後續接收到的上行訊息所對應的基地台均不屬於節點的候選基地台集合的情況下,選擇模組可以從接收到的上行訊息所對應的至少部分基地台中選擇訊號品質最好的基地台作為下行基地台。
作為本發明的另一個示例,下行基地台選擇裝置400還可以包括添加模組,用於在第一判斷模組410判定上行訊息不是首次接收到的情況下,將發送上行訊息的基地台的基地台資訊加入到基地台佇列中。在第二判斷模組430判定基地台不屬於節點的候選基地台集合的情況下,可以進一步判斷基地台佇列中的基地台是否屬於節點的候選基地台集合,在判定基地台佇列中的基地台屬於節點的候選基地台集合的情況下,可以將該基地台確定為下行基地台。
作為本發明的另一個示例,第二判斷模組430在判定基地台屬於節點的候選基地台集合的情況下,可以進一步判斷基地台是否滿足上行訊息所指示的下行基地台要求。在判定基地台滿足上行訊息所指示的下行基地台要求的情況下,才由確定模組440將基地台確定為下行基地台。
參見圖5,在本實施例中,下行基地台選擇裝置500包括第一判斷模組510、第二判斷模組520、處理模組530以及確定模組540。
第一判斷模組510用於回應於接收到節點透過基地台發送的上行訊息,判斷基地台是否屬於節點的候選基地台集合,其中,候選基地台集合中的候選基地台針對節點的訊號指標大於預定臨界值。第二判斷模組520用於在判定基地台屬於節點的候選基地台集合的情況下,判斷上行訊息是否被處理。處理模組530用於在判定上行訊息未被處理的情況下,對上行訊息進行處理,以確定是否需要向節點發送下行訊息。確定模組540用於在需要向節點發送下行訊息的情況下,將基地台確定為下行基地台,以由該基地台將下行訊息發送給節點。
作為本發明的一個示例,下行基地台選擇裝置500還可以包括第三判斷模組、添加模組以及選取模組。
在第一判斷模組510判定基地台不屬於節點的候選基地台集合的情況下,可以由第三判斷模組判斷上行訊息是否被處理。在第三判斷模組判定上行訊息未被處理的情況下,添加模組將本次接收到的上行訊息或其對應的基地台添加到候選集;在預定時間間隔後,第三判斷模組再次判斷上行訊息是否被處理;添加模組可以在判定上行訊息仍未被處理的情況下,從候選集中選取訊號品質最佳的基地台。處理模組530可以對選取的基地台所對應的上行訊息進行處理,以確定是否需要向節點發送下行訊息。在需要向節點發送下行訊息的情況下,確定模組540可以將選取的基地台確定為下行基地台。
參見圖6,在本實施例中,下行基地台選擇裝置600包括訊號品質指標確定模組610和候選基地台集合添加模組620。
訊號品質指標確定模組610用於回應於接收到節點透過基地台發送的上行訊息,根據節點透過基地台發送過的一個或多個上行訊息的訊號品質資料,確定基地台針對節點的訊號品質指標。訊號品質資料可以包括上行訊息被基地台接收時的訊號強度及/或訊號雜訊比。
訊號品質指標確定模組610可以利用滑動平均演算法或加權平均演算法對節點透過基地台發送過的一個或多個上行訊息的訊號品質資料進行處理,以得到基地台針對節點的訊號品質指標。關於具體的確定過程可以參見上文相關描述,此處不再贅述。
候選基地台集合添加模組620用於在訊號品質指標大於預定臨界值的情況下,將基地台添加到節點的候選基地台集合。
可選地,下行基地台選擇裝置600還可以包括刪除模組。刪除模組可以用於在訊號品質指標小於預定臨界值的情況下,將基地台從候選基地台集合中刪除。
參見圖7,在本實施例中,下行基地台選擇裝置700可以包括第一處理模組710和第二處理模組720。回應於接收到節點透過基地台發送的上行訊息,第一處理模組710和第二處理模組720可以並存執行。
第一處理模組710可以包括圖6中的下行基地台選擇裝置所包括的功能模組,並執行圖6中下行基地台選擇裝置所能夠執行的功能。簡要來說,第一處理模組710可以根據節點透過基地台發送過的一個或多個上行訊息的訊號品質資料,確定基地台針對節點的訊號品質指標,在訊號品質指標大於預定臨界值的情況下,將基地台添加到節點的候選基地台集合。關於第一處理模組710還可以執行的操作,可以參見圖6的描述,此處不再贅述。
第二處理模組720可以包括圖4中的下行基地台選擇裝置所包括的功能模組,並執行圖4中下行基地台選擇裝置所能夠執行的功能。另外,第二處理模組720也可以包括圖5中的下行基地台選擇裝置所包括的功能模組,並執行圖5中下行基地台選擇裝置所能夠執行的功能。
例如,第二處理模組720可以用於判斷是否首次接收到上行訊息,在判定上行訊息是首次接收到的情況下,對上行訊息進行處理,以確定是否需要向節點發送下行訊息,在需要向節點發送下行訊息的情況下,判斷基地台是否屬於節點的候選基地台集合,在判定基地台屬於節點的候選基地台集合的情況下,將基地台作為下行基地台,以由該基地台將下行訊息發送給節點。其中,關於第二處理模組720還可以執行的操作,可以參見圖4的描述,此處不再贅述。
再例如,第二處理模組720也可以用於判斷基地台是否屬於節點的候選基地台集合,其中,候選基地台集合中的基地台針對節點的訊號指標大於預定臨界值,在判定基地台屬於節點的候選基地台集合的情況下,判斷上行訊息是否被處理,在判定上行訊息未被處理的情況下,對上行訊息進行處理,以確定是否需要向節點發送下行訊息,在需要向節點發送下行訊息的情況下,將基地台確定為下行基地台,以由該基地台將下行訊息發送給節點。其中,關於第二處理模組720還可以執行的操作,可以參見圖5的描述,此處不再贅述。
[計算設備]
圖8示出根據本發明一實施例可用於實現上述下行基地台選擇方法的計算設備的結構示意圖。
參見圖8,計算設備800包括記憶體810和處理器820。
處理器820可以是一個多核的處理器,也可以包含多個處理器。在一些實施例中,處理器820可以包含一個通用的主處理器以及一個或多個特殊的輔助處理器,例如圖形處理器(GPU)、數位訊號處理器(DSP)等等。在一些實施例中,處理器820可以使用定制的電路實現,例如特定用途積體電路(ASIC,Application Specific Integrated Circuit)或者現場可程式邏輯閘陣列(FPGA,Field Programmable Gate Arrays)。
記憶體810可以包括各種類型的儲存單元,例如系統記憶體、唯讀記憶體(ROM),和永久儲存裝置。其中,ROM可以儲存處理器820或者電腦的其他模組需要的靜態資料或者指令。永久儲存裝置可以是可讀寫的儲存裝置。永久儲存裝置可以是即使電腦斷電後也不會失去儲存的指令和資料的非揮發性儲存設備。在一些實施方式中,永久性儲存裝置採用大型存放區裝置(例如磁或光碟、快閃記憶體)作為永久儲存裝置。另外一些實施方式中,永久性儲存裝置可以是可移除的儲存設備(例如軟碟、光碟機)。系統記憶體可以是可讀寫儲存設備或者揮發性可讀寫儲存設備,例如動態隨機存取內部記憶體。系統記憶體可以儲存一些或者所有處理器在運行時需要的指令和資料。此外,記憶體810可以包括任意電腦可讀儲存媒體的組合,包括各種類型的半導體儲存晶片(DRAM,SRAM,SDRAM,快閃記憶體,可程式唯讀記憶體),磁碟及/或光碟也可以採用。在一些實施方式中,記憶體810可以包括可讀及/或寫的可移除的儲存設備,例如雷射唱片(CD)、唯讀數位多功能光碟(例如DVD-ROM,雙層DVD-ROM)、唯讀藍光光碟、超密度光碟、快閃記憶體卡(例如SD卡、min SD卡、Micro-SD卡等等)、磁性軟碟等等。電腦可讀儲存媒體不包含載波和透過無線或有線傳輸的瞬間電子訊號。
記憶體810上儲存有可執行碼,當可執行碼被處理器820處理時,可以使處理器820執行上文述及的下行基地台選擇方法。
上文中已經參考所附圖式詳細描述了根據本公開的下行基地台選擇方法、裝置及計算設備。
此外,根據本公開的方法還可以實現為一種電腦程式或電腦程式產品,該電腦程式或電腦程式產品包括用於執行本公開的上述方法中限定的上述各步驟的電腦程式碼指令。
或者,本公開還可以實施為一種非暫時性機器可讀儲存媒體(或電腦可讀儲存媒體、或機器可讀儲存媒體),其上儲存有可執行碼(或電腦程式、或電腦指令碼),當所述可執行碼(或電腦程式、或電腦指令碼)被電子設備(或計算設備、伺服器等)的處理器執行時,使所述處理器執行根據本發明的上述方法的各個步驟。
本領域技術人員還將明白的是,結合這裡的公開所描述的各種例示性邏輯塊、模組、電路和演算法步驟可以被實現為電子硬體、電腦軟體或兩者的組合。
所附圖式中的流程圖和方塊圖顯示了根據本公開的多個實施例的系統和方法的可能實現的體系架構、功能和操作。在這點上,流程圖或方塊圖中的每個方塊可以代表一個模組、程式段或程式碼的一部分,所述模組、程式段或程式碼的一部分包含一個或多個用於實現規定的邏輯功能的可執行指令。也應當注意,在有些作為替換的實現中,方塊中所標記的功能也可以以不同於所附圖式中所標記的順序發生。例如,兩個連續的方塊實際上可以基本並行地執行,它們有時也可以按相反的循序執行,這依所涉及的功能而定。也要注意的是,方塊圖及/或流程圖中的每個方塊、以及方塊圖及/或流程圖中的方塊的組合,可以用執行規定的功能或操作的專用的基於硬體的系統來實現,或者可以用專用硬體與電腦指令的組合來實現。
以上已經描述了本公開的各實施例,上述說明是例示性的,並非窮盡性的,並且也不限於所披露的各實施例。在不偏離所說明的各實施例的範圍和精神的情況下,對於本技術領域的普通技術人員來說許多修改和變更都是顯而易見的。本文中所用術語的選擇,旨在最好地解釋各實施例的原理、實際應用或對市場中的技術的改進,或者使本技術領域的其它普通技術人員能理解本文披露的各實施例。Hereinafter, preferred embodiments of the present disclosure will be described in more detail with reference to the accompanying drawings. Although the preferred embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art. [Term Explanation] LoRa: A low-power long-distance wireless transmission scheme based on spread spectrum technology. LoRaWAN: LoRa Alliance launched a Low Power Wide Area Network (LPWAN) standard based on an open source MAC layer protocol. This technology can provide a low-power, scalable long-distance wireless network for battery-powered wireless devices. NS: Network Server, network server, is the core part of IoT solutions-core network. Base station: A gateway that transparently transmits the wireless network signal of the node to the NS through the return network. Rxpk: Uplink message, that is, the data message uploaded by the base station to the NS. Txpk: Downlink message, that is, the data message that NS downlinks to the base station. tmst: Internal counter of the base station. Rssi: The signal strength when the node data packet is received by the base station. Snr: The signal-to-noise ratio when the node data packet is received by the base station. EUI: Device unique identification code, a globally unique ID similar to IEEE EUI64, which is equivalent to the MAC address of the device. gwEui: the unique identification code of the base station. [Scheme Overview] The present invention proposes a downlink base station selection scheme suitable for ClassA mode. When selecting downlink base stations for nodes (that is, terminals) working in ClassA mode, the performance and delay of the base station can be taken into account at the same time, so that The performance of the selected downlink base station is better, and the delay of the whole process is lower. The base station selection scheme of the present invention mainly includes two parts. The first part is to determine (or update) the set of candidate base stations for the node. The set of candidate base stations is used to provide a basis for the selection of downlink base stations. The second part is for the processing of uplink messages and the selection of downlink base stations. Among them, the first part and the second part can be executed concurrently without affecting each other. In practice, they can be handled by two system processes respectively. The implementation principles of these two parts are described below. The first part is mainly in response to receiving an uplink message sent by a node through a certain base station, and calculating the signal quality data (such as Rssi and/or Snr) of one or more uplink messages sent by the node through the base station The base station's signal index for the node can be obtained by means of a moving average algorithm or a weighted average algorithm. The signal index can then be compared with a predetermined threshold. If the signal index is greater than the predetermined threshold, the base station can be considered to have a good signal reception condition and is suitable for use as a downlink base station. It can be added to the node's candidate base station set. If the signal index is less than the predetermined threshold, it can be considered that the signal receiving condition of the base station is unstable and is not suitable for being a downlink base station. If the base station exists in the set of candidate base stations, the base station can be selected from the candidate base station. Delete from the collection. Therefore, in response to receiving the uplink message uploaded by the node through one or more base stations, the node's candidate base station set can be updated, and all the candidate base stations in the updated candidate base station set can be regarded as suitable The downlink base station that sends downlink messages to this node. Thus, the obtained candidate base station set can provide a basis for the selection of downlink base stations. The second part is mainly for the processing of uplink messages and the selection of downlink base stations. In the present invention, for multiple repeated uplink messages uploaded by the received node through multiple base stations, the uplink message received for the first time can be processed, and then the downlink base station is selected when the downlink message needs to be sent. In addition, you can also select the downlink base station first, and then process the uplink message corresponding to the selected downlink base station. In other words, the base station corresponding to the uplink message can be consistent with the downlink base station, or it can be inconsistent. For example, after receiving an uplink message sent by a node through a base station for the first time, it can first determine whether the base station belongs to the set of candidate base stations for the node. If it is determined to belong, the uplink message is processed and the base station is The station serves as a downlink base station. In the case of determining that it does not belong, the uplink message may not be processed and continue to determine whether the base station through which the same uplink message (ie repeated uplink message) is subsequently received belongs to the candidate base station set of the node. In the case of a base station belonging to the set of candidate base stations, the uplink message uploaded by the base station is processed, and the base station is used as the downlink base station. For another example, after receiving the uplink message sent by the node through the base station for the first time, the uplink message can be processed directly, and then it can be judged whether the base station belongs to the set of candidate base stations of the node. Directly use the base station as the node's downlink base station. If it is determined that it does not belong, then continue to determine whether the base station that the node passes through after sending the uplink message belongs to the set of candidate base stations, and if it does belong to the set of candidate base stations If the base station is selected as the downlink base station, otherwise, the base station with better signal quality is selected as the downlink base station from the base stations through which the node sends the same uplink message. In summary, by determining the set of candidate base stations for a node, it can provide a basis for the selection of downlink base stations, so that a base station with better performance can be selected as the downlink base station of the node (that is, the terminal) under low delay conditions. Improve the success rate of downstream data packets (that is, downstream messages). The various aspects related to the present invention will be further explained below. [Candidate base station set] Fig. 1 shows a schematic flowchart of a method for obtaining a node's candidate base station set according to an exemplary embodiment of the present invention. Among them, the method shown in Figure 1 can be executed by a network server (NS). Referring to Fig. 1, in step S110, in response to receiving an uplink message sent by a node through a base station, determine the base station’s response to the node based on the signal quality data of one or more uplink messages sent by the node through the base station Signal quality index. According to the signal quality data of one or more uplink messages sent by the node through the base station, the signal quality index of the base station for the node can be calculated in various ways. For example, the signal quality index of the base station for the node can be obtained by calculating the average value of the signal quality data of the one or more uplink messages. For another example, the signal quality data of one or more uplink messages sent by the node through the base station can also be processed through the weighted average algorithm or the moving average algorithm to obtain the signal quality index of the base station for the node. In addition, various other statistical methods can also be used to calculate the signal quality index of the base station for the node, which will not be repeated here. The following is only an illustrative description of the process of obtaining the signal quality index through the weighted average algorithm or the moving average algorithm. Example 1: Weighted average algorithm. Different weights can be assigned to the signal quality data of the multiple uplink messages sent by the node through the base station. As an example, the size of the weight is proportional to the time when the corresponding uplink message sent by the base station is received, that is, the closer the uplink message of the base station is received to the current time, the greater the weight, otherwise the smaller. Then, the signal quality index of the base station for the node can be obtained by weighting and averaging. Example 2. Moving average algorithm. The calculation formula is as follows: S(t)=a*y(t)+(1-a)*S(t-1). Among them, S(t) represents the current signal quality index of the base station. y(t) represents the signal quality data of the uplink message currently sent by the base station. S(t-1) represents the historical signal quality index of the base station, that is, the previously determined signal quality index of the base station, such as the last determined signal quality index of the base station. a is the sliding factor, which is proportional to the time interval between the two uplink messages sent by the node through the base station. Optionally, the value range of a may be between [0, 1]. When the time interval between the two uplink messages sent by the node through the base station is relatively small, a is closer to 0. When the time interval between the two uplink messages sent by the node through the base station is relatively large, a It is close to 1. For example, a can be determined by the following formula: ![Figure 02_image001](https://patentimages.storage.googleapis.com/b4/bb/17/2e2ca8a8d3a7f6/02_image001.png)
Among them, alpha is the expansion factor, t is the current time of receiving the uplink message sent by the node through the base station, and t_last is the time when the base station rxpk was received last time. The meaning of the formula is that when the node is recently received through the base station When the time interval between the two uplink messages sent by the base station is relatively small, a is closer to 0. When the time interval between the two uplink messages sent by the base station is relatively large, a is closer to 1. Therefore, for nodes with a short reporting period, it can be considered that the quality of the channel between the base station and the node will not change drastically during this period. The signal quality index is greatly affected by the historical value (historical signal quality index). The curve of the quality index changes relatively smoothly. For nodes with a long reporting period, it can be considered that the quality of the channel between the base station and the node may change significantly during this time, so the signal quality index is affected by the current value (the signal quality data of the uplink message currently sent by the base station) Greater impact. In the present invention, the signal quality data may include the signal strength (Rssi) and/or the signal to noise ratio (Snr) when the uplink message is received by the base station. Therefore, the signal quality index may also include a signal strength index and/or a signal-to-noise ratio index, which may be denoted as Rssi′ and Snr′, respectively. The signal strength indicator can be determined based on the signal strength of one or more uplink messages sent by the node through the base station, and the signal-to-noise ratio indicator can be based on the signal noise of one or more uplink messages sent by the node through the base station. Than ok. Regarding the calculation process of the signal strength index and/or the signal-to-noise ratio index, please refer to the relevant description above, which will not be repeated here. In step S120, when the signal quality index is greater than a predetermined threshold, the base station is added to the set of candidate base stations for the node. The signal quality index can characterize the signal quality of the base station for the node in the current situation. In the case of a large signal quality index, it can be considered that the link quality between the base station and the node is good, and it is suitable as a downlink base station of the node. In the case that the signal quality index is less than the predetermined critical value, it can be considered that the link quality between the base station and the node is not good, and it is not suitable as a downlink base station of the node. As an example, when the signal quality index is greater than a predetermined critical value, the base station may be used as a candidate base station of the node and added to the set of candidate base stations of the node. In the case that the signal quality index is less than the predetermined threshold, the base station is deleted from the candidate base station set of the node (when the base station exists in the candidate base station set). Among them, the predetermined critical value can be set according to actual conditions, and will not be repeated here. When the signal quality indicator includes a signal strength indicator and a signal-to-noise ratio indicator, the first predetermined threshold and the second predetermined threshold can be set for the signal strength indicator and the signal-to-noise ratio indicator, respectively. When the signal strength index is greater than the first predetermined threshold and the signal-to-noise ratio indicator is greater than the second predetermined threshold, the base station may be used as a candidate base station of the node and added to the candidate base station set of the node. Otherwise, the base station is deleted from the set of candidate base stations for the node. As an example, the candidate base station in the candidate base station set can be set with an expiration time, the base station will be automatically removed from the candidate set after a certain time, and the candidate base station set will be updated whenever the node has a new uplink message. Usually In this case, this update is only effective for the next selection of the node's ClassA mode downlink base station. [Selection of Downlink Base Station] Fig. 2 shows a schematic flowchart of a method for selecting a downlink base station according to an exemplary embodiment of the present invention. Among them, the method shown in FIG. 2 can be executed by a network server (NS). As shown in FIG. 2, in response to receiving the uplink message sent by the node through the base station, the process shown in step S111 to step S114 can be performed, or the process shown in step S210 to step S295 can be performed. Optionally, in response to receiving the uplink message sent by the node through the base station, the process shown in step S111 to step S114 and the process shown in step S210 to step S295 may be executed concurrently. Steps S111 to S114 mainly analyze whether the base station belongs to the candidate base station of the node, so as to update the set of candidate base stations of the node. The details involved in step S111 to step S114 can be referred to the above description in conjunction with FIG. 1, and only the process shown in FIG. 2 is exemplified here. Referring to FIG. 2, first, in step S111, in response to receiving the uplink message sent by the base station, determine the signal quality index of the base station for the node. Among them, the specific implementation process of determining the signal quality index can be referred to the description above in conjunction with step S110 in FIG. 1, which will not be repeated here. In step S112, it is determined whether the signal quality index is greater than a predetermined threshold. In the case that the signal quality index is greater than the predetermined threshold, step S113 may be executed to add the base station to the set of candidate base stations for the node. In the case that the signal quality index is less than the predetermined critical value, step S114 may be executed, and if the base station exists in the candidate base station set of the node, the base station is deleted from the candidate base station set. As a result, the instant update of the set of candidate base stations of the node can be achieved. Steps S210 to S295 are mainly used to process the uplink message, and to select a suitable downlink base station when the downlink message needs to be sent. The specific implementation process of step S210 to step S295 is exemplified below. Referring to FIG. 2, in response to receiving the uplink message sent by the node through the base station, step S210 is executed to determine whether the uplink message is received for the first time. Here, you can determine whether the uplink message is received for the first time by acquiring a lock (such as a distributed lock). Specifically, the lock service can be set for uplink messages, and the lock can be acquired only when the uplink message is received for the first time, and the lock cannot be acquired when the node subsequently receives repeated uplink messages sent by other base stations. In this way, in response to receiving the uplink message sent by the node through the base station, it can request to obtain the lock corresponding to the uplink message. In the case of successfully obtaining the lock, it is determined that the uplink message is received for the first time, and in the case of failing to obtain the lock, it is determined The uplink message is not received for the first time. In the case where it is determined that the uplink message is received for the first time, step S220 may be executed to process the uplink message. The process of processing uplink messages can be the logic of existing NS processing uplink messages. Here is mainly to analyze the uplink message to determine whether it is necessary to send a downlink message to the node. Optionally, in the process of performing step S220, it is also possible to analyze whether there are other special requirements in the uplink message uploaded by the node. For example, it can analyze whether there are instructions in the uplink message that have special requirements for the downlink base station. For example, it can analyze the uplink message. Whether it contains the deviceTimeReq command, which requires the base station to have gps time. In step S230, it is determined whether a downlink message needs to be sent. The judgment can be made here based on the processing result of step S220. When there is no need to send a downlink message, there is no need to select a downlink base station for the node. In the case where a downlink message needs to be sent (for example, there is a downlink command, or an uplink message needs to be acked), in step S240, it is determined whether the base station belongs to the set of candidate base stations of the node. Among them, the set of candidate base stations can be determined by coexisting implementation scheme 1. In the case that the base station belongs to the set of candidate base stations of the node, the base station is determined as a downlink base station (step S250), and a downlink message is sent to the base station (step S260). In the case that the base station does not belong to the set of candidate base stations of the node, it can be determined whether the base station corresponding to the same uplink message received subsequently (the repeated uplink message belonging to the same uplink message as the first received uplink message) belongs to the node The set of candidate base stations. In the case of determining that the base station corresponding to the subsequently received uplink message belongs to the set of candidate base stations of the node, the base station is determined as the downlink base station. In the case where it is determined that none of the base stations corresponding to the subsequently received uplink messages belong to the set of candidate base stations of the node, the signal quality (signal receiving strength) can be selected from at least part of the base stations corresponding to all the same uplink messages currently received. And/or the base station with the best signal-to-noise ratio) is used as the downlink base station. For example, the base station with the best signal reception strength and/or signal-to-noise ratio can be selected as the downlink base station from all base stations through which the node sends the uplink message. As an example, in the case where it is determined that the uplink message is not received for the first time, step S270 can be executed to add the base station information of the base station that sent the uplink message to the base station queue. For example, the base station information can be added to the node list. In the base station queue corresponding to the uplink message sent this time. Among them, the base station information may include gwEUI, tmst, rssi, snr and other information. In this way, the base station queue can include the base station information of all base stations through which the same uplink message is currently received. Then, step S280 can be executed to determine whether the base station in the base station queue belongs to the set of candidate base stations. Here, it can be judged one by one according to the addition order of the base stations in the base station queue. If there is a base station belonging to the set of candidate base stations in the base station queue, the base station can be determined as a downlink base station (step S250), and a downlink message is sent to the base station (step S260). If there is no base station belonging to the set of candidate base stations in the base station queue, then in step S290, the base station with the best signal quality (signal reception strength and/or signal-to-noise ratio) is selected from the base station queue as Downlink base station. In step S295, a downlink message is sent to the selected base station. Optionally, in the case that none of the base stations in the base station queue belong to the set of candidate base stations, it may be delayed for a period of time, and step S280 may be repeated. In practice, the delay queue can be used to achieve asynchronous delay, not to block the current thread, and to increase the system throughput rate. At the same time, to ensure that the base stations in the candidate station set are found in time after they arrive, the sleep time can be shortened, and step S280 is performed Many attempts. Optionally, if there is an instruction with special requirements for the downlink base station in the uplink message, when selecting the downlink base station, it can further consider whether the base station meets the downlink base station requirements indicated by the uplink message. For example, in the case of determining that the base station belongs to the set of candidate base stations of the node, it can be further determined whether the base station meets the requirements of the downlink base station indicated by the uplink message, and when it is determined that the base station meets the requirements of the downlink base station indicated by the uplink message Next, determine the base station as a downlink base station. For another example, when selecting the best quality base station from the base stations through which the node sends the uplink message, it can also be selected from the base stations that meet the downlink base station requirements indicated by the uplink message. Fig. 3 shows a schematic flowchart of a method for selecting a downlink base station according to another exemplary embodiment of the present invention. Among them, the method shown in FIG. 3 can be executed by a network server (NS). As shown in FIG. 3, in response to receiving the uplink message sent by the node through the base station, the process shown in step S111 to step S114 can be performed, or the process shown in step S310 to step S329 can be performed. Optionally, in response to receiving the uplink message sent by the node through the base station, the process shown in step S111 to step S114 and the process shown in step S310 to step S329 can be executed concurrently. For step S111 to step S114, please refer to the above description in conjunction with FIG. 2, which will not be repeated here. In this embodiment, steps S310 to S329 are mainly to select a downlink base station first, and then process the uplink message corresponding to the selected downlink base station. The following is mainly an illustrative description of the specific implementation process of step S310 to step S329 in this embodiment. Referring to FIG. 3, in response to receiving the uplink message sent by the node through the base station, step S310 is executed to determine whether the base station belongs to the candidate base station set of the node. Wherein, the signal index of the candidate base station for the node in the candidate base station set is greater than the predetermined threshold, and the candidate base station set can be determined through the coexistence implementation scheme 1. In the case of determining that the base station belongs to the set of candidate base stations, step S311 is executed to determine whether the uplink message is processed. The processing of uplink messages mentioned in the present invention refers to multiple repeated uplink messages sent by a node through one or more base stations, and one uplink message is selected for processing. These multiple repeated uplink messages can be regarded as having the same content. Message. If the uplink message has been processed, according to the processing logic of this embodiment, it indicates that the downlink base station has been selected. If the uplink message has not been processed, indicating that the downlink base station has not been determined, step S312 can be executed to process the uplink message. Here is mainly to analyze the uplink message to determine whether it is necessary to send a downlink message to the node. In this embodiment, the operation of judging whether the uplink message is processed can be judged by whether the lock can be acquired (such as a distributed lock). For example, a lock service can be set for the same uplink message sent by a node. When processing the uplink message, it can request the lock corresponding to the uplink message. In the case of successfully obtaining the lock, the uplink message can be processed. If the lock cannot be acquired, or the lock exists, it indicates that the upstream message has been processed. In step S313, it is determined whether a downlink message needs to be sent. The judgment can be made here based on the processing result of step S312. When there is no need to send a downlink message, there is no need to select a downlink base station for the node. In the case where a downlink message needs to be sent, in step S314, the base station is determined as a downlink base station. In step S315, a downlink message is sent to the base station. In the case that the result of step S310 is that the base station does not belong to the node candidate base station set, step S321 can be executed to determine whether the uplink message is processed. If the uplink message has been processed, according to the processing logic of this embodiment, it indicates that the downlink base station has been selected. If the uplink message has not been processed, indicating that the downlink base station has not been determined, step S322 may be executed to add the uplink message received this time or its corresponding base station to the candidate set. In step S323, the processing is delayed. In the process of delay processing, in response to receiving repeated uplink messages sent by the node through one or more other base stations, processing can continue according to the processing logic of Scheme 2. Therefore, after the delay processing, the candidate set includes multiple repeated uplink messages or multiple base stations through which the node sends the same uplink message. Among them, in step S323, a delay queue can implement asynchronous delay, without blocking the current thread, and improving the system throughput rate. And the time interval of delay processing can be set according to the actual situation and should not be too large. After the delay processing is completed (or after a predetermined time interval), step S324 may be executed to determine whether the uplink message is processed. If the uplink message is processed, it indicates that the downlink base station has been determined. If the uplink message is not processed, it means that the base station through which the node is currently sending the uplink message does not belong to the candidate base station set. Therefore, step S325 can be performed to select the signal quality (signal reception strength and/or signal noise) from the candidate set. Than) the best base station, and then execute step S326 to process the uplink message corresponding to the selected base station. The process of processing uplink messages can be the logic of existing NS processing uplink messages. Here is mainly to analyze the uplink message to determine whether it is necessary to send a downlink message to the node. In step S327, it is determined whether a downlink message needs to be sent. The judgment can be made here based on the processing result of step S326. When there is no need to send a downlink message, there is no need to select a downlink base station for the node. In the case where a downlink message needs to be sent, in step S328, the base station is determined as a downlink base station. In step S329, a downlink message is sent to the base station. In summary, the downlink base station selection scheme of the present invention achieves a good balance between delay and performance. By analyzing candidate aggregate base stations, it is ensured that the performance of the downlink base station in mode A is within a predictable range. At the same time, because the base station where the signal arrives first has relatively good performance, the present invention can realize that there is no extra delay caused by waiting in most scenarios, even in a few scenarios where there is a need to delay waiting for signals from other base stations to arrive. A relatively small delay can be achieved without having to wait for all base station signals to arrive. The present invention can select the downlink base station after the uplink signal processing is completed. If there are special instructions in the node uplink message that have special requirements for the routing base station, it can be easily processed. The downlink base station selection scheme of the present invention has at least the following beneficial effects. 1. The uplink message received by the NS contains the internal time (tmst) of the base station receiving the uplink message. Different base stations have different tmst. Therefore, if you want to select the downlink base station in advance, you need to synchronize time. All base stations Keep the same clocks, so it will be very complicated and the delay is bound to be higher. Therefore, the downlink base station in ClassA mode must be selected from the uplink already reached base stations in real time. The present invention can provide a basis for real-time selection of downlink base stations through the collection of candidate base stations. There is no need for time synchronization, and a base station with better performance can be selected as the downlink base station of the terminal under low-delay conditions to improve the success rate of downlink data packets. 2. It realizes the decoupling of re-removal and routing in ClassA mode, and there is no additional waiting delay for the processing of uplink messages in NS. 3. The concept of a set of candidate base stations is proposed. The candidate set base station provides data support for the decision-making of the downlink routing base station. At the same time, the analysis and processing of the candidate set base station is an independent process, which will not generate the core flow of the node's uplink and downlink. influences. 4. Use the moving average algorithm or the weighted average algorithm to analyze the signal quality of the base station in real time, which can ensure the timeliness and high stability of the set of candidate base stations. 5. The present invention can implement an alternative A-up and B-down mode, that is, the source base station of the processed uplink message is the A base station, but the downlink base station (the base station that sends the downlink message) is the B base station. The downlink message arrives from the B base station, so that the internal time tmst of the B base station can be obtained, avoiding complicated time synchronization tasks. 6. The A-up and B-down modes realized by the present invention can also make the scalability very good. If there are new restrictions on the routing base station of the ClassA mode in the future, it can be easily expanded. [Downlink base station selection device] FIGS. 4 to 7 are schematic block diagrams showing the structure of a downlink base station selection device in different embodiments according to the present invention. Among them, the functional modules of the downlink base station selection device can be implemented by hardware, software, or a combination of hardware and software that implement the principles of the present invention. Those skilled in the art can understand that the functional modules described in FIGS. 4 to 7 can be combined or divided into sub-modules to realize the principle of the above-mentioned invention. Therefore, the description herein can support any possible combination, or division, or further limitation of the functional modules described herein. The functional modules that the downlink base station selection device can have and the operations that can be performed by each functional module are briefly described. For the details involved, refer to the above description, which will not be repeated here. Referring to FIG. 4, the downlink base station selection apparatus 400 includes a first determining module 410, a processing module 420, a second determining module 430, and a determining module 440. The first determining module 410 is used for determining whether the uplink message is received for the first time in response to receiving the uplink message sent by the node through the base station. The processing module 420 is used to process the uplink message when it is determined that the uplink message is received for the first time to determine whether it is necessary to send the downlink message to the node. The second judging module 430 is used for judging whether the base station belongs to the candidate base station set of the node when the downlink message needs to be sent to the node, wherein the candidate base station in the candidate base station set has a signal index for the node greater than a predetermined threshold value. The determining module 440 is used to determine the base station as a downlink base station in the case of determining that the base station belongs to the set of candidate base stations of the node, so that the base station sends the downlink message to the node. As an example of the present invention, the second judging module 430 can judge whether the base station corresponding to the subsequent received uplink message belongs to the candidate base station set of the node in the case that the base station does not belong to the set of candidate base stations of the node . In the case of determining that the base station corresponding to the subsequent received uplink message belongs to the candidate base station set of the node, the determining module 440 may determine the base station as a downlink base station. Optionally, the downlink base station selection device 400 may further include a selection module. In the case where it is determined that none of the base stations corresponding to the subsequent received uplink messages belong to the set of candidate base stations of the node, the selection module can select the base with the best signal quality from at least some base stations corresponding to the received uplink messages The station serves as a downlink base station. As another example of the present invention, the downlink base station selection device 400 may also include an adding module for sending the uplink message to the base station of the base station when the first judgment module 410 determines that the uplink message is not received for the first time. The station information is added to the base station queue. In the case that the second judgment module 430 judges that the base station does not belong to the set of candidate base stations of the node, it can further judge whether the base station in the base station queue belongs to the set of candidate base stations of the node. In the case where the base station belongs to the set of candidate base stations of the node, the base station can be determined as a downlink base station. As another example of the present invention, the second judging module 430 can further judge whether the base station meets the downlink base station requirements indicated by the uplink message in the case that the base station belongs to the candidate base station set of the node. When it is determined that the base station meets the requirements of the downlink base station indicated by the uplink message, the determination module 440 determines the base station as the downlink base station. Referring to FIG. 5, in this embodiment, the downlink base station selection device 500 includes a first determining module 510, a second determining module 520, a processing module 530, and a determining module 540. The first judging module 510 is used for judging whether the base station belongs to the candidate base station set of the node in response to receiving the uplink message sent by the node through the base station, wherein the candidate base station in the candidate base station set has a signal index for the node greater than Predetermined threshold. The second judgment module 520 is used for judging whether the uplink message is processed when it is judged that the base station belongs to the set of candidate base stations of the node. The processing module 530 is used to process the uplink message when it is determined that the uplink message has not been processed to determine whether the downlink message needs to be sent to the node. The determining module 540 is used to determine the base station as a downlink base station when a downlink message needs to be sent to the node, so that the base station sends the downlink message to the node. As an example of the present invention, the downlink base station selection device 500 may further include a third judgment module, an addition module, and a selection module. In the case where the first determining module 510 determines that the base station does not belong to the set of candidate base stations of the node, the third determining module can determine whether the uplink message is processed. When the third judgment module determines that the uplink message has not been processed, the adding module adds the uplink message received this time or its corresponding base station to the candidate set; after the predetermined time interval, the third judgment module again Determine whether the uplink message is processed; the add module can select the base station with the best signal quality from the candidate set when the uplink message has not been processed. The processing module 530 can process the uplink message corresponding to the selected base station to determine whether a downlink message needs to be sent to the node. In the case that a downlink message needs to be sent to the node, the determining module 540 may determine the selected base station as a downlink base station. Referring to FIG. 6, in this embodiment, the downlink base station selection device 600 includes a signal quality index determination module 610 and a candidate base station set addition module 620. The signal quality index determination module 610 is used to respond to receiving the uplink message sent by the node through the base station, and determine the signal quality index of the base station for the node based on the signal quality data of one or more uplink messages sent by the node through the base station . The signal quality data may include the signal strength and/or the signal-to-noise ratio when the uplink message is received by the base station. The signal quality index determination module 610 may use a moving average algorithm or a weighted average algorithm to process the signal quality data of one or more uplink messages sent by the node through the base station to obtain the signal quality index of the base station for the node. For the specific determination process, please refer to the relevant description above, which will not be repeated here. The candidate base station set adding module 620 is used to add the base station to the candidate base station set of the node when the signal quality index is greater than the predetermined threshold. Optionally, the downlink base station selection device 600 may also include a deletion module. The deletion module can be used to delete the base station from the set of candidate base stations when the signal quality index is less than a predetermined threshold. Referring to FIG. 7, in this embodiment, the downlink base station selection apparatus 700 may include a first processing module 710 and a second processing module 720. In response to receiving the uplink message sent by the node through the base station, the first processing module 710 and the second processing module 720 can coexist and execute. The first processing module 710 may include functional modules included in the downlink base station selection device in FIG. 6 and perform functions that can be performed by the downlink base station selection device in FIG. 6. In brief, the first processing module 710 can determine the signal quality index of the base station for the node based on the signal quality data of one or more uplink messages sent by the node through the base station. When the signal quality index is greater than a predetermined threshold Next, add the base station to the set of candidate base stations for the node. For operations that can be performed by the first processing module 710, refer to the description of FIG. 6, which will not be repeated here. The second processing module 720 may include functional modules included in the downlink base station selection device in FIG. 4, and perform functions that can be performed by the downlink base station selection device in FIG. 4. In addition, the second processing module 720 may also include functional modules included in the downlink base station selection device in FIG. 5, and perform functions that can be performed by the downlink base station selection device in FIG. 5. For example, the second processing module 720 can be used to determine whether the uplink message is received for the first time, and in the case of determining that the uplink message is received for the first time, process the uplink message to determine whether the downlink message needs to be sent to the node, When a node sends a downlink message, it is judged whether the base station belongs to the set of candidate base stations of the node, and when it is judged that the base station belongs to the set of candidate base stations of the node, the base station is used as the downlink base station, so that the base station will downlink The message is sent to the node. For operations that can be performed by the second processing module 720, refer to the description of FIG. 4, which will not be repeated here. For another example, the second processing module 720 can also be used to determine whether the base station belongs to the set of candidate base stations of the node, wherein the signal index of the base station for the node in the set of candidate base stations is greater than a predetermined threshold, and it is determined that the base station belongs to In the case of a set of candidate base stations of a node, determine whether the uplink message is processed, and in the case of determining that the uplink message is not processed, process the uplink message to determine whether a downlink message needs to be sent to the node, and when the downlink message needs to be sent to the node In the case of a message, the base station is determined as a downlink base station, so that the base station sends the downlink message to the node. For the operations that can be performed by the second processing module 720, refer to the description of FIG. 5, which will not be repeated here. [Calculating Device] FIG. 8 shows a schematic structural diagram of a computing device that can be used to implement the above method for selecting a downlink base station according to an embodiment of the present invention. Referring to FIG. 8, the computing device 800 includes a memory 810 and a processor 820. The processor 820 may be a multi-core processor, or may include multiple processors. In some embodiments, the processor 820 may include a general-purpose main processor and one or more special auxiliary processors, such as a graphics processing unit (GPU), a digital signal processor (DSP), and so on. In some embodiments, the processor 820 may be implemented with a customized circuit, such as an Application Specific Integrated Circuit (ASIC) or a Field Programmable Gate Array (FPGA). The memory 810 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage. Among them, the ROM can store static data or instructions required by the processor 820 or other modules of the computer. The permanent storage device may be a readable and writable storage device. The permanent storage device may be a non-volatile storage device that does not lose stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a large storage area device (such as a magnetic or optical disk, flash memory) as the permanent storage device. In other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, an optical disk drive). The system memory can be a read-write storage device or a volatile read-write storage device, such as dynamic random access internal memory. The system memory can store some or all of the instructions and data required by the processor during operation. In addition, the memory 810 may include any combination of computer-readable storage media, including various types of semiconductor storage chips (DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), magnetic disks and/or optical disks. Can be used. In some embodiments, the memory 810 may include removable storage devices that can be read and/or written, such as compact discs (CDs), read-only multi-function optical discs (such as DVD-ROM, double-layer DVD-ROM) ), read-only Blu-ray discs, ultra-density discs, flash memory cards (such as SD cards, min SD cards, Micro-SD cards, etc.), magnetic floppy disks, etc. Computer-readable storage media does not include carrier waves and instant electronic signals transmitted by wireless or wired. An executable code is stored in the memory 810. When the executable code is processed by the processor 820, the processor 820 can execute the downlink base station selection method described above. The method, device and computing device for downlink base station selection according to the present disclosure have been described in detail above with reference to the accompanying drawings. In addition, the method according to the present disclosure can also be implemented as a computer program or computer program product. The computer program or computer program product includes computer program code instructions for executing the above steps defined in the above method of the present disclosure. Alternatively, the present disclosure can also be implemented as a non-transitory machine-readable storage medium (or computer-readable storage medium, or machine-readable storage medium) on which executable code (or computer program, or computer script) is stored When the executable code (or computer program, or computer instruction code) is executed by the processor of the electronic device (or computing device, server, etc.), the processor is made to execute the steps of the above method according to the present invention . Those skilled in the art will also understand that the various exemplary logic blocks, modules, circuits, and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software, or a combination of both. The flowcharts and block diagrams in the accompanying drawings show the possible implementation architecture, functions, and operations of the system and method according to multiple embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram can represent a module, program segment, or part of the code, and the module, program segment, or part of the code contains one or more for implementing the requirements Executable instructions for logical functions. It should also be noted that, in some alternative implementations, the functions marked in the block may also occur in a different order than the order marked in the drawings. For example, two consecutive blocks can actually be executed in parallel, or they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and/or flowchart, as well as the combination of blocks in the block diagram and/or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations. It can be realized, or it can be realized by a combination of dedicated hardware and computer instructions. The various embodiments of the present disclosure have been described above, and the above description is illustrative, not exhaustive, and is not limited to the disclosed embodiments. Without departing from the scope and spirit of the described embodiments, many modifications and changes are obvious to those of ordinary skill in the art. The choice of terms used herein is intended to best explain the principles, practical applications, or improvements of the technologies in the market, or to enable other ordinary skilled in the art to understand the embodiments disclosed herein.