WO2024160193A1 - Cdn网络请求的调度方法,装置、电子设备及存储介质 - Google Patents
Cdn网络请求的调度方法,装置、电子设备及存储介质 Download PDFInfo
- Publication number
- WO2024160193A1 WO2024160193A1 PCT/CN2024/074643 CN2024074643W WO2024160193A1 WO 2024160193 A1 WO2024160193 A1 WO 2024160193A1 CN 2024074643 W CN2024074643 W CN 2024074643W WO 2024160193 A1 WO2024160193 A1 WO 2024160193A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- target
- domain name
- client
- rewriting rule
- computer room
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 70
- 238000013507 mapping Methods 0.000 claims description 40
- 230000004044 response Effects 0.000 claims description 24
- 238000001514 detection method Methods 0.000 claims description 18
- 238000004891 communication Methods 0.000 claims description 16
- 239000000523 sample Substances 0.000 claims description 15
- 230000007246 mechanism Effects 0.000 claims description 10
- 238000004590 computer program Methods 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 8
- 230000008569 process Effects 0.000 description 7
- 238000009434 installation Methods 0.000 description 4
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 3
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 3
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 3
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 3
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 2
- 238000011217 control strategy Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/30—Managing network names, e.g. use of aliases or nicknames
- H04L61/3015—Name registration, generation or assignment
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/50—Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate
Definitions
- Embodiments of the present disclosure relate to a method, device, electronic device and storage medium for scheduling CDN network requests.
- DNS Domain Name System
- IPs are returned based on the user's geographical location, and users in different regions access the computer room units in the corresponding region through IP.
- Forwarding and redirection based on access gateway Carry unit information in the user request header, set up traffic allocation service at the entrance of the computer room traffic, and forward or redirect user traffic of the same unit to the corresponding computer room unit according to the unit mapping rules.
- solution (1) cannot guarantee that the user's access request falls on the computer room unit in the corresponding region.
- CDN node does not know how to handle unit forwarding, resulting in the inability to forward traffic to the correct computer room. Therefore, solution (2) is not suitable for converged CDN.
- the present disclosure provides a method, device, electronic device and storage medium for scheduling CDN network requests.
- a method for scheduling CDN network requests is provided, which is applied to a client, and the method includes:
- first domain name rewriting rule corresponding to the target attribution information, and rewrite the original domain name using the first domain name rewriting rule to obtain a first domain name, wherein the first domain name includes a target CDN service provider identifier and a target computer room identifier;
- the target network request is sent to the target CDN server corresponding to the target CDN service provider identifier, so that the target CDN server obtains the target scheduling path corresponding to the target computer room identifier, and forwards the target network request to the target computer room according to the target scheduling path.
- a method for scheduling CDN network requests is also provided, which is applied to a CDN server, and the method includes:
- Target network request includes a first domain name
- first domain name includes: a target computer room identifier
- the target network request is forwarded to the target computer room based on the access path.
- a method for scheduling CDN network requests is also provided, which is applied to a cloud network control system, and the method includes:
- the first domain name rewriting rule is sent to the client, so that the client performs domain name rewriting based on the first domain name rewriting rule.
- a scheduling method for CDN network requests comprising:
- a first acquisition module configured to acquire an original network request generated by the client for a target service, wherein the original network request includes target attribution information corresponding to the client and an original domain name for accessing the target service;
- a second acquisition module is used to obtain a first domain name rewriting rule corresponding to the target attribution information, and rewrite the original domain name using the first domain name rewriting rule to obtain a first domain name, wherein the first domain name includes a target CDN service provider identifier and a target computer room identifier;
- An updating module configured to update the original domain name in the original network request by using the first domain name to obtain a target network request
- the sending module is used to send the target network request to the target CDN server corresponding to the target CDN service provider identifier, so that the target CDN server obtains the target scheduling path corresponding to the target computer room identifier, and forwards the target network request to the target computer room according to the target scheduling path.
- a scheduling device for CDN network requests including:
- a receiving module configured to receive a target network request from a client, wherein the target network request includes a first domain name, and the first domain name includes: a target computer room identifier;
- a determination module configured to determine a target return source address corresponding to the target computer room identifier based on a correspondence between a preset return source address and a computer room identifier
- An acquisition module is used to acquire the access path and the target computer room corresponding to the target back-source address
- a forwarding module is used to forward the target network request to the target computer room based on the access path.
- a scheduling device for CDN network requests including:
- a receiving module configured to receive a query request from a client, wherein the query request includes target attribution information corresponding to the client;
- a response module used to respond to the query request, and obtain a first domain name rewriting rule corresponding to the target attribution information from a plurality of domain name rewriting rules, wherein the domain name rewriting rule is generated based on a first mapping relationship between the preset attribution information and the computer room identifier, a second mapping relationship between the computer room identifier and the domain name, and a preset traffic ratio;
- the sending module is used to send the first domain name rewriting rule to the client, so that the requesting client performs domain name rewriting based on the first domain name rewriting rule.
- a storage medium is further provided, the storage medium including a stored program, and the above steps are executed when the program is run.
- an electronic device including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein: the memory is used to store computer programs; and the processor is used to execute the steps in the above method by running the program stored in the memory.
- the embodiment of the present disclosure also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the steps in the above method.
- FIG1 is a flow chart of a method for scheduling CDN network requests provided by an embodiment of the present disclosure
- FIG2 is a schematic diagram of a scheduling process of a network request provided by an embodiment of the present disclosure
- FIG3 is a flow chart of a method for scheduling CDN network requests provided by another embodiment of the present disclosure.
- FIG4 is a flow chart of a method for scheduling CDN network requests provided by another embodiment of the present disclosure.
- FIG5 is a flowchart of a method for scheduling CDN network requests provided by another embodiment of the present disclosure.
- FIG6 is a block diagram of a CDN network request scheduling device provided by an embodiment of the present disclosure.
- FIG7 is a block diagram of a CDN network request scheduling device provided by another embodiment of the present disclosure.
- FIG8 is a block diagram of a CDN network request scheduling device provided by another embodiment of the present disclosure.
- FIG. 9 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure.
- the embodiments of the present disclosure provide a method, device, electronic device and storage medium for scheduling CDN network requests.
- the method provided by the embodiments of the present disclosure can be applied to any required electronic device, for example, it can be an electronic device such as a server, a terminal, etc., which is not specifically limited here. For the convenience of description, it is referred to as an electronic device in the following.
- FIG1 is a flow chart of a method for scheduling CDN network requests provided by an embodiment of the present disclosure. As shown in FIG1 , the method includes:
- Step S11 obtaining an original network request generated by the client for the target service, wherein the original network request includes target attribution information corresponding to the client and an original domain name used to access the target service.
- the method provided by the embodiment of the present disclosure is applied to a client.
- the client When a user needs to access a service through the client, the client first obtains the current target attribution information, then determines the target service to be accessed, and obtains the original domain name used to access the target service.
- the target service is X
- the original domain name is X-aaa.com.
- the original network request is generated based on the original domain name and the target attribution information.
- the target affiliation information is determined based on the current state of the client.
- the target affiliation information is the client affiliation information, which can be generated based on the client's installation environment and operator information.
- the target affiliation information is the device affiliation information of the device to which the client belongs, which can be generated by the device information and the operator information.
- the target affiliation information is the client affiliation information, which can be the account information of the user's registered account.
- the user affiliation information has a higher priority than the device affiliation information
- the device affiliation information has a higher priority than the client affiliation information.
- the server will assign client ownership information (i.e., app_local) to the client based on the client's installation environment and operator environment.
- client ownership information i.e., app_local
- the client After the installation is completed, the client initiates a device registration request based on the preset access policy.
- the device registration request carries the client's ownership information and device information.
- the device information may be the device serial number, etc.
- the server determines whether it matches the client's affiliation information. If the server matches the client's affiliation information, the server will further determine whether the client's device is a registered device. If it is a registered device, the server will feedback the device affiliation information to the client. If it is an unregistered device, the server will use the device information to register the device affiliation information of the client's device and feedback the device affiliation information to the client.
- the client's affiliation information is location A
- the location where the device registration request is initiated is also location A. Therefore, after the installation is completed, the client will initiate a device registration request to server A corresponding to location A based on the preset access policy. After server A confirms that the client's affiliation information matches itself, it will feedback the device affiliation information to the client.
- the server When the server determines that you do not match the client's affiliation information, the server will query the access address of the affiliation server corresponding to the client's affiliation information and send the access address to the client. The client resends the device registration request to the affiliation server through the access address. The affiliation server will further determine whether the client's device is a registered device. If it is a registered device, it will feedback the device affiliation information and device identification (device ID) to the client. If it is an unregistered device, it will use the device information to register the device affiliation information and device identification (device ID) of the client's device, and the device The attribution information and device identification (device ID) are fed back to the client.
- the server will query the access address of the affiliation server corresponding to the client's affiliation information and send the access address to the client. The client resends the device registration request to the affiliation server through the access address.
- the affiliation server will further determine whether the client's device is a registered device. If it is a registered device, it will feedback
- the client's belonging information is in location A, and the location where the device registration request is initiated is location B. Therefore, after the client is installed, it will initiate a device registration request to server B corresponding to location B based on the preset access policy. After server B confirms that the client's belonging information does not match itself, it will feedback the access address of the belonging server A to the client. The client re-initiates a device registration request to server A based on the access address. After server A confirms that the client's belonging information matches itself, it will feedback the device belonging information and device identification (device ID) to the client.
- device ID device identification
- the client can send an account registration request to the server through an account registration operation triggered by the user on the client.
- the account registration request carries the user identity information, etc.
- the server generates the account ownership information based on the user identity information and feeds back the account ownership information to the client.
- Step S12 obtaining a first domain name rewriting rule corresponding to the target attribution information, and using the first domain name rewriting rule to rewrite the original domain name to obtain a first domain name, wherein the first domain name includes a target CDN service provider identifier and a target computer room identifier.
- obtaining the first domain name rewriting rule corresponding to the target attribution information can be directly obtaining the first domain name rewriting rule corresponding to the target attribution information from the domain name rewriting rule stored locally on the client.
- the domain name rewriting rule stored locally on the client is obtained by the client sending a query request to the cloud network control system based on a preset query mechanism.
- the domain name rewriting rule is generated by the cloud network control system based on a first mapping relationship between the preset attribution information and the computer room identifier, a second mapping relationship between the computer room identifier and the domain name, and a preset traffic ratio.
- the preset query mechanism can be a timed query or a query when the attribution information is updated.
- Step A1 Generate a first query request based on a preset query mechanism, wherein the first query request carries target attribution information of the client.
- generating a first query request based on a preset query mechanism includes the following steps A101-A102:
- Step A101 detecting whether the target attribution information is updated relative to the initial attribution information, and obtaining a detection result, wherein the initial attribution information is the attribution information stored by the client before receiving the original network request.
- the target attribution information is detected to see whether it is changed relative to the initial attribution information. For example, before the client receives the original network request, it is not logged in, and the corresponding initial attribution information is the device attribution information. Then, after the client receives the original network request, it detects the target attribution information it carries. If the target attribution information is the user attribution information, it is determined that the target attribution information has been updated relative to the initial attribution information. At this time, the detection result shows that the client has changed from the non-logged in state to the logged in state. If the target attribution information is the device attribution information, it is determined that the target attribution information has not been updated relative to the initial attribution information. At this time, the detection result shows that the client is still not logged in.
- Step A102 Generate a first query request based on a request generation strategy corresponding to the detection result.
- a first query request is generated based on a request generation strategy corresponding to a detection result, including: when the detection result is not updated, obtaining a preset time interval, and generating the first query request based on the preset time interval and target attribution information.
- the client if the detection result is not updated, the client generates a first query request according to a preset time interval and target attribution information, so as to periodically generate query requests.
- a first query request is generated based on the target attribution information.
- the client if the detection result is updated, the client does not need to generate a query request at a preset time interval, and can directly generate a first query request based on the target attribution information.
- the client calls the Passport service to perform login verification, and the Passport service queries the target attribution information (because the current client is logged in, the target attribution information is the user attribution information at this time), and the Passport service requests to generate a first query request based on the target attribution information.
- Step A2 sending a first query request to the cloud network control system, so that the cloud network control system obtains a first domain name rewriting rule that matches the target attribution information from multiple domain name rewriting rules, and sends the first domain name rewriting rule to the client, wherein the domain name rewriting rule is generated based on a first mapping relationship between the preset attribution information and the computer room identifier, a second mapping relationship between the computer room identifier and the domain name, and a preset traffic ratio.
- Step A3 receiving a first domain name rewriting rule sent by the cloud network control system, and storing the first domain name rewriting rule.
- the method provided in the embodiment of the present disclosure sends query requests to the cloud network control system through different query mechanisms, so that the client can obtain the latest domain name rewriting rules in different scenarios.
- step S12 uses the first domain name rewriting rule to rewrite the original domain name. Rewrite to obtain the first domain name, including the following steps B1-B2:
- Step B1 obtaining a target computer room identifier corresponding to the target attribution information from the first mapping relationship, and obtaining a candidate domain name corresponding to the target computer room identifier from the second mapping relationship.
- CD_unit and AB_unit are computer room identifiers.
- the target attribution information can be used to obtain the target computer room identifier with a mapping relationship from the first mapping relationship.
- the target computer room identifier is used to obtain its corresponding candidate domain name from the second mapping relationship, and the second mapping relationship includes:
- CD_unit service X primary domain name
- CD_unit service Y primary domain name
- A_CD_X.com, B_CD_X.com, A_CD_Y.com, B_CD_Y.com] are all domain names.
- the target computer room is identified as CD_unit, its corresponding candidate domain names are A_CD_X.com, B_CD_X.com, where A and B are the CDN service provider identifiers of the CDN server.
- Step B2 obtaining a preset traffic ratio, and determining a candidate domain name matching the preset traffic ratio as the first domain name.
- the preset traffic ratio includes: a cloud-based integrated CDN traffic ratio and a computer room traffic ratio.
- the preset range is determined according to the preset traffic ratio, for example: [1-40] corresponds to CDN service provider identifier A, and [41-100] corresponds to CDN service provider identifier B.
- the device identifier of the device to which the client belongs is used to perform a modulo operation to obtain the operation result, and the preset range within which the operation result falls is determined.
- the CDN service provider identifier corresponding to the range is used as the target CDN service provider identifier, and the candidate domain name carrying the target CDN service provider identifier is determined as the first domain name.
- the target computer room identifier is CD_unit, and its corresponding candidate domain names are A_CD_X.com and B_CD_X.com.
- the result of the modulo operation on the device identifier is 32. 32 falls within the range [1-40].
- the CDN service provider identifier A corresponding to [1-40] is used as the target CDN service provider identifier.
- the candidate domain name "A_CD_X.com” carries the identifier CDN service provider.
- the service provider is identified by A, so A_CD_X.com is the first domain name finally obtained.
- Step S13 using the first domain name to update the original domain name in the original network request to obtain a target network request.
- the client uses the first domain name to replace the original domain name in the original network request, thereby obtaining the target network request.
- the client rewrites the original domain name in the network request into the target domain name carrying the CDN service provider identifier and the computer room identifier according to the domain name rewriting rule of the target attribution information, and then carries the first domain name in the target network request.
- the server it is convenient for the server to dispatch the network request to the correct computer room using the computer room identifier.
- Step S14 sending the target network request to the target CDN server corresponding to the target CDN service provider identifier, so that the target CDN server obtains the target scheduling path corresponding to the target computer room identifier, and forwards the target network request to the target computer room according to the target scheduling path.
- the client since the first domain name in the target network request carries the target CDN service provider identifier and the target computer room identifier, based on this, the client first sends the target network request to the service access layer, and the service access layer forwards the target network request to the target CDN server according to the target CDN service provider identifier.
- the target CDN server selects the target scheduling path corresponding to the target computer room identifier, and forwards the target network request to the target computer room based on the target scheduling path.
- the first domain name carried in the target network request sent by the client is: A-M-xxx.com, A is the target CDN service provider identifier, and M is the target computer room identifier.
- the client forwards the target network request to CDN server A through the service access layer.
- CDN server A determines the target back-to-source address corresponding to M based on the correspondence between the pre-configured back-to-source address and the computer room identifier, and determines the access path and the target computer room based on the target back-to-source address, and finally sends the target network request to the target computer room M through the access path.
- the method provided by the embodiment of the present disclosure rewrites the original domain name in the network request into a target domain name carrying the CDN service provider identifier and the computer room identifier according to the domain name rewriting rule of the target attribution information by the client, and carries the target domain name in the network request and sends it, thereby achieving accurate scheduling for different network requests in different areas.
- the problem of scheduling errors or scheduling failures caused by the CDN server's inability to know the forwarding address will not occur, and it can better adapt to the use scenarios of CDN.
- the method when sending the target network request to the target CDN corresponding to the first domain name, the method further includes the following steps:
- Step S21 receiving response information fed back from the service access layer, wherein the service access layer is used to forward the target network request.
- the client when it sends a target network request, it first sends the target network request to the service access layer.
- the service access layer uses the probe information stored in itself to determine whether the domain name rewriting rule corresponding to the target attribution information of the client has been updated, and in the case of an update, sends a response message carrying the target identifier to the client. It should be noted that the probe information of the service access layer is sent after the domain name rewriting rule in the cloud network control system is updated.
- the domain name rewriting rules in the cloud network control system include: domain name rewriting rule P1 of the attribution information Q1, domain name rewriting rule P2 of the attribution information Q2, and domain name rewriting rule P3 of the attribution information Q3.
- the updated domain name rewriting rules include: domain name rewriting rule P1' of the attribution information Q1, and domain name rewriting rule P2' of the attribution information Q2.
- the probe information sent to the service access layer includes: attribution information Q1 and attribution information Q2. If the target attribution information in the target network request hits the attribution information in the probe information, it is determined that the domain name rewriting rule corresponding to the target attribution information has been updated.
- a response message is fed back to the client, and the response message carries a target identifier, which is used to indicate that the domain name rewriting rule corresponding to the target attribution information has been updated in the cloud network control system.
- the target attribution information in the target network request does not hit the attribution information in the probe information, it is determined that the domain name rewriting rule corresponding to the target attribution information has not been updated.
- the response message is fed back to the client normally, and the response message does not carry the target identifier.
- Step S22 when the response information carries the target identifier, a second query request is generated using the target attribution information, wherein the target identifier is used to indicate that the domain name rewriting rule corresponding to the target attribution information is updated in the cloud network control system.
- the client determines whether the domain name rewriting rule corresponding to the target attribution information is updated by judging whether the response information carries the target identifier.
- the client when the response information carries the target identifier, the client generates a second query request using the target attribution information to obtain the updated domain name rewriting rule.
- Step S23 sending a second query request to the cloud network control system, so that the cloud network control system sends the target attribution information corresponding to the second domain name rewriting rule, wherein the second domain name rewriting rule is the domain name rewriting rule after the first domain name rewriting rule is updated.
- the client sends a second query request to the cloud network control system, and the cloud network control system queries the corresponding updated second domain name rewriting rule based on the target attribution information in the second query request.
- Step S24 receiving the second domain name rewriting rule, and using the second domain name rewriting rule to regenerate a second domain name corresponding to the original domain name.
- the client after receiving the second domain name rewriting rule fed back by the cloud network control system, the client regenerates the second domain name corresponding to the original domain name using the second domain name rewriting rule, and carries the second domain name in the original network request to obtain a new network request.
- the new network request is sent to the server corresponding to the CDN service provider identifier carried by the second domain name, so that the server selects the corresponding access path based on the computer room identifier carried by the second domain name, and sends it to the computer room corresponding to the computer room identifier through the access path.
- the method provided by the embodiment of the present disclosure determines whether the domain name of the attribution information carried by the current network request has been updated through the probe information of the business access layer when the domain name rewriting rule of the cloud network control system is updated, thereby realizing the synchronous configuration of the domain name rewriting rule and preventing the occurrence of errors in network request forwarding.
- FIG4 is a flow chart of a method for scheduling CDN network requests provided by an embodiment of the present disclosure. As shown in FIG4, the method may include the following steps:
- Step S31 receiving a target network request from a client, wherein the target network request includes a first domain name, and the first domain name includes: a target computer room identifier.
- Step S32 Based on the correspondence between the preset return-source address and the computer room identifier, determine the target return-source address corresponding to the target computer room identifier.
- Step S33 obtaining the access path and target computer room corresponding to the target back-to-source address.
- Step S34 forwarding the target network request to the target computer room based on the access path.
- the method provided by the embodiment of the present disclosure is applied to a CDN server.
- the CDN server After the CDN server receives a target network request sent by a client, it first extracts a first domain name from the target network request.
- the first domain name includes: a target CDN service provider identifier (i.e., the CDN service provider identifier of the current CDN server) and a target computer room identifier.
- the target return source address that matches the target computer room identifier is queried from the correspondence between the pre-configured preset return source address and the computer room identifier.
- the CDN server can first obtain the correspondence between the domain name and the return source address, for example: A_AB_X.com: AB_unit.com, based on the corresponding relationship, the preset return source address and the computer room identifier are determined, that is, AB:AB_unit.com. At this time, the target return source address is determined to be: AB_unit.com.
- the CDN server after determining the target back-to-source address, obtains the access path and the target computer room corresponding to the target back-to-source address, and finally forwards the target network request to the target computer room based on the access path.
- FIG5 is a flowchart of a method for scheduling CDN network requests provided by the embodiments of the present disclosure. As shown in FIG5, the method may include the following steps:
- Step S41 receiving a first query request from a client, wherein the first query request includes target attribution information corresponding to the client.
- the method provided by the embodiment of the present disclosure is applied to a cloud network control system.
- the first query request received by the cloud network control system is generated by the client based on a preset query mechanism, wherein the preset query mechanism can be a scheduled query or a query when the affiliation information is updated.
- the first query request carries the target affiliation information corresponding to the client.
- Step S42 in response to the first query request, obtain a first domain name rewriting rule corresponding to the target attribution information from multiple domain name rewriting rules, wherein the domain name rewriting rule is generated based on a first mapping relationship between the preset attribution information and the computer room identifier, a second mapping relationship between the computer room identifier and the domain name, and a preset traffic ratio.
- the cloud network control system receives the configuration information uploaded by the administrator, and parses the configuration information to obtain the first mapping relationship between the preset attribution information and the computer room identification, and the second mapping relationship between the computer room identification and the domain name. Then obtain the traffic ratio control strategy uploaded by the administrator, and determine the preset traffic ratio based on the traffic ratio control strategy. For example, in the case of currently including CDN server A and CDN server B, the traffic sent to CDN server A accounts for 40%, and the traffic sent to CDN server B accounts for 60%. Finally, the first mapping relationship, the second mapping relationship and the preset traffic ratio generate the domain name rewriting rule.
- Step S43 sending the first domain name rewriting rule to the client, so that the client performs domain name rewriting based on the first domain name rewriting rule.
- the cloud network control system sends a first domain name rewriting rule to the client. After receiving the first domain name rewriting rule, the client stores it locally and uses the first domain name rewriting rule to rewrite the domain name.
- the method further includes the following steps C1-C4:
- Step C1 obtaining update information acting on the domain name rewriting rule, and updating the domain name rewriting rule based on the update information to obtain an updated domain name rewriting rule.
- the cloud network control system can also obtain the update information uploaded by the administrator, update the domain name rewriting rules based on the update information, and obtain updated domain name rewriting rules, such as updating the first mapping relationship, the second mapping relationship and/or the preset traffic ratio in the domain name rewriting rules.
- Step C2 generating probe information based on the updated domain name rewriting rule, and sending the probe information to the service access layer, so that when the service access layer receives the target network request sent by the client, it determines whether the domain name rewriting rule corresponding to the target attribution information of the client is updated based on the probe information, and in case of an update, sends a response message carrying the target identifier to the client;
- Step C3 receiving a second query request sent from the client, wherein the second query request carries target attribution information.
- Step C4 using the target attribution information to obtain a second domain name rewriting rule corresponding to the target attribution information from the updated domain name rewriting rule, and sending the second domain name rewriting rule to the client.
- the client since the response information carries a target identifier, the client generates a second query request based on the target identifier using the target attribution information, and the cloud network control system uses the target attribution information to obtain the second domain name rewriting rule corresponding to the target attribution information from the updated domain name rewriting rule, and sends the second domain name rewriting rule to the client.
- the client After the client subsequently receives the second domain name rewriting rule fed back by the cloud network control system, it uses the second domain name rewriting rule to regenerate the second domain name corresponding to the original domain name, and carries the second domain name in the original network request to obtain a new network request.
- the new network request is sent to the server corresponding to the CDN service provider identifier carried by the second domain name.
- FIG6 is a block diagram of a CDN network request scheduling device provided by an embodiment of the present disclosure, and the device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. As shown in FIG6 , the device includes:
- a first acquisition module 61 is used to acquire an original network request generated by a client for a target service, wherein the original network request includes target attribution information corresponding to the client and an original domain name used to access the target service;
- the second acquisition module 62 is used to obtain a first domain name rewriting rule corresponding to the target attribution information, and rewrite the original domain name using the first domain name rewriting rule to obtain a first domain name, wherein the first domain name includes a target CDN service provider identifier and a target computer room identifier;
- An updating module 63 configured to update the original domain name in the original network request using the first domain name to obtain a target network request
- the sending module 64 is used to send the target network request to the target CDN server corresponding to the target CDN service provider identifier, so that the target CDN server obtains the target scheduling path corresponding to the target computer room identifier and forwards the target network request to the target computer room according to the target scheduling path.
- the scheduling device for CDN network requests also includes: a generation module, which is used to generate a first query request based on a preset query mechanism, wherein the first query request carries the target attribution information of the client; sending the first query request to the cloud network control system, so that the cloud network control system obtains a first domain name rewriting rule that matches the target attribution information from multiple domain name rewriting rules, and sends the first domain name rewriting rule to the client, wherein the domain name rewriting rule is generated based on a first mapping relationship between the preset attribution information and the computer room identifier, a second mapping relationship between the computer room identifier and the domain name, and a preset traffic ratio; receiving the first domain name rewriting rule sent by the cloud network control system, and storing the first domain name rewriting rule.
- a generation module which is used to generate a first query request based on a preset query mechanism, wherein the first query request carries the target attribution information of the client
- sending the first query request to the cloud
- a generation module is used to detect whether the target affiliation information is updated relative to the initial affiliation information to obtain a detection result, wherein the initial affiliation information is the affiliation information stored by the client before receiving the original network request; and a first query request is generated based on a request generation strategy corresponding to the detection result.
- a generation module is used to obtain a preset time interval when a detection result is not updated, and generate a first query request based on the preset time interval and target attribution information; or, when a detection result is updated, generate a first query request based on the target attribution information.
- the second acquisition module 62 is used to obtain the target computer room identifier corresponding to the target attribution information from the first mapping relationship, and to obtain the candidate domain name corresponding to the target computer room identifier from the second mapping relationship; obtain the preset traffic ratio, and determine the candidate domain name matching the preset traffic ratio as the first domain name.
- the scheduling device for CDN network requests also includes: an update module, used to receive response information fed back from a business access layer, wherein the business access layer is used to forward the target network request; when the response information carries a target identifier, a second query request is generated using the target attribution information, wherein the target identifier is used to indicate that the domain name rewriting rule corresponding to the target attribution information has been updated in the cloud network control system; a second query request is sent to the cloud network control system so that the cloud network control system issues a second domain name rewriting rule corresponding to the target attribution information, wherein the second domain name rewriting rule is a domain name rewriting rule after the first domain name rewriting rule is updated; the second domain name rewriting rule is received, and a second domain name corresponding to the original domain name is regenerated using the second domain name rewriting rule.
- an update module used to receive response information fed back from a business access layer, wherein the business access layer is used to forward the target network request
- the response information
- FIG7 is a block diagram of a CDN network request scheduling device provided by an embodiment of the present disclosure, and the device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. As shown in FIG7 , the device includes:
- the receiving module 71 is used to receive a target network request from a client, wherein the target network request includes a first domain name, and the first domain name includes: a target computer room identifier;
- a determination module 72 configured to determine a target return source address corresponding to a target computer room identifier based on a correspondence between a preset return source address and a computer room identifier;
- An acquisition module 73 is used to acquire an access path and a target computer room corresponding to a target back-to-source address
- the forwarding module 74 is used to forward the target network request to the target computer room based on the access path.
- FIG8 is a block diagram of a CDN network request scheduling device provided by an embodiment of the present disclosure, and the device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. As shown in FIG8 , the device includes:
- the receiving module 81 is used to receive a query request from a client, wherein the query request includes target attribution information corresponding to the client;
- a response module 82 configured to respond to the query request and obtain a first domain name rewriting rule corresponding to the target attribution information from a plurality of domain name rewriting rules, wherein the domain name rewriting rule is generated based on a first mapping relationship between the preset attribution information and the computer room identifier, a second mapping relationship between the computer room identifier and the domain name, and a preset traffic ratio;
- the sending module 83 is used to send the first domain name rewriting rule to the client, so that the requesting client performs domain name rewriting based on the first domain name rewriting rule.
- the scheduling device for CDN network requests further includes: an updating module, which is used to obtain update information acting on the domain name rewriting rule, and to update the domain name rewriting rule based on the update information.
- Update to obtain updated domain name rewriting rules ; generate probe information based on the updated domain name rewriting rules, and send the probe information to the business access layer, so that the business access layer can determine whether the domain name rewriting rules corresponding to the client's target attribution information are updated based on the probe information when receiving the target network request sent by the client, and in case of an update, send a response message carrying a target identifier to the client; receive a second query request sent from the client, wherein the second query request carries the target attribution information; use the target attribution information to obtain a second domain name rewriting rule corresponding to the target attribution information from the updated domain name rewriting rules, and send the second domain name rewriting rule to the client.
- the electronic device may include: a processor 1501 , a communication interface 1502 , a memory 1503 and a communication bus 1504 , wherein the processor 1501 , the communication interface 1502 , and the memory 1503 communicate with each other via the communication bus 1504 .
- Memory 1503 used for storing computer programs
- the processor 1501 is used to implement the steps of the above embodiment when executing the computer program stored in the memory 1503.
- the communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus.
- PCI Peripheral Component Interconnect
- EISA Extended Industry Standard Architecture
- the communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
- the communication interface is used for communication between the above terminal and other devices.
- the memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk storage.
- the memory may also be at least one storage device located away from the aforementioned processor.
- processors can be general-purpose processors, including central processing units (CPU), network processors (NP), etc.; they can also be digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
- CPU central processing units
- NP network processors
- DSP digital signal processors
- ASIC application specific integrated circuits
- FPGA field programmable gate arrays
- a computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the method for scheduling CDN network requests described in any one of the above embodiments.
- a computer program product including instructions is further provided, which, when executed on a computer, enables the computer to execute the method for scheduling CDN network requests described in any one of the above embodiments.
- the computer program product includes one or more computer instructions.
- the computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
- the computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
- the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means.
- the computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated.
- the available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk), etc.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Information Transfer Between Computers (AREA)
Abstract
本公开公开了CDN网络请求的调度方法,装置、电子设备及存储介质。包括:获取客户端针对于目标服务生成的原始网络请求;获取目标归属信息对应的第一域名改写规则,并利用第一域名改写规则对原始域名进行改写,得到第一域名;利用第一域名对原始网络请求中的原始域名进行更新,得到目标网络请求;发送目标网络请求至目标CDN服务商标识对应的目标CDN服务器,以使目标CDN服务器获取目标机房标识对应的目标调度路径,并按照目标调度路径将目标网络请求转发至目标机房。本公开提供的方法能够满足多种场景下的调度需求,实现了针对不同网络请求的精准调度,不会出现因CDN服务器无法得知转发地址导致调度错误或调度失效的问题,能更好的适配CDN的使用场景。
Description
本申请要求于2023年02月03日递交的中国专利申请第2023101212054号的优先权,在此全文引用上述中国专利申请公开的内容以作为本申请的一部分。
本公开的实施例涉及一种CDN网络请求的调度方法,装置、电子设备及存储介质。
为了将不同用户的流量转发到不同的机房单元,目前业界普遍采用两种方案:(1)基于域名系统(Domain Name System,缩写:DNS)解析:基于用户地理位置返回不同的机房单元IP,不同地域的用户通过IP访问到对应地域的机房单元。(2)基于接入网关的转发和重定向:在用户请求头中携带单元化信息,通过在机房流量入口处设置流量调配服务,根据单元映射规则,将同一单元的用户流量都转发或者重定向到对应的机房单元。
虽然上述两种方案都能够将用户流量转发到不同的机房单元,但是都无法完全满足复杂的业务场景需求。例如:方案(1)无法保证用户的访问请求落在对应地域的机房单元。而方案(2)的转发路径经过内容分发网络(Content Delivery Network,缩写:CDN)节点时,CDN节点并不知道如何处理单元化转发,导致流量无法转发到正确的机房,所以方案(2)也不适用于融合CDN。
发明内容
为了解决上述技术问题或者至少部分地解决上述技术问题,本公开提供了一种CDN网络请求的调度方法,装置、电子设备及存储介质。
根据本公开实施例的一个方面,提供了一种CDN网络请求的调度方法,应用于客户端,所述方法包括:
获取所述客户端针对于目标服务生成的原始网络请求,其中,所述原始网络请求包括所述客户端对应的目标归属信息,以及用于访问所述目标服务的原始域名;
获取所述目标归属信息对应的第一域名改写规则,并利用所述第一域名改写规则对所述原始域名进行改写,得到第一域名,其中,所述第一域名包括目标CDN服务商标识以及目标机房标识;
利用所述第一域名对所述原始网络请求中的原始域名进行更新,得到目标网络请求;
发送所述目标网络请求至所述目标CDN服务商标识对应的目标CDN服务器,以使所述目标CDN服务器获取所述目标机房标识对应的目标调度路径,并按照所述目标调度路径将所述目标网络请求转发至目标机房。
根据本公开实施例的再一个方面,还提供了一种CDN网络请求的调度方法,应用于CDN服务器,所述方法包括:
接收来自于客户端的目标网络请求,其中,所述目标网络请求包括第一域名,所述第一域名包括:目标机房标识;
基于预设回源地址与机房标识之间的对应关系,确定所述目标机房标识对应的目标回源地址;
获取所述目标回源地址对应的接入路径以及目标机房;
基于所述接入路径将所述目标网络请求转发至所述目标机房。
根据本公开实施例的再一个方面,还提供了一种CDN网络请求的调度方法,应用于云网络控制系统,所述方法包括:
接收来自于客户端的第一查询请求,其中,所述第一查询请求包括所述客户端对应的目标归属信息;
响应所述第一查询请求,从多个域名改写规则中获取所述目标归属信息对应的第一域名改写规则,其中,所述域名改写规则是基于预设归属信息与机房标识之间的第一映射关系、机房标识与域名之间的第二映射关系以及预设流量比例生成的;
发送所述第一域名改写规则至所述客户端,以使所述客户端基于所述第一域名改写规则进行域名改写。
根据本公开实施例的再一个方面,还提供了一种CDN网络请求的调度
装置,包括:
第一获取模块,用于获取所述客户端针对于目标服务生成的原始网络请求,其中,所述原始网络请求包括所述客户端对应的目标归属信息,以及用于访问所述目标服务的原始域名;
第二获取模块,用于获取所述目标归属信息对应的第一域名改写规则,并利用所述第一域名改写规则对所述原始域名进行改写,得到第一域名,其中,所述第一域名包括目标CDN服务商标识以及目标机房标识;
更新模块,用于利用所述第一域名对所述原始网络请求中的原始域名进行更新,得到目标网络请求;
发送模块,用于发送所述目标网络请求至所述目标CDN服务商标识对应的目标CDN服务器,以使所述目标CDN服务器获取所述目标机房标识对应的目标调度路径,并按照所述目标调度路径将所述目标网络请求转发至目标机房。
根据本公开实施例的再一个方面,还提供了一种CDN网络请求的调度装置,包括:
接收模块,用于接收来自于客户端的目标网络请求,其中,所述目标网络请求包括第一域名,所述第一域名包括:目标机房标识;
确定模块,用于基于预设回源地址与机房标识之间的对应关系,确定所述目标机房标识对应的目标回源地址;
获取模块,用于获取所述目标回源地址对应的接入路径以及目标机房;
转发模块,用于基于所述接入路径将所述目标网络请求转发至所述目标机房。
根据本公开实施例的再一个方面,还提供了一种CDN网络请求的调度装置,包括:
接收模块,用于接收来自于客户端的查询请求,其中,所述查询请求包括所述客户端对应的目标归属信息;
响应模块,用于响应所述查询请求,从多个域名改写规则中获取所述目标归属信息对应的第一域名改写规则,其中,所述域名改写规则是基于预设归属信息与机房标识之间的第一映射关系、机房标识与域名之间的第二映射关系以及预设流量比例生成的;
发送模块,用于发送所述第一域名改写规则至所述客户端,以使所述请求客户端基于所述第一域名改写规则进行域名改写。
根据本公开实施例的另一方面,还提供了一种存储介质,该存储介质包括存储的程序,程序运行时执行上述的步骤。
根据本公开实施例的另一方面,还提供了一种电子装置,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;其中:存储器,用于存放计算机程序;处理器,用于通过运行存储器上所存放的程序来执行上述方法中的步骤。
本公开实施例还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述方法中的步骤。
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。
为了更清楚地说明本公开实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本公开实施例提供的一种CDN网络请求的调度方法的流程图;
图2为本公开实施例提供的网络请求的调度过程的示意图;
图3为本公开另一实施例提供的一种CDN网络请求的调度方法的流程图;
图4为本公开另一实施例提供的一种CDN网络请求的调度方法的流程图;
图5为本公开另一实施例提供的一种CDN网络请求的调度方法的流程图;
图6为本公开实施例提供的一种CDN网络请求的调度装置的框图;
图7为本公开另一实施例提供的一种CDN网络请求的调度装置的框图;
图8为本公开另一实施例提供的一种CDN网络请求的调度装置的框图;
图9为本公开实施例提供的一种电子设备的结构示意图。
为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本公开的一部分实施例,而不是全部的实施例,本公开的示意性实施例及其说明用于解释本公开,并不构成对本公开的不当限定。基于本公开中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本公开保护的范围。
需要说明的是,在本文中,诸如“第一”和“第二”等之类的关系术语仅仅用来将一个实体或者操作与另一个类似的实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括要素的过程、方法、物品或者设备中还存在另外的相同要素。
本公开实施例提供了一种CDN网络请求的调度方法,装置、电子设备及存储介质。本公开实施例所提供的方法可以应用于任意需要的电子设备,例如,可以为服务器、终端等电子设备,在此不做具体限定,为描述方便,后续简称为电子设备。
根据本公开实施例的一方面,提供了一种CDN网络请求的调度方法的方法实施例。图1为本公开实施例提供的一种CDN网络请求的调度方法的流程图,如图1所示,该方法包括:
步骤S11,获取客户端针对于目标服务生成的原始网络请求,其中,原始网络请求包括客户端对应的目标归属信息,以及用于访问目标服务的原始域名。
本公开实施例提供的方法应用于客户端,当用户需要通过客户端访问某一项服务时,客户端首先获取当前的目标归属信息,其次确定待访问的目标服务,并获取用于访问目标服务的原始域名,例如:客户端当前想要访问的
目标服务为X,原始域名为X-aaa.com。最终,基于原始域名以及目标归属信息生成原始网络请求。
需要说明的是,目标归属信息是基于客户端基于当前的状态确定的,当客户端当前属于安装完成、未注册状态下,目标归属信息为客户端归属信息,客户端归属信息可以是基于客户端的安装环境以及运营商信息生成的。客户端当前属于已注册、未登陆状态下,目标归属信息为客户端所属设备的设备归属信息,设备归属信息可以是设备信息以及运行商信息生成的。客户端当前属于已登录状态下,目标归属信息为客户端归属信息,客户端归属信息可以是用户所注册账户的账户信息。其中,用户归属信息的优先级高于设备归属信息,设备归属信息的优先级高于客户端归属信息。获取各个归属信息的过程如下:
(1)客户端在安装完成后,服务器会依据客户端的安装环境以及运营商环境为客户端分配客户端归属信息(即app_local)。
(2)客户端在安装完成后基于预设访问策略发起设备注册请求,设备注册请求中携带客户端归属信息以及设备信息,设备信息可以是设备序列号等。
(3)当服务器接收到客户端发送的设备注册请求后,服务器判断自身是否与客户端归属信息相匹配,如果服务器与客户端归属信息匹配,服务器会进一步判断客户端所属设是否为已注册设备,如果是已注册设备,则向该客户端反馈设备归属信息。如果是未注册设备,则利用设备信息注册客户端所属设备的设备归属信息,并将设备归属信息反馈给客户端。
例如:客户端归属信息是A地,发起设备注册请求所在地也是A地,因此客户端在安装完成后,会基于预设访问策略向A地对应的服务器A发起设备注册请求,服务器A确认客户端归属信息与自身匹配后,则向该客户端反馈设备归属信息。
(4)当服务器判断你自身与客户端归属信息不匹配时,服务器会查询该客户端归属信息对应归属服务器的访问地址,并发送访问地址至客户端,客户端通过访问地址重新发送设备注册请求至归属服务器,归属服务器会进一步判断客户端所属设是否为已注册设备,如果是已注册设备,则向该客户端反馈设备归属信息和设备标识(设备ID)。如果是未注册设备,则利用设备信息注册客户端所属设备的设备归属信息和设备标识(设备ID),并将设备
归属信息和设备标识(设备ID)反馈给客户端。
例如:客户端归属信息是A地,发起设备注册请求所在地是B地,因此客户端在安装完成后,会基于预设访问策略向B地对应的服务器B发起设备注册请求,服务器B确认客户端归属信息与自身不匹配后,则向该客户端反馈归属服务器A的访问地址。客户端基于访问地址向服务器A重新发起设备注册请求,服务器A确认客户端归属信息与自身匹配后,则向该客户端反馈设备归属信息和设备标识(设备ID)。
(5)客户端在得到设备归属信息后,可以通过用户在客户端上触发的账户注册操作,向服务器发送账户注册请求,账户注册请求携带用户身份信息等等,服务器会根据用户身份信息生成账户归属信息,并将账户归属信息反馈至客户端。
步骤S12,获取目标归属信息对应的第一域名改写规则,并利用第一域名改写规则对原始域名进行改写,得到第一域名,其中,第一域名包括目标CDN服务商标识以及目标机房标识。
在本公开实施例中,获取目标归属信息对应的第一域名改写规则,可以是直接从客户端本地存储的域名改写规则中获取目标归属信息对应的第一域名改写规则,需要说明的是,客户端本地存储的域名改写规则是客户端基于预设查询机制向云网络控制系统发送查询请求得到的,域名改写规则是云网络控制系统基于预设归属信息与机房标识之间的第一映射关系、机房标识与域名之间的第二映射关系以及预设流量比例生成的;预设查询机制可以是定时查询,也可以是归属信息发生更新的情况下,进行查询。
具体的,客户端获取域名改写规则的过程如下:
步骤A1,基于预设查询机制生成第一查询请求,其中,第一查询请求携带客户端的目标归属信息。
在本公开实施例中,基于预设查询机制生成第一查询请求,包括以下步骤A101-A102:
步骤A101,检测目标归属信息相对于初始归属信息是否发生更新,得到检测结果,其中,初始归属信息是客户端在接收原始网络请求之前存储的归属信息。
在本公开实施例中,检测目标归属信息相对于初始归属信息是否发生更
新,例如:客户端接收原始网络请求之前是未登录状态,对应的初始归属信息即为设备归属信息。然后客户端接收到原始网络请求后,检测其携带的目标归属信息,如果目标归属信息为用户归属信息,则确定目标归属信息相对于初始归属信息发生更新,此时检测结果表明客户端当前由未登录状态变更为登录状态。如果目标归属信息为设备归属信息,则确定目标归属信息相对于初始归属信息未发生更新,此时检测结果表明客户端当前仍处于未登录状态。
步骤A102,基于检测结果对应的请求生成策略生成第一查询请求。
在本公开实施例中,基于检测结果对应的请求生成策略生成第一查询请求,包括:在检测结果为未更新的情况下,获取预设时间间隔,并基于预设时间间隔以及目标归属信息生成第一查询请求。
在本公开实施例中,如果检测结果为未更新的情况下,客户端会按照预设时间间隔以及目标归属信息生成第一查询请求,以此实现周期性生成查询请求。
或,在检测结果为更新的情况下,基于目标归属信息生成第一查询请求。
在本公开实施例中,如果检测结果为更新的情况下,客户端无需按照预设时间间隔生成查询请求,可直接基于目标归属信息生成第一查询请求。具体的,客户端调用Passport服务执行登陆验证,Passport服务查询目标归属信息(由于当前客户端为登录状态,此时目标归属信息为用户归属信息),Passport服务请求基于目标归属信息生成第一查询请求。
步骤A2,发送第一查询请求至云网络控制系统,以使云网络控制系统从多个域名改写规则中获取与目标归属信息相匹配的第一域名改写规则,并发送第一域名改写规则至客户端,其中,域名改写规则是基于预设归属信息与机房标识之间的第一映射关系、机房标识与域名之间的第二映射关系以及预设流量比例生成的。
步骤A3,接收云网络控制系统发送的第一域名改写规则,并存储第一域名改写规则。
本公开实施例提供的方法通过不同的查询机制向云网络控制系统发送查询请求,以此便于客户端在不同场景下能够获取到最新的域名改写规则。
在本公开实施例中,步骤S12,利用第一域名改写规则对原始域名进行
改写,得到第一域名,包括以下步骤B1-B2:
步骤B1,从第一映射关系中获取目标归属信息对应的目标机房标识,以及从第二映射关系中获取目标机房标识对应的候选域名。
在本公开实施例中,第一映射关系包括:
store_region_uid=CD→CD_unit。
store_region_uid=AB→AB_unit。
store_region_uid=CD→CD_unit。
store_region_uid=AB→AB_unit。
上述的store_region_uid=CD和store_region_uid=AB为预设归属信息,CD_unit和AB_unit为机房标识。基于此,可以利用目标归属信息从第一映射关系获取与其具有映射关系的目标机房标识。然后利用目标机房标识从第二映射关系中获取其对应的候选域名,第二映射关系包括:
(CD_unit,服务X主域名)→[A_CD_X.com,B_CD_X.com]。
(AB_unit,服务X主域名)→[A_AB_X.com,B_AB_X.com]。
(CD_unit,服务Y主域名)→[A_CD_Y.com,B_CD_Y.com]。
(AB_unit,服务Y主域名)→[A_AB_X.com,B_AB_X.com]。
上述的A_CD_X.com、B_CD_X.com以及A_CD_Y.com,B_CD_Y.com]均为域名。例如:目标机房标识为CD_unit,其对应的候选域名为A_CD_X.com,B_CD_X.com,其中,A和B为CDN服务器的CDN服务商标识。
步骤B2,获取预设流量比例,并将与预设流量比例相匹配的候选域名确定为第一域名。
在本公开实施例中,预设流量比例包括:云端融合CDN流量比例以及机房流量比例。按照预设流量比例确定预设范围,例如:[1-40]对应CDN服务商标识A,[41-100]对应CDN服务商标识B。然后利用客户端所属设备的设备标识进行取模运算得到运算结果,判断运算结果落入的预设范围,将该范围对应的CDN服务商标识作为目标CDN服务商标识,并将携带目标CDN服务商标识的候选域名确定为第一域名。
作为一个示例,目标机房标识为CD_unit,其对应的候选域名为A_CD_X.com,B_CD_X.com,此时对设备标识进行取模运算得到的运算结果为32。32落入范围[1-40],基于此,将[1-40]对应的CDN服务商标识A作为目标CDN服务商标识,同时候选域名“A_CD_X.com”中携带标识CDN服
务商标识A,因此A_CD_X.com为最终得到的第一域名。
步骤S13,利用第一域名对原始网络请求中的原始域名进行更新,得到目标网络请求。
在本公开实施例中,客户端在得到改写的第一域名后,利用第一域名替换原始网络请求中的原始域名,从而得到目标网络请求。
需要说明的是,客户端根据目标归属信息的域名改写规则,将网络请求中的原始域名改写成携带有CDN服务商标识以及机房标识的目标域名,然后将第一域名携带在目标网络请求。以此在目标网络请求发送到服务器后,便于服务器利用机房标识将网络请求调度到正确的机房。
步骤S14,发送目标网络请求至目标CDN服务商标识对应的目标CDN服务器,以使目标CDN服务器获取目标机房标识对应的目标调度路径,并按照目标调度路径将目标网络请求转发至目标机房。
在本公开实施例中,由于目标网络请求中的第一域名携带有目标CDN服务商标识以及目标机房标识,基于此客户端首先将目标网络请求发送至业务接入层,业务接入层依据目标CDN服务商标识将目标网络请求转发至目标CDN服务器。目标CDN服务器选择目标机房标识对应的目标调度路径,并基于目标调度路径将目标网络请求转发至目标机房。
作为一个示例,如图2所示,客户端发送的目标网络请求中携带的第一域名为:A-M-xxx.com,A为目标CDN服务商标识,M为目标机房标识。客户端通过业务接入层将目标网络请求转发至CDN服务器A,CDN服务器A基于预先配置的回源地址与机房标识的对应关系确定M对应的目标回源地址,并基于目标回源地址确定接入路径以及目标机房,最终通过接入路径将目标网络请求发送至目标机房M。
本公开实施例提供的方法,通过客户端根据目标归属信息的域名改写规则,将网络请求中的原始域名改写成携带有CDN服务商标识以及机房标识的目标域名,并将目标域名携带在网络请求并发送,实现了在不同区域均能够针对不同网络请求的精准调度,相比现有技术不会出现因CDN服务器无法得知转发地址导致调度错误或调度失效的问题,能更好的适配CDN的使用场景。
在本公开实施例中,在发送目标网络请求至第一域名对应的目标CDN
服务器之后,如图3所示,方法还包括以下步骤:
步骤S21,接收来自于业务接入层反馈的响应信息,其中,业务接入层用于转发目标网络请求。
在本公开实施例中,客户端在发送目标网络请求时,首先将目标网络请求发送至业务接入层,业务接入层利用自身存储的探针信息确定客户端的目标归属信息对应的域名改写规则是否发生更新,并在发生更新的情况下,下发携带有目标标识的响应信息至客户端。需要说明的是,业务接入层的探针信息是云网络控制系统内的域名改写规则发生更新后下发的。
作为一个示例:云网络控制系统内的域名改写规则包括:归属信息Q1的域名改写规则P1,归属信息Q2的域名改写规则P2,归属信息Q3的域名改写规则P3。更新后的域名改写规则包括:归属信息Q1的域名改写规则P1’,归属信息Q2的域名改写规则P2’。此时下发至业务接入层的探针信息包括:归属信息Q1和归属信息Q2。如果目标网络请求中的目标归属信息命中探针信息中的归属信息,则确定目标归属信息对应的域名改写规则发生更新,此时向客户端反馈响应信息,且响应信息中携带目标标识,目标标识用于表示云网络控制系统中更新了目标归属信息对应的域名改写规则。相反,如果目标网络请求中的目标归属信息没有命中探针信息中的归属信息,则确定目标归属信息对应的域名改写规则未发生更新,此时向客户端正常反馈响应信息,且响应信息中不携带目标标识。
步骤S22,在响应信息中携带目标标识的情况下,利用目标归属信息生成第二查询请求,其中,目标标识用于表示云网络控制系统中更新了目标归属信息对应的域名改写规则。
在本公开实施例中,客户端在接收到响应信息后,通过判断响应信息中是否携带目标标识,从而确定目标归属信息对应的域名改写规则是否发生更新。
在本公开实施例中,在响应信息携带目标标识的情况下,客户端利用目标归属信息生成第二查询请求,以此获取更新后的域名改写规则。
步骤S23,发送第二查询请求至云网络控制系统,以使云网络控制系统下发目标归属信息对应第二域名改写规则,其中,第二域名改写规则为第一域名改写规则更新后的域名改写规则。
在本公开实施例中,客户端发送第二查询请求至云网络控制系统,云网络控制系统基于第二查询请求中的目标归属信息查询其对应更新后的第二域名改写规则。
步骤S24,接收第二域名改写规则,并利用第二域名改写规则重新生成原始域名对应的第二域名。
在本公开实施例中,客户端接收到云网络控制系统反馈的第二域名改写规则后,利用第二域名改写规则重新生成原始域名对应的第二域名,并将第二域名携带在原始网络请求,得到新的网络请求。最终将新的网络请求发送至第二域名所携带CDN服务商标识对应的服务器,以使该服务器基于第二域名所携带的机房标识选择相应的接入路径,通过该接入路径发送至机房标识对应的机房。
本公开实施例提供的方法在云网络控制系统的域名改写规则发生更新的情况下,通过业务接入层的探针信息判断是否当前网络请求携带的归属信息是否发生域名更新,以此实现了域名改写规则的同步配置,防止出现网络请求转发出错的情况。
根据本公开实施例的再一个方面,还提供了一种CDN网络请求的调度方法,图4为本公开实施例提供的一种CDN网络请求的调度方法的流程图,如图4所示,该方法可以包括以下步骤:
步骤S31,接收来自于客户端的目标网络请求,其中,目标网络请求包括第一域名,第一域名包括:目标机房标识。
步骤S32,基于预设回源地址与机房标识之间的对应关系,确定目标机房标识对应的目标回源地址。
步骤S33,获取目标回源地址对应的接入路径以及目标机房。
步骤S34,基于接入路径将目标网络请求转发至目标机房。
本公开实施例提供的方法应用于CDN服务器,CDN服务器接收到客户端发送的目标网络请求后,首先,从目标网络请求中提取第一域名,第一域名包括:目标CDN服务商标识(即当前CDN服务器的CDN服务商标识)以及目标机房标识。其次,从预先配置的预设回源地址与机房标识之间的对应关系中查询与目标机房标识相匹配的目标回源地址。具体的,CDN服务器可以先获取域名与回源地址之间的对应关系,例如:A_AB_X.com:
AB_unit.com,基于该对应关系确定预设回源地址与机房标识,即AB:AB_unit.com。此时确定目标回源地址为:AB_unit.com。
在本公开实施例中,在确定目标回源地址后,CDN服务器获取目标回源地址对应的接入路径以及目标机房,最终,基于接入路径将目标网络请求转发至目标机房。
根据本公开实施例的再一个方面,还提供了一种CDN网络请求的调度方法,图5为本公开实施例提供的一种CDN网络请求的调度方法的流程图,如图5所示,该方法可以包括以下步骤:
步骤S41,接收来自于客户端的第一查询请求,其中,第一查询请求包括客户端对应的目标归属信息。
本公开实施例提供的方法应用于云网络控制系统,云网络控制系统接收的第一查询请求是客户端基于预设查询机制生成的,其中,预设查询机制可以是定时查询,也可以是归属信息发生更新的情况下,进行查询,第一查询请求携带客户端对应的目标归属信息。
步骤S42,响应第一查询请求,从多个域名改写规则中获取目标归属信息对应的第一域名改写规则,其中,域名改写规则是基于预设归属信息与机房标识之间的第一映射关系、机房标识与域名之间的第二映射关系以及预设流量比例生成的。
在本公开实施例中,云网络控制系统响应第一查询请求,从多个域名改写规则中获取与目标属性信息对应的第一域名改写规则,云网络控制系统内的域名改写规则是基于预先配置的预设归属信息与机房标识之间的第一映射关系,例如:store_region_uid=CD→CD_unit等,机房标识与域名之间的第二映射关系,例如:CD_unit,服务X主域名)→[A_CD_X.com,B_CD_X.com]等,以及预设流量比例生成的。具体的,云网络控制系统接收管理员上传的配置信息,并解析配置信息得到预设归属信息与机房标识之间的第一映射关系,以及机房标识与域名之间的第二映射关系。然后获取管理员上传的流量比例控制策略,基于流量比例控制策略确定预设流量比例,例如当前包括CDN服务器A和CDN服务器B的情况下,发往CDN服务器A的流量占比为40%,发往CDN服务器B的流量占比为60%。最终第一映射关系,第二映射关系以及预设流量比例生成域名改写规则。
步骤S43,发送第一域名改写规则至客户端,以使客户端基于第一域名改写规则进行域名改写。
在本公开实施例中,云网络控制系统发送第一域名改写规则至客户端,客户端在接收到第一域名改写规则后将其存储在本地,并利用第一域名改写规则进行域名改写。
在本公开实施例中,方法还包括以下步骤C1-C4:
步骤C1,获取作用于域名改写规则的更新信息,并基于更新信息对域名改写规则进行更新,得到更新后的域名改写规则。
在本申请实施例中,当管理员需要更新域名改写规则时,云网络控制系统还可以获取管理员上传的更新信息,基于更新信息对域名改写规则进行更新,得到更新后的域名改写规则,例如更新域名改写规则中第一映射关系、第二映射关系和/或预设流量比例。
步骤C2,基于更新后的域名改写规则生成探针信息,并发送探针信息至业务接入层,以使业务接入层在接收到客户端发送的目标网络请求的情况下,基于探针信息确定客户端的目标归属信息对应的域名改写规则是否发生更新,并在发生更新的情况下,下发携带有目标标识的响应信息至客户端;
步骤C3,接收来自于客户端发送的第二查询请求,其中,第二查询请求携带目标归属信息。
步骤C4,利用目标归属信息从更新后的域名改写规则中获取目标归属信息对应的第二域名改写规则,并发送第二域名改写规则至客户端。
在本公开实施例中,由于响应信息携带目标标识,客户端基于该目标标识利用目标归属信息生成第二查询请求,云网络控制系统利用目标归属信息从更新后的域名改写规则中获取目标归属信息对应的第二域名改写规则,并发送第二域名改写规则至客户端。后续客户端接收到云网络控制系统反馈的第二域名改写规则后,利用第二域名改写规则重新生成原始域名对应的第二域名,并将第二域名携带在原始网络请求,得到新的网络请求。最终将新的网络请求发送至第二域名所携带CDN服务商标识对应的服务器。
图6为本公开实施例提供的一种CDN网络请求的调度装置的框图,该装置可以通过软件、硬件或者两者的结合实现成为电子设备的部分或者全部。如图6所示,该装置包括:
第一获取模块61,用于获取客户端针对于目标服务生成的原始网络请求,其中,原始网络请求包括客户端对应的目标归属信息,以及用于访问目标服务的原始域名;
第二获取模块62,用于获取目标归属信息对应的第一域名改写规则,并利用第一域名改写规则对原始域名进行改写,得到第一域名,其中,第一域名包括目标CDN服务商标识以及目标机房标识;
更新模块63,用于利用第一域名对原始网络请求中的原始域名进行更新,得到目标网络请求;
发送模块64,用于发送目标网络请求至目标CDN服务商标识对应的目标CDN服务器,以使目标CDN服务器获取目标机房标识对应的目标调度路径,并按照目标调度路径将目标网络请求转发至目标机房。
在本公开实施例中,CDN网络请求的调度装置还包括:生成模块,用于基于预设查询机制生成第一查询请求,其中,第一查询请求携带客户端的目标归属信息;发送第一查询请求至云网络控制系统,以使云网络控制系统从多个域名改写规则中获取与目标归属信息相匹配的第一域名改写规则,并发送第一域名改写规则至客户端,其中,域名改写规则是基于预设归属信息与机房标识之间的第一映射关系、机房标识与域名之间的第二映射关系以及预设流量比例生成的;接收云网络控制系统发送的第一域名改写规则,并存储第一域名改写规则。
在本公开实施例中,生成模块,用于检测目标归属信息相对于初始归属信息是否发生更新,得到检测结果,其中,初始归属信息是客户端在接收原始网络请求之前存储的归属信息;基于检测结果对应的请求生成策略生成第一查询请求。
在本公开实施例中,生成模块,用于在检测结果为未更新的情况下,获取预设时间间隔,并基于预设时间间隔以及目标归属信息生成第一查询请求;或,在检测结果为更新的情况下,基于目标归属信息生成第一查询请求。
在本公开实施例中,第二获取模块62,用于从第一映射关系中获取目标归属信息对应的目标机房标识,以及从第二映射关系中获取目标机房标识对应的候选域名;获取预设流量比例,并将与预设流量比例相匹配的候选域名确定为第一域名。
在本公开实施例中,CDN网络请求的调度装置还包括:更新模块,用于接收来自于业务接入层反馈的响应信息,其中,业务接入层用于转发目标网络请求;在响应信息中携带目标标识的情况下,利用目标归属信息生成第二查询请求,其中,目标标识用于表示云网络控制系统中更新了目标归属信息对应的域名改写规则;发送第二查询请求至云网络控制系统,以使云网络控制系统下发目标归属信息对应第二域名改写规则,其中,第二域名改写规则为第一域名改写规则更新后的域名改写规则;接收第二域名改写规则,并利用第二域名改写规则重新生成原始域名对应的第二域名。
图7为本公开实施例提供的一种CDN网络请求的调度装置的框图,该装置可以通过软件、硬件或者两者的结合实现成为电子设备的部分或者全部。如图7所示,该装置包括:
接收模块71,用于接收来自于客户端的目标网络请求,其中,目标网络请求包括第一域名,第一域名包括:目标机房标识;
确定模块72,用于基于预设回源地址与机房标识之间的对应关系,确定目标机房标识对应的目标回源地址;
获取模块73,用于获取目标回源地址对应的接入路径以及目标机房;
转发模块74,用于基于接入路径将目标网络请求转发至目标机房。
图8为本公开实施例提供的一种CDN网络请求的调度装置的框图,该装置可以通过软件、硬件或者两者的结合实现成为电子设备的部分或者全部。如图8所示,该装置包括:
接收模块81,用于接收来自于客户端的查询请求,其中,查询请求包括客户端对应的目标归属信息;
响应模块82,用于响应查询请求,从多个域名改写规则中获取目标归属信息对应的第一域名改写规则,其中,域名改写规则是基于预设归属信息与机房标识之间的第一映射关系、机房标识与域名之间的第二映射关系以及预设流量比例生成的;
发送模块83,用于发送第一域名改写规则至客户端,以使请求客户端基于第一域名改写规则进行域名改写。
在本公开实施例中,CDN网络请求的调度装置还包括:更新模块,用于获取作用于域名改写规则的更新信息,并基于更新信息对域名改写规则进行
更新,得到更新后的域名改写规则;基于更新后的域名改写规则生成探针信息,并发送探针信息至业务接入层,以使业务接入层在接收到客户端发送的目标网络请求的情况下,基于探针信息确定客户端的目标归属信息对应的域名改写规则是否发生更新,并在发生更新的情况下,下发携带有目标标识的响应信息至客户端;接收来自于客户端发送的第二查询请求,其中,第二查询请求携带目标归属信息;利用目标归属信息从更新后的域名改写规则中获取目标归属信息对应的第二域名改写规则,并发送第二域名改写规则至客户端。
本公开实施例还提供一种电子设备,如图9所示,电子设备可以包括:处理器1501、通信接口1502、存储器1503和通信总线1504,其中,处理器1501,通信接口1502,存储器1503通过通信总线1504完成相互间的通信。
存储器1503,用于存放计算机程序;
处理器1501,用于执行存储器1503上所存放的计算机程序时,实现上述实施例的步骤。
上述终端提到的通信总线可以是外设部件互连标准(Peripheral Component Interconnect,简称PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,简称EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
通信接口用于上述终端与其他设备之间的通信。
存储器可以包括随机存取存储器(Random Access Memory,简称RAM),也可以包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。
上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,简称CPU)、网络处理器(Network Processor,简称NP)等;还可以是数字信号处理器(Digital Signal Processing,简称DSP)、专用集成电路(Application Specific Integrated Circuit,简称ASIC)、现场可编程门阵列(Field-Programmable Gate Array,简称FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。
在本公开提供的又一实施例中,还提供了一种计算机可读存储介质,该
计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述实施例中任一所述的CDN网络请求的调度方法。
在本公开提供的又一实施例中,还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述实施例中任一所述的CDN网络请求的调度方法。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本公开实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk)等。
以上所述仅为本公开的较佳实施例而已,并非用于限定本公开的保护范围。凡在本公开的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本公开的保护范围内。
以上所述仅是本公开的具体实施方式,使本领域技术人员能够理解或实现本公开。对这些实施例的多种修改对本领域的技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本公开的精神或范围的情况下,在其它实施例中实现。因此,本公开将不会被限制于本文所示的这些实施例,而是要符合与本文所申请的原理和新颖特点相一致的最宽的范围。
Claims (14)
- 一种CDN网络请求的调度方法,其中,应用于客户端,所述方法包括:获取所述客户端针对于目标服务生成的原始网络请求,其中,所述原始网络请求包括所述客户端对应的目标归属信息,以及用于访问所述目标服务的原始域名;获取所述目标归属信息对应的第一域名改写规则,并利用所述第一域名改写规则对所述原始域名进行改写,得到第一域名,其中,所述第一域名包括目标CDN服务商标识以及目标机房标识;利用所述第一域名对所述原始网络请求中的原始域名进行更新,得到目标网络请求;发送所述目标网络请求至所述目标CDN服务商标识对应的目标CDN服务器,以使所述目标CDN服务器获取所述目标机房标识对应的目标调度路径,并按照所述目标调度路径将所述目标网络请求转发至目标机房。
- 根据权利要求1所述的方法,其中,在获取所述目标归属信息对应的第一域名改写规则之前,所述方法还包括:基于预设查询机制生成第一查询请求,其中,所述第一查询请求携带所述客户端的目标归属信息;发送所述第一查询请求至云网络控制系统,以使所述云网络控制系统从多个域名改写规则中获取与所述目标归属信息相匹配的第一域名改写规则,并发送所述第一域名改写规则至所述客户端,其中,所述域名改写规则是基于预设归属信息与机房标识之间的第一映射关系、机房标识与域名之间的第二映射关系以及预设流量比例生成的;接收所述云网络控制系统发送的所述第一域名改写规则,并存储所述第一域名改写规则。
- 根据权利要求2所述的方法,其中,所述基于预设查询机制生成第一查询请求,包括:检测所述目标归属信息相对于初始归属信息是否发生更新,得到检测结果,其中,所述初始归属信息是所述客户端在接收原始网络请求之前存储的 归属信息;基于所述检测结果对应的请求生成策略生成所述第一查询请求。
- 根据权利要求3所述的方法,其中,所述基于所述检测结果对应的请求生成策略生成所述第一查询请求,包括:在所述检测结果为未更新的情况下,获取预设时间间隔,并基于预设时间间隔以及所述目标归属信息生成所述第一查询请求;或,在所述检测结果为更新的情况下,基于所述目标归属信息生成所述第一查询请求。
- 根据权利要求2所述的方法,其中,所述利用所述第一域名改写规则对所述原始域名进行改写,得到第一域名,包括:从所述第一映射关系中获取所述目标归属信息对应的目标机房标识,以及从所述第二映射关系中获取所述目标机房标识对应的候选域名;获取预设流量比例,并将与所述预设流量比例相匹配的候选域名确定为所述第一域名。
- 根据权利要求1所述的方法,其中,在发送所述目标网络请求至所述第一域名对应的目标CDN服务器之后,所述方法还包括:接收来自于业务接入层反馈的响应信息,其中,所述业务接入层用于转发所述目标网络请求;在所述响应信息中携带目标标识的情况下,利用所述目标归属信息生成第二查询请求,其中,所述目标标识用于表示云网络控制系统中更新了所述目标归属信息对应的域名改写规则;发送所述第二查询请求至云网络控制系统,以使所述云网络控制系统下发所述目标归属信息对应第二域名改写规则,其中,所述第二域名改写规则为所述第一域名改写规则更新后的域名改写规则;接收所述第二域名改写规则,并利用所述第二域名改写规则重新生成所述原始域名对应的第二域名。
- 一种CDN网络请求的调度方法,其中,应用于CDN服务器,所述方法包括:接收来自于客户端的目标网络请求,其中,所述目标网络请求包括第一域名,所述第一域名包括:目标机房标识;基于预设回源地址与机房标识之间的对应关系,确定所述目标机房标识对应的目标回源地址;获取所述目标回源地址对应的接入路径以及目标机房;基于所述接入路径将所述目标网络请求转发至所述目标机房。
- 一种CDN网络请求的调度方法,其中,应用于云网络控制系统,所述方法包括:接收来自于客户端的第一查询请求,其中,所述第一查询请求包括所述客户端对应的目标归属信息;响应所述第一查询请求,从多个域名改写规则中获取所述目标归属信息对应的第一域名改写规则,其中,所述域名改写规则是基于预设归属信息与机房标识之间的第一映射关系、机房标识与域名之间的第二映射关系以及预设流量比例生成的;发送所述第一域名改写规则至所述客户端,以使所述客户端基于所述第一域名改写规则进行域名改写。
- 根据权利要求8所述的方法,还包括:获取作用于所述域名改写规则的更新信息,并基于所述更新信息对域名改写规则进行更新,得到更新后的域名改写规则;基于所述更新后的域名改写规则生成探针信息,并发送所述探针信息至业务接入层,以使所述业务接入层在接收到所述客户端发送的目标网络请求的情况下,基于所述探针信息确定所述客户端的目标归属信息对应的域名改写规则是否发生更新,并在发生更新的情况下,下发携带有目标标识的响应信息至所述客户端;接收来自于所述客户端发送的第二查询请求,其中,第二查询请求携带所述目标归属信息;利用所述目标归属信息从更新后的域名改写规则中获取所述目标归属信息对应的第二域名改写规则,并发送所述第二域名改写规则至所述客户端。
- 一种CDN网络请求的调度装置,包括:第一获取模块,被配置为获取客户端针对于目标服务生成的原始网络请求,其中,所述原始网络请求包括所述客户端对应的目标归属信息,以及被配置为访问所述目标服务的原始域名;第二获取模块,被配置为获取所述目标归属信息对应的第一域名改写规则,并利用所述第一域名改写规则对所述原始域名进行改写,得到第一域名,其中,所述第一域名包括目标CDN服务商标识以及目标机房标识;更新模块,被配置为利用所述第一域名对所述原始网络请求中的原始域名进行更新,得到目标网络请求;发送模块,被配置为发送所述目标网络请求至所述目标CDN服务商标识对应的目标CDN服务器,以使所述目标CDN服务器获取所述目标机房标识对应的目标调度路径,并按照所述目标调度路径将所述目标网络请求转发至目标机房。
- 一种CDN网络请求的调度装置,包括:接收模块,被配置为接收来自于客户端的目标网络请求,其中,所述目标网络请求包括第一域名,所述第一域名包括:目标机房标识;确定模块,被配置为基于预设回源地址与机房标识之间的对应关系,确定所述目标机房标识对应的目标回源地址;获取模块,被配置为获取所述目标回源地址对应的接入路径以及目标机房;转发模块,被配置为基于所述接入路径将所述目标网络请求转发至所述目标机房。
- 一种CDN网络请求的调度装置,包括:接收模块,被配置为接收来自于客户端的查询请求,其中,所述查询请求包括所述客户端对应的目标归属信息;响应模块,被配置为响应所述查询请求,从多个域名改写规则中获取所述目标归属信息对应的第一域名改写规则,其中,所述域名改写规则是基于预设归属信息与机房标识之间的第一映射关系、机房标识与域名之间的第二映射关系以及预设流量比例生成的;发送模块,被配置为发送所述第一域名改写规则至所述客户端,以使所述请求客户端基于所述第一域名改写规则进行域名改写。
- 一种存储介质,其中,所述存储介质包括存储的程序,其中,所述程序运行时执行上述权利要求1至9中任一项所述的方法步骤。
- 一种电子设备,其中,包括处理器、通信接口、存储器和通信总线, 其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;其中:存储器,被配置为存放计算机程序;处理器,被配置为通过运行存储器上所存放的程序来执行权利要求1至9中任一项所述的方法步骤。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310121205.4 | 2023-02-03 | ||
CN202310121205.4A CN116233127A (zh) | 2023-02-03 | 2023-02-03 | Cdn网络请求的调度方法,装置、电子设备及存储介质 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2024160193A1 true WO2024160193A1 (zh) | 2024-08-08 |
Family
ID=86586796
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2024/074643 WO2024160193A1 (zh) | 2023-02-03 | 2024-01-30 | Cdn网络请求的调度方法,装置、电子设备及存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN116233127A (zh) |
WO (1) | WO2024160193A1 (zh) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116233127A (zh) * | 2023-02-03 | 2023-06-06 | 北京有竹居网络技术有限公司 | Cdn网络请求的调度方法,装置、电子设备及存储介质 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160248722A1 (en) * | 2015-02-20 | 2016-08-25 | International Business Machines Corporation | Estimation of information diffusion route on computer mediated communication network |
CN111464592A (zh) * | 2020-03-09 | 2020-07-28 | 平安科技(深圳)有限公司 | 基于微服务的负载均衡方法、装置、设备及存储介质 |
CN112702425A (zh) * | 2020-12-22 | 2021-04-23 | 杭州易安联科技有限公司 | 基于域名泛解析的web应用访问代理方法、装置和系统 |
CN116132377A (zh) * | 2022-09-26 | 2023-05-16 | 北京有竹居网络技术有限公司 | 流量调度方法、装置、系统、终端设备及可读存储介质 |
CN116233127A (zh) * | 2023-02-03 | 2023-06-06 | 北京有竹居网络技术有限公司 | Cdn网络请求的调度方法,装置、电子设备及存储介质 |
-
2023
- 2023-02-03 CN CN202310121205.4A patent/CN116233127A/zh active Pending
-
2024
- 2024-01-30 WO PCT/CN2024/074643 patent/WO2024160193A1/zh unknown
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160248722A1 (en) * | 2015-02-20 | 2016-08-25 | International Business Machines Corporation | Estimation of information diffusion route on computer mediated communication network |
CN111464592A (zh) * | 2020-03-09 | 2020-07-28 | 平安科技(深圳)有限公司 | 基于微服务的负载均衡方法、装置、设备及存储介质 |
CN112702425A (zh) * | 2020-12-22 | 2021-04-23 | 杭州易安联科技有限公司 | 基于域名泛解析的web应用访问代理方法、装置和系统 |
CN116132377A (zh) * | 2022-09-26 | 2023-05-16 | 北京有竹居网络技术有限公司 | 流量调度方法、装置、系统、终端设备及可读存储介质 |
CN116233127A (zh) * | 2023-02-03 | 2023-06-06 | 北京有竹居网络技术有限公司 | Cdn网络请求的调度方法,装置、电子设备及存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN116233127A (zh) | 2023-06-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10374955B2 (en) | Managing network computing components utilizing request routing | |
CN110677405B (zh) | 一种数据处理方法、装置、电子设备及存储介质 | |
US20200220840A1 (en) | Method, server and system for resolving domain name | |
JP5893034B2 (ja) | ネットワーク環境における要求ルーティング | |
US9832141B1 (en) | Routing based request correlation | |
US20180205697A1 (en) | Managing content delivery network service providers by a content broker | |
US11956210B2 (en) | Method and apparatus for transmitting application programming interface API request | |
US10432581B2 (en) | Network identification as a service | |
US20100281146A1 (en) | Dynamic domain name service system and automatic registration method | |
CN109151009B (zh) | 一种基于mec的cdn节点分配方法和系统 | |
CN108259425A (zh) | 攻击请求的确定方法、装置及服务器 | |
WO2021007752A1 (zh) | 内容分发网络中的回源方法及相关装置 | |
JP2015525991A (ja) | パケット受信方法、ディープ・パケット・インスペクション装置及びシステム | |
WO2024160193A1 (zh) | Cdn网络请求的调度方法,装置、电子设备及存储介质 | |
WO2015039475A1 (zh) | 一种域名解析方法、服务器及系统 | |
CN111371914A (zh) | Ip库生成方法、域名解析方法、电子设备和可读存储介质 | |
US8326919B1 (en) | Network address translation auto-discovery in data storage networks | |
CN114221959A (zh) | 服务共享方法、装置和系统 | |
WO2024222010A1 (zh) | 地址请求报文代答方法、装置、电子设备及存储介质 | |
WO2021114874A1 (zh) | 一种数据处理方法及计算机可读存储介质 | |
CN106331205B (zh) | 域名资源记录缓存的集中管控方法、装置和相关设备 | |
CN111447297B (zh) | IPv4、IPv6的DNS统一接入的管理方法及系统 | |
CN114338809B (zh) | 访问控制方法、装置、电子设备和存储介质 | |
CN115442329A (zh) | 域名信息查询方法、系统、装置、设备及存储介质 | |
US9509693B2 (en) | Flexible and generalized authentication |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 24749672 Country of ref document: EP Kind code of ref document: A1 |