CDN-based traffic scheduling method, device, system, terminal device and readable storage medium

Through the CDN traffic scheduling method, the terminal device modifies the domain name in real time to include the computer room identification, solving the service reliability problem caused by domain name resolution delay in the existing technology and achieving instant traffic scheduling and high reliability.

CN116132377BActive Publication Date: 2025-09-23BEIJING YOUZHUJU NETWORK TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211174488.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-26
Publication Date
2025-09-23
Estimated Expiration
2042-09-26

AI Technical Summary

Technical Problem

The existing traffic scheduling method relies on changes in domain name resolution results, resulting in reduced business reliability in the event of a computer room failure and inability to achieve instant traffic guidance.

Method used

Through the CDN-based traffic scheduling method, the terminal device obtains the scheduling configuration information and modifies the target domain name to a standardized domain name according to the preset domain name naming method, including the target computer room identifier, to achieve real-time traffic scheduling.

Benefits of technology

It achieves real-time traffic scheduling in the event of a computer room failure, improves business reliability and flexibility, and avoids delays caused by changes in domain name resolution results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116132377B_ABST
    Figure CN116132377B_ABST
Patent Text Reader

Abstract

The present disclosure discloses a CDN-based traffic scheduling method, apparatus, system, terminal device, and readable storage medium. The method includes: obtaining scheduling configuration information, the scheduling configuration information being used to characterize the traffic scheduling policy of a target domain name; modifying the target domain name to a standardized domain name that matches the traffic scheduling policy based on a preset domain name naming method; the standardized domain name at least including a computer room identifier that characterizes the target computer room after traffic scheduling; and initiating an access request to the target computer room based on the standardized domain name. The technical solutions provided by one or more embodiments of the present disclosure can improve service reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of Internet technology, and in particular to a CDN-based traffic scheduling method, apparatus, system, terminal device, and readable storage medium. Background Art

[0002] Currently, to ensure data center stability, multiple computer rooms are typically deployed in different locations through redundant backup. This way, if one computer room experiences a failure, traffic from that room can be redirected to other rooms, ensuring that business is not interrupted for an extended period of time.

[0003] Currently, traffic routing between different computer rooms is typically achieved by adding the computer room's IP address to the domain name resolution results. For example, based on the domain name resolution results, traffic for a certain domain name is originally directed to computer room A. If computer room A experiences a failure, to redirect traffic from computer room A to computer room B, the IP address of computer room B can be added to the domain name resolution results. This way, traffic for the domain name can be directed to computer room B.

[0004] However, this existing approach requires modifying the domain name resolution results in the domain name resolution server, and the domain name resolution results are often not immediately effective. Therefore, it will take some time after the failure occurs for traffic to be directed to the normal data center, which will undoubtedly reduce business reliability. Summary of the Invention

[0005] In view of this, one or more embodiments of the present disclosure provide a CDN-based traffic scheduling method, apparatus, system, terminal device, and readable storage medium, which can improve service reliability.

[0006] On the one hand, the present disclosure provides a traffic scheduling method based on CDN, which includes: obtaining scheduling configuration information, where the scheduling configuration information is used to characterize the traffic scheduling strategy of a target domain name; modifying the target domain name into a standardized domain name that matches the traffic scheduling strategy according to a preset domain name naming method; the standardized domain name at least includes a computer room identifier for characterizing the target computer room after traffic scheduling; and initiating an access request to the target computer room based on the standardized domain name.

[0007] On the other hand, the present disclosure further provides a traffic scheduling device based on CDN, which includes: a configuration information acquisition unit, used to obtain scheduling configuration information, where the scheduling configuration information is used to characterize the traffic scheduling strategy of the target domain name; a domain name modification unit, used to modify the target domain name into a standardized domain name that matches the traffic scheduling strategy according to a preset domain name naming method; the standardized domain name at least includes a computer room identifier for characterizing the target computer room after traffic scheduling; and a request initiation unit, used to initiate an access request to the target computer room based on the standardized domain name.

[0008] On the other hand, the present disclosure also provides a traffic scheduling system based on CDN, which includes a terminal device, a configuration center and a scheduling center, wherein: the scheduling center is used to generate scheduling configuration information and send the scheduling configuration information to the configuration center; the configuration center is used to store the scheduling configuration information sent by the scheduling center; the terminal device is used to obtain the scheduling configuration information from the configuration center, and the scheduling configuration information is used to characterize the traffic scheduling strategy of the target domain name; according to a preset domain name naming method, the target domain name is modified to a standardized domain name that matches the traffic scheduling strategy; the standardized domain name at least includes a computer room identifier for characterizing the target computer room after traffic scheduling; and based on the standardized domain name, an access request is initiated to the target computer room.

[0009] On the other hand, the present disclosure further provides a terminal device, which includes a memory and a processor, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the above-mentioned traffic scheduling method is implemented.

[0010] On the other hand, the present disclosure further provides a computer-readable storage medium, which is used to store a computer program. When the computer program is executed by a processor, the above-mentioned traffic scheduling method is implemented.

[0011] The technical solution provided by one or more embodiments of the present disclosure can realize traffic scheduling by replacing the domain name. When the terminal device needs to initiate an access request, it can obtain the current scheduling configuration information, and the scheduling configuration information can represent the traffic scheduling policy of the target domain name. According to the traffic scheduling policy, the terminal device can modify the target domain name to a standardized domain name. The standardized domain name is obtained by rewriting the target domain name according to a preset domain name naming method. The standardized domain name can include a computer room identifier that represents the target computer room after traffic scheduling.

[0012] In this way, the terminal device can initiate an access request based on the modified standardized domain name. Since the access request carries the target computer room identifier, the access request will eventually be received by the target computer room, thus achieving the function of traffic guidance.

[0013] It can be seen that the technical solution provided by one or more embodiments of the present disclosure can modify the domain name in real time at the terminal device according to the scheduling configuration information. Since it does not involve changes to the domain name resolution results, it can realize traffic scheduling in real time, thereby improving the reliability of the service. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The features and advantages of the present disclosure will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the present disclosure in any way. In the accompanying drawings:

[0015] Figure 1 A schematic diagram showing the modification relationship between various domain names in one embodiment of the present disclosure is shown;

[0016] Figure 2 An interactive schematic diagram of a traffic scheduling system in one embodiment of the present disclosure is shown;

[0017] Figure 3 A schematic diagram showing the steps of a traffic scheduling method in one embodiment of the present disclosure is shown;

[0018] Figure 4 A schematic diagram showing a condition group in one embodiment of the present disclosure is shown;

[0019] Figure 5 A schematic diagram of the functional modules of a traffic scheduling device in one embodiment of the present disclosure is shown;

[0020] Figure 6 A schematic structural diagram of a terminal device in one embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0021] To make the purpose, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of the present disclosure.

[0022] The traffic scheduling method provided in one embodiment of the present disclosure can be applied to a terminal device. The terminal device can be an electronic device used by a user. For example, the terminal device can be a smartphone, tablet computer, personal computer, smart wearable device, etc. Furthermore, the traffic scheduling method can also be applied to applications running on the terminal device. When the application initiates an access request through the terminal device, the domain name can be replaced according to the traffic scheduling method provided in the present disclosure.

[0023] In actual applications, when replacing a domain name, in order to ensure that the replacement process and the replaced domain name have certain standardization, a domain name naming method can be pre-set. Through this pre-set domain name naming method, multiple domain names can be generated during the domain name replacement process.

[0024] Specifically, domain names can be categorized as original domain names, default domain names, routing domain names, and standardized domain names. An original domain name is an unmodified domain name, typically registered by the service provider itself. Default domain names, routing domain names, and standardized domain names can all be derived by modifying the original domain name according to a pre-defined domain name naming scheme.

[0025] Among them, the default domain name can be divided according to business logic, and is the domain name used within the application. Application developers usually use the default domain name directly during the development process. For example, within an application, the default domain names may include api.amemv.com and search.amemv.com. Among them, the second-level domain name amemv.com can be exclusive to the application, and the third-level domain name can distinguish different business logics (for example, api represents interface call business, search represents search business, etc.).

[0026] It should be noted that if a business has different seven-layer load balancing services, then the business usually needs to set a different default domain name so that the traffic of the business can be correctly resolved to different seven-layer load balancing services.

[0027] Compared to the default domain name, the routing domain name can have more fields added to it. These additional fields can indicate the path selection strategy of the routing domain name. The additional fields in the routing domain name can include the content delivery network (CDN) identifier, the load balancing service identifier, and optional feature identifiers.

[0028] The CDN identifier can indicate different network acceleration strategies. For example, a CDN identifier of the string "ABC" can indicate that the cluster named "ABC" is used for network acceleration. Another example is a CDN identifier of the number "100" that indicates retrieving resources from the origin server.

[0029] The load balancing service identifier can indicate different load balancing clusters. In actual applications, different load balancing services can correspond to different load balancing clusters. By adding the load balancing service identifier to the routing domain name, current traffic can be directed to the desired load balancing cluster. For example, the load balancing service identifier "normal" can indicate a normal load balancing cluster, while the load balancing service identifier "core" can indicate a core load balancing cluster.

[0030] The feature identifier is an optional field used to mark traffic. For example, the feature identifier "quic" indicates that the current access request is for network acceleration services, while the feature identifier "v6" indicates that the current access request is for IPv6 services. One or more feature identifiers can be added to a routing domain name, and different feature identifiers can be connected by a "-" character.

[0031] In this embodiment, the preset domain name naming method can specify the naming method of the routing domain name. For example, the general form of the routing domain name can be expressed as:

[0032] [Business ID] [CDN ID] - [Load Balancing Service ID] - [Optional: Feature ID]. [Second-level domain name]

[0033] In a practical application example, the default domain name can be api.amemv.com, and the routing domain name can be expressed as api100-normal-quic.amemv.com. Among them, api is the service identifier, 100 is the CDN identifier, normal is the load balancing service identifier, quic is the feature identifier, and amemv.com is the second-level domain name.

[0034] In this implementation, the routing domain name only determines the optimal or user-desired transmission path. In order to direct traffic to the computer room, the computer room identifier needs to be added to the routing domain name to form the final standardized domain name. Therefore, the general form of the standardized domain name can be expressed as:

[0035] [Business ID] [CDN ID] - [Load Balancing Service ID] - [Optional: Feature ID] [Data Center ID] - [Second-level Domain Name]

[0036] For example, in a specific application example, the standardized domain name generated based on the routing domain name may be: api100-normal-quic-xx.amemv.com, where xx may represent an equipment room identifier.

[0037] From the above description, it can be seen that the application can first establish a mapping relationship between the original domain name to be accessed and the default domain name, thereby converting the original domain name into the default domain name. Figure 1 In the example, the original domain name is webcast.snssdk.com, and the corresponding default domain name can be webcast.ttapi.com. Then, based on the actual traffic scheduling instructions, the default domain name can be modified to the routing domain name webcast100-wbnormal.ttapi.com, and finally the standardized domain name webcast100-wbnormal-xx.ttapi.com is obtained.

[0038] In this embodiment, the access request ultimately sent from the terminal device can be generated based on the standardized domain name.

[0039] It should be noted that each standardized domain name generated in the present disclosure can be pre-mapped to an address in a domain name resolution server. In this way, by changing the standardized domain name, the access request can be directed to the corresponding computer room through the normal domain name resolution process.

[0040] Based on the pre-set domain name naming method, the above-mentioned domain names can be applied to Figure 2 In the traffic scheduling system shown in Figure 2 The traffic scheduling system shown may include terminal devices, a configuration center, a scheduling center, and multiple computer rooms. The scheduling center may generate scheduling configuration information for traffic scheduling, which may be distributed to the configuration center. The configuration center may store the scheduling configuration information distributed by the scheduling center. The terminal device may obtain the latest scheduling configuration information from the configuration center, then modify the domain name according to the traffic scheduling policy defined by the scheduling configuration information, and initiate access requests based on the modified domain name, thereby directing the traffic of the access request to the corresponding computer room.

[0041] See also Figure 3 On the terminal device side, a traffic scheduling method provided by an embodiment of the present disclosure may include the following steps.

[0042] S1: Obtain scheduling configuration information, where the scheduling configuration information is used to represent a traffic scheduling strategy for a target domain name.

[0043] In this implementation, the terminal device can initially initiate an access request to the corresponding computer room directly based on the original domain name. If a computer room failure occurs, the network status fluctuates, or traffic scheduling is required, the latest scheduling configuration information can be obtained from the configuration center. Subsequently, the domain name can be modified according to the traffic scheduling policy in this scheduling configuration information.

[0044] Specifically, the scheduling configuration information can be used to represent the traffic scheduling policy for the target domain name. Of course, the scheduling configuration information can also include traffic scheduling policies for other domain names. This example uses the target domain name as an example to illustrate the technical solution of this embodiment, and does not imply that the scheduling configuration information only contains traffic scheduling policies for the target domain name. The target domain name can be a default domain name mapped from the original domain name. Within the terminal device, modifications can be made based on this default domain name to obtain the final standardized domain name.

[0045] In this embodiment, the traffic scheduling policy for a target domain name may include routing information and data center selection information for the target domain name. The routing information may include, for example, the aforementioned CDN identifier, load balancing service identifier, and feature identifier. The data center selection information may include a data center identifier. If multiple data center identifiers are present, the data center selection information may also include the traffic allocation ratio for each data center.

[0046] In one embodiment, the timing for a terminal device to obtain scheduling configuration information can also be divided into various situations. For example, the terminal device can actively monitor the abnormal response rate of initiated access requests. When the abnormal response rate is too high, it indicates a malfunction in the computer room or fluctuations in the network status of the current path. In this case, the terminal device can load the latest scheduling configuration information from the configuration center.

[0047] Specifically, for initiated access requests, the terminal device can count the proportion of access requests that respond abnormally, and obtain scheduling configuration information if the proportion is greater than or equal to a specified proportion threshold. The specified proportion threshold can be a threshold calculated based on historical data or a threshold flexibly selected based on the actual application scenario.

[0048] In addition, after the dispatch center generates new dispatch configuration information and sends it to the configuration center, it can inform the terminal device through probe information. In this way, when the terminal device receives the probe information representing the configuration version number, it can determine whether the configuration version number represented by the probe information is consistent with the locally stored configuration version number. If they are inconsistent, it indicates that new dispatch configuration information has been generated, and the terminal device can now obtain the dispatch configuration information from the configuration center.

[0049] In practical applications, probe information can be a set of time-related serial numbers, such as year, month, day, hour, minute, and second. Of course, to ensure the uniqueness of probe information, probe information can also include more granular information. After generating new scheduling configuration information, the time of generation can be used as probe information. In this way, probe information can represent the configuration version number of the scheduling configuration information.

[0050] After receiving the probe information sent by the dispatch center, the terminal device can determine whether the locally stored probe information lags behind the probe information sent by the dispatch center. If it lags behind, it indicates that the scheduling configuration information has been updated. At this time, the terminal device can pull the latest scheduling configuration information from the configuration center.

[0051] In one embodiment, since the number of terminal devices may be relatively large, if the scheduling configuration information is pulled from the configuration center at the same time, the load on the configuration center may be too high. In this case, when the terminal device determines that the configuration version number represented by the probe information is inconsistent with the locally stored configuration version number, a random duration can be generated. The random duration can be, for example, a random duration between 0 and 60 seconds. Then, after waiting for the random duration, the terminal device obtains the scheduling configuration information from the configuration center. In this way, numerous terminal devices can obtain scheduling configuration information from the configuration center at dispersed time points, thereby alleviating the load pressure on the configuration center.

[0052] S3: According to a preset domain name naming method, the target domain name is modified into a standardized domain name that matches the traffic scheduling strategy; the standardized domain name at least includes a computer room identifier for representing the target computer room after traffic scheduling.

[0053] In this embodiment, after obtaining the scheduling configuration information, the target domain name can be modified according to the routing information and computer room selection information in the traffic scheduling policy, thereby obtaining a standardized domain name that matches the traffic scheduling policy. For specific modification methods, refer to the above process of changing the default domain name to the routing domain name and then changing the routing domain name to the standardized domain name.

[0054] Taking the target domain name as an example, when the target domain name is modified to a standardized domain name that matches the traffic scheduling strategy, the computer room identifier of the target computer room after traffic scheduling can be identified from the traffic scheduling strategy, and the location where the computer room identifier is added to the target domain name can be determined from the preset domain name naming method. For example, the addition location can be after the feature identifier. If there is no feature identifier, the addition location is after the load balancing service identifier. The computer room identifier can be added at the addition location of the target domain name, thereby generating a standardized domain name that matches the traffic scheduling strategy.

[0055] The generated standardized domain name may include the computer room identifier of the target computer room, so that an access request initiated based on the standardized domain name will eventually be directed to the target computer room.

[0056] S5: Based on the standardized domain name, an access request is initiated to the target computer room.

[0057] In this embodiment, after obtaining the standardized domain name, the terminal device can initiate an access request based on the standardized domain name. By performing domain name resolution on the standardized domain name, the access request will eventually be received by the target computer room, thereby directing the traffic of the access request to the target computer room.

[0058] The technical solution provided by one or more embodiments of the present disclosure can realize traffic scheduling by replacing the domain name. When the terminal device needs to initiate an access request, it can obtain the current scheduling configuration information, and the scheduling configuration information can represent the traffic scheduling policy of the target domain name. According to the traffic scheduling policy, the terminal device can modify the target domain name to a standardized domain name. The standardized domain name is obtained by rewriting the target domain name according to a preset domain name naming method. The standardized domain name can include a computer room identifier that represents the target computer room after traffic scheduling.

[0059] In this way, the terminal device can initiate an access request based on the modified standardized domain name. Since the access request carries the target computer room identifier, the access request will eventually be received by the target computer room, thus achieving the function of traffic guidance.

[0060] It can be seen that the technical solution provided by one or more embodiments of the present disclosure can modify the domain name in real time at the terminal device according to the scheduling configuration information. Since it does not involve changes to the domain name resolution results, it can realize traffic scheduling in real time, thereby improving the reliability of the service.

[0061] The traffic scheduling methods implemented in the aforementioned embodiments enable different traffic scheduling strategies to be set for different domain names using scheduling configuration information. Domain names can then be modified and replaced to direct traffic from those domains to the corresponding computer rooms. However, in some practical applications, it may be necessary to perform traffic scheduling on domain names of certain business types simultaneously in batches. Furthermore, during traffic scheduling, it may be necessary to flexibly select different traffic scheduling strategies based on the region of the user initiating the access request.

[0062] In view of this, in one embodiment of the present disclosure, the concepts of domain name group and condition group can be set in the scheduling configuration information, so as to implement the traffic scheduling function more flexibly.

[0063] Suppose you need to schedule traffic for each domain name involved in an application. You can set up one or more domain name groups for this application. A domain name group can include one or more domain names belonging to the same service type. For example, if the domain names for the search service within the application are www.search.com and www.search_video.com, you can create a domain name group named search for this service, which can include these two domain names. Similarly, you can create domain name groups for other service types.

[0064] It's important to note that in some scenarios, a default domain name group can be created. This default domain name group can contain domain names without defined service types, or domain names with defined service types but no domain name group created for them. For example, within an application, you might create only two domain name groups: the search domain group and the video domain group. All other domain names can then be grouped together in the default domain name group. This ensures that each domain name will be included in a matching domain name group when performing domain name matching.

[0065] In this embodiment, a corresponding condition group can also be generated for a domain name group. The condition group can include one or more traffic scheduling policies associated with the domain names in the domain name group. In this way, all domain names in the domain name group can follow the traffic scheduling policies in the condition group, thereby achieving batch scheduling of domain names.

[0066] For example, for the video domain name group within the application, the traffic scheduling strategy in the corresponding condition group is that the traffic distribution ratio between computer room A and computer room B is 1:1. In this way, the traffic of each domain name in the video domain name group can eventually be distributed equally to computer room A and computer room B according to the traffic scheduling strategy in the condition group.

[0067] It can be seen that by setting domain name groups and associating corresponding condition groups with domain name groups, batch scheduling of domain names can be achieved, which improves the flexibility of traffic scheduling.

[0068] In this embodiment, taking the target domain name as an example, when determining the traffic scheduling strategy of the target domain name, the target domain name group to which the target domain name belongs can be determined according to the business type of the target domain name, and the traffic scheduling strategy in the condition group corresponding to the target domain name group can be used as the traffic scheduling strategy of the target domain name.

[0069] In a specific application example, traffic scheduling for domain names within a domain name group may also require consideration of the region of the user initiating the access request. Users in different regions may be directed to different data centers for access to the same domain name. For example, for the domain www.search.com, to improve access efficiency, traffic from users in Region A and Region B may need to be directed to different data centers. In this case, the traffic scheduling policy within the conditional group requires additional qualification information.

[0070] In one embodiment, each traffic scheduling policy in the condition group may further include priority information and region matching information, wherein the priority information may represent the priority of the traffic scheduling policy, and the region matching information may represent the region information to which the traffic scheduling policy is adapted.

[0071] See also Figure 4 The two traffic scheduling policies in the conditional group each contain priority information, registration area matching information, and location matching information. For the traffic scheduling policy with priority information set to 1, the registration area matching information is "in area A or area B," and the location matching information is empty (none), indicating that this traffic scheduling policy applies to users whose registration area is in area A or area B. For the traffic scheduling policy with priority information set to 2, the registration area matching information is empty, and the location matching information is "not in area D," indicating that this traffic scheduling policy applies to users whose location is not area D.

[0072] It can be seen that the registration area and / or location area of ​​the user who initiates the access request can be limited through the area matching information.

[0073] If a user can match multiple traffic scheduling policies, the traffic scheduling of the access request can be performed according to the traffic scheduling policy with the highest priority information.

[0074] Specifically, also taking the target domain name as an example, when determining the traffic scheduling strategy of the target domain name, the target domain name group in which the target domain name is located can be determined, and the target condition group corresponding to the target domain name group can be obtained. Then, the current area information of the initiator of the target domain name can be identified, and the current area information includes the registration area information and the area information of the initiator. After identifying the current area information of the initiator, the candidate traffic scheduling strategy whose area matching information matches the current area information can be screened out from the various traffic scheduling strategies contained in the target condition group. Finally, the traffic scheduling strategy of the target domain name can be determined from the candidate traffic scheduling strategies based on the priority information.

[0075] It should be noted that a default traffic scheduling policy is usually included in the condition group. The priority information of this default traffic scheduling policy can represent the lowest priority, and the region information is usually not restricted in this default traffic scheduling policy (that is, the region matching information is empty). The purpose of this setting is to ensure that all users who initiate access requests can be subject to the default traffic scheduling policy. When there is no traffic scheduling policy with higher priority information, the user's access request can be scheduled according to the default traffic scheduling policy, ensuring the feasibility of traffic scheduling.

[0076] In one embodiment, the traffic scheduling strategy may include a computer room identifier in addition to the priority information and area matching information mentioned above. When there is only one computer room identifier, it indicates that all traffic will be scheduled to the computer room represented by the computer room identifier. If there are multiple computer room identifiers included in the traffic scheduling strategy, the traffic distribution ratios of these multiple computer room identifiers are usually marked together. For example, a traffic scheduling strategy includes two computer room identifiers: computer room A and computer room B, and the traffic distribution ratio of these two computer rooms is 3:7. Then when scheduling an access request initiated by a user, it is necessary to determine which computer room the access request should be scheduled to, so that the computer room identifier of the corresponding computer room can be added to the domain name.

[0077] In this embodiment, taking the target domain name as an example, if there are multiple computer rooms to be scheduled as defined by the traffic scheduling policy corresponding to the target domain name, the user ID of the initiator of the target domain name can be obtained. Generally speaking, the user ID can be a unique number. By performing a modulo operation on the user ID, a corresponding modulo value can be generated. For example, if the user ID is 11, the user ID can be modulo 10 to obtain a modulo value of 1. Then, the traffic distribution ratios of the multiple computer rooms to be scheduled can be identified from the traffic scheduling policy, and based on the modulo value and the traffic distribution ratio, the target computer room after traffic scheduling can be determined from the multiple computer rooms to be scheduled.

[0078] Specifically, when the traffic distribution ratio is 3:7, access requests initiated by users with a modulus value between 0 and 2 can be dispatched to computer room A, while access requests initiated by users with a modulus value between 3 and 9 can be dispatched to computer room B. In this way, by calculating the modulus value, traffic can be dispatched between multiple computer rooms according to the traffic distribution ratio defined by the traffic scheduling policy.

[0079] After the target computer room after traffic scheduling is determined from the plurality of computer rooms to be scheduled, the computer room identifier of the target computer room can be added to the target domain name, thereby forming a standardized domain name.

[0080] In some specific application scenarios, considering that the terminal device initiates an access request in the form of a long connection, even if the terminal device obtains the scheduling configuration information from the configuration center, the terminal device still cannot implement the scheduling configuration information because it maintains a long connection with the original computer room.

[0081] In view of this, in one embodiment, when the configuration center provides the terminal device with scheduling configuration information, it can also send persistent connection disconnection configuration information to the terminal device. In this way, before obtaining the scheduling configuration information, if the terminal device has an access request initiated via a persistent connection, then when obtaining the scheduling configuration information, it can receive the persistent connection disconnection configuration information sent by the configuration center. If the access request initiated via the persistent connection matches the persistent connection disconnection configuration information, the terminal device can actively disconnect the persistent connection. After the persistent connection is disconnected, the terminal device can modify the domain name according to the traffic scheduling policy in the scheduling configuration information.

[0082] In this embodiment, the access request initiated by a persistent connection usually includes a persistent connection domain name and a request path. For example, the URL (Uniform Resource Locator) of an access request is www.search.com / v1 / search, where www.search.com can be the persistent connection domain name and v1 / search can be the request path. Then the persistent connection disconnection configuration information issued by the configuration center needs to include domain name matching information and path matching information. Only when the persistent connection domain name matches the domain name matching information and the request path matches the path matching information, does it indicate that the access request initiated by the persistent connection matches the persistent connection disconnection configuration information.

[0083] In an actual application, part of the long connection disconnection configuration information may be as follows:

[0084]

[0085] Among them, host_blacklist can represent domain name matching information, and frontier.snssdk.com is the long connection domain name to be matched; path_blacklist can represent path matching information, and / ws / v2 is the request path to be matched.

[0086] In actual applications, the matching process of the long link domain name and the request path can follow the conventional character matching technology and support the matching of wildcards (such as the symbol * and the symbol ?), which will not be repeated here.

[0087] It can be seen from the technical solutions of one or more embodiments of the present disclosure that characteristic identification can be used to identify traffic, and subsequently, characteristic identification can be used to monitor traffic with certain characteristics, thereby realizing the functions of traffic positioning and traffic statistics.

[0088] Furthermore, the above solution of setting up one or more domain name groups for an application can also be extended to scenarios where multiple applications are involved. For example, multiple applications can be grouped together, and then one or more domain name groups can be created for each application group, enabling batch scheduling of multiple domain names across multiple applications.

[0089] The technical solution provided by the present disclosure, by standardizing the naming methods of standardized domain names and other intermediate domain names (such as routing domain names and default domain names), can flexibly generate corresponding standardized domain names when implementing traffic scheduling. It can schedule traffic in real time without modifying the content in the domain name resolution server, greatly improving the reliability of the traffic scheduling service.

[0090] See also Figure 5 The present disclosure further provides a flow scheduling device, the device comprising:

[0091] The configuration information acquisition unit 100 is used to acquire scheduling configuration information, where the scheduling configuration information is used to represent the traffic scheduling policy of the target domain name;

[0092] A domain name modification unit 200 is configured to modify the target domain name into a standardized domain name that matches the traffic scheduling policy according to a preset domain name naming method; the standardized domain name includes at least a computer room identifier for representing the target computer room after traffic scheduling;

[0093] The request initiating unit 300 is configured to initiate an access request to the target computer room based on the standardized domain name.

[0094] In one embodiment, the configuration information acquisition unit 100 is also used to count the proportion of access requests with abnormal responses for the access requests that have been initiated, and obtain scheduling configuration information when the proportion is greater than or equal to a specified proportion threshold; or when probe information representing a configuration version number is received, determine whether the configuration version number represented by the probe information is consistent with the locally stored configuration version number, and if not, obtain scheduling configuration information.

[0095] In one embodiment, the configuration information acquiring unit 100 is further configured to generate a random duration when the configuration version number represented by the probe information is inconsistent with the locally stored configuration version number, and acquire scheduling configuration information after waiting for the random duration.

[0096] In one embodiment, the scheduling configuration information includes a domain name group and a condition group corresponding to the domain name group, wherein the domain name group includes at least one domain name belonging to the same business type, and the condition group includes at least one traffic scheduling strategy associated with the domain name in the domain name group.

[0097] In one embodiment, the device also includes a policy determination unit, which is used to determine the target domain name group to which the target domain name belongs based on the business type of the target domain name, and use the traffic scheduling policy in the condition group corresponding to the target domain name group as the traffic scheduling policy of the target domain name.

[0098] In one embodiment, each of the traffic scheduling strategies in the condition group includes priority information and area matching information; the strategy determination unit is further used to determine the target domain name group in which the target domain name is located, and obtain the target condition group corresponding to the target domain name group; identify the current area information of the initiator of the target domain name, and filter out the candidate traffic scheduling strategies whose area matching information matches the current area information from the various traffic scheduling strategies included in the target condition group; determine the traffic scheduling strategy of the target domain name from the candidate traffic scheduling strategies based on the priority information.

[0099] In one embodiment, the domain name modification unit 200 is also used to identify the computer room identifier of the target computer room after traffic scheduling from the traffic scheduling strategy, and determine the adding position of the computer room identifier in the target domain name from the preset domain name naming method; at the adding position of the target domain name, the computer room identifier is added to generate a standardized domain name that matches the traffic scheduling strategy.

[0100] In one embodiment, the domain name modification unit 200 is also used to obtain the user ID of the initiator of the target domain name if there are multiple computer rooms to be scheduled as specified by the traffic scheduling policy, and perform a modulo operation on the user ID to generate a corresponding modulo value; identify the traffic distribution ratios of the multiple computer rooms to be scheduled from the traffic scheduling policy, and determine the target computer room after traffic scheduling from the multiple computer rooms to be scheduled based on the modulo value and the traffic distribution ratio.

[0101] In one embodiment, before obtaining the scheduling configuration information, if there is an access request initiated via a long connection, the configuration information acquisition unit 100 is also used to receive long connection disconnection configuration information, and disconnect the long connection if the access request initiated via the long connection matches the long connection disconnection configuration information.

[0102] In one embodiment, the persistent connection disconnection configuration information includes domain name matching information and path matching information, and the access request initiated through the persistent connection includes a persistent connection domain name and a request path; the access request initiated through the persistent connection matches the persistent connection disconnection configuration information, including: the persistent connection domain name matches the domain name matching information, and the request path matches the path matching information.

[0103] The various units described in the above embodiments can be implemented by computer chips or products with certain functions. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0104] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing this application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0105] See also Figure 2 The present disclosure further provides a traffic scheduling system, which includes a terminal device, a configuration center, and a scheduling center, wherein:

[0106] The scheduling center is used to generate scheduling configuration information and send the scheduling configuration information to the configuration center;

[0107] The configuration center is used to store the scheduling configuration information issued by the scheduling center;

[0108] The terminal device is used to obtain scheduling configuration information from the configuration center, where the scheduling configuration information is used to characterize the traffic scheduling strategy of the target domain name; according to a preset domain name naming method, the target domain name is modified to a standardized domain name that matches the traffic scheduling strategy; the standardized domain name at least includes a computer room identifier for characterizing the target computer room after traffic scheduling; and based on the standardized domain name, an access request is initiated to the target computer room.

[0109] See also Figure 6 The present disclosure also provides a terminal device, which includes a memory and a processor, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the above-mentioned traffic scheduling method is implemented.

[0110] The present disclosure also provides a computer-readable storage medium, which is used to store a computer program. When the computer program is executed by a processor, the above-mentioned traffic scheduling method is implemented.

[0111] The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.

[0112] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as the program instructions / modules corresponding to the methods in the embodiments of the present disclosure. The processor executes the non-transitory software programs, instructions, and modules stored in the memory to perform various processor functions and data processing, thereby implementing the methods in the aforementioned method embodiments.

[0113] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include a memory remotely located relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0114] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD). The storage medium can also include a combination of the above-mentioned types of memory.

[0115] The various embodiments in this specification are described in a progressive manner. Similar portions between the various embodiments can be referenced to each other, and each embodiment focuses on the differences between the other embodiments. In particular, the embodiments of the apparatus, system, device, and storage medium are generally similar to the method embodiments, so their descriptions are relatively simplified. For relevant portions, refer to the descriptions of the method embodiments.

[0116] The foregoing is merely an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.

[0117] Although the embodiments of the present disclosure have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A traffic scheduling method based on CDN, characterized in that: The method comprises: Obtaining scheduling configuration information, the scheduling configuration information being used to characterize a traffic scheduling policy for a target domain name; the scheduling configuration information including a domain name group and a condition group corresponding to the domain name group, wherein the domain name group includes at least one domain name belonging to the same service type, the condition group includes at least one traffic scheduling policy associated with the domain names in the domain name group, and each traffic scheduling policy in the condition group includes priority information and region matching information; According to a preset domain name naming method, the target domain name is modified into a standardized domain name that matches the traffic scheduling policy; the standardized domain name at least includes a computer room identifier for representing the target computer room after traffic scheduling; Initiating an access request to the target computer room based on the standardized domain name; The traffic scheduling strategy for the target domain name is determined in the following manner: Determine the target domain name group in which the target domain name is located, and obtain a target condition group corresponding to the target domain name group; Identifying the current region information of the initiator of the target domain name, and screening out, from the various traffic scheduling strategies included in the target condition group, candidate traffic scheduling strategies whose region matching information matches the current region information; Determine the traffic scheduling policy for the target domain name from the candidate traffic scheduling policies according to the priority information.

2. The method according to claim 1, characterized in that Obtaining scheduling configuration information includes: For the initiated access requests, counting the proportion of access requests with abnormal responses, and obtaining scheduling configuration information when the proportion is greater than or equal to a specified proportion threshold; or When the probe information representing the configuration version number is received, it is determined whether the configuration version number represented by the probe information is consistent with the locally stored configuration version number. If they are inconsistent, the scheduling configuration information is obtained.

3. The method according to claim 2, characterized in that When the configuration version number represented by the probe information is inconsistent with the locally stored configuration version number, a random duration is generated, and after waiting for the random duration, the scheduling configuration information is obtained.

4. The method according to claim 1, wherein The traffic scheduling strategy of the target domain name is determined in the following manner: According to the service type of the target domain name, the target domain name group to which the target domain name belongs is determined, and the traffic scheduling policy in the condition group corresponding to the target domain name group is used as the traffic scheduling policy of the target domain name.

5. The method according to claim 1, wherein Modifying the target domain name to a standardized domain name that matches the traffic scheduling policy includes: Identifying the target computer room identifier after traffic scheduling from the traffic scheduling strategy, and determining the location to add the computer room identifier in the target domain name from the preset domain name naming method; The computer room identifier is added at the adding position of the target domain name to generate a standardized domain name that matches the traffic scheduling policy.

6. The method according to claim 1 or 5, characterized in that The target computer room after traffic scheduling is identified in the following manner: If there are multiple computer rooms to be scheduled as defined by the traffic scheduling policy, obtain the user ID of the initiator of the target domain name, and perform a modulo operation on the user ID to generate a corresponding modulo value; The traffic distribution ratios of the plurality of computer rooms to be scheduled are identified from the traffic scheduling strategy, and the target computer room after traffic scheduling is determined from the plurality of computer rooms to be scheduled according to the modulo value and the traffic distribution ratio.

7. The method according to claim 1, characterized in that Before obtaining the scheduling configuration information, if there is an access request initiated by a persistent connection, when obtaining the scheduling configuration information, the method further includes: The persistent connection disconnection configuration information is received, and when the access request initiated through the persistent connection matches the persistent connection disconnection configuration information, the persistent connection is disconnected.

8. The method according to claim 7, characterized in that The persistent connection disconnection configuration information includes domain name matching information and path matching information, and the access request initiated through the persistent connection includes the persistent connection domain name and request path; The access request initiated by the persistent connection matches the persistent connection disconnection configuration information, including: The long connection domain name matches the domain name matching information, and the request path matches the path matching information.

9. A traffic scheduling device based on CDN, characterized in that: The device comprises: a configuration information acquisition unit, configured to acquire scheduling configuration information, the scheduling configuration information being used to characterize a traffic scheduling policy for a target domain name; the scheduling configuration information comprising a domain name group and a condition group corresponding to the domain name group, wherein the domain name group comprises at least one domain name belonging to the same service type, the condition group comprises at least one traffic scheduling policy associated with the domain names in the domain name group, and each traffic scheduling policy in the condition group comprises priority information and region matching information; A domain name modification unit, configured to modify the target domain name into a standardized domain name that matches the traffic scheduling policy according to a preset domain name naming method; the standardized domain name at least includes a computer room identifier for representing the target computer room after traffic scheduling; A request initiating unit, configured to initiate an access request to the target computer room based on the standardized domain name; The traffic scheduling strategy for the target domain name is determined in the following manner: Determine the target domain name group in which the target domain name is located, and obtain a target condition group corresponding to the target domain name group; Identifying the current region information of the initiator of the target domain name, and screening out, from the various traffic scheduling strategies included in the target condition group, candidate traffic scheduling strategies whose region matching information matches the current region information; Determine the traffic scheduling policy for the target domain name from the candidate traffic scheduling policies according to the priority information.

10. A traffic scheduling system based on CDN, characterized in that: The traffic scheduling system includes terminal equipment, a configuration center and a scheduling center, wherein: The scheduling center is used to generate scheduling configuration information and send the scheduling configuration information to the configuration center; The configuration center is used to store the scheduling configuration information issued by the scheduling center; The terminal device is used to obtain scheduling configuration information from the configuration center, and the scheduling configuration information is used to characterize the traffic scheduling strategy of the target domain name; according to a preset domain name naming method, the target domain name is modified to a standardized domain name that matches the traffic scheduling strategy; the standardized domain name at least includes a computer room identifier for characterizing the target computer room after traffic scheduling; based on the standardized domain name, an access request is initiated to the target computer room; the scheduling configuration information includes a domain name group and a condition group corresponding to the domain name group, wherein the domain name group includes at least one domain name belonging to the same business type, the condition group includes at least one traffic scheduling strategy associated with the domain name in the domain name group, and each of the traffic scheduling strategies in the condition group includes priority information and area matching information; The traffic scheduling strategy for the target domain name is determined in the following manner: Determine the target domain name group in which the target domain name is located, and obtain a target condition group corresponding to the target domain name group; Identifying the current region information of the initiator of the target domain name, and screening out, from the various traffic scheduling strategies included in the target condition group, candidate traffic scheduling strategies whose region matching information matches the current region information; Determine the traffic scheduling policy for the target domain name from the candidate traffic scheduling policies according to the priority information.

11. A terminal device, characterized in that: The terminal device includes a memory and a processor, the memory is used to store a computer program, and when the computer program is executed by the processor, the method according to any one of claims 1 to 8 is implemented.

12. A computer-readable storage medium, characterized in that The computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Load balancing method and device, storage medium and terminal equipment

    CN108769271A

  • API calling automatic switching method and system based on multiple domain names

    CN114465983A

  • Content distribution network dynamic scheduling method, system and device and storage medium

    CN115002117A