TWI732291B - System and method for providing preloaded content according to role rights - Google Patents
System and method for providing preloaded content according to role rights Download PDFInfo
- Publication number
- TWI732291B TWI732291B TW108132845A TW108132845A TWI732291B TW I732291 B TWI732291 B TW I732291B TW 108132845 A TW108132845 A TW 108132845A TW 108132845 A TW108132845 A TW 108132845A TW I732291 B TWI732291 B TW I732291B
- Authority
- TW
- Taiwan
- Prior art keywords
- data
- content
- cache
- system interface
- user
- Prior art date
Links
Images
Abstract
Description
本發明是有關於一種依據權限提供內容的系統及方法,且特別是有關於一種依據角色權限提供預載內容的系統及方法。The present invention relates to a system and method for providing content based on permissions, and more particularly to a system and method for providing preloaded content based on role permissions.
在基於網頁(Web-based)的系統介面上,若採用單頁應用程式(Single Page Application,SPA)來進行設計,其使用者介面(UI)的執行指令檔通常具有較大的尺寸。並且,若伺服器採用微服務進行設計,其提供給UI之應用程式介面(API)也會非常多,容易導致UI的操作使用變慢進而降低使用者體驗。In a web-based system interface, if a single page application (Single Page Application, SPA) is used for design, the execution command file of the user interface (UI) usually has a larger size. Moreover, if the server is designed with microservices, there will be a lot of application programming interfaces (APIs) that it provides to the UI, which can easily lead to slower UI operations and lower user experience.
本發明提供一種依據角色權限提供預載內容的系統及方法,其可用以解決上述技術問題。The present invention provides a system and method for providing preloaded content according to role permissions, which can be used to solve the above technical problems.
本發明提供一種依據角色權限提供預載內容的系統,包括全域服務端、系統介面端及中繼服務端。中繼服務端連接於全域服務端及系統介面端之間。反應於一使用者以一特定角色登入系統介面端,系統介面端向中繼服務端發出一快取資料請求,其中特定角色具有一特定權限,且特定權限經設定為在存取多個預設資料型態內容時具有一特定優先順序;中繼服務端依據快取資料請求的資料型態、特定權限及特定優先順序決定一預載資料型態內容,其中預載資料型態內容對應於前述預設資料型態內容的其中之一;中繼服務端、系統介面端及全域服務端分別將預載資料型態內容快取至各自的快取資料庫;反應於系統介面端從使用者收到一預載內容請求,系統介面端判斷預載內容請求是否對應於預載資料型態內容,以及判定使用者的特定權限是否合法;反應於判定預載內容請求對應於預載資料型態內容且特定權限合法,系統介面端取得預載資料型態內容,並將其提供予使用者。The invention provides a system for providing preloaded content according to role authority, which includes a global server, a system interface and a relay server. The relay server is connected between the global server and the system interface. In response to a user logging into the system interface with a specific role, the system interface sends a cache data request to the relay server. The specific role has a specific authority, and the specific authority is set to access multiple presets The data type content has a specific priority order; the relay server determines a preloaded data type content according to the data type, specific permissions and specific priority order of the cache data request, wherein the preloaded data type content corresponds to the aforementioned One of the default data type contents; the relay server, the system interface side and the global server respectively cache the preloaded data type contents to their respective cache databases; the response is received from the user on the system interface side To a preloaded content request, the system interface determines whether the preloaded content request corresponds to the preloaded data type content, and determines whether the user's specific authority is legal; it responds to the determination that the preloaded content request corresponds to the preloaded data type content And the specific authority is legal, the system interface terminal obtains the pre-loaded data type content and provides it to the user.
本發明提供一種依據角色權限提供預載內容的方法,適於包括一全域服務端、一系統介面端及一中繼服務端的系統。所述方法包括:反應於一使用者以一特定角色登入系統介面端,由系統介面端向中繼服務端發出一快取資料請求,其中特定角色具有一特定權限,且特定權限經設定為在存取多個預設資料型態內容時具有一特定優先順序;由中繼服務端依據快取資料請求的資料型態、特定權限及特定優先順序決定一預載資料型態內容,其中預載資料型態內容對應於前述預設資料型態內容的其中之一;由中繼服務端、系統介面端及全域服務端分別將預載資料型態內容快取至各自的快取資料庫;反應於系統介面端從使用者收到一預載內容請求,由系統介面端判斷預載內容請求是否對應於預載資料型態內容,以及判定使用者的特定權限是否合法;反應於判定預載內容請求對應於預載資料型態內容且特定權限合法,由系統介面端取得預載資料型態內容,並將其提供予使用者。The present invention provides a method for providing preloaded content according to role authority, which is suitable for a system including a global server, a system interface and a relay server. The method includes: responding to a user logging in to the system interface with a specific role, and sending a cache data request from the system interface to the relay server, wherein the specific role has a specific authority, and the specific authority is set to There is a specific priority order when accessing multiple preset data type contents; the relay server determines a preloaded data type content according to the data type, specific authority and specific priority order of the cache data request, among which preload The data type content corresponds to one of the aforementioned preset data type content; the relay server, the system interface side, and the global server respectively cache the preloaded data type content to their respective cache databases; response A preload content request is received from the user on the system interface, and the system interface determines whether the preload content request corresponds to the preloaded data type content, and determines whether the user's specific permissions are legal; it is reflected in the determination of the preloaded content The request corresponds to the preloaded data type content and the specific authority is legal, and the system interface terminal obtains the preloaded data type content and provides it to the user.
基於上述,本發明的系統與方法可基於快取資料機制和權限管理機制來進行內容預載(或稱快取)、快速下單、離線模式和降低各端點處理資料之請求量。Based on the above, the system and method of the present invention can perform content preloading (or called caching), fast order placement, offline mode, and reduce the amount of requests for processing data by each endpoint based on the cache data mechanism and the authority management mechanism.
為讓本發明的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。In order to make the above-mentioned features and advantages of the present invention more comprehensible, the following specific embodiments are described in detail in conjunction with the accompanying drawings.
概略而言,本發明的系統與方法可基於快取資料機制和權限管理機制來進行內容預載(或稱快取)、快速下單、離線模式和降低各端點處理資料之請求量。快取資料皆有權限綁定,依各角色對應的權限進行有限度地內容預載策略,並學習預載結果,調整各權限之資料型態優先順序以及在資源限額機制配合下,能提高內容預載的正確性,提升使用者體驗。以下將作進一步說明。Generally speaking, the system and method of the present invention can perform content preloading (or called caching), fast order placement, offline mode, and reduce the amount of requests for processing data by each endpoint based on a cache data mechanism and a rights management mechanism. Cached data are bound to permissions, carry out limited content preloading strategies based on the permissions corresponding to each role, and learn the preload results, adjust the priority order of the data types of each permission, and improve the content with the cooperation of the resource quota mechanism The correctness of the preload improves the user experience. This will be further explained below.
請參照圖1,其是依據本發明之一實施例提出的依據角色權限提供預載內容的系統。如圖1所示,系統100包括使用者1、一或多個系統介面端2、一或多個中繼服務端3和全域服務端4。Please refer to FIG. 1, which is a system for providing preloaded content according to role permissions according to an embodiment of the present invention. As shown in FIG. 1, the
在本實施例中,各系統介面端2可包含頁面顯示模組21、權限管理模組22、快取資料庫23、離線處理模組24和資料同步模組25。各中繼服務端3可包含權限管理模組31、快取資料庫32、內容預載判斷模組33、快速下單模組34、資料同步模組35、使用者行為收集模組36和資源限額管理模組37。全域服務端4可包含權限管理模組41和快取資料庫42。In this embodiment, each
在一實施例中,使用者1例如可透過一網頁瀏覽器而以一特定角色進入系統介面端2進行操作,其中所述特定角色可具有對應的特定權限。在此情況下,權限管理模組22可因應於使用者執行的登入行為而讓使用者登入本發明的系統100。In one embodiment, the
在一實施例中,頁面顯示模組21可至快取資料庫23進行資料獲取,若所欲獲取的資料不存在則會發送快取資料請求至中繼服務端3或全域服務端4。相應地,權限管理模組31或41會基於使用者1的特定權限判斷上述請求是否合法。In one embodiment, the
若請求合法,則快取資料庫32或42可查詢是否儲存有對應於上述請求的快取資料。若此快取資料不存在,則中繼服務端3或全域服務端4可於對應的連線資料庫進行查詢。在本發明的實施例中,快取資料庫與連線資料庫差別在於快取資料的生命週期與服務端運行時間相同,重新啟動後則消失,連線資料庫則否,但可不限於此。If the request is legal, the
在一實施例中,在全域服務端4取得所需的快取資料後,可將此快取資料透過資料同步模組35進行各中繼服務端3的資料同步。並且,在中繼服務端3取得上述快取資料後,可一併將快取資料透過資料同步模組25與其他的中繼服務端2的資料同步。在一實施例中,所採用的資料同步策略例如是依據上述特定角色的連線數來決定是否同步此資料。具體來說,對於系統100而言,可能同時有多個使用者以同樣的角色連線至系統100,而上述資料同步策略例如可在使用同樣角色的使用者數量高於某門限值時才進行資料同步,但可不限於此。In one embodiment, after the global server 4 obtains the required cache data, the cache data can be synchronized with each relay server 3 through the
在一實施例中,當使用者1於系統介面端2進行操作時,系統介面端2可發送使用者1的操作日誌至使用者行為收集模組36。相應地,使用者行為收集模組36會進行數據學習分析出上述特定角色對應的特定權限應包含之預設資料型態內容。在一實施例中,系統100的管理者可透過系統介面端2登入查看,並透過介面修改其特定權限涵蓋之預設資料型態內容與其之間的特定優先順序。舉例而言,上述特定角色的特定權限所對應的預設資料型態內容例如包括雲伺服器、硬碟、網路、快照、實體機等,而其之間的特定優先順序由高至低可依序為雲伺服器、硬碟、網路、快照、實體機,但本發明可不限於此。In one embodiment, when the
在一實施例中,內容預載判斷模組33會根據使用者之操作,基於權限之資料型態優先順序以及此特定角色之各資料型態的請求數量決定預載內容,並透過資源限額管理模組37判斷是否進行此資料型態之預載指令,並定期收集此特定角色下之各資料型態預載次數自動修正此角色權限下之資料型態優先順序。In one embodiment, the content preload judgment module 33 determines the preload content based on the user's operation, the priority of the data type based on the permission and the number of requests for each data type of the specific role, and manages the resource quota The
在一實施例中,當系統介面端2之離線處理模組24偵測目前為網路離線狀態時,會依據快取資料庫23之內容和特定權限內容,進行有限度的離線唯讀操作。In one embodiment, when the
為使本發明的概念更為清楚,以下另輔以圖2至圖9的各流程圖作進一步說明。請參照圖2,其是依據本發明之一實施例繪示的由使用者於系統介面端進行系統操作,並依據資料獲取策略於快取資料庫或中繼服務端取得資料的流程圖。In order to make the concept of the present invention clearer, the following is supplemented with the flowcharts of FIGS. 2 to 9 for further description. Please refer to FIG. 2, which is a flowchart of a user performing system operations on the system interface side and obtaining data from a cache database or a relay server according to a data acquisition strategy according to an embodiment of the present invention.
首先,在步驟501,系統介面端2可因應於使用者1的操作而對中繼服務端3和全域服務端4發送快取資料請求,並判斷使用者1是否處於登入狀態。若否,則進行步驟502以要求使用者1登入系統100,反之則執行步驟504以直接提出快取資料請求。First, in
在步驟503中,權限管理模組31或41可取得使用者1的特定權限。在步驟505中,系統介面端2可依使用者1的特定角色檢視快取資料模組23是否存在所需的指定快取資料,若否則進行步驟503,若有則進行步驟506檢視指定快取資料是否已逾時,若已逾時,則系統介面端2可進行步驟507以刪除上述指定快取資料,並重新發送獲取資料請求,並接續進行步驟503。In
若在步驟506中判定指定快取資料未逾時,則直接進行步驟515將指定快取資料傳至系統介面端2。If it is determined in
在步驟508中,權限管理模組31或41可檢視使用者1的特定權限是否合法,若否則進行步驟509以拒絕回傳指定快取資料,並忽略快取資料請求。In
另一方面,若使用者1的特定權限合法,則進行步驟510以判斷指定快取資料是否儲存快取資料庫32或42中。若是,則進行步驟511將指定快取資料取出,並執行步驟512;若否,則進行步驟513,以在上述連線資料庫中查詢是否存在對應於上述指定快取資料的遠地資料。若是,則執行步驟514以從連線資料庫取出遠地資料作為指定快取資料,並存入快取資料庫32或42,並進入步驟512。在一實施例中,若連線資料庫無上述遠地資料則結束快取資料請求。On the other hand, if the specific authority of the
在步驟512中,系統介面端2的資料同步模組25可將此指定快取資料與其他各系統介面端2的快取資料庫23同步,之後可執行步驟515。在一實施例中,資料同步模組25可依據先前提及的資料同步策略進行同步,但本發明可不限於此。In
請參照圖3,其是依據本發明之一實施例繪示的由中繼服務端向全域服務端要求快取資料的流程圖。首先,在步驟601中,中繼服務端3可向全域服務端4發送拿取資料請求。在步驟602中,權限管理模組41可判斷使用者1的特定權限是否合法。若是,則全域服務端3可執行步驟603以判斷快取資料庫42中是否儲存有對應於拿取資料請求的指定快取資料,而若使用者1的特定權限不合法,則可忽略上述拿取資料請求。Please refer to FIG. 3, which is a flowchart of requesting cache data from the relay server to the global server according to an embodiment of the present invention. First, in
在一實施例中,若快取資料庫42中儲存有對應於拿取資料請求的指定快取資料,則全域服務端4可從快取資料庫42中取出,並將指定快取資料回傳至中繼服務端3,以由中繼服務端3將指定快取資料轉傳至系統介面端2,並接續執行步驟607。In one embodiment, if the designated cache data corresponding to the retrieval request is stored in the
另一方面,若快取資料庫42中未儲存有對應於快取資料請求的指定快取資料,則全域服務端4可執行步驟604以查詢連線資料庫中是否存在對應於指定快取資料的遠地資料。反應於連線資料庫中存在上述遠地資料,全域服務端4可執行步驟605以將此遠地資料作為指定快取資料儲存至全域服務端4的快取資料庫42,並將指定快取資料回傳至中繼服務端3,以由中繼服務端3將指定快取資料轉傳至系統介面端2,並接續執行步驟607。On the other hand, if the designated cache data corresponding to the cache data request is not stored in the
在步驟607中,中繼服務端3的資料同步模組35可將上述指定快取資料同步於其他各中繼服務端3的快取資料庫32,而此同步操作同樣可基於上述資料同步策略進行,但可不限於此。In
請參照圖4,其是依據本發明之一實施例繪示的在使用者處於離線狀態時所進行的操作流程圖。首先,在步驟701中,系統介面端2可因應於使用者1的操作而對中繼服務端3和全域服務端4發送快取資料請求。在步驟702中,系統介面端2的離線處理模組24可進行網路狀態偵測,以判斷使用者1是否在離線狀態下發出上述快取資料請求。若是,則系統介面端2的權限管理模組22可執行步驟703以判斷使用者1是否處於登入狀態。Please refer to FIG. 4, which is a flowchart of an operation performed when the user is offline according to an embodiment of the present invention. First, in
若使用者1處於登入狀態,則系統介面端2的離線處理模組24可判斷快取資料庫23中是否存在對應於快取資料請求的指定快取資料。若否,則系統介面端2可忽略上述快取資料請求,反之則可執行步驟705以判斷指定快取資料是否逾時。If the
若指定快取資料未逾時,則系統介面端2的頁面顯示模組21可將指定快取資料提供予使用者,反之則可忽略上述快取資料請求。If the designated cache data does not expire, the
在一實施例中,若離線處理模組24在步驟702中判定使用者1並非處於離線狀態,則可接續執行下圖5的機制以取得對應於快取資料請求的指定快取資料,而其相關細節將在之後說明。In one embodiment, if the
在步驟707中,系統介面端2可判斷是否成功取得指定快取資料,若是則執行步驟706,反之則忽略上述快取資料請求。In
簡言之,圖4的機制可依據快取資料庫23及使用者1的特定權限內容進行有程度的離線唯讀操作(有一定程度代表使用者只能讀取授權內容的基本資料瀏覽,無法進行修改與刪除),但本發明可不限於此。In short, the mechanism of Figure 4 can perform a degree of offline read-only operation based on the
請參照圖5,其是依據本發明之一實施例繪示的快速新增訂單的方法流程圖。在步驟801中,系統介面端2可從使用者1接收一新增訂單操作。在步驟802中,系統介面端2可判斷關聯於新增訂單操作的下單參數是否已儲存於系統介面端2的快取資料庫23且未逾時。若是,則系統介面端2可傳送關聯於上述新增訂單操作的快取識別碼(例如對象標識符(object identifier,OID))至中繼服務端3以執行新增訂單操作。相應地,在步驟804中,中繼服務端3可查詢中繼服務端3的快取資料庫32是否儲存有對應於上述快取識別碼的特定預載內容。若是,則中繼服務端3的快速下單模組34可將特定預載內容作為圖4實施例中提及的指定快取資料而回傳至系統介面端2,以完成新增訂單操作。Please refer to FIG. 5, which is a flowchart of a method for quickly adding an order according to an embodiment of the present invention. In
在另一實施例中,若在步驟802中判斷下單參數未儲存於系統介面端2的快取資料庫23,則系統介面端2可執行步驟805以將下單參數傳送至中繼服務端3,並將下單參數同步至系統介面端2及中繼服務端3各自的快取資料庫23、32,以執行新增訂單操作。之後,在步驟806中,系統介面端2可判斷新增訂單操作是否成功。若是,則判定快取資料請求已完成,反之則可執行步驟807。In another embodiment, if it is determined in
在一實施例中,反應於中繼服務端3的快取資料庫32未儲存有對應於快取識別碼的特定預載內容,系統介面端2執行步驟807以向使用者1發送新增失敗訊息,以提示使用者1重新執行新增訂單操作。In one embodiment, in response to the fact that the
請參照圖6,其是依據本發明之一實施例繪示的依據使用者的使用行為修改特定權限的流程圖。在步驟901中,使用者行為收集模組36會進行收集已登入系統之使用者1於系統介面端2對於預設資料型態內容的使用行為。之後,中繼服務端3可在步驟902中會學習行為數據並產出各特定權限建議涵蓋之資料型態,管理者登入系統後可基於此建議修改特定權限涵蓋之資料型態與優先順序,步驟903管理者修改完權限設定後會自動同步權限內容至權限管理模組22、31、41。Please refer to FIG. 6, which is a flowchart of modifying a specific authority based on a user's usage behavior according to an embodiment of the present invention. In
請參照圖7,其是依據本發明之一實施例繪示的依據角色權限提供預載內容的方法流程圖。在步驟1001中,反應於使用者1以特定角色登入系統介面端2,系統介面端2可向中繼服務端3發出快取資料請求,其中特定角色具有特定權限,且特定權限經設定為在存取多個預設資料型態內容時具有特定優先順序。Please refer to FIG. 7, which is a flowchart of a method for providing preloaded content based on role permissions according to an embodiment of the present invention. In
在步驟1002中,中繼服務端3的內容預載判斷模組33可依據快取資料請求的資料型態、特定權限及特定優先順序決定預載資料型態內容,其中預載資料型態內容對應於前述預設資料型態內容的其中之一。在一實施例中,中繼服務端3、系統介面端2及全域服務端4可分別將預載資料型態內容快取至各自的快取資料庫23、32、42。在一實施例中,在將預載資料型態內容進行快取之前,在步驟1003中,資源限額模組37可依據使用者1之設定來決定是否執行上述快取,若是則接續執行步驟1004,反之則忽略上述快取資料請求。In
在步驟1004中,系統介面端2可從使用者1收到預載內容請求,而系統介面端2可相應地在步驟105中判斷預載內容請求是否對應於預載資料型態內容,以及判定使用者1的特定權限是否合法。若預載內容請求未對應於預載資料型態內容,則可執行圖5的機制,並接著於步驟1007中判斷是否成功取得指定快取資料,若是則執行步驟1006,反之則忽略快取資料請求。圖5的相關細節於此不另贅述。In
另一方面,反應於判定預載內容請求對應於預載資料型態內容且特定權限合法,則系統介面端2可執行步驟1006以取得預載資料型態內容,並將其提供予使用者1。On the other hand, in response to determining that the preloaded content request corresponds to the preloaded data type content and the specific authority is legal, the
請參照圖8,其是依據本發明之一實施例繪示的統計各角色快取資料請求的數量,並自動回饋修正各角色之預設資料形態內容之特定優先順序的流程圖。在步驟1101中,內容預載判斷模組33可統計各角色對於各預設資料型態內容所發出的快取資料請求數量。接著,在步驟1102中,內容預載判斷模組33可基於各角色對於各預設資料型態內容所發出的快取資料請求數量調整各角色對應的預設資料型態內容的特定優先順序。Please refer to FIG. 8, which is a flowchart of counting the number of requests for cache data of each character according to an embodiment of the present invention, and automatically responding and correcting the specific priority order of the default data form content of each character. In
請參照圖9,其是依據本發明之一實施例繪示的快取資料之刪除機制。在步驟1201中,使用者1(已經過權限認證登入系統)操作系統介面端2。在步驟1202中,使用者1發送快取資料請求至中繼服務端2或全域服務端3會依據快取資料型態的讀取權重、還可讀取次數進行是否刪除快取資料,另當使用者1進行訂單服務新增,資源限額管理模組37會依據使用者1角設定決定是否發送刪除快取資料指令,步驟1203若門檻已達刪除條件,步驟1204快取資料庫32或42會刪除此角色下資料型態快取,並透過資料同步模組25或35進行快取資料同步刪除。若步驟1203未達刪除門檻則結束。Please refer to FIG. 9, which is a mechanism for deleting cache data according to an embodiment of the present invention. In
請參照圖10,其是依據本發明之一實施例繪示的各權限管理模組所記錄的資訊示意圖。在本實施例中,中繼服務端3與全域服務端4可採用docker微服務技術及Java程式實現,系統介面端2可於網頁瀏覽器中採用JavaScript進行撰寫。權限管理模組22、31及41記錄有各角色對應的權限、可執行動作、所對應的預設資料型態內容及這些預設資料型態內容的特定優先順序,如圖10所示。Please refer to FIG. 10, which is a schematic diagram of information recorded by each authority management module according to an embodiment of the present invention. In this embodiment, the relay server 3 and the global server 4 can be implemented using docker microservice technology and Java programs, and the
在圖10中,各權限管理模組22、31及41之間的差異在於,系統介面端2的權限管理模組22所包含的權限內容僅留存於曾登入於系統介面端2之角色及其對應的權限。在一實施例中,在一開始無人登入時,權限管理模組22所記錄的資訊為空,而當使用者1以角色1登入時,權限管理模組22可從中繼服務端3或全域服務端4取得角色1的權限並留存,且權限管理模組22無角色連線數及資料型態請求數表格。In FIG. 10, the difference between the
資料同步模組25利用可利用服務工作者(Service Workers)技術來進行網頁瀏覽器上之不同標籤頁之間的訊息交換,而離線處理模組24也是利用服務工作者技術來達成內代理(Inner Proxy)的離線技術實作。The
快取資料庫23、32及42可利用會議儲存(Session Storage)和本地儲存(Local Storage)實作。頁面顯示模組21則可基於網頁顯示技術實作。資源同步模組35可基於訊息佇列(Message Queue)技術實作。中繼服務端3可透過WebSocket技術通知系統介面端2之資料同步模組25進行訊息交換。The
快取資料庫34及42則利用Redis方式進行實作。使用者行為收集模組36則利用開放網頁分析(Open Web Analytics)進行實作,並於頁面顯示模組21之各頁連結插入收集點,進行行為收集。快速下單模組34可基於訂單管理架構進行開發,內容預載判斷模組35可基於權限角色管理內容以及使用者行為分析資料來進行內容預載的指令派送。
另外,為使圖2至圖9的概念更易於理解,以下另提供一具體應用情境,並輔以圖11至圖15進行說明。In addition, in order to make the concepts of FIGS. 2 to 9 easier to understand, a specific application scenario is provided below, supplemented with FIGS. 11 to 15 for description.
首先,使用者1可於系統介面端2之頁面顯示模組21進行操作,其中頁面顯示模組21所提供的介面可呈現有連結至不同預設資料型態內容的顯示頁面,如圖11所示。First, the
在使用者1的操作過程中,若其選擇進入圖11所示的私有子網路頁面,並向中繼服務端2要求私有子網路資料型態內容,則權限管理模組22可先判斷使用者1是否為登入狀態,並至快取資料庫23依此使用者對應的特定角色判斷是否存在此預設資料型態內容的指定快取資料的列表,如圖12所示。During the operation of
若取得圖12所示的列表,則系統介面端2可回應至使用者1所觀看的頁面,反之則至中繼服務端2提出快取資料請求。相應地,中繼服務端2在收到快取資料請求後,可至快取資料庫32進行查詢是否存在對應的指定快取資料。若無,則中繼服務端3可至連線資料庫查詢是否存在對應於快取資料請求的遠地資料(快取資料庫與連線資料庫的差異是快取資料庫重啟即遺失資料,連線資料庫則不會),若有則將遠地資料回傳至系統介面端2。If the list shown in FIG. 12 is obtained, the
在一實施例中,中繼服務端2可將取得之遠地資料作為指定快取資料而透過WebSocket技術傳送至系統介面端2。之後,資料同步模組25的服務工作者可將來自中繼服務端3的指定快取資料傳播至各個網頁瀏覽器標籤頁裡,並依角色的連線數(定義一設定值)來決定是否更新至資料快取模組23,進而完成整個使用者1的操作流程。In one embodiment, the
此外,如圖12所示,資料快取模組23還可給予(隨機)識別碼、還可以讀取次數(依定義之預設值,每讀取1次即扣1),以及讀取權重(根據中繼服務端3及全域服務端4之角色資料型態請求數來決定)。In addition, as shown in FIG. 12, the
請參照圖13,其是依據本發明之一實施例繪示的中繼服務端3與全域服務端4之資料交換示意圖。如圖13所示,當中繼服務端3發送快取資料請求時,權限管理模組41可檢查使用者1的特定權限是否合法,並於快取資料庫42進行查詢。若快取資料庫42中存在所需的指定快取資料,則全域服務端4可將其回傳至中繼服務端3,反之則至連線資料庫查詢是否存在對應於快取資料請求的遠地資料。若有,則全域服務端4可將此遠地資料作為指定快取資料回傳至中繼服務端3,並將其以例如圖12所示之格式儲存於快取資料庫42中。亦即,全域服務端4可對此遠地資料指派隨機識別碼、還可以讀取之次數(依定義之預設值,每讀取1次即扣1),並依使用者請求次數和角色連線數量決定快取物件讀取權重等,但可不限於此。Please refer to FIG. 13, which is a schematic diagram of data exchange between the relay server 3 and the global server 4 according to an embodiment of the present invention. As shown in FIG. 13, when the relay server 3 sends a cache data request, the
之後,資料同步模組35可再依資料同步策略(依據權限角色連線數來決定是否同步此資料)同步到快取資料庫32。After that, the
在一實施例中,當系統介面端2處於網路離線狀態時,依圖4所示流程,權限管理模組22可判斷是否使用者1處於登入狀態。若使用者1處於登入狀態,則離線處理模組24之服務工作者可依據使用者1之快取資料請求至快取資料庫23取得對應的指定快取資料,並回應至頁面顯示模組21,以供使用者1參考。In one embodiment, when the
當使用者1(重新)進行新增訂單操作時,依圖5所示流程,系統介面端2可檢查相關的下單參數檔案是否已存在快取資料庫23。若存在,則系統介面端2可利用快取識別碼對中繼服務端3進行下單。相應地,中繼服務端3的快速下單模組34可利用此快取識別碼於快取資料庫32取得對應的指定快取資料以進行下單,其中快取識別碼於快取資料庫23或32重啟後皆會遺失,且其非一定值。When the user 1 (re) performs the operation of adding an order, according to the process shown in FIG. 5, the
當使用者1於頁面顯示模組21所提供頁面上的連結進行換頁時,使用者行為收集模組36可收集使用者1選擇之預設資料型態內容對應的頁面、從哪裡進入、加總點擊數量、使用者角色資訊等,並利用統計方式,依使用者1的特定角色下之預設資料型態內容的加總點擊次數,以及從本資料型態頁面點出之次數,依總次數由大到小排出預設資料型態內容的序列,並讓管理者在登入系統100後可以進行參考,以決定是否更改特定權限對應的預設資料型態內容的特定優先順序及/或增減預設資料型態內容,並同步至權限管理模組22、31、41,如圖6所示。When the
在一實施例中,當使用者於圖10之頁面結構進行操作時,假設使用者1如圖13所示情境而於私有子網路頁面進入雲伺服器頁面,頁面上例如包括硬碟、快照、實體機、網路頁面延伸連結、金鑰等。在此情況下,內容預載判斷模組33可拿取使用者1的特定角色(角色1)所對應的預設資料型態內容和相關的特定優先順序。例如,若角色1所對應的預設資料型態內容未包含金鑰,則系統介面端2可不考慮金鑰的相關預載及快取操作,並依頁面上預設資料型態內容的連結取出優先序前三名(此為一設定值,可依需求調整),且這些預設資料型態內容的請求數需超過一定值才列入預載考量(當定值如設定空值則為關閉預載功能)。在本實施例中,可觸發預載/快取功能的預設資料型態內容例如是取出下載硬碟及快照資料的指令,但可不限於此。In one embodiment, when the user operates on the page structure of FIG. 10, suppose that
之後,若此使用者1已無快照額度可以使用,資源限額管理模組37最後只會送出預載硬碟資料的指令至系統介面端2,並完成預載,如圖7流程所示,其預載內容主要以資料型態為主,但也會連同其網頁執行檔、圖片、樣式等相關靜態檔連同預載。After that, if the
在一實施例中,內容預載判斷模組33會定期(如一周或一個月)統計每個角色的資料型態預載發生次數,當預載次數差異超過一定值,則會自動調整角色權限內的資料型態優先順序。以圖14為例,當實體機的預載次數小於一設定數值,則進行降一級的動作。當已登入之使用者1進行系統操作時,依據資料請求動作驅動快取資料刪除策略,如快取資料庫32和42內之快取物件的可讀取次數歸0,依讀取權重排序取出前100筆(為一設定值)物件進行刪除,其中若資源限額管理模組37偵測到此使用者已無此類資源型態可以申租,則直接進行刪除,並透過資源同步模組25和35進行刪除指令同步至各快取資料庫23和32。其中各端之角色連線數統計方式為由系統介面端2往中繼服務端3和全域服務端4進行累加,如圖15所示。In one embodiment, the content preload judging module 33 will regularly (such as a week or a month) count the number of data type preload occurrences of each role, and when the difference in the preload times exceeds a certain value, it will automatically adjust the role permissions Priority order of data types within. Taking Fig. 14 as an example, when the preload times of the physical machine are less than a set value, a downgrade action is performed. When the logged-in
綜上所述,本發明可建立快取資料以及權限管理機制提供一種基於權限決定預載內容之系統與方法,其一,快取資料方法為於全域服務端、中繼服務端和系統介面端,建立快取資料庫並有新增與刪除資料策略維持各快取資料庫,讓使用者能順暢地使用系統介面;其二,預載內容方法為透過權限管理內容以及使用者行為操作來決定預載內容,並統計預載的發生次數,自動回饋修正權限內容之資料型態優先順序,能正確地反應使用者操作情形,預載正確內容至快取資料庫,提升系統操作順暢程度。In summary, the present invention can establish a cache data and authority management mechanism to provide a system and method for determining preload content based on authority. First, the cache data method is on the global server, the relay server, and the system interface. , Create a cache database and add and delete data strategies to maintain each cache database, so that users can use the system interface smoothly; second, the method of preloading content is determined by rights management content and user behavior operations Preload the content and count the number of occurrences of the preload, automatically feedback the priority order of the data type of the modified permission content, can correctly reflect the user's operating situation, preload the correct content to the cache database, and improve the smoothness of the system operation.
於系統介面端、中繼服務端及全域服務端建立快取資料庫,各快取資料皆依權限角色劃分利用,各端皆能依據各自的權限管理模組進行讀取快取資料庫之行為,快速完成資料處理。概略而言,全域服務端對有多個系統介面端與中繼服務端,於後兩者各建有資料同步模組,其快取資料的新增與刪除能批次同步進行,能同步分享各端點的操作回饋及資料操作一致化,也能減少頻繁詢問服務端的次數。系統介面端支援離線模式操作,依據使用者權限角色讀取快取資料庫裡的權限內資訊,能進行唯讀操作,有程度地降低對服務端的依賴性。Establish a cache database on the system interface, relay server, and global server. Each cache data is divided and used according to the authority role, and each terminal can read the cache database according to its own authority management module. , Quickly complete data processing. Generally speaking, the global server has multiple system interfaces and relay servers, each of which has a data synchronization module. The addition and deletion of cache data can be synchronized in batches, and can be shared simultaneously The operation feedback and data operation of each endpoint is consistent, which can also reduce the number of frequent queries to the server. The system interface supports offline mode operation, reads the information within the permissions in the cache database according to the user's permission role, and can perform read-only operation, which reduces the dependence on the server to a certain extent.
並且,本發明還提出建立快速新增訂單機制,其可透過系統介面端之快取資料庫以及中繼服務端之快取資料庫,利用資料快取識別碼進行快速下單行為,能減少重送時,傳輸參數的檔案大小。In addition, the present invention also proposes to establish a rapid order adding mechanism, which can use the cache database of the system interface and the cache database of the relay server to quickly place an order by using the data cache identification code, which can reduce repetition. When sending, the file size of the transmission parameter.
此外,本發明可記錄各權限角色之使用者行為模式,並依據數據及修改策略,回饋至各權限的管理內容,並在使用者操作流程上根據權限內容、快取資料庫內容及資源限額設定來判斷是否進行預載指令,並統計預載指令行為,再自動回饋修正權限內容資料型態優先順序,提高預載正確性,提升系統操作順暢程度。In addition, the present invention can record the user behavior mode of each authority role, and feedback the management content of each authority according to the data and modification strategy, and set the authority content, cache database content and resource limit in the user operation process. To determine whether to carry out preloading instructions, and to count the preloading instruction behaviors, and then automatically feedback the priority order of modification of the permission content data type, improve the accuracy of preloading, and improve the smoothness of system operation.
雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。Although the present invention has been disclosed in the above embodiments, it is not intended to limit the present invention. Anyone with ordinary knowledge in the relevant technical field can make some changes and modifications without departing from the spirit and scope of the present invention. The protection scope of the present invention shall be subject to those defined by the attached patent application scope.
100:系統
1:使用者
2:系統介面端
21:頁面顯示模組
22:權限管理模組
23:快取資料庫
24:離線處理模組
25:資料同步模組
3:中繼服務端
31:權限管理模組
32:快取資料庫
33:內容預載判斷模組
34:快速下單模組
35:資料同步模組
36:使用者行為收集模組
37:資源限額管理模組
4:全域服務端
41:權限管理模組
42:快取資料庫
501~515、601~607、701~707、801~807、901~903、1001~1007、1101~1102、1201~1204:步驟100: system
1: User
2: System interface
21: page display module
22: Rights Management Module
23: Cache database
24: Offline processing module
25: Data synchronization module
3: Relay server
31: Rights Management Module
32: Cache database
33: Content preload judgment module
34: Quick order module
35: Data synchronization module
36: User Behavior Collection Module
37: Resource Quota Management Module
4: Global server
41: Rights Management Module
42:
圖1是依據本發明之一實施例提出的依據角色權限提供預載內容的系統。 圖2是依據本發明之一實施例繪示的由使用者於系統介面端進行系統操作,並依據資料獲取策略於快取資料庫或中繼服務端取得資料的流程圖。 圖3是依據本發明之一實施例繪示的由中繼服務端向全域服務端要求快取資料的流程圖。 圖4是依據本發明之一實施例繪示的在使用者處於離線狀態時所進行的操作流程圖。 圖5是依據本發明之一實施例繪示的快速新增訂單的方法流程圖。 圖6是依據本發明之一實施例繪示的依據使用者的使用行為修改特定權限的流程圖。 圖7是依據本發明之一實施例繪示的依據角色權限提供預載內容的方法流程圖。 圖8是依據本發明之一實施例繪示的統計各角色快取資料請求的數量,並自動回饋修正各角色之預設資料形態內容之特定優先順序的流程圖。 圖9是依據本發明之一實施例繪示的快取資料之刪除機制。 圖10是依據本發明之一實施例繪示的各權限管理模組所記錄的資訊示意圖。 圖11是依據本發明之一實施例繪示的呈現予使用者的頁面示意圖。 圖12是依據本發明之一實施例繪示的快取資料庫中所記錄的資訊。 圖13是依據本發明之一實施例繪示的中繼服務端與全域服務端之資料交換示意圖。 圖14是依據本發明之一實施例繪示的依據預載次數調整優先順序的示意圖。 圖15是依據本發明之一實施例繪示的各角色於各端上的連線數統計示意圖。Fig. 1 is a system for providing preloaded content based on role permissions according to an embodiment of the present invention. FIG. 2 is a flowchart of a user performing system operations on the system interface side and obtaining data from a cache database or a relay server according to a data acquisition strategy according to an embodiment of the present invention. Fig. 3 is a flow chart of requesting cache data from the relay server to the global server according to an embodiment of the present invention. FIG. 4 is a flowchart of operations performed when the user is offline according to an embodiment of the present invention. Fig. 5 is a flowchart of a method for quickly adding an order according to an embodiment of the present invention. FIG. 6 is a flowchart of modifying a specific authority based on a user's usage behavior according to an embodiment of the present invention. FIG. 7 is a flowchart of a method for providing preloaded content based on role permissions according to an embodiment of the present invention. FIG. 8 is a flowchart of counting the number of cache data requests for each character, and automatically responding and correcting the specific priority order of the preset data form content of each character according to an embodiment of the present invention. FIG. 9 is a diagram illustrating a mechanism for deleting cache data according to an embodiment of the present invention. FIG. 10 is a schematic diagram of information recorded by each authority management module according to an embodiment of the present invention. FIG. 11 is a schematic diagram of a page presented to a user according to an embodiment of the present invention. FIG. 12 shows the information recorded in the cache database according to an embodiment of the present invention. FIG. 13 is a schematic diagram of data exchange between a relay server and a global server according to an embodiment of the present invention. FIG. 14 is a schematic diagram of adjusting the priority order according to the number of preloads according to an embodiment of the present invention. FIG. 15 is a schematic diagram illustrating the statistics of the number of connections of each role on each end according to an embodiment of the present invention.
1001~1007:步驟1001~1007: steps
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW108132845A TWI732291B (en) | 2019-09-11 | 2019-09-11 | System and method for providing preloaded content according to role rights |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW108132845A TWI732291B (en) | 2019-09-11 | 2019-09-11 | System and method for providing preloaded content according to role rights |
Publications (2)
Publication Number | Publication Date |
---|---|
TW202112179A TW202112179A (en) | 2021-03-16 |
TWI732291B true TWI732291B (en) | 2021-07-01 |
Family
ID=76035522
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW108132845A TWI732291B (en) | 2019-09-11 | 2019-09-11 | System and method for providing preloaded content according to role rights |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI732291B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8578261B1 (en) * | 2007-06-22 | 2013-11-05 | Adobe Systems Incorporated | Active preview of hyperlink content in browser supported file-format |
US20140075033A1 (en) * | 2012-09-07 | 2014-03-13 | Oracle International Corporation | Service association model |
CN103986742A (en) * | 2013-02-08 | 2014-08-13 | 纬创资通股份有限公司 | File synchronization method and correlation electronic devices |
US20140310819A1 (en) * | 2011-12-23 | 2014-10-16 | Mubi Uk Limited | Method and apparatus for accessing media |
US20160173634A1 (en) * | 2014-12-15 | 2016-06-16 | Level 3 Communications, Llc | Caching in a content delivery framework |
US10198524B1 (en) * | 2013-07-19 | 2019-02-05 | BloomReach Inc. | Dynamic categories |
-
2019
- 2019-09-11 TW TW108132845A patent/TWI732291B/en active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8578261B1 (en) * | 2007-06-22 | 2013-11-05 | Adobe Systems Incorporated | Active preview of hyperlink content in browser supported file-format |
US20140310819A1 (en) * | 2011-12-23 | 2014-10-16 | Mubi Uk Limited | Method and apparatus for accessing media |
US20140075033A1 (en) * | 2012-09-07 | 2014-03-13 | Oracle International Corporation | Service association model |
CN103986742A (en) * | 2013-02-08 | 2014-08-13 | 纬创资通股份有限公司 | File synchronization method and correlation electronic devices |
US10198524B1 (en) * | 2013-07-19 | 2019-02-05 | BloomReach Inc. | Dynamic categories |
US20160173634A1 (en) * | 2014-12-15 | 2016-06-16 | Level 3 Communications, Llc | Caching in a content delivery framework |
Also Published As
Publication number | Publication date |
---|---|
TW202112179A (en) | 2021-03-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20210064476A1 (en) | Backup of partitioned database tables | |
US11265333B2 (en) | Method of achieving synchronization management of account information of WEB interface in multi-system DAS | |
JP4698756B2 (en) | Offline execution of web-based applications | |
US20180322017A1 (en) | Restoring partitioned database tables from backup | |
CA2782674C (en) | System and method for providing virtual web access | |
US8868707B2 (en) | Adaptive write-back and write-through caching for off-line data | |
US7827199B2 (en) | Centralized configuration data management for distributed clients | |
US9064029B2 (en) | Dynamically identifying and evaluating component hierarchy for rendering content components on a webpage | |
US9311326B2 (en) | Virtual file system for automated data replication and review | |
US10257110B2 (en) | Using a template to update a stack of resources | |
WO2016061898A1 (en) | Method and system for accessing channel of live broadcast room | |
GB2559835A (en) | Systems and methods for providing access to a data file stored at a data storage system | |
US20090240698A1 (en) | Computing environment platform | |
US11232071B2 (en) | Regressable differential data structures | |
EP3866030A1 (en) | Webpage loading method, intermediate server, and webpage loading system | |
WO2013023095A2 (en) | Smart thin client server | |
US11055367B2 (en) | Web application architecture for information management | |
US10963324B2 (en) | Predictive microservice systems and methods | |
US20230328138A1 (en) | Cloud Platform and Bucket Management Method for Object Storage Service Provided by Cloud Platform | |
US20110302285A1 (en) | Update server to update rendered content | |
TWI732291B (en) | System and method for providing preloaded content according to role rights | |
CN113301050B (en) | Multi-user real-time login and logout management method, system, terminal and medium for webpage | |
JP2011022856A (en) | Method, apparatus and program for coordinating web application | |
WO2023230797A1 (en) | Cross-system test method and apparatus | |
CN117560416A (en) | Message processing method, device, apparatus, storage medium and program product |