CN110365747B - Network request processing method and device, server and computer readable storage medium - Google Patents

Network request processing method and device, server and computer readable storage medium Download PDF

Info

Publication number
CN110365747B
CN110365747B CN201910549975.2A CN201910549975A CN110365747B CN 110365747 B CN110365747 B CN 110365747B CN 201910549975 A CN201910549975 A CN 201910549975A CN 110365747 B CN110365747 B CN 110365747B
Authority
CN
China
Prior art keywords
network service
service node
address
network
information
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
CN201910549975.2A
Other languages
Chinese (zh)
Other versions
CN110365747A (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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201910549975.2A priority Critical patent/CN110365747B/en
Publication of CN110365747A publication Critical patent/CN110365747A/en
Application granted granted Critical
Publication of CN110365747B publication Critical patent/CN110365747B/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/52Network services specially adapted for the location of the user terminal
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/668Internet protocol [IP] address subnets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/69Types of network addresses using geographic information, e.g. room number

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 invention provides a network request processing method, a network request processing device, a server and a computer readable storage medium, wherein the method comprises the following steps: receiving a network request of a client, wherein the network request comprises an IP address, positioning information and network operator information of a terminal where the client is located; judging whether the IP address is a target IP address of which the change frequency of the local information is greater than a preset frequency threshold value; if yes, acquiring a target network service node; responding to the network request, and sending an access address of the target network service node to the client; the target network service node is a network service node with the same geographical position as the positioning information or around the positioning information, and the same or different operator information as the network operator information. The invention can distribute the target network service node with the geographical position close to the terminal, improves the scheduling quality of CND of the network request of the IP address which is frequently changed in the area, and reduces the blocking probability of the terminal side client.

Description

Network request processing method and device, server and computer readable storage medium
Technical Field
The present invention relates to the field of network technologies, and in particular, to a method and an apparatus for processing a network request, a server, and a computer-readable storage medium.
Background
The basic principle of a CDN (Content Delivery Network) is to widely use various cache servers, distribute the cache servers to a region or a Network where user access is relatively concentrated, and when a user accesses a website, point the user access to the cache server closest to the user, and directly respond to a user request by the cache server.
In the related art, when a CDN schedules a user request, it mainly obtains the local information of a source IP, so as to locally deliver a cache server to the source IP. However, for various reasons, the attribution of the IP often changes, so that the attribution information of the source IP acquired by the CDN is still the attribution before the change, and is not the latest attribution, so that the acquired attribution is not accurate enough. This will result in the distributed cache server not being the nearest server to the source IP, causing problems of poor CDN scheduling quality and high client stutter probability.
Disclosure of Invention
The invention provides a network request processing method, a network request processing device, a network request server and a computer readable storage medium, and aims to solve the problems of poor CDN scheduling quality and high client blockage probability of a CDN scheduling method in the related technology.
In order to solve the above problem, according to an aspect of the present invention, the present invention discloses a method for processing a network request, including:
receiving a network request of a client, wherein the network request comprises an IP address, positioning information and network operator information of a terminal where the client is located;
judging whether the IP address is a target IP address of which the change frequency of the local information is greater than a preset frequency threshold value;
if yes, acquiring a target network service node;
sending an access address of the target network service node to the client in response to the network request;
wherein the target network service node is selected from one of:
a first network service node having the same geographical position as the positioning information and the same operator information as the network operator information;
the geographic position is in the periphery of the positioning information, and the operator information is the same as the second network service node of the network operator information;
a third network service node, the geographic position of which is the same as the positioning information and the operator information of which is different from the network operator information;
and the geographic position is at the periphery of the positioning information, and the operator information is different from the network operator information.
According to another aspect of the present invention, the present invention further discloses a device for processing a network request, including:
the system comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving a network request of a client, and the network request comprises an IP address, positioning information and network operator information of a terminal where the client is located;
the judging module is used for judging whether the IP address is a target IP address of which the change frequency of the local information is greater than a preset frequency threshold value;
the obtaining module is used for obtaining a target network service node if the judging module determines that the IP address is a target IP address of which the change frequency of the local information is greater than a preset frequency threshold;
a sending module, configured to send, in response to the network request, an access address of the target network service node to the client;
wherein the target network service node is selected from one of:
a first network service node having the same geographical position as the positioning information and the same operator information as the network operator information;
the geographic position is in the periphery of the positioning information, and the operator information is the same as the second network service node of the network operator information;
a third network service node, the geographic position of which is the same as the positioning information and the operator information of which is different from the network operator information;
and the geographic position is at the periphery of the positioning information, and the operator information is different from the network operator information.
According to another aspect of the present invention, the present invention also discloses a server, comprising: a memory, a processor and a network request processing program stored in the memory and operable on the processor, wherein the network request processing program, when executed by the processor, implements the steps of the network request processing method as described in any one of the above.
According to still another aspect of the present invention, the present invention also discloses a computer readable storage medium, on which a network request processing program is stored, and when being executed by a processor, the network request processing program realizes the steps in the network request processing method according to any one of the above items.
Compared with the prior art, the invention has the following advantages:
by means of the technical solution of the above embodiment of the present invention, after receiving a network request, the embodiment of the present invention may determine whether an IP address in the network request is a target IP address whose change frequency of the home location is greater than a preset frequency threshold, and if so, obtain a target network service node based on the location information of the terminal to which the client belongs and the network operator information in the network request, so that the geographic location of the target network service node is closer to the location information of the terminal, and distribute the access address of the target network service node to the client, because the distributed target network service node is a network service node whose geographic location is around or the same as the location information of the terminal sending the network request, the target network service node whose geographic location is close to the terminal may be distributed, thereby avoiding the problem of distributing a far network service node whose home location is not matched with the actual location of the normally changed IP address, the scheduling quality of the CND of the network request of the IP address which is frequently changed is improved; and the distributed target network service node is the network service node with the actual physical position close to the actual positioning information of the terminal, so that the responsiveness of network data interaction between the terminal side and the target network service node can be improved, and the blocking probability of the client side at the terminal side is reduced.
Drawings
FIG. 1 is a flow chart of steps of a method embodiment of the present invention for processing a network request;
FIG. 2 is a flow chart of the operation of one embodiment of the network request processing system of the present invention;
FIG. 3 is a flow chart of steps in another method embodiment of the present invention for processing a network request;
FIG. 4 is a block diagram of an embodiment of a network request processing apparatus according to the present invention;
fig. 5 is a block diagram of another embodiment of a network request processing apparatus according to the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Referring to fig. 1, a flowchart illustrating steps of an embodiment of a method for processing a network request according to the present invention is shown, where the method may be applied to a CDN, and the method may specifically include the following steps:
optionally, step 101, recording a plurality of target IP addresses, where a change frequency of the location information of each target IP address is greater than a preset frequency threshold;
wherein step 101 may be performed periodically.
The length of the IP address is 32 bits (total 2^32 IP addresses), the IP address is divided into 4 sections, each section is 8 bits and is expressed by decimal numbers, and the range of the number of each section is 0-255. For example, a certain IP address is 192.168.1.25. This step may record a target IP address whose belonging information changes frequently (here, the change frequency is greater than a preset frequency threshold) from all IP addresses. The recording manner may include, but is not limited to, adding a preset flag to the target IP address in all locally stored IP addresses, or extracting the target IP address from all the IP addresses as a set of data to record separately (for example, dividing all the IP addresses into a stable IP group and an unstable IP group, where the unstable IP group records the target IP address, and the stable IP group records the IP addresses except the target IP address in all the IP addresses), and then recording the target IP address may distinguish the target IP address from other belonged and relatively stable IP addresses.
Alternatively, since the ownership of some IP addresses is changed frequently, the destination IP addresses in the unstable IP group can be updated and maintained periodically.
102, receiving a network request of a client, wherein the network request comprises an IP address, positioning information and network operator information;
in one example, fig. 2 shows a work flow diagram of an embodiment of a system for processing network requests according to the present invention, which describes an interaction flow between a mobile terminal and a scheduling service on a server side in the system, and the method flow shown in fig. 1 is explained below with reference to fig. 2.
The CDN may receive a network request of a client, which may be a client installed on a terminal (e.g., a mobile terminal shown in fig. 2) side. The client may send a network request to a dispatch service of the CDN, where the network request may include the IP address and physical location information (i.e., the geographic location shown in fig. 2) of the mobile terminal and network operator information. The mobile terminal can acquire the physical positioning information of the mobile terminal through the WiFi module or the GPS positioning module, and the mobile terminal can also acquire the physical positioning information of the mobile terminal through the base station positioning. In addition, the mobile terminal may further obtain network operator information corresponding to a Subscriber Identity Module (SIM) card of the mobile terminal, and load the network operator information into the network request to transmit the network request to the scheduling service of the CDN.
103, judging whether the IP address is a target IP address of which the change frequency of the local information is greater than a preset frequency threshold value;
as shown in fig. 2, the dispatch service may determine whether the IP address in the network request belongs to the target IP address recorded in step 101, for example, may determine whether the IP address belongs to the unstable IP group.
If yes, step 104, acquiring a target network service node;
wherein the target network service node is selected from one of:
a first network service node having the same geographical position as the positioning information and the same operator information as the network operator information;
the geographic position is in the periphery of the positioning information, and the operator information is the same as the second network service node of the network operator information;
a third network service node, the geographic position of which is the same as the positioning information and the operator information of which is different from the network operator information;
and the geographic position is at the periphery of the positioning information, and the operator information is different from the network operator information.
For example, when an IP address in a received network request belongs to an unstable IP group, it indicates that the IP address frequently changes, and the local information about the IP address locally stored by the CDN may not be accurate enough, so that a target network service node whose geographic location is close to the positioning information may be obtained based on the positioning information and network operator information carried in the network request, and the network request may be distributed to a target network service node closer to the actual positioning of the mobile terminal for processing.
Optionally, if not, step 105, obtaining pre-recorded location information corresponding to the IP address, and identifying a target network service node whose geographic location matches the location information;
as shown in fig. 2, when an IP address in a received network request does not belong to an unstable IP group, for example, belongs to a stable IP group, it indicates that the location of the IP address is relatively stable, and the location information about the IP address stored locally by the CDN is accurate, so that the CDN may obtain the pre-recorded location information corresponding to the IP address according to a conventional scheduling method, and then identify a target network service node whose geographic location matches the location information, so as to distribute the network request to a target network service node closer to the actual location of the mobile terminal for processing.
It should be noted that not only all IP addresses may be recorded locally in the CDN, but also the information of the location to which each IP address belongs may be stored in association with each IP address, and the CDN may maintain the recorded information of the location to which each IP address belongs periodically, and when it is detected that there is an update of the location to which each IP address belongs, update the information of the location to which the corresponding IP address belongs, which is stored locally, in time. However, since the affiliated location information of some IP addresses changes frequently, and after the CDN updates the affiliated location information of the IP addresses, the affiliated locations of some IP addresses change again, and there may be cases where the CDN records the affiliated location information about the target IP address. In order to solve the problem, in the embodiment of the present invention, it is first determined whether the IP address in the network request is a target IP address that belongs to the IP address and changes frequently, and if so, the local information about the IP address that is locally stored is not used to search for a nearby network service node, but the positioning information of the mobile terminal carried in the network request is directly used to search for a network service node that is closer to the positioning information, so that it is ensured that the target network service node that is distributed to the mobile terminal is a nearby network service node of the mobile terminal, the blocking probability of the client is reduced, and the scheduling quality of the CDN is also improved.
And 106, responding to the network request, and sending the access address of the target network service node to the client.
When the network request is dispatched and scheduled, the found access address (for example, the scheduling result IP address shown in fig. 2) of the nearby target network service node may be sent to the client at the mobile terminal side, so that the client may send the network request to the access address to acquire the network data.
By means of the technical solution of the above embodiment of the present invention, after receiving a network request, the embodiment of the present invention may determine whether an IP address in the network request is a target IP address whose change frequency of the home location is greater than a preset frequency threshold, and if so, obtain a target network service node based on the location information of the terminal to which the client belongs and the network operator information in the network request, so that the geographic location of the target network service node is closer to the location information of the terminal, and distribute the access address of the target network service node to the client, because the distributed target network service node is a network service node whose geographic location is around or the same as the location information of the terminal sending the network request, the target network service node whose geographic location is close to the terminal may be distributed, thereby avoiding the problem of distributing a far network service node whose home location is not matched with the actual location of the normally changed IP address, the scheduling quality of the CND of the network request of the IP address which is frequently changed is improved; and the distributed target network service node is the network service node with the actual physical position close to the actual positioning information of the terminal, so that the responsiveness of network data interaction between the terminal side and the target network service node can be improved, and the blocking probability of the client side at the terminal side is reduced.
Alternatively, when step 101 is executed, as shown in fig. 3, it can be realized by S201 to S204:
s201, identifying the belonging place information of each candidate IP address in a plurality of candidate IP addresses according to a preset period;
the CDN may locally store IP addresses of all IP segments, which are referred to as candidate IP addresses, and store respective location information for each candidate IP address. For example, table 1 schematically shows a local information table of IP addresses maintained locally by the CDN.
IP address information Information of the location of the owner Number of associated changes
192.168.1.1 Beijing 10
192.168.1.8 Shanghai province 0
192.168.1.5 Shenzhen (Shenzhen medicine) 3
192.188.1.1 Chongqing 6
…… …… ……
TABLE 1
As shown in table 1, the local information table of the IP address locally maintained by the CDN may further include a field of the local change frequency, and for reasons of an operator, the local of some IP addresses may change, so that the CDN needs to periodically update the local information and the local change frequency in the local information table shown in table 1.
As shown in table 1, before S201 is executed, that is, before the present maintenance of the belonging place information table, the belonging place of 192.168.1.1 has been changed at least 10 times by the periodic maintenance of the belonging place information table for a plurality of times, and since it is known only at each periodic maintenance whether the belonging place of the IP address has been changed compared with the previous maintenance or not by the present maintenance, and actually, the belonging place of the IP address may have been changed a plurality of times between the two maintenance, the belonging place of 192.168.1.1 has been changed at least 10 times by table 1.
In this step, the CDN may periodically identify current actual location information of each candidate IP address, and when identifying the actual location information, may determine the actual location information of each candidate IP address by using methods such as a client feedback method, querying a geographic location to which a domain of an IP segment belongs, and the like.
S202, identifying a first candidate IP address of which the belonging information changes compared with the belonged information recorded last time;
the location information of each candidate IP address identified in S201 may be compared with the location information of each candidate IP address in table 1 stored locally, so as to determine the first candidate IP address with the changed location information.
For example, the latest location of 192.168.1.1 is Tianjin through comparison, which is different from the last recorded location in Table 1, Beijing.
S203, updating the belonged place of the first candidate IP address and the change times of the belonged place;
for the first candidate IP address with the changed location, the recorded location information of the first candidate IP address may be updated by using the identified latest location information, and here, the location information of 192.168.1.1 may be modified from beijing to tianjin as shown in table 2.
In addition, as shown in table 2, the local information table of the IP address locally maintained by the CDN may further include a field of the local change frequency, so that each time the local information table is periodically maintained, the data of the local change frequency in the record may be updated for the record in which the local information changes. For example, the number of local changes is increased by 1, and the number of local changes corresponding to 192.168.1.1 shown in table 2 is 11.
IP address information Information of the location of the owner Number of associated changes
192.168.1.1 Tianjin 11
192.168.1.8 Shanghai province 0
192.168.1.5 Shenzhen (Shenzhen medicine) 3
192.188.1.1 Chongqing 6
…… …… ……
TABLE 2
In addition, when the number of changes of the belonging place is updated, the number of changes per change of the belonging place information is not limited to 1, and may be any number such as 2, 3, or 4, and the present invention is not limited thereto.
For example, when the IP address is configured and recognized in advance, the number of recorded belonged change times is increased by 2 every time the belonged change of the IP address occurs, and the initial value is 0.
S204, recording the first candidate IP address with the local change times larger than a preset time threshold value in the candidate IP addresses as a plurality of target IP addresses.
Since the local change times in the local information tables shown in tables 1 and 2 are updated according to the preset period described in S201, the local change times in the local information tables already reflect the change frequency of the local of each candidate IP address, and therefore, the first candidate IP address, in which the local change times are greater than the preset time threshold, may be recorded, so as to obtain the recorded target IP addresses. For example, the first candidate IP address whose belonging number of changes is greater than a preset number threshold may be divided into unstable IP groups. For example, if the preset number threshold is 5, after the current round of updating, the locally maintained stable IP group at least includes 192.168.1.8 and 192.168.1.5; while the unstable IP group includes at least 192.168.1.1, 192.188.1.1.
Therefore, after updating the belonging information and the belonging change times in the belonging information table according to the preset period, the method of the embodiment of the invention determines the belonging target IP address which is frequently changed according to the updated belonging change times corresponding to each candidate IP address, so as to divide the belonging target IP address into the unstable IP group, and the other belonging stable IP addresses are divided into the stable IP group by default. Therefore, it can be found that the IP addresses in the stable IP group and the unstable IP group maintained by the embodiment of the present invention are dynamically changed.
After receiving the network request each time, when judging whether the IP address in the network request belongs to an unstable IP group, the IP address in the network request is determined based on the latest updated local information table of the CDN, and as long as the IP address belongs to the currently determined unstable IP group, the actual positioning information of the mobile terminal based on the client feedback of the embodiment of the present invention is used to obtain the access address of the target network service node whose physical location is close to the actual positioning information, and return the access address to the client. The method of the embodiment of the invention can regularly update the target IP address by regularly updating the belonged place and the belonged change times of each candidate IP address, and then schedules the network request based on the latest target IP address, thereby improving the scheduling accuracy of the network request.
For example, if a certain IP belongs to an unstable IP group, the CDN updates the locally stored home information table once a month (i.e., the preset period is one month here), but the home of the IP changes the next day when the home information table is updated, and if a conventional scheduling scheme is adopted, the home corresponding to the IP address is obtained by looking up the home information table, and then an incorrect access address is returned to the client according to the home.
For example, the certain IP address is recorded in the local information table in a hidden location, but the actual local of the IP address changes to cantonese in the second updated local data table, then the conventional technical solution still sends an access address of a network service node deployed in the hidden location to the client, because the network service node is not the optimal network service node, and the network service node is, for example, the actual local of the IP address is also far away in the hidden location, the network access of the client is unstable, and the client is stuck; in the embodiment of the present invention, because an unstable IP group is set, if the certain IP belongs to the unstable IP group, a nearby network service node is allocated to the mobile terminal according to the actual geographic address information (i.e., the positioning information) obtained from the mobile terminal to which the IP belongs, which is no longer a scheme of performing node scheduling depending on the local information of each IP locally stored by the CDN in the conventional scheme;
optionally, in executing step 104, the target network service node may be acquired from the candidate network service nodes having a margin in bandwidth.
The CDN may obtain a bandwidth margin of each candidate network service node managed by the CDN, where the bandwidth margin of one candidate network service node is the maximum bandwidth-total network request amount.
For example, a candidate network service node closest to a location of an IP is node 1, the maximum bandwidth of the node 1 is 10 thousands, and currently, 10 thousands of network requests are sent to the node 1 to request network data, it is obvious that there is no margin for the bandwidth of the node 1, if the network request received in step 102 is distributed to the node 1, the network request is difficult to be responded, and the probability of stutter of a client is very high, so in order to avoid the situation that the bandwidth margin of the distributed nearby network service node is insufficient, in the embodiment of the present invention, only the candidate network service node with margin for the bandwidth is searched for a target network service node.
Therefore, under the condition that the IP address of the network request is determined to belong to an unstable IP address, the embodiment of the invention can select the nearby target network service node of the geographic position and the actual positioning information in the network request from the candidate network service nodes with surplus bandwidth to distribute to the client, thereby avoiding the condition of high client blocking probability caused by insufficient load of the distributed nearby network service node.
Optionally, when step 104 is executed, the target network service nodes may be acquired in order from high priority to low priority;
wherein the priorities of the first network service node, the second network service node, the third network service node, and the fourth network service node are sequentially decreased.
Therefore, in the embodiment of the present invention, if there is a first network service node in the candidate network service nodes, the first network service node is preferably selected to be distributed to the client; if the first network service node does not exist, preferentially selecting a second network service node to distribute to the client; if the second network service node does not exist, preferentially selecting a third network service node to distribute to the client; and if the third network service node does not exist, preferentially selecting a fourth network service node to distribute to the client. Therefore, the target network service nodes are selected from high to low in priority to be distributed to the client.
The CDN may obtain geographic location information of each candidate network service node managed by the CDN.
It should be noted that the same geographic location and positioning information in any of the above embodiments of the present invention refers to the case where the administrative levels of the province, the municipality under the direct jurisdiction, the municipality under the autonomous region, etc. to which the two sets of information belong are the same. For example, if the IP address of the network request belongs to shanghai city, any network service node deployed in shanghai city may be a network service node with the same geographical location as the location information of the network request
In any of the above embodiments of the present invention, the geographic location is adjacent to an administrative level area such as provincial/direct-administration city/autonomous region, which is referred to by the surrounding of the positioning information. For example, if the IP address of the network request belongs to beijing, provinces adjacent to beijing may include hebeijing province and tianjin city. Then, any network service node deployed in the north Hebei province is a network service node whose geographic position is around the fixed information.
Of course, in other embodiments, the system may also pre-configure province/municipality that belongs to the periphery of its geographic location for each province/municipality.
In addition, in some embodiments, when the number of the first network service nodes is multiple, the first network service node whose geographic position is closest to the positioning information may be selected from the multiple first network service nodes as a target network service node; similarly, when the number of the second network service nodes is multiple, or when the number of the third network service nodes is multiple, or when the number of the fourth network service nodes is multiple, the network service node closest to the positioning information is also selected from the multiple selectable network service nodes as the target network service node, so that the blocking probability of the client is reduced.
Of course, one network service node may also be randomly selected from a plurality of selectable network service nodes as the target network service node, which is not limited in the present invention.
The following describes a method for selecting the target network service nodes in order of priority from high to low in detail with reference to specific examples.
For example, the actual location information of the IP address of the mobile terminal sending the network request is the shangyi mountain camp road in beijing, optionally, for a more developed city (for example, beijing), the number of network service nodes deployed is greater, and when searching for a network service node having the same geographic location as the location information, the searching may be performed in order from small to large from the geographic level.
Regarding to beijing, when the network request that the actual positioning information is the jinggangdian stone camp road in beijing is searched for the network service node with the same geographic location as the positioning information, whether the network service node with the geographic location of the jinggangdian stone camp road exists or not can be searched for first, if the network service node does not exist, whether the network service node with the geographic location of the jinggangdian stone camp road in beijing exists or not can be searched for, and if the network service node does not exist yet, whether the network service node exists in a peripheral area (such as a hai lake area and a Tongzhou area) of the jinggangdian stone camp road in beijing; if the network service node does not exist, whether the network service node exists in Beijing city is searched. In the step-by-step searching process, the network service node searched firstly is the first network service node with the same geographic position as the positioning information. That is, as long as the geographic location of the network service node belongs to the network service node in beijing, the network service node is the same as the positioning information (the shangyo mountain Buddha camp road in beijing).
In addition, each candidate network service node managed by the CDN is a server of each network operator, so that each candidate network service node corresponds to one network operator, and the CDN can acquire operator information to which each candidate network service node managed by the CDN belongs.
When searching for the first network service node, in the solution of the embodiment of the present invention, for example, the positioning information in the network request is beijing city, and the operator information is operator 1; if 3 network service nodes are found in beijing, the operator to which each network service node in the 3 network service nodes belongs needs to be further identified, and the network service node which is deployed in beijing and of which the operator is operator 1 is taken as a target network service node distributed to the mobile terminal. When the number of the network service nodes deployed in beijing city and the operator is operator 1 is multiple, one network service node may be randomly selected from the multiple network service nodes, or a network service node whose geographic position is closest to the positioning information is selected as a target network service node.
In summary, when the target network service node is distributed to the mobile terminal, the network service node satisfying the condition a is preferentially returned, where the condition a is a network service node whose operator is the same as the operator of the mobile terminal and whose geographic location is the same as the positioning information of the mobile terminal.
For another example, the positioning information in the network request is beijing city, the operator information is operator 1, the operators of the three network service nodes found in beijing are operator 2, operator 3, and operator 4, that is, the local network service node does not have the network service node of the same operator, and therefore, the network service node satisfying the above condition a is not found, but the embodiment of the present invention needs to find the second network service node, that is, the network service node of the operator 1 is searched from the network service nodes deployed by Hebei and Tianjin around Beijing to be distributed to the client corresponding to the network request, so as to preferentially return the network service node meeting the condition B, the condition B is a network service node whose operator is the same as the operator of the mobile terminal and whose geographic location is around the physical location of the mobile terminal.
For example, the location information in the network request is tibet, the operator information is operator 1, but only one network service node of operator 2 in tibet is found through searching, so network service nodes whose geographic positions are around the tibet need to be identified, for example, network service nodes deployed in qinghai province and Xinjiang can be identified. Then, it may be determined whether a network service node of which the operator is operator 1 exists in the third network service nodes deployed in qinghai province and Xinjiang.
For example, if node 2 of operator 2 is deployed in Qinghai province and node 3 of operator 1 is deployed in Xinjiang province through searching, the node 3 can be identified as the target network service node.
In summary, when the target network service node is distributed to the mobile terminal, the network service node satisfying the condition a is preferentially returned, and when there is no network service node satisfying the condition a, the network service node satisfying the condition B is preferentially returned.
For another example, the location information in the network request is tibet, the operator information is operator 1, and if only one network service node of operator 2 is found in the tibet through searching, node 2 of operator 2 is deployed in Qinghai province around the tibet, and node 3 of operator 3 is deployed in Xinjiang province, that is, there is no network service node of operator 1 in the network service nodes around the geographical location of the tibet, in other words, there is no network service node that meets the above condition B, then the network service node of operator 2 in the tibet can be identified as the target network service node.
That is, when the network service node satisfying the condition a is not found, and the network service node satisfying the condition B is not found, the network service node satisfying the condition C is preferentially returned, where the condition C is a network service node whose operator is different from the operator of the mobile terminal and whose geographic location is the same as the physical location of the mobile terminal.
In other words, the first priority returns the network service node with the same operator and the same physical location, then the second priority returns the network service node with the same operator and the physical location around the mobile terminal if there is no network service node satisfying the condition a, and then the third priority returns the network service node with the different operator and the same physical location if there is no network service node satisfying the condition B.
In the embodiment of the present invention, the condition B is prior to the condition C, that is, the network service nodes with the same operator and different geographical locations are preferentially selected, and the network service nodes with different operators and the same geographical locations are then selected, because the network speed is not limited by the operator for network requests between the same operators, and the response speed of the network request is limited by the operator for network requests across the operators.
Specifically, for example, an operator of a SIM card installed in a mobile terminal is operator 1, and location information of the mobile terminal is located in the hidden, but the hidden only deploys a network service node M of which the operator is operator 2, if the mobile terminal sends a network request to the network service node M, the operator 1 may limit a response speed of the network request, so if a network service node of the operator 1 is deployed in a city around the hidden, the method of the embodiment of the present invention preferentially selects the network service node of the operator 1 in the city around the hidden as a target network service node, thereby avoiding a speed limit problem caused by network access across operators.
When a target network service node is distributed to a mobile terminal, the network service nodes meeting the condition A, the condition B and the condition C are preferentially returned in sequence, but when the network service nodes meeting the condition A, the condition B and the condition C do not exist, the network service nodes meeting the condition D are preferentially returned, wherein the condition D is different from an operator of the mobile terminal and is a network service node around the physical position of the mobile terminal.
The operator of the SIM card, for example, installed in the mobile terminal is operator 1, the location information of the mobile terminal is located in tibet, but no network service node is deployed in tibet, while the Qinghai province around Tibet deploys the node 2 of one operator 2, and Xinjiang deploys the node 4 of only one operator 3, obviously, the candidate network service nodes do not have local network service nodes meeting the condition A and the same operator, and do not have peripheral areas meeting the condition B, and the network service node of the same operator, even if there is no local network service node of different operator satisfying the condition C, therefore, only one network service node of a different operator can be obtained from the surrounding province city as the target network service node, and the node 2 or the node 4 can be identified as the target network service node, namely, a fourth network service node meeting the condition D is obtained as the target network service node.
Optionally, a condition E may also be set in the embodiment of the present invention, and when any one of the condition a, the condition B, the condition C, and the condition D in the candidate network service node is not satisfied, a network service node that meets the condition E may be selected as a target network service node, where the condition E is to randomly select one node. Namely, randomly selecting one candidate network service node from the candidate network service nodes as the target network service node.
For example, the location information in the network request is tibet, the operator information is operator 1, but it is found through searching that there is no network service node in tibet, and there is no network service node in the peripheral provinces such as Qinghai province and Xinjiang province around the tibet, so that one network service node can be randomly selected from the candidate network service nodes (candidate network service nodes with margin in bandwidth) as a target network service node according to condition E and distributed to the client corresponding to the network request.
It should be noted that, when identifying a target network service node, if a plurality of network service nodes satisfying the condition a, the condition B, the condition C, the condition D, or the condition E are provided, one network service node may be selected from the plurality of network service nodes satisfying the corresponding condition as the target network service node according to a principle that a geographical location is close to the geographical location or a principle of random selection.
Thus, in the method of the embodiment of the present invention, when the network request includes the positioning information of the terminal and the network operator information of the terminal, the actual positioning information of the mobile terminal requesting network access and the network operator information of the mobile terminal may be combined to preferentially select the network service node having the same operator and the same physical location as the target network service node; when the network service node which is the same as the operator and is the same as the physical position does not exist, preferentially selecting the network service node which is the same as the operator and is near the physical position of the mobile terminal as a target network service node; when the network service node which is the same as the operator and is near the physical position of the mobile terminal does not exist, the network service node which is the same as the physical position of the mobile terminal but different from the operator is preferentially selected as a target network service node; when the network service node which is different from the physical position of the mobile terminal but different from the operator does not exist, the network service node which is near the physical position of the mobile terminal and different from the operator is preferentially selected as the target network service node. The network service nodes meeting the conditions are obtained step by step in a priority mode to serve as the target network service nodes, the optimal network service node can be selected from the selectable candidate network service nodes to serve as the target network service node, the target network service node distributed to the mobile terminal is the network service node which can enable the network request response speed to be fastest and the network request response delay to be minimum in all the selectable candidate network service nodes, and the distribution quality of the network service nodes is improved.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Corresponding to the method provided by the foregoing embodiment of the present invention, referring to fig. 4, a block diagram of a structure of an embodiment of a network request processing apparatus according to the present invention is shown, which may specifically include the following modules:
a receiving module 41, configured to receive a network request of a client, where the network request includes an IP address, positioning information, and network operator information of a terminal where the client is located;
the judging module 42 is configured to judge whether the IP address is a target IP address of which the change frequency of the local information is greater than a preset frequency threshold;
an obtaining module 43, configured to obtain a target network service node if the determining module determines that the IP address is a target IP address of which the change frequency of the local information is greater than a preset frequency threshold;
a sending module 44, configured to send, in response to the network request, an access address of the target network service node to the client;
wherein the target network service node is selected from one of:
a first network service node having the same geographical position as the positioning information and the same operator information as the network operator information;
the geographic position is in the periphery of the positioning information, and the operator information is the same as the second network service node of the network operator information;
a third network service node, the geographic position of which is the same as the positioning information and the operator information of which is different from the network operator information;
and the geographic position is at the periphery of the positioning information, and the operator information is different from the network operator information.
Optionally, referring to fig. 5, the apparatus further includes:
a first identifying module 45, configured to identify, according to a preset period, location information of each candidate IP address in the multiple candidate IP addresses;
a second identification module 46, configured to identify a first candidate IP address of which the belonging information is changed compared with the belonging information recorded last time;
an updating module 47, configured to update the location of the first candidate IP address and the number of changes of the location;
a recording module 48, configured to record, as multiple target IP addresses, a first candidate IP address of the multiple candidate IP addresses whose affiliated number of changes is greater than a preset number threshold;
the determining module 42 is further configured to determine whether the IP address belongs to the recorded multiple target IP addresses.
Optionally, the obtaining module 43 is further configured to obtain the target network service node from the candidate network service nodes with the margin in the bandwidth.
Optionally, the obtaining module 43 is further configured to obtain the target network service node according to a sequence from high priority to low priority;
wherein the priorities of the first network service node, the second network service node, the third network service node, and the fourth network service node are sequentially decreased.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
According to still another embodiment of the present invention, there is also provided a server including: the network request processing method comprises a memory, a processor and a network request processing program stored on the memory and capable of running on the processor, wherein the network request processing program realizes the steps of the network request processing method according to any one of the above embodiments when being executed by the processor.
According to still another embodiment of the present invention, the present invention further provides a computer-readable storage medium, on which a network request processing program is stored, and the network request processing program, when executed by a processor, implements the steps in the network request processing method according to any one of the above embodiments.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The present invention provides a network request processing method, a network request processing apparatus, a server, and a computer-readable storage medium, which have been described above in detail, and specific examples are applied herein to illustrate the principles and embodiments of the present invention, and the descriptions of the above embodiments are only used to help understand the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method for processing a network request, comprising:
receiving a network request of a client, wherein the network request comprises an IP address, positioning information and network operator information of a terminal where the client is located;
judging whether the IP address is a target IP address of which the change frequency of the local information is greater than a preset frequency threshold value;
if yes, acquiring a target network service node;
sending an access address of the target network service node to the client in response to the network request;
wherein the target network service node is selected from one of:
a first network service node having the same geographical position as the positioning information and the same operator information as the network operator information;
the geographic position is in the periphery of the positioning information, and the operator information is the same as the second network service node of the network operator information;
a third network service node, the geographic position of which is the same as the positioning information and the operator information of which is different from the network operator information;
and the geographic position is at the periphery of the positioning information, and the operator information is different from the network operator information.
2. The method of claim 1, wherein prior to receiving the network request from the client, the method further comprises:
identifying the belonging place information of each candidate IP address in the multiple candidate IP addresses according to a preset period;
identifying a first candidate IP address of which the belonging information changes compared with the belonged information recorded last time;
updating the belonged place of the first candidate IP address and the change times of the belonged place;
recording a first candidate IP address with the local change times larger than a preset time threshold value in the candidate IP addresses as a plurality of target IP addresses;
the determining whether the IP address is a target IP address whose change frequency of the local information is greater than a preset frequency threshold includes:
and judging whether the IP address belongs to the recorded target IP addresses.
3. The method of claim 1, wherein obtaining the target network service node comprises:
and acquiring the target network service node from the candidate network service nodes with the surplus bandwidth.
4. The method of claim 1, wherein obtaining the target network service node comprises:
acquiring target network service nodes according to the sequence of the priority from high to low;
wherein the priorities of the first network service node, the second network service node, the third network service node, and the fourth network service node are sequentially decreased.
5. An apparatus for processing a network request, comprising:
the system comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving a network request of a client, and the network request comprises an IP address, positioning information and network operator information of a terminal where the client is located;
the judging module is used for judging whether the IP address is a target IP address of which the change frequency of the local information is greater than a preset frequency threshold value;
the obtaining module is used for obtaining a target network service node if the judging module determines that the IP address is a target IP address of which the change frequency of the local information is greater than a preset frequency threshold;
a sending module, configured to send, in response to the network request, an access address of the target network service node to the client;
wherein the target network service node is selected from one of:
a first network service node having the same geographical position as the positioning information and the same operator information as the network operator information;
the geographic position is in the periphery of the positioning information, and the operator information is the same as the second network service node of the network operator information;
a third network service node, the geographic position of which is the same as the positioning information and the operator information of which is different from the network operator information;
and the geographic position is at the periphery of the positioning information, and the operator information is different from the network operator information.
6. The apparatus of claim 5, further comprising:
the first identification module is used for identifying the belonging place information of each candidate IP address in the candidate IP addresses according to a preset period;
the second identification module is used for identifying a first candidate IP address of which the belonged information is changed compared with the belonged information recorded last time;
the updating module is used for updating the belonged place of the first candidate IP address and the change times of the belonged place;
the recording module is used for recording a first candidate IP address with the local change times larger than a preset time threshold value in the candidate IP addresses as a plurality of target IP addresses;
the judging module is further configured to judge whether the IP address belongs to the recorded multiple target IP addresses.
7. The apparatus of claim 5,
the obtaining module is further configured to obtain a target network service node from the candidate network service nodes having the margin in bandwidth.
8. The apparatus of claim 5,
the acquisition module is further used for acquiring the target network service nodes according to the sequence of the priorities from high to low;
wherein the priorities of the first network service node, the second network service node, the third network service node, and the fourth network service node are sequentially decreased.
9. A server, comprising: memory, a processor and a network request handler stored on the memory and executable on the processor, the network request handler implementing the steps of the network request processing method according to any one of claims 1 to 4 when executed by the processor.
10. A computer-readable storage medium, on which a processing program of a network request is stored, which when executed by a processor implements the steps in the processing method of the network request according to any one of claims 1 to 4.
CN201910549975.2A 2019-06-24 2019-06-24 Network request processing method and device, server and computer readable storage medium Active CN110365747B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910549975.2A CN110365747B (en) 2019-06-24 2019-06-24 Network request processing method and device, server and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910549975.2A CN110365747B (en) 2019-06-24 2019-06-24 Network request processing method and device, server and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110365747A CN110365747A (en) 2019-10-22
CN110365747B true CN110365747B (en) 2022-04-01

Family

ID=68217543

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910549975.2A Active CN110365747B (en) 2019-06-24 2019-06-24 Network request processing method and device, server and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110365747B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113127414B (en) * 2019-12-31 2023-05-23 贵州白山云科技股份有限公司 Request processing method and system and edge node
CN111770077B (en) * 2020-06-24 2022-07-12 亦非云互联网技术(上海)有限公司 Data distribution method, system, medium and device based on edge computing virtual private network
CN113099261B (en) * 2021-04-27 2023-04-18 上海哔哩哔哩科技有限公司 Node processing method and device and node processing system
CN113765793B (en) * 2021-06-07 2023-09-05 北京京东振世信息技术有限公司 Data transmission method and device, storage medium and electronic equipment
CN114338822A (en) * 2022-01-04 2022-04-12 中国建设银行股份有限公司 End-to-end network service delivery method and related equipment thereof
CN115277566B (en) * 2022-05-20 2024-03-22 鸬鹚科技(深圳)有限公司 Load balancing method and device for data access, computer equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103248715A (en) * 2012-02-07 2013-08-14 北京百度网讯科技有限公司 Position detection method and device for CDN
CN107645525A (en) * 2016-07-21 2018-01-30 阿里巴巴集团控股有限公司 Detection processing, dispatching method and related device, the node of content distributing network
CN107682345A (en) * 2017-10-16 2018-02-09 北京奇艺世纪科技有限公司 Detection method, detection means and the electronic equipment of IP address
CN109167850A (en) * 2018-09-13 2019-01-08 杭州安恒信息技术股份有限公司 A kind of method, apparatus and storage medium of determining CDN service operator

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5880701B2 (en) * 2012-06-06 2016-03-09 日本電気株式会社 Communication system, communication control method, communication relay system, and communication relay control method
CN109413175B (en) * 2018-10-19 2021-07-20 北京奇艺世纪科技有限公司 Information processing method and device and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103248715A (en) * 2012-02-07 2013-08-14 北京百度网讯科技有限公司 Position detection method and device for CDN
CN107645525A (en) * 2016-07-21 2018-01-30 阿里巴巴集团控股有限公司 Detection processing, dispatching method and related device, the node of content distributing network
CN107682345A (en) * 2017-10-16 2018-02-09 北京奇艺世纪科技有限公司 Detection method, detection means and the electronic equipment of IP address
CN109167850A (en) * 2018-09-13 2019-01-08 杭州安恒信息技术股份有限公司 A kind of method, apparatus and storage medium of determining CDN service operator

Also Published As

Publication number Publication date
CN110365747A (en) 2019-10-22

Similar Documents

Publication Publication Date Title
CN110365747B (en) Network request processing method and device, server and computer readable storage medium
US9338601B2 (en) System and method for automated location-based widgets
US20090164459A1 (en) Contiguous location-based user networks
CN113132443B (en) Resource acquisition method and device and node equipment in CDN (content delivery network)
CN102137145B (en) Method, device and system for managing distributed contents
CN103139255B (en) The method of Resources allocation mark and identification section
CN108173774B (en) Client upgrading method and system
CN106970930B (en) Message sending determining method and device and data table creating method and device
CN104954468A (en) Resource allocation method and resource allocation device
CN105869057B (en) Comment storage device, comment reading method and device, and comment writing method and device
CN108566370B (en) Method and device for returning data to source
CN101551826B (en) Data retrieval process, set and system
CN102143212A (en) Cache sharing method and device for content delivery network
CN105608117A (en) Information recommendation method and apparatus
CN103023928A (en) P2P (peer-to-peer) node matching system and method
CN101136911A (en) Method to download files using P2P technique and P2P download system
CN101345628B (en) Source node selection method
CN106385426B (en) Node content hit method and device
CN109413202B (en) System and method for sorting block chain transaction information
CN104980417A (en) UGC file distribution method and equipment
CN105245500A (en) Multimedia resource sharing method and device
CN103023903A (en) Data transmission method and server
US20120221708A1 (en) Distributed content popularity tracking for use in memory eviction
CN103441865A (en) Method and system for managing IP addresses, BRASes and Portal server
CN102859487B (en) Follow the tracks of for networking transmission for classification and be published to wired and the content of mobile device and the method and system of buffer memory

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