Access request processing method, system, device, storage medium and electronic device
By receiving and judging user information and request identification in access requests, the server error execution problem caused by error division of user-service type relationships is solved, and the precise partition of user traffic and the correct execution of business type is achieved.
Patent Information
- Application Number
- CN202111585104.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-22
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2041-12-22
AI Technical Summary
In the case of incorrect division of the relationship between the user and the business type, the server will perform incorrect services, and the precise division of user traffic and correct business execution cannot be achieved.
By receiving access requests sent by the loader, obtain user information and request identification, determine user attribute information, and determine whether the request identification is consistent with the target request identification in the whitelist. If it is inconsistent, return exception access information or update the request identification to ensure that the server is Execute business accurately.
It realizes accurate business execution for each user, avoids the server's wrong business execution, and ensures the precise division of user traffic and the correct execution of business types.
Smart Images

Figure CN114285893B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of financial technology, and specifically, to a method, system, device, storage medium and electronic device for processing access requests. Background Art
[0002] Before promoting new functions and new processes of a business, it is usually necessary to select some willing and qualified users to test the new business to ensure that there are no problems with the new business, so as to facilitate subsequent promotion. When problems occur during the testing of new business, the impact can be controlled to the selected users, avoiding the impact of the problem on all users and controlling the scope of the problem to the greatest extent.
[0003] When testing new services, the related technology is to build a grayscale server separately from the ordinary server, forward traffic from the network access level, and the ordinary server executes the old service process while the grayscale server executes the new service process. However, the related technology has a large granularity in the division of user traffic when forwarding traffic, and cannot accurately divide user traffic. In addition, if the relationship between users and service types is divided incorrectly, the server will execute the wrong service, causing a greater impact.
[0004] Currently, no effective solution has been proposed for the problem in the related art that when the relationship between users and service types is incorrectly divided, the server executes the wrong service. Summary of the invention
[0005] The present application provides a method, system, device, storage medium and electronic device for processing an access request to solve the problem in the related art that when the relationship between users and business types is incorrectly divided, the server executes the wrong business.
[0006] According to one aspect of the present application, a method for processing an access request is provided. The method includes: receiving an access request sent by a load device, and obtaining user information and a request identifier included in the access request, wherein the request identifier is used to characterize the server type corresponding to the user information; determining the user attribute information corresponding to the user information, and judging whether the request identifier is the same as the target request identifier corresponding to the user attribute information in the whitelist, wherein the whitelist includes preset user attribute information and a request identifier corresponding to the preset user attribute information; receiving the access request when the request identifier and the target request identifier are the same; and returning abnormal access information to the load device when the request identifier and the target request identifier are different.
[0007] Optionally, when the request identifier and the target request identifier are different, returning abnormal access information to the loader includes: when the request identifier and the target request identifier are different, replacing the request identifier in the access request with the target request identifier to obtain an updated access request; determining the updated access request as abnormal access information, and returning the abnormal access information to the loader.
[0008] Optionally, when the request identifier and the target request identifier are different, returning the abnormal access information to the loader includes: when the request identifier and the target request identifier are different, combining the user attribute information and the target request identifier into abnormal access information, and returning the abnormal access information to the loader.
[0009] Optionally, when the request identifier and the target request identifier are different, returning abnormal access information to the loader includes: when the request identifier and the target request identifier are different, generating information for indicating that the request identifier and the target request identifier are inconsistent, obtaining abnormal access information, and returning the abnormal access information to the loader.
[0010] Optionally, the preset user attribute information in the whitelist includes at least one of the following: user name, region information, and service type.
[0011] According to one aspect of the present application, another method for processing access requests is provided. The method includes: obtaining an access request sent by a client, and obtaining user information and a request identifier in the access request, wherein the request identifier is used to determine the server type corresponding to the user information; identifying the request identifier, obtaining the server corresponding to the request identifier, and sending the access request to the server; receiving abnormal access information sent by the server, wherein the abnormal access information is information sent by the server when the request identifier is different from the target request identifier in the server's whitelist, and the target request identifier is the target request identifier corresponding to the user attribute information of the user information; and returning the abnormal access information to the client.
[0012] Optionally, after returning the abnormal access information to the client, the method also includes: receiving an updated access request sent by the client; identifying the request identifier in the updated access request, obtaining an updated server corresponding to the request identifier, and sending the updated access request to the updated server, wherein the updated access request is an access request adjusted by the client based on the abnormal access information.
[0013] According to another aspect of the present application, a processing system for access requests is provided. The system includes: a client, used to send an access request, wherein the access request includes user information and a request identifier, wherein the request identifier is used to characterize the server type corresponding to the user information; a load device, connected to the client, used to obtain the access request, identify the request identifier, send the access request to the server corresponding to the request identifier, receive the abnormal access information returned by the server, and return the abnormal access request to the client; multiple servers, connected to the load device, respectively used to receive the access request sent by the load device, determine the user attribute information corresponding to the user information in the access request, and determine whether the request identifier in the access request is consistent with the target request identifier corresponding to the user attribute information in the white list, and receive the access request when the request identifier and the target request identifier are the same, and return the abnormal access information to the load device when the request identifier and the target request identifier are different, wherein the white list is stored in each server, and the white list includes preset user attribute information and the request identifier corresponding to the preset user attribute information.
[0014] According to another aspect of the present application, a device for processing access requests is provided. The device includes: a first receiving unit, which is used to receive an access request sent by a load device, and obtain the user information and request identifier included in the access request, wherein the request identifier is used to characterize the server type corresponding to the user information; a first judging unit, which is used to determine the user attribute information corresponding to the user information, and judge whether the request identifier is the same as the target request identifier corresponding to the user attribute information in the whitelist, wherein the whitelist includes preset user attribute information and the request identifier corresponding to the preset user attribute information; a second receiving unit, which is used to receive the access request when the request identifier and the target request identifier are the same; and a first returning unit, which is used to return abnormal access information to the load device when the request identifier and the target request identifier are different.
[0015] According to another aspect of the present application, another access request processing device is provided. The device includes: a first acquisition unit, used to acquire the access request sent by the client, and acquire the user information and request identifier in the access request, wherein the request identifier is used to determine the server type corresponding to the user information; a first identification unit, used to identify the request identifier, obtain the server corresponding to the request identifier, and send the access request to the server; a third receiving unit, used to receive abnormal access information sent by the server, wherein the abnormal access information is information sent by the server when the request identifier is different from the target request identifier in the server's whitelist, and the target request identifier is the target request identifier corresponding to the user attribute information of the user information; a second return unit, used to return the abnormal access information to the client.
[0016] According to another aspect of an embodiment of the present invention, a nonvolatile storage medium is provided. The nonvolatile storage medium includes a stored program. When the program is executed, the device where the nonvolatile storage medium is located is controlled to execute a method for processing an access request.
[0017] According to another aspect of an embodiment of the present invention, an electronic device is provided, comprising a processor and a memory; the memory stores computer-readable instructions, and the processor is used to execute the computer-readable instructions, wherein the computer-readable instructions execute a method for processing an access request when executed.
[0018] Through the present application, the following steps are adopted: receiving the access request sent by the load device, and obtaining the user information and request identifier included in the access request, wherein the request identifier is used to characterize the server type corresponding to the user information; determining the user attribute information corresponding to the user information, and judging whether the request identifier is the same as the target request identifier corresponding to the user attribute information in the whitelist, wherein the whitelist includes preset user attribute information and the request identifier corresponding to the preset user attribute information; receiving the access request when the request identifier and the target request identifier are the same; returning the abnormal access information to the load device when the request identifier and the target request identifier are not the same. The problem in the related art that the server executes the wrong business when the relationship between the user and the business type is incorrectly divided is solved. By adding an identifier to each user, judging the type of the user, confirming the user identifier according to the whitelist in the server, and returning the abnormal information when the user identifier is abnormal, the effect of each server accurately executing the corresponding business is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0020] Figure 1 is a flowchart of a method for processing an access request provided according to an embodiment of the present application;
[0021] Figure 2 is a flowchart of another method for processing an access request provided according to an embodiment of the present application;
[0022] Figure 3 is a schematic diagram of a system for processing access requests provided according to an embodiment of the present application;
[0023] Figure 4 is a flowchart of an optional access request processing method provided according to an embodiment of the present application;
[0024] Figure 5is a schematic diagram of a device for processing access requests provided according to an embodiment of the present application;
[0025] Figure 6 is a schematic diagram of another access request processing device provided according to an embodiment of the present application;
[0026] Figure 7 A schematic diagram of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0027] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0028] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0031] It should be noted that the access request processing method, system, device, storage medium and electronic device determined in the present disclosure can be used in the field of financial technology, and can also be used in any field other than the field of financial technology. The application field of the access request processing method, system, device, storage medium and electronic device determined in the present disclosure is not limited.
[0032] According to an embodiment of the present application, a method for processing an access request is provided.
[0033] Figure 1 1 is a flowchart of a method for processing an access request provided in an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:
[0034] Step S101, receiving an access request sent by a load device, and obtaining user information and a request identifier included in the access request, wherein the request identifier is used to characterize the server type corresponding to the user information.
[0035] Specifically, the loader can be used to send different access requests to different servers according to conditions. For example, after obtaining the access request, the loader recognizes that the access request carries a standard user identifier corresponding to the standard server, and then sends the access request to the standard server. After receiving the access request, the server identifies the user information and request identifier in the access request. Multiple servers are different servers corresponding to one request, and the content in each server is different feedback content corresponding to the request. For example, multiple servers can include standard servers and gray servers. The standard server can be a public test server provided to most users, and the gray server can be an internal test server provided to a small number of internal test users.
[0036] It should be noted that the request identifier includes the name of the target server for which the access request is applied and the user identifier corresponding to the user who sends the access request, wherein the user identifier can be used to characterize the server type corresponding to the user information, so that the server can determine whether the user can access the target server.
[0037] Step S102, determining the user attribute information corresponding to the user information, and judging whether the request identifier is the same as the target request identifier corresponding to the user attribute information in the whitelist, wherein the whitelist includes preset user attribute information and the request identifier corresponding to the preset user attribute information.
[0038] Specifically, user attribute information may include attribute information such as user ID, user region, and user gender. The whitelist is stored in each server and contains preset user information and preset request identifiers for all users. When the server receives an access request sent by the load device, it first extracts the user attribute information in the access request, and searches the whitelist for preset user attribute information that is the same as the user attribute information, and matches them to obtain the corresponding target request identifier. After a successful match, the request identifier in the access request and the target request identifier corresponding to the preset user attribute information are compared to determine whether the two request identifiers are the same, thereby determining the correctness of the access request content.
[0039] For example, the whitelist may include user attribute information such as gender information and name information of all users in region A, as well as preset request identifiers of the above users, and select information with the same user attribute information from the whitelist based on the access request. For example, the user attribute information of the access information may be: region A, male, user name. The corresponding preset user information and target request identifier found in the whitelist through the user attribute information may be: region A, male, user name, and accessible standard server. When the server recognizes that the user's request identifier is an accessible standard server, it is judged that the request identifier and the target request identifier are consistent. When the server recognizes that the user's request identifier is an accessible grayscale server, it is judged that the request identifier and the target request identifier are inconsistent.
[0040] It should be noted that in the event of an abnormality in the grayscale server, the access requests of all grayscale users corresponding to the grayscale server need to be sent to the standard server in a timely manner. At this time, the preset request identifiers of all users in the whitelist can be changed to accessible standard servers, and the access requests of all users can be sent to the standard server, thereby achieving the effect of preventing users from accessing the grayscale server.
[0041] Step S103: receiving an access request when the request identifier and the target request identifier are the same.
[0042] For example, when a user requests access to a standard server, the server recognizes that the access request may be: region A, male, user name, and accessible standard server, and finds the corresponding preset user information and preset request identifier in the whitelist, which may be region A, male, user name, and accessible standard server. If the request identifier and the target request identifier are consistent, the standard server receives the access request.
[0043] Step S104: When the request identifier and the target request identifier are not the same, the abnormal access information is returned to the loader.
[0044] For example, when a user requests access to a standard server, the server recognizes that the access request may be: region A, male, user name, and accessible standard server, and finds the corresponding preset user information and preset request identifier in the whitelist, which may be region A, male, user name, and accessible gray server. If it is determined that the request identifier and the target request identifier are inconsistent, the standard server will return the abnormal access information to the loader.
[0045] The processing method of the access request provided by the embodiment of the present application receives the access request sent by the load device, and obtains the user information and request identifier included in the access request, wherein the request identifier is used to characterize the server type corresponding to the user information; determines the user attribute information corresponding to the user information, and judges whether the request identifier is the same as the target request identifier corresponding to the user attribute information in the whitelist, wherein the whitelist includes preset user attribute information and the request identifier corresponding to the preset user attribute information; receives the access request when the request identifier and the target request identifier are the same; returns the abnormal access information to the load device when the request identifier and the target request identifier are not the same. The problem in the related art that the server executes the wrong business when the relationship between the user and the business type is incorrectly divided is solved. By adding an identifier to each user, judging the type of the user, confirming the user identifier according to the whitelist in the server, and returning the abnormal information when the user identifier is abnormal, the effect of each server accurately executing the corresponding business is achieved.
[0046] In order to generate an access request issued by the client carrying a correct request identifier, optionally, in the access request processing method provided in an embodiment of the present application, when the request identifier and the target request identifier are different, returning abnormal access information to the loader includes: when the request identifier and the target request identifier are different, replacing the request identifier in the access request with the target request identifier to obtain an updated access request; determining the updated access request as abnormal access information, and returning the abnormal access information to the loader.
[0047] Specifically, when the request identifier and the target request identifier are different, the server can delete the request identifier in the access request, obtain the target request identifier in the whitelist, use the target request identifier as the request identifier of the access request, and return the new access request to the loader.
[0048] For example, when a user requests to access a standard server, the server recognizes that the access request may be: region A, male, user name, accessible standard server, and finds the corresponding preset user information and preset request identifier in the whitelist as region A, male, user name, accessible gray server, then determines that the request identifier and the target request identifier are inconsistent, at this time, the request identifier accessible standard server is changed to accessible gray server, and a new request access is obtained: region A, male, user name, accessible gray server, and the request access is sent to the loader. This embodiment can replace the wrong request identifier in the access request with the correct request identifier, so that the corresponding server can be successfully accessed the next time the access is requested.
[0049] Optionally, in the access request processing method provided in an embodiment of the present application, when the request identifier and the target request identifier are different, returning abnormal access information to the loader includes: when the request identifier and the target request identifier are different, combining user attribute information and the target request identifier into abnormal access information, and returning the abnormal access information to the loader.
[0050] Specifically, when the request identifier and the target request identifier are different, the server may combine the request identifier in the access request and the target request identifier in the whitelist to obtain abnormal access information, and return the abnormal access information to the loader.
[0051] For example, when a user requests to access a standard server, the server recognizes that the access request may be: region A, male, user name, accessible standard server, and finds the corresponding preset user information and preset request identifier in the whitelist as region A, male, user name, accessible gray server, then the request identifier and the target request identifier are judged to be inconsistent. At this time, the request identifier accessible standard server and accessible gray server are combined, and "the request identifier is: accessible standard server, the target request identifier is: accessible gray server" is sent to the loader as the abnormal access information corresponding to the user. This embodiment can return the erroneous request identifier in the access request to the client together with the correct identifier, so as to facilitate the user and the system to modify the request identifier, and successfully access the corresponding server after the modification.
[0052] Optionally, in the access request processing method provided in an embodiment of the present application, when the request identifier and the target request identifier are different, returning abnormal access information to the loader includes: when the request identifier and the target request identifier are different, generating information for indicating that the request identifier and the target request identifier are inconsistent, obtaining abnormal access information, and returning the abnormal access information to the loader.
[0053] Specifically, when the request identifier and the target request identifier are different, the server can generate an alarm message to inform the user of the abnormal situation through the alarm message, and return the abnormal access information to the loader, and the user can select the subsequent access process.
[0054] For example, when a user requests to access a standard server, the server recognizes that the access request may be: region A, male, user name, accessible standard server, and finds the corresponding preset user information and preset request identifier in the whitelist as region A, male, user name, accessible gray server, then determines that the request identifier and the target request identifier are inconsistent. At this time, the server can generate an alarm message: "Request identifier abnormal!" and return the alarm message to the loader. This embodiment can generate an alarm message for abnormal access requests and return it to the client, and can generate a pop-up window on the client, so as to facilitate users and systems to modify the request identifier, and successfully access the corresponding server after the modification.
[0055] Optionally, in the access request processing method provided in the embodiment of the present application, the preset user attribute information in the whitelist includes at least one of the following: user name, region information, and service type.
[0056] Specifically, the setting of the request identifier can be set according to the user's user name, regional information, business type and other attributes. For example, the user can be classified according to the region or the surname of the user. The request identifier is set according to different classification methods to distinguish the user groups corresponding to different access requests. For example, the user who does not agree to use the new system is identified as being able to access the standard server, and the user who agrees to use the new system is identified as being able to access the gray server. At this time, when the user who does not agree to use the new system sends an access request, the access request is directly sent to the standard server to prevent the access request from entering the gray server. This embodiment achieves the effect of increasing the diversity of user classification through a variety of classification methods for whitelist content.
[0057] According to an embodiment of the present application, another method for processing an access request is provided. Figure 2 FIG. 1 is a flowchart of another method for processing an access request provided in an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:
[0058] Step S201, obtaining an access request sent by a client, and obtaining user information and a request identifier in the access request, wherein the request identifier is used to determine the server type corresponding to the user information.
[0059] Specifically, the access request includes user information and a request identifier. The request identifier includes the name of the target server that the access request is applying to access and the user identifier corresponding to the user sending the access request. The user identifier can be used to characterize the server type corresponding to the user information, so that the server can determine whether the user can access the target server.
[0060] Step S202: Identify the request identifier, obtain the server corresponding to the request identifier, and send the access request to the server.
[0061] For example, when the request identifier is an accessible standard server, it is determined that the server corresponding to the request identifier is a standard server, and the access request is sent to the standard server.
[0062] Step S203, receiving abnormal access information sent by the server, wherein the abnormal access information is information sent by the server when the request identifier is different from the target request identifier in the server's whitelist, and the target request identifier is the target request identifier corresponding to the user attribute information of the user information.
[0063] Specifically, when the request identifier is different from the target request identifier in the server's whitelist, the server returns the abnormal access information to the loader. For example, the server generates an alarm message to inform the user of the abnormal situation through the alarm message, and the loader sends the alarm message to the client.
[0064] Step S204: Return the abnormal access information to the client.
[0065] Specifically, the loader sends the abnormal access information to the client and feeds it back to the client, and the user further processes the abnormal access information. For example, when the request identifier is different from the target request identifier in the server's whitelist, the server generates an alarm message and informs the user of the abnormal situation through the alarm message. The loader sends the alarm message to the client and sends a pop-up window to display the alarm message.
[0066] The method for processing access requests provided in the embodiment of the present application is to obtain the access request sent by the client, and obtain the user information and request identifier in the access request, wherein the request identifier is used to determine the server type corresponding to the user information; identify the request identifier, obtain the server corresponding to the request identifier, and send the access request to the server; receive abnormal access information sent by the server, wherein the abnormal access information is the information sent by the server when the request identifier is different from the target request identifier in the server's white list, and the target request identifier is the target request identifier corresponding to the user attribute information of the user information; return the abnormal access information to the client. The problem in the related art that the server executes the wrong business when the relationship between the user and the business type is incorrectly divided is solved. By adding an identifier to each user, the type of the user is determined, the user identifier is confirmed in the server according to the white list, and the abnormal information is returned when the user identifier is abnormal, so as to achieve the effect of each server accurately executing the corresponding business.
[0067] Optionally, in the access request processing method provided in the embodiment of the present application, after returning the abnormal access information to the client, the method also includes: receiving an updated access request sent by the client; identifying the request identifier in the updated access request, obtaining an updated server corresponding to the request identifier, and sending the updated access request to the updated server, wherein the updated access request is an access request adjusted by the client based on the abnormal access information.
[0068] Specifically, after receiving a new access request sent by a client, the identification information in the access request is identified again, and the access request is sent to a corresponding service according to the identification information.
[0069] For example, the request identifier of user A can be an accessible standard server. After the loader identifies the request identifier, it sends the access request to the standard server. However, the preset request identifier of user A stored in the whitelist of the standard server is an accessible gray server. The standard server can change the identifier information to an accessible gray server and send the access request to the client through the loader. At this time, the client sends the updated access request. After the loader identifies the request identifier, it sends the access request to the gray server. At this time, the gray server determines that the request identifier is consistent with that in the whitelist, and receives the access request. This embodiment achieves the effect of re-access after the request identifier is changed, so that the user can access the corresponding server normally.
[0070] The embodiment of the present application also provides a system for processing access requests. It should be noted that the system for processing access requests in the embodiment of the present application can be used to execute the method for processing access requests provided in the embodiment of the present application. The system for processing access requests provided in the embodiment of the present application is introduced below.
[0071] Figure 3 Schematic diagram of a system for processing access requests provided according to an embodiment of the present application. Figure 3 As shown, the method includes:
[0072] The client 301 is used to send an access request, wherein the access request includes user information and a request identifier, wherein the request identifier is used to indicate the type of server 303 corresponding to the user information.
[0073] For example, when a user requests to access a standard server, the server may identify the access request as: region A, male, user name, and accessible standard server, where region A, male, and user name may be user information, and accessible standard server may be a request identifier, indicating that the access request can access the standard server.
[0074] The loader 302 is connected to the client 301 , and is used to obtain the access request, identify the request identifier, send the access request to the server 303 corresponding to the request identifier, receive the abnormal access information returned by the server 303 , and return the abnormal access request to the client 301 .
[0075] Specifically, the loader sends the access request to the corresponding server by determining the request identifier in the access request. For example, the access request may be: region A, male, user name, and accessible standard server. The loader then sends the access request to the standard server.
[0076] It should be noted that after the load receives the abnormal access information sent by the server, the abnormal access information is returned to the client. For example, if the load receives the alarm information sent by the server, the alarm information is returned to the client.
[0077] Multiple servers 303 are connected to the load device 302, and are respectively used to receive access requests sent by the load device 302, determine user attribute information corresponding to the user information in the access request, and judge whether the request identifier in the access request and the target request identifier corresponding to the user attribute information in the whitelist are consistent. When the request identifier and the target request identifier are the same, the access request is received; when the request identifier and the target request identifier are different, abnormal access information is returned to the load device 302, wherein the whitelist is stored in each server 303, and the whitelist includes preset user attribute information and a request identifier corresponding to the preset user attribute information.
[0078] Specifically, after each server 303 receives the access request, it identifies the user information and request identifier in the access request. Multiple servers 303 may include standard servers and grayscale servers. The standard server may be a public beta server provided to most users, and the grayscale server may be an internal beta server provided to a small number of internal beta users.
[0079] Then, the user attribute information in the access request is extracted, and the preset user attribute information that is the same as the user attribute information is searched in the whitelist and matched to obtain the corresponding target request identifier. After the match is successful, the request identifier in the access request and the target request identifier corresponding to the preset user attribute information are compared to determine whether the two request identifiers are the same, thereby determining the correctness of the access request content.
[0080] For example, the whitelist may include user attribute information such as gender information and name information of all users in region A, as well as preset request identifiers of the above users, and select information with the same user attribute information from the whitelist based on the access request. For example, the user attribute information of the access information may be: region A, male, user name. The corresponding preset user information and target request identifier found in the whitelist through the user attribute information may be: region A, male, user name, and accessible standard server. When the server 303 recognizes that the user's request identifier is an accessible standard server, it is judged that the request identifier and the target request identifier are consistent. When the server 303 recognizes that the user's request identifier is an accessible grayscale server, it is judged that the request identifier and the target request identifier are inconsistent, and abnormal access information is generated, and the abnormal access information is returned to the loader 302.
[0081] The access request processing system provided by the embodiment of the present application sends an access request through a client 301, wherein the access request includes user information and a request identifier, wherein the request identifier is used to characterize the type of server 303 corresponding to the user information. The load 302 is connected to the client 301, and is used to obtain the access request, identify the request identifier, send the access request to the server 303 corresponding to the request identifier, and receive the abnormal access information returned by the server 303, and return the abnormal access request to the client 301. Multiple servers 303 are connected to the load 302, and are respectively used to receive the access request sent by the load 302, determine the user attribute information corresponding to the user information in the access request, and determine whether the request identifier in the access request is consistent with the target request identifier corresponding to the user attribute information in the white list. If the request identifier and the target request identifier are the same, the access request is received, and if the request identifier and the target request identifier are not the same, the abnormal access information is returned to the load 302, wherein the white list is stored in each server 303, and the white list includes preset user attribute information and the request identifier corresponding to the preset user attribute information. The problem in the related art that the server executes the wrong service when the relationship between the user and the service type is incorrectly divided is solved. By adding an identifier to each user, judging the type of the user, confirming the user identifier according to the whitelist in the server, and returning abnormal information when the user identifier is abnormal, each server can accurately execute the corresponding service.
[0082] Figure 4 is a flowchart of an optional access request processing method provided according to an embodiment of the present application, which is applied to the access request processing system of the above embodiment, such as Figure 4As shown, the client 301 sends an access request to the load 302, wherein the access request may be: region A, male, user name, accessible grayscale server. The load 302 recognizes that the request identifier of the access request is an accessible grayscale server, and then sends the access request to the grayscale server 3031. The grayscale server 3031 first determines whether the request identifier corresponding to region A, male, and user name in the whitelist is an accessible grayscale server 3031. If the request identifier is an accessible grayscale server 3031, the access request is received. If the request identifier is an accessible standard server 3032, the access request is received. Under the circumstance, abnormal access information is generated and returned to the loader 302, which is then returned to the client 301 by the loader 302. After the request identifier in the access request is modified to an accessible standard server in the client 301, the client 301 sends the access request to the loader 302 again, which is allocated again by the loader 302. At this time, the loader 302 sends the access request to the standard server 3032. The standard server 3032 determines that the request identifier corresponding to the region A, male, and user name in the whitelist is an accessible standard server 3032, and then receives the access request.
[0083] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0084] The embodiment of the present application also provides a device for processing access requests. It should be noted that the device for processing access requests in the embodiment of the present application can be used to execute the method for processing access requests provided in the embodiment of the present application. The device for processing access requests provided in the embodiment of the present application is introduced below.
[0085] Figure 5 is a schematic diagram of an access request processing device provided according to an embodiment of the present application. Figure 5 As shown, the device comprises:
[0086] The first receiving unit 501 is used to receive an access request sent by the load device, and obtain the user information and the request identifier included in the access request, wherein the request identifier is used to indicate the server type corresponding to the user information;
[0087] A first determination unit 502 is used to determine the user attribute information corresponding to the user information, and to determine whether the request identifier is the same as the target request identifier corresponding to the user attribute information in the whitelist, wherein the whitelist includes preset user attribute information and the request identifier corresponding to the preset user attribute information;
[0088] The second receiving unit 503 is used to receive the access request when the request identifier and the target request identifier are the same;
[0089] The first returning unit 504 is used to return the abnormal access information to the loader when the request identifier and the target request identifier are different.
[0090] The access request processing device provided in the embodiment of the present application receives the access request sent by the load device through the first receiving unit 501, and obtains the user information and request identifier included in the access request, wherein the request identifier is used to characterize the server type corresponding to the user information; the first judgment unit 502 determines the user attribute information corresponding to the user information, and judges whether the request identifier and the target request identifier corresponding to the user attribute information in the white list are the same, wherein the white list includes preset user attribute information and the request identifier corresponding to the preset user attribute information; the second receiving unit 503 receives the access request when the request identifier and the target request identifier are the same; the first return unit 504 returns the abnormal access information to the load device when the request identifier and the target request identifier are not the same. The problem of the server executing the wrong business in the case of the wrong division of the relationship between the user and the business type in the related technology is solved. By adding an identifier to each user, judging the type of the user, confirming the user identifier according to the white list in the server, and returning the abnormal information when the user identifier is abnormal, the effect of each server accurately executing the corresponding business is achieved.
[0091] Optionally, in the access request processing device provided in the embodiment of the present application, the first return unit 504 includes: a first replacement module, used to replace the request identifier in the access request with the target request identifier when the request identifier and the target request identifier are different, so as to obtain an updated access request; a first return module, used to determine the updated access request as abnormal access information, and return the abnormal access information to the loader.
[0092] Optionally, in the access request processing device provided in an embodiment of the present application, the first return unit 504 includes: a second return module, which is used to combine user attribute information and target request identifier into abnormal access information when the request identifier and the target request identifier are different, and return the abnormal access information to the loader.
[0093] Optionally, in the access request processing device provided in an embodiment of the present application, the first return unit 504 includes: a third return module, which is used to generate information indicating that the request identifier and the target request identifier are inconsistent when the request identifier and the target request identifier are different, obtain abnormal access information, and return the abnormal access information to the loader.
[0094] Optionally, in the access request processing device provided in the embodiment of the present application, the preset user attribute information in the whitelist includes at least one of the following: user name, region information, and service type.
[0095] The access request processing device includes a processor and a memory. The first receiving unit 501, the first judgment unit 502, the second receiving unit 503, the first return unit 504, etc. are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions.
[0096] Figure 6 FIG. 1 is a schematic diagram of another access request processing device provided according to an embodiment of the present application. Figure 6 As shown, the device comprises:
[0097] The first acquisition unit 601 is used to acquire the access request sent by the client, and acquire the user information and the request identifier in the access request, wherein the request identifier is used to determine the server type corresponding to the user information;
[0098] A first identification unit 602 is used to identify the request identifier, obtain the server corresponding to the request identifier, and send the access request to the server;
[0099] The third receiving unit 603 is used to receive abnormal access information sent by the server, wherein the abnormal access information is information sent by the server when the request identifier is different from the target request identifier in the whitelist of the server, and the target request identifier is the target request identifier corresponding to the user attribute information of the user information;
[0100] The second returning unit 604 is used to return the abnormal access information to the client.
[0101] The access request processing device provided in the embodiment of the present application is used to obtain the access request sent by the client through the first acquisition unit 601, and obtain the user information and request identifier in the access request, wherein the request identifier is used to determine the server type corresponding to the user information; the first identification unit 602 is used to identify the request identifier, obtain the server corresponding to the request identifier, and send the access request to the server; the third receiving unit 603 is used to receive abnormal access information sent by the server, wherein the abnormal access information is the information sent by the server when the request identifier is different from the target request identifier in the white list of the server, and the target request identifier is the target request identifier corresponding to the user attribute information of the user information; the second returning unit 604 is used to return the abnormal access information to the client. The problem of the server executing the wrong business in the case of the wrong division of the relationship between the user and the business type in the related technology is solved. By adding an identifier to each user, judging the type of the user, confirming the user identifier according to the white list in the server, and returning the abnormal information when the user identifier is abnormal, the effect of each server accurately executing the corresponding business is achieved.
[0102] Optionally, in the access request processing device provided in the embodiment of the present application, the device also includes: a fourth receiving unit, used to receive an updated access request sent by the client; a second identification unit, used to identify the request identifier in the updated access request, obtain an updated server corresponding to the request identifier, and send the updated access request to the updated server, wherein the updated access request is an access request adjusted by the client based on the abnormal access information.
[0103] The processing device for the access request includes a processor and a memory. The first acquisition unit 601, the first identification unit 602, the third receiving unit 603, the second return unit 604, etc. are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions.
[0104] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the problem of the server executing the wrong service in the related art due to the incorrect division of the relationship between users and service types is solved by adjusting the kernel parameters.
[0105] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0106] An embodiment of the present invention provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the method for processing the access request is implemented.
[0107] An embodiment of the present invention provides a processor, which is used to run a program, wherein the method for processing an access request is executed when the program is running.
[0108] like Figure 7 As shown, an embodiment of the present invention provides an electronic device 701, the device includes a processor, a memory and a program stored in the memory and can be run on the processor, and the processor implements the following steps when executing the program: receiving an access request sent by a load device, and obtaining the user information and request identifier included in the access request, wherein the request identifier is used to characterize the server type corresponding to the user information; determining the user attribute information corresponding to the user information, and judging whether the request identifier is the same as the target request identifier corresponding to the user attribute information in the whitelist, wherein the whitelist includes preset user attribute information and the request identifier corresponding to the preset user attribute information; receiving the access request when the request identifier and the target request identifier are the same; returning the abnormal access information to the load device when the request identifier and the target request identifier are not the same. The device in this article can be a server, PC, PAD, mobile phone, etc.
[0109] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that is initialized with the following method steps: receiving an access request sent by a load device, and obtaining user information and a request identifier included in the access request, wherein the request identifier is used to characterize the server type corresponding to the user information; determining user attribute information corresponding to the user information, and judging whether the request identifier and a target request identifier corresponding to the user attribute information in a whitelist are the same, wherein the whitelist includes preset user attribute information and a request identifier corresponding to the preset user attribute information; receiving the access request when the request identifier and the target request identifier are the same; and returning abnormal access information to the load device when the request identifier and the target request identifier are different.
[0110] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, unable to accurately and conveniently determine and change user types D-ROM, optical storage, etc.) that contain computer-usable program codes.
[0111] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0112] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0113] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0114] In a typical configuration, the computing device includes one or more processors (which cannot accurately and conveniently determine the user type and change the PU), an input / output interface, a network interface, and a memory.
[0115] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0116] Computer readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disc read-only memory (D-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0117] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0118] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0119] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for processing an access request, characterized in that: include: Receive an access request sent by a load device, and obtain user information and a request identifier included in the access request, wherein the request identifier is used to characterize a server type corresponding to the user information, the server type includes a grayscale server and a standard server, and the user accesses servers of different server types according to the access request; Determine user attribute information corresponding to the user information, and judge whether the request identifier is the same as a target request identifier corresponding to the user attribute information in a whitelist, wherein the whitelist includes preset user attribute information and a request identifier corresponding to the preset user attribute information; In a case where the request identifier and the target request identifier are the same, receiving the access request; In the case where the request identifier and the target request identifier are not the same, returning abnormal access information to the loader; In the case where the request identifier and the target request identifier are different, returning the abnormal access information to the load device includes: in the case where the request identifier and the target request identifier are different, replacing the request identifier in the access request with the target request identifier to obtain an updated access request; determining the updated access request as the abnormal access information, and returning the abnormal access information to the load device; In the event of an abnormality in the grayscale server, the preset request identifiers of all users in the whitelist are all changed to access the standard server, so that the access requests of the grayscale users corresponding to all grayscale servers are sent to the standard server.
2. The method according to claim 1, characterized in that When the request identifier and the target request identifier are different, returning the abnormal access information to the loader includes: In the case that the request identifier and the target request identifier are different, the user attribute information and the target request identifier are combined into the abnormal access information, and the abnormal access information is returned to the loader.
3. The method according to claim 1, characterized in that When the request identifier and the target request identifier are different, returning abnormal access information to the loader includes: In the case that the request identifier and the target request identifier are not the same, information indicating that the request identifier and the target request identifier are inconsistent is generated, the abnormal access information is obtained, and the abnormal access information is returned to the loader.
4. The method according to claim 1, characterized in that: The preset user attribute information in the whitelist includes at least one of the following: user name, region information, and service type.
5. A method for processing an access request, characterized in that: include: Obtaining an access request sent by a client, and obtaining user information and a request identifier in the access request, wherein the request identifier is used to determine a server type corresponding to the user information, the server type including a grayscale server and a standard server, and the user accesses servers of different server types according to the access request; Identify the request identifier, obtain a server corresponding to the request identifier, and send the access request to the server; receiving abnormal access information sent by the server, wherein, when the request identifier is different from a target request identifier in a whitelist of the server, replacing the request identifier in the access request with the target request identifier to obtain an updated access request, determining the updated access request as the abnormal access information, and the target request identifier is a target request identifier corresponding to the user attribute information of the user information; Returning the abnormal access information to the client; After returning the abnormal access information to the client, the method further includes: receiving an updated access request sent by the client; identifying a request identifier in the updated access request, obtaining an updated server corresponding to the request identifier, and sending the updated access request to the updated server, wherein the updated access request is an access request adjusted by the client based on the abnormal access information; In the event of an abnormality in the grayscale server, the preset request identifiers of all users in the whitelist are all changed to access the standard server, so that the access requests of the grayscale users corresponding to all grayscale servers are sent to the standard server.
6. A system for processing access requests, characterized in that: The access request processing system is used to execute the access request processing method according to any one of claims 1 to 5, comprising: A client, used to send an access request, wherein the access request includes user information and a request identifier, wherein the request identifier is used to indicate a server type corresponding to the user information, wherein the server type includes a grayscale server and a standard server, and the user accesses servers of different server types according to the access request; A loader connected to the client, used to obtain the access request, identify the request identifier, send the access request to the server corresponding to the request identifier, receive abnormal access information returned by the server, and return the abnormal access request to the client; A plurality of the servers are connected to the load device, and are respectively used to receive access requests sent by the load device, determine user attribute information corresponding to user information in the access request, and judge whether the request identifier in the access request is consistent with the target request identifier corresponding to the user attribute information in the whitelist. In the case that the request identifier and the target request identifier are the same, the access request is received, and in the case that the request identifier and the target request identifier are not the same, abnormal access information is returned to the load device, wherein the whitelist is stored in each of the servers, and the whitelist includes preset user attribute information and a request identifier corresponding to the preset user attribute information, wherein, in the case of an abnormality in a grayscale server, the preset request identifiers of all users in the whitelist are all changed to access standard servers, so that access requests of grayscale users corresponding to all grayscale servers are sent to the standard servers; When the request identifier and the target request identifier are different, returning the abnormal access information to the loader includes: when the request identifier and the target request identifier are different, replacing the request identifier in the access request with the target request identifier to obtain an updated access request; determining the updated access request as the abnormal access information, and returning the abnormal access information to the loader.
7. A device for processing access requests, characterized in that: include: A first receiving unit is used to receive an access request sent by a load device, and obtain user information and a request identifier included in the access request, wherein the request identifier is used to characterize a server type corresponding to the user information, the server type includes a gray server and a standard server, and the user accesses servers of different server types according to the access request; A first judgment unit is used to determine the user attribute information corresponding to the user information, and to judge whether the request identifier is the same as the target request identifier corresponding to the user attribute information in the whitelist, wherein the whitelist includes preset user attribute information and the request identifier corresponding to the preset user attribute information, wherein, in the event of an abnormality in the grayscale server, the preset request identifiers of all users in the whitelist are all changed to access the standard server, so as to send the access requests of the grayscale users corresponding to all the grayscale servers to the standard server; A second receiving unit, configured to receive the access request when the request identifier is the same as the target request identifier; A first returning unit, configured to return abnormal access information to the loader when the request identifier and the target request identifier are different; The first return unit includes: a first replacement module, used to replace the request identifier in the access request with the target request identifier when the request identifier and the target request identifier are different, so as to obtain an updated access request; a first return module, used to determine the updated access request as the abnormal access information, and return the abnormal access information to the loader.
8. A device for processing access requests, characterized in that: include: A first acquisition unit is used to acquire an access request sent by a client, and acquire user information and a request identifier in the access request, wherein the request identifier is used to determine a server type corresponding to the user information, the server type includes a grayscale server and a standard server, and the user accesses servers of different server types according to the access request; A first identification unit, configured to identify the request identifier, obtain a server corresponding to the request identifier, and send the access request to the server; A third receiving unit is used to receive abnormal access information sent by the server, wherein, when the request identifier and the target request identifier in the whitelist of the server are different, the request identifier in the access request is replaced with the target request identifier to obtain an updated access request, and the updated access request is determined as the abnormal access information, and the target request identifier is the target request identifier corresponding to the user attribute information of the user information, wherein, when an abnormality occurs in the grayscale server, the preset request identifiers of all users in the whitelist are all changed to access standard servers, so as to send access requests of grayscale users corresponding to all grayscale servers to the standard servers; A second returning unit, configured to return the abnormal access information to the client; The device also includes: a fourth receiving unit, used to receive an updated access request sent by the client; a second identification unit, used to identify the request identifier in the updated access request, obtain an updated server corresponding to the request identifier, and send the updated access request to the updated server, wherein the updated access request is the access request adjusted by the client based on the abnormal access information.
9. A non-volatile storage medium, characterized in that: The non-volatile storage medium includes a stored program, wherein when the program is run, the device where the non-volatile storage medium is located is controlled to execute the access request processing method described in any one of claims 1 to 5.
10. An electronic device, characterized in that: It includes one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the access request processing method described in any one of claims 1 to 5.
Citation Information
Patent Citations
Method and device for realizing service gated launch, plug-in equipment and proxy server
CN108494876A
Grayscale publishing method and system
CN108574601A
Server, gray release method and device, and medium
CN112114869A
Gray release method, device and system
CN113391823A
