TWI856384B - Webpage access flow limiting method and device and computer readable storage medium - Google Patents
Webpage access flow limiting method and device and computer readable storage medium Download PDFInfo
- Publication number
- TWI856384B TWI856384B TW111137565A TW111137565A TWI856384B TW I856384 B TWI856384 B TW I856384B TW 111137565 A TW111137565 A TW 111137565A TW 111137565 A TW111137565 A TW 111137565A TW I856384 B TWI856384 B TW I856384B
- Authority
- TW
- Taiwan
- Prior art keywords
- access
- user
- current
- matrix
- sequence
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/20—Traffic policing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
- G06F16/9566—URL specific, e.g. using aliases, detecting broken or misspelled links
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
Description
本發明屬於限流領域,具體涉及一種網頁訪問限流方法、裝置及電腦可讀存儲介質。The present invention belongs to the field of current limiting, and specifically relates to a web page access current limiting method, device and computer readable storage medium.
本部分旨在為申請專利範圍中陳述的本發明的實施方式提供背景或上下文。此處的描述不因為包括在本部分中就承認是現有技術。This section is intended to provide a background or context for the implementation of the invention described in the claims. The description herein is not admitted to be prior art by inclusion in this section.
在開發高併發系統時,一般通過限流可以很好地控制系統的每秒查詢率,從而達到保護系統的目的。上述限流的目的是通過對併發訪問進行限速,一旦達到一定的速率就可以拒絕服務、排隊等待、降級等。When developing a high-concurrency system, current limiting can generally be used to control the query rate per second of the system, thereby achieving the purpose of protecting the system. The purpose of the above current limiting is to limit the speed of concurrent access. Once a certain rate is reached, the service can be denied, queued, or downgraded.
目前常用的限流演算法有兩種:計數器演算法和權杖桶演算法。前者通過滑動視窗結合計數器實現WEB訪問限流,後者使用大小固定的權杖桶並以恒定的速率源源不斷地產生權杖。如果權杖桶中存在權杖,則允許發送請求;而如果權杖桶中不存在權杖,則不允許發送請求。There are two commonly used rate limiting algorithms: counter algorithm and token bucket algorithm. The former uses a sliding window combined with a counter to implement WEB access rate limiting, while the latter uses a token bucket of fixed size and generates tokens at a constant rate. If there is a token in the token bucket, the request is allowed to be sent; if there is no token in the token bucket, the request is not allowed to be sent.
現有的限流演算法,不管是計數器演算法的閾值,還是權杖桶演算法的桶大小和速率,都需要事先根據經驗設置閾值,缺乏普適性,無法通過資料動態學習調整。Existing current limiting algorithms, whether it is the threshold of the counter algorithm or the bucket size and rate of the scepter bucket algorithm, require setting the threshold in advance based on experience, lack universality, and cannot be adjusted through dynamic learning of data.
針對上述現有技術中存在的問題,提出了一種網頁訪問限流方法、裝置及電腦可讀存儲介質,利用這種方法、裝置及電腦可讀存儲介質,能夠解決上述問題。In view of the problems existing in the above-mentioned prior art, a web page access current limiting method, device and computer-readable storage medium are proposed. The above-mentioned problems can be solved by using this method, device and computer-readable storage medium.
本發明提供了以下方案。The present invention provides the following solutions.
第一方面,提供一種網頁訪問限流方法,包括:當使用者訪問宿主應用的網頁服務時,獲取宿主應用發來的當前訪問資訊;根據當前訪問資訊生成使用者訪問序列,用戶訪問序列將使用者的當前訪問資訊及預設次數的在先訪問資訊按時序排列;將使用者訪問序列輸入訪問矩陣池,以動態更新對應於各個使用者的用戶訪問畫像矩陣,使用者訪問畫像矩陣根據使用者歷史訪問資料生成且包括多個維度的訪問歸納資料;根據使用者標識從訪問矩陣池獲取對應的用戶訪問畫像矩陣,基於用戶訪問序列和用戶畫像矩陣判斷當前訪問是否符合用戶訪問習慣。In a first aspect, a web page access limiting method is provided, comprising: when a user accesses a web page service of a host application, obtaining current access information sent by the host application; generating a user access sequence according to the current access information, wherein the user access sequence arranges the user's current access information and a preset number of previous access information in chronological order; inputting the user access sequence into an access matrix A user access portrait matrix corresponding to each user is dynamically updated from the access matrix pool. The user access portrait matrix is generated based on the user's historical access data and includes access induction data of multiple dimensions. The corresponding user access portrait matrix is obtained from the access matrix pool according to the user's identification. Based on the user's access sequence and the user portrait matrix, it is determined whether the current access is consistent with the user's access habits.
在一種實施方式中,當前訪問資訊包括:使用者標識、當前服務URL和時間戳記。In one implementation, the current access information includes: user identification, current service URL and timestamp.
在一種實施方式中,基於使用者訪問序列和用戶畫像矩陣判斷當前訪問是否符合用戶訪問習慣,包括:根據使用者訪問畫像矩陣確定各個維度的限流範圍;根據使用者訪問序列獲取對應於用戶訪問畫像矩陣的各個維度的值;根據判斷各個維度的值是否在限流範圍內,以確定當前訪問是否為正常訪問。In one implementation, whether the current access conforms to the user's access habits is judged based on the user access sequence and the user portrait matrix, including: determining the current limiting range of each dimension according to the user access portrait matrix; obtaining the value of each dimension corresponding to the user access portrait matrix according to the user access sequence; and determining whether the current access is a normal access based on whether the value of each dimension is within the current limiting range.
在一種實施方式中,使用者訪問畫像矩陣包括使用者標識且包含如下任意一種或多種維度:使用者單位時間內對特定URL請求總次數、使用者單位時間內的URL請求總次數、使用者單位時間內的URL請求總數與URL種類數的比值、全量使用者單位時間內的特定URL請求總次數、全量使用者單位時間內的URL請求總次數、全量使用者單位時間內的URL請求總數與URL種類數的比值。In one implementation, the user visit profile matrix includes a user identifier and contains any one or more of the following dimensions: the total number of requests for a specific URL per user per unit time, the total number of URL requests per user per unit time, the ratio of the total number of URL requests per user per unit time to the number of URL types, the total number of requests for a specific URL per unit time for all users, the total number of URL requests per unit time for all users, and the ratio of the total number of URL requests per unit time for all users to the number of URL types.
在一種實施方式中,還包括:在宿主應用內的網頁服務入口處設置埋點,使得任意一個或多個使用者訪問網頁服務時觸發埋點以生成調用請求,調用請求包括當前訪問資訊;將當前訪問的判斷結果應答至宿主應用的埋點處,且當埋點收到非正常訪問的應答時,向宿主應用回饋限流提醒。In one implementation, it also includes: setting a embedding point at the entrance of the web service in the host application, so that when any one or more users access the web service, the embedding point is triggered to generate a call request, and the call request includes current access information; the judgment result of the current access is responded to the embedding point of the host application, and when the embedding point receives a response to an abnormal access, a current limiting reminder is fed back to the host application.
在一種實施方式中,利用以下方法生成訪問矩陣池:通過對使用者歷史訪問資料分別進行時間維度和空間維度的資料歸納,得到訪問矩陣池;其中,時間維度是指對單一使用者的訪問序列進行資料歸納,空間維度是指對同一時間不同使用者併發的訪問資訊進行資料歸納。In one implementation, the access matrix pool is generated by using the following method: the access matrix pool is obtained by summarizing the user's historical access data in terms of time dimension and space dimension respectively; wherein the time dimension refers to the data summarization of the access sequence of a single user, and the space dimension refers to the data summarization of the access information concurrently sent by different users at the same time.
在一種實施方式中,根據維度權重對用戶畫像矩陣的多個維度進行優先順序排列;按照優先順序順序依次判斷各個維度的值是否在對應的限流範圍內;其中,一旦判斷出當前訪問是非正常訪問,則無需對後續優先順序維度進行判斷。In one implementation, multiple dimensions of the user portrait matrix are prioritized according to dimension weights; and a determination is made in order of priority whether the value of each dimension is within a corresponding current limiting range; wherein, once it is determined that the current access is an abnormal access, there is no need to determine subsequent priority dimensions.
第二方面,提供一種網頁訪問限流裝置,包括:訪問收納模組,用於當使用者訪問宿主應用的網頁服務時,獲取宿主應用發來的當前訪問資訊;訪問歸集模組,用於根據當前訪問資訊生成使用者訪問序列,用戶訪問序列將使用者的當前訪問資訊及預設次數的在先訪問資訊按時序排列;訪問矩陣池,將用戶訪問序列輸入訪問矩陣池,以動態更新對應於各個使用者的用戶訪問畫像矩陣,使用者訪問畫像矩陣根據使用者歷史訪問資料生成且包括多個維度的訪問歸納資料;限流計算模組,用於根據使用者標識從訪問矩陣池獲取對應的用戶訪問畫像矩陣,基於用戶訪問序列和用戶畫像矩陣判斷當前訪問是否符合用戶訪問習慣。In a second aspect, a web page access current limiting device is provided, comprising: an access collection module, used to obtain current access information sent by the host application when a user accesses the web page service of the host application; an access collection module, used to generate a user access sequence according to the current access information, the user access sequence arranges the user's current access information and the previous access information of a preset number of times in chronological order; an access matrix pool, which arranges the user access sequence A column input access matrix pool is used to dynamically update the user access portrait matrix corresponding to each user. The user access portrait matrix is generated according to the user's historical access data and includes access induction data of multiple dimensions; a current limiting calculation module is used to obtain the corresponding user access portrait matrix from the access matrix pool according to the user identification, and judge whether the current access is consistent with the user's access habit based on the user access sequence and the user portrait matrix.
在一種實施方式中,當前訪問資訊包括:使用者標識、當前服務URL和時間戳記。In one implementation, the current access information includes: user identification, current service URL and timestamp.
在一種實施方式中,限流計算模組,還用於:根據使用者訪問畫像矩陣確定各個維度的限流範圍;根據使用者訪問序列獲取對應於用戶訪問畫像矩陣的各個維度的值;根據判斷各個維度的值是否在限流範圍內,以確定當前訪問是否為正常訪問。In one implementation, the current limiting calculation module is also used to: determine the current limiting range of each dimension based on the user access portrait matrix; obtain the value of each dimension corresponding to the user access portrait matrix based on the user access sequence; and determine whether the current access is a normal access by judging whether the value of each dimension is within the current limiting range.
在一種實施方式中,使用者訪問畫像矩陣包括使用者標識且包含如下任意一種或多種維度:使用者單位時間內對特定URL請求總次數、使用者單位時間內的URL請求總次數、使用者單位時間內的URL請求總數與URL種類數的比值、全量使用者單位時間內的特定URL請求總次數、全量使用者單位時間內的URL請求總次數、全量使用者單位時間內的URL請求總數與URL種類數的比值。In one implementation, the user visit profile matrix includes a user identifier and contains any one or more of the following dimensions: the total number of requests for a specific URL per user per unit time, the total number of URL requests per user per unit time, the ratio of the total number of URL requests per user per unit time to the number of URL types, the total number of requests for a specific URL per unit time for all users, the total number of URL requests per unit time for all users, and the ratio of the total number of URL requests per unit time for all users to the number of URL types.
在一種實施方式中,還包括:應用埋點模組,用於在宿主應用內的網頁服務入口處設置埋點,使得任意一個或多個使用者訪問網頁服務時觸發埋點以生成調用請求,調用請求包括當前訪問資訊;結果輸出模組,用於將當前訪問的判斷結果應答至宿主應用的埋點處,且當應用埋點模組收到非正常訪問的應答時,向宿主應用回饋限流提醒。In one implementation, it also includes: an application embedding module, which is used to set a embedding point at the entrance of the web service in the host application, so that when any one or more users access the web service, the embedding point is triggered to generate a call request, and the call request includes the current access information; a result output module, which is used to respond the judgment result of the current access to the embedding point of the host application, and when the application embedding module receives a response to an abnormal access, it feeds back a current limiting reminder to the host application.
在一種實施方式中,訪問矩陣池還用於:通過對使用者歷史訪問資料分別進行時間維度和空間維度的資料歸納,得到訪問矩陣池;其中,時間維度是指對單一使用者的訪問序列進行資料歸納,空間維度是指對同一時間不同使用者併發的訪問資訊進行資料歸納。In one implementation, the access matrix pool is also used to obtain the access matrix pool by summarizing the user's historical access data in terms of time dimension and space dimension respectively; wherein the time dimension refers to the data summarization of the access sequence of a single user, and the space dimension refers to the data summarization of the access information concurrently sent by different users at the same time.
在一種實施方式中,限流計算模組還用於:根據維度權重對用戶畫像矩陣的多個維度進行優先順序排列;按照優先順序順序依次判斷各個維度的值是否在對應的限流範圍內;其中,一旦判斷出當前訪問是非正常訪問,則無需對後續優先順序維度進行判斷。In one implementation, the current limiting calculation module is also used to: prioritize multiple dimensions of the user portrait matrix according to dimension weights; determine in order of priority whether the value of each dimension is within the corresponding current limiting range; wherein, once it is determined that the current access is an abnormal access, there is no need to determine the subsequent priority dimensions.
第三方面,提供一種網頁訪問限流裝置,包括:至少一個處理器;以及,與至少一個處理器通信連接的記憶體;其中,記憶體存儲有可被至少一個處理器執行的指令,指令被至少一個處理器執行,以使至少一個處理器能夠執行:如第一方面的方法。In a third aspect, a web page access current limiting device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute: as in the method of the first aspect.
第四方面,提供一種電腦可讀存儲介質,電腦可讀存儲介質存儲有程式,當程式被多核處理器執行時,使得多核處理器執行如第一方面的方法。In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a program, and when the program is executed by a multi-core processor, the multi-core processor executes the method of the first aspect.
本申請實施例採用的上述至少一個技術方案能夠達到以下有益效果:本實施例中,無需事先設置閾值,能夠實現基於根據使用者歷史訪問資料生成且例如當前使用者資料而動態更新的訪問矩陣池判斷是否需要對使用者當前對網頁服務的訪問進行限流。At least one of the above technical solutions adopted in the embodiment of the present application can achieve the following beneficial effects: In this embodiment, there is no need to set a threshold in advance, and it is possible to determine whether it is necessary to limit the current access of the user to the web service based on the access matrix pool generated according to the user's historical access data and dynamically updated, such as the current user data.
應當理解,上述說明僅是本發明技術方案的概述,以便能夠更清楚地瞭解本發明的技術手段,從而可依照說明書的內容予以實施。為了讓本發明的上述和其它目的、特徵和優點能夠更明顯易懂,以下特舉例說明本發明的具體實施方式。It should be understood that the above description is only an overview of the technical solution of the present invention, so that the technical means of the present invention can be more clearly understood and implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the following examples are given to illustrate the specific implementation of the present invention.
下面將參照附圖更詳細地描述本公開的示例性實施例。雖然附圖中顯示了本公開的示例性實施例,然而應當理解,可以以各種形式實現本公開而不應被這裡闡述的實施例所限制。相反,提供這些實施例是為了能夠更透徹地理解本公開,並且能夠將本公開的範圍完整的傳達給本領域的技術人員。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary 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 described herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
在本申請實施例的描述中,應理解,諸如“包括”或“具有”等術語旨在指示本說明書中所公開的特徵、數位、步驟、行為、部件、部分或其組合的存在,並且不旨在排除一個或多個其他特徵、數位、步驟、行為、部件、部分或其組合存在的可能性。In the description of the embodiments of the present application, it should be understood that terms such as "including" or "having" are intended to indicate the existence of features, numbers, steps, behaviors, components, parts or combinations thereof disclosed in this specification, and are not intended to exclude the possibility of the existence of one or more other features, numbers, steps, behaviors, components, parts or combinations thereof.
除非另有說明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”僅僅是一種描述關聯物件的關聯關係,表示可以存在三種關係,例如,A和/或B,可以表示:單獨存在A,同時存在A和B,單獨存在B這三種情況。Unless otherwise specified, “/” means or. For example, A/B can mean A or B. The “and/or” in this article is only a description of the association relationship between related objects, indicating that three relationships can exist. For example, A and/or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
術語“第一”、“第二”等僅用於描述目的,而不能理解為指示或暗示相對重要性或者隱含指明所指示的技術特徵的數量。由此,限定有“第一”、“第二”等的特徵可以明示或者隱含地包括一個或者更多個該特徵。在本申請實施例的描述中,除非另有說明,“多個”的含義是兩個或兩個以上。The terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, a feature defined as "first", "second", etc. may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, unless otherwise specified, the meaning of "plurality" is two or more.
本申請中的所有代碼都是示例性的,本領域技術人員根據所使用的程式設計語言,具體的需求和個人習慣等因素會在不脫離本申請的思想的條件下想到各種變型。All codes in this application are exemplary, and those skilled in the art may think of various modifications based on the programming language used, specific needs, personal habits, etc. without departing from the concept of this application.
另外還需要說明的是,在不衝突的情況下,本發明中的實施例及實施例中的特徵可以相互組合。下面將參考附圖並結合實施例來詳細說明本發明。It should also be noted that, in the absence of conflict, the embodiments and features of the embodiments of the present invention can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
本申請提出一種網頁訪問限流方法,具體包括:當使用者訪問宿主應用的網頁服務時,獲取宿主應用發來的當前訪問資訊;根據當前訪問資訊生成使用者訪問序列,用戶訪問序列將使用者的當前訪問資訊及預設次數的在先訪問資訊按時序排列;將使用者訪問序列輸入訪問矩陣池,以動態更新對應於各個使用者的用戶訪問畫像矩陣,使用者訪問畫像矩陣根據使用者歷史訪問資料生成且包括多個維度的訪問歸納資料;根據使用者標識從訪問矩陣池獲取對應的用戶訪問畫像矩陣,基於用戶訪問序列和用戶畫像矩陣判斷當前訪問是否符合用戶訪問習慣。由此可以通過分析使用者訪問資料可實現針對不同使用者的動態調整限流閾值,來實現網頁訪問限流。The present application proposes a web page access current limiting method, which specifically includes: when a user accesses a web page service of a host application, obtaining current access information sent by the host application; generating a user access sequence based on the current access information, wherein the user access sequence arranges the user's current access information and the previous access information of a preset number of times in chronological order; inputting the user access sequence into an access matrix The user access portrait matrix corresponding to each user is dynamically updated by the user access portrait matrix generated according to the user's historical access data and includes access summary data of multiple dimensions; the corresponding user access portrait matrix is obtained from the access matrix pool according to the user's identification, and whether the current access is consistent with the user's access habits is judged based on the user's access sequence and the user portrait matrix. Therefore, by analyzing the user's access data, the current limiting threshold can be dynamically adjusted for different users to achieve web page access current limiting.
圖1為根據本申請一實施例的一種網頁訪問限流方法的流程示意圖,用於對非正常訪問進行限流,在該流程中,從設備角度而言,執行主體可以是一個或者多個電子設備;從程式角度而言,執行主體相應地可以是搭載於這些電子設備上的程式。Figure 1 is a flow chart of a web page access current limiting method according to an embodiment of the present application, which is used to limit abnormal access. In this process, from the device perspective, the execution subject can be one or more electronic devices; from the program perspective, the execution subject can correspondingly be the program installed on these electronic devices.
如圖1所示,本實施例提供的方法可以包括以下步驟:As shown in FIG1 , the method provided in this embodiment may include the following steps:
S101、當用戶訪問宿主應用的網頁服務時,獲取宿主應用發來的當前訪問資訊;S101, when the user accesses the webpage service of the host application, the current access information sent by the host application is obtained;
在一種實施方式中,當前訪問資訊包括:使用者標識、當前服務URL和時間戳記。例如,可以是(用戶A,url1,時間戳記10)。In one implementation, the current access information includes: user identification, current service URL and timestamp. For example, it may be (user A, url1, timestamp 10).
在一種實施方式中,為了更無感地啟動上述限流方法,還包括:在宿主應用內的網頁服務入口處設置埋點,使得任意一個或多個使用者訪問網頁服務時觸發埋點以生成調用請求,調用請求包括當前訪問資訊。In one implementation, in order to start the above-mentioned current limiting method more seamlessly, it also includes: setting a embedding point at the entrance of the web service in the host application, so that when any one or more users access the web service, the embedding point is triggered to generate a call request, and the call request includes current access information.
例如,可以在需要執行限流研判和處置的宿主應用內設置埋點,具體可以位於宿主應用的網頁服務入口,當宿主應用的網頁服務被調用後觸發埋點,第一時間以同步方式對網頁限流方法發起調用並接受其回饋結果。For example, a tracking point can be set in the host application where current limiting analysis and disposal need to be performed. Specifically, it can be located at the web service entrance of the host application. When the web service of the host application is called, the tracking point is triggered, and the web current limiting method is called in a synchronous manner and its feedback result is received at the first time.
其中,可以通過對宿主應用提供HTTP服務,以接收宿主應用通過觸發應用埋點而發送的調用請求,該調用請求中可以包括使用者訪問網頁服務的當前訪問資訊。Among them, HTTP service can be provided to the host application to receive the call request sent by the host application by triggering the application embedding point, and the call request can include the current access information of the user to the web service.
S102、根據當前訪問資訊生成使用者訪問序列,用戶訪問序列將使用者的當前訪問資訊及預設次數的在先訪問資訊按時序排列;S102, generating a user access sequence according to the current access information, wherein the user access sequence arranges the user's current access information and the previous access information of a preset number of times in chronological order;
其中,當前訪問資訊可以包括(使用者A,url1,時間戳記10),其轉換生成的用戶訪問序列可以包括[(用戶A,url1,時間戳記1),(用戶A,url2,時間戳記2),…,(用戶A,url1,時間戳記10)],其中,可以設定使用者訪問序列的資訊數,比如10條,然後以當前訪問資訊為最後一個序列元素,提取使用者A之前9次的在先訪問資訊,並組合成按時序排列的用戶訪問序列。Among them, the current access information may include (user A, url1, timestamp 10), and the user access sequence generated by its conversion may include [(user A, url1, timestamp 1), (user A, url2, timestamp 2), ..., (user A, url1, timestamp 10)], wherein the number of information in the user access sequence can be set, such as 10, and then the current access information is used as the last sequence element, and the previous 9 previous access information of user A is extracted and combined into a user access sequence arranged in chronological order.
可以理解,如當前訪問之前,用戶發生的在先訪問不滿預設數量或者並未發生在先訪問,也可以生產少於預設元素的使用者訪問序列。It can be understood that, if the user's previous visits before the current visit do not meet the preset number or no previous visit occurred, a user access sequence with fewer than the preset elements can also be generated.
例如,用戶A在一秒內連續點擊獲取驗證碼按鈕3次,其中獲取驗證碼對應url為/getAuthCode,則三次請求分別對應的url序列資料為:For example, user A clicks the Get Verification Code button three times in one second. The URL for getting the verification code is /getAuthCode. The URL sequence data for the three requests is:
1、[(/getAuthCode,時間戳記1)],1. [(/getAuthCode, timestamp 1)],
2、[(/getAuthCode,時間戳記1),(/getAuthCode,時間戳記2)]2. [(/getAuthCode, timestamp 1), (/getAuthCode, timestamp 2)]
3、[(/getAuthCode,時間戳記1),(/getAuthCode,時間戳記2),(/getAuthCode,時間戳記3)]3. [(/getAuthCode, timestamp 1), (/getAuthCode, timestamp 2), (/getAuthCode, timestamp 3)]
S103、將用戶訪問序列輸入訪問矩陣池,以動態更新對應於各個使用者的用戶訪問畫像矩陣;S103, inputting the user access sequence into the access matrix pool to dynamically update the user access portrait matrix corresponding to each user;
其中,使用者訪問畫像矩陣根據使用者歷史訪問資料生成且包括多個維度的訪問歸納資料。例如,訪問矩陣池基於即時不斷輸入的使用者訪問序列進行動態更新,在當前訪問對應的使用者訪問資料登錄之前,其已經通過在先輸入的使用者歷史訪問資料加工計算出使用者訪問矩陣以及用戶訪問習慣,由此可以滾動形成用戶限流畫像,以刻畫用戶在各個維度的訪問歸納資料。Among them, the user access profile matrix is generated based on the user's historical access data and includes access summary data of multiple dimensions. For example, the access matrix pool is dynamically updated based on the real-time and continuously input user access sequence. Before the user access data corresponding to the current access is logged in, it has already processed and calculated the user access matrix and user access habits through the previously input user historical access data, thereby rolling to form a user flow-limiting profile to describe the user's access summary data in various dimensions.
在一種實施方式中,為了生成訪問矩陣池,還可以包括:通過對使用者歷史訪問資料分別進行時間維度和空間維度的資料歸納,得到訪問矩陣池;其中,時間維度是指對單一使用者的訪問序列進行資料歸納,空間維度是指對同一時間不同使用者併發的訪問資訊進行資料歸納。最終形成訪問矩陣池中的各個用戶的用戶訪問畫像矩陣,以此為依據對用戶訪問進行限流決策。In one implementation, in order to generate an access matrix pool, the method may further include: obtaining an access matrix pool by summarizing the user's historical access data in terms of time dimension and space dimension, wherein the time dimension refers to summarizing the access sequence of a single user, and the space dimension refers to summarizing the access information concurrently sent by different users at the same time. Finally, a user access profile matrix of each user in the access matrix pool is formed, and a flow limiting decision on user access is made based on this.
在一種實施方式中,使用者訪問畫像矩陣包括使用者標識且包含如下任意一種或多種維度:使用者單位時間內對特定URL請求總次數、使用者單位時間內的URL請求總次數、使用者單位時間內的URL請求總數與URL種類數的比值、全量使用者單位時間內的特定URL請求總次數、全量使用者單位時間內的URL請求總次數、全量使用者單位時間內的URL請求總數與URL種類數的比值。In one implementation, the user visit profile matrix includes a user identifier and contains any one or more of the following dimensions: the total number of requests for a specific URL per user per unit time, the total number of URL requests per user per unit time, the ratio of the total number of URL requests per user per unit time to the number of URL types, the total number of requests for a specific URL per unit time for all users, the total number of URL requests per unit time for all users, and the ratio of the total number of URL requests per unit time for all users to the number of URL types.
其中,單位時間可以是1秒,全量用戶是指接入訪問矩陣池的全部使用者。The unit time can be 1 second, and all users refer to all users who access the matrix pool.
可以理解,可以根據實際業務場景維度自行設計上述維度,本申請對此不作具體限制。It is understandable that the above dimensions can be designed according to the actual business scenario dimensions, and this application does not impose any specific restrictions on this.
S104、根據使用者標識從訪問矩陣池獲取對應的用戶訪問畫像矩陣,基於用戶訪問序列和用戶畫像矩陣判斷當前訪問是否符合用戶訪問習慣。S104: Obtain a corresponding user access portrait matrix from the access matrix pool according to the user identification, and determine whether the current access is consistent with the user's access habits based on the user access sequence and the user portrait matrix.
可以理解,用戶訪問畫像矩陣從多個維度刻畫了用戶的訪問習慣,由此,可以根據使用者訪問畫像矩陣來對用戶訪問序列中包含的用戶最近幾次的訪問資料進行研判,以判斷訪問是否正常。It can be understood that the user visit portrait matrix describes the user's visit habits from multiple dimensions. Therefore, the user's recent visit data contained in the user visit sequence can be analyzed based on the user visit portrait matrix to determine whether the visit is normal.
進一步地,也可以根據使用者訪問畫像矩陣來對當前時間的多個用戶併發生成的多個用戶訪問序列進行研判,以判斷多個用戶的訪問是否正常。Furthermore, multiple user access sequences generated by multiple users concurrently at the current time can also be analyzed based on the user access portrait matrix to determine whether the access of multiple users is normal.
在一種實施方式中,S104中的基於用戶訪問序列和用戶畫像矩陣判斷當前訪問是否符合用戶訪問習慣,具體可以包括:In one implementation, judging whether the current access is consistent with the user's access habits based on the user access sequence and the user portrait matrix in S104 may specifically include:
根據使用者訪問畫像矩陣確定各個維度的限流範圍;根據使用者訪問序列獲取對應於用戶訪問畫像矩陣的各個維度的值;根據判斷各個維度的值是否在限流範圍內,以確定當前訪問是否為正常訪問。The current limiting range of each dimension is determined according to the user access portrait matrix; the value of each dimension corresponding to the user access portrait matrix is obtained according to the user access sequence; and whether the value of each dimension is within the current limiting range is determined to determine whether the current access is a normal access.
例如,如根據使用者A的使用者訪問畫像矩陣確定該用戶A在1秒內對特定URL請求(點擊獲取驗證碼getAuthCode)總次數的限流範圍為小於2次、該用戶A在1秒內的全部URL請求總次數的限流範圍為小於5次、全量用戶在1秒內對特定URL請求(點擊獲取驗證碼getAuthCode)總次數的限流範圍為小於1000次,等等。那麼可以獲取各個維度的限流範圍為:小於2;小於5;小於1000。基於此,可以對應根據使用者訪問序列獲取對應於用戶訪問畫像矩陣的各個維度的值,比如為:1;3;489。可以看出,此時各項指標都未超過限流範圍,可以認為是正常訪問。For example, if the total number of requests for a specific URL (click to get the verification code getAuthCode) by user A within 1 second is determined to be less than 2 times according to the user access profile matrix of user A, the total number of requests for all URLs by user A within 1 second is determined to be less than 5 times, the total number of requests for a specific URL (click to get the verification code getAuthCode) by all users within 1 second is determined to be less than 1000 times, etc. Then the current limit ranges for each dimension can be obtained as: less than 2; less than 5; less than 1000. Based on this, the values of each dimension corresponding to the user access profile matrix can be obtained according to the user access sequence, such as: 1; 3; 489. It can be seen that at this time, all indicators do not exceed the current limit range, which can be considered as normal access.
可選地,還可以將判斷規則設置為:如果超過限流範圍不超過預設閾值時,也可以認為是正常訪問。還可以將判斷規則設置為:為每個維度設置權重,基於權重、是否超過限流範圍(或者超過限流範圍的程度)進行加權計算,如最終結果未超過設定值即可以認為是正常訪問。本申請對此不作具體限制。Optionally, the judgment rule can be set as follows: if the limit range is exceeded but not exceeding the preset threshold, it can also be considered as normal access. The judgment rule can also be set as follows: set weights for each dimension, and perform weighted calculation based on the weights and whether the limit range is exceeded (or the degree of exceeding the limit range). If the final result does not exceed the set value, it can be considered as normal access. This application does not impose specific restrictions on this.
在一種實施方式中,為了減少不必要的計算量,本申請還可以包括:根據維度權重對用戶畫像矩陣的多個維度進行優先順序排列;按照優先順序順序依次判斷各個維度的值是否在對應的限流範圍內;其中,一旦判斷出當前訪問是非正常訪問,則無需對後續優先順序維度進行判斷。In one implementation, in order to reduce unnecessary calculations, the application may also include: prioritizing multiple dimensions of the user portrait matrix according to dimension weights; determining in order of priority whether the value of each dimension is within the corresponding current limiting range; wherein, once it is determined that the current access is an abnormal access, there is no need to determine the subsequent priority dimensions.
在獲取判斷當前訪問是否符合用戶訪問習慣的判斷結果之後,將當前訪問的判斷結果應答至宿主應用的埋點處,且當埋點收到非正常訪問的應答時,向宿主應用回饋限流提醒。比如提醒需執行丟棄請求、切斷連結、告警等處理。After obtaining the judgment result of whether the current access is in line with the user's access habits, the judgment result of the current access is responded to the tracking point of the host application, and when the tracking point receives the response of abnormal access, it feeds back the host application with a flow limiting reminder. For example, the reminder needs to execute processing such as abandoning the request, disconnecting the connection, and issuing an alarm.
在本說明書的描述中,參考術語“一些可能的實施方式”、“一些實施例”、“示例”、“具體示例”、或“一些示例”等的描述意指結合該實施例或示例描述的具體特徵、結構、材料或者特點包含于本發明的至少一個實施例或示例中。在本說明書中,對上述術語的示意性表述不必須針對的是相同的實施例或示例。而且,描述的具體特徵、結構、材料或者特點可以在任一個或多個實施例或示例中以合適的方式結合。此外,在不相互矛盾的情況下,本領域的技術人員可以將本說明書中描述的不同實施例或示例以及不同實施例或示例的特徵進行結合和組合。In the description of this specification, the descriptions with reference to the terms "some possible implementations", "some embodiments", "examples", "specific examples", or "some examples" etc. mean that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily need to be directed to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in an appropriate manner. In addition, a person skilled in the art may combine and combine different embodiments or examples described in this specification and features of different embodiments or examples, without contradiction.
此外,術語“第一”、“第二”僅用於描述目的,而不能理解為指示或暗示相對重要性或者隱含指明所指示的技術特徵的數量。由此,限定有“第一”、“第二”的特徵可以明示或者隱含地包括至少一個該特徵。在本發明的描述中,“多個”的含義是至少兩個,例如兩個,三個等,除非另有明確具體的限定。In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
流程圖中或在此以其他方式描述的任何過程或方法描述可以被理解為,表示包括一個或更多個用於實現特定邏輯功能或過程的步驟的可執行指令的代碼的模組、片段或部分,並且本發明的優選實施方式的範圍包括另外的實現,其中可以不按所示出或討論的順序,包括根據所涉及的功能按基本同時的方式或按相反的順序,來執行功能,這應被本發明的實施例所屬技術領域的技術人員所理解。Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing specific logical functions or process steps, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in a reverse order according to the functions involved, which should be understood by a technician in the technical field to which the embodiments of the present invention belong.
關於本申請實施例的方法流程圖,將某些操作描述為以一定循序執行的不同的步驟。這樣的流程圖屬於說明性的而非限制性的。可以將在本文中所描述的某些步驟分組在一起並且在單個操作中執行、可以將某些步驟分割成多個子步驟、並且可以以不同于在本文中所示出的順序來執行某些步驟。可以由任何電路結構和/或有形機制(例如,由在電腦設備上運行的軟體、硬體(例如,處理器或晶片實現的邏輯功能)等、和/或其任何組合)以任何方式來實現在流程圖中所示出的各個步驟。Regarding the method flow chart of the embodiment of the present application, certain operations are described as different steps performed in a certain sequence. Such a flow chart is illustrative and not restrictive. Certain steps described in this article can be grouped together and performed in a single operation, certain steps can be divided into multiple sub-steps, and certain steps can be performed in a different order than shown in this article. The various steps shown in the flow chart can be implemented in any way by any circuit structure and/or tangible mechanism (for example, by software running on a computer device, hardware (for example, a logical function implemented by a processor or chip), etc., and/or any combination thereof).
基於相同的技術構思,本發明實施例還提供一種網頁訪問限流裝置,用於執行上述任一實施例所提供的網頁訪問限流方法。圖2為本發明實施例提供的一種網頁訪問限流裝置結構示意圖。Based on the same technical concept, the embodiment of the present invention also provides a web page access current limiting device, which is used to execute the web page access current limiting method provided by any of the above embodiments. FIG2 is a schematic diagram of the structure of a web page access current limiting device provided by the embodiment of the present invention.
如圖2所示,裝置20包括:As shown in FIG. 2 , the
訪問收納模組201,用於當使用者訪問宿主應用的網頁服務時,獲取宿主應用發來的當前訪問資訊;The access storage module 201 is used to obtain the current access information sent by the host application when the user accesses the web service of the host application;
訪問歸集模組202,用於根據當前訪問資訊生成使用者訪問序列,用戶訪問序列將使用者的當前訪問資訊及預設次數的在先訪問資訊按時序排列;The access collection module 202 is used to generate a user access sequence according to the current access information, and the user access sequence arranges the user's current access information and the previous access information of a preset number of times in chronological order;
訪問矩陣池203,將用戶訪問序列輸入訪問矩陣池,以動態更新對應於各個使用者的用戶訪問畫像矩陣,使用者訪問畫像矩陣根據使用者歷史訪問資料生成且包括多個維度的訪問歸納資料;The access matrix pool 203 inputs the user access sequence into the access matrix pool to dynamically update the user access portrait matrix corresponding to each user. The user access portrait matrix is generated according to the user's historical access data and includes access summary data of multiple dimensions;
限流計算模組204,用於根據使用者標識從訪問矩陣池獲取對應的用戶訪問畫像矩陣,基於用戶訪問序列和用戶畫像矩陣判斷當前訪問是否符合用戶訪問習慣。The current limiting calculation module 204 is used to obtain the corresponding user access portrait matrix from the access matrix pool according to the user identification, and judge whether the current access is consistent with the user's access habits based on the user access sequence and the user portrait matrix.
在一種實施方式中,當前訪問資訊包括:使用者標識、當前服務URL和時間戳記。In one implementation, the current access information includes: user identification, current service URL and timestamp.
在一種實施方式中,限流計算模組204,還用於:根據使用者訪問畫像矩陣確定各個維度的限流範圍;根據使用者訪問序列獲取對應於用戶訪問畫像矩陣的各個維度的值;根據判斷各個維度的值是否在限流範圍內,以確定當前訪問是否為正常訪問。In one implementation, the current limiting calculation module 204 is further used to: determine the current limiting range of each dimension based on the user access portrait matrix; obtain the value of each dimension corresponding to the user access portrait matrix based on the user access sequence; and determine whether the current access is a normal access by judging whether the value of each dimension is within the current limiting range.
在一種實施方式中,使用者訪問畫像矩陣包括使用者標識且包含如下任意一種或多種維度:使用者單位時間內對特定URL請求總次數、使用者單位時間內的URL請求總次數、使用者單位時間內的URL請求總數與URL種類數的比值、全量使用者單位時間內的特定URL請求總次數、全量使用者單位時間內的URL請求總次數、全量使用者單位時間內的URL請求總數與URL種類數的比值。In one implementation, the user visit profile matrix includes a user identifier and contains any one or more of the following dimensions: the total number of requests for a specific URL per user per unit time, the total number of URL requests per user per unit time, the ratio of the total number of URL requests per user per unit time to the number of URL types, the total number of requests for a specific URL per unit time for all users, the total number of URL requests per unit time for all users, and the ratio of the total number of URL requests per unit time for all users to the number of URL types.
在一種實施方式中,還包括:應用埋點模組200,用於在宿主應用內的網頁服務入口處設置埋點,使得任意一個或多個使用者訪問網頁服務時觸發埋點以生成調用請求,調用請求包括當前訪問資訊;結果輸出模組,用於將當前訪問的判斷結果應答至宿主應用的埋點處,且當應用埋點模組收到非正常訪問的應答時,向宿主應用回饋限流提醒。In one implementation, it also includes: an application embedding module 200, which is used to set a embedding point at the entrance of the web service in the host application, so that when any one or more users access the web service, the embedding point is triggered to generate a call request, and the call request includes the current access information; a result output module, which is used to respond the judgment result of the current access to the embedding point of the host application, and when the application embedding module receives a response to an abnormal access, it feeds back a current limiting reminder to the host application.
在一種實施方式中,訪問矩陣池203還用於:通過對使用者歷史訪問資料分別進行時間維度和空間維度的資料歸納,得到訪問矩陣池;其中,時間維度是指對單一使用者的訪問序列進行資料歸納,空間維度是指對同一時間不同使用者併發的訪問資訊進行資料歸納。In one implementation, the access matrix pool 203 is also used to obtain the access matrix pool by summarizing the user's historical access data in terms of time dimension and space dimension, respectively; wherein the time dimension refers to summarizing the access sequence of a single user, and the space dimension refers to summarizing the access information concurrently sent by different users at the same time.
在一種實施方式中,限流計算模組204還用於:根據維度權重對用戶畫像矩陣的多個維度進行優先順序排列;按照優先順序順序依次判斷各個維度的值是否在對應的限流範圍內;其中,一旦判斷出當前訪問是非正常訪問,則無需對後續優先順序維度進行判斷。In one implementation, the current limiting calculation module 204 is also used to: prioritize multiple dimensions of the user portrait matrix according to dimension weights; determine in order of priority whether the value of each dimension is within the corresponding current limiting range; wherein, once it is determined that the current access is an abnormal access, there is no need to determine the subsequent priority dimensions.
需要說明的是,本申請實施例中的裝置可以實現前述方法的實施例的各個過程,並達到相同的效果和功能,這裡不再贅述。It should be noted that the device in the embodiment of the present application can implement each process of the embodiment of the aforementioned method and achieve the same effect and function, which will not be elaborated here.
圖3為根據本申請一實施例的網頁訪問限流裝置,用於執行圖1所示出的網頁訪問限流方法,該裝置包括:至少一個處理器;以及,與至少一個處理器通信連接的記憶體;其中,記憶體存儲有可被至少一個處理器執行的指令,指令被至少一個處理器執行,以使至少一個處理器能夠執行上述實施例所述的方法。Figure 3 is a web page access current limiting device according to an embodiment of the present application, which is used to execute the web page access current limiting method shown in Figure 1. The device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor so that at least one processor can execute the method described in the above embodiment.
根據本申請的一些實施例,提供了網頁訪問限流方法的非易失性電腦存儲介質,其上存儲有電腦可執行指令,該電腦可執行指令設置為在由處理器運行時執行:上述實施例所述的方法。According to some embodiments of the present application, a non-volatile computer storage medium for a web page access current limiting method is provided, on which computer executable instructions are stored. The computer executable instructions are configured to execute the method described in the above embodiments when executed by a processor.
本申請中的各個實施例均採用遞進的方式描述,各個實施例之間相同相似的部分互相參見即可,每個實施例重點說明的都是與其他實施例的不同之處。尤其,對於裝置、設備和電腦可讀存儲介質實施例而言,由於其基本相似於方法實施例,所以其描述進行了簡化,相關之處可參見方法實施例的部分說明即可。Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and computer-readable storage medium embodiments, since they are basically similar to the method embodiments, their descriptions are simplified, and the relevant parts can be referred to the partial description of the method embodiment.
本申請實施例提供的裝置、設備和電腦可讀存儲介質與方法是一一對應的,因此,裝置、設備和電腦可讀存儲介質也具有與其對應的方法類似的有益技術效果,由於上面已經對方法的有益技術效果進行了詳細說明,因此,這裡不再贅述裝置、設備和電腦可讀存儲介質的有益技術效果。The apparatus, equipment and computer-readable storage medium provided in the embodiments of the present application correspond one-to-one to the method. Therefore, the apparatus, equipment and computer-readable storage medium also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the apparatus, equipment and computer-readable storage medium will not be repeated here.
本領域內的技術人員應明白,本發明的實施例可提供為方法、系統或電腦程式產品。因此,本發明可採用完全硬體實施例、完全軟體實施例、或結合軟體和硬體方面的實施例的形式。而且,本發明可採用在一個或多個其中包含有電腦可用程式碼的電腦可用存儲介質(包括但不限於磁碟記憶體、CD-ROM、光學記憶體等)上實施的電腦程式產品的形式。It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems or computer program products. Thus, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) containing computer-usable program code.
本發明是參照根據本發明實施例的方法、設備(系統)、和電腦程式產品的流程圖和/或方框圖來描述的。應理解可由電腦程式指令實現流程圖和/或方框圖中的每一流程和/或方框、以及流程圖和/或方框圖中的流程和/或方框的結合。可提供這些電腦程式指令到通用電腦、專用電腦、嵌入式處理機或其他可程式設計資料處理設備的處理器以產生一個機器,使得通過電腦或其他可程式設計資料處理設備的處理器執行的指令產生用於實現在流程圖一個流程或多個流程和/或方框圖一個方框或多個方框中指定的功能的裝置。The present invention is described with reference to the flowchart and/or block diagram of the method, apparatus (system), and computer program product according to the embodiment of the present invention. It should be understood that each process and/or box in the flowchart and/or block diagram, as well as the combination of the processes and/or boxes in the flowchart and/or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.
這些電腦程式指令也可存儲在能引導電腦或其他可程式設計資料處理設備以特定方式工作的電腦可讀記憶體中,使得存儲在該電腦可讀記憶體中的指令產生包括指令裝置的製造品,該指令裝置實現在流程圖一個流程或多個流程和/或方框圖一個方框或多個方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.
這些電腦程式指令也可裝載到電腦或其他可程式設計資料處理設備上,使得在電腦或其他可程式設計設備上執行一系列操作步驟以產生電腦實現的處理,從而在電腦或其他可程式設計設備上執行的指令提供用於實現在流程圖一個流程或多個流程和/或方框圖一個方框或多個方框中指定的功能的步驟。These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.
在一個典型的配置中,計算設備包括一個或多個處理器 (CPU)、輸入/輸出介面、網路介面和記憶體。In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
記憶體可能包括電腦可讀介質中的非永久性記憶體,隨機存取記憶體 (RAM) 和/或非易失性記憶體等形式,如唯讀記憶體 (ROM) 或快閃記憶體(flash RAM)。記憶體是電腦可讀介質的示例。Memory may include non-permanent memory in a computer-readable medium, in the form of random access memory (RAM) and/or non-volatile memory such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
電腦可讀介質包括永久性和非永久性、可移動和非可移動媒體可以由任何方法或技術來實現資訊存儲。資訊可以是電腦可讀指令、資料結構、程式的模組或其他資料。電腦的存儲介質的例子包括,但不限於相變記憶體 (PRAM)、靜態隨機存取記憶體 (SRAM)、動態隨機存取記憶體 (DRAM)、其他類型的隨機存取記憶體 (RAM)、唯讀記憶體 (ROM)、電可擦除可程式設計唯讀記憶體 (EEPROM)、快閃記憶體或其他記憶體技術、唯讀光碟唯讀記憶體 (CD-ROM)、數位多功能光碟 (DVD) 或其他光學存儲、磁盒式磁帶,磁帶磁磁片存儲或其他磁性存放裝置或任何其他非傳輸介質,可用於存儲可以被計算設備訪問的資訊。此外,儘管在附圖中以特定順序描述了本發明方法的操作,但是,這並非要求或者暗示必須按照該特定順序來執行這些操作,或是必須執行全部所示的操作才能實現期望的結果。附加地或備選地,可以省略某些步驟,將多個步驟合併為一個步驟執行,和/或將一個步驟分解為多個步驟執行。Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. In addition, although the operations of the method of the present invention are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and/or one step may be decomposed into multiple steps.
雖然已經參考若干具體實施方式描述了本發明的精神和原理,但是應該理解,本發明並不限於所公開的具體實施方式,對各方面的劃分也不意味著這些方面中的特徵不能組合以進行受益,這種劃分僅是為了表述的方便。本發明旨在涵蓋所附申請專利範圍的精神和範圍內所包括的各種修改和等同佈置。Although the spirit and principle of the present invention have been described with reference to several specific embodiments, it should be understood that the present invention is not limited to the disclosed specific embodiments, and the division of various aspects does not mean that the features in these aspects cannot be combined to benefit. Such division is only for the convenience of expression. The present invention is intended to cover various modifications and equivalent arrangements included in the spirit and scope of the attached patent application.
S101:當使用者訪問宿主應用的網頁服務時,獲取宿主應用發來的當前訪問資訊 S102:根據當前訪問資訊生成使用者訪問序列,用戶訪問序列將使用者的當前訪問資訊及預設次數的在先訪問資訊按時序排列 S103:將用戶訪問序列輸入訪問矩陣池,以動態更新對應於各個使用者的用戶訪問畫像矩陣 S104:根據使用者標識從訪問矩陣池獲取對應的用戶訪問畫像矩陣,基於用戶訪問序列和用戶畫像矩陣判斷當前訪問是否符合用戶訪問習慣 200:應用埋點模組 201:訪問收納模組 202:訪問歸集模組 203:訪問矩陣池 204:限流計算模組 S101: When a user accesses the web service of the host application, the current access information sent by the host application is obtained S102: A user access sequence is generated based on the current access information. The user access sequence arranges the user's current access information and the preset number of previous access information in chronological order S103: The user access sequence is input into the access matrix pool to dynamically update the user access portrait matrix corresponding to each user S104: According to the user identification, the corresponding user access portrait matrix is obtained from the access matrix pool, and based on the user access sequence and the user portrait matrix, it is judged whether the current access is in line with the user's access habits 200: Application tracking module 201: Access the collection module 202: Access the collection module 203: Access the matrix pool 204: Current limiting calculation module
[圖1]為根據本發明一實施例的網頁訪問限流方法的流程示意圖; [圖2]為根據本發明一實施例的網頁訪問限流裝置的結構示意圖; [圖3]為根據本發明又一實施例的網頁訪問限流裝置的結構示意圖。 [Figure 1] is a schematic diagram of the process of a web page access current limiting method according to an embodiment of the present invention; [Figure 2] is a schematic diagram of the structure of a web page access current limiting device according to an embodiment of the present invention; [Figure 3] is a schematic diagram of the structure of a web page access current limiting device according to another embodiment of the present invention.
S101:當使用者訪問宿主應用的網頁服務時,獲取宿主應用發來的當前訪問資訊 S101: When a user accesses the web service of the host application, the current access information sent by the host application is obtained.
S102:根據當前訪問資訊生成使用者訪問序列,用戶訪問序列將使用者的當前訪問資訊及預設次數的在先訪問資訊按時序排列 S102: Generate a user access sequence based on the current access information. The user access sequence arranges the user's current access information and the preset number of previous access information in chronological order.
S103:將用戶訪問序列輸入訪問矩陣池,以動態更新對應於各個使用者的用戶訪問畫像矩陣 S103: Input the user access sequence into the access matrix pool to dynamically update the user access portrait matrix corresponding to each user
S104:根據使用者標識從訪問矩陣池獲取對應的用戶訪問畫像矩陣,基於用戶訪問序列和用戶畫像矩陣判斷當前訪問是否符合用戶訪問習慣 S104: Obtain the corresponding user access portrait matrix from the access matrix pool according to the user identification, and judge whether the current access is consistent with the user's access habits based on the user access sequence and the user portrait matrix.
Claims (14)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111407417.6A CN113973087B (en) | 2021-11-24 | 2021-11-24 | Webpage access current limiting method and device and computer readable storage medium |
| CN202111407417.6 | 2021-11-24 |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| TW202321949A TW202321949A (en) | 2023-06-01 |
| TWI856384B true TWI856384B (en) | 2024-09-21 |
Family
ID=79590248
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| TW111137565A TWI856384B (en) | 2021-11-24 | 2022-10-03 | Webpage access flow limiting method and device and computer readable storage medium |
Country Status (3)
| Country | Link |
|---|---|
| CN (1) | CN113973087B (en) |
| TW (1) | TWI856384B (en) |
| WO (1) | WO2023093206A1 (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113973087B (en) * | 2021-11-24 | 2024-01-05 | 中国银联股份有限公司 | Webpage access current limiting method and device and computer readable storage medium |
| CN118646800B (en) * | 2024-08-12 | 2024-11-01 | 深圳市智慧城市科技发展集团有限公司 | Access request processing method, device and storage medium |
| CN121000666A (en) * | 2025-09-03 | 2025-11-21 | 延安大学 | Multi-dimensional flow control methods, systems, and terminals applied in stadium management systems |
Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105357228A (en) * | 2015-12-19 | 2016-02-24 | 中国人民解放军信息工程大学 | Burst traffic detection method based on dynamic threshold |
| TW201729068A (en) * | 2015-11-13 | 2017-08-16 | 三星電子股份有限公司 | Distributed storage system, distributed storage method and distributed facility |
| CN110856222A (en) * | 2018-08-20 | 2020-02-28 | 华为技术有限公司 | Flow control method and device |
| CN111355626A (en) * | 2018-12-24 | 2020-06-30 | 中移(杭州)信息技术有限公司 | Request processing method and device |
| CN111552933A (en) * | 2020-03-30 | 2020-08-18 | 西安交大捷普网络科技有限公司 | Method and device for identifying abnormal login of account |
| CN112104567A (en) * | 2020-09-03 | 2020-12-18 | 中国银联股份有限公司 | Flow control method, device, equipment and medium |
| CN113630332A (en) * | 2021-08-05 | 2021-11-09 | 百融云创科技股份有限公司 | Distributed multi-stage dynamic current limiting method and system |
| CN113691457A (en) * | 2021-08-10 | 2021-11-23 | 中国银联股份有限公司 | Current limiting control method, device, device and storage medium |
Family Cites Families (16)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20170149828A1 (en) * | 2015-11-24 | 2017-05-25 | International Business Machines Corporation | Trust level modifier |
| CN107222426B (en) * | 2016-03-21 | 2021-07-20 | 阿里巴巴集团控股有限公司 | Flow control method, device and system |
| CN107465648B (en) * | 2016-06-06 | 2020-09-04 | 腾讯科技(深圳)有限公司 | Abnormal equipment identification method and device |
| CN107783987B (en) * | 2016-08-25 | 2022-03-04 | 腾讯科技(深圳)有限公司 | Data processing method and device |
| CN107465686A (en) * | 2017-08-23 | 2017-12-12 | 杭州安恒信息技术有限公司 | IP credit worthinesses computational methods and device based on the heterogeneous big data of network |
| CN107918497A (en) * | 2017-11-14 | 2018-04-17 | 厦门攸信信息技术有限公司 | The Forecasting Methodology and system of a kind of controller |
| CN109962855A (en) * | 2017-12-14 | 2019-07-02 | 深圳市融汇通金科技有限公司 | A kind of current-limiting method of WEB server, current-limiting apparatus and terminal device |
| CN109274639A (en) * | 2018-07-03 | 2019-01-25 | 阿里巴巴集团控股有限公司 | Method and device for identifying open platform abnormal data access |
| CN109271555B (en) * | 2018-09-19 | 2021-04-06 | 上海哔哩哔哩科技有限公司 | Information clustering method, system, server and computer readable storage medium |
| CN110677494B (en) * | 2019-10-14 | 2021-06-01 | 腾讯科技(深圳)有限公司 | Access response method and device |
| CN115004210A (en) * | 2020-04-01 | 2022-09-02 | 深圳市欢太科技有限公司 | User portrait list construction method, device, server and storage medium |
| CN111756702B (en) * | 2020-05-29 | 2022-11-08 | 北京沃东天骏信息技术有限公司 | Data security protection method, device, equipment and storage medium |
| CN111966995A (en) * | 2020-08-17 | 2020-11-20 | 福建工程学院 | User permission dynamic control method and device based on user behavior and equipment |
| CN113347205B (en) * | 2021-06-30 | 2022-10-28 | 深圳前海微众银行股份有限公司 | Method and device for detecting service access request |
| CN113645310A (en) * | 2021-08-20 | 2021-11-12 | 北京高途云集教育科技有限公司 | Data current limiting method and device, electronic equipment and readable storage medium |
| CN113973087B (en) * | 2021-11-24 | 2024-01-05 | 中国银联股份有限公司 | Webpage access current limiting method and device and computer readable storage medium |
-
2021
- 2021-11-24 CN CN202111407417.6A patent/CN113973087B/en active Active
-
2022
- 2022-09-07 WO PCT/CN2022/117423 patent/WO2023093206A1/en not_active Ceased
- 2022-10-03 TW TW111137565A patent/TWI856384B/en active
Patent Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TW201729068A (en) * | 2015-11-13 | 2017-08-16 | 三星電子股份有限公司 | Distributed storage system, distributed storage method and distributed facility |
| CN105357228A (en) * | 2015-12-19 | 2016-02-24 | 中国人民解放军信息工程大学 | Burst traffic detection method based on dynamic threshold |
| CN110856222A (en) * | 2018-08-20 | 2020-02-28 | 华为技术有限公司 | Flow control method and device |
| CN111355626A (en) * | 2018-12-24 | 2020-06-30 | 中移(杭州)信息技术有限公司 | Request processing method and device |
| CN111552933A (en) * | 2020-03-30 | 2020-08-18 | 西安交大捷普网络科技有限公司 | Method and device for identifying abnormal login of account |
| CN112104567A (en) * | 2020-09-03 | 2020-12-18 | 中国银联股份有限公司 | Flow control method, device, equipment and medium |
| CN113630332A (en) * | 2021-08-05 | 2021-11-09 | 百融云创科技股份有限公司 | Distributed multi-stage dynamic current limiting method and system |
| CN113691457A (en) * | 2021-08-10 | 2021-11-23 | 中国银联股份有限公司 | Current limiting control method, device, device and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| TW202321949A (en) | 2023-06-01 |
| WO2023093206A1 (en) | 2023-06-01 |
| CN113973087A (en) | 2022-01-25 |
| CN113973087B (en) | 2024-01-05 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| TWI856384B (en) | Webpage access flow limiting method and device and computer readable storage medium | |
| AU2019332682B2 (en) | Cost optimized dynamic resource allocation in a cloud infrastructure | |
| US12353798B2 (en) | Condensed spoken utterances for automated assistant control of an intricate application GUI | |
| US8667056B1 (en) | Dynamic traffic management | |
| CN113285883A (en) | Access request current limiting method and device, electronic equipment and storage medium | |
| US20190334699A1 (en) | Service execution method and device | |
| CN106302350B (en) | URL monitoring method, device and equipment | |
| JP2004536389A5 (en) | ||
| US11443202B2 (en) | Real-time on the fly generation of feature-based label embeddings via machine learning | |
| US9292341B2 (en) | RPC acceleration based on previously memorized flows | |
| US9766957B2 (en) | Method and processes for securely autofilling data fields in a software application | |
| CN114710318B (en) | A method, device, equipment and medium for restricting high-frequency access of crawlers | |
| CN112149011B (en) | Method, device, server and computer storage medium for updating popularity ranking list | |
| US10511679B2 (en) | Method of determining and transmitting potentially viral media items based on the velocity measure of another media item exceeding a velocity threshold set for that type of media item | |
| JP4722927B2 (en) | Method and system for determining validity of instruction word | |
| WO2021238555A1 (en) | Information search | |
| US9304976B1 (en) | Positioning media to go viral | |
| CN119248537A (en) | Cross-cluster operation methods, devices, and storage media | |
| TW201413468A (en) | Method and device for interactive user data | |
| HK40067106A (en) | Web access throttling method, apparatus and computer-readable storage medium | |
| CN116185625B (en) | Resource peak-shifting sharing method, device, distributed system and storage medium | |
| CN112667914B (en) | Content matrix display method, device and system based on neural network | |
| US12451142B2 (en) | Non-wake word invocation of an automated assistant from certain utterances related to display content | |
| CN111767137B (en) | System deployment method and device, electronic equipment and storage medium | |
| CN118277425A (en) | Data processing method and device |