CN113411395B - Access request routing method, device, computer equipment and storage medium - Google Patents

Access request routing method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN113411395B
CN113411395B CN202110677702.3A CN202110677702A CN113411395B CN 113411395 B CN113411395 B CN 113411395B CN 202110677702 A CN202110677702 A CN 202110677702A CN 113411395 B CN113411395 B CN 113411395B
Authority
CN
China
Prior art keywords
bitmap
user
target
access
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110677702.3A
Other languages
Chinese (zh)
Other versions
CN113411395A (en
Inventor
刘小兵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Weimin Insurance Agency Co Ltd
Original Assignee
Weimin Insurance Agency Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Weimin Insurance Agency Co Ltd filed Critical Weimin Insurance Agency Co Ltd
Priority to CN202110677702.3A priority Critical patent/CN113411395B/en
Publication of CN113411395A publication Critical patent/CN113411395A/en
Application granted granted Critical
Publication of CN113411395B publication Critical patent/CN113411395B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application relates to an access request routing method, an access request routing device, computer equipment and a storage medium. The method comprises the following steps: receiving a user access request sent by an access terminal; determining an access user identifier corresponding to the access terminal, and performing feature operation on the access user identifier to obtain an access user feature value corresponding to the access user identifier; determining a target bitmap position corresponding to the access user characteristic value in a bitmap; acquiring a target bitmap value corresponding to the target bitmap position in the bitmap, and determining a corresponding target routing direction according to the target bitmap value; and routing the user access request based on the target routing direction. The method can improve the routing efficiency.

Description

Access request routing method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to an access request routing method, apparatus, computer device, and storage medium.
Background
With the development of internet technology, more and more users can obtain data through the internet, for example, insurance business data can be obtained through the internet.
At present, when a user access request is received, an access response server corresponding to the user access request may be determined first, and the user access request is routed to the corresponding access response server for response. However, there is often a problem that the delay of determining the access response server corresponding to the user access request is high, resulting in low routing efficiency.
Disclosure of Invention
In view of the foregoing, it is desirable to provide an access request routing method, apparatus, computer device and storage medium for addressing the above technical problems.
An access request routing method, the method comprising: receiving a user access request sent by an access terminal; determining an access user identifier corresponding to the access terminal, and performing feature operation on the access user identifier to obtain an access user feature value corresponding to the access user identifier; determining a target bitmap position corresponding to the access user characteristic value in a bitmap; acquiring a target bitmap value corresponding to the target bitmap position in the bitmap, and determining a corresponding target routing direction according to the target bitmap value; and routing the user access request based on the target routing direction.
An access request routing apparatus, the apparatus comprising: the user access request receiving module is used for receiving a user access request sent by an access terminal; an access user characteristic value obtaining module, configured to determine an access user identifier corresponding to the access terminal, and perform characteristic operation on the access user identifier to obtain an access user characteristic value corresponding to the access user identifier; the target bitmap position determining module is used for determining the corresponding target bitmap position of the access user characteristic value in the bitmap; a target routing direction obtaining module, configured to obtain a target bitmap value corresponding to the target bitmap position in the bitmap, and determine a corresponding target routing direction according to the target bitmap value; and the routing module is used for routing the user access request based on the target routing direction.
In some embodiments, the bitmap is split into a plurality of sub-bitmaps, the target bitmap locations include a target sub-bitmap index and a target sub-bitmap location, and the target bitmap location determination module is configured to: carrying out quotient obtaining operation by utilizing the characteristic value of the access user and the element number corresponding to the sub-bitmap, and obtaining a target sub-bitmap index corresponding to the access user identification based on a quotient obtaining operation result; and performing remainder operation by using the characteristic value of the access user and the number of elements corresponding to the sub-bitmap, and obtaining a target sub-bitmap position corresponding to the access user identifier based on a remainder operation result. The target routing direction acquisition module is used for determining a target sub-bitmap from the bitmap according to the target sub-bitmap index; and determining a target bitmap value from the target bitmap according to the position of the target bitmap.
In some embodiments, the target routing direction obtaining module is configured to: when the target bitmap positions comprise a plurality of bitmap values, bitmap values corresponding to the target bitmap positions in the bitmap are obtained, and the bitmap values corresponding to the target bitmap positions are combined to obtain the target bitmap values.
In some embodiments, the target bitmap position determination module is to: determining a user bitmap position represented by the access user characteristic value in the bitmap, and acquiring an associated bitmap position corresponding to the user bitmap position; and taking the user bitmap position and the associated bitmap position as a corresponding target bitmap position in the access user characteristic value bitmap, wherein the associated bitmap position is adjacent to the user bitmap position.
In some embodiments, the apparatus further comprises a collision detection module to: when it is determined that the target bitmap position has user conflict based on the target bitmap value, acquiring a pre-stored corresponding relationship between a user identifier corresponding to the target bitmap position and a routing direction; and determining a target routing direction corresponding to the user access request based on the corresponding relation and the access user identifier.
In some embodiments, the apparatus further comprises: a user routing direction obtaining module, configured to obtain a routing direction corresponding to each user in a user set; a bitmap value determining module, configured to determine, based on a routing direction corresponding to each user, a bitmap value corresponding to the user; the bitmap position acquisition module is used for determining the bitmap position of the user in the bitmap based on the user identification corresponding to the user; and the bitmap setting module is used for taking the bitmap value corresponding to the user as the value corresponding to the bitmap position in the bitmap.
In some embodiments, the target routing direction acquisition module is to: acquiring a target bitmap value corresponding to the target bitmap position in the bitmap, and determining that the target routing direction is a gray routing direction when the target bitmap value is a bitmap value corresponding to the gray routing direction; the routing module is configured to: routing the user access request to a grayscale access server to respond to the user access request through the grayscale access server.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program: receiving a user access request sent by an access terminal; determining an access user identifier corresponding to the access terminal, and performing feature operation on the access user identifier to obtain an access user feature value corresponding to the access user identifier; determining a target bitmap position corresponding to the access user characteristic value in a bitmap; acquiring a target bitmap value corresponding to the target bitmap position in the bitmap, and determining a corresponding target routing direction according to the target bitmap value; and routing the user access request based on the target routing direction.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of: receiving a user access request sent by an access terminal; determining an access user identifier corresponding to the access terminal, and performing feature operation on the access user identifier to obtain an access user feature value corresponding to the access user identifier; determining a target bitmap position corresponding to the access user characteristic value in a bitmap; acquiring a target bitmap value corresponding to the target bitmap position in the bitmap, and determining a corresponding target routing direction according to the target bitmap value; and routing the user access request based on the target routing direction.
The access request routing method, the access request routing device, the computer equipment and the storage medium receive the user access request sent by the access terminal; determining an access user identifier corresponding to an access terminal, and performing characteristic operation on the access user identifier to obtain an access user characteristic value corresponding to the access user identifier; determining a target bitmap position corresponding to the access user characteristic value in the bitmap; acquiring a target bitmap value corresponding to a target bitmap position in a bitmap, and determining a corresponding target routing direction according to the target bitmap value; the user access request is routed based on the target routing direction. Because the routing direction is represented based on the target bitmap value in the bitmap, the target routing direction corresponding to the user access request can be determined in time when the user access request is received, and the efficiency of routing the user access request is improved.
Drawings
FIG. 1 is a diagram of an application environment for a method of routing access requests in one embodiment;
FIG. 2 is a flow diagram illustrating a method for routing access requests in one embodiment;
FIG. 3 is a diagram illustrating obtaining values of a target bitmap, according to one embodiment;
FIG. 4 is a flow diagram illustrating a method for routing access requests in another embodiment;
FIG. 5 is a diagram illustrating obtaining a target routing direction based on additionally stored information in another embodiment;
FIG. 6 is a diagram illustrating bitmap values based on bitmap generation according to routing directions and based on user identification in another embodiment;
FIG. 7 is a block diagram of an access request routing apparatus in one embodiment;
FIG. 8 is a diagram of an internal structure of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The access request routing method provided by the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The terminal 102 is an access terminal, the terminal 102 can send a user access request in response to an access operation of a user, the server can execute the method provided by the embodiment of the application, determine an access user identifier corresponding to the access terminal, and perform feature operation on the access user identifier to obtain an access user feature value corresponding to the access user identifier; determining a target bitmap position corresponding to the access user characteristic value in the bitmap; acquiring a target bitmap value corresponding to a target bitmap position in a bitmap, and determining a corresponding target routing direction according to the target bitmap value; the user access request is routed based on the target routing direction. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster formed by multiple servers. It is to be understood that the above-mentioned embodiment is only an example, and does not constitute a limitation to the method provided by the embodiment of the present application, for example, the access terminal may also be a server.
In one embodiment, as shown in fig. 2, an access request routing method is provided, which is described by taking the method as an example applied to the server in fig. 1, and includes the following steps:
step S202, receiving a user access request sent by an access terminal.
Wherein, the access end is the end which sends the user access request. The access terminal may have a corresponding application installed therein, such as an instant messaging application or a browser application, and may send a user access request through the corresponding application. The user access request is an access request corresponding to the user and is used for accessing a system corresponding to the server. For example, the user access request may be a request to obtain insurance service data, and the user access request may also be a request to update data, such as a request to write data in a database.
The server is used for routing, a corresponding system of the server can provide one or more access services, one service can be responded by a plurality of response devices, and for a user access request requesting the same service, the server can be routed to different response devices to respond according to actual needs.
For example, a system corresponding to a server is a cluster, a plurality of cluster devices in one cluster provide services to the outside in a unified manner, and when a user access request is received, the server can determine the cluster device corresponding to the user access request and route the user access request to the corresponding cluster device, thereby implementing load balancing. As another example, an Internet platform may provide gray-scale distribution of services provided. The gray scale distribution refers to a distribution mode capable of smoothly transitioning between black and white. For example, for an application, a new product feature B may be released in a gray scale, so that a part of users continue to use the product feature a, a part of users start to use the product feature B, and the routing directions corresponding to different product features are different, for example, the responding device corresponding to the product feature a is device 1, and the responding device corresponding to the product feature B is device 2. Thus, when a user access request is received, the server needs to determine whether the user access request is routed to device 1 or device 2.
Specifically, the access terminal may send a user access request to the server in response to a user operation, for example, an operation of clicking to acquire insurance service data by the user, and the server receives the user access request.
And step S204, determining the access user identification corresponding to the access terminal, and performing characteristic operation on the access user identification to obtain an access user characteristic value corresponding to the access user identification.
The access user identifier is used for identifying an access user corresponding to the access terminal and is a user unique identifier corresponding to the user. The feature value is a value of a feature for reflecting a unique identification of a user. The mapping relationship between the user identifier and the user characteristic value may be set, and when the access user identifier is obtained, the access user characteristic value corresponding to the access user identifier may be determined based on the mapping relationship. For example, the access user identifier may be segmented to obtain a plurality of character strings, feature values corresponding to the character strings are obtained, and the feature values are spliced to obtain the access user feature value. For another example, the access user identifier may be subjected to hash calculation to obtain a hash value, and the hash value is used as the access user feature value corresponding to the access user identifier.
Specifically, the server may extract the access user identifier from the user access request, perform hash calculation on the access user identifier to obtain a hash value, and use the hash value obtained by calculation as the access user characteristic value corresponding to the access user identifier.
Step S206, determining the corresponding target bitmap position in the bitmap of the access user characteristic value.
The Bitmap (Bitmap) is a data structure representing a dense set (dense set) in a finite field, and is ordered by one bit, each bit can be used for storing a value corresponding to a state, and one bit can be used for representing a number. A plurality of elements may be stored in the bitmap, and the value in each element may be 0 or 1, and a plurality means at least two. The target bitmap position is used to indicate the position of the element in the bitmap, e.g., assuming the bitmap has 100 elements, the bitmap position may be represented by the sequence number of the element. Assuming that the position of the target bitmap is 0, it indicates that the position of the target bitmap is the position corresponding to the 1 st element in the bitmap. Assuming that the position of the target bitmap is 55, it indicates that the position of the target bitmap is the position corresponding to the 56 th element in the bitmap. When the bitmap is split into multiple sub-bitmaps, then the target bitmap location may also include an index of the sub-bitmap.
Specifically, the corresponding relationship between the user characteristic value and the target bitmap position is preset, so the server can determine the target bitmap position corresponding to the access user characteristic value in the bitmap based on the corresponding relationship.
And S208, acquiring a target bitmap value corresponding to the target bitmap position in the bitmap, and determining a corresponding target routing direction according to the target bitmap value.
The routing direction indicates a direction to which the user access request is routed, for example, to device 1 or device 2. The target bitmap value refers to a value corresponding to a target bitmap position in the bitmap, and may be, for example, 0 or 1. The bitmap value corresponding to each bitmap position in the bitmap is set in advance according to the routing direction corresponding to the user. For example, assuming that the routing direction corresponding to the a user is the routing to grayscale routing direction, and it indicates that the a user provides the service of grayscale distribution, the value corresponding to the grayscale routing direction may be obtained as the bitmap value of the bitmap position corresponding to the a user in the bitmap, and the bitmap is generated.
Specifically, the server may obtain a bitmap value corresponding to the target bitmap position as a target bitmap value, and use the routing direction identified by the target bitmap value as a target routing direction. For example, assuming that the position of the target bitmap is the positions of the 17 th element and the 18 th element of the bitmap, the values corresponding to the positions of the 17 th element and the 18 th element may be obtained, the values corresponding to the positions of the 17 th element and the 18 th element may be spliced, and the routing direction corresponding to the spliced value is taken as the target routing direction.
Step S210, based on the target routing direction, the user access request is routed.
Specifically, the server is preset with a device to which a route is required corresponding to each target routing direction, so that the user access request can be routed to the corresponding device based on the target routing direction, and the device responds to the user access request, for example, data to be accessed by the user access request is returned to the access terminal. For example, when it is determined that the target routing direction is a direction for providing the first service, the user access request is routed to a first service device providing the first service, so that the first service device responds to the user access request. And when the target routing direction is determined to be the direction for providing the second service, routing the user access request to a second service device for providing the second service, so that the second service device responds to the user access request.
In the access request routing method, a user access request sent by an access terminal is received; determining an access user identifier corresponding to an access terminal, and performing characteristic operation on the access user identifier to obtain an access user characteristic value corresponding to the access user identifier; determining a target bitmap position corresponding to the access user characteristic value in the bitmap; acquiring a target bitmap value corresponding to a target bitmap position in a bitmap, and determining a corresponding target routing direction according to the target bitmap value; the user access request is routed based on the target routing direction. Because the routing direction is represented based on the target bitmap value in the bitmap, the target routing direction corresponding to the user access request can be determined in time when the user access request is received, and the efficiency of routing the user access request is improved. Moreover, because the bitmap is used for routing, the byte number occupied by the bitmap element corresponding to one user can be smaller than the byte number occupied by the user identifier, so that compared with the scheme of setting the corresponding relation between the user identifier and the routing direction, the bitmap is used for routing, the memory occupation can be reduced, the target routing direction can be determined without additionally requesting a network, and the network delay can be reduced.
In one embodiment, the bitmap is split into a plurality of sub-bitmaps, the target bitmap position includes a target sub-bitmap index and a target sub-bitmap position, and determining the corresponding target bitmap position in the bitmap of the access user feature value includes: carrying out quotient extraction operation by utilizing the characteristic value of the access user and the number of elements corresponding to the sub-bitmap, and obtaining a target sub-bitmap index corresponding to the access user identifier based on a quotient extraction operation result; and performing remainder operation by using the characteristic value of the access user and the number of elements corresponding to the sub-bitmap based on a remainder operation result to obtain a target sub-bitmap position corresponding to the access user identifier. Obtaining a target bitmap value corresponding to a target bitmap position in a bitmap, wherein the target bitmap value is determined from the bitmap according to a target bitmap index; and determining the value of the target bitmap from the target bitmap according to the position of the target bitmap.
Wherein the sub-bitmap index is used to point to the corresponding sub-bitmap. For example, the sequence number corresponding to the sub-bitmap. For example, assuming that the bitmap is divided into 6 sub-bitmaps, the 6 sub-bitmaps may be numbered 0, 1, 2, 3, 4, 5 in sequence, with these numbers being used to represent sub-bitmap indices. When the bitmap is divided, the bitmap can be equally divided to obtain a plurality of sub-bitmaps. Dividing a sub-bitmap may be referred to as a tile, and one sub-bitmap is referred to as a tile. By segmenting the bitmap, when the routing direction corresponding to the user is updated, the bitmap value of the bitmap position corresponding to the user can be updated one by one according to the updated routing direction corresponding to the user, so that the speed of updating the routing direction of the user is increased.
The number of elements corresponding to the sub-bitmap is the number of elements included in the bitmap, and for example, assuming that there are 10 bitmap positions in one sub-bitmap, the number of elements corresponding to the sub-bitmap is 10. The quotient division operation is to obtain a quotient obtained by dividing a dividend by a divisor. The server may preset a corresponding relationship between the quotient calculation result and the sub-bitmap index, so when the quotient calculation result is obtained by calculation, the corresponding target sub-bitmap index may be determined based on the corresponding relationship. For example, the number of elements corresponding to each sub-bitmap may be the same. When the sub-bitmap indexes are sequentially ordered to be 0 to n, and n is the number of the sub-bitmaps, 1 can be subtracted from the characteristic value, the number of the elements corresponding to the sub-bitmaps is divided, and the obtained quotient is used as the target sub-bitmap index.
The target sub-bitmap position is used to indicate the position in the sub-bitmap. The remainder operation is to obtain the remainder obtained by dividing the dividend by the divisor, and may also be referred to as a modulus calculation. The access user characteristic value may be divided by the number of elements corresponding to the sub-bitmap, and the obtained remainder is used as the target sub-bitmap position corresponding to the access user identifier.
In some embodiments, there may be a plurality of bitmap positions corresponding to one access user feature value, that is, the target bitmap position is a plurality of positions, so that the dividend in the remainder calculation may also be obtained according to the number of access user feature values and bitmap positions corresponding to one user. For example, when the routing direction of a user is represented by a combination of values of two bitmap elements, the access user characteristic value may be multiplied by 2 to obtain the dividend in the remainder calculation.
In some embodiments, there may be a plurality of target bitmap positions, however, the number of bytes of the target bitmap value corresponding to the target bitmap position is less than the number of bytes corresponding to the visited user identifier, so that when the target routing direction is represented by the target bitmap value, storage space may be saved, for example, when the corresponding relationship between the user identifier and the routing direction is directly stored, because the number of users corresponding to one system is large, for example, there may be 4 hundred million, one user identifier needs 256 bytes to represent, which results in a large amount of space being occupied, and when bitmap representation is adopted, two bitmap values may be used to represent the routing direction, which may save storage space.
In some embodiments, to prevent the obtained sub-bitmap position from exceeding the bitmap position corresponding to the sub-bitmap, i.e. to prevent the slice from crossing the boundary, a preset value may be added to the number of elements corresponding to the sub-bitmap to obtain a divisor in the remainder calculation. For example, when the routing direction of one user is expressed by combining values of two bitmap elements, the divisor in the remainder calculation can be obtained by adding 2 to the number of elements corresponding to the sub-bitmap.
For example, when the routing direction of one user is expressed by combining values of two bitmap elements, it is determined that the routing direction corresponds toThe algorithm of (c) can be expressed as follows. Wherein "%" represents a remainder calculation " // The "next word" is a word description of the algorithm, "uid" represents the user identification, and "hash" represents the hash calculation. By using the algorithm, assuming that the access user characteristic value obtained by the access user identifier, such as the hash value is 99, after a bitmap is sliced, the number of bitmap elements of each slice is 20, and the target bitmap value is represented by combining the value of the position corresponding to the remainder calculation result and the value of the position corresponding to the remainder calculation result plus 1. The shard (sub-bitmap) index may be a quotient of (99-1)/20 of 4. The position in the slice may be the remainder of (99 x 2)% (20 + 2), which is 0. The target sub-bitmap position can be sequence number 0 and sequence number 1 bitmap position in the slice with slice index 4. And splicing the bitmap value of the bitmap position with the sequence number 0 and the bitmap value of the bitmap position with the sequence number 1 in the fragment with the fragment index of 4 to obtain a combined value, and acquiring the routing direction corresponding to the combined value as the target routing direction.
Algorithm:LookUp(uid)
V/hashing user information
hashCode=hash(uid)
// BIT _ EACH _ SLICE _ SIZE +2 prevent SLICE boundary crossing
userBit=(hashCode*2)%(BIT_EACH_SLICE_SIZE+2);
// slice indexing
sl iceNum=(hashCode-1)/BIT_EACH_SLICE_SIZE;
// get Bitmap, genRoute () restores the localized routing information.
bitmap=getSl iceBitmap(sl iceNum)
// generating routing information
route=genRoute(bitmap.get(userBit),bitmap.get(userBit+1));
return rout e
In some embodiments, the target bitmap position is a plurality of positions, and obtaining the target bitmap value corresponding to the target bitmap position in the bitmap includes: acquiring bitmap values respectively corresponding to all target bitmap positions in a bitmap, and combining the bitmap values respectively corresponding to a plurality of target bitmap positions to obtain target bitmap values; and acquiring a target bitmap value.
The number of target bitmap positions is plural, and may be two, for example. For example, taking the determination of whether a user is routed to a grayscale service or a normal service as an example, a user may be identified by two bitmap values, where one bitmap position corresponds to two bitmap positions, and one bitmap position corresponds to one bitmap value. Therefore, when the bitmap value corresponding to each bitmap position is obtained, the bitmap values are combined to obtain the target bitmap value. When the combination value, i.e., the target bitmap value, is "00", it indicates a new user, "01" indicates a non-grayscale user, "10" indicates a grayscale user, and "11" indicates a position-conflict user. The new user refers to a newly generated user, and the corresponding routing direction of the new user is not determined. Non-greyscale users refer to service users that need to be routed to normal service. The user in the gray scale refers to a user for routing to equipment providing a gray scale product function, and the user with the position conflict refers to the user and other users having the same characteristic value, so that the corresponding bitmap positions have conflict, and the routing direction cannot be directly determined according to the target bitmap value corresponding to the target bitmap position. Because the value corresponding to one position, namely one element, in the bitmap is 0 or 1, the bitmap values of a plurality of positions represent the routing direction of the user, when the bitmap is used for determining the routing direction, the candidate routing direction is not limited to only two routing directions, and the flexibility of determining the routing direction is improved.
In some embodiments, determining the corresponding target bitmap position in the bitmap for the access user feature value comprises: determining a user bitmap position represented by the access user characteristic value in the bitmap, and acquiring an associated bitmap position corresponding to the user bitmap position; and taking the user bitmap position and the associated bitmap position as a corresponding target bitmap position in the access user characteristic value bitmap.
The associated bitmap position refers to a position having an association relationship with the user bitmap position, and may be, for example, a bitmap position adjacent to the user bitmap position. For example, when the target bitmap position is two, then the user bitmap position and the next bitmap position to the user bitmap position may be taken as the associated bitmap position. For example, as shown in fig. 3, the number in the bitmap indicates the position number corresponding to the bitmap. After the user identification of the access user is obtained, performing hash calculation on the user identification to obtain an integer obtained by the hash calculation, taking the integer as a hash value, and calculating a remainder obtained by dividing the hash value by a preset value, wherein if the remainder is 2, the position with the sequence number of 2 is a user bitmap position, the position with the sequence number of 3 is an associated bitmap position corresponding to the user bitmap position, and the bitmap value corresponding to the user bitmap position and the bitmap value corresponding to the associated bitmap position are spliced to obtain a target bitmap value. Assuming that the bitmap value corresponding to the position with sequence number 2 is "1", and the bitmap value corresponding to the position with sequence number 3 is "0", the target bitmap value is "10".
In some embodiments, as shown in fig. 4, the access request routing method further includes:
step S402, obtaining the route direction corresponding to each user in the user set.
Wherein, one or more users can be included in the user set. The users in the user set are the users who need to determine the values in the bitmap, and may be, for example, access user identifications. For example, when a bitmap is to be generated, all users corresponding to the server may be acquired to form a user set, so as to generate the bitmap corresponding to the user set. For another example, after the bitmap is generated, if there is a new user, the new user may be a user for determining a value in the bitmap, that is, each user in the user set may be a user inserted in full or incremental quantity.
The routing direction corresponding to each user in the user set may be set as needed. For example, it may be determined in response to a setting operation by the user that, for example, the routing direction of the user 1 is the grayscale routing direction and the routing direction of the user 2 is the normal routing direction according to the setting operation. The gray routing direction refers to a direction of routing to a service providing gray release, so that a user can use a function corresponding to a version of gray release. The normal routing direction is a direction of providing a product function service that has been formally released, and the product may be an application program, with respect to the grayscale routing direction.
The routing direction corresponding to each user in the user set may be determined according to a preset routing access policy. For example, if twenty percent of users use the service published by the gray scale in advance, twenty percent of users in the user set can be randomly selected, and the corresponding routing direction is set as the gray scale routing direction, and the other routing directions are set as the normal routing directions.
Specifically, the server may determine the routing direction of each user in the user set based on a preset routing access policy.
In some embodiments, there are multiple candidate routing directions, and the probability of each candidate routing direction may be preset in the server. For the newly added user, when the routing direction corresponding to the newly added user is to be determined, the probability of each candidate routing direction can be obtained, and the routing direction corresponding to the newly added user is determined according to the probability of the candidate routing direction.
Step S404, determining a bitmap value corresponding to the user based on the routing direction corresponding to the user.
Specifically, the corresponding relationship between the routing direction and the bitmap value is set, so that the routing direction corresponding to one user is obtained, and the corresponding bitmap value can be determined based on the corresponding relationship. For example, a user may be represented by a two-bit bitmap value, where "01" represents a normal routing direction, indicating that the user is normally routed to a user providing normal service: "10" indicates a gray routing direction, indicating that the user is a user routed to a service providing gray publication.
Step S406, determining a bitmap position of the user in the bitmap based on the user identifier corresponding to the user.
Specifically, feature operation may be performed on the user identifier to obtain a feature value, and a bitmap position of the user in the bitmap may be determined based on the feature value. For example, the user identifier may be hashed to obtain a hash value, and the bitmap position of the user in the bitmap may be determined based on the hash value.
Step S408, the bitmap value corresponding to the user is used as the value corresponding to the bitmap position in the bitmap.
Specifically, after obtaining the bitmap value corresponding to the user, the bitmap value corresponding to the user may be used as the value corresponding to the bitmap position in the bitmap. It is understood that the bitmap may be generated or not generated when step S406 is executed. For example, when each user in the user set is an incrementally inserted user, a bitmap is already generated, and the bitmap value corresponding to the user is updated in the existing bitmap. If the bitmap has not been generated while S406 is being executed, the bitmap may be generated while step S408 is being executed. For example, if each user in the user set is a fully inserted user, the bitmap value corresponding to the user may be used as the value corresponding to the bitmap position in the bitmap to generate the bitmap when step S408 is executed.
In some embodiments, when the routing direction of a user is represented by a combination of values of two bitmap elements, then the algorithm for generating the bitmap corresponding to the bitmap value corresponding to the user in the bitmap may represent that Insert a value representing the routing direction in the bitmap according to the user identifier.
Insert(uid,route)
V/hashing user information, hash () for user id to positive integer
hashCode=hash(uid)
// BIT _ EACH _ SLICE _ SIZE +2 prevent SLICE boundary crossing, BIT _ EACH _ SLICE _ SIZE number of elements stored for EACH SLICE
userBit=(hashCode*2)%(BIT_EACH_SLICE_SIZE+2);
// slice index
sliceNum=(hashCode-1)/BIT_EACH_SLICE_SIZE;
Obtaining Bitmap, getSlicebitmap () for querying Bitmap according to slice id
bitmap=getSliceBitmap(sliceNum);
// routing information is localized, and the bitRoute () localizes the routing information
direction=bitRoute(route);
Store () is a Bitmap store function
bitmap.store(userBit,direction[0]);
bitmap.store(userBit+1,direction[1]);
return bitmap
In some embodiments, when generating the bitmap, for a part of bitmap positions, there may be a case where there is no corresponding user identifier, and then the bitmap value corresponding to the bitmap position may be set to be the bitmap value corresponding to the new user, for example, "00". When a user access request is received, if the bitmap value corresponding to the user identifier is determined to be '00', the user can be determined to be a new user, the routing direction corresponding to the new user can be determined according to a preset routing strategy, and the bitmap value of the bitmap position corresponding to the user identifier in the bitmap can be updated according to the determined routing direction.
In some embodiments, when the corresponding bitmap is generated according to multiple user identifications, there may be that the feature values corresponding to multiple users are the same, for example, when hash calculations are performed on different user identifications, the calculated hash values may be the same, resulting in that the bitmap positions corresponding to the multiple users are also the same, which is referred to as position conflict users. For the users with position conflict, the step of determining the bitmap value corresponding to the user based on the routing direction corresponding to the user is not executed, and the bitmap value indicating the position conflict is obtained and taken as the bitmap value corresponding to the bitmap position. For example, the bitmap value indicating that there is a position conflict may be "11". And the routing direction corresponding to the user identifier of the position conflict user can be additionally stored, and the corresponding relation between the bitmap position corresponding to the position conflict user and the additionally stored information is set, so that when the user access request needs to be determined, the routing access direction corresponding to the user can be determined for the position conflict user based on the additionally stored information. The extra information stored is the corresponding relationship between the user identifier and the routing direction, and may be the extra information stored in an array, a linked list, or a binary search tree, so as to reduce the time complexity of extra search.
In some embodiments, for a user, if the routing direction corresponding to the user is to be changed, the corresponding bitmap position may be obtained according to the user identifier, and the bitmap value of the bitmap position corresponding to the user identifier is changed to the bitmap value corresponding to the new routing direction, or the original bitmap value in the bitmap is directly deleted. For example, if a user changes the grayscale routing direction to the normal routing direction, the original bitmap value in the bitmap corresponding to the user needs to be deleted, and the bitmap value is changed to the bitmap value corresponding to the normal routing direction.
For example, when the routing direction of a user is represented by combining values of two bitmap elements, the algorithm for deleting the original bitmap value in the bitmap after changing the corresponding routing direction may be represented as follows:
Algorithm 3:Delete(uid)
hash user information
hashCode=hash(uid)
// BIT _ EACH _ SLICE _ SIZE +2 prevent SLICE boundary crossing
userBit=(hashCode*2)%(BIT_EACH_SLICE_SIZE+2);
// slice indexing
sliceNum=(hashCode-1)/BIT_EACH_SLICE_SIZE;
// get Bitmap
bitmap=getSliceBitmap(sliceNum)
Delete () for Bitmap delete element
bitmap.delete(userBit)
bitmap.delete(userBit+1)
return bitmap
In some embodiments, when a multi-bit bitmap value is used to represent the routing direction, then the bitmap position corresponds to the number of bitmap values. For example, when two bitmap values are used to indicate the routing direction, one bitmap position corresponds to two users, and one bitmap position corresponds to one bitmap value.
In some embodiments, the access request routing method further includes, when it is determined that there is a user conflict in the target bitmap position based on the target bitmap value, obtaining a correspondence between a user identifier corresponding to the target bitmap position stored in advance and a routing direction, and determining a target routing direction corresponding to the user access request based on the correspondence and the access user identifier.
Specifically, the existence of the user conflict means that the bitmap positions corresponding to the multiple users are consistent, that is, the access user corresponding to the user access request is a position conflict user, and since the routing directions corresponding to the position conflict users may be different, in the bitmap, for the bitmap position corresponding to the position conflict user, a bitmap value representing the conflict may be used as the bitmap value corresponding to the position, and a correspondence between the bitmap position corresponding to the position conflict user and additionally stored information is preset, and the additionally stored information is a correspondence between the user identifier of each position conflict user and the routing direction. Therefore, when the target bitmap value is determined to be a value representing conflict, the corresponding relation between the user identifier corresponding to the target bitmap position and the routing direction is obtained. For example, the preset bitmap value indicating the position conflict is "11", and when it is determined that the target bitmap value is "11", it indicates that there is a user conflict in the target bitmap position, the additionally stored information, that is, the correspondence between the user identifier of the position conflict user and the routing direction, may be obtained, and the target routing direction corresponding to the user access request is determined based on the correspondence and the access user identifier.
In some embodiments, when it is determined that there is no user conflict in the target bitmap position based on the target bitmap value, the step of obtaining the target bitmap value corresponding to the target bitmap position in the bitmap and determining the corresponding target routing direction according to the target bitmap value is performed.
For example, as shown in fig. 5, the additional stored information may be stored via a linked list. The hash represents hash calculation, the uid (user identification) represents user identification, when hash operation is performed on the visited user identification to obtain a bitmap value corresponding to a corresponding target bitmap position as "11", a linked list needs to be visited, user information is stored in the linked list, the user information includes the corresponding relationship between the user identification of the position conflict user and the routing direction, and the routing direction corresponding to the visited user identification can be determined based on the linked list. And when there is no user conflict, for example, the bitmap value corresponding to the target bitmap position is "10", determining that the target routing direction is the grayscale routing direction. Or when the bitmap value corresponding to the target bitmap position is '01', determining that the target routing direction is the normal routing direction. When the bitmap value corresponding to the target bitmap position is "00", it is determined that the user is the newly added user, the routing direction of the newly added user may be determined based on a preset routing policy, the access request of the user is routed to the determined routing direction, and the bitmap value corresponding to the bitmap position corresponding to the new user may be updated in the bitmap. For example, when the routing direction of the new user is determined to be the gray level routing direction based on the preset routing policy, the bitmap value corresponding to the bitmap position corresponding to the new user is updated from "00" to "10".
In some embodiments, obtaining a target bitmap value corresponding to a target bitmap position in a bitmap, and determining a corresponding target routing direction according to the target bitmap value includes: acquiring a target bitmap value corresponding to a target bitmap position in a bitmap, and determining that a target routing direction is a gray level routing direction when the target bitmap value is a bitmap value corresponding to the gray level routing direction; routing the user access request based on the target routing direction comprises: the user access request is routed to the grayscale access server for responding to the user access request through the grayscale access server.
The gray scale access server is used for providing gray scale access, the server responds, the terminal can obtain the service provided by the application program version of the gray scale release, when the target bitmap value is the bitmap value corresponding to the gray scale routing direction, the target routing direction is determined to be the gray scale routing direction, the user access request is routed to the gray scale access server, the gray scale routing can be carried out by using the bitmap, the efficiency and the accuracy of the gray scale routing are guaranteed, and the occupation of a memory can be reduced.
An access request routing method provided in the embodiment of the present application is described with reference to fig. 6 by taking an insurance system as an example. In the two-row grid of fig. 6, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10 in the upper grid represent the position numbers of the bitmap, and 0 or 1 in the lower grid represents the numerical value corresponding to the bitmap position. Hashcode represents a user characteristic value, and R (route direction) represents conversion of a route direction into a bitmap value. After the insurance core system is reconstructed, old services and new services need to be eliminated, and gray level control is needed in the switching process to determine whether users need to be switched to the new system or not. Therefore, a bitmap for determining the routing direction can be generated in advance, that is, the routing direction can be bitized, and the routing direction of a user is converted into a bitmap value of a corresponding position of the user in the bitmap. The number of elements in the bitmap is determined according to the number of users in the insurance system, and may be, for example, a × n times the number of users, where a is the number of bitmap positions corresponding to one user, and n is greater than 1, so as to ensure that each user corresponds to a bitmap position, and when a newly registered user exists in the insurance system, a corresponding bitmap value may also be inserted into the bitmap.
When a user access request comes, the unique identifier of the user is obtained, then hash operation is carried out on the unique identifier to obtain an integer, such as a 32-bit integer, and then modulus operation is carried out on the integer to obtain a remainder. A target bitmap value may be derived based on the remainder and the pre-generated bitmap. And splicing the bitmap value of the bitmap position corresponding to the remainder and the bitmap value of the bitmap position corresponding to the remainder plus 1 to obtain a target bitmap value, and determining whether to provide gray level service for the user or not based on the target bitmap value, thereby realizing directional routing for the user. By the method provided by the embodiment of the application, the data storage quantity can be reduced. For example: totalizing 4 hundred million users, if a corresponding relation between a user identifier and a routing direction needs to be established, originally, it is indicated that 256 bits are needed by one user, and the size of the memory occupied by the routing direction is determined to be (256 × 4 × 10000)/(8 × 1024) ≈ 11.9G. And if the bitmap is used for representing the routing direction of a user, only 2 bits are needed, the size of the memory occupied by the routing direction is determined to be (2 × 4 × 10000)/(8 × 1024) ≈ 95M, and the storage is reduced by about 128 times on the premise of ignoring various external factors. The access request routing method provided by the embodiment of the application has high performance, can perform bit operation without accessing a network, and reduces request delay. By segmenting the bitmap, after the routing direction of the user is changed, the bitmap value of the user can be quickly updated, and the problem of data consistency is solved.
In some embodiments, the bitmap may also be replaced by a bloom Filter or a Cuckoo Filter (valley Filter), i.e., the target routing direction is obtained by using the bloom Filter or the Cuckoo Filter. For example, when it is determined that the bitmap is damaged, resulting in a failure to determine the route direction from the bitmap, the target route direction is determined using a bloom Filter or a Cuckoo Filter (valley Filter).
In some embodiments, when the bitmap is divided into a plurality of sub-bitmaps, that is, into a plurality of pieces, the numerical values of the sub-bitmaps may be updated in units of sub-bitmaps. For example, the gray scale policies corresponding to the sub-bitmaps may be set, when the gray scale policy corresponding to one sub-bitmap is updated, the sub-bitmap index corresponding to the sub-bitmap may be obtained, the corresponding sub-bitmap is obtained based on the sub-bitmap index, and the bitmap value in the sub-bitmap is updated based on the updated gray scale policy, so that the efficiency of updating the bitmap is improved.
In some embodiments, the bitmap may be stored in a database, such as a Redis (Remote Dictionary Server) Server, and may be loaded asynchronously. For example, the server may poll the version identifier of the bitmap in the Redis server at regular time, and if the version identifier of the bitmap in the Redis server is inconsistent with the version of the bitmap stored in the server, that is, the server that executes the access request routing method according to the embodiment of the present application, the bitmap is updated, so that the updated bitmap may be obtained from the Redis server and loaded in the server, and the update of the bitmap may be more accurate and convenient.
It should be understood that although the various steps in the flowcharts shown in the figures are shown in the order indicated by the arrows, the steps are not necessarily performed in the order indicated by the arrows. The steps are not limited to being performed in the exact order illustrated and, unless explicitly stated herein, may be performed in other orders. Moreover, at least a part of the steps in the above flowcharts may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the steps or stages is not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a part of the steps or stages in other steps.
In one embodiment, as shown in fig. 7, an access request routing apparatus is provided, which may be a part of a computer device using a software module or a hardware module, or a combination of the two modules, and specifically includes:
a user access request receiving module 702, configured to receive a user access request sent by an access terminal;
an access user characteristic value obtaining module 704, configured to determine an access user identifier corresponding to an access terminal, and perform characteristic operation on the access user identifier to obtain an access user characteristic value corresponding to the access user identifier;
a target bitmap position determining module 706, configured to determine a target bitmap position corresponding to the access user feature value in the bitmap;
a target routing direction obtaining module 708, configured to obtain a target bitmap value corresponding to a target bitmap position in the bitmap, and determine a corresponding target routing direction according to the target bitmap value;
and a routing module 710 for routing the user access request based on the target routing direction.
In some embodiments, the bitmap is split into a plurality of sub-bitmaps, the target bitmap locations include a target sub-bitmap index and a target sub-bitmap location, and the target bitmap location determination module is to: carrying out quotient extraction operation by utilizing the characteristic value of the access user and the number of elements corresponding to the sub-bitmap, and obtaining a target sub-bitmap index corresponding to the access user identifier based on a quotient extraction operation result; and performing remainder operation by using the characteristic value of the access user and the number of elements corresponding to the sub-bitmap, and obtaining the position of the target sub-bitmap corresponding to the access user identifier based on the remainder operation result. The target bitmap position determining module is used for determining a target sub-bitmap from the bitmap according to the target sub-bitmap index; and determining the value of the target bitmap from the target bitmap according to the position of the target bitmap.
In some embodiments, the target routing direction acquisition module is to: and when the target bitmap positions comprise a plurality of bitmap values, acquiring bitmap values respectively corresponding to all the target bitmap positions in the bitmap, and combining the bitmap values respectively corresponding to the target bitmap positions to obtain the target bitmap values.
In some embodiments, the target bitmap position determination module is to: determining a user bitmap position represented by the access user characteristic value in the bitmap, and acquiring a related bitmap position corresponding to the user bitmap position; and taking the user bitmap position and the associated bitmap position as a corresponding target bitmap position in the access user feature value bitmap, wherein the associated bitmap position is adjacent to the user bitmap position.
In some embodiments, the apparatus further comprises a collision detection module to: when it is determined that user conflict exists in the target bitmap position based on the target bitmap value, acquiring a corresponding relation between a user identifier corresponding to the target bitmap position stored in advance and a routing direction; and determining a target routing direction corresponding to the user access request based on the corresponding relation and the access user identifier.
In some embodiments, the apparatus further comprises: a user routing direction obtaining module, configured to obtain a routing direction corresponding to each user in a user set; the bitmap value determining module is used for determining the bitmap value corresponding to each user based on the routing direction corresponding to each user; the bitmap position acquisition module is used for determining the bitmap position of the user in the bitmap based on the user identification corresponding to the user; and the bitmap setting module is used for taking the bitmap value corresponding to the user as the value corresponding to the bitmap position in the bitmap.
In some embodiments, the target routing direction acquisition module is to: acquiring a target bitmap value corresponding to a target bitmap position in a bitmap, and determining that a target routing direction is a gray level routing direction when the target bitmap value is the bitmap value corresponding to the gray level routing direction; the routing module is used for: the user access request is routed to the grayscale access server to respond to the user access request through the grayscale access server.
For specific limitations of the access request routing apparatus, reference may be made to the above limitations of the access request routing method, which are not described herein again. The modules in the access request routing apparatus may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent of a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 8. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operating system and the computer program to run on the non-volatile storage medium. The database of the computer device is used for storing bitmap data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program when executed by a processor implements an access request routing method.
Those skilled in the art will appreciate that the architecture shown in fig. 8 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In an embodiment, a computer device is further provided, which includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, in which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
In one embodiment, a computer program product or computer program is provided that includes computer instructions stored in a computer-readable storage medium. The computer instructions are read by a processor of a computer device from a computer-readable storage medium, and the computer instructions are executed by the processor to cause the computer device to perform the steps in the above-mentioned method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by hardware instructions of a computer program, which may be stored in a non-volatile computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), for example.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent application shall be subject to the appended claims.

Claims (10)

1. An access request routing method, the method comprising:
receiving a user access request sent by an access terminal;
determining an access user identifier corresponding to the access terminal, and performing feature operation on the access user identifier to obtain an access user feature value corresponding to the access user identifier;
determining a user bitmap position represented by the access user characteristic value in a bitmap, and acquiring an associated bitmap position corresponding to the user bitmap position, wherein the associated bitmap position is adjacent to the user bitmap position; taking the user bitmap position and the associated bitmap position as a target bitmap position corresponding to the access user characteristic value in a bitmap;
acquiring a target bitmap value corresponding to the target bitmap position in the bitmap, and determining a corresponding target routing direction according to the target bitmap value;
and routing the user access request based on the target routing direction.
2. The method according to claim 1, wherein the bitmap is divided into a plurality of sub-bitmaps, the target bitmap position includes a target sub-bitmap index and a target sub-bitmap position, and the determining the corresponding target bitmap position of the access user feature value in the bitmap includes:
carrying out quotient extraction operation by utilizing the characteristic value of the access user and the element number corresponding to the sub-bitmap, and obtaining a target sub-bitmap index corresponding to the access user identifier based on a quotient extraction operation result;
performing remainder operation by using the access user characteristic value and the number of elements corresponding to the sub-bitmap, and obtaining a target sub-bitmap position corresponding to the access user identifier based on a remainder operation result;
the obtaining of the target bitmap value corresponding to the target bitmap position in the bitmap includes:
determining a target sub-bitmap from the bitmap according to the target sub-bitmap index;
and determining a target bitmap value from the target bitmap according to the position of the target bitmap.
3. The method of claim 1, wherein the obtaining the target bitmap value corresponding to the target bitmap position in the bitmap comprises:
when the target bitmap positions comprise a plurality of positions, acquiring bitmap values corresponding to the target bitmap positions in the bitmap respectively;
combining bitmap values respectively corresponding to the target bitmap positions to obtain the target bitmap value.
4. The method according to claim 1, wherein the performing the feature operation on the access user identifier to obtain an access user feature value corresponding to the access user identifier comprises:
segmenting the access user identification to obtain a plurality of character strings; acquiring characteristic values corresponding to the character strings, and splicing the acquired characteristic values to obtain access user characteristic values corresponding to the access user identification; or,
performing hash calculation on the access user identification to obtain a hash value; and taking the hash value as an access user characteristic value corresponding to the access user identification.
5. The method of claim 1, further comprising:
when it is determined that the target bitmap position has user conflict based on the target bitmap value, acquiring a pre-stored corresponding relationship between a user identifier corresponding to the target bitmap position and a routing direction;
and determining a target routing direction corresponding to the user access request based on the corresponding relation and the access user identifier.
6. The method of claim 1, further comprising:
acquiring a routing direction corresponding to each user in a user set;
determining a bitmap value corresponding to each user based on the routing direction corresponding to the user;
determining a bitmap position of the user in a bitmap based on a user identifier corresponding to the user;
and taking the bitmap value corresponding to the user as the value corresponding to the bitmap position in the bitmap.
7. The method of claim 1, wherein the obtaining a target bitmap value corresponding to the target bitmap position in the bitmap, and determining the corresponding target routing direction according to the target bitmap value comprises:
acquiring a target bitmap value corresponding to the target bitmap position in the bitmap, and determining that the target routing direction is a gray routing direction when the target bitmap value is a bitmap value corresponding to the gray routing direction;
the routing the user access request based on the target routing direction comprises:
routing the user access request to a grayscale access server to respond to the user access request through the grayscale access server.
8. An access request routing apparatus, the apparatus comprising:
the user access request receiving module is used for receiving a user access request sent by an access terminal;
an access user characteristic value obtaining module, configured to determine an access user identifier corresponding to the access terminal, and perform characteristic operation on the access user identifier to obtain an access user characteristic value corresponding to the access user identifier;
the target bitmap position determining module is used for determining a user bitmap position represented by the access user characteristic value in a bitmap and acquiring an associated bitmap position corresponding to the user bitmap position, wherein the associated bitmap position is adjacent to the user bitmap position; taking the user bitmap position and the associated bitmap position as a target bitmap position corresponding to the access user characteristic value in a bitmap;
a target routing direction obtaining module, configured to obtain a target bitmap value corresponding to the target bitmap position in the bitmap, and determine a corresponding target routing direction according to the target bitmap value;
and the routing module is used for routing the user access request based on the target routing direction.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202110677702.3A 2021-06-18 2021-06-18 Access request routing method, device, computer equipment and storage medium Active CN113411395B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110677702.3A CN113411395B (en) 2021-06-18 2021-06-18 Access request routing method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110677702.3A CN113411395B (en) 2021-06-18 2021-06-18 Access request routing method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113411395A CN113411395A (en) 2021-09-17
CN113411395B true CN113411395B (en) 2022-11-11

Family

ID=77681544

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110677702.3A Active CN113411395B (en) 2021-06-18 2021-06-18 Access request routing method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113411395B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101976362A (en) * 2010-09-30 2011-02-16 中兴通讯股份有限公司 Radio frequency identification tag access method based on bitmap and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108376118B (en) * 2018-02-09 2021-07-13 腾讯科技(深圳)有限公司 Service distribution system, method, device and storage medium
CN108881030B (en) * 2018-06-07 2022-02-25 腾讯科技(深圳)有限公司 Routing method and device in gray release scene
CN111447300A (en) * 2020-03-26 2020-07-24 深信服科技股份有限公司 Target port determination method, device, equipment and readable storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101976362A (en) * 2010-09-30 2011-02-16 中兴通讯股份有限公司 Radio frequency identification tag access method based on bitmap and device

Also Published As

Publication number Publication date
CN113411395A (en) 2021-09-17

Similar Documents

Publication Publication Date Title
US10642515B2 (en) Data storage method, electronic device, and computer non-volatile storage medium
CN110489421B (en) Data storage method, apparatus, computer readable storage medium and computer device
CN109976669B (en) Edge storage method, device and storage medium
CN111400308A (en) Processing method of cache data, electronic device and readable storage medium
CN112559529A (en) Data storage method and device, computer equipment and storage medium
CN113504918A (en) Equipment tree configuration optimization method and device, computer equipment and storage medium
CN115344284A (en) Automatic driving software upgrading method and device, storage medium and computer equipment
CN112286457B (en) Object deduplication method and device, electronic equipment and machine-readable storage medium
CN104166649A (en) Caching method and device for search engine
CN113411395B (en) Access request routing method, device, computer equipment and storage medium
CN113568877A (en) File merging method and device, electronic equipment and storage medium
CN116842012A (en) Method, device, equipment and storage medium for storing Redis cluster in fragments
CN115934354A (en) Online storage method and device
CN113132241B (en) ACL template dynamic configuration method and device
CN114489481A (en) Method and system for storing and accessing data in hard disk
CN110866127A (en) Method for establishing index and related device
CN114238334A (en) Heterogeneous data encoding method and device, heterogeneous data decoding method and device, computer equipment and storage medium
CN114443583A (en) Method, device and equipment for arranging fragment space and storage medium
CN113419792A (en) Event processing method and device, terminal equipment and storage medium
CN115221360A (en) Tree structure configuration method and system
CN112783866A (en) Data reading method and device, computer equipment and storage medium
CN112800123A (en) Data processing method, data processing device, computer equipment and storage medium
CN111966691B (en) Configuration method and system for rapidly querying directory to which object belongs in distributed storage system
CN116450591B (en) Data processing method, device, computer equipment and storage medium
CN117439993B (en) Redis cluster load balancing method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant