CN114157721A - Route distribution method, device, equipment and readable storage medium - Google Patents
Route distribution method, device, equipment and readable storage medium Download PDFInfo
- Publication number
- CN114157721A CN114157721A CN202111440588.9A CN202111440588A CN114157721A CN 114157721 A CN114157721 A CN 114157721A CN 202111440588 A CN202111440588 A CN 202111440588A CN 114157721 A CN114157721 A CN 114157721A
- Authority
- CN
- China
- Prior art keywords
- domain name
- sub
- user terminal
- service request
- terminal
- 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.)
- Pending
Links
- 238000009826 distribution Methods 0.000 title claims abstract description 98
- 238000000034 method Methods 0.000 title claims abstract description 47
- 238000003860 storage Methods 0.000 title claims abstract description 18
- 230000004044 response Effects 0.000 claims description 4
- 238000004590 computer program Methods 0.000 claims description 3
- 230000000694 effects Effects 0.000 abstract description 5
- 238000010586 diagram Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 3
- 238000012360 testing method Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- HRANPRDGABOKNQ-ORGXEYTDSA-N (1r,3r,3as,3br,7ar,8as,8bs,8cs,10as)-1-acetyl-5-chloro-3-hydroxy-8b,10a-dimethyl-7-oxo-1,2,3,3a,3b,7,7a,8,8a,8b,8c,9,10,10a-tetradecahydrocyclopenta[a]cyclopropa[g]phenanthren-1-yl acetate Chemical group C1=C(Cl)C2=CC(=O)[C@@H]3C[C@@H]3[C@]2(C)[C@@H]2[C@@H]1[C@@H]1[C@H](O)C[C@@](C(C)=O)(OC(=O)C)[C@@]1(C)CC2 HRANPRDGABOKNQ-ORGXEYTDSA-N 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000013524 data verification Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000013112 stability test Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The embodiment of the invention discloses a route distribution method, a device, equipment and a readable storage medium, wherein the method comprises the steps of receiving a service request sent by at least one user terminal; configuring a first sub-domain name for the service request based on a main domain name carried in the service request and terminal information of a user terminal, wherein the first sub-domain name is a domain name corresponding to one of sub-servers under a server side to which the main domain name belongs, and the terminal information comprises at least one of the following: the IP address of the user terminal, the terminal type of the user terminal and the terminal model of the user terminal; and returning the first sub-domain name to the user terminal. The method and the device solve the technical problems that in the prior art, routing distribution is carried out by using load balancing equipment or a gateway layer and the like, so that accurate distribution of the user request cannot be carried out, and the stability is poor, realize accurate distribution of the user request, and improve the technical effects of system stability and system fault tolerance.
Description
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a route distribution method, a route distribution device, route distribution equipment and a readable storage medium.
Background
The existing network architecture system is deployed in multiple centers, is dual-active in different places, and uses network devices such as a Domain name resolution (DNS), a Local Traffic Management (LTM), a Web Application Firewall (Web Application Security (Web Application protection system)) and a Gateway and middleware to control a request distribution route, and the route distribution implementation mode mainly distributes the request through preset partition marks such as a load balancing device or a Gateway layer, and the distribution strategy is relatively fixed, so that the request of a user cannot be accurately distributed, and the stability is easily influenced by an operator.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, a device, and a readable storage medium for route distribution, which solve the technical problems in the prior art that a user request cannot be accurately distributed and stability is poor due to route distribution using a load balancing device or a gateway layer.
In a first aspect, an embodiment of the present invention provides a route distribution method, which is applied to a server, where the route distribution method includes:
receiving a service request sent by at least one user terminal;
configuring a first sub-domain name for the service request based on a main domain name carried in the service request and terminal information of the user terminal, wherein the first sub-domain name is a domain name corresponding to one of sub-servers at a server side to which the main domain name belongs, and the terminal information includes at least one of the following: the IP address of the user terminal, the terminal type of the user terminal and the terminal model of the user terminal;
and returning the first sub-domain name to the user terminal.
In a second aspect, an embodiment of the present invention provides a route distribution apparatus, where the route distribution apparatus includes:
a request receiving module, configured to receive a service request sent by at least one user terminal;
a route distribution module, configured to configure a first sub-domain name for the service request based on a main domain name carried in the service request and terminal information of the user terminal, where the first sub-domain name is a domain name corresponding to one of sub-servers at a server side to which the main domain name belongs, and the terminal information includes at least one of the following: the IP address of the user terminal, the terminal type of the user terminal and the terminal model of the user terminal;
and the domain name returning module is used for returning the first sub-domain name to the user terminal.
In a third aspect, an embodiment of the present invention provides a route distribution device, where the route distribution device includes:
one or more processors;
storage means for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors implement the route distribution method according to any of the first aspect of the embodiments of the present invention.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the route distribution method according to any of the first aspect of the embodiment of the present invention.
The embodiment of the invention discloses a route distribution method, a device, equipment and a readable storage medium, wherein the method comprises the steps of receiving a service request sent by at least one user terminal; configuring a first sub-domain name for the service request based on a main domain name carried in the service request and terminal information of a user terminal, wherein the first sub-domain name is a domain name corresponding to one of sub-servers under a server side to which the main domain name belongs, and the terminal information comprises at least one of the following: the IP address of the user terminal, the terminal type of the user terminal and the terminal model of the user terminal; and returning the first sub-domain name to the user terminal. The method and the device solve the technical problems that in the prior art, routing distribution is carried out by using load balancing equipment or a gateway layer and the like, so that accurate distribution of the user request cannot be carried out, and the stability is poor, realize accurate distribution of the user request, and improve the technical effects of system stability and system fault tolerance.
Drawings
Fig. 1 is a flowchart of a route distribution method according to an embodiment of the present invention;
fig. 2 is a flowchart of another route distribution method provided in an embodiment of the present invention;
fig. 3 is a flowchart of another route distribution method provided by an embodiment of the present invention;
fig. 4 is a structural diagram of a route distribution apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a route distribution device according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
It should be noted that the terms "first", "second", and the like in the description and claims of the present invention and the accompanying drawings are used for distinguishing different objects, and are not used for limiting a specific order. The following embodiments of the present invention may be implemented individually, or in combination with each other, and the embodiments of the present invention are not limited in this respect.
Fig. 1 is a flowchart of a route distribution method according to an embodiment of the present invention. The route distribution method may be performed by a route distribution apparatus, which may be implemented in hardware and/or software, and may be generally integrated in a server.
As shown in fig. 1, the route distribution method is applied to a server, and specifically includes the following steps:
s101, receiving a service request sent by at least one user terminal.
Specifically, the user terminal may be a terminal device that needs to perform a network access request, such as a smart phone, a tablet computer, an intelligent wearable device, and the like, and when the user terminal needs to perform network access, a service request needs to be sent to the server.
S102, configuring a first sub-domain name for the service request based on the main domain name carried in the service request and terminal information of the user terminal, wherein the first sub-domain name is a domain name corresponding to one of sub-servers at a server side to which the main domain name belongs, and the terminal information includes at least one of the following: an IP address of the user terminal, a terminal type of the user terminal, and a terminal model of the user terminal.
Specifically, in order to ensure the stability of the network architecture system, a plurality of sub-server terminals are arranged below one server terminal, each sub-server terminal is arranged in a different area, and when one of the sub-server terminals has a problem, other sub-server terminals can still work normally to maintain the normal operation of the network architecture system.
After a user terminal sends a service request to a server, the service request carries a main domain name and terminal information of the user terminal, after the server receives the service request, a route distribution module arranged in the server configures a first sub-domain name for the service request according to the main domain name and the terminal information in the service request, and the first sub-domain name corresponds to a certain sub-server under the server, so that route distribution of the user terminal is realized, and distribution of the user terminal is realized.
S103, returning the first sub domain name to the user terminal.
Specifically, after the server configures the corresponding first sub-domain name for the service request, the first sub-domain name is returned to the user terminal, and all subsequent service requests of the user terminal are accessed by using the first sub-domain name, so that the request distribution to the user is more accurate.
Specifically, in the prior art, a gateway layer is used for splitting, the same gateway layer may correspond to multiple network architecture systems, and when configuration change needs to be performed on one of the network architecture systems, other network architecture systems under the same gateway layer may be unstable, which is different from the prior art, an embodiment of the present invention is to implement splitting of a user terminal based on domain names, which mainly acts on an application layer, a server in the network architecture system, after receiving a service request, accesses a routing distribution service (i.e., the routing distribution module) by using a main domain name carried therein, the routing distribution service configures a corresponding first sub-domain name according to terminal information of the user terminal and returns the first sub-domain name to the server, and the server replaces the main domain name with the first sub-domain name after obtaining the first sub-domain name, and then performs corresponding processing logic service by using the first sub-domain name, all subsequent service requests of the user terminal are executed by using the first sub-domain name; when configuration change is required to be carried out on one of the network architecture systems, the stability of other network architecture systems is not influenced due to the fact that the configuration of a gateway layer is not involved, and the fault tolerance of the system is further improved.
It should be noted that the route distribution service can be customizably deployed on a plurality of network architecture systems according to the service of the network architecture system and the characteristics of the network architecture system.
In addition, in the embodiment of the invention, as the internet application has the great characteristic of high-frequency version iteration, higher requirements are also put forward on a system, machine equipment and a machine room as the system architecture is increasingly complex, and a single machine room is required to have a fault, so that quick response is realized. Meanwhile, a financial system such as a bank and the like needs to avoid a single point of failure, so that the system is required to have a distributed architecture capability of two places and three centers, however, although the distributed architecture of the horizontal mode has a certain disaster tolerance capability, the problem of multi-center network delay caused by a long distance becomes an important factor restricting service development, and in the same session, a user terminal requests to enter background service of one area, and then the request may drift to a cluster of another area, so that the former session disappears, that is, the problem of IP drift of the two places and the three centers occurs.
However, by using the route distribution method provided by the embodiment of the present invention, in the same session, the same user can be controlled to access the same region (i.e. access the sub-domain name corresponding to the same sub-server), the route distribution module is deployed under the main domain name of the server side of the network architecture system, when the network architecture system is started each time, the received first service request of the user terminal triggers the route distribution module, the route distribution module identifies the region where the service request is located and returns to the corresponding sub-domain name user terminal, and after the user terminal acquires the sub-domain name, the subsequent request of the session is accessed by the sub-domain name. Therefore, the user terminal can access the machine room of a fixed region in the session, namely access the fixed sub-server, and the original session maintaining mechanism is combined, so that the user terminal is ensured to be always served by the fixed sub-server in a certain service scene, the network delay is reduced, the user experience is optimized, and the problem of IP drift of two places and three centers is avoided.
The method and the device solve the technical problems that in the prior art, routing distribution is carried out by using load balancing equipment or a gateway layer and the like, so that accurate distribution of the user request cannot be carried out, and the stability is poor, realize accurate distribution of the user request, and improve the technical effects of system stability and system fault tolerance.
On the basis of the above technical solutions of the present invention, fig. 2 is a flowchart of another route distribution method provided in the embodiment of the present invention, and as shown in fig. 2, S102 specifically includes:
s201, generating a user identifier of the user terminal based on the terminal information of the user terminal.
S202, extracting a main domain name in the service request, and determining a first sub-domain name of the service request based on the main domain name and the user identification.
Specifically, the terminal information of the user terminal includes, but is not limited to, an IP address of the user terminal, a terminal type of the user terminal, and a terminal model of the user terminal, and the server generates a corresponding user identifier based on the terminal information, and allocates a first sub-domain name to the service request based on the main domain name and the user identifier. Illustratively, the main domain name indicates a main server (i.e. the server side described above) corresponding to a region where a request is initiated by the user terminal, and the user identifier may be set as the last number of the IP address as needed, for example, when the last number is 0, the first sub-domain name corresponding to the sub-server a is configured to the user terminal.
Optionally, in S201, before generating the user identifier of the user terminal based on the terminal information of the user terminal, the method further includes: judging whether the service request carries a user identifier of the user terminal; if yes, extracting the user identification in the service request; and if not, generating the user identification based on the terminal information of the user terminal.
Specifically, the user identifier of the user terminal may be preset as needed, and then is carried in a service request sent by the user terminal, after the service request is sent to the server, the server may first determine whether the service request carries the preset user identifier, if so, the server may directly use the user identifier, and if not, the step of generating the user identifier based on the terminal information of the user terminal is executed.
Optionally, in S201, after configuring the first sub-domain name for the service request based on the main domain name carried in the service request and the terminal information of the user terminal, the method further includes: inquiring a preset available domain name list to determine whether the first sub-domain name is available; and if not, configuring a second sub-domain name for the service request, wherein the second sub-domain name is a domain name corresponding to another sub-server except the sub-server corresponding to the first sub-domain name under the server side to which the main domain name belongs.
Specifically, a preset available domain name list is preset at a server side, a currently available sub-domain name list is recorded in the list, after a first sub-domain name corresponding to a user terminal is determined, the server side can also query the preset available domain name list to determine whether the first sub-domain name is currently available, if the first sub-domain name recorded in the list is unavailable, it is indicated that a sub-server corresponding to the first sub-domain name has a problem, and if the first sub-domain name is currently unavailable, a second sub-domain name corresponding to another sub-server at the server side is continuously configured for the service request.
Optionally, if the preset available domain name list is queried to determine that the sub domain names corresponding to all the sub servers under the server side to which the main domain name belongs are unavailable, the main domain name is configured to the service request.
Specifically, if the query determines that all the sub-servers under the server side have a fault, that is, all the sub-domain names are unavailable, the server side returns the main domain name to the user terminal.
It should be noted that the unavailability of the sub-domain name may cause a problem for the corresponding sub-server, or may be caused by a failure of the front-end link between the sub-server and the server.
Optionally, sending a query request to each sub-server under the server at intervals of a first preset time, and judging whether the sub-domain name corresponding to the sub-server is available according to whether the response of each sub-server is received within a second preset time range, so as to obtain a query result; and updating the preset available domain name list in real time according to the query result.
Specifically, in order to ensure timeliness of the preset available domain name list, every first preset time, the server side sends an inquiry request to each sub-server arranged below the server side, if feedback of the sub-server is received within a certain time range (namely the second preset time), the sub-server is indicated to be fault-free and can be used, otherwise, the sub-server is indicated to be fault, the corresponding sub-domain name is unavailable, and the server side updates the preset available domain name list in real time according to an inquiry result, so that accuracy and stability when the corresponding sub-domain name is configured for the user terminal are better.
On the basis of the above technical solutions of the present invention, fig. 3 is a flowchart of another route distribution method provided in the embodiment of the present invention, and as shown in fig. 3, when two or more user terminals send service requests, S102 specifically includes the following steps:
s301, generating a user identifier of each ue based on the terminal information of each ue.
Specifically, after a plurality of user terminals send service requests, the server side generates respective user identifiers based on terminal information carried by each service request after receiving each service request.
It should be noted that, since the user identifier of the user terminal may be preset in the service request, after receiving the service request, the server first determines whether the service request carries the user identifier, if so, the server directly uses the user identifier, and if not, step S301 is executed.
S302, extracting the main domain name carried in each service request.
Specifically, after the user identifier of the user terminal is obtained, the server side extracts the main domain name carried in each service request.
And S303, determining a first sub-domain name of each service request through a preset rule based on the main domain name and the user identification, wherein the preset rule is a basis for classifying the user terminal according to a user determined by a preset user white list, the user terminal model or the user identification.
Specifically, the preset rule may be a rule set according to needs and used for selecting a specific user, that is, the user classifies the user terminal, and through step S303, the service requests of the user terminals meeting the same condition may be classified into one class, that is, the user terminals meeting the same condition may be configured under the same sub-server.
In the embodiment of the present invention, when the proportion of the user terminals in a certain sub-server needs to be adjusted or some service scenarios of the original route distribution manner need to be changed, the route distribution module in the server may select a specific user terminal to access a specific sub-server according to the region, the terminal information of the user terminal, and the like, that is, the user terminals meeting the preset rule are configured as the same first sub-domain name.
In addition, when a new service system or application is online, complicated user data verification and system concurrency performance stability tests are usually encountered in production, and because test cases under different test environments cannot usually completely cover the conditions of the production environment, the user terminal can be controlled through the preset rules set in the route distribution module, namely, a part of user terminals meeting the preset rules are used for testing, and the stability of the new service system or the new application can be effectively verified.
Fig. 4 is a structural diagram of a route distribution apparatus according to an embodiment of the present invention, and as shown in fig. 4, the route distribution apparatus includes:
a request receiving module 41, configured to receive a service request sent by at least one user terminal;
the route distribution module 42 is configured to configure a first sub-domain name for the service request based on the main domain name carried in the service request and the terminal information of the user terminal, where the first sub-domain name is a domain name corresponding to one of sub-servers at the server side to which the main domain name belongs, and the terminal information includes at least one of the following: the IP address of the user terminal, the terminal type of the user terminal and the terminal model of the user terminal;
and a domain name returning module 43, configured to return the sub-domain name to the user terminal.
Optionally, the route distribution module 42 includes:
the identification generation submodule is used for generating a user identification of the user terminal based on the terminal information of the user terminal;
and the domain name determining submodule is used for extracting the main domain name in the service request and determining a first sub-domain name of the service request based on the main domain name and the user identification.
Optionally, before the identifier generating sub-module generates the user identifier of the user terminal based on the terminal information of the user terminal, the route distribution apparatus further includes:
the identification judging module is used for judging whether the service request carries the user identification of the user terminal;
the identification extraction module is used for extracting the user identification in the service request if the judgment result of the identification judgment module is positive;
if the judgment result of the identification judgment module is negative, the route distribution module 42 executes the generation of the user identification based on the terminal information of the user terminal.
Optionally, after the route distribution module 42 configures the first sub-domain name for the service request based on the main domain name carried in the service request and the terminal information of the user terminal, the route distribution apparatus further includes:
the query module is used for querying a preset available domain name list to determine whether the first sub-domain name is available;
if the query result of the query module is negative, the route distribution module 42 configures a second sub-domain name for the service request, where the second sub-domain name is a domain name corresponding to another sub-server except the sub-server corresponding to the first sub-domain name at the server side to which the main domain name belongs.
Optionally, if the query result of the query module indicates that the sub-domain names corresponding to all sub-servers on the server side to which the main domain name belongs are unavailable, the route distribution module 42 configures the main domain name to the service request.
Optionally, the route distribution module 42 is further configured to send a query request to each sub-server under the server end every first preset time, and determine whether the sub-domain name corresponding to the sub-server is available according to whether the response of each sub-server is received within a second preset time range, so as to obtain a query result; and updating the preset available domain name list in real time according to the query result.
The device provided by the embodiment of the present invention has the same implementation principle and technical effect as the method embodiments, and for the sake of brief description, reference may be made to the corresponding contents in the method embodiments without reference to the device embodiments.
The route distribution device provided by the embodiment of the invention has the same technical characteristics as the route distribution method provided by the embodiment, so that the same technical problems can be solved, and the same technical effects can be achieved.
Fig. 5 is a schematic structural diagram of a route distribution device according to an embodiment of the present invention, and as shown in fig. 5, the route distribution device includes a processor 51, a memory 52, an input device 53, and an output device 54; the number of the processors 51 in the route distribution device may be one or more, and one processor 51 is taken as an example in fig. 5; the processor 51, the memory 52, the input device 53 and the output device 54 in the route distribution apparatus may be connected by a bus or other means, and the connection by the bus is exemplified in fig. 5.
The memory 52 is a computer-readable storage medium, and can be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the route distribution method in the embodiment of the present invention (for example, the request receiving module 41, the route distribution module 42, and the domain name returning module 43 in the route distribution apparatus). The processor 51 executes various functional applications and data processing of the route distribution device by executing software programs, instructions and modules stored in the memory 52, that is, implements the route distribution method described above.
The memory 52 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 52 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 52 may further include memory located remotely from processor 51, which may be connected to the route distribution device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 53 may be used to receive entered numeric or character information and to generate key signal inputs relating to user settings and function control of the route distribution apparatus. The output device 54 may include a display device such as a display screen.
Embodiments of the present invention also provide a storage medium containing computer-executable instructions for performing a route distribution method when executed by a computer processor.
Specifically, the route distribution method includes:
receiving a service request sent by at least one user terminal;
configuring a first sub-domain name for the service request based on a main domain name carried in the service request and terminal information of a user terminal, wherein the first sub-domain name is a domain name corresponding to one of sub-servers under a server side to which the main domain name belongs, and the terminal information comprises at least one of the following: the IP address of the user terminal, the terminal type of the user terminal and the terminal model of the user terminal;
and returning the first sub-domain name to the user terminal.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the method operations described above, and may also perform related operations in the route distribution method provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the above search apparatus, each included unit and module are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
In the description of the embodiments of the present invention, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
Finally, it should be noted that the above-mentioned embodiments are only preferred embodiments of the present invention and the technical principles applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (10)
1. A route distribution method is applied to a server side, and the route distribution method comprises the following steps:
receiving a service request sent by at least one user terminal;
configuring a first sub-domain name for the service request based on a main domain name carried in the service request and terminal information of the user terminal, wherein the first sub-domain name is a domain name corresponding to one of sub-servers at a server side to which the main domain name belongs, and the terminal information includes at least one of the following: the IP address of the user terminal, the terminal type of the user terminal and the terminal model of the user terminal;
and returning the first sub-domain name to the user terminal.
2. The route distribution method according to claim 1, wherein the configuring a first sub-domain name for the service request based on the main domain name carried in the service request and the terminal information of the user terminal comprises:
generating a user identifier of the user terminal based on the terminal information of the user terminal;
and extracting the main domain name in the service request, and determining the first sub-domain name of the service request based on the main domain name and the user identifier.
3. The route distribution method according to claim 2, further comprising, before the generating the user identifier of the user terminal based on the terminal information of the user terminal:
judging whether the service request carries a user identifier of the user terminal;
if yes, extracting the user identification in the service request;
and if not, generating the user identification based on the terminal information of the user terminal.
4. The route distribution method according to claim 2, wherein after configuring the first sub-domain name for the service request based on the main domain name carried in the service request and the terminal information of the user terminal, the method further comprises:
querying a preset available domain name list to determine whether the first sub-domain name is available;
and if not, configuring a second sub-domain name for the service request, wherein the second sub-domain name is a domain name corresponding to another sub-server except the sub-server corresponding to the first sub-domain name under the server side to which the main domain name belongs.
5. The route distribution method according to claim 4, wherein if the preset available domain name list is queried to determine that the sub domain names corresponding to all sub servers under the server side to which the main domain name belongs are unavailable, the main domain name is configured to the service request.
6. The route distribution method according to claim 4, further comprising:
sending a query request to each sub-server under the server end every first preset time interval, and judging whether the sub-domain name corresponding to the sub-server is available according to whether the response of each sub-server is received in a second preset time range, so as to obtain a query result;
and updating the preset available domain name list in real time according to the query result.
7. The route distribution method according to claim 1, wherein when two or more user terminals send the service request, the configuring a first sub-domain name for the service request based on the main domain name carried in the service request and the terminal information of the user terminal comprises:
generating a user identifier of each user terminal based on the terminal information of each user terminal;
extracting the main domain name carried in each service request;
and determining the first sub-domain name of each service request through a preset rule based on the main domain name and the user identification, wherein the preset rule is a basis for classifying the user terminal according to a preset user white list, the user terminal model or the user identification.
8. A route distribution apparatus, characterized in that the route distribution apparatus comprises:
a request receiving module, configured to receive a service request sent by at least one user terminal;
a route distribution module, configured to configure a first sub-domain name for the service request based on a main domain name carried in the service request and terminal information of the user terminal, where the first sub-domain name is a domain name corresponding to one of sub-servers at a server side to which the main domain name belongs, and the terminal information includes at least one of the following: the IP address of the user terminal, the terminal type of the user terminal and the terminal model of the user terminal;
and the domain name returning module is used for returning the first sub-domain name to the user terminal.
9. A route distribution device, characterized in that the route distribution device comprises:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the route distribution method of any one of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the route distribution method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111440588.9A CN114157721A (en) | 2021-11-30 | 2021-11-30 | Route distribution method, device, equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111440588.9A CN114157721A (en) | 2021-11-30 | 2021-11-30 | Route distribution method, device, equipment and readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114157721A true CN114157721A (en) | 2022-03-08 |
Family
ID=80455013
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111440588.9A Pending CN114157721A (en) | 2021-11-30 | 2021-11-30 | Route distribution method, device, equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114157721A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101834910A (en) * | 2007-04-04 | 2010-09-15 | 华为技术有限公司 | Domain name resolution method and device |
CN102668518A (en) * | 2011-12-02 | 2012-09-12 | 华为技术有限公司 | Content distribution network routing method, system, and user terminal |
CN107360251A (en) * | 2017-08-16 | 2017-11-17 | 中国工商银行股份有限公司 | Method, system and the load balancing apparatus that session is kept |
CN111629078A (en) * | 2019-07-12 | 2020-09-04 | 国铁吉讯科技有限公司 | Server scheduling method and device and server scheduling system |
CN111917900A (en) * | 2020-07-29 | 2020-11-10 | 北京天融信网络安全技术有限公司 | Request processing method and device for domain name proxy |
-
2021
- 2021-11-30 CN CN202111440588.9A patent/CN114157721A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101834910A (en) * | 2007-04-04 | 2010-09-15 | 华为技术有限公司 | Domain name resolution method and device |
CN102668518A (en) * | 2011-12-02 | 2012-09-12 | 华为技术有限公司 | Content distribution network routing method, system, and user terminal |
CN107360251A (en) * | 2017-08-16 | 2017-11-17 | 中国工商银行股份有限公司 | Method, system and the load balancing apparatus that session is kept |
CN111629078A (en) * | 2019-07-12 | 2020-09-04 | 国铁吉讯科技有限公司 | Server scheduling method and device and server scheduling system |
CN111917900A (en) * | 2020-07-29 | 2020-11-10 | 北京天融信网络安全技术有限公司 | Request processing method and device for domain name proxy |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112087312B (en) | Method, device and equipment for providing edge service | |
US11258667B2 (en) | Network management method and related device | |
CN111800458B (en) | Dynamic load balancing method and system for Kubernetes container cloud platform | |
CN103685583A (en) | Method and system for resolving domain names | |
WO2021098407A1 (en) | Mec-based service node allocation method and apparatus, and related server | |
CN113645304B (en) | Data service processing method and related equipment | |
CN112367684B (en) | Flow control method, device, storage medium and computer equipment | |
CN109831507B (en) | Internet of things system, load balancing method and storage medium | |
CN104717081A (en) | Gateway function realization method and device | |
CN109151025B (en) | Load balancing method and device based on URL, computer storage medium and equipment | |
CN111970337B (en) | P2P network communication construction method, system, medium and terminal under cross-cloud environment | |
US11212329B2 (en) | Method, apparatus, device and storage medium for pushing video stream | |
EP4033719A1 (en) | System for providing exact communication delay protection of request response for distributed service | |
CN112311907A (en) | ARP request response method, load balancing equipment and related device | |
CN114036236A (en) | Multi-gateway cluster system | |
CN111031129B (en) | Access request processing method, processing device, electronic equipment and storage medium | |
CN114143090B (en) | Firewall deployment method, device, equipment and medium based on network security architecture | |
CN104734869A (en) | Intelligent DNS domain name system and method based on dynamic detection | |
CN108366087B (en) | ISCSI service realization method and device based on distributed file system | |
CN114025000A (en) | Method, device, equipment and storage medium for establishing network access relationship | |
CN111600929B (en) | Transmission line detection method, routing strategy generation method and proxy server | |
CN113691608B (en) | Traffic distribution method, device, electronic equipment and medium | |
Gómez-Cárdenas et al. | A resource identity management strategy for combined fog-to-cloud systems | |
CN114157721A (en) | Route distribution method, device, equipment and readable storage medium | |
CN108347465B (en) | Method and device for selecting network data center |
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 |