WO2023093206A1 - Webpage access flow limiting method and apparatus, and computer-readable storage medium - Google Patents

Webpage access flow limiting method and apparatus, and computer-readable storage medium Download PDF

Info

Publication number
WO2023093206A1
WO2023093206A1 PCT/CN2022/117423 CN2022117423W WO2023093206A1 WO 2023093206 A1 WO2023093206 A1 WO 2023093206A1 CN 2022117423 W CN2022117423 W CN 2022117423W WO 2023093206 A1 WO2023093206 A1 WO 2023093206A1
Authority
WO
WIPO (PCT)
Prior art keywords
access
user
current
matrix
sequence
Prior art date
Application number
PCT/CN2022/117423
Other languages
French (fr)
Chinese (zh)
Inventor
许斌
陈林
王炟
尹杰
柏慧荣
Original Assignee
中国银联股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中国银联股份有限公司 filed Critical 中国银联股份有限公司
Publication of WO2023093206A1 publication Critical patent/WO2023093206A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/20Traffic policing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links

Definitions

  • the invention belongs to the field of current limiting, and in particular relates to a webpage access current limiting method, device and computer-readable storage medium.
  • the query rate per second of the system can be well controlled by current limiting, so as to achieve the purpose of protecting the system.
  • the purpose of the above-mentioned current limiting is to limit the speed of concurrent access. Once a certain rate is reached, services can be denied, queued, downgraded, etc.
  • counter algorithm implements WEB access current limiting through a sliding window combined with a counter, while the latter uses a fixed-sized token bucket and continuously generates tokens at a constant rate. If the token exists in the token bucket, the request is allowed to be sent; if the token bucket does not exist, the request is not allowed to be sent.
  • the present invention provides the following solutions.
  • a webpage access current limiting method including: when a user accesses a webpage 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, and the user access sequence combines the user's The current access information and the prior access information of the preset number of times are arranged in chronological order; the user access sequence is input into the access matrix pool to dynamically update the user access portrait matrix corresponding to each user.
  • the user access portrait matrix is generated based on user historical access data and includes Multi-dimensional access summary data; obtain the corresponding user access portrait matrix from the access matrix pool according to the user ID, and judge whether the current visit conforms to the user's access habits based on the user access sequence and user portrait matrix.
  • the current access information includes: user identifier, current service URL and time stamp.
  • judging whether the current visit conforms to the user's access habits based on the user access sequence and the user portrait matrix includes: determining the current limit range of each dimension according to the user access portrait matrix; obtaining the corresponding user access portrait matrix according to the user access sequence The value of each dimension; according to whether the value of each dimension is within the current limit range, to determine whether the current access is a normal access.
  • the user access portrait matrix includes a user identifier and includes any one or more of the following dimensions: the total number of requests for a specific URL by the user per unit time, the total number of URL requests by the user per unit time, the total number of URL requests by the user per unit time, The ratio of the total number of URL requests to the number of URL types, the total number of specific URL requests per unit time of all users, the total number of URL requests per unit time of all users, and the ratio of the total number of URL requests to the number of URL types per unit time of all users.
  • it also includes: setting a buried point at the webpage service entrance in the host application, so that when any one or more users access the webpage service, the buried 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 buried point of the host application, and when the buried point receives an abnormal access response, a current limit reminder is fed back to the host application.
  • the access matrix pool is obtained by summarizing the data of the user's historical access data in the time dimension and the space dimension respectively; where the time dimension refers to the access sequence of a single user.
  • Data induction, the spatial dimension refers to the data induction of concurrent access information of different users at the same time.
  • multiple dimensions of the user portrait matrix are prioritized according to the dimension weights; whether the value of each dimension is within the corresponding current limit range is judged sequentially according to the priority order; wherein, once it is determined that the current access is right or wrong For normal access, there is no need to judge the subsequent priority dimension.
  • a webpage access current limiting device including: an access storage module, used to obtain the current access information sent by the host application when the user accesses the webpage service of the host application;
  • the access information generates a user access sequence, and the user access sequence arranges the user's current access information and the previous access information of the preset number of times in chronological order;
  • the access matrix pool inputs the user access sequence into the access matrix pool to dynamically update the information corresponding to each user User access portrait matrix, the user access portrait matrix is generated based on user historical access data and includes access summary data of multiple dimensions;
  • the current limiting calculation module is used to obtain the corresponding user access portrait matrix from the access matrix pool according to the user identification, based on user access
  • the sequence and user portrait matrix determine whether the current visit conforms to the user's visit habits.
  • the current access information includes: user identifier, current service URL and time stamp.
  • the current limit calculation module is also used to: determine the current limit range of each dimension according to the user access portrait matrix; obtain the value corresponding to each dimension of the user access portrait matrix according to the user access sequence; judge each dimension according to Whether the value of is within the limit range to determine whether the current access is a normal access.
  • the user access portrait matrix includes a user identifier and includes any one or more of the following dimensions: the total number of requests for a specific URL by the user per unit time, the total number of URL requests by the user per unit time, the total number of URL requests by the user per unit time, The ratio of the total number of URL requests to the number of URL types, the total number of specific URL requests per unit time of all users, the total number of URL requests per unit time of all users, and the ratio of the total number of URL requests to the number of URL types per unit time of all users.
  • an application tracking module which is used to set a tracking 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 tracking point is triggered to generate a calling request, and the calling The request includes the current access information; the result output module is used to reply the judgment result of the current access to the buried point of the host application, and when the application buried point module receives an abnormal access response, it will feed back a current limit reminder to the host application.
  • the access matrix pool is also used to obtain the access matrix pool by summarizing the data of the user's historical access data in the time dimension and the space dimension respectively;
  • the spatial dimension refers to the data induction of concurrent access information of different users at the same time.
  • the current limit calculation module is also used to: prioritize multiple dimensions of the user portrait matrix according to the dimension weights; determine whether the values of each dimension are within the corresponding current limit range according to the order of priority; Wherein, once it is judged that the current access is an abnormal access, there is no need to judge the subsequent priority dimension.
  • a webpage access current limiting device including: at least one processor; and a memory connected to the at least one processor in communication; wherein, the memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor. Executed by a processor, so that at least one processor can execute: the method of the first aspect.
  • a 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 in the first aspect.
  • FIG. 1 is a schematic flow diagram of a webpage access current limiting method according to an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of a webpage access current limiting device according to an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of a device for limiting webpage access traffic according to another embodiment of the present invention.
  • A/B can mean A or B; "and/or” in this article is just an association relationship describing associated objects, indicating that there can be three relationships, For example, A and/or B may mean that A exists alone, A and B exist simultaneously, and B exists alone.
  • first”, “second”, etc. are used for descriptive purposes only, and should not be understood as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as “first”, “second”, etc. may expressly or implicitly include one or more of that feature. In the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
  • This application proposes a webpage access flow limiting method, which specifically includes: when a user accesses the webpage service of the host application, obtains the current access information sent by the host application; generates a user access sequence according to the current access information, and the user access sequence combines the user's current
  • the access information and the prior access information of the preset times are arranged in chronological order; the user access sequence is input into the access matrix pool to dynamically update the user access portrait matrix corresponding to each user.
  • the user access portrait matrix is generated based on user historical access data and includes multiple Access summary data of three dimensions; obtain the corresponding user access portrait matrix from the access matrix pool according to the user ID, and judge whether the current visit conforms to the user's access habits based on the user access sequence and user portrait matrix. Therefore, by analyzing the user access data, the dynamic adjustment of the current limiting threshold for different users can be realized, so as to realize the web page access current limiting.
  • Fig. 1 is a schematic flow diagram of a web page access flow limiting method according to an embodiment of the present application, which is used to limit the flow of abnormal access.
  • the execution subject can be one or more Electronic equipment; from a program perspective, the execution subject may be a program carried on these electronic equipment.
  • the method provided in this embodiment may include the following steps:
  • the current access information includes: user identifier, current service URL and time stamp.
  • user identifier For example, it could be (userA, url1, timestamp 10).
  • it in order to start the above current limiting method more insensitively, it also includes: setting a buried point at the web service entrance in the host application, so that when any one or more users access the web service, trigger the buried point to generate A call request, the call request includes current access information.
  • the current limiting method initiates a call and receives its feedback result.
  • an HTTP service may be provided to the host application to receive a call request sent by the host application by triggering application embedding, and the call request may include current access information of the user's access to the webpage service.
  • S102 Generate a user access sequence according to the current access information, and the user access sequence arranges the user's current access information and prior access information of preset times in time sequence;
  • the current access information may include (user A, url1, timestamp 10), and the user access sequence generated by the conversion may include [(user A, url1, timestamp 1), (user A, url2, timestamp 2), ..., (user A, url1, timestamp 10)], where the number of user access sequence information can be set, such as 10, and then the current access information is used as the last sequence element to extract the previous 9 times of user A Information is accessed and assembled into a chronological sequence of user accesses.
  • a user visit sequence less than the preset elements may also be produced.
  • the url sequence data corresponding to the three requests are:
  • the user access portrait matrix is generated according to user historical access data and includes access summary data of multiple dimensions.
  • the access matrix pool is dynamically updated based on the continuously input user access sequence in real time. Before the user access data corresponding to the current access is input, it has calculated the user access matrix and user access habits through the processing of the previously input user historical access data. In this way, the user's traffic-limited portrait can be scrolled to describe the user's access summary data in various dimensions.
  • the access matrix pool in order to generate the access matrix pool, it may also include: obtaining the access matrix pool by summarizing the data of the time dimension and the space dimension respectively on the historical access data of the user; wherein, the time dimension refers to the access to a single user The sequence is used for data induction, and the spatial dimension refers to the data induction for concurrent access information of different users at the same time. Finally, the user access portrait matrix of each user in the access matrix pool is formed, and based on this, the current limiting decision on user access is made.
  • the user access portrait matrix includes a user identifier and includes any one or more of the following dimensions: the total number of requests for a specific URL by the user per unit time, the total number of URL requests by the user per unit time, the total number of URL requests by the user per unit time, The ratio of the total number of URL requests to the number of URL types, the total number of specific URL requests per unit time of all users, the total number of URL requests per unit time of all users, and the ratio of the total number of URL requests to the number of URL types per unit time of all users.
  • the unit time may be 1 second, and the total number of users refers to all users accessing the access matrix pool.
  • the user access portrait matrix describes the user's access habits from multiple dimensions. Therefore, according to the user access portrait matrix, the user's recent access data included in the user access sequence can be studied and judged to determine whether the access is normal. .
  • judging whether the current visit conforms to the user's visit habit based on the user visit sequence and the user portrait matrix may specifically include:
  • Determine the current limit range of each dimension according to the user access portrait matrix obtain the values corresponding to each dimension of the user access portrait matrix according to the user access sequence; determine whether the current visit is normal by judging whether the value of each dimension is within the current limit range access.
  • the current limit range is less than 2 times, and the total number of times that user A requests within 1 second
  • the limit range for the total number of URL requests is less than 5 times
  • the limit range for the total number of times all users request a specific URL within 1 second is less than 1000 times, and so on.
  • the current limit range of each dimension can be obtained: less than 2; less than 5; less than 1000.
  • the values corresponding to each dimension of the user access portrait matrix can be acquired correspondingly according to the user access sequence, for example: 1; 3; 489. It can be seen that at this time, all indicators have not exceeded the current limit range, which can be considered as normal access.
  • the judging rule can also be set as follows: if the access exceeds the limit range and does not exceed the preset threshold, it can also be considered as a normal access. You can also set the judgment rule as follows: set weights for each dimension, and perform weighted calculations based on weights and whether they exceed the current limit range (or the degree of exceeding the current limit range). If the final result does not exceed the set value, it can be considered normal access . This application does not specifically limit this.
  • the present application may further include: prioritizing multiple dimensions of the user portrait matrix according to dimension weights; judging whether the values of each dimension are in the corresponding within the current limit range; where, once it is judged that the current access is an abnormal access, there is no need to judge the subsequent priority dimension.
  • first and second are used for descriptive purposes only, and cannot be interpreted as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Thus, features defined as “first” and “second” may explicitly or implicitly include at least one of these features. In the description of the present invention, “plurality” means at least two, such as two, three, etc., unless otherwise specifically defined.
  • an embodiment of the present invention further provides a webpage access current limiting device, which is used to implement the webpage access current limiting method provided in any one of the above embodiments.
  • Fig. 2 is a schematic structural diagram of a webpage access current limiting device provided by an embodiment of the present invention.
  • device 20 includes:
  • the access storage module 201 is used to obtain the current access information sent by the host application when the user accesses the webpage service of the host application;
  • the access collection module 202 is configured to generate a user access sequence according to the current access information, and the user access sequence arranges the current access information of the user and the prior access information of a preset number of times in chronological order;
  • Visit the matrix pool 203 input 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 historical access data and includes access summary data of multiple dimensions;
  • the current limit calculation module 204 is used to obtain the corresponding user access profile matrix from the access matrix pool according to the user ID, and judge whether the current access conforms to the user access habit based on the user access sequence and the user profile matrix.
  • the current access information includes: user identifier, current service URL and time stamp.
  • the current limit calculation module 204 is also used to: determine the current limit range of each dimension according to the user access portrait matrix; obtain the values corresponding to each dimension of the user access portrait matrix according to the user access sequence; Whether the value of the dimension is within the limit range to determine whether the current visit is a normal visit.
  • the user access portrait matrix includes a user identifier and includes any one or more of the following dimensions: the total number of requests for a specific URL by the user per unit time, the total number of URL requests by the user per unit time, the total number of URL requests by the user per unit time, The ratio of the total number of URL requests to the number of URL types, the total number of specific URL requests per unit time of all users, the total number of URL requests per unit time of all users, and the ratio of the total number of URL requests to the number of URL types per unit time of all users.
  • an application tracking module 200 configured to set a tracking point at the entrance of the web service in the host application, so that when any one or more users access the web service, trigger the tracking point to generate a call request,
  • the call request includes the current access information
  • the result output module is used to reply the judgment result of the current access to the buried point of the host application, and when the application buried point module receives an abnormal access response, it will feed back the current limit reminder to the host application .
  • the access matrix pool 203 is also used to obtain the access matrix pool by summarizing the data of the user's historical access data in the time dimension and the space dimension respectively; where the time dimension refers to the access sequence of a single user.
  • Data induction, the spatial dimension refers to the data induction of concurrent access information of different users at the same time.
  • the current limit calculation module 204 is also used to: prioritize multiple dimensions of the user portrait matrix according to the dimension weights; determine whether the values of each dimension are within the corresponding current limit range according to the order of priority ; Wherein, once it is judged that the current access is an abnormal access, there is no need to judge the subsequent priority dimension.
  • Fig. 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 Fig. 1, the device includes: at least one processor; and, communicated with at least one processor A memory; wherein, the memory stores instructions executable by at least one processor, and the instructions are executed by at least one processor, so that the at least one processor can execute the methods described in the above-mentioned embodiments.
  • a non-volatile computer storage medium of a web page access current limiting method on which computer executable instructions are stored, and the computer executable instructions are configured to be executed when run by a processor: the above implementation The method described in the example.
  • the device, device, and computer-readable storage medium provided in the embodiments of the present application correspond to the method one-to-one. Therefore, the device, device, and computer-readable storage medium also have beneficial technical effects similar to their corresponding methods.
  • the beneficial technical effect of the method has been described in detail, therefore, the beneficial technical effect of the device, equipment and computer-readable storage medium will not be repeated here.
  • the embodiments of the present invention may be provided as methods, systems or computer program products. Accordingly, the present invention can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
  • a computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions
  • the device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
  • a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • Memory may include non-permanent storage in computer readable media, in the form of random access memory (RAM) and/or nonvolatile memory such as read-only memory (ROM) or flash RAM. Memory is an example of computer readable media.
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash random access memory
  • Computer-readable media including both permanent and non-permanent, removable and non-removable media, can be implemented by any method or technology for storage of information.
  • Information may be computer readable instructions, data structures, modules of a program, 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 tape cartridge, tape magnetic disk storage or other magnetic storage device or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
  • PRAM phase change memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • RAM random access memory
  • ROM read only memory
  • EEPROM Electrically Erasable Programmable Read-

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present invention provides a webpage access flow limiting method and apparatus, a system, and a computer-readable storage medium. The method comprises: when a user accesses a webpage 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, the user access sequence arranging the current access information of the user and previous access information of a preset number of times according to a time sequence; inputting the user access sequence into an access matrix pool to dynamically update a user access portrait matrix corresponding to each user, the user access portrait matrix being generated according to user historical access data and comprising access induction data of multiple dimensions; and obtaining a corresponding user access portrait matrix from the access matrix pool according to a user identifier, and determining, on the basis of the user access sequence and the user portrait matrix, whether the current access accords with a user access habit. By means of the method, the flow limiting range can be dynamically adjusted for different users by analyzing user access data, thereby realizing webpage access flow limiting.

Description

一种网页访问限流方法、装置及计算机可读存储介质A method, device, and computer-readable storage medium for web page access current limiting
本申请要求于2021年11月24日提交的、申请号为202111407417.6、标题为“一种网页访问限流方法、装置及计算机可读存储介质”的中国专利申请的优先权,该中国专利申请的公开内容以引用的方式并入本文。This application claims the priority of the Chinese patent application with the application number 202111407417.6 and titled "A method, device, and computer-readable storage medium for webpage access traffic limitation" filed on November 24, 2021. The Chinese patent application The disclosure is incorporated herein by reference.
技术领域technical field
本发明属于限流领域,具体涉及一种网页访问限流方法、装置及计算机可读存储介质。The invention belongs to the field of current limiting, and in particular relates to a webpage access current limiting method, device and computer-readable storage medium.
背景技术Background technique
本部分旨在为权利要求书中陈述的本发明的实施方式提供背景或上下文。此处的描述不因为包括在本部分中就承认是现有技术。This section is intended to provide a background or context for implementations of the invention that are recited in the claims. The descriptions herein are not admitted to be prior art by inclusion in this section.
在开发高并发系统时,一般通过限流可以很好地控制系统的每秒查询率,从而达到保护系统的目的。上述限流的目的是通过对并发访问进行限速,一旦达到一定的速率就可以拒绝服务、排队等待、降级等。When developing a high-concurrency system, generally the query rate per second of the system can be well controlled by current limiting, so as to achieve the purpose of protecting the system. The purpose of the above-mentioned current limiting is to limit the speed of concurrent access. Once a certain rate is reached, services can be denied, queued, downgraded, etc.
目前常用的限流算法有两种:计数器算法和令牌桶算法。前者通过滑动窗口结合计数器实现WEB访问限流,后者使用大小固定的令牌桶并以恒定的速率源源不断地产生令牌。如果令牌桶中存在令牌,则允许发送请求;而如果令牌桶中不存在令牌,则不允许发送请求。Currently, there are two commonly used current limiting algorithms: counter algorithm and token bucket algorithm. The former implements WEB access current limiting through a sliding window combined with a counter, while the latter uses a fixed-sized token bucket and continuously generates tokens at a constant rate. If the token exists in the token bucket, the request is allowed to be sent; if the token bucket does not exist, 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 token bucket algorithm, need to set the threshold in advance based on experience, lack of universality, and cannot be adjusted dynamically through data learning.
发明内容Contents of the invention
针对上述现有技术中存在的问题,提出了一种网页访问限流方法、装置及计算机可读存储介质,利用这种方法、装置及计算机可读存储介质,能够解决上述问题。Aiming at the above-mentioned problems existing in the prior art, a webpage access current limiting method, device and computer-readable storage medium are proposed, and the above-mentioned problems can be solved by using the method, device and computer-readable storage medium.
本发明提供了以下方案。The present invention provides the following solutions.
第一方面,提供一种网页访问限流方法,包括:当用户访问宿主应用的网页服务时,获取宿主应用发来的当前访问信息;根据当前访问信息生成用户访问序列,用户访问序列将用户的当前访问信息及预设次数的在先访问信息按时序排列;将用户访问序列输入访问矩阵池,以动态更新对应于各个用户的用户访问画像矩阵,用户访问画像矩阵根据用户历史访问数据 生成且包括多个维度的访问归纳数据;根据用户标识从访问矩阵池获取对应的用户访问画像矩阵,基于用户访问序列和用户画像矩阵判断当前访问是否符合用户访问习惯。In the first aspect, there is provided a webpage access current limiting method, including: when a user accesses a webpage 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, and the user access sequence combines the user's The current access information and the prior access information of the preset number of times are arranged in chronological order; the user access sequence is input into the access matrix pool to dynamically update the user access portrait matrix corresponding to each user. The user access portrait matrix is generated based on user historical access data and includes Multi-dimensional access summary data; obtain the corresponding user access portrait matrix from the access matrix pool according to the user ID, and judge whether the current visit conforms to the user's access habits based on the user access sequence and user portrait matrix.
在一种实施方式中,当前访问信息包括:用户标识、当前服务URL和时间戳。In one embodiment, the current access information includes: user identifier, current service URL and time stamp.
在一种实施方式中,基于用户访问序列和用户画像矩阵判断当前访问是否符合用户访问习惯,包括:根据用户访问画像矩阵确定各个维度的限流范围;根据用户访问序列获取对应于用户访问画像矩阵的各个维度的值;根据判断各个维度的值是否在限流范围内,以确定当前访问是否为正常访问。In one embodiment, judging whether the current visit conforms to the user's access habits based on the user access sequence and the user portrait matrix includes: determining the current limit range of each dimension according to the user access portrait matrix; obtaining the corresponding user access portrait matrix according to the user access sequence The value of each dimension; according to whether the value of each dimension is within the current limit range, to determine whether the current access is a normal access.
在一种实施方式中,用户访问画像矩阵包括用户标识且包含如下任意一种或多种维度:用户单位时间内对特定URL请求总次数、用户单位时间内的URL请求总次数、用户单位时间内的URL请求总数与URL种类数的比值、全量用户单位时间内的特定URL请求总次数、全量用户单位时间内的URL请求总次数、全量用户单位时间内的URL请求总数与URL种类数的比值。In one embodiment, the user access portrait matrix includes a user identifier and includes any one or more of the following dimensions: the total number of requests for a specific URL by the user per unit time, the total number of URL requests by the user per unit time, the total number of URL requests by the user per unit time, The ratio of the total number of URL requests to the number of URL types, the total number of specific URL requests per unit time of all users, the total number of URL requests per unit time of all users, and the ratio of the total number of URL requests to the number of URL types per unit time of all users.
在一种实施方式中,还包括:在宿主应用内的网页服务入口处设置埋点,使得任意一个或多个用户访问网页服务时触发埋点以生成调用请求,调用请求包括当前访问信息;将当前访问的判断结果应答至宿主应用的埋点处,且当埋点收到非正常访问的应答时,向宿主应用反馈限流提醒。In one embodiment, it also includes: setting a buried point at the webpage service entrance in the host application, so that when any one or more users access the webpage service, the buried 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 buried point of the host application, and when the buried point receives an abnormal access response, a current limit reminder is fed back to the host application.
在一种实施方式中,利用以下方法生成访问矩阵池:通过对用户历史访问数据分别进行时间维度和空间维度的数据归纳,得到访问矩阵池;其中,时间维度是指对单一用户的访问序列进行数据归纳,空间维度是指对同一时间不同用户并发的访问信息进行数据归纳。In one embodiment, the following method is used to generate the access matrix pool: the access matrix pool is obtained by summarizing the data of the user's historical access data in the time dimension and the space dimension respectively; where the time dimension refers to the access sequence of a single user. Data induction, the spatial dimension refers to the data induction of concurrent access information of different users at the same time.
在一种实施方式中,根据维度权重对用户画像矩阵的多个维度进行优先级排列;按照优先级顺序依次判断各个维度的值是否在对应的限流范围内;其中,一旦判断出当前访问是非正常访问,则无需对后续优先级维度进行判断。In one embodiment, multiple dimensions of the user portrait matrix are prioritized according to the dimension weights; whether the value of each dimension is within the corresponding current limit range is judged sequentially according to the priority order; wherein, once it is determined that the current access is right or wrong For normal access, there is no need to judge the subsequent priority dimension.
第二方面,提供一种网页访问限流装置,包括:访问收纳模块,用于当用户访问宿主应用的网页服务时,获取宿主应用发来的当前访问信息;访问归集模块,用于根据当前访问信息生成用户访问序列,用户访问序列将用户的当前访问信息及预设次数的在先访问信息按时序排列;访问矩阵池,将用户访问序列输入访问矩阵池,以动态更新对应于各个用户的用户访问画像矩阵,用户访问画像矩阵根据用户历史访问数据生成且包括多个维度的访问归纳数据;限流计算模块,用于根据用户标识从访问矩阵池获取对应的用户访问画像矩阵,基于用户访问序列和用户画像矩阵判断当前访问是否符合用户访问习惯。In the second aspect, a webpage access current limiting device is provided, including: an access storage module, used to obtain the current access information sent by the host application when the user accesses the webpage service of the host application; The access information generates a user access sequence, and the user access sequence arranges the user's current access information and the previous access information of the preset number of times in chronological order; the access matrix pool inputs the user access sequence into the access matrix pool to dynamically update the information corresponding to each user User access portrait matrix, the user access portrait matrix is generated based on user historical access data and includes access summary data of multiple dimensions; the current limiting calculation module is used to obtain the corresponding user access portrait matrix from the access matrix pool according to the user identification, based on user access The sequence and user portrait matrix determine whether the current visit conforms to the user's visit habits.
在一种实施方式中,当前访问信息包括:用户标识、当前服务URL和时间戳。In one embodiment, the current access information includes: user identifier, current service URL and time stamp.
在一种实施方式中,限流计算模块,还用于:根据用户访问画像矩阵确定各个维度的限流范围;根据用户访问序列获取对应于用户访问画像矩阵的各个维度的值;根据判断各个维度的值是否在限流范围内,以确定当前访问是否为正常访问。In one embodiment, the current limit calculation module is also used to: determine the current limit range of each dimension according to the user access portrait matrix; obtain the value corresponding to each dimension of the user access portrait matrix according to the user access sequence; judge each dimension according to Whether the value of is within the limit range to determine whether the current access is a normal access.
在一种实施方式中,用户访问画像矩阵包括用户标识且包含如下任意一种或多种维度:用户单位时间内对特定URL请求总次数、用户单位时间内的URL请求总次数、用户单位时间内的URL请求总数与URL种类数的比值、全量用户单位时间内的特定URL请求总次数、全量用户单位时间内的URL请求总次数、全量用户单位时间内的URL请求总数与URL种类数的比值。In one embodiment, the user access portrait matrix includes a user identifier and includes any one or more of the following dimensions: the total number of requests for a specific URL by the user per unit time, the total number of URL requests by the user per unit time, the total number of URL requests by the user per unit time, The ratio of the total number of URL requests to the number of URL types, the total number of specific URL requests per unit time of all users, the total number of URL requests per unit time of all users, and the ratio of the total number of URL requests to the number of URL types per unit time of all users.
在一种实施方式中,还包括:应用埋点模块,用于在宿主应用内的网页服务入口处设置埋点,使得任意一个或多个用户访问网页服务时触发埋点以生成调用请求,调用请求包括当前访问信息;结果输出模块,用于将当前访问的判断结果应答至宿主应用的埋点处,且当应用埋点模块收到非正常访问的应答时,向宿主应用反馈限流提醒。In one embodiment, it also includes: an application tracking module, which is used to set a tracking 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 tracking point is triggered to generate a calling request, and the calling The request includes the current access information; the result output module is used to reply the judgment result of the current access to the buried point of the host application, and when the application buried point module receives an abnormal access response, it will feed back a current limit reminder to the host application.
在一种实施方式中,访问矩阵池还用于:通过对用户历史访问数据分别进行时间维度和空间维度的数据归纳,得到访问矩阵池;其中,时间维度是指对单一用户的访问序列进行数据归纳,空间维度是指对同一时间不同用户并发的访问信息进行数据归纳。In one embodiment, the access matrix pool is also used to obtain the access matrix pool by summarizing the data of the user's historical access data in the time dimension and the space dimension respectively; Induction, the spatial dimension refers to the data induction of concurrent access information of different users at the same time.
在一种实施方式中,限流计算模块还用于:根据维度权重对用户画像矩阵的多个维度进行优先级排列;按照优先级顺序依次判断各个维度的值是否在对应的限流范围内;其中,一旦判断出当前访问是非正常访问,则无需对后续优先级维度进行判断。In one embodiment, the current limit calculation module is also used to: prioritize multiple dimensions of the user portrait matrix according to the dimension weights; determine whether the values of each dimension are within the corresponding current limit range according to the order of priority; Wherein, once it is judged that the current access is an abnormal access, there is no need to judge the subsequent priority dimension.
第三方面,提供一种网页访问限流装置,包括:至少一个处理器;以及,与至少一个处理器通信连接的存储器;其中,存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行:如第一方面的方法。In a third aspect, there is provided a webpage access current limiting device, including: at least one processor; and a memory connected to the at least one processor in communication; wherein, the memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor. Executed by a processor, so that at least one processor can execute: the method of the first aspect.
第四方面,提供一种计算机可读存储介质,计算机可读存储介质存储有程序,当程序被多核处理器执行时,使得多核处理器执行如第一方面的方法。In a fourth aspect, a computer-readable storage medium is provided. 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 in the first aspect.
本申请实施例采用的上述至少一个技术方案能够达到以下有益效果:本实施例中,无需事先设置阈值,能够实现基于根据用户历史访问数据生成且例如当前用户数据而动态更新的访问矩阵池判断是否需要对用户当前对网页服务的访问进行限流。The above-mentioned at least one technical solution adopted in the embodiment of the present application can achieve the following beneficial effects: In this embodiment, it is not necessary to set a threshold in advance, and it is possible to judge whether to Current access to web services by users needs to be limited.
应当理解,上述说明仅是本发明技术方案的概述,以便能够更清楚地了解本发明的技术手段,从而可依照说明书的内容予以实施。为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举例说明本发明的具体实施方式。It should be understood that the above description is only an overview of the technical solution of the present invention, so as to understand the technical means of the present invention more clearly, and thus implement it according to the contents of the description. In order to make the above and other objects, features and advantages of the present invention more comprehensible, specific embodiments of the present invention are illustrated below.
附图说明Description of drawings
通过阅读下文的示例性实施例的详细描述,本领域普通技术人员将明白本文所述的优点和益处以及其他优点和益处。附图仅用于示出示例性实施例的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的标号表示相同的部件。在附图中:The advantages and benefits described herein, as well as other advantages and benefits, will be apparent to those of ordinary skill in the art upon reading the following detailed description of the exemplary embodiments. The drawings are only for the purpose of illustrating exemplary embodiments and are not to be considered as limiting the invention. Also throughout the drawings, the same reference numerals are used to denote the same parts. In the attached picture:
图1为根据本发明一实施例的网页访问限流方法的流程示意图;FIG. 1 is a schematic flow diagram of a webpage access current limiting method according to an embodiment of the present invention;
图2为根据本发明一实施例的网页访问限流装置的结构示意图;FIG. 2 is a schematic structural diagram of a webpage access current limiting device according to an embodiment of the present invention;
图3为根据本发明又一实施例的网页访问限流装置的结构示意图。FIG. 3 is a schematic structural diagram of a device for limiting webpage access traffic according to another embodiment of the present invention.
在附图中,相同或对应的标号表示相同或对应的部分。In the drawings, the same or corresponding reference numerals denote the same or corresponding parts.
具体实施方式Detailed ways
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。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 drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for 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 "comprising" or "having" are intended to indicate the existence of the features, numbers, steps, acts, components, parts or combinations thereof disclosed in the specification, and do not It is intended to exclude the possibility of the existence of one or more other features, figures, steps, acts, parts, 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; "and/or" in this article is just an association relationship describing associated objects, indicating that there can be three relationships, For example, A and/or B may mean that A exists alone, A and B exist simultaneously, 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 specifying the number of indicated technical features. Thus, a feature defined as "first", "second", etc. may expressly or implicitly include one or more of that feature. In the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
本申请中的所有代码都是示例性的,本领域技术人员根据所使用的编程语言,具体的需求和个人习惯等因素会在不脱离本申请的思想的条件下想到各种变型。All codes in this application are exemplary, and those skilled in the art will think of various modifications without departing from the idea of this application according to factors such as the programming language used, specific requirements, and personal habits.
另外还需要说明的是,在不冲突的情况下,本发明中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本发明。In addition, it should be noted that, in the case of no conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and examples.
本申请提出一种网页访问限流方法,具体包括:当用户访问宿主应用的网页服务时,获取宿主应用发来的当前访问信息;根据当前访问信息生成用户访问序列,用户访问序列将用户的当前访问信息及预设次数的在先访问信息按时序排列;将用户访问序列输入访问矩阵 池,以动态更新对应于各个用户的用户访问画像矩阵,用户访问画像矩阵根据用户历史访问数据生成且包括多个维度的访问归纳数据;根据用户标识从访问矩阵池获取对应的用户访问画像矩阵,基于用户访问序列和用户画像矩阵判断当前访问是否符合用户访问习惯。由此可以通过分析用户访问数据可实现针对不同用户的动态调整限流阈值,来实现网页访问限流。This application proposes a webpage access flow limiting method, which specifically includes: when a user accesses the webpage service of the host application, obtains the current access information sent by the host application; generates a user access sequence according to the current access information, and the user access sequence combines the user's current The access information and the prior access information of the preset times are arranged in chronological order; the user access sequence is input into the access matrix pool to dynamically update the user access portrait matrix corresponding to each user. The user access portrait matrix is generated based on user historical access data and includes multiple Access summary data of three dimensions; obtain the corresponding user access portrait matrix from the access matrix pool according to the user ID, and judge whether the current visit conforms to the user's access habits based on the user access sequence and user portrait matrix. Therefore, by analyzing the user access data, the dynamic adjustment of the current limiting threshold for different users can be realized, so as to realize the web page access current limiting.
图1为根据本申请一实施例的一种网页访问限流方法的流程示意图,用于对非正常访问进行限流,在该流程中,从设备角度而言,执行主体可以是一个或者多个电子设备;从程序角度而言,执行主体相应地可以是搭载于这些电子设备上的程序。Fig. 1 is a schematic flow diagram of a web page access flow limiting method according to an embodiment of the present application, which is used to limit the flow of abnormal access. In this flow, from the perspective of equipment, the execution subject can be one or more Electronic equipment; from a program perspective, the execution subject may be a program carried on these electronic equipment.
如图1所示,本实施例提供的方法可以包括以下步骤:As shown in Figure 1, the method provided in this embodiment may include the following steps:
S101、当用户访问宿主应用的网页服务时,获取宿主应用发来的当前访问信息;S101. Obtain current access information sent by the host application when the user accesses the webpage service of the host application;
在一种实施方式中,当前访问信息包括:用户标识、当前服务URL和时间戳。例如,可以是(用户A,url1,时间戳10)。In one embodiment, the current access information includes: user identifier, current service URL and time stamp. For example, it could be (userA, url1, timestamp 10).
在一种实施方式中,为了更无感地启动上述限流方法,还包括:在宿主应用内的网页服务入口处设置埋点,使得任意一个或多个用户访问网页服务时触发埋点以生成调用请求,调用请求包括当前访问信息。In one embodiment, in order to start the above current limiting method more insensitively, it also includes: setting a buried point at the web service entrance in the host application, so that when any one or more users access the web service, trigger the buried point to generate A call request, the call request includes current access information.
例如,可以在需要执行限流研判和处置的宿主应用内设置埋点,具体可以位于宿主应用的网页服务入口,当宿主应用的网页服务被调用后触发埋点,第一时间以同步方式对网页限流方法发起调用并接受其反馈结果。For example, you can set a buried point in the host application that needs to perform current limiting analysis and processing. Specifically, it can be located at the web service entrance of the host application. The current limiting method initiates a call and receives its feedback result.
其中,可以通过对宿主应用提供HTTP服务,以接收宿主应用通过触发应用埋点而发送的调用请求,该调用请求中可以包括用户访问网页服务的当前访问信息。Wherein, an HTTP service may be provided to the host application to receive a call request sent by the host application by triggering application embedding, and the call request may include current access information of the user's access to the webpage service.
S102、根据当前访问信息生成用户访问序列,用户访问序列将用户的当前访问信息及预设次数的在先访问信息按时序排列;S102. Generate a user access sequence according to the current access information, and the user access sequence arranges the user's current access information and prior access information of preset times in time sequence;
其中,当前访问信息可以包括(用户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 the conversion may include [(user A, url1, timestamp 1), (user A, url2, timestamp 2), ..., (user A, url1, timestamp 10)], where the number of user access sequence information can be set, such as 10, and then the current access information is used as the last sequence element to extract the previous 9 times of user A Information is accessed and assembled into a chronological sequence of user accesses.
可以理解,如当前访问之前,用户发生的在先访问不满预设数量或者并未发生在先访问,也可以生产少于预设元素的用户访问序列。It can be understood that, if the previous visits by the user are less than the preset number or no previous visits occur before the current visit, a user visit sequence less than the preset elements may also be produced.
例如,用户A在一秒内连续点击获取验证码按钮3次,其中获取验证码对应url为/getAuthCode,则三次请求分别对应的url序列数据为:For example, if user A clicks the Get Verification Code button three times within one second, and the url corresponding to the verification code is /getAuthCode, then the url sequence data corresponding to the three requests are:
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. Input the user access sequence into the access matrix pool to dynamically update the user access portrait matrix corresponding to each user;
其中,用户访问画像矩阵根据用户历史访问数据生成且包括多个维度的访问归纳数据。例如,访问矩阵池基于实时不断输入的用户访问序列进行动态更新,在当前访问对应的用户访问数据输入之前,其已经通过在先输入的用户历史访问数据加工计算出用户访问矩阵以及用户访问习惯,由此可以滚动形成用户限流画像,以刻画用户在各个维度的访问归纳数据。Wherein, the user access portrait matrix is generated according to user historical access data and includes access summary data of multiple dimensions. For example, the access matrix pool is dynamically updated based on the continuously input user access sequence in real time. Before the user access data corresponding to the current access is input, it has calculated the user access matrix and user access habits through the processing of the previously input user historical access data. In this way, the user's traffic-limited portrait can be scrolled to describe the user's access summary data in various dimensions.
在一种实施方式中,为了生成访问矩阵池,还可以包括:通过对用户历史访问数据分别进行时间维度和空间维度的数据归纳,得到访问矩阵池;其中,时间维度是指对单一用户的访问序列进行数据归纳,空间维度是指对同一时间不同用户并发的访问信息进行数据归纳。最终形成访问矩阵池中的各个用户的用户访问画像矩阵,以此为依据对用户访问进行限流决策。In one embodiment, in order to generate the access matrix pool, it may also include: obtaining the access matrix pool by summarizing the data of the time dimension and the space dimension respectively on the historical access data of the user; wherein, the time dimension refers to the access to a single user The sequence is used for data induction, and the spatial dimension refers to the data induction for concurrent access information of different users at the same time. Finally, the user access portrait matrix of each user in the access matrix pool is formed, and based on this, the current limiting decision on user access is made.
在一种实施方式中,用户访问画像矩阵包括用户标识且包含如下任意一种或多种维度:用户单位时间内对特定URL请求总次数、用户单位时间内的URL请求总次数、用户单位时间内的URL请求总数与URL种类数的比值、全量用户单位时间内的特定URL请求总次数、全量用户单位时间内的URL请求总次数、全量用户单位时间内的URL请求总数与URL种类数的比值。In one embodiment, the user access portrait matrix includes a user identifier and includes any one or more of the following dimensions: the total number of requests for a specific URL by the user per unit time, the total number of URL requests by the user per unit time, the total number of URL requests by the user per unit time, The ratio of the total number of URL requests to the number of URL types, the total number of specific URL requests per unit time of all users, the total number of URL requests per unit time of all users, and the ratio of the total number of URL requests to the number of URL types per unit time of all users.
其中,单位时间可以是1秒,全量用户是指接入访问矩阵池的全部用户。Wherein, the unit time may be 1 second, and the total number of users refers to all users accessing the access matrix pool.
可以理解,可以根据实际业务场景维度自行设计上述维度,本申请对此不作具体限制。It can be understood that the above dimensions can be designed according to the dimensions of actual business scenarios, and this application does not specifically limit this.
S104、根据用户标识从访问矩阵池获取对应的用户访问画像矩阵,基于用户访问序列和用户画像矩阵判断当前访问是否符合用户访问习惯。S104. Obtain the corresponding user access profile matrix from the access matrix pool according to the user ID, and judge whether the current access conforms to the user's access habits based on the user access sequence and the user profile matrix.
可以理解,用户访问画像矩阵从多个维度刻画了用户的访问习惯,由此,可以根据用户访问画像矩阵来对用户访问序列中包含的用户最近几次的访问数据进行研判,以判断访问是否正常。It can be understood that the user access portrait matrix describes the user's access habits from multiple dimensions. Therefore, according to the user access portrait matrix, the user's recent access data included in the user access sequence can be studied and judged to determine whether the access is normal. .
进一步地,也可以根据用户访问画像矩阵来对当前时间的多个用户并发生成的多个用户访问序列进行研判,以判断多个用户的访问是否正常。Furthermore, it is also possible to study and judge multiple user access sequences generated concurrently by multiple users at the current time according to the user access portrait matrix, so as to determine whether the access of multiple users is normal.
在一种实施方式中,S104中的基于用户访问序列和用户画像矩阵判断当前访问是否符合用户访问习惯,具体可以包括:In one embodiment, in S104, judging whether the current visit conforms to the user's visit habit based on the user visit sequence and the user portrait matrix may specifically include:
根据用户访问画像矩阵确定各个维度的限流范围;根据用户访问序列获取对应于用户访问画像矩阵的各个维度的值;根据判断各个维度的值是否在限流范围内,以确定当前访问是否为正常访问。Determine the current limit range of each dimension according to the user access portrait matrix; obtain the values corresponding to each dimension of the user access portrait matrix according to the user access sequence; determine whether the current visit is normal by judging whether the value of each dimension is within the current limit range access.
例如,如根据用户A的用户访问画像矩阵确定该用户A在1秒内对特定URL请求(点击获取验证码getAuthCode)总次数的限流范围为小于2次、该用户A在1秒内的全部URL请求总次数的限流范围为小于5次、全量用户在1秒内对特定URL请求(点击获取验证码getAuthCode)总次数的限流范围为小于1000次,等等。那么可以获取各个维度的限流范围为:小于2;小于5;小于1000。基于此,可以对应根据用户访问序列获取对应于用户访问画像矩阵的各个维度的值,比如为:1;3;489。可以看出,此时各项指标都未超过限流范围,可以认为是正常访问。For example, if it is determined according to user A's user access portrait matrix that the total number of times that user A requests a specific URL (click to obtain the verification code getAuthCode) within 1 second, the current limit range is less than 2 times, and the total number of times that user A requests within 1 second The limit range for the total number of URL requests is less than 5 times, the limit range for the total number of times all users request a specific URL within 1 second (click to get the verification code getAuthCode) is less than 1000 times, and so on. Then the current limit range of each dimension can be obtained: less than 2; less than 5; less than 1000. Based on this, the values corresponding to each dimension of the user access portrait matrix can be acquired correspondingly according to the user access sequence, for example: 1; 3; 489. It can be seen that at this time, all indicators have not exceeded the current limit range, which can be considered as normal access.
可选地,还可以将判断规则设置为:如果超过限流范围不超过预设阈值时,也可以认为是正常访问。还可以将判断规则设置为:为每个维度设置权重,基于权重、是否超过限流范围(或者超过限流范围的程度)进行加权计算,如最终结果未超过设定值即可以认为是正常访问。本申请对此不作具体限制。Optionally, the judging rule can also be set as follows: if the access exceeds the limit range and does not exceed the preset threshold, it can also be considered as a normal access. You can also set the judgment rule as follows: set weights for each dimension, and perform weighted calculations based on weights and whether they exceed the current limit range (or the degree of exceeding the current limit range). If the final result does not exceed the set value, it can be considered normal access . This application does not specifically limit this.
在一种实施方式中,为了减少不必要的计算量,本申请还可以包括:根据维度权重对用户画像矩阵的多个维度进行优先级排列;按照优先级顺序依次判断各个维度的值是否在对应的限流范围内;其中,一旦判断出当前访问是非正常访问,则无需对后续优先级维度进行判断。In one embodiment, in order to reduce unnecessary calculations, the present application may further include: prioritizing multiple dimensions of the user portrait matrix according to dimension weights; judging whether the values of each dimension are in the corresponding within the current limit range; where, once it is judged that the current access is an abnormal access, there is no need to judge the subsequent priority dimension.
在获取判断当前访问是否符合用户访问习惯的判断结果之后,将当前访问的判断结果应答至宿主应用的埋点处,且当埋点收到非正常访问的应答时,向宿主应用反馈限流提醒。比如提醒需执行丢弃请求、切断链接、告警等处理。After obtaining the judgment result of judging whether the current visit conforms to the user's access habits, reply the judgment result of the current visit to the buried point of the host application, and when the buried point receives an abnormal access response, feedback the current limit reminder to the host application . For example, reminders need to perform processing such as discarding requests, cutting links, and alerting.
在本说明书的描述中,参考术语“一些可能的实施方式”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。In the description of this specification, descriptions referring to the terms "some possible implementations", "some embodiments", "examples", "specific examples", or "some examples" mean that the descriptions described in conjunction with the embodiments or examples A particular feature, structure, material, or characteristic is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the described specific features, structures, materials or characteristics may be combined in any suitable manner in any one or more embodiments or examples. In addition, those skilled in the art can combine and combine different embodiments or examples and features of different embodiments or examples described in this specification without conflicting with each other.
此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或 者隐含地包括至少一个该特征。在本发明的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。In addition, the terms "first" and "second" are used for descriptive purposes only, and cannot be interpreted as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Thus, features defined as "first" and "second" may explicitly or implicitly include at least one of these features. In the description of the present invention, "plurality" means at least two, such as two, three, etc., unless otherwise specifically defined.
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本发明的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本发明的实施例所属技术领域的技术人员所理解。Any process or method descriptions in flowcharts or otherwise described herein may be understood to represent modules, segments or portions of code comprising one or more executable instructions for implementing specific logical functions or steps of the process , and the scope of preferred embodiments of the invention includes alternative implementations in which functions may be performed out of the order shown or discussed, including substantially concurrently or in reverse order depending on the functions involved, which shall It is understood by those skilled in the art to which the embodiments of the present invention pertain.
关于本申请实施例的方法流程图,将某些操作描述为以一定顺序执行的不同的步骤。这样的流程图属于说明性的而非限制性的。可以将在本文中所描述的某些步骤分组在一起并且在单个操作中执行、可以将某些步骤分割成多个子步骤、并且可以以不同于在本文中所示出的顺序来执行某些步骤。可以由任何电路结构和/或有形机制(例如,由在计算机设备上运行的软件、硬件(例如,处理器或芯片实现的逻辑功能)等、和/或其任何组合)以任何方式来实现在流程图中所示出的各个步骤。Regarding the method flow chart of the embodiment of the present application, certain operations are described as different steps performed in a certain order. Such flowcharts are illustrative and not restrictive. Certain steps described herein can be grouped together and performed in a single operation, can be divided into multiple sub-steps, and can be performed in an order different than that shown herein . It 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, logical functions implemented by a processor or a chip), etc., and/or any combination thereof). The individual steps shown in the flowchart.
基于相同的技术构思,本发明实施例还提供一种网页访问限流装置,用于执行上述任一实施例所提供的网页访问限流方法。图2为本发明实施例提供的一种网页访问限流装置结构示意图。Based on the same technical concept, an embodiment of the present invention further provides a webpage access current limiting device, which is used to implement the webpage access current limiting method provided in any one of the above embodiments. Fig. 2 is a schematic structural diagram of a webpage access current limiting device provided by an embodiment of the present invention.
如图2所示,装置20包括:As shown in Figure 2, device 20 includes:
访问收纳模块201,用于当用户访问宿主应用的网页服务时,获取宿主应用发来的当前访问信息;The access storage module 201 is used to obtain the current access information sent by the host application when the user accesses the webpage service of the host application;
访问归集模块202,用于根据当前访问信息生成用户访问序列,用户访问序列将用户的当前访问信息及预设次数的在先访问信息按时序排列;The access collection module 202 is configured to generate a user access sequence according to the current access information, and the user access sequence arranges the current access information of the user and the prior access information of a preset number of times in chronological order;
访问矩阵池203,将用户访问序列输入访问矩阵池,以动态更新对应于各个用户的用户访问画像矩阵,用户访问画像矩阵根据用户历史访问数据生成且包括多个维度的访问归纳数据;Visit the matrix pool 203, input 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 historical access data and includes access summary data of multiple dimensions;
限流计算模块204,用于根据用户标识从访问矩阵池获取对应的用户访问画像矩阵,基于用户访问序列和用户画像矩阵判断当前访问是否符合用户访问习惯。The current limit calculation module 204 is used to obtain the corresponding user access profile matrix from the access matrix pool according to the user ID, and judge whether the current access conforms to the user access habit based on the user access sequence and the user profile matrix.
在一种实施方式中,当前访问信息包括:用户标识、当前服务URL和时间戳。In one embodiment, the current access information includes: user identifier, current service URL and time stamp.
在一种实施方式中,限流计算模块204,还用于:根据用户访问画像矩阵确定各个维度的限流范围;根据用户访问序列获取对应于用户访问画像矩阵的各个维度的值;根据判断各个维度的值是否在限流范围内,以确定当前访问是否为正常访问。In one embodiment, the current limit calculation module 204 is also used to: determine the current limit range of each dimension according to the user access portrait matrix; obtain the values corresponding to each dimension of the user access portrait matrix according to the user access sequence; Whether the value of the dimension is within the limit range to determine whether the current visit is a normal visit.
在一种实施方式中,用户访问画像矩阵包括用户标识且包含如下任意一种或多种维度:用户单位时间内对特定URL请求总次数、用户单位时间内的URL请求总次数、用户单位时间内的URL请求总数与URL种类数的比值、全量用户单位时间内的特定URL请求总次数、全量用户单位时间内的URL请求总次数、全量用户单位时间内的URL请求总数与URL种类数的比值。In one embodiment, the user access portrait matrix includes a user identifier and includes any one or more of the following dimensions: the total number of requests for a specific URL by the user per unit time, the total number of URL requests by the user per unit time, the total number of URL requests by the user per unit time, The ratio of the total number of URL requests to the number of URL types, the total number of specific URL requests per unit time of all users, the total number of URL requests per unit time of all users, and the ratio of the total number of URL requests to the number of URL types per unit time of all users.
在一种实施方式中,还包括:应用埋点模块200,用于在宿主应用内的网页服务入口处设置埋点,使得任意一个或多个用户访问网页服务时触发埋点以生成调用请求,调用请求包括当前访问信息;结果输出模块,用于将当前访问的判断结果应答至宿主应用的埋点处,且当应用埋点模块收到非正常访问的应答时,向宿主应用反馈限流提醒。In one embodiment, it also includes: an application tracking module 200, configured to set a tracking point at the entrance of the web service in the host application, so that when any one or more users access the web service, trigger the tracking point to generate a call request, The call request includes the current access information; the result output module is used to reply the judgment result of the current access to the buried point of the host application, and when the application buried point module receives an abnormal access response, it will feed back the current limit reminder to the host application .
在一种实施方式中,访问矩阵池203还用于:通过对用户历史访问数据分别进行时间维度和空间维度的数据归纳,得到访问矩阵池;其中,时间维度是指对单一用户的访问序列进行数据归纳,空间维度是指对同一时间不同用户并发的访问信息进行数据归纳。In one embodiment, the access matrix pool 203 is also used to obtain the access matrix pool by summarizing the data of the user's historical access data in the time dimension and the space dimension respectively; where the time dimension refers to the access sequence of a single user. Data induction, the spatial dimension refers to the data induction of concurrent access information of different users at the same time.
在一种实施方式中,限流计算模块204还用于:根据维度权重对用户画像矩阵的多个维度进行优先级排列;按照优先级顺序依次判断各个维度的值是否在对应的限流范围内;其中,一旦判断出当前访问是非正常访问,则无需对后续优先级维度进行判断。In one embodiment, the current limit calculation module 204 is also used to: prioritize multiple dimensions of the user portrait matrix according to the dimension weights; determine whether the values of each dimension are within the corresponding current limit range according to the order of priority ; Wherein, once it is judged that the current access is an abnormal access, there is no need to judge the subsequent priority dimension.
需要说明的是,本申请实施例中的装置可以实现前述方法的实施例的各个过程,并达到相同的效果和功能,这里不再赘述。It should be noted that the device in the embodiment of the present application can realize each process of the foregoing method embodiment, and achieve the same effect and function, which will not be repeated here.
图3为根据本申请一实施例的网页访问限流装置,用于执行图1所示出的网页访问限流方法,该装置包括:至少一个处理器;以及,与至少一个处理器通信连接的存储器;其中,存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行上述实施例所述的方法。Fig. 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 Fig. 1, the device includes: at least one processor; and, communicated with at least one processor A memory; wherein, the memory stores instructions executable by at least one processor, and the instructions are executed by at least one processor, so that the at least one processor can execute the methods described in the above-mentioned embodiments.
根据本申请的一些实施例,提供了网页访问限流方法的非易失性计算机存储介质,其上存储有计算机可执行指令,该计算机可执行指令设置为在由处理器运行时执行:上述实施例所述的方法。According to some embodiments of the present application, there is provided a non-volatile computer storage medium of a web page access current limiting method, on which computer executable instructions are stored, and the computer executable instructions are configured to be executed when run by a processor: the above implementation The method described in the example.
本申请中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置、设备和计算机可读存储介质实施例而言,由于其基本相似于方法实施例,所以其描述进行了简化,相关之处可参见方法实施例的部分说明即可。Each embodiment in the present application is described in a progressive manner, the same and similar parts of each embodiment can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the apparatus, equipment and computer-readable storage medium embodiments, since they are basically similar to the method embodiments, their descriptions are simplified, and for relevant parts, please refer to part of the description of the method embodiments.
本申请实施例提供的装置、设备和计算机可读存储介质与方法是一一对应的,因此,装置、设备和计算机可读存储介质也具有与其对应的方法类似的有益技术效果,由于上面已 经对方法的有益技术效果进行了详细说明,因此,这里不再赘述装置、设备和计算机可读存储介质的有益技术效果。The device, device, and computer-readable storage medium provided in the embodiments of the present application correspond to the method one-to-one. Therefore, the device, device, and computer-readable storage medium also have beneficial technical effects similar to their corresponding methods. The beneficial technical effect of the method has been described in detail, therefore, the beneficial technical effect of the device, equipment and computer-readable storage medium will not be repeated here.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present invention may be provided as methods, systems or computer program products. Accordingly, the present invention can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow diagram procedure or procedures and/or block diagram procedures or blocks.
在一个典型的配置中,计算设备包括一个或多个处理器(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 storage in computer readable media, in the form of random access memory (RAM) and/or nonvolatile memory such as read-only memory (ROM) or flash RAM. Memory is an example of computer readable media.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他 磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。此外,尽管在附图中以特定顺序描述了本发明方法的操作,但是,这并非要求或者暗示必须按照该特定顺序来执行这些操作,或是必须执行全部所示的操作才能实现期望的结果。附加地或备选地,可以省略某些步骤,将多个步骤合并为一个步骤执行,和/或将一个步骤分解为多个步骤执行。Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can be implemented by any method or technology for storage of information. Information may be computer readable instructions, data structures, modules of a program, 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 tape cartridge, tape magnetic disk storage or other magnetic storage device or any other non-transmission medium that can be used to store information that can be accessed by a computing device. In addition, while operations of the methods of the present invention are depicted in the figures in a particular order, there is no requirement or implication that these operations must be performed in that particular order, or that all illustrated operations must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step for execution, and/or one step may be decomposed into multiple steps for execution.
虽然已经参考若干具体实施方式描述了本发明的精神和原理,但是应该理解,本发明并不限于所公开的具体实施方式,对各方面的划分也不意味着这些方面中的特征不能组合以进行受益,这种划分仅是为了表述的方便。本发明旨在涵盖所附权利要求的精神和范围内所包括的各种修改和等同布置。Although the spirit and principles of the invention have been described with reference to a number of specific embodiments, it should be understood that the invention is not limited to the specific embodiments disclosed, nor does division of aspects imply that features in these aspects cannot be combined to achieve optimal performance. Benefit, this division is only for the convenience of expression. The present invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (16)

  1. 一种网页访问限流方法,包括:A webpage access current limiting method, comprising:
    当用户访问宿主应用的网页服务时,获取所述宿主应用发来的当前访问信息;When the user accesses the webpage service of the host application, obtain the current access information sent by the host application;
    根据所述当前访问信息生成用户访问序列,所述用户访问序列将所述用户的所述当前访问信息及预设次数的在先访问信息按时序排列;generating a user access sequence according to the current access information, the user access sequence arranges the current access information of the user and the prior access information of a preset number of times in chronological order;
    将所述用户访问序列输入访问矩阵池,以动态更新对应于各个用户的用户访问画像矩阵,所述用户访问画像矩阵根据用户历史访问数据生成且包括多个维度的访问归纳数据;Input 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 user historical access data and includes access summary data of multiple dimensions;
    根据所述用户标识从所述访问矩阵池获取对应的所述用户访问画像矩阵,基于所述用户访问序列和所述用户画像矩阵判断当前访问是否符合所述用户访问习惯。Obtain the corresponding user access profile matrix from the access matrix pool according to the user identifier, and judge whether the current access conforms to the user access habit based on the user access sequence and the user profile matrix.
  2. 根据权利要求1所述的方法,其中,所述当前访问信息包括:用户标识、当前服务URL和时间戳。The method according to claim 1, wherein the current access information includes: user identifier, current service URL and time stamp.
  3. 根据权利要求1或2所述的方法,其中,基于所述用户访问序列和所述用户画像矩阵判断当前访问是否符合所述用户访问习惯,包括:The method according to claim 1 or 2, wherein, based on the user access sequence and the user portrait matrix, judging whether the current access conforms to the user access habits includes:
    根据所述用户访问画像矩阵确定各个维度的限流范围;Determine the current limit range of each dimension according to the user access portrait matrix;
    根据所述用户访问序列获取对应于所述用户访问画像矩阵的各个维度的值;Obtaining values corresponding to each dimension of the user access portrait matrix according to the user access sequence;
    根据判断所述各个维度的值是否在所述限流范围内,以确定所述当前访问是否为正常访问。Whether the current access is a normal access is determined based on judging whether the values of the various dimensions are within the current limit range.
  4. 根据权利要求1-3中任一项所述的方法,其中,所述用户访问画像矩阵包括用户标识且包含如下任意一种或多种维度的访问归纳数据:The method according to any one of claims 1-3, wherein the user access portrait matrix includes user identification and includes access summary data of any one or more of the following dimensions:
    用户单位时间内对特定URL请求总次数、用户单位时间内的URL请求总次数、用户单位时间内的URL请求总数与URL种类数的比值、全量用户单位时间内的特定URL请求总次数、全量用户单位时间内的URL请求总次数、全量用户单位时间内的URL请求总数与URL种类数的比值。The total number of specific URL requests per user unit time, the total number of URL requests per user unit time, the ratio of the total number of URL requests per user unit time to the number of URL types, the total number of specific URL requests per unit time for all users, the total number of URL requests for all users The total number of URL requests per unit time, the ratio of the total number of URL requests per unit time by all users to the number of URL types.
  5. 根据权利要求1-4中任一项所所述的方法,其中,还包括:The method according to any one of claims 1-4, further comprising:
    在所述宿主应用内的网页服务入口处设置埋点,使得任意一个或多个用户访问所述网页服务时触发所述埋点以生成调用请求,所述调用请求包括所述当前访问信息;Setting a buried point at the entrance of the webpage service in the host application, so that when any one or more users access the webpage service, the buried point is triggered to generate a call request, and the call request includes the current access information;
    将所述当前访问的判断结果应答至所述宿主应用的埋点处,且当所述埋点收到非正常访问的应答时,向所述宿主应用反馈限流提醒。Respond the judgment result of the current access to the buried point of the host application, and when the buried point receives an abnormal access response, feed back a current limit reminder to the host application.
  6. 根据权利要求1-5中任一项所所述的方法,其中,利用以下方法生成所述访问矩阵池:The method according to any one of claims 1-5, wherein the access matrix pool is generated using the following method:
    通过对用户历史访问数据分别进行时间维度和空间维度的数据归纳,得到所述访问矩阵池;Obtain the access matrix pool by summarizing the historical access data of the user respectively in the time dimension and the space dimension;
    其中,所述时间维度是指对单一用户的访问序列进行数据归纳,所述空间维度是指对同一时间不同用户并发的访问信息进行数据归纳。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 concurrent access information of different users at the same time.
  7. 根据权利要求3-6中任一项所所述的方法,其中,The method according to any one of claims 3-6, wherein,
    根据维度权重对所述用户画像矩阵的多个维度进行优先级排列;Prioritizing multiple dimensions of the user portrait matrix according to dimension weights;
    按照优先级顺序依次判断所述各个维度的值是否在对应的所述限流范围内;Determine whether the values of the various dimensions are within the corresponding current limiting range in sequence according to the order of priority;
    其中,一旦判断出所述当前访问是非正常访问,则无需对后续优先级维度进行判断。Wherein, once it is determined that the current access is an abnormal access, there is no need to determine the subsequent priority dimension.
  8. 一种网页访问限流装置,其中,包括:A webpage access current limiting device, including:
    访问收纳模块,用于当用户访问宿主应用的网页服务时,获取所述宿主应用发来的当前访问信息;The access storage module is used to obtain the current access information sent by the host application when the user accesses the web service of the host application;
    访问归集模块,用于根据所述当前访问信息生成用户访问序列,所述用户访问序列将所述用户的所述当前访问信息及预设次数的在先访问信息按时序排列;An access collection module, configured to generate a user access sequence according to the current access information, and the user access sequence arranges the current access information of the user and the prior access information of a preset number of times in chronological order;
    访问矩阵池,将所述用户访问序列输入访问矩阵池,以动态更新对应于各个用户的用户访问画像矩阵,所述用户访问画像矩阵根据用户历史访问数据生成且包括多个维度的访问归纳数据;Accessing the matrix pool, inputting 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 user historical access data and includes access summary data of multiple dimensions;
    限流计算模块,用于根据所述用户标识从所述访问矩阵池获取对应的所述用户访问画像矩阵,基于所述用户访问序列和所述用户画像矩阵判断当前访问是否符合所述用户访问习惯。A current limiting calculation module, configured to obtain the corresponding user access portrait matrix from the access matrix pool according to the user identifier, and judge whether the current visit conforms to the user access habits based on the user access sequence and the user portrait matrix .
  9. 根据权利要求8所述的装置,其中,所述当前访问信息包括:用户标识、当前服务URL和时间戳。The device according to claim 8, wherein the current access information includes: user identifier, current service URL and time stamp.
  10. 根据权利要求8或9所述的装置,其中,所述限流计算模块,还用于:The device according to claim 8 or 9, wherein the current limiting calculation module is also used for:
    根据所述用户访问画像矩阵确定各个维度的限流范围;Determine the current limit range of each dimension according to the user access portrait matrix;
    根据所述用户访问序列获取对应于所述用户访问画像矩阵的各个维度的值;Obtaining values corresponding to each dimension of the user access portrait matrix according to the user access sequence;
    根据判断所述各个维度的值是否在所述限流范围内,以确定所述当前访问是否为正常访问。Whether the current access is a normal access is determined based on judging whether the values of the various dimensions are within the current limit range.
  11. 根据权利要求8-10中任一项所所述的装置,其中,所述用户访问画像矩阵包括用户标识且包含如下任意一种或多种维度:The device according to any one of claims 8-10, wherein the user access profile matrix includes a user identifier and includes any one or more of the following dimensions:
    用户单位时间内对特定URL请求总次数、用户单位时间内的URL请求总次数、用户单位时间内的URL请求总数与URL种类数的比值、全量用户单位时间内的特定URL请求总次数、全量用户单位时间内的URL请求总次数、全量用户单位时间内的URL请求总数与URL种类数的比值。The total number of specific URL requests per user unit time, the total number of URL requests per user unit time, the ratio of the total number of URL requests per user unit time to the number of URL types, the total number of specific URL requests per unit time for all users, the total number of URL requests for all users The total number of URL requests per unit time, the ratio of the total number of URL requests per unit time by all users to the number of URL types.
  12. 根据权利要求8-11中任一项所所述的装置,其中,还包括:The device according to any one of claims 8-11, further comprising:
    应用埋点模块,用于在所述宿主应用内的网页服务入口处设置埋点,使得任意一个或多个用户访问所述网页服务时触发所述埋点以生成调用请求,所述调用请求包括所述当前访问信息;An application buried point module, configured to set a buried point at the entrance of the webpage service in the host application, so that when any one or more users access the webpage service, the buried point is triggered to generate a call request, and the call request includes said current access information;
    结果输出模块,用于将所述当前访问的判断结果应答至所述宿主应用的埋点处,且当所述应用埋点模块收到非正常访问的应答时,向所述宿主应用反馈限流提醒。The result output module is used to respond the judgment result of the current access to the buried point of the host application, and when the application buried point module receives a reply of abnormal access, feedback current limiting to the host application remind.
  13. 根据权利要求8-12中任一项所所述的装置,其中,所述访问矩阵池还用于:The device according to any one of claims 8-12, wherein the access matrix pool is further used for:
    通过对用户历史访问数据分别进行时间维度和空间维度的数据归纳,得到所述访问矩阵池;Obtain the access matrix pool by summarizing the historical access data of the user respectively in the time dimension and the space dimension;
    其中,所述时间维度是指对单一用户的访问序列进行数据归纳,所述空间维度是指对同一时间不同用户并发的访问信息进行数据归纳。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 concurrent access information of different users at the same time.
  14. 根据权利要求10-13中任一项所所述的装置,其中,所述限流计算模块还用于:The device according to any one of claims 10-13, wherein the current limiting calculation module is also used for:
    根据维度权重对所述用户画像矩阵的多个维度进行优先级排列;Prioritizing multiple dimensions of the user portrait matrix according to dimension weights;
    按照优先级顺序依次判断所述各个维度的值是否在对应的所述限流范围内;Determine whether the values of the various dimensions are within the corresponding current limiting range in sequence according to the order of priority;
    其中,一旦判断出所述当前访问是非正常访问,则无需对后续优先级维度进行判断。Wherein, once it is determined that the current access is an abnormal access, there is no need to determine the subsequent priority dimension.
  15. 一种网页访问限流装置,包括:A web page access current limiting device, comprising:
    至少一个处理器;以及,与至少一个处理器通信连接的存储器;其中,存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行:如权利要求1-7中任一项所述的方法。At least one processor; and, a memory connected in communication with 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 perform: The method according to any one of claims 1-7.
  16. 一种计算机可读存储介质,所述计算机可读存储介质存储有程序,当所述程序被多核处理器执行时,使得所述多核处理器执行如权利要求1-7中任一项所述的方法。A computer-readable storage medium, 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 according to any one of claims 1-7 method.
PCT/CN2022/117423 2021-11-24 2022-09-07 Webpage access flow limiting method and apparatus, and computer-readable storage medium WO2023093206A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111407417.6 2021-11-24
CN202111407417.6A CN113973087B (en) 2021-11-24 2021-11-24 Webpage access current limiting method and device and computer readable storage medium

Publications (1)

Publication Number Publication Date
WO2023093206A1 true WO2023093206A1 (en) 2023-06-01

Family

ID=79590248

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/117423 WO2023093206A1 (en) 2021-11-24 2022-09-07 Webpage access flow limiting method and apparatus, and computer-readable storage medium

Country Status (3)

Country Link
CN (1) CN113973087B (en)
TW (1) TW202321949A (en)
WO (1) WO2023093206A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
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

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9565196B1 (en) * 2015-11-24 2017-02-07 International Business Machines Corporation Trust level modifier
CN107465686A (en) * 2017-08-23 2017-12-12 杭州安恒信息技术有限公司 IP credit worthinesses computational methods and device based on the heterogeneous big data of network
CN107465648A (en) * 2016-06-06 2017-12-12 腾讯科技(深圳)有限公司 The recognition methods of warping apparatus and device
CN111552933A (en) * 2020-03-30 2020-08-18 西安交大捷普网络科技有限公司 Method and device for identifying abnormal login of account
CN111756702A (en) * 2020-05-29 2020-10-09 北京沃东天骏信息技术有限公司 Data security protection method, device, equipment and storage medium
CN113347205A (en) * 2021-06-30 2021-09-03 深圳前海微众银行股份有限公司 Method and device for detecting service access request
CN113973087A (en) * 2021-11-24 2022-01-25 中国银联股份有限公司 Webpage access current limiting method and device and computer readable storage medium

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107222426B (en) * 2016-03-21 2021-07-20 阿里巴巴集团控股有限公司 Flow control method, device and system
CN107783987B (en) * 2016-08-25 2022-03-04 腾讯科技(深圳)有限公司 Data processing method and device
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 阿里巴巴集团控股有限公司 The recognition methods of open platform abnormal data access and device
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
CN111966995A (en) * 2020-08-17 2020-11-20 福建工程学院 User permission dynamic control method and device based on user behavior and equipment
CN113645310A (en) * 2021-08-20 2021-11-12 北京高途云集教育科技有限公司 Data current limiting method and device, electronic equipment and readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9565196B1 (en) * 2015-11-24 2017-02-07 International Business Machines Corporation Trust level modifier
CN107465648A (en) * 2016-06-06 2017-12-12 腾讯科技(深圳)有限公司 The recognition methods of warping apparatus 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
CN111552933A (en) * 2020-03-30 2020-08-18 西安交大捷普网络科技有限公司 Method and device for identifying abnormal login of account
CN111756702A (en) * 2020-05-29 2020-10-09 北京沃东天骏信息技术有限公司 Data security protection method, device, equipment and storage medium
CN113347205A (en) * 2021-06-30 2021-09-03 深圳前海微众银行股份有限公司 Method and device for detecting service access request
CN113973087A (en) * 2021-11-24 2022-01-25 中国银联股份有限公司 Webpage access current limiting method and device and computer readable storage medium

Also Published As

Publication number Publication date
CN113973087A (en) 2022-01-25
TW202321949A (en) 2023-06-01
CN113973087B (en) 2024-01-05

Similar Documents

Publication Publication Date Title
US10554388B2 (en) Service execution method and device
US8667056B1 (en) Dynamic traffic management
WO2019192103A1 (en) Concurrent access control method and apparatus, terminal device, and medium
Guha et al. Large complex data: divide and recombine (d&r) with rhipe
CN113285883A (en) Access request current limiting method and device, electronic equipment and storage medium
EP3576036A1 (en) Service execution method and device
CN110033247B (en) Payment channel recommendation method and system
US9954880B2 (en) Protection via webpage manipulation
EP3058481B1 (en) Acceleration based on cached flows
WO2023093206A1 (en) Webpage access flow limiting method and apparatus, and computer-readable storage medium
US10812410B1 (en) Machine learning based signal generation
TW201807560A (en) Interface display method and apparatus
US10263908B1 (en) Performance management for query processing
US20150234883A1 (en) Method and system for retrieving real-time information
US20220014413A1 (en) Summarily conveying smart appliance statuses
US11449308B2 (en) Condensed spoken utterances for automated assistant control of an intricate application GUI
EP3952256A1 (en) Improved admission policies for queued website visitors
US20200012804A1 (en) Data Bookmark Distribution
TWI579708B (en) Method and apparatus for interacting with user data
EP3371715B1 (en) Generating a deferrable data flow
CN108287853B (en) Data relation analysis method and system
US11475510B2 (en) Method and server for generating modifiable portion of digital document
US11995379B2 (en) Condensed spoken utterances for automated assistant control of an intricate application GUI
CN117436120A (en) Data protection method and device
CN111143460A (en) Big data-based economic field data retrieval method and device and processor

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22897297

Country of ref document: EP

Kind code of ref document: A1