Service endpoint selection method, selection device, device, medium and program product
By configuring energy efficiency query messages and analyzing energy efficiency resource records, selecting target endpoints to provide energy-saving services, the problem of low energy utilization efficiency in communication networks is solved, and more efficient energy utilization and carbon emission reduction are achieved.
Patent Information
- Application Number
- CN202510614593.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-13
- Publication Date
- 2025-08-15
AI Technical Summary
Existing communication networks and Internet infrastructure have low energy utilization efficiency problems, and it is necessary to improve the energy utilization efficiency of Internet access to reduce energy consumption and carbon emissions.
By configuring energy efficiency query messages, sending energy efficiency query requests to the DNS server, receiving and parsing energy efficiency resource records, selecting target endpoints based on the record format and establishing service connections, obtaining more energy information to provide energy-saving services.
It has achieved the upgrade from traditional DNS domain name resolution to energy efficiency-aware service endpoint selection. Clients obtain more energy information before connecting, helping the network provide different levels of energy-saving services and reduce energy use.
Smart Images

Figure CN120499151A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of wireless communication technology, and in particular to a method for selecting a service endpoint, an apparatus for selecting a service endpoint, a terminal device, a network device, a computer-readable storage medium, and a computer program product. Background Art
[0002] In order to meet users' real-time communication needs, communication networks and Internet infrastructure will consume a lot of energy to ensure the stability and continuity of Internet services. Although communication networks and Internet infrastructure are gradually adopting new energy to replace traditional energy in terms of energy supply and conversion to achieve energy conservation and emission reduction, there is still a lot of room for research on energy conservation optimization in network management and optimization.
[0003] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute prior art known to ordinary technicians in the field. Summary of the Invention
[0004] The purpose of the present disclosure is to provide a method for selecting a service endpoint, a configuration device, a network device, a storage medium and a computer program product, which at least to some extent overcome the problem of low energy utilization efficiency of Internet access in related technologies.
[0005] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by practice of the present disclosure.
[0006] According to one aspect of the present disclosure, a method for selecting a service endpoint is provided, comprising: configuring an energy efficiency query message based on a target domain name to be resolved; sending an energy efficiency query request to a DNS server based on the configured energy efficiency query message; receiving an energy efficiency resource record fed back by the DNS server based on the energy efficiency query request, wherein the energy efficiency resource record includes multiple candidate endpoints for the service corresponding to the target domain name; parsing the energy efficiency resource record based on the configured record format, so as to select a target endpoint from the multiple candidate endpoints based on the parsing result, and establishing a service connection with the target endpoint.
[0007] In one embodiment of the present disclosure, the energy efficiency resource record is parsed based on the configured record format, including: extracting energy-related information from the energy efficiency resource record based on the top-level format configured in the record format; extracting the priority parameter and domain name information of the energy efficiency resource record from the energy-related information based on the secondary format configured in the record format; if the priority parameter is greater than 0, determining that the corresponding domain name information is the domain name of the candidate endpoint.
[0008] In one embodiment of the present disclosure, a target endpoint is selected from a plurality of candidate endpoints based on the parsing result, including: determining the candidate endpoint corresponding to the smallest priority parameter as the target endpoint; if there are at least two smallest priority parameters, extracting energy parameters from the energy-related information based on the secondary format configured in the record format, the energy parameters including at least one of energy type, energy efficiency index and power usage efficiency; selecting the target endpoint based on the energy parameters; if there are at least two smallest priority parameters and the corresponding energy parameters are the same, selecting the target endpoint based on a random shuffling method.
[0009] In one embodiment of the present disclosure, an energy efficiency query message is configured based on a target domain name that needs to be resolved, including: the energy efficiency query message includes a question area, and the target domain name is filled into the question name field in the question area to generate the energy efficiency query message.
[0010] In one embodiment of the present disclosure, the energy efficiency resource record is parsed based on the configured record format, and further includes: the priority parameter is equal to 0, and the corresponding domain name information is determined to be an alias target, and the alias target is used to perform domain name redirection to query the domain name of the candidate endpoint; the target domain name in the question name field is replaced with the alias target to update the energy efficiency query request, and the updated energy efficiency query request is sent.
[0011] In one embodiment of the present disclosure, it also includes: if it is detected that the length of the generated alias chain reaches a length threshold based on the number of times the alias target is replaced, the replacement is stopped and an error identifier is generated; and / or if a loop is detected in the alias chain based on the replacement history, the replacement is stopped and an error identifier is generated.
[0012] In one embodiment of the present disclosure, establishing a service connection with the target endpoint includes: extracting an address record of the domain name of the candidate endpoint from the energy-related information based on the secondary format, so as to establish a service connection with the target endpoint based on the address record.
[0013] In one embodiment of the present disclosure, before parsing the energy efficiency resource record based on the configured record format, it also includes: detecting that the energy efficiency resource record includes a DNSSEC record, and performing signature verification on the DNSSEC record, so that when the verification passes, the energy efficiency resource record is parsed based on the configured record format.
[0014] According to another aspect of the present disclosure, a method for selecting a service endpoint is provided, which is applied to a recursive resolver, and includes: in response to a received energy efficiency query request, extracting a target domain name in the energy efficiency query request; detecting that a local cache does not have an energy efficiency resource record related to the target domain name, and feeding back the energy efficiency query request to an authoritative server; receiving an energy efficiency query result fed back by the authoritative server based on the energy efficiency query request; if energy efficiency resolution enhancement is supported, performing enhancement processing on the energy efficiency query result to obtain an energy efficiency resource record, and feeding back the energy efficiency resource record to a client, wherein the energy efficiency resource record includes multiple candidate endpoints for the service corresponding to the target domain name, so that the client parses the energy efficiency resource record based on a configured record format, selects a target endpoint from the multiple candidate endpoints based on the resolution result, and establishes a service connection with the target endpoint.
[0015] In one embodiment of the present disclosure, the energy efficiency query result is enhanced, including: extracting a corresponding priority parameter and domain name information from the energy efficiency query result; the priority parameter is equal to 0, and the domain name information includes multiple alias pattern records, and cyclically executing randomly selecting one from the multiple alias pattern records as a new query target to obtain the new energy efficiency query result from the authoritative server until the priority parameter extracted from the new energy efficiency query result is greater than 0 or the number of random selections reaches a chain length threshold.
[0016] In one embodiment of the present disclosure, the energy efficiency query result is enhanced, further comprising: if the priority parameter is greater than 0, determining that the corresponding domain name information is the domain name of the candidate endpoint; parsing the address record of the domain name of the candidate endpoint and merging the address record into the corresponding energy efficiency query result to obtain the energy efficiency resource record.
[0017] In one embodiment of the present disclosure, the address record is merged into the corresponding energy efficiency query result, including: the energy efficiency query result is configured based on a top-level format, the top-level format includes energy-related information, and the energy-related information is configured based on a secondary format, the energy-related information includes the priority parameter, the domain name of the candidate endpoint and the energy parameter, so as to merge the address record into the corresponding energy efficiency query result.
[0018] In one embodiment of the present disclosure, the energy efficiency query result is enhanced, further comprising: the energy efficiency query result includes the priority parameter and energy parameter of the candidate endpoint; and the candidate endpoint is pre-sorted based on the priority parameter and / or the energy parameter.
[0019] According to another aspect of the present disclosure, a method for selecting a service endpoint is provided, which is applied to an authoritative server and includes: in response to a received energy efficiency query request, extracting a target domain name in the energy efficiency query request; querying an energy efficiency query result that matches the target domain name in a managed regional database, wherein the energy efficiency query result includes domain name information of multiple candidate endpoints; feeding back the energy efficiency query result to a recursive resolver, so that the recursive resolver performs a merge operation based on the energy efficiency query result to obtain an energy efficiency resource record, and feeding back the energy efficiency resource record to a client, so that the client parses the energy efficiency resource record based on a configured record format, so as to select a target endpoint from the multiple candidate endpoints based on the parsing result, and establish a service connection with the target endpoint.
[0020] In one embodiment of the present disclosure, the energy efficiency query result matching the target domain name is queried in the managed regional database, including: if the target domain name is an alias mode record, querying the first energy efficiency result in the alias mode, and the priority parameter included in the first energy efficiency result is equal to 0; if the target domain name or other domain names pointed to by the alias mode record are actual endpoints, querying the second energy efficiency result in the service mode, and the priority parameter included in the second energy efficiency result is greater than 0, and the second energy efficiency result also includes energy parameters, and the energy parameters include at least one of energy type, energy efficiency index and power utilization efficiency.
[0021] In one embodiment of the present disclosure, querying the second energy efficiency result in the service mode includes: querying the regional database for the second energy efficiency result whose energy efficiency value is higher than an energy efficiency threshold based on an energy-related policy.
[0022] In one embodiment of the present disclosure, the method further includes: if a DNSSEC record is configured for the managed area, adding the DNSSEC record to the energy efficiency query result.
[0023] According to another aspect of the present disclosure, a device for selecting a service endpoint is provided, comprising: a first extraction module, configured to extract a target domain name in a received energy efficiency query request in response to the energy efficiency query request; a first feedback module, configured to detect that a local cache does not have an energy efficiency resource record related to the target domain name, and to feed back the energy efficiency query request to an authoritative server; a second receiving module, configured to receive an energy efficiency query result fed back by the authoritative server based on the energy efficiency query request; an enhancement processing module, configured to perform enhancement processing on the energy efficiency query result if energy efficiency parsing enhancement is supported, to obtain an energy efficiency resource record, and to feed back the energy efficiency resource record to a client, wherein the energy efficiency resource record includes multiple candidate endpoints for the service corresponding to the target domain name, so that the client parses the energy efficiency resource record based on a configured record format, selects a target endpoint from the multiple candidate endpoints based on the parsing result, and establishes a service connection with the target endpoint.
[0024] According to another aspect of the present disclosure, a device for selecting a service endpoint is provided, comprising: a configuration module for configuring an energy efficiency query message based on a target domain name to be resolved; a sending module for sending an energy efficiency query request to a DNS server based on the configured energy efficiency query message; a first receiving module for receiving an energy efficiency resource record fed back by the DNS server based on the energy efficiency query request, wherein the energy efficiency resource record includes multiple candidate endpoints for the service corresponding to the target domain name; and a parsing module for parsing the energy efficiency resource record based on the configured record format, so as to select a target endpoint from the multiple candidate endpoints based on the parsing result, and establish a service connection with the target endpoint.
[0025] According to another aspect of the present disclosure, a device for selecting a service endpoint is provided, comprising: a second extraction module, configured to extract a target domain name in a received energy efficiency query request in response to the energy efficiency query request; a query module, configured to query an energy efficiency query result matching the target domain name in a managed regional database, wherein the energy efficiency query result includes domain name information of multiple candidate endpoints; a second feedback module, configured to feed back the energy efficiency query result to a recursive resolver, so that the recursive resolver performs a merge operation based on the energy efficiency query result to obtain an energy efficiency resource record, and feeds back the energy efficiency resource record to a client, so that the client parses the energy efficiency resource record based on a configured record format, so as to select a target endpoint from the multiple candidate endpoints based on the parsing result, and establish a service connection with the target endpoint.
[0026] According to another aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; the processor is configured to execute the service endpoint selection method of the first aspect by executing the executable instructions.
[0027] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for selecting a service endpoint is implemented.
[0028] According to another aspect of the present disclosure, a computer program product is provided, on which a computer program is stored. When the computer program is executed by a processor, the computer program implements the above-mentioned method for selecting a service endpoint.
[0029] The service endpoint selection scheme provided by the embodiments of the present disclosure realizes an upgrade from traditional DNS domain name resolution to energy-efficiency-aware service endpoint selection by configuring and transmitting energy efficiency query messages, receiving and parsing energy efficiency resource records, screening target endpoints based on rules and establishing connections. This enables the client to obtain more energy information about the endpoint before connecting to the target endpoint, helping the network to provide energy-saving services at different levels, thereby helping to reduce energy usage.
[0030] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The accompanying drawings are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and those skilled in the art can derive other drawings based on these drawings without inventive effort.
[0032] Figure 1 A schematic diagram illustrating a system for selecting a service endpoint according to an embodiment of the present disclosure is shown;
[0033] Figure 2 A flow chart of a method for selecting a service endpoint according to an embodiment of the present disclosure is shown;
[0034] Figure 3 A flow chart of a method for selecting a service endpoint according to an embodiment of the present disclosure is shown;
[0035] Figure 4 A flow chart of a method for selecting a service endpoint according to an embodiment of the present disclosure is shown;
[0036] Figure 5 A flow chart showing another method for selecting a service endpoint according to an embodiment of the present disclosure is shown;
[0037] Figure 6 A flow chart of a method for selecting a service endpoint according to another embodiment of the present disclosure is shown;
[0038] Figure 7A schematic diagram of a device for selecting a service endpoint according to an embodiment of the present disclosure is shown;
[0039] Figure 8 A schematic diagram showing another device for selecting a service endpoint according to an embodiment of the present disclosure is shown;
[0040] Figure 9 A schematic diagram of a device for selecting a service endpoint according to another embodiment of the present disclosure is shown;
[0041] Figure 10 A structural block diagram of a computer device in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0042] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0043] In addition, the accompanying drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. Identical reference numerals in the figures denote identical or similar parts, and thus repetitive descriptions thereof will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0044] In order to reduce the emission of atmospheric pollutants, communication networks and Internet infrastructure also need to gradually achieve energy conservation and emission reduction. DNS (Domain Name System), as a distributed database that maps domain names and IP addresses, is used to connect application servers and clients, and can coordinate the interaction between terminals, networks and the cloud to better achieve energy-based precise scheduling and control, thereby improving the energy utilization efficiency of Internet access and reducing energy waste and carbon emissions.
[0045] Low-carbon networks and services are imperative. Operators and content providers are striving to improve energy efficiency and utilize renewable energy sources (such as wind, solar, and thermal energy). According to the CO2 accounting methodology in the IPCC Guidelines for National Greenhouse Gas Inventories, a device's CO2 emissions are related to its carbon emission factor (EF) and electricity consumption. With the advancement of renewable energy, the carbon emission factors of equipment in different data centers (DCs) will vary significantly (for example, wind power versus coal power). Therefore, a new mechanism is needed on wide area networks to provide different levels of energy-saving services.
[0046] To facilitate understanding, several terms involved in this application are first explained below.
[0047] DNS (Domain Name System) is an Internet service. It serves as a distributed database that maps domain names to IP addresses, making Internet access more convenient. DNS uses UDP port 53. Currently, the maximum length of each domain name is 63 characters, and the total length of a domain name cannot exceed 253 characters.
[0048] IPCC (Intergovernmental Panel on Climate Change): An international body that assesses the science related to climate change.
[0049] RR (Resource Record, DNS resource record): refers to the resources related to each domain.
[0050] EF (Emission Factor): The amount of carbon emissions per unit of energy generated during the combustion or use of each energy source.
[0051] DNSSEC (Domain Name System Security Extensions): A series of DNS security authentication mechanisms provided by IETF.
[0052] A: Represents the IPv4 address record corresponding to the domain name.
[0053] AAAA: identifies an IPv6 address record format.
[0054] The following describes in more detail the steps of the method for selecting a service endpoint in this example implementation with reference to the accompanying drawings and embodiments.
[0055] like Figure 1As shown, the client 102 sends an energy efficiency query request to the recursive resolver 104, seeking energy efficiency information related to the target domain name. After processing the request, the recursive resolver feeds back the energy efficiency resource record obtained through the merging operation to the client for it to select a target endpoint to establish a connection.
[0056] After receiving the client request, the recursive resolver 104 initiates an energy efficiency query request to the authoritative server 106. The authoritative server queries the regional database and returns the energy efficiency query result including multiple candidate endpoint domain name information to the recursive resolver.
[0057] Figure 2 A flow chart of a method for selecting a service endpoint in an embodiment of the present disclosure is shown.
[0058] like Figure 2 As shown, a method for selecting a service endpoint according to an embodiment of the present disclosure includes:
[0059] Step S202: configuring an energy efficiency query message based on the target domain name to be resolved.
[0060] In some embodiments, the client specifies the query type, target domain name $QNAME and other key parameters in the message according to the target domain name information and in accordance with a custom or standard energy efficiency query protocol format, so as to inform the DNS server based on the energy efficiency query that the client is interested in the energy efficiency resource record corresponding to the target domain name, thereby ensuring that subsequent requests can obtain service endpoint information that meets the requirements.
[0061] Step S204: Send an energy efficiency query request to the DNS server based on the configured energy efficiency query message.
[0062] In some embodiments, the DNS server includes an authoritative DNS server and a recursive resolver, among others.
[0063] In some embodiments, the client uses a network communication protocol (such as UDP or TCP) to encapsulate the configured energy efficiency query message into a network data packet and sends it to the DNS server through a local network interface.
[0064] Step S206: receiving an energy efficiency resource record fed back by the DNS server based on the energy efficiency query request, where the energy efficiency resource record includes a plurality of candidate endpoints of the service corresponding to the target domain name.
[0065] In some embodiments, the energy efficiency resource record is a set of information fed back by the DNS server according to the energy efficiency query request of the client, including various energy efficiency-related data related to the service corresponding to the target domain name and information of the service endpoint.
[0066] Step S208 : parsing the energy efficiency resource record based on the configured record format, selecting a target endpoint from a plurality of candidate endpoints based on the parsing result, and establishing a service connection with the target endpoint.
[0067] In some embodiments, the target domain name included in the energy efficiency resource record corresponds to multiple possible service endpoints of the service. Each candidate endpoint has the ability to provide the target service, but there may be differences in energy efficiency parameters, performance, etc. The client needs to select one from these candidate endpoints as the actual connection endpoint based on a certain strategy.
[0068] In some embodiments, the target endpoint is an endpoint selected from multiple candidate endpoints after the client parses the energy efficiency resource record based on a configured record format and is ultimately used to establish a service connection.
[0069] In some embodiments, the client disassembles and analyzes the received records based on a pre-set energy efficiency resource record format standard, extracts key information such as priority (PRIORITY), endpoint domain name (ENAME), energy parameters (EEPARAMS), etc., and then selects the most suitable target endpoint from multiple candidate endpoints based on the built-in selection strategy (such as giving priority to endpoints with high priority and good energy efficiency index).
[0070] In this embodiment, by configuring and transmitting energy efficiency query messages, receiving and parsing energy efficiency resource records, screening target endpoints based on rules and establishing connections, an upgrade from traditional DNS domain name resolution to energy efficiency-aware service endpoint selection is achieved, allowing the client to obtain more energy information about the endpoint before connecting to the target endpoint, helping the network provide different levels of energy-saving services, and thus helping to reduce energy usage.
[0071] Furthermore, energy efficiency resource records can include the energy types used by network devices. By parsing the energy efficiency resource records based on the configured record format, network devices that use renewable energy can be connected first. This can also promote the collection of data such as carbon footprint and carbon emissions across the entire network, effectively supporting the development of carbon quotas and carbon trading for operators and content providers.
[0072] In one embodiment of the present disclosure, parsing energy efficiency resource records based on a configured record format includes:
[0073] Extracts energy-related information from energy efficiency resource records based on the top-level format configured in Record Format.
[0074] In some embodiments, the top-level format is Figure 3 The field descriptions in the top-level format are shown in Table 1.
[0075] Table 1
[0076]
[0077]
[0078] The priority parameter and domain name information of the energy efficiency resource record are extracted from the energy related information based on the secondary format configured in the record format.
[0079] In some embodiments, the secondary format is the RDATA format in Table 1. Figure 4 shown.
[0080] The fields in the RDATA format are used to carry core energy-related information, including three mandatory subfields: PRIORITY (priority), ENAME (optional endpoint domain name), and EEPARAMS (energy parameters).
[0081] PRIORITY (priority field) is used to force the sorting of resource record sets, distinguishing two modes. The PRIORITY value is 0, corresponding to the alias mode, indicating that the current energy efficiency record is a service alias, and ENAME points to the alias target domain name. The PRIORITY value is 1-65535, corresponding to the service mode, indicating that the current energy efficiency record is an optional service endpoint, and ENAME points to the specific service endpoint domain name. It is sorted in ascending order of priority: the smaller the value, the higher the priority (such as records with PRIORITY=1 take precedence over PRIORITY=2). If there are records with the same priority, the client needs to select them through a random shuffling algorithm to achieve load balancing.
[0082] ENAME (optional endpoint domain name) needs to be differentiated according to the mode. When PRIORITY=0, ENAME is the alias target of the service, that is, the energy efficiency record aliases the current NAME to ENAME. In this mode, ENAME is unique in the resource record set and is not associated with energy parameters (EEPARAMS can be empty or only contain connection parameters); when PRIORITY>0, ENAME is the optional endpoint domain name of the service. Each endpoint can be associated with independent energy parameters (such as endpoints in different data centers), and multiple service mode records are supported (each record corresponds to one endpoint). Priority and energy attributes are distinguished by PRIORITY and EEPARAMS.
[0083] EEPARAMS (Energy Parameter Field) is a space-delimited list. Each EEPARAM consists of an EeParamKey=EeParamValue pair. The EeParamKey name is represented by a string of lowercase letters and numbers in the range of "a"-"z" and "0"-"9". Each EeParamKey appears at most once in EEPARAMS. EeParamKeys should be registered by IANA. The display format of EEPARAMS can appear in any order, but parameters must not be repeated. EeParamValue is a string. If the optional "=" and EeParamValue are omitted, the value will be interpreted as empty.
[0084] In some embodiments, the defined initial EeParamKeys are shown in Table 2.
[0085] Table 2
[0086]
[0087] If the priority parameter is greater than 0, the corresponding domain name information is determined to be the domain name of the candidate endpoint.
[0088] In some embodiments, according to the definition of energy efficiency resource records, when the priority parameter (PRIORITY) is greater than 0, it indicates that the record is in service mode. At this time, the corresponding domain name information (ENAME) is directly associated with the endpoint that can actually provide services. Based on this rule, the client can quickly filter out candidate endpoint domain names that can be used to establish service connections from the many parsed records, prevent unnecessary parsing and connection attempts, and improve the efficiency and accuracy of endpoint selection.
[0089] In this embodiment, energy efficiency resource records are hierarchically parsed by configuring top-level formats and secondary formats, and candidate endpoint domain names are screened using priority parameters to accurately extract core information from complex energy efficiency resource records. This ensures that the client can quickly identify valid candidate service endpoints and improve the efficiency and accuracy of service endpoint selection. In addition, standardized record format parsing rules enable the client to adapt to energy efficiency resource records returned by different DNS servers, effectively improving resource scheduling efficiency and service quality in energy-as-a-service scenarios.
[0090] In one embodiment of the present disclosure, selecting a target endpoint from a plurality of candidate endpoints based on the parsing result includes:
[0091] The candidate endpoint corresponding to the smallest priority parameter is determined as the target endpoint; if there are at least two smallest priority parameters, energy parameters are extracted from the energy-related information based on the secondary format configured in the record format, and the energy parameters include at least one of energy type, energy efficiency index and power utilization efficiency; the target endpoint is selected based on the energy parameters; if there are at least two smallest priority parameters and the corresponding energy parameters are the same, the target endpoint is selected based on a random shuffling method.
[0092] In some embodiments, parameters such as energy type (such as wind energy, solar energy, electric energy, etc.), energy efficiency index (quantitative evaluation of levels 1-5), and power usage efficiency (data center PUE indicator) are used. When there are multiple candidate endpoints with the minimum priority parameters, it means that the advantages and disadvantages of these endpoints cannot be distinguished from the perspective of priority. At this time, the client further screens based on the energy parameters, and gives priority to endpoints that meet specific needs by comparing indicators such as energy type, energy efficiency index, and power usage efficiency. For example, the endpoint with the highest energy efficiency index is given priority to reduce energy consumption, or the endpoint using clean energy is given priority to meet environmental protection requirements, thereby selecting a better target endpoint from the candidate endpoints with the same priority.
[0093] In some embodiments, random shuffling is a load balancing strategy that randomly disrupts the order of candidate endpoints and randomly selects one of them as the target endpoint. This prevents the client from always selecting the same endpoint, evenly distributes service requests to each endpoint, ensures that each endpoint has a fair chance of being selected, prevents individual endpoints from being overloaded due to excessive use, and improves the overall load balancing and stability of the system.
[0094] In this embodiment, by quickly locking high-priority candidate endpoints based on priority parameters, reducing the selection range, and using energy parameters to perform secondary screening on endpoints with the same priority, the client can select the preferred endpoint based on actual needs (such as energy saving, environmental protection, and high efficiency), thereby improving the energy utilization efficiency and resource adaptability of the service. The random shuffling strategy solves the selection problem in extreme cases (with exactly the same parameters), realizes dynamic and balanced distribution of service requests, avoids excessive load at a single point, and improves service quality and system performance.
[0095] In one embodiment of the present disclosure, an energy efficiency query message is configured based on a target domain name that needs to be resolved, including: the energy efficiency query message includes a question area, and the target domain name is filled into the question name field in the question area to generate an energy efficiency query message.
[0096] In some embodiments, the DNS query message includes multiple areas, including a question area, a header area, an answer area, an authorization area, and an additional area. The question area is used to carry the domain name information that the client actually wants to query, and includes two key fields. The question name (QNAME) is used to store the domain name to be queried, and the question type (QTYPE) is used to specify the resource record type to be queried (such as A, AAAA, MX, etc.).
[0097] In this embodiment, by accurately filling the target domain name into the question area of the energy efficiency query message, using the question area of the DNS protocol as a carrier, the energy efficiency query request is converted into a standard DNS query format, so that the energy efficiency query can be seamlessly integrated into the existing DNS infrastructure without the need for additional deployment of a dedicated query protocol, thereby reducing system integration costs.
[0098] In one embodiment of the present disclosure, energy efficiency resource records are parsed based on the configured record format, and the following steps are also included: the priority parameter is equal to 0, the corresponding domain name information is determined to be an alias target, and the alias target is used to redirect the domain name to query the domain name of the candidate endpoint; the target domain name in the question name field is replaced with the alias target to update the energy efficiency query request, and the updated energy efficiency query request is sent.
[0099] In some embodiments, an alias target is used to implement domain name redirection, allowing one domain name (such as service.example.com) to be mapped to another domain name (such as backend1.datacenter.example.com), thereby indirectly obtaining the real service endpoint.
[0100] In some embodiments, the QNAME field (original target domain name) in the question section of the energy efficiency query message is replaced with an alias target, the updated query request is resent, and the new domain name is recursively resolved.
[0101] In this embodiment, through the alias target and domain name replacement mechanism, the client can automatically identify the alias record with PRIORITY=0, and seamlessly switch the query target to the alias target, forming a recursive query chain until the real service endpoint is found. By reusing the DNS protocol process, transparent switching of back-end services is achieved based on intermediate aliases, building an efficient, flexible and reliable service discovery system for energy-as-a-service scenarios.
[0102] In one embodiment of the present disclosure, it also includes: if the length of the generated alias chain reaches a length threshold based on the number of times the alias target is replaced, the replacement is stopped and an error flag is generated; and / or if a loop is detected in the alias chain based on the replacement history, the replacement is stopped and an error flag is generated.
[0103] In some embodiments, each time a QNAME is replaced with an alias target, a counter is incremented by 1. When the counter reaches a preset length threshold (eg, 5 times), the replacement is stopped and an error flag is generated.
[0104] In some embodiments, the client maintains a replacement history list that records each alias target replacement. Before each replacement, the client checks whether the new alias target already exists in the history list. If so, it is determined to be a loop (e.g., A→B→A), and the replacement is stopped and an error flag is generated.
[0105] In this embodiment, through the length threshold and loop detection mechanism, the client can automatically identify and terminate abnormal alias chains, effectively preventing infinite recursive queries and circular reference problems, improving the stability, security and fault tolerance of the system, and ensuring that the domain name resolution process in the energy-as-a-service scenario is reliable and controllable.
[0106] In one embodiment of the present disclosure, establishing a service connection with a target endpoint includes: extracting an address record of a domain name of a candidate endpoint from energy-related information based on a secondary format, and establishing a service connection with the target endpoint based on the address record.
[0107] In some embodiments, the client extracts address parameters (such as v4addr or v6addr) from the EEPARAMS field according to the secondary format of the energy efficiency resource record, and these parameters directly carry the IP address of the candidate endpoint without additional DNS query.
[0108] In this embodiment, a service connection is established by directly extracting the address record, skipping the traditional DNS address resolution step (such as querying A / AAAA records), and directly using the pre-filled IP address in the energy efficiency record, reducing 1-2 DNS round-trip queries and significantly reducing service discovery latency.
[0109] In one embodiment of the present disclosure, before parsing the energy efficiency resource record based on the configured record format, it also includes: detecting that the energy efficiency resource record includes a DNSSEC record, and performing signature verification on the DNSSEC record, so that when the verification passes, the energy efficiency resource record is parsed based on the configured record format.
[0110] In some embodiments, DNSSEC (Domain Name System Security Extensions) is a security extension mechanism added to DNS, which ensures the integrity and authenticity of domain name resolution results through digital signatures.
[0111] In this embodiment, based on the execution of the DNSSEC verification mechanism, by verifying the RRSIG signature, it is ensured that the energy efficiency resource record has not been tampered with during transmission. Through the trust chain verification (root DNSKEY→DS→DNSKEY), it is confirmed that the response comes from a legitimate authoritative DNS server to prevent man-in-the-middle attacks or phishing attacks. The DNSSEC verification mechanism makes the energy efficiency records cached by the recursive resolver more credible and reduces the risk of cache contamination.
[0112] like Figure 5 As shown, a method for selecting a service endpoint according to another embodiment of the present disclosure is applied to a recursive resolver, including:
[0113] Step S502 : In response to the received energy efficiency query request, extract the target domain name in the energy efficiency query request.
[0114] Step S504: It is detected that the local cache does not have an energy efficiency resource record related to the target domain name, and the energy efficiency query request is fed back to the authoritative server.
[0115] Step S506: receiving the energy efficiency query result fed back by the authoritative server based on the energy efficiency query request.
[0116] In some embodiments, after the recursive resolver receives the energy efficiency query request sent by the client, it extracts the target domain name (QNAME field) from the question section in the request message to determine the specific service that the client wants to query. The recursive resolver checks whether there is an energy efficiency resource record (EE record) related to the target domain name in its own cache. If there is no relevant record in the cache, it means that it cannot provide an answer directly to the client and needs to further query the authoritative server. The authoritative server stores the complete information of the domain name and can provide accurate energy efficiency resource records. After the authoritative server processes the request, it returns a response including the energy efficiency query result to the recursive resolver. The recursive resolver receives the response and prepares for subsequent processing.
[0117] Step S508: If energy efficiency parsing enhancement is supported, the energy efficiency query result is enhanced to obtain an energy efficiency resource record, and the energy efficiency resource record is fed back to the client. The energy efficiency resource record includes multiple candidate endpoints of the service corresponding to the target domain name, so that the client can parse the energy efficiency resource record based on the configured record format, select the target endpoint from the multiple candidate endpoints based on the parsing result, and establish a service connection with the target endpoint.
[0118] In some embodiments, energy efficiency resolution enhancement refers to the ability of a recursive resolver to further process and optimize energy efficiency query results obtained from an authoritative server while supporting specific extended functions.
[0119] In some embodiments, the enhancement process includes but is not limited to the following operations:
[0120] Record integration means that the recursive resolver can integrate multiple related records returned by the authoritative server, for example, associating the EE record with the corresponding A / AAAA record to form a more complete energy efficiency resource record.
[0121] Cache optimization refers to optimizing the cache strategy for energy efficiency query results. For example, it can reasonably set the cache time based on the TTL (Time-To-Live) value of the record, or prioritize caching frequently accessed energy efficiency records to improve the response speed of subsequent queries.
[0122] Preprocessing refers to the preprocessing of data in energy efficiency query results, such as standardizing energy parameters, calculating energy efficiency scores, etc., so that clients can make endpoint selection decisions more conveniently.
[0123] In this embodiment, the energy-efficiency parsing enhancements of the recursive resolver enable intelligent upgrades of the DNS system for energy-aware scenarios. By extracting the target domain name, performing cache checks, request forwarding, and enhancing results, the recursive resolver, acting as an intermediate hub, optimizes the energy-efficiency query process. Furthermore, enhanced processing integrates multi-source data, shortening the client's decision path. By receiving multiple candidate endpoints and energy efficiency parameters from authoritative servers, the client is guided to select the optimal service node, building a trusted infrastructure for energy-as-a-service scenarios.
[0124] In one embodiment of the present disclosure, the energy efficiency query result is enhanced, including:
[0125] The corresponding priority parameter and domain name information are extracted from the energy efficiency query result; the priority parameter is equal to 0, and the domain name information includes multiple alias pattern records, and a loop is executed to randomly select one from the multiple alias pattern records as a new query target to obtain a new energy efficiency query result from the authoritative server until the priority parameter extracted from the new energy efficiency query result is greater than 0 or the number of random selections reaches the chain length threshold.
[0126] In some embodiments, when the recursive resolver finds a record with PRIORITY=0 in the energy efficiency query results obtained from the authoritative server, it indicates that the record is an alias pattern (an intermediate record pointing to other domain names). If there are multiple alias pattern records (i.e., multiple candidate alias targets), the recursive resolver will randomly select one of them as the new query target instead of traversing in a fixed order to prevent excessive load on a single point.
[0127] In some embodiments, when the PRIORITY of the new query result is greater than 0, it indicates that the actual service endpoint has been found and the loop is terminated. If the number of random selections reaches a preset threshold (such as 5 times) and no record with PRIORITY greater than 0 is found, the loop is terminated and an error is returned to prevent infinite recursion.
[0128] In this embodiment, by configuring random alias selection and recursive query control mechanisms, alias targets are randomly selected, and query pressure is evenly distributed to multiple intermediate nodes, preventing performance bottlenecks caused by frequent access to specific aliases. By recursively resolving the alias chain, the client does not need to manually handle multi-level jumps. The recursive resolver automatically completes the mapping from aliases to actual endpoints, accelerating the service discovery process.
[0129] In one embodiment of the present disclosure, the energy efficiency query result is enhanced, further comprising:
[0130] If the priority parameter is greater than 0, the corresponding domain name information is determined to be the domain name of the candidate endpoint; the address record of the domain name of the candidate endpoint is resolved; the address record is merged into the corresponding energy efficiency query result to obtain the energy efficiency resource record.
[0131] In some embodiments, when the PRIORITY extracted by the recursive resolver from the energy efficiency query result is greater than 0, according to the protocol specification, the corresponding ENAME field is determined to be the domain name of the candidate endpoint (i.e., the domain name of the server that can actually provide services), and the recursive resolver initiates an additional DNS query for the candidate endpoint domain name (such as server1.datacenter.example.com) to obtain its corresponding IP address record (such as an A record or an AAAA record). The obtained address record (such as 192.0.2.1) is embedded in the EEPARAMS field of the original EE record (such as adding v4addr=192.0.2.1), or carried through the additional zone (AdditionalSection) of the DNS response to form a complete energy efficiency resource record.
[0132] In this embodiment, the energy efficiency query results are enhanced by a recursive resolver. After identifying a candidate endpoint domain name with a priority parameter greater than 0, its address record is automatically resolved and merged into the energy efficiency query result to form a complete energy efficiency resource record, effectively reducing the query steps of the client.
[0133] In one embodiment of the present disclosure, merging the address record into the corresponding energy efficiency query result includes:
[0134] The energy efficiency query result is configured based on a top-level format, which includes energy-related information. The energy-related information is configured based on a secondary format, which includes a priority parameter, a domain name of a candidate endpoint, and an energy parameter, so as to merge the address record into the corresponding energy efficiency query result.
[0135] In some embodiments, the secondary format includes a priority parameter (PRIORITY), a candidate endpoint domain name (ENAME) and an energy parameter (EEPARAMS). The EEPARAMS field is extended, and a v4addr / v6addr parameter is added to store the IP address. The recursive resolver adds the pre-resolved IP address (such as 192.0.2.1) as a new parameter to EEPARAMS to form structured energy-related information.
[0136] In this embodiment, the secondary format clearly defines the field composition of energy-related information, so that address records can be embedded in energy efficiency query results in the form of standard parameters (such as v4addr), optimizing the energy efficiency-aware service discovery process, reducing client complexity, and improving the overall system performance.
[0137] In one embodiment of the present disclosure, the energy efficiency query result is enhanced, further comprising:
[0138] The energy efficiency query result includes priority parameters and energy parameters of the candidate endpoints, and the candidate endpoints are pre-sorted based on the priority parameters and / or energy parameters.
[0139] In this embodiment, a recursive resolver is used to perform weighted sorting of candidate endpoints based on the priority parameter (PRIORITY) and energy parameters (such as energy efficiency index, energy type) in the energy efficiency query results. For example, endpoints with low priority values and high energy efficiency index are prioritized, which helps reduce the client's computing burden and guides the client to connect to green energy servers first through pre-sorting, thereby promoting sustainable computing goals.
[0140] like Figure 6 As shown, a method for selecting a service endpoint according to another embodiment of the present disclosure is applied to an authoritative server, including:
[0141] Step S602: In response to the received energy efficiency query request, extract the target domain name in the energy efficiency query request.
[0142] Step S604: querying the managed regional database for an energy efficiency query result that matches the target domain name, wherein the energy efficiency query result includes domain name information of multiple candidate endpoints.
[0143] In step S606, the energy efficiency query result is fed back to the recursive parser, so that the recursive parser performs a merge operation based on the energy efficiency query result to obtain an energy efficiency resource record, and feeds back the energy efficiency resource record to the client, so that the client parses the energy efficiency resource record based on the configured record format, selects a target endpoint from multiple candidate endpoints based on the parsing result, and establishes a service connection with the target endpoint.
[0144] In this embodiment, the authoritative server responds to the energy efficiency query request and extracts the target domain name, clarifies the client's needs, and queries the regional database for the energy efficiency query result corresponding to the target domain name. The result includes the domain name information of multiple candidate endpoints, ensuring the provision of diverse selection resources. The query result is fed back to the recursive resolver, which performs a merge operation to generate an energy efficiency resource record. The client parses and selects the target endpoint to establish a connection based on the record. With the help of the resource integration and scheduling of the authoritative server, the provision of multiple candidate endpoints enables the client to select a suitable endpoint based on parameters such as energy efficiency, thereby achieving reasonable allocation of service requests and improving the overall performance and stability of the system.
[0145] In one embodiment of the present disclosure, querying the managed regional database for energy efficiency query results matching the target domain name includes:
[0146] If the target domain name is an alias mode record, the first energy efficiency result in the alias mode is queried, and the priority parameter included in the first energy efficiency result is equal to 0.
[0147] In some embodiments, when the target domain name (eg, service.example.com) is configured as an alias mode record, the authoritative server searches for its corresponding first energy efficiency result in the zone database.
[0148] If the target domain name or other domain name pointed to by the alias pattern record is the actual endpoint, the second energy efficiency result under the query service mode is queried, and the priority parameter included in the second energy efficiency result is greater than 0. The second energy efficiency result also includes energy parameters, and the energy parameters include at least one of energy type, energy efficiency index and power utilization efficiency.
[0149] In some embodiments, if the target domain name is directly configured as a service mode, or the ENAME recorded in the alias mode ultimately points to a service mode domain name, the recorded energy parameters: including et (energy type), eei (energy efficiency index), pue (power usage efficiency), etc., are used for energy efficiency evaluation.
[0150] In this embodiment, the authoritative server guides the recursive resolver to query along the correct path by distinguishing between the naming mode and the service mode, reducing invalid requests. The energy parameters (such as energy efficiency index and energy type) carried in the service mode record enable the client to select an endpoint based on the energy efficiency index.
[0151] In one embodiment of the present disclosure, querying the second energy efficiency result in the service mode includes: querying the regional database for the second energy efficiency result whose energy efficiency value is higher than the energy efficiency threshold based on the energy-related policy.
[0152] In this embodiment, the authoritative server selects service endpoints with energy efficiency values higher than a threshold from the regional database based on preset energy-related strategies (such as giving priority to renewable energy, setting minimum energy efficiency standards, etc.), so as to guide the client to preferentially connect to high-efficiency servers and promote low-carbon operation of the data center.
[0153] In one embodiment of the present disclosure, the method further includes: if a DNSSEC record is configured for the managed zone, adding the DNSSEC record to the energy efficiency query result.
[0154] In this embodiment, a trusted energy-aware service discovery system is constructed by integrating the DNSSEC security mechanism with the energy efficiency query process. When the authoritative server configures DNSSEC records for the management area, security credentials such as digital signatures and public keys are returned along with the energy efficiency query results, enabling the recursive resolver and client to verify the integrity and authenticity of the response.
[0155] In some embodiments, EE resolution is performed on the client side. The resolution process is the process by which the client enumerates and sorts the available endpoints of the service, specifically including:
[0156] In the question section, query the domain name as $QNAME, issue an EE query for $QNAME, and if an EE record with alias mode is returned, set $QNAME to ENAME and loop back to issue an EE query for $QNAME, subject to chain length limits and loop detection heuristics.
[0157] If one or more service mode records are returned, these records represent optional endpoints and the records are sorted in ascending order of priority. Otherwise, EE parsing fails and the list of available endpoints is empty.
[0158] In some embodiments, the DNS server includes an authoritative server and a recursive resolver.
[0159] On the authoritative server side, when replying to an EE query, the authoritative DNS server should return A, AAAA, and EE records in the additional part for any ENAME in the domain. If the domain is signed, the server should also include the DNSSEC records in the additional part, whether or not these records exist.
[0160] On the recursive resolver side, the normal response construction process for unknown resource record types generates the answer portion of the response, regardless of whether the recursive resolver supports EE. If the recursive resolver supports EE, they SHOULD assist the client in performing the resolution process with minimal overall latency by incorporating additional payload information into the additional portion of the response. Specifically, this includes:
[0161] After incorporating the results of the EE resolution, if the recursive resolver's local chain length limit (which may be different from the client's limit) has been reached, then terminate.
[0162] If any resolved EE record is an alias pattern, one of them is randomly selected and EE, A, and AAAA records are resolved for its ENAME.
[0163] If any EE records have been resolved, re-incorporate the results of the EE resolution.
[0164] Otherwise, merge the parsing results of A and AAAA and terminate.
[0165] All resolved EE records are in service mode, resolve A and AAAA queries for each ENAME, merge all results, and terminate.
[0166] In this embodiment, by defining a new DNS resource record and its record format to carry energy-related information of optional endpoints, the client obtains more energy information of the optional endpoints before attempting to establish a connection, thereby helping the client select more environmentally friendly and energy-saving endpoints for connection, realizing the openness of network energy as a service capabilities, and the authoritative server implements energy-aware load balancing and scheduling functions based on energy-related policies.
[0167] Furthermore, the new resource record type enables clients to obtain more energy information about selectable endpoints before attempting to establish a connection, enabling simultaneous domain name resolution and energy parameter transfer. This improves internet connectivity efficiency and energy usage, enhancing internet access quality and user experience. This new resource record type provides a foundation for differentiated energy-saving services on the network.
[0168] Furthermore, it improves the end-to-end perception and transmission of energy in Internet access, provides clients with flexible connection capabilities, realizes energy conservation and emission reduction, and green operation of communication networks, assists carbon emission trading, and enhances carbon financial rights.
[0169] It should be noted that the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of the present invention and are not intended to be limiting. It is readily understood that the processes illustrated in the above figures do not indicate or limit the temporal order of these processes. Furthermore, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0170] Refer to the following Figure 7 The service endpoint selection device 700 according to the embodiment of the present invention will be described. Figure 7 The service endpoint selection device 700 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0171] The service endpoint selection device 700 is implemented as a hardware module. The components of the service endpoint selection device 700 may include, but are not limited to: a configuration module 702 for configuring an energy efficiency query message based on a target domain name to be resolved; a sending module 704 for sending an energy efficiency query request to a DNS server based on the configured energy efficiency query message; a first receiving module 706 for receiving an energy efficiency resource record fed back by the DNS server based on the energy efficiency query request, the energy efficiency resource record including multiple candidate endpoints for the service corresponding to the target domain name; and a parsing module 708 for parsing the energy efficiency resource record based on the configured record format, selecting a target endpoint from the multiple candidate endpoints based on the parsing result, and establishing a service connection with the target endpoint.
[0172] Refer to the following Figure 8 The service endpoint selection device 800 according to the embodiment of the present invention will be described. Figure 8 The service endpoint selection device 800 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0173] The service endpoint selection device 800 is implemented in the form of a hardware module. Components of the service endpoint selection device 800 may include, but are not limited to: a first extraction module 802 for extracting the target domain name in the energy efficiency query request in response to the received energy efficiency query request; a first feedback module 804 for detecting that the local cache does not have an energy efficiency resource record related to the target domain name and feeding back the energy efficiency query request to the authoritative server; a second receiving module 806 for receiving the energy efficiency query result fed back by the authoritative server based on the energy efficiency query request; an enhancement processing module 808 for, if energy efficiency parsing enhancement is supported, performing enhancement processing on the energy efficiency query result to obtain an energy efficiency resource record, and feeding back the energy efficiency resource record to the client, wherein the energy efficiency resource record includes multiple candidate endpoints for the service corresponding to the target domain name, so that the client parses the energy efficiency resource record based on the configured record format, selects a target endpoint from the multiple candidate endpoints based on the parsing result, and establishes a service connection with the target endpoint.
[0174] Refer to the following Figure 9 The service endpoint selection device 900 according to the embodiment of the present invention will be described. Figure 9 The service endpoint selection device 900 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0175] The service endpoint selection device 900 is implemented in the form of a hardware module. Components of the service endpoint selection device 900 may include, but are not limited to: a second extraction module 902 for extracting the target domain name in the energy efficiency query request in response to the received energy efficiency query request; a query module 904 for querying the managed regional database for energy efficiency query results matching the target domain name, wherein the energy efficiency query results include domain name information of multiple candidate endpoints; a second feedback module 906 for feeding back the energy efficiency query results to the recursive resolver, so that the recursive resolver performs a merge operation based on the energy efficiency query results to obtain an energy efficiency resource record, and feeds back the energy efficiency resource record to the client, so that the client parses the energy efficiency resource record based on the configured record format, selects a target endpoint from the multiple candidate endpoints based on the parsing results, and establishes a service connection with the target endpoint.
[0176] Those skilled in the art will appreciate that various aspects of the present invention may be implemented as systems, methods, or program products. Therefore, various aspects of the present invention may be implemented in the following forms: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which may be collectively referred to herein as "circuits," "modules," or "systems."
[0177] Refer to the following Figure 10 The electronic device 1000 according to this embodiment of the present invention is described below. The electronic device 1000 may be a network device or a terminal. Figure 10 The electronic device 1000 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present invention.
[0178] like Figure 10 As shown, electronic device 1000 is implemented as a general-purpose computing device. Components of electronic device 1000 may include, but are not limited to, the aforementioned at least one processing unit 1010, the aforementioned at least one storage unit 1020, and a bus 1030 connecting various system components (including storage unit 1020 and processing unit 1010).
[0179] The storage unit stores program codes, which can be executed by the processing unit 1010, so that the processing unit 1010 performs the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification. For example, the processing unit 1010 can perform the following steps: Figure 2 The described scheme.
[0180] The storage unit 1020 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 10201 and / or a cache memory unit 10202 , and may further include a read-only memory unit (ROM) 10203 .
[0181] The storage unit 1020 may also include a program / utility 10204 having a set (at least one) of program modules 10205, such program modules 10205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0182] Bus 1030 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0183] The electronic device 1000 can also communicate with one or more external devices 1070 (e.g., a keyboard, a pointing device, a Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 1000, and / or any device that enables the electronic device 1000 to communicate with one or more other computing devices (e.g., a router, a modem, etc.). Such communication can occur via an input / output (I / O) interface 1050. Furthermore, the electronic device 1000 can also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via a network adapter 1060. As shown, the network adapter 1060 communicates with other modules of the electronic device 1000 via a bus 1030. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device 1000, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0184] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
[0185] In exemplary embodiments of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above-described methods of this specification is stored. In some possible implementations, various aspects of the present invention may also be implemented in the form of a program product, which includes program code. When the program product is executed on an electronic device, the program code is used to cause the electronic device to perform the steps according to various exemplary embodiments of the present invention described in the "Exemplary Methods" section of this specification.
[0186] According to an embodiment of the present invention, a program product for implementing the above-mentioned method can be a portable compact disc read-only memory (CD-ROM) and include program code, and can be run on an electronic device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0187] The program product may be implemented in any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0188] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0189] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0190] The program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, and the like, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0191] It should be noted that although several modules or units of the device for action execution are mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.
[0192] Furthermore, although the steps of the method of the present disclosure are described in a particular order in the accompanying drawings, this does not require or imply that the steps must be performed in this particular order, or that all steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0193] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
[0194] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the appended claims.
Claims
1. A method for selecting a service endpoint, characterized in that: Applied to the client, including: Configure energy efficiency query messages based on the target domain name that needs to be resolved; Sending an energy efficiency query request to a DNS server based on the configured energy efficiency query message; receiving an energy efficiency resource record fed back by the DNS server based on the energy efficiency query request, wherein the energy efficiency resource record includes a plurality of candidate endpoints for a service corresponding to the target domain name; The energy efficiency resource record is parsed based on the configured record format, so as to select a target endpoint from a plurality of candidate endpoints based on the parsing result, and establish a service connection with the target endpoint.
2. The method for selecting a service endpoint according to claim 1, wherein: Parsing the energy efficiency resource record based on the configured record format includes: extracting energy-related information from the energy efficiency resource record based on a top-level format configured in the record format; extracting the priority parameter and domain name information of the energy efficiency resource record from the energy-related information based on the secondary format configured in the record format; If the priority parameter is greater than 0, it is determined that the corresponding domain name information is the domain name of the candidate endpoint.
3. The method for selecting a service endpoint according to claim 2, wherein: Selecting a target endpoint from the plurality of candidate endpoints based on the parsing result includes: Determine the candidate endpoint corresponding to the smallest priority parameter as the target endpoint; If there are at least two minimum priority parameters, extracting energy parameters from the energy-related information based on the secondary format configured in the record format, the energy parameters including at least one of energy type, energy efficiency index, and power usage efficiency; selecting the target endpoint based on the energy parameter; If there are at least two minimum priority parameters and the corresponding energy parameters are the same, the target endpoint is selected based on a random shuffling method.
4. The method for selecting a service endpoint according to claim 2, wherein: Configure the energy efficiency query message based on the target domain name to be resolved, including: The energy efficiency query message includes a question area, and the target domain name is filled into the question name field in the question area to generate the energy efficiency query message.
5. The method for selecting a service endpoint according to claim 4, wherein: Parsing the energy efficiency resource record based on the configured record format also includes: The priority parameter is equal to 0, and the corresponding domain name information is determined to be an alias target, and the alias target is used to perform domain name redirection to query the domain name of the candidate endpoint; The target domain name in the question name field is replaced with the alias target to update the energy efficiency query request, and the updated energy efficiency query request is sent.
6. The method for selecting a service endpoint according to claim 5, wherein: Also includes: detecting that the length of the generated alias chain reaches a length threshold based on the number of times the alias target is replaced, stopping the replacement and generating an error flag; and / or If a loop is detected in the alias chain based on the replacement history, the replacement is stopped and an error flag is generated.
7. The method for selecting a service endpoint according to claim 2, wherein: Establishing a service connection with the target endpoint, including: An address record of the domain name of the candidate endpoint is extracted from the energy-related information based on the secondary format, so as to establish a service connection with the target endpoint based on the address record.
8. The method for selecting a service endpoint according to claim 1, wherein: Before parsing the energy efficiency resource record based on the configured record format, the method further includes: It is detected that the energy efficiency resource record includes a DNSSEC record, and signature verification is performed on the DNSSEC record. When the verification passes, the energy efficiency resource record is parsed based on a configured record format.
9. A method for selecting a service endpoint, characterized in that: Applies to recursive resolvers, including: In response to the received energy efficiency query request, extracting a target domain name in the energy efficiency query request; detecting that the local cache does not have an energy efficiency resource record related to the target domain name, and feeding back the energy efficiency query request to the authoritative server; receiving an energy efficiency query result fed back by the authoritative server based on the energy efficiency query request; If energy efficiency parsing enhancement is supported, the energy efficiency query result is enhanced to obtain an energy efficiency resource record, and the energy efficiency resource record is fed back to the client. The energy efficiency resource record includes multiple candidate endpoints of the service corresponding to the target domain name, so that the client parses the energy efficiency resource record based on the configured record format, selects the target endpoint from the multiple candidate endpoints based on the parsing result, and establishes a service connection with the target endpoint.
10. The method for selecting a service endpoint according to claim 9, wherein: Performing enhancement processing on the energy efficiency query result, including: Extracting corresponding priority parameters and domain name information from the energy efficiency query result; The priority parameter is equal to 0, and the domain name information includes multiple alias pattern records. A loop is executed to randomly select one from the multiple alias pattern records as a new query target to obtain the new energy efficiency query result from the authoritative server until the priority parameter extracted from the new energy efficiency query result is greater than 0 or the number of random selections reaches a chain length threshold.
11. The method for selecting a service endpoint according to claim 10, wherein: The energy efficiency query result is enhanced, further comprising: If the priority parameter is greater than 0, determining that the corresponding domain name information is the domain name of the candidate endpoint; Resolving the address record of the domain name of the candidate endpoint; The address record is merged into the corresponding energy efficiency query result to obtain the energy efficiency resource record.
12. The method for selecting a service endpoint according to claim 11, wherein: Merging the address record into the corresponding energy efficiency query result includes: The energy efficiency query result is configured based on a top-level format, which includes energy-related information. The energy-related information is configured based on a secondary format, which includes the priority parameter, the domain name of the candidate endpoint and the energy parameter, so as to merge the address record into the corresponding energy efficiency query result.
13. The method for selecting a service endpoint according to claim 9, wherein: The energy efficiency query result is enhanced, further comprising: The energy efficiency query result includes the priority parameters and energy parameters of the candidate endpoints, and the candidate endpoints are pre-sorted based on the priority parameters and / or the energy parameters.
14. A method for selecting a service endpoint, characterized in that: Applicable to authoritative servers, including: In response to the received energy efficiency query request, extracting a target domain name in the energy efficiency query request; Querying the managed regional database for an energy efficiency query result matching the target domain name, wherein the energy efficiency query result includes domain name information of multiple candidate endpoints; The energy efficiency query result is fed back to the recursive parser, so that the recursive parser performs a merging operation based on the energy efficiency query result to obtain an energy efficiency resource record, and the energy efficiency resource record is fed back to the client, so that the client parses the energy efficiency resource record based on the configured record format, selects a target endpoint from the multiple candidate endpoints based on the parsing result, and establishes a service connection with the target endpoint.
15. The method for selecting a service endpoint according to claim 14, wherein: Querying the managed regional database for energy efficiency query results matching the target domain name includes: If the target domain name is an alias mode record, querying a first energy efficiency result in the alias mode, wherein the priority parameter included in the first energy efficiency result is equal to 0; If the target domain name or other domain name pointed to by the alias pattern record is an actual endpoint, the second energy efficiency result under the query service mode is queried, and the priority parameter included in the second energy efficiency result is greater than 0. The second energy efficiency result also includes energy parameters, and the energy parameters include at least one of energy type, energy efficiency index and power utilization efficiency.
16. The method for selecting a service endpoint according to claim 15, wherein: Query the second energy efficiency results in service mode, including: The second energy efficiency result having an energy efficiency value higher than an energy efficiency threshold is searched in the regional database based on the energy-related strategy.
17. The method for selecting a service endpoint according to claim 14, wherein: Also includes: If a DNSSEC record is configured for the managed zone, the DNSSEC record is added to the energy efficiency query result.
18. A device for selecting a service endpoint, characterized in that: Applied to the client, including: A configuration module, used to configure energy efficiency query messages based on target domain names that need to be resolved; A sending module, configured to send an energy efficiency query request to a DNS server based on the configured energy efficiency query message; A first receiving module is configured to receive an energy efficiency resource record fed back by the DNS server based on the energy efficiency query request, wherein the energy efficiency resource record includes a plurality of candidate endpoints of a service corresponding to the target domain name; A parsing module is configured to parse the energy efficiency resource record based on a configured record format, select a target endpoint from a plurality of candidate endpoints based on a parsing result, and establish a service connection with the target endpoint.
19. A device for selecting a service endpoint, characterized in that: Applies to recursive resolvers, including: A first extraction module, configured to extract a target domain name in the energy efficiency query request in response to the received energy efficiency query request; A first feedback module is configured to detect that a local cache does not have an energy efficiency resource record related to the target domain name, and feed back the energy efficiency query request to an authoritative server; A second receiving module is configured to receive an energy efficiency query result fed back by the authoritative server based on the energy efficiency query request; An enhanced processing module is used to perform enhanced processing on the energy efficiency query result if energy efficiency resolution enhancement is supported, obtain an energy efficiency resource record, and feed the energy efficiency resource record back to the client. The energy efficiency resource record includes multiple candidate endpoints of the service corresponding to the target domain name, so that the client can parse the energy efficiency resource record based on the configured record format, select a target endpoint from the multiple candidate endpoints based on the resolution result, and establish a service connection with the target endpoint.
20. A device for selecting a service endpoint, characterized in that: Applicable to authoritative servers, including: A second extraction module is configured to extract a target domain name in the energy efficiency query request in response to the received energy efficiency query request; A query module, configured to query an energy efficiency query result matching the target domain name in a managed regional database, wherein the energy efficiency query result includes domain name information of multiple candidate endpoints; The second feedback module is used to feed back the energy efficiency query result to the recursive parser, so that the recursive parser performs a merging operation based on the energy efficiency query result to obtain an energy efficiency resource record, and feeds back the energy efficiency resource record to the client, so that the client parses the energy efficiency resource record based on the configured record format, selects a target endpoint from the multiple candidate endpoints based on the parsing result, and establishes a service connection with the target endpoint.
21. A terminal device, characterized in that: include: processor; as well as a memory for storing executable instructions of the processor; The processor is configured to execute the service endpoint selection method according to any one of claims 1 to 8 by executing the executable instructions.
22. A network device, characterized in that: include: processor; as well as a memory for storing executable instructions of the processor; The processor is configured to execute the service endpoint selection method according to any one of claims 9 to 17 by executing the executable instructions.
23. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for selecting a service endpoint according to any one of claims 1 to 17 is implemented.
24. A computer program product having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for selecting a service endpoint according to any one of claims 1 to 17 is implemented.