TWI856829B - Load distribution device and method - Google Patents
Load distribution device and method Download PDFInfo
- Publication number
- TWI856829B TWI856829B TW112136881A TW112136881A TWI856829B TW I856829 B TWI856829 B TW I856829B TW 112136881 A TW112136881 A TW 112136881A TW 112136881 A TW112136881 A TW 112136881A TW I856829 B TWI856829 B TW I856829B
- Authority
- TW
- Taiwan
- Prior art keywords
- servers
- terminal device
- server
- load
- load distribution
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims description 19
- 238000011156 evaluation Methods 0.000 claims abstract description 34
- 230000004044 response Effects 0.000 claims abstract description 34
- 230000005540 biological transmission Effects 0.000 claims description 6
- 230000002159 abnormal effect Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 238000010801 machine learning Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Abstract
Description
本揭露有關於一種負載分配裝置及方法,特別是有關於一種內容傳遞網路伺服器的負載分配裝置及方法。The present disclosure relates to a load distribution device and method, and more particularly to a load distribution device and method for a content delivery network server.
一般而言,網路串流系統中的前端播放器在收到連結至內容傳遞網路(Content Delivery Network,CDN)中特定伺服器之網址後,在當次的播放作業中將持續向同一個伺服器下載所需的串流檔案。然而,若大量用戶集中存取單一伺服器,將造成伺服器負載過高進而影響到串流服務品質。Generally speaking, after receiving the URL of a specific server in the Content Delivery Network (CDN), the front-end player in the network streaming system will continue to download the required streaming files from the same server during the current playback operation. However, if a large number of users access a single server, the server will be overloaded and the streaming service quality will be affected.
除此之外,不同的伺服器的運作成本可能並不相同,若流量集中於成本較高的伺服器,還可能會產生較高的營運成本。In addition, the operating costs of different servers may be different. If traffic is concentrated on servers with higher costs, higher operating costs may also be incurred.
有鑑於此,如何動態調整內容傳遞網路中伺服器的負載,乃業界亟需努力之目標。In view of this, how to dynamically adjust the server load in the content delivery network is a goal that the industry urgently needs to work on.
為了解決上述問題,本揭露提出一種負載分配裝置,包含一收發介面以及一處理器。該收發介面通訊連接複數個伺服器以及一終端裝置。該終端裝置自該些伺服器其中之一第一伺服器取得複數個串流檔案之一第一子檔案。該處理器耦接該收發介面,並且用以執行以下步驟:自該終端裝置接收一資源請求;響應於自該終端裝置接收該資源請求,基於一評估結果判斷是否將該終端裝置重導向至該些伺服器其中之一第二伺服器;以及響應於判斷將該終端裝置重導向至該第二伺服器,傳送一資源回應至該終端裝置以指示該終端裝置自該第二伺服器取得該些串流檔案之一第二子檔案。To solve the above problem, the present disclosure provides a load distribution device, including a transceiver interface and a processor. The transceiver interface is communicatively connected to a plurality of servers and a terminal device. The terminal device obtains a first sub-file of a plurality of streaming files from a first server among the servers. The processor is coupled to the transceiver interface and is used to execute the following steps: receiving a resource request from the terminal device; in response to receiving the resource request from the terminal device, determining whether to redirect the terminal device to a second server among the servers based on an evaluation result; and in response to determining to redirect the terminal device to the second server, transmitting a resource response to the terminal device to instruct the terminal device to obtain a second sub-file of the streaming files from the second server.
本揭露還提供一種負載分配方法,適用於一電子裝置,其中該電子裝置通訊連接複數個伺服器以及一終端裝置,並且該終端裝置自該些伺服器其中之一第一伺服器取得複數個串流檔案之一第一子檔案,該負載分配方法包含:自該終端裝置接收一資源請求;響應於自該終端裝置接收該資源請求,基於一評估結果判斷是否將該終端裝置重導向至該些伺服器其中之一第二伺服器;以及響應於判斷將該終端裝置重導向至該第二伺服器,傳送一資源回應至該終端裝置以指示該終端裝置自該第二伺服器取得該些串流檔案之一第二子檔案。The present disclosure also provides a load distribution method applicable to an electronic device, wherein the electronic device is communicatively connected to a plurality of servers and a terminal device, and the terminal device obtains a first sub-file of a plurality of streaming files from a first server among the servers. The load distribution method includes: receiving a resource request from the terminal device; in response to receiving the resource request from the terminal device, determining whether to redirect the terminal device to a second server among the servers based on an evaluation result; and in response to determining to redirect the terminal device to the second server, transmitting a resource response to the terminal device to instruct the terminal device to obtain a second sub-file of the streaming files from the second server.
應該理解的是,前述的一般性描述和下列具體說明僅僅是示例性和解釋性的,並旨在提供所要求的本揭露的進一步說明。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are intended to provide further explanation of the disclosure as claimed.
為了使本揭露之敘述更加詳盡與完備,可參照所附之圖式及以下所述各種實施例,圖式中相同之號碼代表相同或相似之元件。In order to make the description of the present disclosure more detailed and complete, reference may be made to the attached drawings and various embodiments described below, in which the same numbers in the drawings represent the same or similar elements.
請參照第1圖,其為本揭露第一實施方式中負載分配裝置1的示意圖。負載分配裝置1包含處理器12以及收發介面14,其中處理器12耦接收發介面14,並且收發介面14通訊連接終端裝置E以及伺服器S1至Sn。Please refer to FIG. 1, which is a schematic diagram of a
在一些實施例中,處理器12可包含中央處理單元(central processing unit,CPU)、多重處理器、分散式處理系統、特殊應用積體電路(application specific integrated circuit,ASIC)和/或合適的運算單元。In some embodiments, the
收發介面14可以有線或無線方式通訊連接終端裝置E以及伺服器S1至Sn,例如收發介面14可以包含一或多種不同通訊協定之介面(interface),例如:通用序列匯流排(Universal Serial Bus,USB)、藍牙介面、乙太網路介面、Wi-Fi網路介面和/或其他通訊介面。在一些實施例中,收發介面14透過網際網路通訊連接終端裝置E以及伺服器S1至Sn。The
在一些實施例中,負載分配裝置1為網路服務伺服器(例如:影音串流服務伺服器)。伺服器S1至Sn為內容傳遞網路中的伺服器(例如:內容傳遞網路伺服器),用以提供終端裝置E網路服務(例如:影音串流服務),其中n可以是不小於2的正整數。終端裝置E可以向負載分配裝置1傳送服務請求,而負載分配裝置1基於服務請求選擇伺服器S1至Sn其中至少一,並且產生對應的網路位址(Uniform Resource Locator,URL)。In some embodiments, the
舉例來說,使用者欲存取特定串流影音服務時,可以透過終端裝置E傳送存取請求至串流影音提供者的伺服器(即,負載分配裝置1)。進一步地,若負載分配裝置1選擇伺服器S1提供終端裝置E服務,則傳送用以連結至伺服器S1的網路位址至終端裝置E,藉以使終端裝置E得以透過網路位址向伺服器S1存取串流影音等服務。For example, when a user wants to access a specific streaming video service, he can send an access request to the server of the streaming video provider (i.e., load distribution device 1) through terminal device E. Furthermore, if
基於效率等考量,網路串流服務中對應同一個服務的母檔案(例如:電影影片檔案)被切割為多個較小的子檔案,並且建立索引檔案,其中索引檔案紀錄母檔案對應的複數個子檔案以及子檔案的順序。例如索引檔案紀錄影片母檔案被切割為檔名為M1至M5的五個檔案,並且播放順序為M1、M2、M3、M4及M5,換言之,使用者的終端裝置E可以先取得M1檔案並播放,在播放同時下載M2及其餘的檔案,而不需要等待下載完整的母檔案後才能觀賞影片。如此一來,終端裝置E存取串流服務時,可以先取得索引檔案,再依據索引檔案的內容依序向伺服器存取對應的子檔案。Based on efficiency and other considerations, the parent file corresponding to the same service in the network streaming service (for example, a movie file) is cut into multiple smaller sub-files, and an index file is created, where the index file records the multiple sub-files corresponding to the parent file and the order of the sub-files. For example, the index file records that the video parent file is cut into five files named M1 to M5, and the playback order is M1, M2, M3, M4 and M5. In other words, the user's terminal device E can first obtain the M1 file and play it, and download M2 and the remaining files while playing, without having to wait for the complete parent file to be downloaded before watching the video. In this way, when the terminal device E accesses the streaming service, it can first obtain the index file, and then access the corresponding sub-files from the server in sequence according to the content of the index file.
在一些實施例中,伺服器S1至Sn均儲存有相同的檔案。舉例而言,伺服器S1至Sn均儲存子檔案M1、M2、M3、M4及M5。In some embodiments, the servers S1 to Sn all store the same file. For example, the servers S1 to Sn all store sub-files M1, M2, M3, M4, and M5.
需要注意的是,基於內容傳遞網路架構,伺服器S1至Sn儲存提供服務所需的檔案(例如前揭索引檔案及子檔案),因此負載分配裝置1可以根據伺服器S1至Sn的負載、連線效率、營運成本等因素選擇伺服器S1至Sn其中之一以提供終端裝置E服務。It should be noted that, based on the content delivery network architecture, servers S1 to Sn store files required for providing services (such as the aforementioned index files and sub-files), so the
當終端裝置E存取負載分配裝置1所提供之服務時,終端裝置E會存取伺服器S1至Sn其中之一(例如:伺服器S1)以取得複數個串流檔案其中之一(例如:子檔案M1)。至於有關負載分配裝置1如何動態地調整伺服器S1至Sn的負載,請參考以下實施例。When the terminal device E accesses the service provided by the
首先,負載分配裝置1的處理器12自終端裝置E接收一資源請求。接著,響應於自終端裝置E接收該資源請求,處理器12基於一評估結果判斷是否將終端裝置E重導向至伺服器S1至Sn其中之一第二伺服器。最後,響應於判斷將終端裝置E重導向至該第二伺服器,處理器12傳送一資源回應至終端裝置E以指示終端裝置E自該第二伺服器取得該些串流檔案中的其他檔案(例如:子檔案M2)。First, the
舉例而言,終端裝置E可以定期(例如:每5分鐘)向負載分配裝置1傳送資源請求,負載分配裝置1接收資源請求後,處理器12可以基於伺服器S1至Sn的運作狀態(例如:當下負載狀態)產生對應伺服器S1至Sn其中之一的評估結果(例如:處理器12判斷伺服器S2當下負載最低,則評估結果對應伺服器S2),最後若處理器12 基於評估結果判斷需要重導向終端裝置E ,則傳送對應評估結果的伺服器(例如:伺服器S2)的資源回應至終端裝置E以重導向終端裝置E至另一個伺服器。進一步地,終端裝置E接收到資源回應後,則會改向資源回應對應的伺服器存取資源(例如:下載檔案)。For example, the terminal device E may periodically (e.g., every 5 minutes) send a resource request to the
如此一來,負載分配裝置1則可以定期地判斷是否將終端裝置E重導向至其他伺服器,藉以動態調整伺服器S1至Sn的負載。至於有關前揭運作的具體細節,請參考以下段落。In this way, the
在一些實施例中,終端裝置E在存取串流服務時可以先向伺服器S1取得子檔案M1,其後在取得子檔案M2前,終端裝置E可以向負載分配裝置1傳送資源請求以確認接續下載子檔案M2的對象(即,伺服器S1至Sn其中之一)。In some embodiments, when accessing a streaming service, the terminal device E may first obtain the sub-file M1 from the server S1, and then before obtaining the sub-file M2, the terminal device E may send a resource request to the
於某些實施方式中,終端裝置E係基於負載分配裝置1制定之請求規則向負載分配裝置1傳送資源請求。具體而言,負載分配裝置1制定之請求規則可包含環境網路狀態、影片延遲狀態、子檔案傳輸狀態、請求頻率等等條件。In some implementations, the terminal device E sends a resource request to the
於某些實施方式中,負載分配裝置1還可以向終端裝置E傳送該請求規則以更新終端裝置E儲存的請求規則。舉例而言,當終端裝置E判斷環境網路狀態不佳時,終端裝置E基於請求規則向負載分配裝置1傳送資源請求。In some implementations, the
在一些實施例中,負載分配裝置1的處理器12還用以自伺服器S1至Sn接收複數個運作狀態,其中該些運作狀態各者對應伺服器S1至Sn其中之一。具體而言,處理器12可以透過收發介面14分別自伺服器S1至Sn接收對應的運作狀態,運作狀態可以包含伺服器的當下流量及負載容量(即,伺服器流量最大容許值)。In some embodiments, the
接下來,處理器12基於該些運作狀態,計算對應該些伺服器的複數個負載指標。舉例來說,處理器12可以將伺服器S1至Sn各者的當下流量除以負載容量,得出伺服器S1至Sn各自的負載指標。在這個例子中,負載指標用以表示伺服器流量的使用率(例如:若負載指標為100%,則代表對應的伺服器滿載)。Next, the
在一些實施例中,處理器12還可以對應伺服器S1至Sn各者的權重計算負載指標。舉例來說,若伺服器S2的流量成本為伺服器S1的流量成本的兩倍,則伺服器S2的權重可以設定為伺服器S1的權重的兩倍。如此一來,負載指標亦可以反映伺服器之間營運成本的差異。In some embodiments, the
在一些實施例中,該些權重是由處理器12基於計算各個伺服器的單位流量成本後產生。在一些實施例中,伺服器的單位流量成本越高即對應至越高的權重。In some embodiments, the weights are generated by the
最後,處理器12基於負載指標產生評估結果。Finally, the
在一些實施例中,處理器12可以排序伺服器S1至Sn對應的負載指標,並且選擇負載指標其中最低的負載指標對應的伺服器(例如:伺服器S1)作為評估結果以重導向終端裝置E至負載指標最低的伺服器,藉以將終端裝置E導向當下負載較低、流量成本較低或綜合多個因素進行評估後較適合承接流量的伺服器。In some embodiments, the
本揭露還提供另一種產生評估結果的技術,其中負載分配裝置還可以包含儲存器(未繪示於圖中),儲存器用以儲存對應伺服器S1至Sn的歷史運作狀態,其中該些歷史運作狀態包含伺服器S1至Sn對應複數個時間點的複數個歷史負載。The present disclosure also provides another technology for generating evaluation results, wherein the load distribution device may also include a memory (not shown in the figure), which is used to store the historical operating status of the corresponding servers S1 to Sn, wherein the historical operating status includes multiple historical loads of the servers S1 to Sn corresponding to multiple time points.
在一些實施例中,儲存器可以包含半導體或固態記憶體、磁帶、可移式電腦磁片、隨機存取記憶體(random access memory,RAM)、唯讀記憶體(read-only memory,ROM)、硬磁碟和/或光碟。In some embodiments, the storage may include semiconductor or solid-state memory, magnetic tape, removable computer disk, random access memory (RAM), read-only memory (ROM), hard disk, and/or optical disk.
舉例來說,儲存器儲存的歷史負載可以包含過去伺服器S1至Sn的運作狀態,例如過去的流量、負載容量及對應的時間點。儲存器儲存的歷史負載還可以包含過去伺服器S1至Sn提供服務的連線紀錄,例如連線紀錄可以包含用戶識別(user ID)、服務類型(例如:直播、預存影片)、連線起始時間、連線結束時間、連線類型(例如:4G網路、5G網路或Wi-Fi)、連線伺服器(例如:伺服器S1)、流量頻寬(例如:4.5Mbps)、網際網路協定位址(Internet Protocol Address)、用戶地理位置(例如:北區、中區或南區)和/或網際網路連線服務提供者(Internet Service Provider,ISP)。For example, the historical load stored in the storage may include the past operation status of the servers S1 to Sn, such as past traffic, load capacity, and corresponding time points. The historical load stored in the memory may also include connection records of past services provided by servers S1 to Sn. For example, the connection records may include user identification (user ID), service type (e.g., live broadcast, pre-stored video), connection start time, connection end time, connection type (e.g., 4G network, 5G network, or Wi-Fi), connected server (e.g., server S1), traffic bandwidth (e.g., 4.5Mbps), Internet Protocol Address, user geographic location (e.g., North District, Central District, or South District), and/or Internet Service Provider (ISP).
有關產生評估結果的運作細節,請參考以下實施例。For details on the operation of generating evaluation results, please refer to the following example.
首先,處理器12基於該些歷史運作狀態,建立對應伺服器S1至Sn的複數個負載模型,其中該些負載模型包含對應伺服器S1至Sn的該些時間點及該些歷史負載之間的複數個對應關係。First, the
在一些實施例中,處理器12可以基於歷史運作狀態訓練機器學習模型,並且以訓練後的機器學習模型作為負載模型。例如處理器12可以利用分群模型(例如:k-平均(k-means)模型)分群該些歷史運作狀態,進而取得伺服器流量和時間、用戶地理位置、連線類型和/或其他因素之間的關聯性。In some embodiments, the
最後,處理器12基於該些負載模型,產生該評估結果。具體而言,處理器12基於經過訓練的負載模型所歸納出流量和其他因素之間的對應關係產生評估結果。Finally, the
在一例子中,若負載模型歸納出每個週六的上午九點至下午十二點之間,伺服器S2約為伺服器S1的兩倍,則處理器12可以基於負載模型,在週六的上午九點至下午十二點之間且伺服器S1的流量使用率(即,當下流量除以負載容量所得出的比值)低於50%時,將終端裝置E導向伺服器S1(即,處理器12傳送導向伺服器S1的資源回應至終端裝置E)。如此一來,負載分配裝置1則可以降低伺服器S1及S2之間的負載差異,而不會使得流量過於集中在其中一者,且引入伺服器S1流量使用率的判斷使負載分配裝置1不會反而將流量過度導向伺服器S1。In one example, if the load model concludes that between 9:00 a.m. and 12:00 p.m. every Saturday, the server S2 is about twice as large as the server S1, then the
在另一例子中,若負載模型歸納出用戶地理位置位於北區的終端裝置過去存取服務時,有超過一門檻值(例如:80%)的比例被導向伺服器S2。此時,基於內容傳遞網路既有導引流量的機制(例如:將終端裝置導引至回應較快的伺服器),負載分配裝置1可以判斷伺服器S2相對於其他伺服器,較適合提供北區的用戶服務。因此,處理器12可以基於負載模型,在伺服器S2的流量使用率低於50%時,將用戶地理位置位於北區的終端裝置導向伺服器S2。如此一來,負載分配裝置1可以根據過去的紀錄判斷相對於終端裝置較佳的伺服器,提升連線效率的同時更可以因已事先建立負載模型,減少即時系統計算的負擔。除此之外,在一些實施例中,由於負載模型可以精準地導引流量,減少需要重新將終端裝置E改為導向其他伺服器的機率,因此終端裝置E還可以減少前述定期傳送資源請求的頻率以降低負載分配裝置1的負擔。In another example, if the load model summarizes that when the terminal devices of users whose geographical location is located in the North District accessed the service in the past, a proportion exceeding a threshold value (e.g., 80%) was directed to server S2. At this time, based on the existing mechanism of directing traffic in the content delivery network (e.g., directing the terminal devices to the server with faster response), the
在又一例子中,若負載模型歸納出A用戶經常(例如:發生機率超過90%)在週六的晚間透過Wi-Fi網路向伺服器S1存取串流影片。此時,基於內容傳遞網路既有導引流量的機制(例如:將終端裝置導引至回應較快的伺服器),負載分配裝置1可以判斷伺服器S1在前述條件下相對於其他伺服器,較適合提供A用戶服務。因此,處理器12可以基於負載模型,當A用戶在週六的晚間透過Wi-Fi網路存取串流影片且伺服器S1的流量使用率低於50%時,將A用戶所使用的終端裝置導向伺服器S1。如此一來,與前述例子相同地,負載分配裝置1可以根據過去的紀錄判斷相對於終端裝置較佳的伺服器,提升連線效率的同時更可以因已事先建立負載模型,減少即時系統計算的負擔。除此之外,在一些實施例中,由於負載模型可以精準地導引流量,減少需要重新將終端裝置E改為導向其他伺服器的機率,因此終端裝置E還可以減少前述定期傳送資源請求的頻率以降低負載分配裝置1的負擔。In another example, if the load model concludes that user A often (e.g., with a probability of more than 90%) accesses streaming videos from server S1 via a Wi-Fi network on Saturday nights, based on the existing traffic diversion mechanism of the content delivery network (e.g., diverting the terminal device to a server with a faster response), the
需要注意的是,為方便說明以上述例子作為示例,實際上可以視經由不同的歷史運作狀態訓練後的負載模型產生其他負載分配機制。It should be noted that the above example is used as an example for the sake of convenience. In fact, other load distribution mechanisms can be generated according to the load model trained by different historical operating states.
如此一來,終端裝置E可以定期向負載分配裝置1確認存取資源的伺服器,並且向對應的伺服器請求資源。負載分配裝置1則可以根據伺服器S1至Sn各者過去的運作記錄分配伺服器S1至Sn各者的負載。除此之外,透過建立負載模型,負載分配裝置1可以減少重導向終端裝置E的機率和/或次數,進一步地,亦可以減少終端裝置E傳送資源請求以及負載分配裝置1傳送資源回應的次數以降低負載分配裝置1的負載。In this way, the terminal device E can periodically confirm the server accessing resources from the
在一些實施例中,終端裝置E係基於負載分配裝置1產生的一請求規則定期傳送該資源請求。舉例來說,終端裝置E在向負載分配裝置1存取服務前,負載分配裝置1會傳送請求規則至終端裝置E,例如:終端裝置E中安裝的應用程式包含請求規則。藉此,終端裝置E在存取服務時可以按照請求規則向負載分配裝置1定期傳送資源請求,進而使負載分配裝置1得以在必要時重導向終端裝置E以調整伺服器S1至Sn的負載。In some embodiments, the terminal device E periodically transmits the resource request based on a request rule generated by the
進一步地,在一些實施例中,該請求規則包含基於該終端裝置存取伺服器的一存取時長、一傳輸流量及一存取檔案數量其中至少一判斷該終端裝置是否向該負載分配裝置傳送該資源請求。Furthermore, in some embodiments, the request rule includes determining whether the terminal device sends the resource request to the load distribution device based on at least one of an access duration, a transmission flow, and an access file quantity of the terminal device accessing the server.
具體而言,請求規則可以記錄每隔一段時間(例如:5分鐘)、每傳輸特定大小的流量(例如:200MB)和/或每存取特定數量的檔案(例如:5個檔案),終端裝置E須向負載分配裝置1傳送該資源請求以向負載分配裝置1確認未來存取檔案的對象(伺服器)。Specifically, the request rule may record that every certain time interval (e.g., 5 minutes), every time a certain amount of traffic is transmitted (e.g., 200MB), and/or every time a certain number of files are accessed (e.g., 5 files), the terminal device E must send the resource request to the
在一些實施例中,負載分配裝置1的處理器12還可以基於伺服器S1至Sn的複數個流量成本排序伺服器S1至Sn以產生一序列;以及基於該序列產生該評估結果,其中該評估結果對應至伺服器S1至Sn其中一最低成本伺服器。In some embodiments, the
舉例來說,負載分配裝置1優先將終端裝置E導向流量成本最低的伺服器,若流量成本最低的伺服器負載超過門檻值(例如:80%),才將終端裝置E重導向至其他伺服器(例如:流量成本次低的伺服器)。For example,
綜上所述,終端裝置E可以定期向負載分配裝置1確認存取資源的伺服器,並且向對應的伺服器請求資源(例如:下載影片檔案)。負載分配裝置1則可以根據伺服器S1至Sn各者的當下流量、流量成本等因素動態分配伺服器S1至Sn各者的負載。除此之外,透過負載分配裝置1定期向伺服器S1至Sn接收狀態的運作,當伺服器產生異常而無法運作時,負載分配裝置1亦可以在第一時間確認伺服器的情況並停止將終端裝置E導向異常的伺服器。In summary, the terminal device E can periodically confirm the server for accessing resources from the
請進一步參考第2圖,其為本揭露第二實施方式中負載分配方法20的流程圖。負載分配方法20適用於一電子裝置(例如:負載分配裝置1),其中該電子裝置通訊連接複數個伺服器(例如:伺服器S1至Sn)以及一終端裝置(例如:終端裝置E)。負載分配方法20包含步驟S201至S203。Please further refer to FIG. 2, which is a flow chart of a
步驟S201中,該電子裝置自該終端裝置接收一資源請求。In step S201, the electronic device receives a resource request from the terminal device.
步驟S202中,響應於自該終端裝置接收該資源請求,該電子裝置基於一評估結果判斷是否將該終端裝置重導向至該些伺服器其中之一第二伺服器。In step S202, in response to receiving the resource request from the terminal device, the electronic device determines whether to redirect the terminal device to a second server among the servers based on an evaluation result.
步驟S203中,響應於判斷將該終端裝置重導向至該第二伺服器,該電子裝置傳送一資源回應至該終端裝置以指示該終端裝置自該第二伺服器取得該些串流檔案之一第二子檔案。In step S203, in response to determining to redirect the terminal device to the second server, the electronic device sends a resource response to the terminal device to instruct the terminal device to obtain a second sub-file of the streaming files from the second server.
在一些實施例中,負載分配方法20更包含自該些伺服器接收複數個運作狀態,其中該些運作狀態各者對應該些伺服器其中之一;基於該些運作狀態,計算對應該些伺服器的複數個負載指標;以及基於該些負載指標產生該評估結果。In some embodiments, the
在一些實施例中,其中該些運作狀態包含該些伺服器的複數個流量以及複數個負載容量;計算對應該些伺服器的該些負載指標的運作更包含基於對應該些伺服器的該些流量及該些負載容量,計算對應該些伺服器的該些負載指標;以及產生該評估結果的運作更包含排序該些負載指標以產生一序列,並且基於該序列產生該評估結果。In some embodiments, the operating states include a plurality of flows and a plurality of load capacities of the servers; the operation of calculating the load indicators corresponding to the servers further includes calculating the load indicators corresponding to the servers based on the flows and the load capacities corresponding to the servers; and the operation of generating the evaluation result further includes sorting the load indicators to generate a sequence, and generating the evaluation result based on the sequence.
在一些實施例中,其中計算對應該些伺服器的該些負載指標的運作更包含基於複數個權重,計算對應該些伺服器的該些負載指標。In some embodiments, the operation of calculating the load indicators corresponding to the servers further includes calculating the load indicators corresponding to the servers based on a plurality of weights.
在一些實施例中,其中該負載分配裝置進一步包含一儲存器,該儲存器用以儲存對應複數個伺服器的複數個歷史運作狀態,該些歷史運作狀態包含該些伺服器對應複數個時間點的複數個歷史負載,並且負載分配方法20更包含基於該些歷史運作狀態,建立對應該些伺服器的複數個負載模型,其中該些負載模型包含對應該些伺服器的該些時間點及該些歷史負載之間的複數個對應關係;以及基於該些負載模型,產生該評估結果。In some embodiments, the load distribution device further includes a memory for storing a plurality of historical operating states corresponding to a plurality of servers, wherein the historical operating states include a plurality of historical loads of the servers corresponding to a plurality of time points, and the
在一些實施例中,其中該些歷史運作狀態更包含該些伺服器對應複數個地理位置的該些歷史負載,並且該些負載模型包含對應該些伺服器的該些地理位置及該些歷史負載之間的該些對應關係。In some embodiments, the historical operating states further include the historical loads of the servers corresponding to a plurality of geographical locations, and the load models include the corresponding relationships between the geographical locations corresponding to the servers and the historical loads.
在一些實施例中,其中該些歷史運作狀態更包含該些伺服器對應複數個連線類型的該些歷史負載,並且該些負載模型包含對應該些伺服器的該些連線類型及該些歷史負載之間的該些對應關係。In some embodiments, the historical operating states further include the historical loads of the servers corresponding to a plurality of connection types, and the load models include the corresponding relationships between the connection types corresponding to the servers and the historical loads.
在一些實施例中,其中該終端裝置係基於該負載分配裝置產生的一請求規則定期傳送該資源請求。In some embodiments, the terminal device periodically sends the resource request based on a request rule generated by the load distribution device.
在一些實施例中,其中該請求規則包含基於該終端裝置存取該第一伺服器的一存取時長、一傳輸流量及一存取檔案數量其中至少一判斷該終端裝置是否向該負載分配裝置傳送該資源請求。In some embodiments, the request rule includes determining whether the terminal device sends the resource request to the load distribution device based on at least one of an access duration, a transmission flow, and an access file quantity of the terminal device accessing the first server.
在一些實施例中,負載分配方法20更包含基於該些伺服器的複數個流量成本排序該些伺服器以產生一序列;以及基於該序列產生該評估結果,其中該評估結果對應至該些伺服器其中一最低成本伺服器。In some embodiments, the
在一些實施例中,其中該資源回應包含連結至該存取伺服器的一網路位址,並且該網路位址用以連結至該存取伺服器以取得該資源請求對應的至少一檔案。In some embodiments, the resource response includes a network address connected to the access server, and the network address is used to connect to the access server to obtain at least one file corresponding to the resource request.
如此一來,該終端裝置可以定期向該電子裝置確認存取資源的伺服器,並且向對應的伺服器請求資源(例如:下載影片檔案)。負載分配方法20則可以根據該些伺服器各者的當下流量、流量成本等因素動態分配該些伺服器各者的負載。除此之外,透過該電子裝置定期向該些伺服器接收狀態的運作,當伺服器產生異常而無法運作時,負載分配方法20亦可以在第一時間確認伺服器的情況並停止將該終端裝置導向異常的伺服器。In this way, the terminal device can periodically confirm the server accessing resources from the electronic device, and request resources from the corresponding server (for example, downloading a video file). The
雖以數個實施例詳述如上作為示例,然本揭露所提出之負載分配裝置及方法亦得以其他系統、硬體、軟體、儲存媒體或其組合實現。因此,本揭露之保護範圍不應受限於本揭露實施例所描述之特定實現方式,當視後附之申請專利範圍所界定者為準。Although several embodiments are described in detail above as examples, the load distribution device and method proposed in the present disclosure can also be implemented by other systems, hardware, software, storage media or their combination. Therefore, the protection scope of the present disclosure should not be limited to the specific implementation method described in the embodiments of the present disclosure, but should be defined by the scope of the attached patent application.
對於本揭露所屬技術領域中具有通常知識者顯而易見的是,在不脫離本揭露的範圍或精神的情況下,可以對本揭露的結構進行各種修改和變化。鑑於前述,本揭露之保護範圍亦涵蓋在後附之申請專利範圍內進行之修改和變化。It is obvious to those with ordinary knowledge in the art to which the present disclosure belongs that various modifications and changes can be made to the structure of the present disclosure without departing from the scope or spirit of the present disclosure. In view of the foregoing, the protection scope of the present disclosure also covers modifications and changes made within the scope of the attached patent application.
1:負載分配裝置1: Load distribution device
12:處理器12: Processor
14:收發介面14: Transceiver interface
S1~Sn:伺服器S1~Sn: Server
E:終端裝置E: Terminal device
20:負載分配方法20: Load distribution method
S201~S203:步驟S201~S203: Steps
為讓本揭露之上述和其他目的、特徵、優點與實施例能更明顯易懂,所附圖式之說明如下: 第1圖為本揭露第一實施方式中負載分配裝置的示意圖;以及 第2圖為本揭露第二實施方式中負載分配方法的流程圖。 In order to make the above and other purposes, features, advantages and embodiments of the present disclosure more clearly understandable, the attached drawings are described as follows: Figure 1 is a schematic diagram of a load distribution device in a first embodiment of the present disclosure; and Figure 2 is a flow chart of a load distribution method in a second embodiment of the present disclosure.
國內寄存資訊(請依寄存機構、日期、號碼順序註記) 無 國外寄存資訊(請依寄存國家、機構、日期、號碼順序註記) 無 Domestic storage information (please note in the order of storage institution, date, and number) None Foreign storage information (please note in the order of storage country, institution, date, and number) None
1:負載分配裝置 1: Load distribution device
12:處理器 12: Processor
14:收發介面 14: Transceiver interface
S1~Sn:伺服器 S1~Sn: Server
E:終端裝置 E: Terminal device
Claims (7)
Publications (1)
Publication Number | Publication Date |
---|---|
TWI856829B true TWI856829B (en) | 2024-09-21 |
Family
ID=
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140297869A1 (en) | 2012-10-11 | 2014-10-02 | Uplynk, LLC | Adaptive streaming cost management |
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140297869A1 (en) | 2012-10-11 | 2014-10-02 | Uplynk, LLC | Adaptive streaming cost management |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10904597B2 (en) | Dynamic binding for use in content distribution | |
CN110268694B (en) | System and method for adaptive switching between multiple content delivery networks during adaptive bitrate streaming | |
US9866624B2 (en) | Managing access to digital content sources | |
US9521178B1 (en) | Dynamic bandwidth thresholds | |
US20180205976A1 (en) | Method and apparatus of obtaining video fragment | |
US20060174160A1 (en) | Method for transmitting and downloading streaming data | |
CN101355522B (en) | Control method and system for media server | |
CN110661879B (en) | Node scheduling method, device and system, scheduling server and terminal equipment | |
US9197687B2 (en) | Prioritized blocking of on-demand requests | |
US20130138649A1 (en) | Systems and methods for storing digital content | |
CN110830565A (en) | Resource downloading method, device, system, electronic equipment and storage medium | |
CN108156257A (en) | A kind of information-pushing method and device | |
WO2022268032A1 (en) | Video stream scheduling system and related product | |
CN114500381B (en) | Network bandwidth limiting method, system, electronic equipment and readable storage medium | |
TWI856829B (en) | Load distribution device and method | |
JP2008503968A (en) | System and method for distributing content via shared network | |
US11398986B2 (en) | Controlling data rate based on domain and radio usage history | |
WO2020134753A1 (en) | Request message processing method, apparatus and system, and server and storage medium | |
CN105191251B (en) | Server selection based on website | |
CN113810461B (en) | Bandwidth control method, device and equipment and readable storage medium | |
CN117459536A (en) | Resource distribution method, cloud server, device, electronic equipment and storage medium | |
US12132946B2 (en) | Systems and methods for streaming media content during unavailability of content server | |
JP2001312435A (en) | Method, device for access distribution and recording medium | |
CN115412740B (en) | Live broadcast back source scheduling method and device, computing equipment and computer storage medium | |
JP5702232B2 (en) | Server cooperation mutual assistance system and server and server cooperation mutual assistance program |