Domain name system load balancing scheduling method, device, equipment, medium and program product

By dynamically calculating the status scores of Internet Protocol devices in the domain name system, the problem of unbalanced traffic scheduling in DNS load balancing scheduling is solved, more balanced load scheduling is achieved, delays and failure rates are reduced, and user experience is improved.

CN120785891APending Publication Date: 2025-10-14CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511094313.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-05
Publication Date
2025-10-14

AI Technical Summary

Technical Problem

In the existing DNS load balancing scheduling method, the polling algorithm cannot distribute requests according to the actual load of the server, resulting in unbalanced traffic scheduling and affecting user experience.

Method used

By obtaining the status monitoring data of Internet Protocol devices under the same site of the domain name system, dynamically calculating the status score of each device, and screening out the Internet Protocol devices with the best performance, a more balanced load scheduling of servers and SLB devices can be achieved.

Benefits of technology

Reduce service delays and failure rates, improve user experience, optimize resource utilization, and ensure high-quality services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120785891A_ABST
    Figure CN120785891A_ABST
Patent Text Reader

Abstract

The invention discloses a domain name system load balancing scheduling method, device and equipment, a medium and a program product, and belongs to the technical field of electronic information.The method comprises the steps that in response to an analysis request, state monitoring data of internet protocol equipment under the same site of a domain name system is obtained; wherein the internet protocol equipment comprises server equipment and service load balancing equipment; according to the state monitoring data of the Internet protocol devices, calculating a state score of each Internet protocol device; and sorting and screening the state scores, and taking the internet address of the internet protocol equipment with the highest state score as an analysis result and returning the analysis result. According to the method and the device, the state monitoring data of the internet protocol devices under the same site of the domain name system is acquired, and the state score of each device is dynamically calculated, so that the internet protocol device with the optimal performance is screened out, more balanced load scheduling of the server and the SLB device is realized, the service delay and the failure rate are reduced, and the use experience of a user is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic information technology, and in particular to a domain name system load balancing scheduling method, device, equipment, medium and program product. Background Art

[0002] Currently, when a DNS (Domain Name System) server receives a query request from a client, it selects the IP address corresponding to the domain name based on a pre-configured IP (Internet Protocol) address sequence or a set algorithm. Since each query can be assigned a different IP address, the client's access traffic is distributed to different servers, achieving DNS load balancing.

[0003] In related technologies, static algorithms (such as round-robin) are often used to achieve DNS load balancing. However, in actual applications, it has been found that round-robin algorithms are often unable to distribute requests based on the actual load of the server, which may lead to uneven traffic scheduling.

[0004] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the Invention

[0005] The embodiments of the present application provide a domain name system load balancing scheduling method, apparatus, equipment, medium and program product, which can achieve more balanced load scheduling of servers and SLB devices, reduce service delays and failure rates, and effectively improve the user experience.

[0006] In one aspect, an embodiment of the present application provides a method for load balancing scheduling of a domain name system, the method comprising the following steps: In response to the resolution request, obtaining status monitoring data of Internet Protocol devices under the same site of the domain name system; wherein the Internet Protocol devices include server devices and service load balancing devices; Calculating a status score of each of the Internet Protocol devices based on the status monitoring data of the Internet Protocol devices; The status scores of each of the Internet Protocol devices are sorted and screened, and the Internet address of the Internet Protocol device with the highest status score is used as the parsing result and returned.

[0007] Optionally, obtaining status monitoring data of Internet Protocol devices under the same site of the domain name system includes: In the case where the Internet Protocol device is the server device, using the Simple Network Management Protocol to obtain the central processing unit (CPU) occupancy rate and the memory usage rate of each server device within a preset time period, and configuring a static weight of the CPU occupancy rate, a static weight of the memory usage rate, an upper limit value of the CPU occupancy rate, and an upper limit value of the memory usage rate for each server device; In the case where the Internet Protocol device is the service load balancing device, representational state transfer is used to obtain the number of new connections and the number of concurrent connections of each service load balancing device within the preset time period, and a static weight for the number of new connections, a static weight for the number of concurrent connections, an upper limit for the number of new connections, and an upper limit for the number of concurrent connections are configured for each service load balancing device.

[0008] Optionally, configuring a static weight of a central processing unit occupancy rate and a static weight of a memory usage rate for each server device includes: The computing power of each CPU is calculated based on the number of cores, clock frequency, and floating-point operations per clock cycle of each CPU of each server device, and the computing power of all CPUs is accumulated to obtain the computing power of each server device; Based on the greatest common factor of the computing power of all server devices, the computing power of each server device is ratioed and normalized to obtain and configure the static weight of the CPU occupancy rate of each server device; Calculate the memory performance of each server device based on the memory frequency, number of channels, bit width, and timing of each server device; Based on the greatest common divisor of the memory performance of all server devices, a ratio operation is performed on the memory performance of each server device, and then normalized to obtain and configure the static weight of the memory usage of each server device.

[0009] Optionally, calculating the status score of each Internet Protocol device according to the status monitoring data of the Internet Protocol device includes: When the Internet Protocol device is the server device, calculating an average of the central processing unit (CPU) occupancy rate of each server device within a preset time period, and performing a normalized residual performance calculation based on the configured upper limit of the CPU occupancy rate to obtain a CPU occupancy standard score; Calculating the average memory usage of each server device within a preset time period, and performing a normalized calculation of the remaining performance based on the configured upper limit of the memory usage to obtain a standard score for the memory usage; Calculating a weighted average based on the CPU occupancy standard score, the CPU occupancy static weight, the CPU occupancy dynamic weight, the memory usage standard score, the memory usage static weight, and the memory usage dynamic weight to obtain a status score for each server device; In a case where the Internet Protocol device is the service load balancing device, calculating an average number of new connections for each service load balancing device within a preset time period, and performing a normalized residual performance calculation based on a configured upper limit of the number of new connections to obtain a standard score for the number of new connections; Calculate the average number of concurrent connections for each service load balancing device within a preset time period, and perform a normalized calculation of the remaining performance based on the configured upper limit of the number of concurrent connections to obtain a standard score for the number of concurrent connections; Based on the standard score of the number of new connections, the static weight of the number of new connections, the dynamic weight of the number of new connections, the standard score of the number of concurrent connections, the static weight of the number of concurrent connections and the dynamic weight of the number of concurrent connections, a weighted average is calculated to obtain the status score of each service load balancing device.

[0010] Optionally, the dynamic weight of the status monitoring data is calculated by the following steps: Acquire the status monitoring data within the preset time period and perform normalization calculation; For the normalized state monitoring data, a univariate linear regression model is constructed; The least squares method is used to perform linear fitting and calculate the slope of the univariate linear regression model; The absolute value of the slope is taken as the dynamic weight of the state monitoring data.

[0011] Optionally, before calculating the status score of each Internet Protocol device based on the status monitoring data of the Internet Protocol device, the method further includes: The absolute median difference algorithm is used to screen and eliminate abnormal data from the status monitoring data of the Internet Protocol device.

[0012] On the other hand, an embodiment of the present application provides a domain name system load balancing scheduling device, the device comprising: A data acquisition module, configured to obtain, in response to a resolution request, status monitoring data of Internet Protocol devices under the same site of a domain name system; wherein the Internet Protocol devices include server devices and service load balancing devices; a score calculation module, configured to calculate a status score of each of the Internet Protocol devices based on the status monitoring data of the Internet Protocol devices; The sorting and analyzing module is configured to sort and screen the state scores of each of the Internet protocol devices, and return the Internet address of the Internet protocol device with the highest state score as the resolving result.

[0013] In another aspect, an electronic device is provided. The electronic device includes a memory and a processor. The memory stores a computer program. The processor implements the above method when executing the computer program.

[0014] In another aspect, a computer readable storage medium is provided. The computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the above method.

[0015] In another aspect, a computer program product is provided. The computer program product includes a computer program. The computer program is executed by a processor to implement the above method.

[0016] The embodiments of the present application obtain the state monitoring data of the Internet protocol devices under the same site of the domain name system, dynamically calculate the state scores of each device, and thus filter out the Internet protocol devices with the best performance, so as to realize more balanced load scheduling of the servers and the SLB devices, reduce service delay and failure rate, and effectively improve the user experience. BRIEF DESCRIPTION OF DRAWINGS

[0017] Figure 1 is a schematic diagram of an implementation environment of a domain name system load balancing scheduling method provided by the embodiments of the present application; Figure 2 is a flowchart of a domain name system load balancing scheduling method provided by the embodiments of the present application; Figure 3 is a flowchart of a dynamic load balancing scheduling method provided by the embodiments of the present application; Figure 4 is a flowchart of a state score calculation method provided by the embodiments of the present application; Figure 5 is a structural diagram of a domain name system load balancing scheduling device provided by the embodiments of the present application; Figure 6 is a hardware structure diagram of an electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are merely examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the appended claims.

[0019] It will be understood that the terms "first", "second", etc. used in this application may be used herein to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0020] The terms "at least one", "plurality", "each", "any", etc. used in this application include "at least one", "two" or more, "plurality" or "each", "any" or "any one", "each" or "any one" as used herein.

[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.

[0022] Currently, when a DNS server receives a query request from a client, it selects the IP address corresponding to the domain name based on a pre-configured IP address sequence or a set algorithm. Since each query can be assigned a different IP address, the client's access traffic is distributed to different servers, achieving DNS load balancing.

[0023] In related technologies, static algorithms (such as round-robin) are often used to achieve DNS load balancing. However, in actual applications, it has been found that round-robin algorithms are often unable to distribute requests based on the actual load of the server, which may lead to uneven traffic scheduling.

[0024] In view of this, the embodiments of the present application provide a domain name system load balancing scheduling method, apparatus, equipment, medium and program product. By obtaining the status monitoring data of Internet Protocol devices under the same site of the domain name system, the status score of each device is dynamically calculated, thereby screening out the Internet Protocol device with the best performance, achieving more balanced load scheduling of servers and SLB devices, reducing service delays and failure rates, and effectively improving the user experience.

[0025] It should be noted that in each specific embodiment of the present application, when it comes to the need to perform relevant processing based on data related to the user's identity or characteristics, such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of such data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.

[0026] The following describes the specific implementation of the embodiment of the present application in detail with reference to the accompanying drawings. First, a domain name system load balancing scheduling method provided in the embodiment of the present application is described with reference to the accompanying drawings.

[0027] Please refer to Figure 1 , Figure 1 1 is a schematic diagram of an implementation environment of a domain name system load balancing scheduling method provided by an embodiment of the present application. In this implementation environment, the main hardware and software entities involved include a terminal processor 110 and a server 120.

[0028] Specifically, the terminal processor 110 may be installed with a control program for a DNS load balancing scheduling method, and the server 120 is the backend server for the control program. The terminal processor 110 and the backend server 120 are in communication with each other. The DNS load balancing scheduling method provided in the embodiments of the present application may be executed on the terminal processor 110.

[0029] Server 120 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0030] In addition, the server 120 may also be a node server in the blockchain network.

[0031] A communication connection can be established between the terminal processor 110 and the server 120 via a wireless network. This wireless network utilizes standard communication technologies and / or protocols. The network can be the Internet or any other network, including, but not limited to, a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile network, or any combination of wireless networks, private networks, or virtual private networks. Furthermore, the aforementioned software and hardware entities can utilize the same or different communication connection methods, and this application does not impose any specific limitations on this.

[0032] Of course, it is understandable that Figure 1 The implementation environment is only some optional application scenarios of the domain name system load balancing scheduling method provided in the embodiment of this application. The actual application is not fixed. Figure 1 The software and hardware environment shown is not specifically limited in this application.

[0033] like Figure 2 As shown, Figure 2 This is a flow chart of a domain name system load balancing scheduling method provided in an embodiment of the present application, specifically including but not limited to steps 100 to 300.

[0034] Step 100: In response to the resolution request, obtain status monitoring data of Internet Protocol devices under the same site of the domain name system; wherein the Internet Protocol devices include server devices and service load balancing devices.

[0035] In an embodiment of the present application, the IP addresses recorded in the Domain Name System (DNS) and located at the same site as the DNS server can be monitored, aiming to obtain real-time operating data of the servers and service load balancing (SLB) devices corresponding to these IP addresses. When the DNS server receives a domain name resolution request from the client, it can directly obtain the status monitoring data of the Internet Protocol devices under the same site of the domain name system.

[0036] IP devices primarily include servers and service load balancing devices. Servers handle business logic, and DNS directs client domain name resolution requests to the server's IP address for direct access to business services. Server Load Balancers (SLBs) are located at the traffic distribution layer between clients and backend servers, responsible for fine-grained traffic scheduling across multiple backend servers. DNS directs domain name resolution to the virtual IP addresses of these SLB devices. All client requests first reach the SLB, which then distributes them to the backend server pool based on policy.

[0037] For example, please refer to Figure 3 , Figure 3 This is a flow chart of dynamic scheduling load balancing provided in an embodiment of the present application. When starting the domain name system load balancing scheduling, the IP device at the same site as the DNS server is first confirmed, and its device status is monitored, so as to obtain the status monitoring data of the IP device and store it for subsequent calculation of the status score.

[0038] In actual applications, the same site of a domain name system usually includes a resource pool formed by multiple server devices and several SLB devices.

[0039] Optionally, obtaining status monitoring data of Internet Protocol devices under the same site of the domain name system includes: In the case where the Internet Protocol device is the server device, using the Simple Network Management Protocol to obtain the central processing unit (CPU) occupancy rate and the memory usage rate of each server device within a preset time period, and configuring a static weight of the CPU occupancy rate, a static weight of the memory usage rate, an upper limit value of the CPU occupancy rate, and an upper limit value of the memory usage rate for each server device; In the case where the Internet Protocol device is the service load balancing device, representational state transfer is used to obtain the number of new connections and the number of concurrent connections of each service load balancing device within the preset time period, and a static weight for the number of new connections, a static weight for the number of concurrent connections, an upper limit for the number of new connections, and an upper limit for the number of concurrent connections are configured for each service load balancing device.

[0040] In the examples of this application, please refer to Figure 3Different status monitoring data acquisition methods can be selected based on the type of IP device. For example, when the IP device is a server, the CPU occupancy and memory usage of each server device within a preset time period can be obtained through the Simple Network Management Protocol (SNMP). When the IP device is an SLB device, the number of new connections and concurrent connections of each SLB device within a preset time period can be obtained through Representational State Transfer (Restful). The preset time period can be set based on specific usage requirements (for example, within the last 5 seconds), and this application does not impose specific restrictions on this.

[0041] In actual applications, the status monitoring data of IP devices can be obtained in real time through the SNMP protocol and RESTful interface. When a domain name resolution request is received from the client, the status monitoring data within the last 5 seconds from the time the domain name resolution request is received can be retrieved.

[0042] Furthermore, after obtaining the status monitoring data of each IP device within a preset time period, static weights and upper limits may be configured for different status monitoring data.

[0043] For example, when the IP device is a server device, a static weight of the CPU occupancy rate, a static weight of the memory usage rate, an upper limit of the CPU occupancy rate, and an upper limit of the memory usage rate can be configured for each server device. The static weight of the CPU occupancy rate and the static weight of the memory usage rate can be calculated and configured using the device hardware performance, and the upper limit of the CPU occupancy rate and the upper limit of the memory usage rate can be configured based on the maximum value of the device. Generally speaking, the optimal operating state of the device is roughly between 50% and 70%. If it is too high, performance may be degraded due to resource shortages, and if it is too low, it may lead to waste due to insufficient utilization of resources. Therefore, the upper limit can be configured to 70% of the maximum value to retain a certain redundancy.

[0044] Correspondingly, when the IP device is an SLB device, a static weight for the number of new connections, a static weight for the number of concurrent connections, an upper limit for the number of new connections, and an upper limit for the number of concurrent connections can be configured for each SLB device.

[0045] Therefore, by assigning an initial static weight to each status monitoring data based on hardware parameters, it can be ensured that high-performance devices receive a higher score tilt.

[0046] Specifically, as an optional implementation, configuring a static weight of a CPU occupancy rate and a static weight of a memory usage rate for each server device includes: The computing power of each CPU is calculated based on the number of cores, clock frequency, and floating-point operations per clock cycle of each CPU of each server device, and the computing power of all CPUs is accumulated to obtain the computing power of each server device; Based on the greatest common factor of the computing power of all server devices, the computing power of each server device is ratioed and normalized to obtain and configure the static weight of the CPU occupancy rate of each server device; Calculate the memory performance of each server device based on the memory frequency, number of channels, bit width, and timing of each server device; Based on the greatest common divisor of the memory performance of all server devices, a ratio operation is performed on the memory performance of each server device, and then normalized to obtain and configure the static weight of the memory usage of each server device.

[0047] In an embodiment of the present application, when configuring the static weight of the central processing unit occupancy rate and the static weight of the memory usage rate for each server device, the number of CPUs of each server device, as well as the number of cores, clock frequency, and number of floating-point operations per clock cycle of each CPU can be obtained through the out-of-band port. The computing power of each CPU can be determined by calculating the product of the number of cores, clock frequency, and number of floating-point operations per clock cycle. The computing power of all CPUs of each server device can then be accumulated to calculate the computing power of each server device.

[0048] Furthermore, after obtaining the computing power of each server device, a ratio operation is performed based on the greatest common divisor of the computing power data of all server devices to obtain the computing power ratio operation results of all server devices. The computing power ratio operation results of all server devices are then normalized and mapped to the range of [1~10]. The final normalized calculation result is the static weight of the central processing unit occupancy rate of each server device. The larger the numerical result, the stronger the CPU computing power of the server device.

[0049] The normalization calculation formula is shown in the following formula (1): (1) Among them, W i is the static weight of the CPU occupancy rate of the i-th server device, R i is the computing power ratio calculation result of the i-th server device, R min is the minimum value of the computing power ratio calculation results of all server devices, R max It is the maximum value of the computing power ratio calculation results of all server devices.

[0050] Furthermore, the memory of each server device can be calculated by obtaining the frequency, number of channels, bit width, and timing of the memory of each server device using the following formula (2): (2) The bandwidth is calculated as frequency × bit width × number of channels ÷ 8, and memory performance can be viewed as the ratio of bandwidth to timing. The larger the numerical result, the stronger the memory performance. Optionally, the timing can be expressed as column access delay time.

[0051] Furthermore, after obtaining the memory performance of each server device, a ratio operation is performed based on the greatest common divisor of the memory performance data of all server devices to obtain the memory performance ratio operation results of all server devices. The memory performance ratio operation results of all server devices are then normalized and mapped to the interval of [1~10]. The final normalized calculation result is the static weight of the memory utilization rate of each server device.

[0052] In actual applications, when configuring the static weight of the number of new connections and the static weight of the number of concurrent connections for the SLB device, it is sufficient to select its maximum number of new connections or the maximum number of concurrent connections as the corresponding hardware performance indicator, and the static weight of the number of new connections and the static weight of the number of concurrent connections can be calculated through the ratio operation and normalization calculation provided in the above embodiment.

[0053] Step 200: Calculate a status score of each Internet Protocol device based on the status monitoring data of the Internet Protocol device.

[0054] In an embodiment of the present application, based on the acquired status monitoring data of the Internet Protocol device, the pre-configured weights can be settled and weighted calculation can be performed to obtain the status score of each Internet Protocol device. The status score is used to describe the current load performance of the IP device. The lower the status score, the higher the load of the IP device and the worse the operating status performance. When it is lower than a certain value, services should no longer be dispatched to the IP device.

[0055] Specifically, as an optional implementation manner, calculating the status score of each Internet Protocol device based on the status monitoring data of the Internet Protocol device includes: When the Internet Protocol device is the server device, calculating an average of the central processing unit (CPU) occupancy rate of each server device within a preset time period, and performing a normalized residual performance calculation based on the configured upper limit of the CPU occupancy rate to obtain a CPU occupancy standard score; Calculating the average memory usage of each server device within a preset time period, and performing a normalized calculation of the remaining performance based on the configured upper limit of the memory usage to obtain a standard score for the memory usage; Calculating a weighted average based on the CPU occupancy standard score, the CPU occupancy static weight, the CPU occupancy dynamic weight, the memory usage standard score, the memory usage static weight, and the memory usage dynamic weight to obtain a status score for each server device; In a case where the Internet Protocol device is the service load balancing device, calculating an average number of new connections for each service load balancing device within a preset time period, and performing a normalized residual performance calculation based on a configured upper limit of the number of new connections to obtain a standard score for the number of new connections; Calculate the average number of concurrent connections for each service load balancing device within a preset time period, and perform a normalized calculation of the remaining performance based on the configured upper limit of the number of concurrent connections to obtain a standard score for the number of concurrent connections; Based on the standard score of the number of new connections, the static weight of the number of new connections, the dynamic weight of the number of new connections, the standard score of the number of concurrent connections, the static weight of the number of concurrent connections and the dynamic weight of the number of concurrent connections, a weighted average is calculated to obtain the status score of each service load balancing device.

[0056] In the examples of this application, please refer to Figure 4 , Figure 4 This is a flow chart of calculating a status score provided by an embodiment of the present application. When the IP device is a server device, the CPU occupancy standard score can be calculated by calculating the average CPU occupancy of each server device within a preset time period and performing a normalized calculation of the remaining performance based on the configured upper limit of the CPU occupancy. The normalized calculation of the remaining performance can be expressed as the following formula (3): (3) Among them, Y is the standard score and X is the average value.

[0057] Similarly, when calculating the memory usage standard score, the memory usage standard score can also be obtained by obtaining the average memory usage of each server device within a preset time period, and performing a normalized calculation of the remaining performance based on the configured upper limit of memory usage using the above formula (3).

[0058] It is understandable that when the IP device is an SLB device, a standard score calculation process similar to that of the server device can be adopted, by calculating the average number of new connections of each service load balancing device within a preset time period, and performing a standardized calculation of the remaining performance based on the configured upper limit of the number of new connections to obtain a standard score for the number of new connections, or by calculating the average number of concurrent connections of each service load balancing device within a preset time period, and performing a standardized calculation of the remaining performance based on the configured upper limit of the number of concurrent connections to obtain a standard score for the number of concurrent connections.

[0059] Therefore, when performing the residual performance standardization calculation (such as formula (3)), the residual performance of the current performance data X relative to the upper limit value is expressed by subtracting the average value from the upper limit value. If the residual performance data obtained is less than 0, the standard score obtained by mapping will also be less than 0, indicating that the current performance data has exceeded the upper limit value and is an overloaded reverse mapping value. This mapping method can fully express the position of the residual performance corresponding to the current performance indicator relative to the upper limit value of the performance indicator, and realizes the transformation of the dimensional expression into a dimensionless expression, becoming a scalar, which facilitates the comparison and weighting of indicators of different units or magnitudes, thus eliminating the need to consider the specific performance indicator type and achieving standardization. The mapped value is called the standard score.

[0060] Furthermore, after calculating the standard score of each status monitoring data, we can further perform weighted calculation based on the standard score, static weight, and dynamic weight. By calculating the weighted average, we can obtain the status score of each server device and SLB device. The calculation formula of the weighted calculation is expressed as the following formula (4): (4) Among them, S is the status score, Y1 is the standard score of the first status monitoring data, W1 is the static weight of the first status monitoring data, D1 is the dynamic weight of the first status monitoring data, Y2 is the standard score of the second status monitoring data, W2 is the static weight of the second status monitoring data, and D2 is the dynamic weight of the second status monitoring data.

[0061] For example, when calculating the status score of a server device, Y1 is the standard score for the CPU usage, W1 is the static weight for the CPU usage, D1 is the dynamic weight for the CPU usage, Y2 is the standard score for the memory usage, W2 is the static weight for the memory usage, and D2 is the dynamic weight for the memory usage; when calculating the status score of an SLB device, Y1 is the standard score for the number of new connections, W1 is the static weight for the number of new connections, and D1 is the dynamic weight for the number of new connections, Y2 is the standard score for the number of concurrent connections, W2 is the static weight for the number of concurrent connections, and D2 is the dynamic weight for the number of concurrent connections.

[0062] In this application, static weights are used to reflect the physical performance and hardware capabilities of the equipment, ensuring that at the same time, the load performance of equipment with different hardware capabilities on the same performance indicator is comparable; the larger the weight, the stronger the carrying capacity of the equipment on that indicator, and the more traffic should be allocated; dynamic weights are used to reflect the volatility of each state monitoring data. When the real-time changes of a certain indicator are drastic (large fluctuations up and down), its weight in the scheduling decision is automatically increased so that the indicator can be monitored in a focused manner. Therefore, each state monitoring data retains a static baseline weight based on hardware capabilities, and is superimposed with a dynamically adjusted weight based on real-time fluctuations. The final state score calculated by weighted average based on the weights can take into account both the differences in equipment capabilities (static) and the real-time load changes (dynamic), and output a comprehensive and highly comparable comparison basis.

[0063] For example, the dynamic weight of the status monitoring data is calculated by the following steps: Acquire the status monitoring data within the preset time period and perform normalization calculation; For the normalized state monitoring data, a univariate linear regression model is constructed; The least squares method is used to perform linear fitting and calculate the slope of the univariate linear regression model; The absolute value of the slope is taken as the dynamic weight of the state monitoring data.

[0064] In an embodiment of the present application, when calculating the dynamic weight of the status monitoring data, it is first necessary to normalize the status monitoring data to facilitate comparison of indicators of different units or magnitudes. A univariate linear regression model is constructed for the normalized status monitoring data. By calculating the slope of the univariate linear regression model, the slope can be used to reflect the volatility of the status monitoring data within a preset time period. When the fluctuation amplitude is large, the absolute value of the slope is correspondingly large, and the dynamic weight reflected will also be correspondingly large.

[0065] In practical applications, the least squares method is used for linear fitting. By solving the set of equations, the slope k value can be calculated. The absolute value of the slope is proportional to the changing trend of the status monitoring data within the current monitoring time window. By repeating the above calculation steps for each status monitoring data, the dynamic weight of each status monitoring data can be obtained, which is convenient for the subsequent calculation of the status score of each IP device.

[0066] Optionally, after calculating the slope k value of the two types of performance indicators (such as CPU occupancy and memory usage, number of new connections and number of concurrent connections) of each IP device, a ratio operation can be performed based on the absolute values ​​of the change rates k of the two performance indicators, and the absolute value ratio is used as its dynamic weight, which is recorded as D1 and D2 in the above formula (4) respectively.

[0067] Therefore, compared with the defects of traditional dynamic weighting, variance and standard deviation algorithms in the existing technology that cannot compare data with different performance indicators, the status score calculation method provided in the present invention performs standardized calculation on the data based on the upper limit value, which solves the problem that data cannot be compared due to the differences in performance indicators obtained by SNMP and RESTful.

[0068] Specifically, as an optional implementation manner, before calculating the status score of each Internet Protocol device based on the status monitoring data of the Internet Protocol device, the method further includes: The absolute median difference algorithm is used to screen and eliminate abnormal data from the status monitoring data of the Internet Protocol device.

[0069] In the embodiments of this application, Figure 4 As shown in the figure, after obtaining the status monitoring data, there may be some external factors that may cause jitter or abnormality in some data. In order to prevent the influence of these abnormal data, they need to be eliminated.

[0070] Therefore, before calculating the status score based on the status monitoring data, the Median Absolute Deviation (MAD) algorithm is first used to filter out abnormal data from the status monitoring data of the IP device, remove jitter or sudden anomalies, and maintain the robustness of subsequent statistics.

[0071] Among them, the specific elimination process of the MAD algorithm is: sort the same state monitoring data obtained within a preset time period, select the median of this group of data, and subtract the median from all the data in turn and take the absolute value to obtain a group of median absolute differences, thereby sorting this group of median absolute differences, and taking the median of this group of median absolute differences to define the absolute median difference, and compare the product of the absolute median difference and 3 with the above group of median absolute differences in turn. If any median absolute difference is greater than the product of the absolute median difference and 3, it indicates that the state monitoring data corresponding to the median absolute difference is abnormal data and needs to be eliminated.

[0072] In practical applications, after completing the first abnormal data elimination by the absolute median difference algorithm, the above steps can be repeated for the remaining status monitoring data to perform the abnormal data elimination process of the absolute median difference algorithm a second time, thereby using the retained status monitoring data as the data basis for subsequent calculation of the status score.

[0073] Step 300: sort and filter the status scores of each of the Internet Protocol devices, and return the Internet address of the Internet Protocol device with the highest status score as the parsing result.

[0074] In the embodiments of the present application, please refer to Figure 3 When the IP under the domain name record is referenced, the DNS server will always initiate an SNMP request or a RESTful request to the server or the SLB device of the IP address to obtain specific information. When the DNS server receives a DNS domain name query request, and the IP corresponding to the domain name is referenced, if the state monitoring method is SNMP, that is, the IP address corresponds to a server providing specific services, the CPU occupancy rate and the memory usage rate obtained by the SNMP request in the last 5 seconds are obtained, and then the state score is calculated according to the configured CPU occupancy rate static weight and the memory usage rate static weight, and it is judged whether the calculated state score meets the preset condition, for example, when the state score is less than 0, it indicates that the IP device corresponding to the IP address has too high load and should not process other requests, then the DNS server does not add the IP to the resolution result and returns it to the requester, otherwise, it is normally resolved and returned. If there are multiple state scores meeting the condition, the Internet address of the Internet protocol device with the highest score is selected as the resolution result, which realizes the dynamic perception of the DNS server to other servers or SLB devices under the same site, and makes the load balancing scheduling more flexible.

[0075] Therefore, the present application can more intuitively understand whether the rear service is a server or an SLB device application through independent state monitoring of the servers or SLB under the same site by two different methods, that is, SNMP and RESTful, can more comprehensively and meticulously master the running state of the server or application to ensure the stability and reliability of the service, and can real-time optimize the dynamic performance of the system to achieve the optimal running effect.

[0076] In addition, compared with the prior art, the performance indicators representing the performance of the server are different in some cases because the main businesses processed by the two servers are different, etc., so that the traditional dynamic performance distribution algorithm has a defect that the actual expectation is different from the performance obtained by the device running, and the dynamic performance distribution scheduling in the expectation cannot be accurately realized. The present application changes the dimensional expression into a dimensionless expression, which becomes a pure quantity, so that the specific performance indicator type does not need to be considered, and the standardized calculation is realized.

[0077] Therefore, the present application achieves the beneficial effect that the server IP address with the highest score, that is, the optimal performance, is returned as the resolution result to the requester. This strategy not only solves the limitation of the traditional DNS load balancing method in flexibility, but also significantly improves the effect of load balancing, optimizes resource utilization, and ensures that users can obtain high-quality services more quickly.

[0078] Please refer to Figure 5 , Figure 5 is a structural schematic diagram of a domain name system load balancing scheduling device provided by an embodiment of the present application. The present application also provides a domain name system load balancing scheduling device, which can implement the domain name system load balancing scheduling method described above. The device comprises: a data acquisition module 510, configured to acquire state monitoring data of Internet protocol devices under a same site of a domain name system in response to a resolution request; wherein the Internet protocol devices comprise server devices and service load balancing devices; a score calculation module 520, configured to calculate a state score of each of the Internet protocol devices according to the state monitoring data of the Internet protocol devices; a sorting and resolving module 530, configured to sort and filter the state scores of each of the Internet protocol devices, and return an Internet address of an Internet protocol device with the highest state score as a resolution result.

[0079] It can be understood that the content in the method embodiments described above is applicable to the device embodiments. The device embodiments specifically implement the functions of the method embodiments described above, and achieve the same beneficial effects as the method embodiments described above.

[0080] Please refer to Figure 6 , Figure 6 is a hardware structural schematic diagram of an electronic device provided by an embodiment of the present application. The electronic device comprises: a processor 601, which can be implemented in the form of a general-purpose CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits, and is configured to execute related programs to implement the technical solutions provided by the embodiments of the present application; a memory 602, which can be implemented in the form of a ROM (Read Only Memory), a static storage device, a dynamic storage device, or a RAM (Random Access Memory). The memory 602 can store an operating system and other application programs. When the technical solutions provided by the embodiments of the present application are implemented by software or firmware, the related program codes are stored in the memory 602 and are called and executed by the processor 601 to implement the method described above in the embodiments of the present application; an input / output interface 603, configured to implement information input and output; The communication interface 604 is configured to realize the communication interaction between the device and other devices. The communication can be realized in a wired manner (for example, a USB, a network cable, and the like) or in a wireless manner (for example, a mobile network, WIFI, Bluetooth, and the like). The bus 605 is configured to transmit information between various components (for example, the processor 601, the memory 602, the input / output interface 603, and the communication interface 604) of the device. The processor 601, the memory 602, the input / output interface 603, and the communication interface 604 are connected to each other through the bus 605.

[0081] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to realize the method.

[0082] It can be understood that the contents in the above method embodiments are all applicable to the storage medium embodiment, the storage medium embodiment specifically realizes the functions of the above method embodiments, and achieves the same beneficial effects as the above method embodiments.

[0083] The embodiment of the present application further provides a computer program product, which comprises a computer program. The computer program is executed by a processor to realize the method.

[0084] It can be understood that the contents in the above method embodiments are all applicable to the program product embodiment, the program product embodiment specifically realizes the functions of the above method embodiments, and achieves the same beneficial effects as the above method embodiments.

[0085] The memory is a non-transitory computer readable storage medium, which can be used to store a non-transitory software program and a non-transitory computer executable program. In addition, the memory can include a high-speed random access memory, and can further include a non-transitory memory, for example, at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory remotely arranged relative to the processor, and the remote memory can be connected to the processor through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0086] The embodiments of the present application provide a domain name system load balancing scheduling method, apparatus, device, medium, and program product. By obtaining status monitoring data of Internet Protocol devices under the same site of the domain name system, the method dynamically calculates the status score of each device, thereby screening out the Internet Protocol devices with the best performance, achieving more balanced load scheduling of servers and SLB devices, reducing service delays and failure rates, and effectively improving the user experience.

[0087] The embodiments described in the embodiments of this application are intended to more clearly illustrate the technical solutions of the embodiments of this application and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0088] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0089] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.

[0090] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the devices disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.

[0091] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0092] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0093] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0094] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0095] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0096] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, essentially or in other words, the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes multiple instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program storage media.

[0097] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, and are not limited to the scope of the embodiments of the present application. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the embodiments of the present application.

Claims

1. A domain name system load balancing scheduling method, characterized in that: The method comprises the following steps: In response to the resolution request, obtaining status monitoring data of Internet Protocol devices under the same site of the domain name system; wherein the Internet Protocol devices include server devices and service load balancing devices; Calculating a status score of each of the Internet Protocol devices based on the status monitoring data of the Internet Protocol devices; The status scores of each of the Internet Protocol devices are sorted and screened, and the Internet address of the Internet Protocol device with the highest status score is used as the parsing result and returned.

2. The method according to claim 1, characterized in that The obtaining of status monitoring data of Internet Protocol devices at the same site of the domain name system includes: In the case where the Internet Protocol device is the server device, using the Simple Network Management Protocol to obtain the central processing unit (CPU) occupancy rate and the memory usage rate of each server device within a preset time period, and configuring a static weight of the CPU occupancy rate, a static weight of the memory usage rate, an upper limit value of the CPU occupancy rate, and an upper limit value of the memory usage rate for each server device; In the case where the Internet Protocol device is the service load balancing device, representational state transfer is used to obtain the number of new connections and the number of concurrent connections of each service load balancing device within the preset time period, and a static weight for the number of new connections, a static weight for the number of concurrent connections, an upper limit for the number of new connections, and an upper limit for the number of concurrent connections are configured for each service load balancing device.

3. The method according to claim 2, characterized in that The step of configuring a static weight of the CPU occupancy rate and a static weight of the memory usage rate for each server device includes: The computing power of each CPU is calculated based on the number of cores, clock frequency, and floating-point operations per clock cycle of each CPU of each server device, and the computing power of all CPUs is accumulated to obtain the computing power of each server device; Based on the greatest common factor of the computing power of all server devices, the computing power of each server device is ratioed and normalized to obtain and configure the static weight of the CPU occupancy rate of each server device; Calculate the memory performance of each server device based on the memory frequency, number of channels, bit width, and timing of each server device; Based on the greatest common divisor of the memory performance of all server devices, a ratio operation is performed on the memory performance of each server device, and then normalized to obtain and configure the static weight of the memory usage of each server device.

4. The method according to claim 2, characterized in that Calculating the status score of each Internet Protocol device according to the status monitoring data of the Internet Protocol device includes: When the Internet Protocol device is the server device, calculating an average of the central processing unit (CPU) occupancy rate of each server device within a preset time period, and performing a normalized residual performance calculation based on the configured upper limit of the CPU occupancy rate to obtain a CPU occupancy standard score; Calculating the average memory usage of each server device within a preset time period, and performing a normalized calculation of the remaining performance based on the configured upper limit of the memory usage to obtain a standard score for the memory usage; Calculating a weighted average based on the CPU occupancy standard score, the CPU occupancy static weight, the CPU occupancy dynamic weight, the memory usage standard score, the memory usage static weight, and the memory usage dynamic weight to obtain a status score for each server device; In a case where the Internet Protocol device is the service load balancing device, calculating an average number of new connections for each service load balancing device within a preset time period, and performing a normalized residual performance calculation based on a configured upper limit of the number of new connections to obtain a standard score for the number of new connections; Calculate the average number of concurrent connections for each service load balancing device within a preset time period, and perform a normalized calculation of the remaining performance based on the configured upper limit of the number of concurrent connections to obtain a standard score for the number of concurrent connections; Based on the standard score of the number of new connections, the static weight of the number of new connections, the dynamic weight of the number of new connections, the standard score of the number of concurrent connections, the static weight of the number of concurrent connections and the dynamic weight of the number of concurrent connections, a weighted average is calculated to obtain the status score of each service load balancing device.

5. The method according to claim 4, characterized in that The dynamic weight of the condition monitoring data is calculated through the following steps: Acquire the status monitoring data within the preset time period and perform normalization calculation; For the normalized state monitoring data, a univariate linear regression model is constructed; The least squares method is used to perform linear fitting and calculate the slope of the univariate linear regression model; The absolute value of the slope is taken as the dynamic weight of the state monitoring data.

6. The method according to claim 1, characterized in that Before calculating the status score of each Internet Protocol device based on the status monitoring data of the Internet Protocol device, the method further includes: The absolute median difference algorithm is used to screen and eliminate abnormal data from the status monitoring data of the Internet Protocol device.

7. A domain name system load balancing scheduling device, characterized in that: The device comprises: A data acquisition module, configured to obtain, in response to a resolution request, status monitoring data of Internet Protocol devices under the same site of a domain name system; wherein the Internet Protocol devices include server devices and service load balancing devices; A score calculation module, configured to calculate a status score of each of the Internet Protocol devices based on the status monitoring data of the Internet Protocol devices; The sorting and parsing module is used to sort and screen the status scores of each of the Internet Protocol devices, and return the Internet address of the Internet Protocol device with the highest status score as the parsing result.

8. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 6 when executing the computer program.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.