Resource acquisition method and device, equipment and storage medium
By configuring the primary and backup service IP address and domain name for each target area, the problem of long service IP address failure in the prior art is solved, and the rapid switching of backup services is achieved, and the resource acquisition speed and user experience are improved.
Patent Information
- Application Number
- CN202411020540.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-11-22
AI Technical Summary
In the case of service IP address failure, the fault handling method has a long time and poor flexibility, which affects the resource acquisition speed and user experience.
Multiple service configuration methods are adopted to configure the main and backup service IP address and domain name for each target area. When the main service fails, it will automatically switch to the backup service to obtain resources, reducing the failure duration and improving the resource acquisition speed.
It effectively reduces the duration of failure, improves the flexibility of fault handling and resource acquisition speed, and ensures the user experience to quickly obtain resources.
Smart Images

Figure CN119011373A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer network technology, and in particular to a resource acquisition method, device, equipment and storage medium. Background Art
[0002] With the continuous development of Internet technology, obtaining resources through the Internet has become the main way for people to obtain resources. Users can use terminals to access corresponding Internet services through IP addresses to obtain corresponding resources.
[0003] When obtaining resources through IP addresses, if the corresponding service IP address fails, that is, it is impossible to access the Internet through a normal network connection, for this type of service IP failure, the faulty IP address of the resource sender is usually removed, and the cache of the resource receiver expires, and then a new service IP address is assigned to the resource sender, or other network services are relied on to solve the failure, so that users can resume normal Internet access to obtain resources or access various online services. However, this type of fault handling method has a relatively long fault duration and poor flexibility, which affects the resource acquisition speed and user experience. Summary of the invention
[0004] In order to solve the above technical problems, the embodiments of the present disclosure provide a resource acquisition method, apparatus, device and storage medium.
[0005] In a first aspect, an embodiment of the present disclosure provides a resource acquisition method, including:
[0006] Obtain resource assessment results for the target area, which include complete resources for all users to be served in the target area;
[0007] Determine, according to the configuration information of the target area and the resource evaluation result, resources allocated to the multiple groups of services in the target area; wherein the multiple groups of services include a first group of services and at least one second group of services, the resources of the first group of services are complete resources, and the resources of the at least one second group of services are resources involved in at least part of the users to be served;
[0008] Configuring identifiers for the first group of services and at least one second group of services; wherein the identifiers are used to establish a connection relationship with a target object of a target resource in the complete resource to be obtained;
[0009] In response to a resource acquisition request for a target resource sent by a target object, an identifier of the first group of services or an identifier of the second group of services is determined as a target identifier, and the target resource is acquired from resources allocated to the target group service based on the target identifier, wherein the target group service is configured with a target identifier.
[0010] Optionally, the identifier of the first group of services includes an IP address of a primary service and / or a domain name of a primary service, and the identifier of at least one second group of services includes an IP address of a backup service and / or a domain name of a backup service.
[0011] Optionally, the configuration information includes relevant information of at least one configurable resource for the second group of services, and determining the resources allocated to the multiple groups of services in the target area according to the configuration information of the target area and the resource evaluation result includes:
[0012] Allocate full resources to the first group of services so that the first group of services has resources to serve all users to be served;
[0013] According to the resource evaluation result, determine the configurable resources that meet the relevant information of each second group of services in the complete resources;
[0014] The backup resources of the configurable resources are allocated to each second group of services, so that each second group of services has resources capable of serving at least part of the users.
[0015] Optionally, the identifier includes an IP address and a domain name, and determining the identifier of the first group of services or the identifier of the second group of services as the target identifier includes:
[0016] Generate a parsing request based on the resource acquisition request;
[0017] using the identifier of the first group of services and the identifier of the target second group of services corresponding to the resolution request in at least one of the second group of services as a plurality of candidate identifiers;
[0018] Resolving domain names in the plurality of candidate identifiers into IP addresses to obtain a plurality of candidate IP addresses;
[0019] A target IP address is determined among a plurality of candidate IP addresses, and the target IP address is determined as a target identifier.
[0020] Optionally, a target IP address is determined from multiple candidate IP addresses, including:
[0021] Get the IP address status of multiple candidate IP addresses;
[0022] If the IP address of the first group of services is in a normal state among the multiple candidate IP addresses, the IP address of the first group of services is determined as the target IP address; or,
[0023] When the IP address of the first group of services is in a fault state, the IP address of the target second group of services from multiple candidate IP addresses is determined as the target IP address; wherein the fault state means that resources cannot be obtained based on the IP address.
[0024] Optionally, after determining the IP address of the first group of services as the target IP address, obtaining the target resource from the resources allocated to the target group of services based on the target identifier includes:
[0025] Get the target resource from the complete resource based on the target IP address;
[0026] In the process of acquiring the target resource, if it is determined that the target IP address is converted from a normal state to a fault state, the IP address of the target second group of services is determined as the target IP address to continue acquiring the target resource through the target IP address.
[0027] Optionally, determining that the target IP address is converted from a normal state to a fault state includes:
[0028] Counting the resource acquisition time for starting to acquire the target resource based on the target IP address, and before successfully acquiring the target resource, if the resource acquisition time is greater than the timeout time, determining that the target IP address is converted from a normal state to a fault state; and / or,
[0029] If notification information of a target resource acquisition failure is received, it is determined that the target IP address is converted from a normal state to a fault state.
[0030] Optionally, a target IP address is determined from multiple candidate IP addresses, including:
[0031] Setting the priority of each candidate IP address among the multiple candidate IP addresses, and sorting the multiple candidate IP addresses according to the priority; wherein the priority of the IP address of the first group of services is higher than the IP address of the target second group of services;
[0032] A target IP address is determined from the sorted multiple candidate IP addresses.
[0033] In a second aspect, an embodiment of the present disclosure provides a resource acquisition device, including:
[0034] A first acquisition unit is used to acquire a resource evaluation result of a target area, where the resource evaluation result includes complete resources involved in all users to be served in the target area;
[0035] A resource allocation unit, configured to determine resources allocated to multiple groups of services in the target area according to the configuration information of the target area and the resource evaluation result; wherein the multiple groups of services include a first group of services and at least one second group of services, the resources of the first group of services are complete resources, and the resources of the at least one second group of services are resources involved in at least part of the users to be served;
[0036] An identifier configuration unit, used to configure identifiers for the first group of services and at least one second group of services; wherein the identifier is used to establish a connection relationship with a target object of a target resource in the complete resource to be acquired;
[0037] The second acquisition unit, in response to a resource acquisition request for a target resource sent by a target object, determines the identifier of the first group of services or the identifier of the second group of services as a target identifier, and acquires the target resource from the resources allocated to the target group service based on the target identifier to return the target object, wherein the target group service is configured with a target identifier.
[0038] In a third aspect, an embodiment of the present disclosure provides an electronic device, including:
[0039] Memory;
[0040] Processor; and
[0041] Computer programs;
[0042] The computer program is stored in the memory and is configured to be executed by the processor to implement the resource acquisition method as described above.
[0043] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the resource acquisition method as described above are implemented.
[0044] The resource acquisition method provided by the present disclosure includes: obtaining a resource evaluation result of a target area, the resource evaluation result includes complete resources related to all users to be served in the target area; determining resources allocated to multiple groups of services in the target area according to configuration information of the target area and the resource evaluation result; wherein the multiple groups of services include a first group of services as main services and at least one second group of services as backup services, the resources of the first group of services are complete resources, which can be understood as main resources, and the resources of at least one second group of services are resources related to at least part of the users to be served, which can be understood as backup resources, and the backup resources are obtained by backing up the main resources, that is, each group of services has corresponding dedicated resources; configuring identifiers for the first group of services and at least one second group of services; wherein the identifiers are used to establish a connection relationship with a target object of a target resource in the complete resources to be acquired; in response to a resource acquisition request for the target resource sent by the target object, determining an identifier of the first group of services or an identifier of the second group of services as a target identifier, and acquiring the target resource from the resources allocated to the target group of services based on the target identifier, wherein the target group of services is configured with a target identifier. The method provided in the present application configures primary and backup service IPs for multiple groups of services configured for each target area. When the primary service IP fails, the backup service IP can be used to continue to obtain resources, which effectively reduces the duration of the failure, improves the flexibility of fault handling and the speed of resource acquisition, and allocates separate backup resources to each group of services, which further improves the resource acquisition efficiency and ensures the user experience of fast resource acquisition. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0047] Figure 1 A schematic diagram of the structure of a resource acquisition system provided in an embodiment of the present disclosure;
[0048] Figure 2 A schematic diagram of a process for obtaining resources provided by an embodiment of the present disclosure;
[0049] Figure 3 A schematic diagram of a resource acquisition method based on a DNS system provided in an embodiment of the present disclosure;
[0050] Figure 4 A schematic diagram of the structure of a resource acquisition device provided in an embodiment of the present disclosure;
[0051] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0052] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0053] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0054] Specifically, a domain name server (DNS) is an important part of Internet technology, which is used to resolve domain names into corresponding IP addresses. For example, when a user enters a domain name for a business service, the computer needs to convert the domain name into a corresponding IP address through the DNS system in order to establish a network connection and use the business service to obtain resources. Based on the DNS system, the DNS function is implemented using the HTTP / HTTPS protocol to obtain an HTTPDNS system. The HTTPDNS system means that after the browser obtains the IP corresponding to the domain name, the browser will convert the input domain name into an HTTP service request. At present, each area in the HTTPDNS system is mostly configured with a set of service IP addresses or service domain names (Domain Name). When the service IP address is used to obtain resources in the DNS system, if the service IP address fails, the HTTPDNS Server end (sending end) of the DNS system usually removes the faulty IP address, waits for the cache of the HTTPDNS Client end (receiving end) of the DNS system to expire, and then re-obtains the service IP address to recover from the failure and obtain resources again. However, in this case, the failure duration will reach more than 10 minutes, and the failure time is relatively long, which affects the efficiency of resource acquisition. In addition, when using a content delivery network (CDN) to obtain resources, it is necessary to configure the resource record type (Canonical Name, CNAME) to point the input domain name to the CDN, and then resolve the domain name into an IP address through the DNS system. However, if the DNS fault handling method is not considered, if the CDN fails, the CDN cannot be monitored and the fault condition cannot be determined. The fault duration also depends on the CDN fault duration, resulting in uncontrollable fault recovery time.
[0055] In response to the above technical problems, the embodiments of the present disclosure provide a resource acquisition method, which configures multiple groups of services for each area, and configures resources that can serve at least some users for each group of services. The multiple groups of services include a first group of services as primary services and a second group of services as backup services. IP addresses and / or domain names are configured for the primary service and at least one backup service. In the event of a failure in the primary service IP address, the client does not need to wait for the cache to expire and reallocate the service IP, and can directly use the backup resources (backup resources) based on the backup service IP address to continue to acquire resources. When using CDN to acquire resources, if a CDN fails, there is no need to rely on the CDN failure duration, and the backup CDN domain name can be directly switched to acquire resources, thereby reducing resource waste, ensuring service quality, improving resource acquisition speed, reducing failure duration, and avoiding users from perceiving failures, achieving imperceptible failures, and effectively improving user experience. This is described in detail through one or more of the following embodiments.
[0056] The resource acquisition method provided in the embodiment of the present disclosure can be applied to the resource acquisition scenario of the service IP failure. The method can be executed by a resource acquisition device, which can be implemented by software and / or hardware, and the device can be integrated in an electronic device. Among them, the electronic device can include but is not limited to mobile terminals such as smart phones, laptops, digital broadcast receivers, personal digital assistants (Personal Digital Assistant, PDA), tablet computers (Tablet Personal Computer, Tablet PC), PMP (portable multimedia player), vehicle terminals (such as vehicle navigation terminals), wearable devices, etc., and fixed terminals such as digital televisions, desktop computers, smart home devices, etc.
[0057] Figure 1 A structural diagram of a resource acquisition system provided for an embodiment of the present disclosure, wherein the resource acquisition system is constructed based on an HTTPDNS system, and comprises a configuration module, a sending end, a network module, a client, and a resource module. The configuration module is used to configure resources for multiple groups of services according to resource evaluation results, wherein the multiple groups of services include a primary service and at least one backup service. The configuration module is also used to determine the IP address or domain name of each group of services to generate a configuration file. The sending end can be understood as an HTTPDNS Server end, which is used to configure an IP address or domain name for each group of services based on the configuration file. The network model can be understood as an HTTPDNS Client end, which is used to receive a resource acquisition request sent by a client, and request the HTTPDNS Server end to obtain the primary service IP address and the backup service IP address as well as the primary resources and the backup resources, and obtain the resource requested by the client from the corresponding primary resource or backup resource in the resource module based on the primary service IP address or the backup service IP address and return the resource to the client.
[0058] Figure 2 A schematic diagram of a resource acquisition method provided in an embodiment of the present disclosure, specifically including the following steps: Figure 2 The following steps are shown:
[0059] S201. Obtain resource assessment results for the target area.
[0060] The resource assessment results include the complete resources involved in all users to be served in the target area.
[0061] It is understandable that the domain name resolution server is planned with multiple areas, and the multiple areas can be planned based on regions and operators. For example, the multiple areas include area A in area A where operator A provides Internet services and area B where operator B provides Internet services. The multiple areas include the target area. Resource evaluation is performed on all users to be served in the target area to generate resource evaluation results. The specific resource evaluation method is not limited. The resource evaluation results include resource information related to each user to be served and complete resources related to all users, where the resource information includes information such as resource type, resource quantity and resource format.
[0062] S202: Determine resources allocated to multiple groups of services in the target area according to the configuration information of the target area and the resource evaluation result.
[0063] The multiple groups of services include a first group of services and at least one second group of services, the resources of the first group of services are complete resources, and the resources of the at least one second group of services are resources involved in at least part of the users to be served.
[0064] It is understandable that the types of multiple groups of services include a first type of service for domain name resolution, a second type of service for network distribution, and a third type of service for data processing. Other possible service types are not limited, for example, services for network security monitoring.
[0065] The configuration information includes relevant information of at least one second group of service configurable resources.
[0066] It is understandable that, based on the above S201, multiple groups of services are configured for the target area, and the multiple groups of services include a first group of services and a second group of services. The first group of services can be understood as the main service, and the first group of services covers all network services in the target area. The second group of services can be understood as a backup service, and the second group of services can be understood as covering at least part of the network services. The second group of services and the first group of services can be the same, that is, the second group of services can also cover all network services in the target area, or a combination of multiple second groups of services can cover all network services, and can also be understood as multiple groups of services including a first group of main services and at least one second group of backup services. The configuration information of the target area is obtained, and the configuration information includes information such as relevant information of configurable resources of each second group of services, network services covered by each second group of services, and weight coefficients of connection relationships that can be established for each second group of services. After obtaining the configuration information, prepare complete resources that can serve all users, and determine the resources allocated to each group of services based on the configuration information and resource evaluation results, where complete resources / all resources are allocated to the first group of services so that the first group of services can serve all users to be served. Complete resources refer to resources involved in all users to be served. At least part of the resources are allocated to the second group of services so that the second group of services can continue to serve at least part of the users to be served when the IP of the first group of services is unavailable. The resources allocated to each second group of services may be different. In one possible scenario, 1 first group of services and 2 second group of services are configured for the target area, complete resources are prepared for the first group of services, complete resources are prepared for the second group of services 1, and partial resources are prepared for the second group of services 2.
[0067] Optionally, the above-mentioned determining the resources allocated to the multiple groups of services in the target area according to the configuration information of the target area and the resource evaluation result can be specifically implemented by the following steps:
[0068] Allocate complete resources to the first group of services so that the first group of services has resources that can serve all users to be served; determine configurable resources that meet the relevant information of each second group of services in the complete resources based on the resource evaluation results; allocate backup resources of the configurable resources to each second group of services so that each second group of services has resources that can serve at least some of the users.
[0069] It is understandable that the specific configuration rules are: configure complete resources for the first group of services, and configure matching at least partial complete resources for each second group of resources. Specifically, according to the resource information in the resource evaluation result, determine the configurable resources that are consistent / matched with the relevant information of the second group of services in the complete resources. The configurable resources may be complete resources or partial resources. Subsequently, the backup resources of the configurable resources are allocated to the corresponding second group of services, that is, resources are re-prepared for the second group of services, wherein each group of services is individually allocated with dedicated resources, and resources between different groups of services are not shared. For example, the first group of services corresponds to the main resources, and the second group of services corresponds to the backup resources obtained by backing up the main resources.
[0070] S203: Configure identifiers for the first group of services and at least one second group of services.
[0071] The identifier includes an IP address and a domain name, and the identifier is used to establish a connection relationship with a target object of a target resource in the complete resource to be obtained.
[0072] It can be understood that on the basis of the above S202, identifiers are configured for the first group of services and all the second group of services. The identifiers are used to establish a connection relationship with other resource objects. Other resource objects may refer to Internet applications (application, APP). Other resource objects include target objects. The target object needs to establish a connection relationship with a group of services in the target area through the identifier in order to obtain the target resources from the complete resources in the target area.
[0073] The identifier of the first group of services includes the IP address of the primary service and / or the domain name of the primary service, and the identifier of at least one second group of services includes the IP address of the backup service and / or the domain name of the backup service.
[0074] It is understandable that the identifier can be an IP address and a domain name. The identifier of the first group of services can be the IP address of the primary service or the primary commercial CDN domain name. The identifier of the second group of services includes the IP address of the backup service and / or the backup commercial CDN domain name. The primary service IP and the backup service IP can be understood as the IP of the target area divided by region and operator based on the DNS system. In one possible case, the identifiers of multiple groups of services include the primary service IP, the backup service IP, the backup service domain name and the backup commercial CDN domain name. Other possible identifiers of the second group of services can be determined by the user according to the needs of the user.
[0075] S204: In response to a resource acquisition request for a target resource sent by the target object, determine an identifier of the first group of services or an identifier of the second group of services as a target identifier, and acquire the target resource from resources allocated to the target group of services based on the target identifier.
[0076] Among them, the target group service is configured with a target identifier.
[0077] Optionally, determining the identifier of the first group of services or the identifier of the second group of services as the target identifier, and obtaining the target resources from the resources allocated to the target group of services based on the target identifier, includes: in the event of a failure of the identifier of the first group of services, obtaining the target resources from the backup resources based on the identifier of the second group of services.
[0078] It is understandable that, based on the above S203, the target object generates a resource acquisition request, which can be a download request for the target resource. In response to the resource acquisition request, the identifier of the first group of services or the identifier of a second group of services is determined as the target identifier. For example, when the identifier of the first group of services is not faulty, the identifier of the first group of services is directly determined as the target identifier, that is, the main service IP that is not faulty is used as the target IP, or, when the identifier of the first group of services is faulty, the identifier of a second group of services is determined as the target identifier, that is, when the main service IP fails, the backup service IP is used as the target IP. After determining the target identifier, the target resource is obtained from the resource allocated to the target group service based on the target identifier. The target group service refers to a group of services to which the target identifier is allocated. Based on the above example, if the main service IP is the target IP, the resource is obtained from the main resource, or, if the backup service IP is the target IP, the resource is obtained from the backup service. After obtaining the target resource, the target resource is returned to the target object.
[0079] It is understandable that in response to the resource acquisition request, the HTTPDNS Server will push the identifier of the first group of services, the identifier of at least one second group of services, the primary resources and the backup resources of each second group of services to the HTTPDNS Client, so that the HTTPDNS Client can use the backup resources in case the primary service IP fails. The backup resources are standby resources.
[0080] Optionally, determining the identifier of the first group of services or the identifier of the second group of services as the target identifier may be specifically implemented through the following steps:
[0081] Generate a resolution request according to a resource acquisition request; use an identifier of the first group of services and an identifier of a target second group of services corresponding to the resolution request in at least one second group of services as multiple candidate identifiers; resolve the domain names in the multiple candidate identifiers into IP addresses to obtain multiple candidate IP addresses; determine a target IP address from the multiple candidate IP addresses, and determine the target IP address as the target identifier.
[0082] It is understandable that, in response to the resource acquisition request, a resolution request is generated, and the resolution request is used to obtain multiple IP addresses after resolving the domain names of multiple groups of services into IP addresses. Subsequently, the identifier of the first group of services and the identifier of the target second group of services corresponding to the resolution request in at least one second group of services are used as multiple candidate identifiers, wherein the resource acquisition request includes relevant information of the target resource, such as the relevant information including the resource type and the number of resources, etc., and the matching target second group of services is selected from at least one second group of services according to the relevant information. For example, there are at least some resources matching the resource type and / or resource quantity of the target resource in the backup resources allocated to the target second group of services. In this case, the identifier of the target second group of services is determined as a candidate identifier, and the number of target second group services is not limited. The final target second group of services can also be further determined from the matched multiple target second group services according to the weight coefficient of each target second group of services. After determining multiple candidate identifiers, the domain names in the multiple candidate identifiers are resolved into IP addresses to obtain multiple candidate IP addresses, such as resolving the above-mentioned backup commercial CDN domain name into an IP address, that is, the issued primary and backup identifiers are in the form of IP addresses. After obtaining multiple candidate IP addresses, determine the target IP address from the multiple candidate IP addresses, and determine the target IP address as the target identifier. The steps for determining the target IP address are as follows.
[0083] Optionally, the above-mentioned determination of the target IP address from multiple candidate IP addresses can be specifically implemented through the following steps:
[0084] Obtain the IP address status of multiple candidate IP addresses; when the IP address of the first group of services among the multiple candidate IP addresses is in a normal state, determine the IP address of the first group of services as the target IP address; or, when the IP address of the first group of services is in a fault state, determine the IP address of the target second group of services among the multiple candidate IP addresses as the target IP address; wherein the fault state means that resources cannot be obtained based on the IP address.
[0085] It is understandable that the IP address status of each candidate IP address is obtained, and when the IP address of the first group of services is in a normal state, the IP address of the first group of services is determined as the target IP address. The normal state means that the first group of services can be accessed and resources can be obtained through the IP address. Alternatively, when the IP address of the first group of services is in a faulty state, that is, the main service IP fails, the IP address of the target second group of services in a normal state is determined as the target IP address, that is, the backup service IP is used. Among them, the faulty state means that resources cannot be obtained based on the IP address. For example, if the resource download fails, excluding other network signal failures, the IP address is very likely to be faulty.
[0086] Optionally, after determining the IP address of the first group of services as the target IP address, obtaining the target resource from the resources allocated to the target group of services based on the target identifier may be specifically implemented through the following steps:
[0087] The target resource is obtained from the complete resource based on the target IP address; in the process of obtaining the target resource, if it is determined that the target IP address is converted from a normal state to a fault state, the IP address of the target second group of services is determined as the target IP address to continue to obtain the target resource through the target IP address.
[0088] It is understandable that after the IP address of the first group of services in a normal state is determined as the target IP address, the target resource is obtained from the complete resources allocated to the first group of services based on the target IP address. In the process of obtaining the target resource, if the target IP address is converted from a normal state to a faulty state, that is, in the process of obtaining resources based on the main service IP, the main service IP fails, in this case, the IP address of the target second group of services in a normal state is determined as the target IP address to obtain the target resource in the backup resource. For example, the resource can be re-acquired in the backup resource, and the resource downloaded from the main resource (the acquired resource) can be deleted, wherein the backup resource is obtained by backing up at least part of the main resource, and for the same resource, it is the same in the main resource and the backup resource. In this case, the remaining resources can also be obtained from the backup resource based on the acquired resources.
[0089] Optionally, the above determination that the target IP address is converted from a normal state to a fault state may be implemented by the following steps:
[0090] The resource acquisition time for starting to acquire the target resource based on the target IP address is counted. Before successfully acquiring the target resource, if the resource acquisition time is greater than the timeout time, it is determined that the target IP address has been converted from a normal state to a faulty state; and / or, if a notification message of a failure to acquire the target resource is received, it is determined that the target IP address has been converted from a normal state to a faulty state.
[0091] Understandably, when the target resource is acquired from the complete resource, the resource acquisition time is counted in real time, and the resource acquisition time can be understood as the resource download time or the resource loading time. After determining the resource acquisition time, it is determined whether the target resource has been successfully acquired. If the target resource is not successfully acquired, it is determined whether the resource acquisition time is greater than the predefined timeout time, wherein the timeout time can be set at the HTTPDNS Client end, preferably, the timeout time is set to 2-5s, and if the resource acquisition time is greater than the timeout time, it is determined that the target IP address is converted from a normal state to a fault state, wherein the unsuccessful acquisition indicates that all resources have not been acquired, or that it is still in the process of acquiring resources. If the target resource is successfully acquired, it can be determined that the target IP address has not failed. If it is not successfully acquired, and the resource acquisition time is less than the timeout time, the state of the target IP address is undetermined, and it may be in a normal state or in a fault state. In this case, the resource acquisition time is continued to be counted until the resource is successfully acquired or the resource acquisition time is greater than the timeout time, or the user's switching request can be responded to, and the IP address of the backup service is switched to continue to acquire resources.
[0092] Optionally, the above-mentioned determination of the target IP address from multiple candidate IP addresses can be specifically implemented through the following steps:
[0093] The priority of each candidate IP address among the multiple candidate IP addresses is set, and the multiple candidate IP addresses are sorted according to the priority; wherein the priority of the IP address of the first group of services is higher than the IP address of the target second group of services; and the target IP address is determined among the sorted multiple candidate IP addresses.
[0094] Understandably, the weight coefficient of the second group of services in the configuration information is obtained, and according to the weight coefficient, the priority of the candidate IP address corresponding to each target second group of services in the multiple candidate IP addresses is set, and the priority of the IP address of the first group of services is set to the highest level, that is, the priority of the IP address of the first group of services is higher than the priority of the IP address of each target second group of services, and the priority of the IP addresses of other target second groups of services is determined according to their respective weight coefficients. Specifically, the priority of the IP address of the second group of services can be determined according to the number of services, service priority, and / or the resource type and resource quantity of the second group of services. After determining the priority of each IP address, the multiple candidate IP addresses are sorted according to the priority to obtain the sorted multiple candidate IP addresses. Subsequently, the target IP address is determined in the sorted multiple candidate IP addresses. The specific method of determining the IP address is referred to the above embodiment, which will not be repeated here. In the case of a failure of the main service IP, the target IP can be determined according to the priority of the backup service IP, and other possible IP address sorting methods will not be repeated here.
[0095] The disclosed embodiment provides a resource acquisition method, which configures multiple groups of service IPs or commercial CDN domain names in the HTTPDNS system at the same time, that is, configures the primary and backup IPs. In daily services, all applications can use the primary service IP or the primary commercial CDN for downloading. When the primary service IP or the primary commercial CDN fails, it automatically switches to the backup service IP or the backup commercial CDN for downloading, thereby avoiding waste of resources, reducing failure time, and making users who download resources through applications unaware of the failure. In addition, in the case of business cooperation with multiple commercial CDNs, it is also possible to configure a group of primary service IPs and multiple groups of backup service IPs, such as configuring multiple groups of backup commercial CDNs, and allocating backup resources to each group of backup commercial CDNs, so as to maximize the stability of the service and realize multiple groups of backup resource scenarios.
[0096] Based on the above embodiments, Figure 3 A schematic diagram of a resource acquisition method based on a DNS system provided in an embodiment of the present disclosure, specifically including the following steps: Figure 3 The following steps are shown:
[0097] (1) Resource evaluation: The administrator evaluates the resources involved in all users in the target area, generates resource evaluation results, and prepares complete resources that can serve all users; (2) Configuration plan design: The administrator determines the main service IP and / or main commercial CDN domain name and at least one backup service IP or backup commercial CDN domain name for each area; (3) Primary and backup configuration: The administrator configures the main service and at least one backup service IP or domain name for each area in the HTTPDNS management system according to the configuration plan; (4) The HTTPDNS system generates a configuration file and pushes the configuration file to multiple HTTPDNS servers in the online HTTPDNS service system; (5) The APP sends a download request for the target resource to the network model (HTTPDNS Client); (6) The network module responds to the request to the HTTPDNS The server sends a resolution request to obtain the primary service IP or primary commercial CDN domain name, at least one backup service IP and / or backup commercial CDN domain name, and primary resources and backup resources; (7) the network module downloads the target resource from the primary resource; (8) if the target resource is downloaded successfully, the target resource is returned to the APP; (9) if the target resource download fails or the primary service IP fails, the backup service IP or backup commercial CDN continues to be used to download the target resource from the backup resource. If the download using the backup resource is successful, the download data is returned to the APP.
[0098] An embodiment specifically refers to an application scenario in which a failure occurs when obtaining resources based on an IP address resolved by a DNS server. In the above case, when corresponding resources and identifiers are configured for multiple groups of services in the target area, when a user uses a target terminal to open a web page through a network address, it is necessary to perform domain name resolution processing on the network address. Specifically, a correspondence between an IP address and a domain name is pre-set in the DNS server. For example, there is a correspondence between an IP address (222.1111.3.44) and a domain name (www.aaa.com). The user enters the network address of a website, such as www.aaa.com, in the address bar of the browser. After the input is completed, the user clicks the confirmation button to trigger the target terminal to obtain the network address in the address bar and send it to the DNS server. The DNS server stores the correspondence between the network address and the IP address. After receiving the network address, the DNS server searches in the above correspondence. If the network address is not found, the network address is sent to the next-level DNS server to continue searching. In one possible scenario, multiple IP addresses of web pages are pre-set, and the multiple IP addresses include a primary IP address and at least one backup IP address, and each IP address is allocated at least part of the resources of the website. This method of allocating resources to each IP address can avoid the problem of download failure caused by the inability to download resources. Specifically: after finding multiple IP addresses corresponding to the network address in the upper-level DNS server, the upper-level DNS server is determined as the target DNS server, and the target IP address is determined from the multiple IP addresses. Subsequently, the target DNS server sends the obtained target IP address to the target terminal, and the target terminal sends a web resource acquisition request to the server of the website through the target IP address. The target IP address refers to the server that receives the request to obtain the web resource. The server sends the corresponding target resource to the target terminal, and the target resource is obtained from at least part of the resources pre-allocated to the target IP address. During the resource acquisition process, if the target resource download fails, the target resource download times out, the IP address is inaccessible, the IP address is set incorrectly and / or the network environment changes, in this case, the backup IP address among the multiple IP addresses corresponding to the network address in the target DNS server is used as the target IP address and resent to the target terminal. The target terminal continues to download resources through the backup IP address. The complete target resource can be re-downloaded, or the download can be continued based on the downloaded resources.In another possible scenario, multiple IP addresses of DNS servers are pre-set, and the multiple IP addresses include the IP address of the primary DNS server and the IP address of at least one backup DNS server. The IP address of each DNS server is pre-allocated with resources, and the resources can be the correspondence between the domain name and the IP address. In the process of performing domain name resolution processing on the network address by the above method, if the DNS server fails, for example, the DNS server stops working, that is, the DNS resolution service is unavailable, then the target terminal will not be able to obtain the IP address corresponding to the network address of the web page. In this case, the target IP address is determined from the IP address of at least one backup DNS server, and the IP address corresponding to the network address is queried from the IP address of the backup DNS server, that is, domain name resolution is performed based on the IP address of the backup DNS server. This method can flexibly complete domain name resolution and ensure the availability of the service. The subsequent process of the target terminal obtaining resources will not be described in detail. In another possible scenario, multiple IP addresses of DNS servers and multiple IP addresses of web pages are pre-set. The specific implementation process refers to the above embodiment and will not be described here.
[0099] Another embodiment specifically refers to an application scenario where a failure occurs when accessing a web page through a CDN service. In the case where corresponding resources and identifiers are configured for multiple groups of services in the target area, when a user uses a target terminal to access a web page that joins the CDN service through a network address, the DNS server is first used to perform domain name resolution to determine the CDN node closest to the user. The DNS server associates the IP address of the CDN node with the domain name mapping, and the DNS server returns the IP address of the best CDN node, so that the user can access the web page nearby to obtain resources. If the CDN fails, for example, node failure, network congestion, DNS resolution problem, configuration error, etc., the existing technology is mostly to check the node status, optimize the network routing, adjust the configuration parameters and other measures, but in this case, it can only wait for the DNS failure to be resolved, depending on the DNS failure duration. For this problem, the present application pre-sets multiple CDN service IP addresses, and the multiple CDN service IP addresses include the IP address of the main CDN service and at least one backup CDN service IP address, and each CDN service IP address is pre-allocated with resources. In the case of a main CDN failure, switch to the backup CDN and obtain the target resource requested by the user from at least part of the resources allocated to the backup CDN.
[0100] In another embodiment, multiple DNS server IP addresses and / or domain names, multiple web page IP addresses and / or domain names, and multiple CDN service IP addresses and / or domain names are pre-set, and each IP address and / or domain name is allocated the resources required for its service. The specific implementation process is shown in the above embodiment and will not be described in detail here.
[0101] Figure 4 The resource acquisition device provided in the embodiment of the present disclosure can execute the processing flow provided in the resource acquisition method embodiment, such as Figure 4 As shown, the resource acquisition device 400 includes a first acquisition unit 401, a resource allocation unit 402, an identifier configuration unit 403 and a second acquisition unit 404, wherein:
[0102] The first acquisition unit 401 is used to acquire a resource evaluation result of a target area, where the resource evaluation result includes complete resources involved in all users to be served in the target area;
[0103] The resource allocation unit 402 is used to determine the resources allocated to the multiple groups of services in the target area according to the configuration information of the target area and the resource evaluation result; wherein the multiple groups of services include a first group of services and at least one second group of services, the resources of the first group of services are complete resources, and the resources of the at least one second group of services are resources involved in at least part of the users to be served;
[0104] The identifier configuration unit 403 is used to configure identifiers for the first group of services and at least one second group of services; wherein the identifier is used to establish a connection relationship with a target object of a target resource in the complete resource to be acquired;
[0105] The second acquisition unit 404 is used to determine the identifier of the first group of services or the identifier of the second group of services as the target identifier in response to a resource acquisition request for the target resource sent by the target object, and acquire the target resource from the resources allocated to the target group service based on the target identifier to return the target object, wherein the target group service is configured with a target identifier.
[0106] Optionally, the identifier of the first group of services includes an IP address of a primary service and / or a domain name of a primary service, and the identifier of at least one second group of services includes an IP address of a backup service and / or a domain name of a backup service.
[0107] Optionally, the configuration information includes relevant information of at least one second group of service configurable resources.
[0108] Optionally, the resource allocation unit 402 is configured to:
[0109] Allocate full resources to the first group of services so that the first group of services has resources to serve all users to be served;
[0110] According to the resource evaluation result, determine the configurable resources that meet the relevant information of each second group of services in the complete resources;
[0111] The backup resources of the configurable resources are allocated to each second group of services, so that each second group of services has resources capable of serving at least part of the users.
[0112] Optionally, the identifier includes an IP address and a domain name.
[0113] Optionally, the second obtaining unit 404 is used to:
[0114] Generate a parsing request based on the resource acquisition request;
[0115] using the identifier of the first group of services and the identifier of the target second group of services corresponding to the resolution request in at least one of the second group of services as a plurality of candidate identifiers;
[0116] Resolving domain names in the plurality of candidate identifiers into IP addresses to obtain a plurality of candidate IP addresses;
[0117] A target IP address is determined among a plurality of candidate IP addresses, and the target IP address is determined as a target identifier.
[0118] Optionally, the second obtaining unit 404 is used to:
[0119] Get the IP address status of multiple candidate IP addresses;
[0120] If the IP address of the first group of services is in a normal state among the multiple candidate IP addresses, the IP address of the first group of services is determined as the target IP address; or,
[0121] When the IP address of the first group of services is in a fault state, the IP address of the target second group of services from multiple candidate IP addresses is determined as the target IP address; wherein the fault state means that resources cannot be obtained based on the IP address.
[0122] Optionally, the second obtaining unit 404 is used to:
[0123] Get the target resource from the complete resource based on the target IP address;
[0124] In the process of acquiring the target resource, if it is determined that the target IP address is converted from a normal state to a fault state, the IP address of the target second group of services is determined as the target IP address to continue acquiring the target resource through the target IP address.
[0125] Optionally, the second obtaining unit 404 is used to:
[0126] Counting the resource acquisition time for starting to acquire the target resource based on the target IP address, and before successfully acquiring the target resource, if the resource acquisition time is greater than the timeout time, determining that the target IP address is converted from a normal state to a fault state; and / or,
[0127] If notification information of a target resource acquisition failure is received, it is determined that the target IP address is converted from a normal state to a fault state.
[0128] Optionally, the second obtaining unit 404 is used to:
[0129] Setting the priority of each candidate IP address among the multiple candidate IP addresses, and sorting the multiple candidate IP addresses according to the priority; wherein the priority of the IP address of the first group of services is higher than the IP address of the target second group of services;
[0130] A target IP address is determined from the sorted multiple candidate IP addresses.
[0131] Figure 4 The resource acquisition device of the illustrated embodiment can be used to execute the technical solution of the above-mentioned method embodiment. Its implementation principle and technical effect are similar and will not be described in detail here.
[0132] Figure 5 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 5 , which shows a schematic diagram of the structure of an electronic device 500 suitable for implementing the embodiment of the present disclosure. The electronic device 500 in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), wearable electronic devices, etc., and fixed terminals such as digital TVs, desktop computers, smart home devices, etc. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0133] like Figure 5 As shown, the electronic device 500 may include a processing device 501 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes to implement the resource acquisition method of the embodiment of the present disclosure according to the program stored in the read-only memory (ROM) 502 or the program loaded from the storage device 508 to the random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0134] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0135] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart, thereby implementing the resource acquisition method as above. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0136] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer 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 of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0137] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0138] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0139] Optionally, when the above one or more programs are executed by the electronic device, the electronic device may also execute other steps of the above embodiments.
[0140] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0141] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0142] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0143] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0144] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer 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 of the foregoing.
[0145] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or gateway that includes a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also includes elements inherent to such process, method, article or gateway. In the absence of further restrictions, the elements defined by the sentence "comprises one..." do not exclude the presence of other identical elements in the process, method, article or gateway that includes the elements.
[0146] The above are only specific embodiments of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to these embodiments herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A resource acquisition method, characterized in that: include: Obtaining a resource evaluation result of a target area, wherein the resource evaluation result includes complete resources involved in all users to be served in the target area; Determine, according to the configuration information of the target area and the resource evaluation result, resources allocated to multiple groups of services in the target area; wherein the multiple groups of services include a first group of services and at least one second group of services, the resources of the first group of services are the complete resources, and the resources of the at least one second group of services are resources involved in at least part of the users to be served; Configuring identifiers for the first group of services and the at least one second group of services; wherein the identifiers are used to establish a connection relationship with a target object of a target resource in the complete resource to be acquired; In response to a resource acquisition request for the target resource sent by the target object, the identifier of the first group of services or the identifier of the second group of services is determined as a target identifier, and the target resource is acquired from the resources allocated to the target group service based on the target identifier, wherein the target group service is configured with the target identifier.
2. The method according to claim 1, characterized in that The identifier of the first group of services includes an IP address of a primary service and / or a domain name of a primary service, and the identifier of the at least one second group of services includes an IP address of a backup service and / or a domain name of a backup service.
3. The method according to claim 1, characterized in that: The configuration information includes relevant information of the at least one second group of service configurable resources, and the determining, according to the configuration information of the target area and the resource evaluation result, resources allocated to the multiple groups of services in the target area includes: Allocating the complete resources to the first group of services so that the first group of services has resources capable of serving all users to be served; Determining, in the complete resources, configurable resources that meet the relevant information of each second group of services according to the resource evaluation result; The backup resources of the configurable resources are allocated to the second groups of services, so that the second groups of services have resources that can serve at least part of the users.
4. The method according to claim 1, characterized in that: The identifier includes an IP address and a domain name, and determining the identifier of the first group of services or the identifier of the second group of services as a target identifier includes: Generate a parsing request according to the resource acquisition request; Using the identifier of the first group of services and the identifier of the target second group of services corresponding to the resolution request in the at least one second group of services as a plurality of candidate identifiers; Resolving domain names in the multiple candidate identifiers into IP addresses to obtain multiple candidate IP addresses; A target IP address is determined from among the plurality of candidate IP addresses, and the target IP address is determined as a target identifier.
5. The method according to claim 4, characterized in that Determining the target IP address from the multiple candidate IP addresses includes: Obtaining the IP address status of the multiple candidate IP addresses; If the IP address of the first group of services is in a normal state among the multiple candidate IP addresses, determine the IP address of the first group of services as the target IP address; or, When the IP address of the first group of services is in a fault state, the IP address of the target second group of services among the multiple candidate IP addresses is determined as the target IP address; wherein the fault state refers to an inability to obtain resources based on the IP address.
6. The method according to claim 5, characterized in that After determining the IP address of the first group of services as the target IP address, acquiring the target resource from the resources allocated to the target group of services based on the target identifier includes: Acquire the target resource from the complete resource based on the target IP address; In the process of acquiring the target resource, if it is determined that the target IP address is converted from the normal state to the fault state, the IP address of the target second group of services is determined as the target IP address to continue acquiring the target resource through the target IP address.
7. The method according to claim 6, characterized in that The determining that the target IP address is converted from the normal state to the fault state includes: Counting the resource acquisition time of starting to acquire the target resource based on the target IP address, and before successfully acquiring the target resource, if the resource acquisition time is greater than the timeout time, determining that the target IP address is converted from the normal state to the fault state; and / or, If notification information of the target resource acquisition failure is received, it is determined that the target IP address is converted from the normal state to the fault state.
8. The method according to claim 4, characterized in that Determining the target IP address from the multiple candidate IP addresses includes: Setting a priority of each of the multiple candidate IP addresses, and sorting the multiple candidate IP addresses according to the priority; wherein the priority of the IP address of the first group of services is higher than the IP address of the target second group of services; A target IP address is determined from the sorted multiple candidate IP addresses.
9. A resource acquisition device, characterized in that: include: A first acquisition unit is used to acquire a resource evaluation result of a target area, wherein the resource evaluation result includes complete resources involved in all users to be served in the target area; a resource allocation unit, configured to determine resources allocated to multiple groups of services in the target area according to the configuration information of the target area and the resource evaluation result; wherein the multiple groups of services include a first group of services and at least one second group of services, the resources of the first group of services are the complete resources, and the resources of the at least one second group of services are resources involved in at least part of the users to be served; An identifier configuration unit, configured to configure identifiers for the first group of services and the at least one second group of services; wherein the identifier is used to establish a connection relationship with a target object of a target resource in the complete resource to be acquired; A second acquisition unit, in which a user determines the identifier of the first group of services or the identifier of the second group of services as a target identifier in response to a resource acquisition request for the target resource sent by the target object, and acquires the target resource from the resources allocated to the target group service based on the target identifier to return the target object, wherein the target group service is configured with the target identifier.
10. An electronic device, characterized in that: include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and is configured to be executed by the processor to implement the resource acquisition method as described in any one of claims 1 to 8.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the resource acquisition method according to any one of claims 1 to 8 are implemented.
