User traffic management method based on intelligent identifier
By creating a unique identification APPID for each customer and using nginx access scripts to parse and match APPIDs, the problem of not being able to accurately control multiple customer traffic in the existing technology is solved, efficient and flexible traffic management is achieved, and user experience and service quality are improved.
Patent Information
- Application Number
- CN202411978121.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
It is difficult for the prior art to divide multiple customer traffic through the IP address to call through Baixing Credit or Pudao Credit, and it is impossible to achieve precise control of the traffic of real customers.
Adopting a user traffic management method based on intelligent identification, the administrator creates a unique identification APPID for each customer, and parses the APPID of the customer request parameters through nginx access script, and matches the APPID list configured by the administrator based on the APPID to achieve precise control and segmentation of traffic.
It realizes precise control and segmentation of traffic, improves the flexibility of traffic management, and can dynamically adjust traffic allocation according to business needs and strategies, optimize resource utilization, and improve user experience and service quality.
Smart Images

Figure CN119835229A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of digital information transmission, and in particular to a user flow management method based on intelligent identification. Background Art
[0002] With the rapid evolution of Internet technology, ensuring stable, efficient and reliable services to users when building Internet systems has become a vital task.
[0003] like Figure 1 As shown, the prior art solution:
[0004] Step 1:
[0005] The customer provides an access IP address, such as 192.168.1.100
[0006] Step 2:
[0007] The administrator will configure the access request allow module in the nginx.conf file based on the IP provided by the user (for example, 192.168.1.100), and define the IP address access rules through the nginx allow module. For example, the following configuration
[0008]
[0009]
[0010] Among them, location / a / means that all URIs starting with / a / will be matched, and the matching will stop after matching. Location / will match all addresses starting with / . This rule is a catch-all rule and will match all requests. The priority of request path matching location^ / a / is higher than location /
[0011] Step 3:
[0012] When a user accesses the service through the request path ( / a / b), it will match location^ / a / , where the IP address accessed by the user will be matched with the configured 192.168.1.100. If it matches, the service http: / / 10.0.0.1:80 will be accessed; otherwise, the service http: / / 10.0.0.2:80 will be accessed.
[0013] Step 4:
[0014] Finally, the result of executing service http: / / 10.0.0.1:80 or http: / / 10.0.0.2:80 is returned to the customer.
[0015] As business traffic grows, we no longer meet our needs by dividing traffic by IP. Most customers call in through Baihang Credit and Pudao Credit, and more and more customers call in. The request IPs through Baihang Credit or Pudao Credit are the same, and it is impossible to divide the traffic of real customers by request IP. Therefore, we urgently need an efficient and flexible solution that matches real customers to deal with multiple customers calling in through Baihang Credit and Pudao Credit.
[0016] Therefore, a user traffic management method based on intelligent identification is proposed. Summary of the invention
[0017] The purpose of the present invention is to solve the problems mentioned in the above background technology. The present invention provides a user traffic management method based on intelligent identification.
[0018] In order to achieve the above-mentioned purpose, the present invention specifically adopts the following technical solutions:
[0019] A user traffic management method based on intelligent identification includes the following steps:
[0020] Step 1:
[0021] The administrator creates a unique identification APPID for all customers;
[0022] Step 2:
[0023] The administrator maintains an APPID list in the backend for use in switching traffic;
[0024] Step 3:
[0025] The administrator sets up the nginx access script;
[0026] Step 4:
[0027] Customer access must include APPID, otherwise access will fail;
[0028] After nginx receives the client's access request, it parses the appId in the client's request parameter according to the nginxlua script configured by the administrator, and then matches the appId list configured by the administrator according to the current appId;
[0029] Returns customer results based on the service execution accessed.
[0030] Furthermore, the nginx access script includes the following steps:
[0031] iv. Get the request parameter APPID;
[0032] v. Determine whether the APPID is in the maintained APPID list;
[0033] vi. Based on the matching results of APPID, user requests are diverted to different service nodes.
[0034] Furthermore, the nginx access script further includes:
[0035] a. A main.lua file, used to process request parameters and diversion logic;
[0036] b. A cache get and set function to store and retrieve the APPID list.
[0037] Furthermore, the nginx access script also includes:
[0038] c. A request_param_util.lua file, used to get parameters from the request;
[0039] d. A database connection and query function for updating and retrieving the grayscale test information cache.
[0040] Furthermore, the cache acquisition and setting functions use a distributed cache system.
[0041] Furthermore, the nginx receives the client access request, parses the APPID of the request parameter according to the configured nginx lua script, and matches the APPID list configured by the administrator. If the match is successful, the designated service node is accessed, otherwise the backup service node is accessed.
[0042] The beneficial effects of the present invention are as follows:
[0043] The present invention allows administrators to add specific customers' APPIDs to the preset APPID list through background management configuration, so as to achieve precise control and segmentation of traffic. This method not only improves the flexibility of traffic management, but also enables administrators to dynamically adjust traffic distribution and optimize resource utilization according to business needs and strategies. Compared with traditional traffic management methods, the present invention can achieve more fine-grained traffic cutting, accurate to the specific customer level. This refined management makes traffic distribution more reasonable, and can provide customized services and resource allocation according to the specific needs and behavior patterns of each customer, thereby improving user experience and service quality. No changes or upgrades are required to the customer, and a smooth upgrade is achieved. This means that customers can enjoy the traffic management advantages brought by the present invention without changing their business processes or technical configurations. This seamless integration feature greatly reduces the cost and risk of upgrades, ensuring business continuity and stability. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 It is a schematic diagram of the prior art;
[0045] Figure 2 It is a schematic diagram of the management method of the present invention; DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0047] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings. In addition, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0049] The electrical components mentioned in this article are all connected to an external main controller and 220V mains electricity, and the main controller can be a conventional known device for controlling a computer or the like.
[0050] In the description of the embodiments of the present invention, it should be noted that the terms "inside", "outside", "upper", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, or are the orientations or positional relationships in which the inventive product is usually placed when in use. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0051] like Figure 2 As shown, a user traffic management method based on intelligent identification includes the following steps:
[0052] Step 1:
[0053] The administrator creates a unique identification APPID for all customers;
[0054] Step 2:
[0055] The administrator maintains an APPID list in the backend for use in switching traffic;
[0056] Step 3:
[0057] The administrator sets the nginx access script:
[0058]
[0059]
[0060] 2. Get cache data
[0061]
[0062]
[0063] 3.request_param_util.lua (get parameters)
[0064]
[0065]
[0066]
[0067]
[0068]
[0069] 4. Storing cache data
[0070]
[0071]
[0072] 5. Connect to the database
[0073]
[0074]
[0075]
[0076] Step 4:
[0077] Step 1: Customer access must have APPID, otherwise access will fail
[0078] Step 2: nginx receives the customer's access request, parses the appId of the customer's request parameter according to the nginx lua script configured by the administrator, and then matches the appId list configured by the administrator according to the current appId. If it matches, the access is to http: / / 10.0.0.1:80, otherwise it is to http: / / 10.0.0.2:80
[0079] Step 3: Return the customer results based on the accessed service execution.
[0080] In summary: The present invention allows administrators to add specific customers' APPIDs to the preset APPID list through background management configuration, thereby achieving precise control and segmentation of traffic. This method not only improves the flexibility of traffic management, but also enables administrators to dynamically adjust traffic allocation and optimize resource utilization according to business needs and strategies. Compared with traditional traffic management methods, the present invention can achieve more fine-grained traffic cutting, accurate to the specific customer level. This refined management makes traffic distribution more reasonable, and can provide customized services and resource allocation according to the specific needs and behavior patterns of each customer, thereby improving user experience and service quality. No changes or upgrades are required to the customer, and a smooth upgrade is achieved. This means that customers can enjoy the traffic management advantages brought by the present invention without changing their business processes or technical configurations. This seamless integration feature greatly reduces upgrade costs and risks, and ensures business continuity and stability.
[0081] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions only describe the principles of the present invention. The present invention may be subject to various changes and improvements without departing from the spirit and scope of the present invention. These changes and improvements fall within the scope of the present invention. The scope of protection claimed by the present invention is defined by the attached claims and their equivalents.
Claims
1. A user traffic management method based on intelligent identification, characterized in that: The steps include: Step 1: The administrator creates a unique identification APPID for all customers; Step 2: The administrator maintains an APP ID list for flow switching; Step 3: The administrator sets up the nginx access script; Step 4: Client access must include APPID, otherwise access will fail. When nginx receives the client's access request, it parses the app ID in the client's request parameter according to the nginxlua script configured by the administrator, and then matches the app ID list configured by the administrator according to the current app ID. Returns customer results based on the service execution accessed.
2. According to claim 1, a user traffic management method based on intelligent identification is characterized in that: The nginx access script includes the following steps: i. Get the request parameter APPID; ii. Determine whether the APPID is in the maintained APPID list; iii. Based on the matching results of APPID, user requests are diverted to different service nodes.
3. According to claim 2, a user traffic management method based on intelligent identification is characterized in that: The nginx access script further includes: a. A main.lua file, used to process request parameters and diversion logic; b. A cache get and set function to store and retrieve the APPID list.
4. The user traffic management method based on intelligent identification according to claim 3 is characterized in that: The nginx access script also includes: c. A request_param_util.lua file, used to get parameters from the request; d. A database connection and query function for updating and retrieving the grayscale test information cache.
5. The user traffic management method based on intelligent identification according to claim 3 is characterized in that: The cache getting and setting functions use a distributed cache system.
6. The user traffic management method based on intelligent identification according to claim 2 is characterized in that: The nginx receives the client access request, parses the APPID of the request parameter according to the configured nginx lua script, and matches the APPID list configured by the administrator. If the match is successful, the specified service node is accessed, otherwise the backup service node is accessed.
Citation Information
Patent Citations
Server access method, device and equipment, and computer readable storage medium
CN108366060A
Software product gray release method and device, equipment and medium
CN112363751A
Service processing method, device and equipment
CN114416149A
Micro-service-based full-link gray release method and device and storage medium
CN116346893A
Inlet layer flow control method and system based on multiple clouds
CN117834735A