Processing method for access behavior of short chain in short message and related equipment

By detecting and isolating crawlers and supplier IPs, the authenticity of short-chain access behavior is ensured, and the problem of click data distortion in short-chain services is solved, preventing user information leakage, and improving the accuracy of user behavior analysis.

CN119211856APending Publication Date: 2024-12-27SHANGHAI SHUHE INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411342015.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

Click data in short-chain services are distorted due to the access behavior of crawlers and suppliers, which affects the accuracy of user behavior analysis and may disclose user information.

Method used

By detecting whether the requested IP is on the crawler IP blacklist or there is frequent access to invalid short chains, if it is a crawler IP, it will be redirected to the default page; if it is a supplier IP, it will be redirected to the default page; if it is a user IP, it will be redirected to the default page; if it is a user IP Then redirect to the correct page to ensure the authenticity of the click data and the security of user information.

Benefits of technology

Effectively identify and isolate non-user IPs, avoid their short-chain access behaviors contaminate real users' click data, prevent user information leakage, and improve the accuracy of user behavior analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119211856A_ABST
    Figure CN119211856A_ABST
Patent Text Reader

Abstract

The invention relates to a processing method for an access behavior of a short chain in a short message and related equipment. The method comprises the following steps: in response to a received short chain access request, obtaining a request IP, request time and a request short chain of the short chain access request; detecting whether the request IP is in a crawler IP blacklist or not and / or whether a behavior of frequently accessing an invalid short chain exists or not, and judging whether the request IP is a crawler IP or not based on a detection result; if the request IP is a crawler IP, redirecting to a default page; if the request IP is not the crawler IP, detecting whether the request IP is in a supplier IP blacklist and / or whether a behavior of frequently accessing different short chains exists, and judging whether the request IP is the supplier IP based on a detection result; if the request IP is the supplier IP, redirecting to a default page; and if the request IP is not the supplier IP, indicating that the request IP is the user IP, and redirecting to a correct page. According to the method and the device, the non-user IP can be accurately identified and redirected to the default page, so that the situation that click data of a real user is polluted by an access behavior of the non-user IP to a short chain is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method for processing access behavior of short links in text messages and related equipment. Background Art

[0002] Short links are a service that converts long URLs into short URLs. By simplifying the URL length, it is easier for users to share and spread links. The principle of short links is to convert long URLs into short identifiers (i.e. short links) through a mapping algorithm, and parse and redirect to the original URL when accessed.

[0003] Short link services usually provide functions such as click statistics and behavior analysis, which can help operators understand the access status of links. For example, when a user clicks on a short link of a URL on the user side, it is not the URL that is accessed but the short link server. After receiving the access, the short link server queries the long link corresponding to the short link from the database, and records the click IP of the short link in the database. Then, it returns a response to redirect to the long link to the user side. After receiving the response, the user side requests to access the long link instead. In some application scenarios, operators can send promotional text messages containing short links to users. Based on the click records of the short links, it can be known which text messages have been read by users, and corresponding promotion strategies can be implemented based on the analysis.

[0004] However, a text message sent to the user will pass through the text message provider. In order to block malicious text messages, the text message provider may read the text message content. If the text message contains short links, the text message provider may access the short links. The text message software provided by the user's related smart device provider (such as mobile phone provider) may also automatically identify short links in text messages in order to block malicious text messages. Some crawlers may also access short links in text messages. The above situation will cause the short link click data recorded by the short link service to contain both real user click data and click data generated by the various suppliers and crawlers accessing the short links. This will cause the short link click data to be distorted, which will affect the accuracy of subsequent user behavior analysis. In addition, the short links in text messages captured by crawlers may also leak user information. Summary of the invention

[0005] In view of the above-mentioned deficiencies or shortcomings, the present application provides a method and related equipment for processing access behavior of short links in text messages.

[0006] According to a first aspect, the present application provides a method for processing access behavior of a short link in a text message. In some embodiments, the method includes:

[0007] In response to receiving the short link access request, obtaining the request IP, request time and request short link of the short link access request;

[0008] Check whether the requesting IP is on the crawler IP blacklist and / or whether there is frequent access to invalid short links based on the requesting IP, request time, and request short links, and determine whether the requesting IP is a crawler IP based on the detection results;

[0009] If the request IP is a crawler IP, redirect to the default page;

[0010] If the requesting IP is not a crawler IP, check whether the requesting IP is on the supplier IP blacklist and / or whether there is frequent access to different short links based on the requesting IP, request time, and request short links, and determine whether the requesting IP is a supplier IP based on the detection results;

[0011] If the requesting IP is the provider IP, redirect to the default page;

[0012] If the requesting IP is not the provider IP, it means the requesting IP is the user IP, and then redirect to the correct page.

[0013] In some embodiments, detecting whether the requesting IP is in the crawler IP blacklist and / or whether there is a behavior of frequently accessing invalid short links according to the requesting IP, request time, and requesting short links, and determining whether the requesting IP is a crawler IP based on the detection result includes:

[0014] Check whether the requesting IP is in the crawler IP blacklist;

[0015] If the requesting IP is in the crawler IP blacklist, the requesting IP is determined to be a crawler IP;

[0016] If the requesting IP is not in the crawler IP blacklist, check whether the requested short link exists in the short link database;

[0017] If the requested short link exists in the short link database, it is determined that the requesting IP is not a crawler IP;

[0018] If the requested short link does not exist in the short link database, the request IP, request time and request short link are used to detect whether the request IP has frequently accessed invalid short links;

[0019] If the requesting IP frequently accesses invalid short links, the requesting IP is determined to be a crawler IP and is added to the crawler IP blacklist;

[0020] If the requesting IP does not frequently access invalid short links, it is determined that the requesting IP is not a crawler IP.

[0021] In some embodiments, the requesting IP, requesting time, and requesting short links are used to detect whether the requesting IP frequently accesses invalid short links, including:

[0022] Obtain the number of invalid short links accessed by the requesting IP, and detect whether the number is greater than a first threshold;

[0023] If the number of invalid short links visited by the requesting IP is greater than the first threshold, it is determined that the requesting IP has a behavior of frequently visiting invalid short links;

[0024] If the number of invalid short links visited by the requesting IP is not greater than the first threshold, it is determined that the requesting IP does not frequently visit invalid short links.

[0025] In some embodiments, obtaining the number of invalid short links accessed by the requesting IP includes:

[0026] Determine a suspected crawler IP queue corresponding to the requesting IP, where the suspected crawler IP queue is used to store invalid short link access records of the requesting IP; the invalid short link access records include invalid short links accessed by the requesting IP and the request time when the access occurred;

[0027] Check whether there are invalid short link access records containing requested short links in the suspected crawler IP queue;

[0028] If yes, update the original request time in the invalid short link access record to the request time;

[0029] If not, add an invalid short link access record to the suspected crawler IP queue based on the request short link and request time;

[0030] The number of invalid short link access records in the suspected crawler IP queue is obtained as the number of invalid short links accessed by the requesting IP.

[0031] In some embodiments, the requesting IP is detected according to the requesting IP, the requesting time and the requesting short link to determine whether the requesting IP is in the supplier IP blacklist and / or whether there is a behavior of frequently accessing different short links, and whether the requesting IP is the supplier IP based on the detection result, including:

[0032] If the requested short link exists in the short link database, the first operation logic is executed;

[0033] If the requesting IP does not frequently access invalid short links, the second operation logic is executed;

[0034] The first operation logic includes:

[0035] Check whether the requesting IP is in the provider's IP whitelist;

[0036] If the requesting IP is in the provider's IP whitelist, redirect to the correct page;

[0037] If the requesting IP is not in the provider's IP whitelist, check whether the requesting IP is in the provider's IP blacklist;

[0038] If the requesting IP is in the supplier's IP blacklist, the requesting IP is determined to be the supplier's IP;

[0039] If the requesting IP is not in the supplier's IP blacklist, the requesting IP, request time, and requesting short links are used to detect whether the requesting IP frequently accesses different short links.

[0040] If the requesting IP frequently accesses different short links, the requesting IP is determined to be a supplier IP and is added to the supplier IP blacklist;

[0041] If the requesting IP does not frequently access different short links, it is determined that the requesting IP is not the supplier IP;

[0042] The second operation logic includes:

[0043] Detect whether the requesting IP frequently accesses different short links based on the requesting IP, request time, and request short links;

[0044] If the requesting IP frequently accesses different short links, the requesting IP is determined to be a supplier IP and is added to the supplier IP blacklist;

[0045] If the requesting IP does not frequently access different short links, it is determined that the requesting IP is not the supplier IP.

[0046] In some embodiments, the requesting IP, requesting time, and requesting short links are used to detect whether the requesting IP has frequently accessed different short links, including:

[0047] Obtain the number of different short links accessed by the requesting IP, and detect whether the number is greater than a second threshold;

[0048] If the number of different short links visited by the requesting IP is greater than the second threshold, it is determined that the requesting IP has a behavior of frequently visiting different short links;

[0049] If the number of different short links visited by the requesting IP is not greater than the second threshold, it is determined that the requesting IP does not frequently visit different short links.

[0050] In some embodiments, obtaining the number of different short links accessed by the requesting IP includes:

[0051] Determine the suspected supplier IP queue corresponding to the requesting IP, and the suspected supplier IP queue is used to store the short link access record of the requesting IP; the short link access record includes the short links accessed by the requesting IP and the request time when the access occurred;

[0052] Check whether there is a short link access record containing a short link request in the suspected supplier IP queue;

[0053] If yes, update the original request time in the short link access record to the request time;

[0054] If not, a new short link access record is added to the suspected supplier IP queue based on the request short link and request time;

[0055] The number of short link access records in the suspected supplier IP queue is obtained as the number of short links accessed by the requesting IP.

[0056] According to a second aspect, the present application provides a processing device for accessing short links in text messages. In some embodiments, the device includes:

[0057] A request response module, used to obtain the request IP, request time and request short link of the short link access request in response to receiving the short link access request;

[0058] The first detection module is used to detect whether the requesting IP is in the crawler IP blacklist and / or whether there is a behavior of frequently accessing invalid short links according to the requesting IP, request time and request short link, and determine whether the requesting IP is a crawler IP based on the detection result;

[0059] Redirect module, used to redirect to the default page if the request IP is a crawler IP;

[0060] The second detection module is used to detect whether the requesting IP is in the supplier IP blacklist and / or whether there is a behavior of frequently accessing different short links according to the requesting IP, request time and request short link if the requesting IP is not a crawler IP, and determine whether the requesting IP is a supplier IP based on the detection result;

[0061] The redirect module is also used to redirect to the default page if the requesting IP is the provider IP;

[0062] The redirection module is also used to redirect to the correct page if the requesting IP is not the provider IP, indicating that the requesting IP is the user IP.

[0063] According to a third aspect, the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method for processing access behavior of short links in text messages provided in any of the above embodiments are implemented.

[0064] According to a fourth aspect, the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for processing access behavior of short links in text messages provided in any of the above embodiments are implemented.

[0065] In the above-mentioned embodiments of the present application, according to the characteristics of the actual summary of the click behaviors of real users, suppliers, and crawlers on short links and the differences between the three, corresponding identification strategies for non-user IPs such as supplier IPs and crawler IPs are formulated, that is, when a short link access request is received, the request IP, request time and request short chain related to the request are used to detect whether the request IP is in the crawler IP blacklist and / or whether there is a behavior of frequently accessing invalid short links, and based on the detection results, it is determined whether the request IP is a crawler IP. If the request IP is a crawler IP, it is redirected to the default page; if the request IP is not a crawler IP, according to the request IP, request time and request short chain, it is detected whether the request IP is in the supplier IP blacklist and / or whether there is a behavior of frequently accessing different short links, and based on the detection results, it is determined whether the request IP is a supplier IP; if the request IP is a supplier IP, it is redirected to the default page; if the request IP is not a supplier IP, indicating that the request IP is a user IP, it is redirected to the correct page. Based on the above identification strategy, this application can accurately identify non-user IPs and redirect them to the default page to prevent non-user IPs from accessing short links and polluting the click data of real users. It can also avoid user information leakage caused by short link content being crawled by malicious crawlers. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 A flowchart of a method for processing access behavior of short links in text messages provided by the present application according to one or more embodiments;

[0067] Figure 2 This is an overall flow chart of a method for processing access behaviors of short links in text messages provided in some examples of this application;

[0068] Figure 3 A schematic diagram of a suspected crawler IP queue, a suspected supplier queue, a crawler IP blacklist, and a supplier IP blacklist provided in some examples of this application;

[0069] Figure 4 A structural block diagram of a device for processing access behavior of short links in text messages provided by the present application according to one or more embodiments;

[0070] Figure 5 This is a diagram of the internal structure of a computer device provided by the present application according to one or more embodiments. DETAILED DESCRIPTION

[0071] In order to make the purpose, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below in conjunction with the accompanying drawings. It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0072] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.

[0073] In the description of the present application, it should be understood that the terms "first", "second", "third", etc. are only used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.

[0074] In response to the deficiencies or defects of the prior art, the present application provides a method for processing the access behavior of short links in text messages. The method formulates corresponding identification strategies for non-user IPs such as supplier IPs and crawler IPs based on the actual summary of the characteristics of the click behavior of real users, suppliers (such as text message suppliers, mobile phone suppliers), and crawlers on short links and the differences between the three. That is, when a short link access request is received, the request IP is detected according to the request IP, request time and request short chain related to the request to determine whether the request IP is in the crawler IP blacklist and / or whether there is a behavior of frequently accessing invalid short links. Based on the detection result, it is determined whether the request IP is a crawler IP. If the request IP is a crawler IP, it is redirected to the default page; if the request IP is not a crawler IP, the request IP is detected according to the request IP, request time and request short chain to determine whether the request IP is in the supplier IP blacklist and / or whether there is a behavior of frequently accessing different short links. Based on the detection result, it is determined whether the request IP is a supplier IP; if the request IP is a supplier IP, it is redirected to the default page; if the request IP is not a supplier IP, it indicates that the request IP is a user IP, and it is redirected to the correct page. Based on the above identification strategy, this application can accurately identify non-user IPs and redirect them to the default page to prevent non-user IPs from accessing short links and polluting the click data of real users. It can also avoid user information leakage caused by short link content being crawled by malicious crawlers.

[0075] In some embodiments, the method can be applied to a short link server. Further, the method includes: Figure 1 The following steps will be based on Figures 1 to 3 Each step is explained in detail.

[0076] S110: In response to receiving the short link access request, obtaining the request IP, request time and request short link of the short link access request.

[0077] A short link access request is a request received by a short link server. A short link access request may come from a real user, a supplier (such as a text message supplier, a mobile phone supplier, etc.), or a crawler. A short link access request carries the short link to be requested (referred to as the request short link). For example, a text message supplier may be a telecom operator such as China Mobile and China Unicom, and a mobile phone supplier may be a manufacturer of mobile smart devices such as mobile phones and tablet computers.

[0078] When the short link server receives a short link access request, it will also record the corresponding request time and request IP, that is, the IP address (Internet Protocol Address) sent to the short link access request.

[0079] The inventor has found in practice that the short links accessed by real users must be valid (for example, they exist in the database of the short link server), and each real user can only receive one or a few text messages in a short period of time (specifically, text messages containing short links, and the content of the text messages is not limited in this embodiment). Since the short links accessed by real users must exist, if a certain IP frequently accesses invalid short links (such as short links that do not exist), then the IP is likely to be a crawler; in addition, since a real user will not receive many different text messages in a short period of time, an IP that frequently requests access to many different short chains may be a supplier behavior. Based on this understanding, when the embodiment of the present application is not sure whether an IP is a crawler IP or a supplier IP, it will determine whether the IP is a crawler IP or a supplier IP by detecting whether the IP frequently accesses invalid short links or frequently accesses different short links. This will be explained in detail below.

[0080] S120: Detect whether the requesting IP is in the crawler IP blacklist and / or whether there is a behavior of frequently accessing invalid short links according to the requesting IP, request time and requesting short links, and determine whether the requesting IP is a crawler IP based on the detection results.

[0081] In some embodiments, the requesting IP is detected according to the requesting IP, requesting time and requesting short link to see whether it is in the crawler IP blacklist and / or whether there is frequent access to invalid short links. Based on the detection result, it is determined whether the requesting IP is a crawler IP operation. For example, Figure 2 As shown, specifically including:

[0082] (1) Detect whether the requesting IP is in the crawler IP blacklist; wherein the crawler IP blacklist (referred to as the crawler blacklist) includes pre-identified crawler IPs, which usually include multiple crawler IPs.

[0083] (2) If the requesting IP is in the crawler IP blacklist, the requesting IP is determined to be a crawler IP.

[0084] (3) If the requesting IP is not in the crawler IP blacklist, then check whether the requested short link exists in the short link database; wherein the short link database is used to store currently valid short links. The short link server can query whether the requested short link exists in the short link database to determine whether the requesting IP is a crawler IP.

[0085] (4) If the requested short link exists in the short link database, it is determined that the requesting IP is not a crawler IP.

[0086] (5) If the requested short link does not exist in the short link database, the request IP, request time and request short link are used to detect whether the request IP frequently accesses invalid short links.

[0087] If the short link that the requesting IP requests to access (i.e., the requested short link) does not exist in the short link database, indicating that the requested short link is an invalid short link, the requesting IP is regarded as a suspected crawler IP, and further detected to see if it is a crawler IP. In particular, this embodiment determines whether its access behavior to the short link meets the behavior characteristics of the crawler IP accessing the short link based on the historical access data related to the requesting IP, and then determines whether it is a crawler IP.

[0088] In some embodiments, the requesting IP, requesting time, and requesting short links are used to detect whether the requesting IP frequently accesses invalid short links, including:

[0089] (1) Obtain the number of invalid short links accessed by the requesting IP, and detect whether the number is greater than a first threshold.

[0090] In some embodiments, the operation of obtaining the number of invalid short chains visited by the requesting IP may be: determining a suspected crawler IP queue corresponding to the requesting IP, the suspected crawler IP queue being used to store invalid short chain access records of the requesting IP; the invalid short chain access records include the invalid short chains visited by the requesting IP and the request time when the access is made; detecting whether there is an invalid short chain access record containing the requested short chain in the suspected crawler IP queue; if so, updating the original request time in the invalid short chain access record to the request time; if not, adding a new invalid short chain access record to the suspected crawler IP queue based on the requested short chain and the request time; obtaining the number of invalid short chain access records in the suspected crawler IP queue as the number of invalid short chains visited by the requesting IP.

[0091] Furthermore, in order to make the recorded historical behavior data of the suspected crawler IP consistent with its recent behavior, an expiration time (for example, 60 seconds) can be set for the invalid short link access records in the suspected crawler IP queue. When the invalid short link access record is stored in the suspected crawler IP queue for a period of time that reaches the expiration time, it will be deleted from the queue. This operation can ensure that the invalid short link access records stored in the queue are all the latest access behaviors of the suspected crawler IP. Accordingly, when storing invalid short chain access records in the suspected crawler IP queue, if there is already an invalid short chain access record in the queue that contains the requested short chain, then in addition to updating the request time of the invalid short chain access record, its expiration time also needs to be updated. Accordingly, the information on invalid short chain access records stored in the suspected crawler IP queue can be found in Figure 3 As shown in (A) in .

[0092] (2) If the number of invalid short links accessed by the requesting IP is greater than the first threshold, it is determined that the requesting IP has a behavior of frequently accessing invalid short links; wherein the first threshold can be set according to actual conditions, and this embodiment does not impose any special restrictions on its value.

[0093] (3) If the number of invalid short links accessed by the requesting IP is not greater than the first threshold, it is determined that the requesting IP does not frequently access invalid short links.

[0094] S126: If the requesting IP frequently accesses invalid short links, the requesting IP is determined to be a crawler IP, and the requesting IP is added to the crawler IP blacklist.

[0095] S127: If the requesting IP does not frequently access invalid short links, it is determined that the requesting IP is not a crawler IP.

[0096] S130: If the requesting IP is a crawler IP, redirect to the default page.

[0097] Redirecting to the default page is to respond to the device that sent the short link access request with a link to the default page, so that after receiving the response, the device accesses the default page based on the link in the response. The redirection technology can be implemented using existing technologies, which will not be described in detail in this embodiment.

[0098] It should be noted that the default page is not the correct page, but other pages, usually 404 pages. The correct page refers to the page corresponding to the long link corresponding to the short link request.

[0099] S140: If the requesting IP is not a crawler IP, detect whether the requesting IP is in the supplier IP blacklist and / or whether there is a behavior of frequently accessing different short links based on the requesting IP, request time and request short link, and determine whether the requesting IP is a supplier IP based on the detection result.

[0100] If it is determined that the requesting IP is not a crawler IP, this embodiment will further determine whether its access behavior to the short link conforms to the behavior characteristics of the supplier IP accessing the short link based on the historical access data related to the requesting IP, and then determine whether it is a supplier IP.

[0101] In some embodiments, the requesting IP is detected based on the requesting IP, requesting time and requesting short chain to see whether it is in the supplier IP blacklist and / or whether there is a behavior of frequently accessing different short chains. The operation of judging whether the requesting IP is the supplier IP based on the detection result can be: if the requesting short chain exists in the short chain database, the first operation logic is executed; if the requesting IP does not have the behavior of frequently accessing invalid short chains, the second operation logic is executed.

[0102] The first operation logic can be found in Figure 2 As shown, specifically including:

[0103] (1) Check whether the requesting IP is in the supplier IP whitelist; the supplier IP whitelist includes one or more supplier IPs, which are pre-configured by the operator according to actual needs. Setting the supplier IP whitelist can skip the supplier rules.

[0104] (2) If the requesting IP is in the provider's IP whitelist, redirect to the correct page;

[0105] (3) If the requesting IP is not in the supplier IP whitelist, check whether the requesting IP is in the supplier IP blacklist; wherein the supplier IP blacklist also includes one or more supplier IPs, which are identified supplier IPs whose short link access behavior needs to be blocked.

[0106] (4) If the requesting IP is in the provider IP blacklist, the requesting IP is determined to be the provider IP;

[0107] (5) If the requesting IP is not in the supplier's IP blacklist, then check whether the requesting IP frequently accesses different short links based on the requesting IP, request time, and request short links;

[0108] (6) If the requesting IP frequently accesses different short links, the requesting IP is determined to be a supplier IP, and the requesting IP is added to the supplier IP blacklist;

[0109] (7) If the requesting IP does not frequently access different short links, it is determined that the requesting IP is not the supplier IP.

[0110] The second operation logic can be found in Figure 2 As shown, specifically including:

[0111] (1) Detect whether the requesting IP frequently accesses different short links based on the requesting IP, request time, and request short links;

[0112] (2) If the requesting IP frequently accesses different short links, the requesting IP is determined to be a supplier IP and is added to the supplier IP blacklist;

[0113] (3) If the requesting IP does not frequently access different short links, it is determined that the requesting IP is not the supplier IP.

[0114] The first operation logic and the second operation logic mentioned above both involve the operation of "detecting whether the requesting IP has frequently accessed different short links according to the requesting IP, requesting time and requesting short links", and the specific contents of this operation in the first operation logic and the second operation logic are the same. The following is an explanation of this operation.

[0115] In some embodiments, the operation of detecting whether the requesting IP has frequently accessed different short links according to the requesting IP, request time, and requesting short links includes:

[0116] (1) Obtain the number of different short links accessed by the requesting IP, and detect whether the number is greater than a second threshold.

[0117] The operation of obtaining the number of different short chains visited by the requesting IP may be: determining the suspected supplier IP queue corresponding to the requesting IP, the suspected supplier IP queue being used to store the short chain access records of the requesting IP; the short chain access records include the short chains visited by the requesting IP and the request time when the access is made; detecting whether there is a short chain access record containing the requested short chain in the suspected supplier IP queue; if so, updating the original request time in the short chain access record to the request time; if not, adding a short chain access record to the suspected supplier IP queue based on the requested short chain and the request time; obtaining the number of short chain access records in the suspected supplier IP queue as the number of short chains visited by the requesting IP.

[0118] Furthermore, in order to make the recorded historical behavior data of the suspected supplier IP consistent with its recent behavior, an expiration time (for example, 60 seconds) can be set for the short chain access record in the suspected supplier IP queue. When the time the short chain access record is stored in the suspected supplier IP queue reaches the expiration time, it will be deleted from the queue. This operation can ensure that the short chain access records stored in the queue are all the latest access behaviors of the suspected supplier IP. Accordingly, when storing short chain access records in the suspected supplier IP queue, if there is already a short chain access record in the queue that contains the requested short chain, then in addition to updating the request time of the short chain access record, its expiration time also needs to be updated. Accordingly, the information on the short chain access records stored in the suspected supplier IP queue can be found in Figure 3 As shown in (A) in .

[0119] Furthermore, you can also set a corresponding expiration time for each IP in the crawler IP blacklist and the supplier IP blacklist, and delete the IP in the blacklist when the record time reaches the corresponding expiration time. Figure 3 As shown in (B) in .

[0120] (2) If the number of different short links visited by the requesting IP is greater than the second threshold, it is determined that the requesting IP has a behavior of frequently visiting different short links.

[0121] (3) If the number of different short links visited by the requesting IP is not greater than the second threshold, it is determined that the requesting IP does not frequently visit different short links.

[0122] S150: If the requesting IP is the provider IP, redirect to the default page.

[0123] Redirecting to the default page means providing a response including a link of the default page to the device that sent the short link access request, so that after receiving the response, the device accesses the default page based on the link in the response.

[0124] S160: If the requesting IP is not the provider IP, indicating that the requesting IP is the user IP, redirect to the correct page.

[0125] Redirecting to the correct page means sending a response containing a link of the correct page (i.e., the long link corresponding to the requested short link) to the device that sent the short link access request, so that after receiving the response, the device accesses the correct page based on the link in the response.

[0126] It should be noted that, with respect to the various steps included in the method for processing the access behavior of short links in text messages provided in any of the above embodiments, unless otherwise clearly stated in this document, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least part of these steps can include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0127] Based on the same inventive concept, the present application also provides a processing device for accessing short links in text messages. Figure 4 As shown, the processing device for accessing short links in text messages includes the following modules:

[0128] The request response module 110 is used to obtain the request IP, request time and request short link of the short link access request in response to receiving the short link access request;

[0129] The first detection module 120 is used to detect whether the requesting IP is in the crawler IP blacklist and / or whether there is a behavior of frequently accessing invalid short links according to the requesting IP, request time and request short link, and determine whether the requesting IP is a crawler IP based on the detection result;

[0130] The redirection module 130 is used to redirect to a default page if the requesting IP is a crawler IP;

[0131] The second detection module 140 is used to detect whether the requesting IP is in the supplier IP blacklist and / or whether there is a behavior of frequently accessing different short links according to the requesting IP, the request time and the request short link if the requesting IP is not a crawler IP, and determine whether the requesting IP is a supplier IP based on the detection result;

[0132] The redirection module 130 is further used to redirect to a default page if the requesting IP is a provider IP;

[0133] The redirection module 130 is also used to redirect to the correct page if the requesting IP is not the provider IP, indicating that the requesting IP is the user IP.

[0134] In some embodiments, the first detection module 120 is specifically configured to:

[0135] Check whether the requesting IP is in the crawler IP blacklist;

[0136] If the requesting IP is in the crawler IP blacklist, the requesting IP is determined to be a crawler IP;

[0137] If the requesting IP is not in the crawler IP blacklist, check whether the requested short link exists in the short link database;

[0138] If the requested short link exists in the short link database, it is determined that the requesting IP is not a crawler IP;

[0139] If the requested short link does not exist in the short link database, the request IP, request time and request short link are used to detect whether the request IP has frequently accessed invalid short links;

[0140] If the requesting IP frequently accesses invalid short links, the requesting IP is determined to be a crawler IP and is added to the crawler IP blacklist;

[0141] If the requesting IP does not frequently access invalid short links, it is determined that the requesting IP is not a crawler IP.

[0142] In some embodiments, the operation of detecting whether the requesting IP frequently accesses invalid short links based on the requesting IP, request time, and requesting short links includes:

[0143] Obtain the number of invalid short links accessed by the requesting IP, and detect whether the number is greater than a first threshold;

[0144] If the number of invalid short links visited by the requesting IP is greater than the first threshold, it is determined that the requesting IP has a behavior of frequently visiting invalid short links;

[0145] If the number of invalid short links visited by the requesting IP is not greater than the first threshold, it is determined that the requesting IP does not frequently visit invalid short links.

[0146] In some embodiments, the operation of obtaining the number of invalid short links accessed by the requesting IP includes:

[0147] Determine a suspected crawler IP queue corresponding to the requesting IP, where the suspected crawler IP queue is used to store invalid short link access records of the requesting IP; the invalid short link access records include invalid short links accessed by the requesting IP and the request time when the access occurred;

[0148] Check whether there are invalid short link access records containing requested short links in the suspected crawler IP queue;

[0149] If yes, update the original request time in the invalid short link access record to the request time;

[0150] If not, add an invalid short link access record to the suspected crawler IP queue based on the request short link and request time;

[0151] The number of invalid short link access records in the suspected crawler IP queue is obtained as the number of invalid short links accessed by the requesting IP.

[0152] In some embodiments, the second detection module 140 is specifically configured to:

[0153] If the requested short link exists in the short link database, the first operation logic is executed;

[0154] If the requesting IP does not frequently access invalid short links, the second operation logic is executed;

[0155] The first operation logic includes:

[0156] Check whether the requesting IP is in the provider's IP whitelist;

[0157] If the requesting IP is in the provider's IP whitelist, redirect to the correct page;

[0158] If the requesting IP is not in the provider's IP whitelist, check whether the requesting IP is in the provider's IP blacklist;

[0159] If the requesting IP is in the supplier's IP blacklist, the requesting IP is determined to be the supplier's IP;

[0160] If the requesting IP is not in the supplier's IP blacklist, the requesting IP, request time, and requesting short links are used to detect whether the requesting IP frequently accesses different short links.

[0161] If the requesting IP frequently accesses different short links, the requesting IP is determined to be a supplier IP and is added to the supplier IP blacklist;

[0162] If the requesting IP does not frequently access different short links, it is determined that the requesting IP is not the supplier IP;

[0163] The second operation logic includes:

[0164] Detect whether the requesting IP frequently accesses different short links based on the requesting IP, request time, and request short links;

[0165] If the requesting IP frequently accesses different short links, the requesting IP is determined to be a supplier IP and is added to the supplier IP blacklist;

[0166] If the requesting IP does not frequently access different short links, it is determined that the requesting IP is not the supplier IP.

[0167] In some embodiments, the operation of detecting whether the requesting IP has frequently accessed different short links according to the requesting IP, request time, and requesting short links includes:

[0168] Obtain the number of different short links accessed by the requesting IP, and detect whether the number is greater than a second threshold;

[0169] If the number of different short links visited by the requesting IP is greater than the second threshold, it is determined that the requesting IP has a behavior of frequently visiting different short links;

[0170] If the number of different short links visited by the requesting IP is not greater than the second threshold, it is determined that the requesting IP does not frequently visit different short links.

[0171] In some embodiments, the operation of obtaining the number of different short links accessed by the requesting IP includes:

[0172] Determine the suspected supplier IP queue corresponding to the requesting IP, and the suspected supplier IP queue is used to store the short link access record of the requesting IP; the short link access record includes the short links accessed by the requesting IP and the request time when the access occurred;

[0173] Check whether there is a short link access record containing a short link request in the suspected supplier IP queue;

[0174] If yes, update the original request time in the short link access record to the request time;

[0175] If not, a new short link access record is added to the suspected supplier IP queue based on the request short link and request time;

[0176] The number of short link access records in the suspected supplier IP queue is obtained as the number of short links accessed by the requesting IP.

[0177] For the specific definition of the processing device for the access behavior of short links in text messages, please refer to the definition of the processing method for the access behavior of short links in text messages above, which will not be repeated here. Each module in the above-mentioned processing device for the access behavior of short links in text messages can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0178] The present application provides a computer device, in some embodiments, its internal structure diagram can be as follows Figure 5 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as suspected supplier IP queues, suspected crawler IP queues, supplier IP blacklists, crawler IP blacklists, and supplier IP whitelists. The specific stored data can also refer to the definitions in the above method embodiments. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a processing method for access behavior of short links in text messages is implemented.

[0179] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0180] This embodiment also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method for processing access behavior of short links in text messages provided in any of the above embodiments can be implemented.

[0181] The present application also provides a computer-readable storage medium. In some embodiments, a computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, the steps of the method for processing the access behavior of short links in text messages provided in any of the above embodiments are implemented.

[0182] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0183] Those skilled in the art can understand that all or part of the processes in the above method embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink), DRAM (SLDRAM), memory bus (Rambus), direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0184] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0185] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A method for processing access behavior of short links in text messages, characterized in that: The method comprises: In response to receiving the short link access request, obtaining the request IP, request time and request short link of the short link access request; Detect whether the requesting IP is in the crawler IP blacklist and / or whether there is a behavior of frequently accessing invalid short links according to the requesting IP, the requesting time and the requesting short link, and determine whether the requesting IP is a crawler IP based on the detection result; If the requesting IP is a crawler IP, redirect to the default page; If the requesting IP is not a crawler IP, detect whether the requesting IP is in the supplier IP blacklist and / or whether there is a behavior of frequently accessing different short links according to the requesting IP, the request time and the request short link, and determine whether the requesting IP is a supplier IP based on the detection result; If the requesting IP is the supplier IP, redirect to the default page; If the requesting IP is not the supplier's IP, indicating that the requesting IP is the user's IP, then redirect to the correct page.

2. The method according to claim 1, characterized in that Detecting whether the requesting IP is in the crawler IP blacklist and / or whether there is a behavior of frequently accessing invalid short links according to the requesting IP, the requesting time and the requesting short link, and judging whether the requesting IP is a crawler IP based on the detection result, including: Check whether the requesting IP is in the crawler IP blacklist; If the requesting IP is in the crawler IP blacklist, the requesting IP is determined to be a crawler IP; If the requesting IP is not in the crawler IP blacklist, then check whether the requested short link exists in the short link database; If the requested short link exists in the short link database, it is determined that the requesting IP is not a crawler IP; If the requested short link does not exist in the short link database, detect whether the requesting IP has frequently accessed invalid short links according to the requesting IP, the request time and the requesting short link; If the requesting IP frequently accesses invalid short links, the requesting IP is determined to be a crawler IP, and the requesting IP is added to the crawler IP blacklist; If the requesting IP does not frequently access invalid short links, it is determined that the requesting IP is not a crawler IP.

3. The method according to claim 2, characterized in that Detecting whether the requesting IP frequently accesses invalid short links based on the requesting IP, the requesting time, and the requesting short link includes: Obtain the number of invalid short links accessed by the requesting IP, and detect whether the number is greater than a first threshold; If the number of invalid short links accessed by the requesting IP is greater than a first threshold, it is determined that the requesting IP has a behavior of frequently accessing invalid short links; If the number of invalid short links visited by the requesting IP is not greater than the first threshold, it is determined that the requesting IP does not frequently visit invalid short links.

4. The method according to claim 3, characterized in that Get the number of invalid short links accessed by the requesting IP, including: Determine a suspected crawler IP queue corresponding to the requesting IP, wherein the suspected crawler IP queue is used to store invalid short link access records of the requesting IP; the invalid short link access records include invalid short links accessed by the requesting IP and the request time when the access occurred; Detect whether there is an invalid short link access record containing the requested short link in the suspected crawler IP queue; If yes, update the original request time in the invalid short link access record to the request time; If not, adding an invalid short link access record to the suspected crawler IP queue based on the requested short link and the request time; The number of invalid short link access records in the suspected crawler IP queue is obtained as the number of invalid short links accessed by the requesting IP.

5. The method according to any one of claims 2 to 4, characterized in that: Detecting whether the requesting IP is in the supplier IP blacklist and / or whether there is a behavior of frequently accessing different short links according to the requesting IP, the requesting time and the requesting short link, and judging whether the requesting IP is the supplier IP based on the detection result, including: If the requested short chain exists in the short chain database, executing the first operation logic; If the requesting IP does not frequently access invalid short links, the second operation logic is executed; The first operation logic includes: Check whether the requesting IP is in the provider's IP whitelist; If the requesting IP is in the provider's IP whitelist, redirect to the correct page; If the requesting IP is not in the supplier's IP whitelist, then check whether the requesting IP is in the supplier's IP blacklist; If the requesting IP is in the supplier IP blacklist, determining that the requesting IP is the supplier IP; If the requesting IP is not in the supplier's IP blacklist, detect whether the requesting IP frequently accesses different short links based on the requesting IP, the request time and the request short link; If the requesting IP frequently accesses different short links, the requesting IP is determined to be a supplier IP, and the requesting IP is added to the supplier IP blacklist; If the requesting IP does not frequently access different short links, it is determined that the requesting IP is not a supplier IP; The second operation logic includes: Detecting whether the requesting IP has a behavior of frequently accessing different short links according to the requesting IP, the requesting time, and the requesting short link; If the requesting IP frequently accesses different short links, the requesting IP is determined to be a supplier IP, and the requesting IP is added to the supplier IP blacklist; If the requesting IP does not frequently access different short links, it is determined that the requesting IP is not a supplier IP.

6. The method according to claim 5, characterized in that Detecting whether the requesting IP frequently accesses different short links based on the requesting IP, the requesting time and the requesting short link includes: Obtain the number of different short links accessed by the requesting IP, and detect whether the number is greater than a second threshold; If the number of different short links visited by the requesting IP is greater than the second threshold, it is determined that the requesting IP has a behavior of frequently visiting different short links; If the number of different short links visited by the requesting IP is not greater than the second threshold, it is determined that the requesting IP does not frequently visit different short links.

7. The method according to claim 6, characterized in that Get the number of different short links visited by the requesting IP, including: Determine a suspected supplier IP queue corresponding to the requesting IP, wherein the suspected supplier IP queue is used to store the short link access record of the requesting IP; the short link access record includes the short links accessed by the requesting IP and the request time when the access occurred; Detect whether there is a short link access record containing the requested short link in the suspected supplier IP queue; If yes, update the original request time in the short link access record to the request time; If not, adding a short link access record to the suspected supplier IP queue based on the request short link and the request time; The number of short link access records in the suspected supplier IP queue is obtained as the number of short links accessed by the requesting IP.

8. A device for processing access behavior of short links in short messages, characterized in that: The device comprises: A request response module, configured to obtain, in response to receiving a short link access request, a request IP, a request time, and a request short link of the short link access request; A first detection module is used to detect whether the requesting IP is in the crawler IP blacklist and / or whether there is a behavior of frequently accessing invalid short links according to the requesting IP, the request time and the requesting short link, and determine whether the requesting IP is a crawler IP based on the detection result; A redirection module, used to redirect to a default page if the requesting IP is a crawler IP; The second detection module is used for, if the requesting IP is not a crawler IP, detecting whether the requesting IP is in the supplier IP blacklist and / or whether there is a behavior of frequently accessing different short links according to the requesting IP, the request time and the request short link, and judging whether the requesting IP is a supplier IP based on the detection result; The redirection module is also used to redirect to a default page if the requesting IP is a supplier IP; The redirection module is also used to redirect to the correct page if the requesting IP is not the supplier's IP, indicating that the requesting IP is the user's IP.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.