Web page request processing method, device, electronic device and storage medium

Through the combination of human-machine weight algorithm and interface signature key, the malicious access problem caused by machine simulation requests is solved, the security and user experience of web page access are improved, and the accurate identification and interception of malicious requests is achieved.

CN120223422BActive Publication Date: 2025-08-22SHENZHEN FENXIANG INTERNET TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510495323.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-21
Publication Date
2025-08-22
Estimated Expiration
2045-04-21

AI Technical Summary

Technical Problem

During web page access, malicious access caused by machine simulation requests seriously affects security, and the detection methods of verification codes or human-machine identification components in the prior art need to interrupt user browsing behavior and affect user experience.

Method used

The human-machine weight algorithm is used to determine the human-machine evaluation score based on user behavior data and the number of web page requests, generate front-end and back-end interface signature keys, determine the web page request as a real request or a simulated request, and decide whether to access the target web page when the real request is made to avoid interrupting user browsing behavior.

Benefits of technology

It improves the security and user experience of web page access, protects user identity information, reduces resource waste, and improves the accurate identification and interception of malicious requests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120223422B_ABST
    Figure CN120223422B_ABST
Patent Text Reader

Abstract

The present disclosure provides a web page request processing method, apparatus, electronic device, and storage medium. The method includes: receiving a web page request for a target web page, and detecting user behavior data and the number of web page request requests within a preset time period after receiving the web page request; the web page request does not include user identity information; using a human-machine weighting algorithm to determine a human-machine evaluation score based on the user behavior data and the number of web page request requests, and judging whether the web page request is a real user request or a machine-simulated request based on the human-machine evaluation score; if the web page request is a real user request, determining whether to access the target web page based on a first interface signature key generated by calling a front-end service for the web page request and a second interface signature key generated by calling a back-end service for the web page request. Embodiments of the present disclosure can improve security during web page access.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of web page access, and in particular to a web page request processing method, a web page request processing device, an electronic device, and a computer-readable storage medium. Background Art

[0002] With the development of computer technology, malicious web access has increased, and network security protection has gradually received significant attention. When users access a web page, there are often machines that simulate and forge web page requests and maliciously access the page through forged web page requests, seriously affecting the security of the web page access process. Summary of the Invention

[0003] The embodiments of the present disclosure at least provide a web page request processing method, a web page request processing device, an electronic device, and a computer-readable storage medium, which can improve the security of the web page access process.

[0004] The present disclosure provides a method for processing a webpage request, including:

[0005] receiving a webpage request for a target webpage, and detecting user behavior data and the number of requests for the webpage request within a preset time period after receiving the webpage request; the webpage request does not include user identity information;

[0006] Using a human-machine weighting algorithm, based on the user behavior data and the number of requests for the web page request, a human-machine evaluation score is determined, and based on the human-machine evaluation score, it is determined whether the web page request is a real user request or a machine-simulated request;

[0007] In the case that the web page request is a real request of the user, whether to access the target web page is determined based on the first interface signature key for the web page request generated by calling the front-end service and the second interface signature key for the web page request generated by calling the back-end service.

[0008] In the embodiment of the present disclosure, a human-machine weight algorithm is used to determine a human-machine evaluation score based on user behavior data and the number of web page requests, and then based on the human-machine evaluation score, it is judged whether the web page request is a real user request or a machine-simulated request. In the case that the web page request is a real user request, the step of judging whether to access the target page is based on the subsequently generated key. In this way, the security of the web page access process can be improved.

[0009] In addition, since the web page request for the target web page does not contain user identity information, this can protect the user identity.

[0010] Furthermore, compared with the detection method of "verification code and human-machine identification component" in the related art, there is no need to interrupt the user's browsing of the web page, which is conducive to improving the user experience.

[0011] In an optional implementation, when the web page request is the machine simulation request, the front-end service is called to perform a first interception process on the web page request.

[0012] In the embodiment of the present disclosure, if the web page request is a machine simulation request, the front-end service is called to intercept and process the web page request, thereby avoiding the waste of resources caused by the machine simulation request.

[0013] In an optional embodiment, the human-machine weight algorithm is used to determine the human-machine evaluation score based on the user behavior data and the number of requests for the web page, including:

[0014] Determining a first score corresponding to the user behavior based on the user behavior data, and determining a second score corresponding to the number of requests based on the number of requests for the web page within the preset time period;

[0015] A basic score is obtained, and the human-machine evaluation score is determined based on the basic score, the first score, and the second score.

[0016] In the embodiment of the present disclosure, by determining a first score corresponding to the user behavior and a second score corresponding to the number of requests, the accuracy of the human-machine evaluation score is improved, thereby improving the accuracy of the judgment of the web page request.

[0017] In an optional embodiment, the user behavior data includes the number of keyboard input behaviors, the number of mouse control behaviors, and the number of touchpad control behaviors; and determining the first score corresponding to the user behavior based on the user behavior data includes:

[0018] constructing a first vector according to the number of keyboard input actions, the number of mouse control actions, and the number of touchpad control actions;

[0019] constructing a second vector based on weights corresponding to the keyboard input behavior, the mouse control behavior, and the touchpad control behavior respectively;

[0020] The first score is determined based on the first vector and the second vector.

[0021] In the embodiment of the present disclosure, since the user behavior data includes the number of keyboard input behaviors, the number of mouse control behaviors, and the number of touchpad control behaviors, the number of these behaviors can usually represent whether they are real user operations. For example, if they are real user operations, the number of their various operation behaviors is usually limited. Therefore, determining the first score based on the number of the above behaviors can improve the accuracy of the first score.

[0022] In an optional embodiment, the preset time period includes multiple time windows, each time window corresponds to a score weight; and determining the second score corresponding to the number of requests for the web page within the preset time period includes:

[0023] For each time window, determining a score corresponding to the time window according to the number of requests for the web page within the time window and the score weight corresponding to the time window;

[0024] A preset abnormality deduction score is obtained, and the second score is determined based on the abnormality deduction score and the sum of the scores corresponding to each time window.

[0025] Here, by setting multiple time windows and determining a corresponding score for each time window, the accuracy of the second score can be improved.

[0026] In an optional implementation, determining whether the webpage request is a real user request or a machine-simulated request based on the human-machine evaluation score includes:

[0027] If the human-machine evaluation score is less than a preset threshold, it is determined that the webpage request is the machine simulation request.

[0028] In the disclosed embodiment, the human-machine evaluation score is compared with a preset threshold, that is, whether the web page request is a machine-simulated request is determined in a quantitative manner, which can improve accuracy.

[0029] In an optional implementation, the calling front-end service generates a first interface signature key for the webpage request based on a first preset encryption rule, including:

[0030] Get the initial key and the timestamp used for the current signature;

[0031] Determining the sum of the American Standard Code for Information Interchange (ASCII) code values ​​of the initial key;

[0032] Generate a random number, and generate the first interface signature key based on the human-machine evaluation score, the sum of the ASCII code values, the timestamp, and the random number.

[0033] In the embodiment of the present disclosure, since the timestamp is unique and the random number is random, the first interface signature key is dynamically generated based on the human-machine evaluation score, the sum of the ASCII code of the initial key, the timestamp and the random number. This helps to increase the complexity and unpredictability of the first interface signature key, thereby reducing the risk of key leakage.

[0034] In an optional embodiment, when the webpage request is a genuine request by the user, determining whether to access the target webpage based on a first interface signature key for the webpage request generated by calling a front-end service and a second interface signature key for the webpage request generated by calling a back-end service includes:

[0035] In the case where the webpage request is a genuine request by the user, calling the front-end service to generate a first interface signature key for the webpage request based on a first preset encryption rule; the human-machine weight algorithm and the first preset encryption rule are stored in the form of an encrypted code block;

[0036] Sending the webpage request carrying the first interface signature key to a backend service, and invoking the backend service to generate a second interface signature key for the webpage request based on a second preset encryption rule; the second preset encryption rule is the same as the first preset encryption rule;

[0037] Whether to access the target webpage is determined based on whether the first interface signature key and the second interface signature key are the same and a usage status of the first interface signature key.

[0038] In the embodiment of the present disclosure, after determining that the web page request is a genuine request from the user, a first interface signature key is generated by calling the front-end service, and a second interface signature key is generated by calling the back-end service. Based on whether the first interface signature key and the second interface signature key are the same and the usage status of the first interface signature key, it is determined whether to access the target web page. That is, the keys generated by the front-end service and the back-end service are compared respectively to avoid errors in the process of sending the web page request, thereby further improving the security of web page access.

[0039] In an optional implementation, determining whether to access the target webpage based on whether the first interface signature key and the second interface signature key are identical and the usage status of the first interface signature key includes:

[0040] In a case where the first interface signature key is the same as the second interface signature key and the usage status of the first interface signature key is unused, it is determined to access the target webpage.

[0041] When the first interface signature key is different from the second interface signature key, and / or the usage status of the first interface signature key is in a used state, a second interception process is performed on the web page request based on the backend service.

[0042] In the disclosed embodiment, by comparing the first interface signature key generated by the front-end service with the second interface signature key generated by the back-end service and determining the usage status of the first interface signature key, the web page request can be re-verified, thereby further improving the security of the web page request. If the first interface signature key is different from the second signature and / or the usage status of the first interface signature key is in the used state, it means that the back-end service has failed the verification of the web page request, and a second interception process is required to be performed on it, thereby avoiding malicious requests.

[0043] In an optional implementation, after receiving a webpage request for a target webpage, the method further includes:

[0044] Obtain device information of a target device that initiates the webpage request;

[0045] Based on the device information of the target device, a human-machine evaluation storage field uniquely corresponding to the target device is generated; the human-machine evaluation storage field is used to store the human-machine evaluation score.

[0046] In the embodiment of the present disclosure, a human-machine evaluation storage field uniquely corresponding to the target device is generated based on the device information of the target device. Since the human-machine evaluation score may change in real time, the human-machine evaluation score is stored in this field to facilitate the management of the human-machine evaluation score.

[0047] In an optional implementation manner, the encryption code block including the human-machine weight algorithm and the first preset encryption rule is obtained according to the following steps:

[0048] Using a code obfuscation tool to perform compression and obfuscation processing on an initial code block including the human-machine weight algorithm and the first preset encryption rule to obtain a first processing result;

[0049] The first processing result is coded and encrypted to obtain the encrypted code block.

[0050] In the embodiment of the present disclosure, by compressing and obfuscating the initial code block and then performing encoding encryption processing, the confidentiality of the encrypted code block can be improved, thereby improving the uniqueness and irreversibility of the key.

[0051] In an optional implementation, the webpage request is generated based on a user input operation on a browser, and the method further includes:

[0052] Detecting whether the browser is in a debugging mode, and if it is determined that the browser is in the debugging mode, refreshing the current page displayed by the browser.

[0053] In the disclosed embodiment, when the browser is in debugging mode, the current page displayed by the browser is refreshed, thereby avoiding code debugging of the page and further improving the security of page access.

[0054] The present disclosure also provides a webpage request processing device, including:

[0055] a request receiving module, configured to receive a webpage request for a target webpage and detect user behavior data and the number of requests for the webpage request within a preset time period after receiving the webpage request; the webpage request does not include user identity information;

[0056] a request judgment module, configured to determine a human-machine evaluation score based on the user behavior data and the number of requests for the web page request using a human-machine weighting algorithm, and to judge whether the web page request is a real user request or a machine-simulated request based on the human-machine evaluation score;

[0057] The web page access module is used to determine whether to access the target web page based on the first interface signature key for the web page request generated by calling the front-end service and the second interface signature key for the web page request generated by calling the back-end service when the web page request is a real request of the user.

[0058] The present disclosure also provides another webpage request processing device, which further includes a request interception module, wherein the request interception module is configured to:

[0059] In the case that the web page request is the machine simulation request, the front-end service is called to perform a first interception process on the web page request.

[0060] In an optional implementation manner, the request determination module is specifically configured to:

[0061] Detecting user behavior data and the number of requests for the web page request within a preset time period after receiving the web page request;

[0062] Determining a first score corresponding to the user behavior based on the user behavior data, and determining a second score corresponding to the number of requests based on the number of requests for the web page within the preset time period;

[0063] A basic score is obtained, a human-machine evaluation score is determined based on the basic score, the first score, and the second score, and based on the human-machine evaluation score, it is determined whether the web page request is a real user request or a machine-simulated request.

[0064] In an optional implementation, the user behavior data includes the number of keyboard input behaviors, the number of mouse control behaviors, and the number of touchpad control behaviors; and the request determination module is specifically configured to:

[0065] constructing a first vector according to the number of keyboard input actions, the number of mouse control actions, and the number of touchpad control actions;

[0066] constructing a second vector based on weights corresponding to the keyboard input behavior, the mouse control behavior, and the touchpad control behavior respectively;

[0067] The first score is determined based on the first vector and the second vector.

[0068] In an optional implementation, the preset time period includes multiple time windows, each time window corresponds to a score weight; and the request judgment module is specifically configured to:

[0069] For each time window, determining a score corresponding to the time window according to the number of requests for the web page within the time window and the score weight corresponding to the time window;

[0070] A preset abnormality deduction score is obtained, and the second score is determined based on the abnormality deduction score and the sum of the scores corresponding to each time window.

[0071] In an optional implementation manner, the request determination module is specifically configured to:

[0072] If the human-machine evaluation score is less than a preset threshold, it is determined that the webpage request is the machine simulation request.

[0073] In an optional implementation, the first key generation module is used to:

[0074] Get the initial key and the timestamp used for the current signature;

[0075] Determining the sum of the American Standard Code for Information Interchange (ASCII) code values ​​of the initial key;

[0076] Generate a random number, and generate the first interface signature key based on the human-machine evaluation score, the sum of the ASCII code values, the timestamp, and the random number.

[0077] In an optional implementation manner, the web page access module is specifically configured to:

[0078] In the case where the webpage request is a genuine request by the user, calling the front-end service to generate a first interface signature key for the webpage request based on a first preset encryption rule; the human-machine weight algorithm and the first preset encryption rule are stored in the form of an encrypted code block;

[0079] Sending the webpage request carrying the first interface signature key to a backend service, and invoking the backend service to generate a second interface signature key for the webpage request based on a second preset encryption rule; the second preset encryption rule is the same as the first preset encryption rule;

[0080] Whether to access the target webpage is determined based on whether the first interface signature key and the second interface signature key are the same and a usage status of the first interface signature key.

[0081] In an optional implementation manner, the web page access module is specifically configured to:

[0082] In a case where the first interface signature key is the same as the second interface signature key and the usage status of the first interface signature key is unused, determining to access the target webpage;

[0083] When the first interface signature key is different from the second interface signature key, and / or the usage status of the first interface signature key is in a used state, a second interception process is performed on the web page request based on the backend service.

[0084] In an optional implementation, the device further includes a field generation module, wherein the field generation module is configured to:

[0085] Obtain device information of a target device that initiates the webpage request;

[0086] Based on the device information of the target device, a human-machine evaluation storage field uniquely corresponding to the target device is generated; the human-machine evaluation storage field is used to store the human-machine evaluation score.

[0087] In an optional implementation, the device further includes a code encryption module, wherein the code encryption module is configured to:

[0088] Using a code obfuscation tool to perform compression and obfuscation processing on an initial code block including the human-machine weight algorithm and the first preset encryption rule to obtain a first processing result;

[0089] The first processing result is coded and encrypted to obtain the encrypted code block.

[0090] An embodiment of the present disclosure also provides an electronic device, comprising: a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of any possible web page request processing method described above are performed.

[0091] An embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the computer program executes the steps of any possible web page request processing method described above.

[0092] For a description of the effects of the above-mentioned web page request processing device, electronic device, and computer-readable storage medium, please refer to the description of the above-mentioned web page request processing method, which will not be repeated here.

[0093] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and are not intended to limit the technical solutions of the present disclosure.

[0094] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0095] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the embodiments. The drawings herein are incorporated into and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and, together with the specification, are used to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For those of ordinary skill in the art, other relevant drawings can be obtained based on these drawings without inventive effort.

[0096] Figure 1 A flow chart of a web page request processing method provided by an embodiment of the present disclosure is shown;

[0097] Figure 2 A schematic diagram showing the interaction between a front-end service and a back-end service provided by an embodiment of the present disclosure is shown;

[0098] Figure 3 A flowchart of another web page request processing method provided by an embodiment of the present disclosure is shown;

[0099] Figure 4 A schematic structural diagram of a web page request processing device provided by an embodiment of the present disclosure is shown;

[0100] Figure 5A schematic structural diagram of another web page request processing device provided by an embodiment of the present disclosure is shown;

[0101] Figure 6 A structural schematic diagram of an electronic device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0102] In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the disclosure for which protection is sought, but merely represents selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present disclosure.

[0103] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.

[0104] The term "and / or" herein simply describes an association relationship, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, the simultaneous existence of A and B, and the existence of B alone. In addition, the term "at least one" herein refers to any combination of at least two of any one or more of a plurality of items. For example, "at least one of A, B, and C" can represent any one or more elements selected from the set consisting of A, B, and C.

[0105] With the development of computer technology, malicious visits to web pages have gradually increased, so network security protection has gradually received people's attention.

[0106] Research has found that when users access web pages, there is often a situation where machines simulate and forge web page requests and maliciously access the web page through forged web page requests, which seriously affects the security of the web page access process.

[0107] In addition, in order to improve the security of access, the solution adopted in the relevant technology is to use a verification code or a human-machine recognition component to detect whether the current web page request is a malicious request. However, the above detection method often requires the user to interrupt the current access process. For example, when the user is browsing a web page, a verification prompt box will pop up on the page. The user needs to interrupt the browsing of the web page and perform the verification operation before continuing to browse the page, which will affect the user's browsing experience.

[0108] Based on the above research, the present disclosure provides a web page request processing method, which first receives a web page request for a target web page, and detects user behavior data and the number of requests for the web page request within a preset time period after receiving the web page request; the web page request does not include user identity information; a human-machine weight algorithm is used to determine a human-machine evaluation score based on the user behavior data and the number of requests for the web page request, and based on the human-machine evaluation score, it is judged whether the web page request is a real user request or a machine-simulated request; in the case that the web page request is a real user request, based on the first interface signature key for the web page request generated by calling the front-end service and the second interface signature key for the web page request generated by calling the back-end service, it is determined whether to access the target web page.

[0109] In the embodiment of the present disclosure, a human-machine weight algorithm is used to determine a human-machine evaluation score based on user behavior data and the number of web page requests, and then based on the human-machine evaluation score, it is judged whether the web page request is a real user request or a machine-simulated request. In the case that the web page request is a real user request, the step of judging whether to access the target page is based on the subsequently generated key. In this way, the security of the web page access process can be improved.

[0110] In addition, since the web page request for the target web page does not contain user identity information, this can protect the user identity.

[0111] Furthermore, compared with the detection method of "verification code and human-machine identification component" in the related art, there is no need to interrupt the user's browsing of the web page, which is conducive to improving the user experience.

[0112] To facilitate understanding of this embodiment, a web page request processing method disclosed in an embodiment of the present disclosure is first described in detail. The execution subject of the web page request processing method provided in the embodiment of the present disclosure is generally an electronic device. The electronic device can be a server. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud storage, big data and artificial intelligence platforms. In other embodiments, the electronic device can also be a terminal device, wherein the terminal device can be a mobile device, a user terminal, a terminal, a handheld device, a computing device, an in-vehicle device, a wearable device, etc.

[0113] In other embodiments, the method can also be applied to an implementation environment consisting of a terminal device and a server. In addition, the web page request processing method can also be implemented by a processor calling a computer-readable instruction stored in a memory.

[0114] A web page request processing method provided by an embodiment of the present disclosure is described below with reference to the accompanying drawings.

[0115] See also Figure 1 As shown in FIG, a flow chart of a web page request processing method provided by an embodiment of the present disclosure is shown in FIG. Figure 1 As shown in , the method includes steps S101 to S104, wherein:

[0116] S101: receiving a webpage request for a target webpage, and detecting user behavior data and the number of requests for the webpage request within a preset time period after receiving the webpage request; the webpage request does not include user identity information.

[0117] Here, the target web page can be any browser web page or any application web page, which is not limited here.

[0118] The webpage request for the target webpage may be a webpage request initiated by a user through a target device, wherein the target device may be a terminal device, such as a mobile phone, a computer, etc. In other embodiments, the webpage request for the target webpage may also be a forged request.

[0119] The preset time period can be set according to actual needs, for example, it can be 30 seconds or 60 seconds, etc., which is not limited here.

[0120] In this embodiment, user behavior data may include the number of keyboard input actions, the number of mouse control actions, and the number of touchpad control actions. Mouse control actions may include mouse click actions (such as single clicks and double clicks), mouse movement actions, and mouse scroll bar rotation actions. In other embodiments, keyboard input actions may include character input actions, shortcut key click actions, etc., and touchpad control actions may include touchpad click actions (such as single clicks and double clicks) and touchpad sliding actions.

[0121] After receiving a webpage request for a target webpage, there may be a user refresh request or a forged webpage request for high-frequency malicious access. Therefore, it is necessary to detect the request count of the webpage request. Here, it should be noted that in this embodiment, multiple webpage requests are all for the same target webpage.

[0122] The user identity information may include user login information or account information, etc., which is not limited here.

[0123] Optionally, based on the foregoing, a web page request can be generated based on the user's input operation on the browser. At this time, it can be detected whether the browser is in debugging mode. If it is determined that the browser is in debugging mode, the current page displayed by the browser is refreshed.

[0124] Here, some users may debug the target page (such as viewing the page code, etc.) when accessing it. In order to avoid malicious debugging of the target page by users (such as decrypting or modifying the page code, etc.), this embodiment will refresh the current page when the browser is in debugging mode.

[0125] S102: Using a human-machine weight algorithm, a human-machine evaluation score is determined based on the user behavior data and the number of requests for the web page request, and based on the human-machine evaluation score, it is determined whether the web page request is a real user request or a machine-simulated request.

[0126] Among them, the user's real request can refer to the real request for the target web page initiated by the user through the electronic device; the machine simulation request can refer to the simulated request for the target web page. In the Distributed Denial of Service Attack (DDoS) scenario, the attack on the attacked target can be completed through a large number of machine simulation requests.

[0127] In the disclosed embodiments, a human-machine weighting algorithm is used to determine a human-machine evaluation score based on user behavior data for a target webpage and the number of webpage requests. The human-machine evaluation score is then used to determine whether the webpage request is a real user request or a simulated request. It should be understood that user behavior data can indicate whether a user has performed an action, and the number of webpage requests can indicate whether the target webpage is frequently visited. Therefore, the human-machine evaluation score can be determined based on user behavior data and the number of webpage requests.

[0128] In some embodiments, after receiving a web page request for a target web page, the device information of the target device that initiated the web page request can also be obtained, and based on the device information of the target device, a human-machine evaluation storage field uniquely corresponding to the target device is generated; the human-machine evaluation storage field is used to store the human-machine evaluation score.

[0129] As can be seen from the foregoing, the target device may include a terminal device, so the device information may include the hardware information of the device. Of course, since the device information between different target devices may be the same, it is also possible to set an identification number for each target device to uniquely identify the target device, thereby generating a human-machine evaluation storage field uniquely corresponding to the target device. From using this human-machine evaluation storage field to store the human-machine evaluation score generated later, it can be understood that since the web page request processing method provided in this embodiment is real-time, the human-machine evaluation score may also change in real time. Storing the human-machine evaluation score through this field facilitates the management of the human-machine evaluation score.

[0130] The details of step S102 will be introduced later.

[0131] S103: If the web page request is a genuine request from the user, determine whether to access the target web page based on a first interface signature key for the web page request generated by calling a front-end service and a second interface signature key for the web page request generated by calling a back-end service.

[0132] It can be understood that if the web page request is a real request from the user, the subsequent access process can continue. Specifically, whether to access the target web page can be determined based on the first interface signature key for the web page request generated by calling the front-end service and the second interface signature key for the web page request generated by calling the back-end service.

[0133] Optionally, with respect to step S103, when the webpage request is a genuine request of the user, determining whether to access the target webpage based on the first interface signature key for the webpage request generated by calling the front-end service and the second interface signature key for the webpage request generated by calling the back-end service may include the following steps (1) to (3):

[0134] (1) When the web page request is a genuine request from the user, a front-end service is called to generate a first interface signature key for the web page request based on a first preset encryption rule; the human-machine weight algorithm and the first preset encryption rule are stored in the form of an encrypted code block.

[0135] It can be understood that if the web page request is a real request from the user, the subsequent access process can continue, that is, calling the front-end service to generate a first interface signature key for the web page request based on the first preset encryption rule.

[0136] In addition, the encrypted code block of the human-machine weight algorithm and the first preset encryption rule can be obtained through the following steps: using a code obfuscation tool to compress and obfuscate the initial code containing the human-machine weight algorithm and the first preset encryption rule to obtain a first processing result, and then encoding and encrypting the first processing result to obtain an encrypted code module, thereby increasing the unreadable nature of the code and thus improving the security of the code.

[0137] Among them, the code obfuscation tool may include JShaman, which is a tool for obfuscating and encrypting JavaScript code to prevent the JavaScript code from being read, modified, and decompiled.

[0138] During engineering implementation, JShaman can be used to encrypt the initial code to obtain an independent code block. Specifically, JShaman converts the initial code into an abstract syntax tree (AST), and then encrypts it to obtain a code block. This makes the code block unreadable and unrecoverable, thus preventing the code from being read or tampered with, which is beneficial to improving the security of the code.

[0139] In other embodiments, if the web page request is a machine simulation request, the front-end service is called to perform a first interception process on the web page request, thereby avoiding malicious access.

[0140] Optionally, with respect to step S103, generating a first interface signature key for the webpage request based on a first preset encryption rule when calling the front-end service includes the following steps (a) to (c):

[0141] (a) Obtain the initial key and timestamp for the current signature.

[0142] The initial key can be set according to actual needs and is not limited here.

[0143] The timestamp is unique, which helps to improve the security of the first interface signature key.

[0144] (b) determining the sum of the ASCII code values ​​of the initial key.

[0145] In this embodiment, the initial password is in the form of a string. Therefore, each character in the string can be converted into an ASCII code value, and the sum of the ASCII code values ​​of each character is determined to obtain the sum of the ASCII code values ​​of the initial key.

[0146] (c) generating a random number, and generating the first interface signature key based on the human-machine evaluation score, the sum of the ASCII code values, the timestamp, and the random number.

[0147] Here, the random number may be a random character string.

[0148] In this way, the first interface signature key can be generated based on the human-machine evaluation score, the sum of the ASCII code values, the timestamp and the random number. In this implementation, the first interface signature key is dynamically generated in the above manner, which is conducive to improving the complexity and unpredictability of the first interface signature key, thereby reducing the risk of the key being copied and leaked.

[0149] In some embodiments, after generating the first interface signing key, the front-end service will splice the request parameters of the web page request (request body, timestamp, random number, human-machine evaluation score, user ID, etc.) in a random order, and then send the web page request carrying the first interface signing key to the back-end service.

[0150] (2) sending the webpage request carrying the first interface signature key to a backend service, and calling the backend service to generate a second interface signature key for the webpage request based on a second preset encryption rule; the second preset encryption rule is the same as the first preset encryption rule.

[0151] After the first interface signature key is generated, the webpage request carrying the first interface signature key is sent to the backend service, and the backend service is called to determine the second interface signature key for the webpage request.

[0152] Here, the backend service uses the same encryption rule (ie, the second preset encryption rule is the same as the first preset encryption rule) to encrypt the request parameters and the key carried in the web page request to obtain the second interface signature key.

[0153] The first interface signature key (sign) will be included in the request body of the web page request. At the same time, the request body will also be appended with a timestamp parameter (timestamp) and a random number parameter (nonce).

[0154] Here, the encryption rule may include a symmetric encryption algorithm, for example, an MD5 message-digest algorithm (MD5 Message-Digest Algorithm).

[0155] (3) Determine whether to access the target webpage based on whether the first interface signature key is the same as the second interface signature key and the usage status of the first interface signature key.

[0156] Finally, by comparing the first interface signature key with the second interface signature key, and according to whether the first interface signature key is identical to the second interface signature key and the usage status of the first interface signature key, it is determined whether to access the target webpage.

[0157] Among them, the usage status of the first interface signature key can include an unused state and a used state. It should be noted that for each web page request, the usage status of the corresponding first interface signature key can be used to characterize whether the web page request accesses the target web page. If the target web page is not accessed, its usage status is an unused state. If the target web page has been accessed, its usage status will be changed to a used state. In this way, the same key can be avoided from being reused.

[0158] Therefore, in this embodiment, the backend service will compare the first interface signature key with the second interface signature key, and determine whether to access the target web page based on whether the first interface signature key is the same as the second interface signature key and the usage status of the first interface signature key.

[0159] Specifically, when the first interface signature key and the second interface signature key are the same and the usage status of the first interface signature key is unused, it is determined to access the target webpage.

[0160] It can be understood that if the first interface signature key is the same as the second interface signature key, the web page request is considered to be a normal request and not forged. At the same time, if the usage status of the first interface signature key is unused, it means that the web page request has not accessed the target web page. At this time, it can be determined that the target web page is accessed based on the web page request.

[0161] Similarly, when the first interface signature key is different from the second interface signature key, and / or the usage status of the first interface signature key is already used, the web page request is intercepted and processed based on the backend service.

[0162] Here, if the first interface signature key is different from the second interface signature key, it means that the web page request is a forged request. If the usage status of the first interface signature key is used, it means that the web page request has accessed the target web page and cannot be reused. The back-end service can perform a second interception process on the web page request, thereby further improving the security of the web page access process.

[0163] In some embodiments, after the front-end service generates the first interface signature key, it will write the first interface signature key into the database for storage. After the back-end service generates the second interface signature key, it will detect whether the first interface signature key is received. If not detected, it can also obtain the first interface signature key from the database and then perform subsequent key comparison.

[0164] In some embodiments, with respect to step S102, when a human-machine weighting algorithm is used to determine the human-machine evaluation score based on the user behavior data and the number of web page requests, the following steps (i) to (ii) may be included:

[0165] (i) determining a first score corresponding to the user behavior based on the user behavior data, and determining a second score corresponding to the number of requests for the web page within the preset time period.

[0166] As can be seen from the previous text, user behavior data includes the number of keyboard input behaviors, the number of mouse control behaviors, and the number of touchpad control behaviors. Therefore, the first score corresponding to the user behavior can be determined based on the number of keyboard input behaviors, the number of mouse control behaviors, and the number of touchpad control behaviors.

[0167] Specifically, with respect to step (i), when determining the first score corresponding to the user behavior based on the user behavior data, the following steps may be included: (A) to (C):

[0168] (A) Constructing a first vector according to the number of keyboard input behaviors, the number of mouse control behaviors, and the number of touchpad control behaviors.

[0169] After determining the number of keyboard input behaviors, the number of mouse control behaviors, and the number of touchpad control behaviors, a first vector is constructed based on the number of the above behaviors.

[0170] For example, see formula (1), which is the expression of the constructed first vector:

[0171] (1)

[0172] Where X is the first vector, The number of keyboard input behaviors, The number of mouse control behaviors, The number of touchpad control actions.

[0173] As mentioned above, mouse control behaviors can include mouse click behaviors (such as single-click behaviors and double-click behaviors), mouse movement behaviors, and mouse scroll bar rotation behaviors. Therefore, the expression of the first vector can also be shown as formula (2):

[0174] (2)

[0175] Where X is the first vector, The number of keyboard input behaviors, The number of mouse clicks, The number of mouse movements. The number of times the mouse scroll bar rotates. The number of mouse double-clicks. The number of times the touchpad controls behavior.

[0176] (B) Constructing a second vector based on the weights corresponding to the keyboard input behavior, the mouse control behavior, and the touchpad control behavior.

[0177] For example, see formula (3), which is the expression of the second vector corresponding to formula (1):

[0178] (3)

[0179] Where W is the second vector, The weight corresponding to the keyboard input behavior, is the weight corresponding to the mouse control behavior, The weight corresponding to the touchpad control behavior.

[0180] Similarly, we can also construct the expression of the second vector corresponding to formula (2), as shown in formula (4):

[0181] (4)

[0182] Where W is the second vector, The number of keyboard input behaviors, The number of mouse clicks, The number of mouse movements. The number of times the mouse scroll bar rotates. The number of mouse double-clicks. The number of times the touchpad controls behavior.

[0183] (C) Determining the first score based on the first vector and the second vector.

[0184] Here, the first vector and the second vector can be multiplied to obtain the first score corresponding to the user behavior, as shown in formula (5):

[0185] (5)

[0186] in, is the first score, X is the first vector, and W is the second vector.

[0187] In the embodiment of the present disclosure, the preset time period includes multiple time windows, each time window corresponds to a score weight, and the score weights corresponding to different time windows can be the same or different, which is not limited here.

[0188] Exemplarily, the start time of the preset time period is the moment when the webpage request is received (which can be defaulted to the 0th second), and the end time is the moment 1 minute later, then the multiple time windows may include 0-1 seconds, 0-10 seconds and 0-60 seconds.

[0189] Specifically, with respect to step (i), when determining the second score corresponding to the number of requests for the web page within the preset time, the following steps may be included: (I) to (II):

[0190] (I) For each time window, determine a score corresponding to the time window according to the number of requests for the web page within the time window and the score weight corresponding to the time window.

[0191] See formula (6), which shows the expression for determining the score corresponding to each time window:

[0192] (6)

[0193] in, is the score corresponding to the time window, is the score weight corresponding to the time window, is the number of web page requests within the time window, j is the time window.

[0194] For example, the multiple time windows are 0-1 seconds, 0-10 seconds, and 0-60 seconds, and the score expressions corresponding to each time window are shown in formulas (7)-(9):

[0195] (7)

[0196] (8)

[0197] (9)

[0198] (II) Obtaining a preset abnormality deduction score, and determining the second score based on the abnormality deduction score and the sum of the scores corresponding to each time window.

[0199] The abnormal deduction score can be set according to actual needs and is not limited here. In this embodiment, the abnormal deduction score is 10.

[0200] The expression of the second score is shown in formula (10):

[0201] (10)

[0202] in, For the second score, is the score corresponding to the time window, Points are deducted for anomalies.

[0203] In addition, the abnormal deduction score in formula (10) may refer to abnormalities in web page requests, such as request frequency greater than the preset frequency threshold, errors in request parameters of periodic requests or web page requests, where the preset frequency threshold is usually set to a large value, such as 1000; periodic requests may refer to the same time interval between each request; errors in request parameters may refer to the lack of parameters in the request parameters or the increase of unnecessary parameters in the request parameters.

[0204] (ii) obtaining a basic score, and determining a human-machine evaluation score based on the basic score, the first score, and the second score.

[0205] Here, the basic score can be set according to actual needs and is not limited here. In this embodiment, the basic score is 60.

[0206] In this way, after determining the first score and the second score, the human-machine evaluation score can be determined based on the basic score, the first score, and the second score, as shown in formula (11):

[0207] (11)

[0208] in, For human-machine evaluation scores, As the basic score.

[0209] After the human-machine evaluation score is determined, it can be determined whether the webpage request is a real user request or a forged machine-simulated request based on the human-machine evaluation score.

[0210] Specifically, if the human-machine evaluation score is less than a preset threshold, the web page request is determined to be a machine-simulated request; if the human-machine evaluation score is not less than the preset threshold, the web page request is determined to be a real user request.

[0211] The preset threshold value can be set according to actual needs, for example, the preset threshold value is 60.

[0212] Optionally, after the human-machine evaluation score is determined, the human-machine evaluation score may be stored in the human-machine evaluation storage field described in the aforementioned embodiment, and when the human-machine evaluation score is used, it may be extracted from the field.

[0213] See Figure 2 , which is a schematic diagram of the interaction between a front-end service and a back-end service provided in an embodiment of the present disclosure.

[0214] like Figure 2 As shown in, when the web page request is a real request from the user, the front-end service is called to generate a first interface signature key, and the web page request carrying the first interface signature key is sent to the back-end service. After the back-end service receives the web page request, it generates a second interface signature key and detects whether the first interface signature key exists. If not, the first interface signature key is obtained from the database. Then the back-end service compares the first interface signature key and the second interface signature key, and obtains the usage status of the first interface signature key. If the first interface signature key and the second interface signature key are the same and the usage status of the first interface signature key is unused, the target web page is accessed and the web page data of the target web page is returned to the front-end service, otherwise it is intercepted.

[0215] See Figure 3 , which is a flowchart of another web page request processing method provided by an embodiment of the present disclosure.

[0216] like Figure 3 As shown in , the method includes steps S301 to S308:

[0217] S301: Receive a webpage request for a target webpage, and detect user behavior data and the number of requests for the webpage request within a preset time period after receiving the webpage request; the webpage request does not include user identity information.

[0218] S302: Using a human-machine weighting algorithm, a human-machine evaluation score is determined based on the user behavior data and the number of requests for the web page request, and based on the human-machine evaluation score, it is determined whether the web page request is a real request from the user. If so, step S303 is executed; if not, step S308 is executed.

[0219] S303: Calling a front-end service to generate a first interface signature key for the webpage request based on a first preset encryption rule; storing the human-machine weight algorithm and the first preset encryption rule in the form of an encrypted code block;

[0220] S304: Send the web page request carrying the first interface signature key to the backend service, and call the backend service to generate a second interface signature key for the web page request based on a second preset encryption rule; the second preset encryption rule is the same as the first preset encryption rule.

[0221] S305: Determine whether the first interface signature key and the second interface signature key are the same and whether the usage status of the first interface signature key is unused. If so, execute step S306; if not, execute step S307.

[0222] S306: Determine to access the target webpage.

[0223] S307: Perform a second interception process on the webpage request based on the backend service.

[0224] S308: Call the front-end service to perform a first interception process on the web page request.

[0225] The following combination Figure 3 The flowchart shown introduces the complete process of the web page request processing method.

[0226] In an embodiment of the present disclosure, after receiving a web page request for a target web page, user behavior data and the number of requests for the web page request within a preset time period after receiving the web page request are detected, and a human-machine weight algorithm is used to determine a human-machine evaluation score based on the user behavior data and the number of requests for the web page request. Based on the human-machine evaluation score, it is determined whether the web page request is a real request from the user. If it is not a real request from the user, the front-end service is called to perform a first interception process on the web page request.

[0227] If it is a real request from the user, the front-end service is called to generate a first key based on the first preset encryption rule, and then a web page request carrying the first interface signature key is sent to the back-end, and the back-end service is called to generate a second interface signature key for the web page request based on the second preset encryption rule, wherein the second preset encryption rule is the same as the first preset encryption rule, so that the back-end service can generate the same key, so that the first interface signature key and the second interface signature key can be compared. If the first interface signature key and the second interface signature key are the same and the usage status of the first interface signature key is unused, it means that there is no abnormality in the web page request, and the target web page is accessed. If the first interface signature key and the second interface signature key are different, and / or the usage status of the first interface signature key is used, it means that the web page request is abnormal, and the web page request is intercepted for the second time based on the back-end service.

[0228] Those skilled in the art will understand that in the above-mentioned method of the specific implementation method, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0229] Based on the same inventive concept, the embodiment of the present disclosure also provides a web page request processing device corresponding to the above-mentioned web page request processing method. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the above-mentioned web page request processing method in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0230] See also Figure 4 , Figure 4 Schematic diagram of a web page request processing device provided by an embodiment of the present disclosure. Figure 4 As shown in , the webpage request processing device 400 provided by the embodiment of the present disclosure includes:

[0231] The request receiving module 410 is configured to receive a webpage request for a target webpage and detect user behavior data and the number of requests for the webpage request within a preset time period after receiving the webpage request; the webpage request does not include user identity information;

[0232] The request judgment module 420 is configured to determine a human-machine evaluation score based on the user behavior data and the number of requests for the web page request using a human-machine weighting algorithm, and to determine whether the web page request is a real user request or a machine-simulated request based on the human-machine evaluation score;

[0233] The web page access module 430 is used to determine whether to access the target web page based on the first interface signature key for the web page request generated by calling the front-end service and the second interface signature key for the web page request generated by calling the back-end service when the web page request is a real request of the user.

[0234] See also Figure 5 , Figure 5 Schematic diagram of another webpage request processing device provided by an embodiment of the present disclosure. The device 400 also includes a request interception module 440, which is used to:

[0235] In the case that the web page request is the machine simulation request, the front-end service is called to perform a first interception process on the web page request.

[0236] In an optional implementation manner, the request determination module 420 is specifically configured to:

[0237] Determining a first score corresponding to the user behavior based on the user behavior data, and determining a second score corresponding to the number of requests based on the number of requests for the web page within the preset time period;

[0238] A basic score is obtained, and a human-machine evaluation score is determined based on the basic score, the first score, and the second score.

[0239] In an optional implementation, the user behavior data includes the number of keyboard input behaviors, the number of mouse control behaviors, and the number of touchpad control behaviors; the request determination module 420 is specifically configured to:

[0240] constructing a first vector according to the number of keyboard input actions, the number of mouse control actions, and the number of touchpad control actions;

[0241] constructing a second vector based on weights corresponding to the keyboard input behavior, the mouse control behavior, and the touchpad control behavior respectively;

[0242] The first score is determined based on the first vector and the second vector.

[0243] In an optional implementation, the preset time period includes multiple time windows, each time window corresponds to a score weight; the request determination module 420 is specifically configured to:

[0244] For each time window, determining a score corresponding to the time window according to the number of requests for the web page within the time window and the score weight corresponding to the time window;

[0245] A preset abnormality deduction score is obtained, and the second score is determined based on the abnormality deduction score and the sum of the scores corresponding to each time window.

[0246] In an optional implementation manner, the request determination module 420 is specifically configured to:

[0247] If the human-machine evaluation score is less than a preset threshold, it is determined that the webpage request is the machine simulation request.

[0248] In an optional implementation, the webpage access module 430 is specifically configured to:

[0249] In the case where the webpage request is a genuine request by the user, calling the front-end service to generate a first interface signature key for the webpage request based on a first preset encryption rule; the human-machine weight algorithm and the first preset encryption rule are stored in the form of an encrypted code block;

[0250] Sending the webpage request carrying the first interface signature key to a backend service, and invoking the backend service to generate a second interface signature key for the webpage request based on a second preset encryption rule; the second preset encryption rule is the same as the first preset encryption rule;

[0251] Whether to access the target webpage is determined based on whether the first interface signature key and the second interface signature key are the same and a usage status of the first interface signature key.

[0252] In an optional implementation, the webpage access module 430 is specifically configured to:

[0253] Get the initial key and the timestamp used for the current signature;

[0254] Determining the sum of the American Standard Code for Information Interchange (ASCII) code values ​​of the initial key;

[0255] Generate a random number, and generate the first interface signature key based on the human-machine evaluation score, the sum of the ASCII code values, the timestamp, and the random number.

[0256] In an optional implementation, the webpage access module 430 is specifically configured to:

[0257] In a case where the first interface signature key is the same as the second interface signature key and the usage status of the first interface signature key is unused, determining to access the target webpage;

[0258] When the first interface signature key is different from the second interface signature key, and / or the usage status of the first interface signature key is in a used state, a second interception process is performed on the web page request based on the backend service.

[0259] In an optional implementation, the apparatus further includes a field generation module 450, wherein the field generation module 450 is configured to:

[0260] Obtain device information of a target device that initiates the webpage request;

[0261] Based on the device information of the target device, a human-machine evaluation storage field uniquely corresponding to the target device is generated; the human-machine evaluation storage field is used to store the human-machine evaluation score.

[0262] In an optional implementation, the device further includes a code encryption module 460, and the code encryption module 460 is configured to:

[0263] Using a code obfuscation tool to perform compression and obfuscation processing on an initial code block including the human-machine weight algorithm and the first preset encryption rule to obtain a first processing result;

[0264] The first processing result is coded and encrypted to obtain the encrypted code block.

[0265] In an optional implementation, the apparatus further includes a refresh module 470, wherein the refresh module 470 is configured to:

[0266] Detecting whether the browser is in a debugging mode, and if it is determined that the browser is in the debugging mode, refreshing the current page displayed by the browser.

[0267] For descriptions of the processing flow of each module in the above-mentioned device and the interaction flow between each module, reference can be made to the relevant descriptions in the above-mentioned method embodiment, which will not be described in detail here.

[0268] Corresponding to the above-mentioned web page request processing method, the embodiment of the present disclosure further provides an electronic device 600, such as Figure 6 FIG. 6 is a schematic diagram of the structure of an electronic device 600 provided in an embodiment of the present disclosure, including:

[0269] Processor 610, memory 620, and bus 630. Memory 620 is used to store execution instructions and includes internal memory 621 and external memory 622. Memory 621, also referred to as internal memory, is used to temporarily store computational data from processor 610 and data exchanged with external memory 622, such as a hard disk. Processor 610 exchanges data with external memory 622 via internal memory 621.

[0270] In the embodiment of the present application, the memory 620 is specifically used to store application code for executing the solution of the present application, and the execution is controlled by the processor 610. That is, when the electronic device 600 is running, the processor 610 communicates with the memory 620 via the bus 630, so that the processor 610 executes the application code stored in the memory 620, thereby performing the web page request processing method described in the above method embodiment.

[0271] The memory 620 may be, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc.

[0272] Processor 610 may be an integrated circuit chip with signal processing capabilities. Such processors may be general-purpose processors, including central processing units (CPUs) and network processors (NPs). They may also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. They may implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. A general-purpose processor may be a microprocessor or any conventional processor.

[0273] It should be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device 600. In other embodiments of the present application, the electronic device 600 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0274] The present disclosure also provides a computer-readable storage medium having a computer program stored thereon. When executed by a processor, the computer program executes any of the webpage request processing methods described in the above method embodiments. The storage medium may be a volatile or non-volatile computer-readable storage medium.

[0275] The methods in the embodiments of the present disclosure may be implemented in whole or in part through software, hardware, firmware, or any combination thereof. When implemented using software, they may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described herein are performed in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device, a core network device, an OAM, or other programmable device.

[0276] The computer program or instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer program or instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired or wireless method. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; an optical medium, such as a digital video disk; or a semiconductor medium, such as a solid-state drive. The computer-readable storage medium may be a volatile or non-volatile storage medium, or may include both volatile and non-volatile types of storage media.

[0277] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The scope of protection of the present disclosure is not limited thereto. Although the present disclosure has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-described embodiments within the technical scope disclosed in the present disclosure, or replace some of the technical features therein with equivalents. Such modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure shall be subject to the scope of protection of the claims.

Claims

1. A web page request processing method, characterized in that: include: Receiving a webpage request for a target webpage, and detecting user behavior data and the number of requests for the webpage request within a preset time period after receiving the webpage request; The web page request does not include user identity information; Using a human-machine weighting algorithm, based on the user behavior data and the number of requests for the web page request, a human-machine evaluation score is determined, and based on the human-machine evaluation score, it is determined whether the web page request is a real user request or a machine-simulated request; In the case that the web page request is a genuine request of the user, based on the first interface signature key for the web page request generated by calling the front-end service and the second interface signature key for the web page request generated by calling the back-end service, it is determined whether to access the target web page, and in the case that it is determined that the target web page is accessed, the web page data of the target web page is sent to the front-end service.

2. The method according to claim 1, characterized in that The method further comprises: In the case that the web page request is the machine simulation request, the front-end service is called to perform a first interception process on the web page request.

3. The method according to claim 1, characterized in that The human-machine weight algorithm is used to determine the human-machine evaluation score based on the user behavior data and the number of requests for the web page, including: Determining a first score corresponding to the user behavior based on the user behavior data, and determining a second score corresponding to the number of requests based on the number of requests for the web page within the preset time period; A basic score is obtained, and the human-machine evaluation score is determined based on the basic score, the first score, and the second score.

4. The method according to claim 3, characterized in that The user behavior data includes the number of keyboard input behaviors, the number of mouse control behaviors, and the number of touchpad control behaviors; Determining a first score corresponding to the user behavior based on the user behavior data includes: constructing a first vector according to the number of keyboard input actions, the number of mouse control actions, and the number of touchpad control actions; constructing a second vector based on weights corresponding to the keyboard input behavior, the mouse control behavior, and the touchpad control behavior respectively; The first score is determined based on the first vector and the second vector.

5. The method according to claim 3, characterized in that The preset time period includes a plurality of time windows, each time window corresponding to a score weight; and determining, based on the number of requests for the web page within the preset time period, a second score corresponding to the number of requests, includes: For each time window, determining a score corresponding to the time window according to the number of requests for the web page within the time window and the score weight corresponding to the time window; A preset abnormality deduction score is obtained, and the second score is determined based on the abnormality deduction score and the sum of the scores corresponding to each time window.

6. The method according to claim 3, characterized in that The determining, based on the human-machine evaluation score, whether the webpage request is a real user request or a machine-simulated request includes: If the human-machine evaluation score is less than a preset threshold, it is determined that the webpage request is the machine simulation request.

7. The method according to claim 1, characterized in that When the webpage request is a genuine request by the user, determining whether to access the target webpage based on a first interface signature key for the webpage request generated by calling a front-end service and a second interface signature key for the webpage request generated by calling a back-end service includes: In the case where the webpage request is a genuine request by the user, calling the front-end service to generate a first interface signature key for the webpage request based on a first preset encryption rule; the human-machine weight algorithm and the first preset encryption rule are stored in the form of an encrypted code block; Sending the webpage request carrying the first interface signature key to a backend service, and invoking the backend service to generate a second interface signature key for the webpage request based on a second preset encryption rule; the second preset encryption rule is the same as the first preset encryption rule; Whether to access the target webpage is determined based on whether the first interface signature key and the second interface signature key are the same and a usage status of the first interface signature key.

8. The method according to claim 7, characterized in that The calling front-end service generates a first interface signature key for the webpage request based on a first preset encryption rule, including: Get the initial key and the timestamp used for the current signature; Determining the sum of the American Standard Code for Information Interchange (ASCII) code values ​​of the initial key; Generate a random number, and generate the first interface signature key based on the human-machine evaluation score, the sum of the ASCII code values, the timestamp, and the random number.

9. The method according to claim 7, characterized in that The determining whether to access the target webpage based on whether the first interface signature key and the second interface signature key are identical and the usage status of the first interface signature key includes: In a case where the first interface signature key is the same as the second interface signature key and the usage status of the first interface signature key is unused, determining to access the target webpage; When the first interface signature key is different from the second interface signature key, and / or the usage status of the first interface signature key is in a used state, a second interception process is performed on the web page request based on the backend service.

10. The method according to any one of claims 1 to 9, characterized in that: After receiving a webpage request for a target webpage, the method further includes: Obtain device information of a target device that initiates the webpage request; Based on the device information of the target device, a human-machine evaluation storage field uniquely corresponding to the target device is generated; the human-machine evaluation storage field is used to store the human-machine evaluation score.

11. The method according to claim 7, characterized in that The encryption code block including the human-machine weight algorithm and the first preset encryption rule is obtained according to the following steps: Using a code obfuscation tool to perform compression and obfuscation processing on an initial code block including the human-machine weight algorithm and the first preset encryption rule to obtain a first processing result; The first processing result is coded and encrypted to obtain the encrypted code block.

12. The method according to claim 1, characterized in that The webpage request is generated based on a user input operation on a browser, and the method further includes: Detecting whether the browser is in a debugging mode, and if it is determined that the browser is in the debugging mode, refreshing the current page displayed by the browser.

13. A web page request processing device, characterized in that: include: A request receiving module, configured to receive a webpage request for a target webpage, and detect user behavior data and the number of requests for the webpage request within a preset time period after receiving the webpage request; The web page request does not include user identity information; a request judgment module, configured to determine a human-machine evaluation score based on the user behavior data and the number of requests for the web page request using a human-machine weighting algorithm, and to judge whether the web page request is a real user request or a machine-simulated request based on the human-machine evaluation score; The web page access module is used to determine whether to access the target web page based on the first interface signature key for the web page request generated by calling the front-end service and the second interface signature key for the web page request generated by calling the back-end service when the web page request is a real request of the user, and when it is determined that the target web page is accessed, send the web page data of the target web page to the front-end service.

14. An electronic device, characterized in that: The electronic device comprises a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, a web page request processing method as described in any one of claims 1 to 12 is performed.

15. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the web page request processing method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Machine behavior determining method, webpage browser and webpage server

    CN102737019A

  • Dynamic key generation method and device and access method, device and system thereof

    CN117692137A