Method, device and equipment for data processing and readable medium

By obtaining and storing the service names and namespace names of multiple clusters in the DNS system, and determining the global domain name and unique identifier based on this information, the problem that DNS cannot support multiple clusters to register domain names at the same time is solved, and faster and more reliable domain name resolution is achieved, and cluster maintenance risks are reduced.

CN119603268APending Publication Date: 2025-03-11JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411709013.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

The domain name system (DNS) cannot support the registration of domain names in multiple clusters at the same time, resulting in redundant resolving links of DNS services, increasing the time for domain name resolution, and relying on Kubernetes clusters, increasing the risk of cluster upgrade and maintenance.

Method used

By obtaining the service name and namespace name associated with multiple clusters, the global domain name and unique identifier of the corresponding service object are determined based on the service name, namespace name and predetermined DNS area, and stored in the secondary L2 cache to support domain name registration of multiple clusters.

Benefits of technology

It supports domain name registration for multiple clusters, reduces the time for domain name resolution, reduces the dependence of DNS services on Kubernetes clusters, and thus reduces the risk of cluster upgrade and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119603268A_ABST
    Figure CN119603268A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data processing method and device, equipment and a readable medium. The method comprises the following steps: obtaining service names and namespace names associated with corresponding service objects contained in a plurality of clusters, wherein the service objects are configured to provide an access mode for resource objects running in the clusters; determining a first global domain name of the corresponding service object and a first unique identifier corresponding to the first global domain name based on the service name, the namespace name and corresponding predetermined domain name system (DNS) regions corresponding to the plurality of clusters; and storing the first global domain name and the first unique identifier in a secondary L2 cache. In this way, the global domain names of the service objects contained in the multiple clusters can be stored in the L2 cache, and therefore domain name registration of the multiple clusters is supported.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Example embodiments of the present disclosure generally relate to the field of computer technology, and more particularly, to methods, apparatuses, devices, and readable media for data processing. Background Art

[0002] As one of the core services of the Internet, the Domain Name System (DNS) is mainly used to convert domain names that are easy for humans to remember into IP addresses (Internet Protocol Addresses) that can be recognized by machines, thus greatly simplifying the way people access the Internet. However, the Domain Name System cannot support service objects in multiple clusters to register domain names at the same time. Summary of the invention

[0003] In a first aspect of the present disclosure, a method for data processing is provided. The method includes: obtaining a service name and a namespace name associated with corresponding service objects included in a plurality of clusters, the service objects being configured to provide access to resource objects running within the clusters; determining a first global domain name of the corresponding service object and a first unique identifier corresponding to the first global domain name based on the service name, the namespace name, and a predetermined domain name system DNS zone corresponding to the plurality of clusters; and storing the first global domain name and the first unique identifier in a secondary L2 cache.

[0004] In a second aspect of the present disclosure, a device for data processing is provided. The device includes: an acquisition module configured to acquire a service name and a namespace name associated with a corresponding service object contained in a plurality of clusters, the service object being configured to provide an access method for a resource object running inside the cluster; a determination module configured to determine a first global domain name of the corresponding service object and a first unique identifier corresponding to the first global domain name based on the service name, the namespace name, and a predetermined domain name system DNS zone corresponding to the plurality of clusters; and a storage module configured to store the first global domain name and the first unique identifier in a secondary L2 cache.

[0005] In a third aspect of the present disclosure, an electronic device is provided. The electronic device includes at least one processing unit; and at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit, and when the instructions are executed by the at least one processing unit, the electronic device executes the method of the first aspect of the present disclosure.

[0006] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the computer-readable storage medium, and the computer program can be executed by a processor to perform the method according to the first aspect of the present disclosure.

[0007] In a fifth aspect of the present disclosure, a computer program product is provided, which includes computer executable instructions, wherein the computer executable instructions implement the method according to the first aspect of the present disclosure when executed by a processor.

[0008] It should be understood that the contents described in the summary of the invention are not intended to limit the key features or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In the following, in conjunction with the accompanying drawings and with reference to the following detailed description, the above and other features, advantages and aspects of various implementations of the present disclosure will become more apparent. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:

[0010] Figure 1 A schematic diagram showing an example environment in which embodiments of the present disclosure can be implemented;

[0011] Figure 2 A signaling interaction diagram illustrating a process for domain name registration for multiple clusters according to some embodiments of the present disclosure is shown;

[0012] Figure 3 A signaling interaction diagram of a process for domain name resolution of multiple clusters according to some embodiments of the present disclosure is shown;

[0013] Figure 4 A flowchart showing a process for data processing according to some embodiments of the present disclosure is shown;

[0014] Figure 5 A block diagram showing an apparatus for data processing according to some embodiments of the present disclosure; and

[0015] Figure 6 A block diagram of an electronic device is shown in which one or more embodiments of the present disclosure may be implemented. DETAILED DESCRIPTION

[0016] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0017] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may also be included below.

[0018] It should be noted that the acquisition, storage and application of user personal information involved in the technical solution of the present disclosure are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0019] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0020] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information, so that the user can independently choose whether to provide personal information to software or hardware such as electronic devices, applications, servers or storage media that execute operations of the technical solution of the present disclosure based on the prompt message.

[0021] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information is sent to the user in a manner such as a pop-up window, in which the prompt information can be presented in text form. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0022] As briefly mentioned above, the domain name system cannot support domain name registration for service objects in multiple clusters at the same time. Taking the Kubernetes cluster as an example, the DNS service in the Kubernetes cluster can only provide domain name registration for service objects in this cluster. If you request the domain name of a service object in another Kubernetes cluster, you need to jump to the DNS service of the other Kubernetes cluster. At the same time, the resolution link of the DNS service is redundant, which will increase the time for domain name resolution. Moreover, the DNS service depends on the Kubernetes cluster, which will cause infrastructure interdependence and increase the risk of cluster upgrades and maintenance.

[0023] In order to at least partially solve the above problems and other potential problems that may exist in traditional solutions, the present disclosure provides a solution for data processing. According to various embodiments of the present disclosure, the service name and namespace name associated with the corresponding service objects contained in multiple clusters are obtained, and the service objects are configured to provide access methods for resource objects running inside the cluster; based on the service name, the namespace name, and the corresponding predetermined domain name system DNS zones corresponding to the multiple clusters, the first global domain name of the corresponding service object and the first unique identifier corresponding to the first global domain name are determined; and the first global domain name and the first unique identifier are stored in the secondary L2 cache. In this way, the global domain names of the service objects contained in the multiple clusters can be stored in the L2 cache, thereby realizing domain name registration supporting multiple clusters.

[0024] Some example embodiments of the present disclosure will be described below with reference to the accompanying drawings.

[0025] Figure 1 1 is a schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented. Figure 1 As shown, environment 100 includes DNS services 110-1, 110-2, ..., 110-N and clusters 130-1, 130-2, ..., 130-N. For ease of discussion, DNS services 110-1, 110-2, ..., 110-N may be collectively or individually referred to as DNS services 110, and clusters 130-1, 130-2, ..., 130-N may be collectively or individually referred to as clusters 150.

[0026] In the environment 100, the DNS service 110 may be included in the cluster 130. In other embodiments, the DNS service 110 may also be included in other devices, which are in communication connection with the cluster 130. When the DNS service 110 is independently deployed, the DNS service 110 is not dependent on the cluster 130, thereby reducing the risk of upgrading and maintaining the DNS service 110 and the cluster 130.

[0027] In the environment 100, the DNS service 110 may be configured with an etcd module and a DNS-agent service. The DNS-agent service is deployed in the cluster 130 and is configured to obtain data corresponding to event changes by subscribing to change events of service objects in the cluster 130.

[0028] In some embodiments, the DNS service 110 may create a first-level L1 cache, and the etcd module may create a second-level L2 cache.

[0029] In some embodiments, multiple etcd modules together constitute an etcd cluster, and multiple L2 caches in multiple etcd modules together constitute an L2 cache cluster. In some embodiments, the etcd module can be used as a plug-in for the DNS service 110. In some embodiments, the cluster 130 can be a Kubernetes cluster.

[0030] It should be understood that Figure 1 The components and arrangements in the environment 100 shown are merely examples, and a computing system suitable for implementing the exemplary implementation described in the present disclosure may include one or more different components, other components, and / or different arrangements. The implementation of the present disclosure is not limited in this respect.

[0031] Figure 2 FIG. 2 is a signaling interaction diagram of a process 200 for domain name registration for multiple clusters according to some embodiments of the present disclosure. Figure 1 The process 200 is described in detail with reference to the environment 100 of FIG. For example, the process 200 may be performed by Figure 1 The DNS service 110 is used to execute.

[0032] In some embodiments, the DNS service 110 can deploy the DNS-agent service in the cluster 130, obtain resource change events in the cluster 130 through the DNS-agent service, obtain the service name (Service Name) and namespace name (Namespace Name) of the service object corresponding to the changed resources, and store the service name and namespace name of the service object corresponding to the changed resources in the L2 cache in the etcd module.

[0033] Taking the Kubernetes cluster as an example, the types of resource objects can include Pod, Service, and Endpoint. Among them, Pod is the smallest deployment unit in the Kubernetes cluster. It contains one or more containers that share storage, network, and operating environment. Pod can represent an instance of an application and is the smallest unit for scheduling and management of the Kubernetes cluster; Service is used to define the access method of a group of Pods; Endpoint is the connection point between Service and its associated Pod. Endpoint records the IP address and port number of the Pod associated with Service. When the client accesses Service, the Kubernetes cluster routes the request to the corresponding Pod through Endpoint. In this article, "Service" can sometimes also be referred to as "service object".

[0034] In block 210, after the DNS-agent service is started, a connection between the DNS-agent service and the etcd cluster may be established according to relevant parameters of the L2 cache cluster. In some embodiments, the connection between the DNS-agent service and the etcd cluster may be a long connection.

[0035] Before starting the DNS-agent service, you need to configure relevant parameters. In some embodiments, the relevant parameters may include but are not limited to: the DNS zone corresponding to the domain name suffix of the current cluster, the L2 cache directory etcd_path corresponding to the current cluster, the address etcd_endpoint of the L2 cache cluster, the authentication information of the L2 cache cluster, etc.

[0036] In box 220, the etcd cluster returns a successful connection message to the DNS-agent service.

[0037] In block 230 , the DNS-agent service subscribes to the resource registration function from the cluster 130 .

[0038] In some embodiments, the resource registration function may include an Add function, an Update function, a Delete function, etc. For example, when a resource is added, the Add function may be used to obtain data corresponding to the added resource; when a resource is updated, the Update function may be used to obtain data corresponding to the updated resource; when a resource is deleted, the Delete function may be used to delete the corresponding data.

[0039] In block 240, the DNS-agent service calls a function to synchronize all data.

[0040] In some embodiments, the DNS-agent service may create an asynchronous task for each resource object in the cluster 130. After the asynchronous task is started, a list of all service objects in the cluster 130 may be obtained, and then the list may be traversed to obtain the service names and namespace names of all service objects, and based on the service name, namespace name, and a predetermined domain name system DNS zone corresponding to the cluster 130 of the service object, a first global domain name of the service object and a first unique identifier corresponding to the first global domain name may be determined.

[0041] In some embodiments, the DNS-agent service may concatenate the service name, the namespace name, and the name of the predetermined DNS zone to obtain a first global domain name. For example, the service name may be represented as name, the namespace name may be represented as ns, and the predetermined DNS zone may be represented as zone, and the concatenated first global domain name is [name.ns.zone].

[0042] Furthermore, the first global domain name may include multiple subdomain names, for example, "name", "ns" and "zone" may be each a subdomain name. The DNS-agent service may sort the multiple subdomain names in the first global domain name in reverse order, and determine the first global domain name sorted in reverse order as the first unique identifier of the service object. For example, the first unique identifier obtained from the first global domain name [name.ns.zone] may be [ / etcd_path / zone / ns / name]. In this way, the domain name of each cluster 130 may not be repeated.

[0043] In some embodiments, the DNS-agent service may use the first global domain name as the Value and the first unique identifier as the key, and store them in the L2 cache in a key+Value manner.

[0044] In some embodiments, the key can be stored in the L2 cache in a tree data structure. In this way, the query efficiency of the domain name in the L2 cache can be improved. Assuming that the number of segments of the domain name is n, and the depth in the L2 cache is also n, according to the search characteristics of the tree, only O(n) cost is required to obtain the Value, so that the search in the L2 cache is not affected by the number of keys, thereby improving the efficiency of synchronizing the L2 cache to the L1 cache.

[0045] In block 250 , the DNS-agent service synchronizes the domain name registration data under the predetermined DNS zone into the L2 cache.

[0046] In some embodiments, the DNS-agent service may use a resource registration function to synchronize domain name registration data under a predetermined DNS zone. For example, a predetermined DNS zone corresponds to a cluster 130, and the DNS-agent service may synchronize domain name registration data in the cluster 130 corresponding to the predetermined DNS zone to the L2 cache.

[0047] In block 260 , the etcd module sends a synchronization success message to the DNS-agent service.

[0048] In block 270 , the DNS-agent service listens for resource changes in the cluster 130 .

[0049] In block 280 , when resources in the cluster 130 change, the DNS-agent service synchronizes the changed data to the L2 cache.

[0050] In some embodiments, the DNS-agent service determines the second global domain name of the service object corresponding to the resource object after the change and the second unique identifier corresponding to the second global domain name in response to determining that the resource object included in the cluster 130 has changed. It should be understood that the second global domain name and the second unique identifier are determined in the same manner as the first global domain name and the first unique identifier, which will not be described in detail herein.

[0051] In some embodiments, changes to resource objects may include any of the following: addition, modification, or deletion.

[0052] Further, the DNS-agent service may update the first global domain name and the first unique identifier stored in the L2 cache based on the second global domain name and the second unique identifier.

[0053] For example, when a resource object in cluster 130 is added, the DNS-agent service calls the Add function to determine the second global domain name and the second unique identifier of the newly added resource, and stores the second global domain name and the second unique identifier in the L2 cache.

[0054] For example, when a resource object in cluster 130 is updated, the DNS-agent service calls the Updata function to determine the second global domain name and the second unique identifier of the updated resource, and stores the second global domain name and the second unique identifier in the L2 cache.

[0055] For example, when a resource object in cluster 130 is deleted, the DNS-agent service calls the Delete function, determines the second global domain name and the second unique identifier of the deleted resource, determines the corresponding first identifier in the L2 cache based on the second unique identifier, and deletes the determined first unique identifier from the L2 cache.

[0056] In box 290, the etcd cluster returns a synchronization success message to the DNS-agent service.

[0057] In this way, the DNS-agent service can synchronize data to the L2 cache by synchronizing the data once in full and multiple increments, thereby reducing the pressure on the cluster 130 .

[0058] Figure 3 FIG. 3 shows a signaling interaction diagram of a process 300 for domain name resolution of multiple clusters according to some embodiments of the present disclosure. For example, the process 300 may also be performed by Figure 1 The DNS service 110 is used to execute.

[0059] In block 301 , the DNS service 110 starts the etcd module.

[0060] In some embodiments, the etcd module also needs to configure relevant parameters before starting. In some embodiments, the relevant parameters may include, but are not limited to: the cluster address etcd_endpoint of the L2 cache, the cache directory etcd_path of the L2 cache, the DNS zone corresponding to the authoritative domain name suffix of the cluster 130, the authentication information of the L2 cache cluster, etc. In this article, the "DNS zone corresponding to the authoritative domain name suffix of the cluster 130" is sometimes also referred to as the "predetermined DNS zone".

[0061] In some embodiments, after the etcd module is started, a connection between the DNS service 110 and the etcd module can be established according to relevant parameters of the L2 cache cluster. In some embodiments, the connection between the DNS service 110 and the etcd module can be a long connection.

[0062] After establishing the connection between the DNS service 110 and the etcd module, the DNS service 110 may traverse the zone list corresponding to the authoritative domain name suffix of the cluster 130 and create an asynchronous task for each zone in the list. In some embodiments, the number of asynchronous tasks may be determined based on the number of zones in the zone list.

[0063] In block 302, the etcd module starts an asynchronous task.

[0064] In block 303, the etcd module enables an asynchronous task to create an L1 cache for each zone. In some embodiments, the L1 cache can be accessed by the name of the zone.

[0065] In block 304 , the L1 cache returns a creation success message to the asynchronous task.

[0066] In box 305, the etcd module enables the asynchronous task to subscribe to the cache directory etcd_path of the L2 cache (that is, the cache directory of key+Value mentioned above) from the L2 cache, and concatenates the name of the zone and the cache directory etcd_path to obtain a new cache directory zone_etcd_path.

[0067] In box 306, the etcd module enables the asynchronous task to monitor the domain name data change events under the new cache directory zone_etcd_path.

[0068] In box 307, after monitoring the domain name data change event under the new cache directory zone_etcd_path, the etcd module causes the asynchronous task to call the Update L1 Cache function to try to obtain the write method (WLock method) in the read-write lock (RWMutex) of the L1 cache. The actual parameter of the Update L1 Cache function is the data change event under the directory zone_etcd_path.

[0069] In block 308 , after successfully acquiring the WLock method, the etcd module enables the asynchronous task to write the data change event into the L1 cache based on the WLock method.

[0070] In block 309 , when the WLock method is not obtained, the asynchronous task blocks and waits until the WLock method is obtained, and then writes the data change event into the L1 cache based on the WLock method.

[0071] In this way, when the WLock method is not obtained, that is, when other tasks are currently reading and writing to the L1 cache, it is necessary to wait for other tasks to complete before writing data. This ensures the consistency of data in the L1 cache and avoids domain name resolution errors caused by data competition.

[0072] In block 310 , the DNS service 110 creates a resolution task in response to receiving a domain name resolution request sent by a client.

[0073] In box 311, the etcd module calls the lookup function and determines the corresponding zone based on the parameters in the domain name resolution request, and determines the corresponding L1 cache based on the zone.

[0074] In block 312, the etcd module attempts to acquire a read method (RLock method) of the read-write lock (RMutex) in the L1 cache.

[0075] In box 313, when the RLock method is successfully obtained, the etcd module obtains the corresponding data from the L1 cache based on the RLock method.

[0076] In block 314 , when the RLock method is not successfully obtained, the parsing task blocks and waits until the RLock method is obtained, and then reads corresponding data from the L1 cache based on the RLock method.

[0077] In box 315, the etcd module returns the lookup result to the DNS service 110.

[0078] In block 316 , the DNS service 110 resolves the lookup result and returns the resolution result to the client.

[0079] It should be understood that the resolution task only obtains the RLock method of the L1 cache. The read operations between the resolution tasks will not block each other, and different zones correspond to different L1 caches, which will not block each other's read operations, thereby improving the concurrent throughput of the DNS service.

[0080] In summary, the data processing solution provided by the embodiments of the present disclosure can store the global domain names of service objects included in multiple clusters in the L2 cache, thereby supporting domain name registration of multiple clusters.

[0081] Figure 4 FIG. 4 is a flowchart of a process 400 for data processing according to some embodiments of the present disclosure. For example, the process 400 may be Figure 1 The DNS service 110 is used to execute.

[0082] In block 410 , the DNS service 110 obtains service names and namespace names associated with corresponding service objects included in a plurality of clusters, where the service objects are configured to provide access to resource objects running within the clusters.

[0083] In block 420 , the DNS service 110 determines a first global domain name of a corresponding service object and a first unique identifier corresponding to the first global domain name based on the service name, the namespace name, and corresponding predetermined domain name system DNS zones corresponding to the plurality of clusters.

[0084] At block 430 , the DNS service 110 stores the first global domain name and the first unique identifier in a second level L2 cache.

[0085] In some embodiments, determining the first global domain name includes: concatenating a service name, a namespace name, and a name of a predetermined DNS zone to obtain the first global domain name.

[0086] In some embodiments, the first global domain name includes multiple subdomain names, and wherein determining the first unique identifier includes: sorting the multiple subdomain names in the first global domain name in reverse order; and determining the reverse-sorted first global domain name as the first unique identifier of the corresponding service object.

[0087] In some embodiments, process 400 also includes: in response to determining that resource objects included in multiple clusters have changed, determining a second global domain name of a service object corresponding to the resource object after the change and a second unique identifier corresponding to the second global domain name, wherein the change includes any of the following: addition, change or deletion; and based on the second global domain name and the second unique identifier, updating the first global domain name and the first unique identifier stored in the L2 cache.

[0088] In some embodiments, process 400 also includes: creating a first-level L1 cache corresponding to a predetermined DNS zone corresponding to multiple clusters, the L1 cache being accessible through the name of the predetermined DNS zone; associating the predetermined DNS zone with a cache directory of the L2 cache, the cache directory indicating a first global domain name and a first unique identifier of the service object; in response to determining that a service object associated with the cache directory has changed, obtaining event data corresponding to the change; and writing the event data into the corresponding L1 cache.

[0089] In some embodiments, writing event data to a corresponding L1 cache includes: obtaining a write function of the L1 cache; in response to obtaining the write function, writing the event data to the corresponding L1 cache through the write function; and in response to not obtaining the write function, continuing to obtain the write function until the write function is obtained, and writing the event data to the corresponding L1 cache through the write function.

[0090] In some embodiments, process 400 also includes: in response to receiving a domain name resolution request sent by a client, determining a predetermined DNS zone corresponding to the domain name resolution request based on the domain name resolution request; determining an L1 cache corresponding to the domain name resolution request based on the predetermined DNS zone corresponding to the domain name resolution request; and obtaining corresponding data from the L1 cache corresponding to the domain name resolution request and returning it to the client.

[0091] Figure 5 A block diagram of an apparatus 500 for data processing according to some embodiments of the present disclosure is shown. The apparatus 500 may be implemented as or include the DNS service 110.

[0092] The apparatus 500 includes an acquisition module 510 configured to acquire a service name and a namespace name associated with a corresponding service object included in a plurality of clusters, wherein the service object is configured to provide an access method for a resource object running inside the cluster. The apparatus 500 also includes a determination module 520 configured to determine a first global domain name of the corresponding service object and a first unique identifier corresponding to the first global domain name based on the service name, the namespace name, and a predetermined domain name system DNS zone corresponding to the plurality of clusters. The apparatus 500 also includes a storage module 530 configured to store the first global domain name and the first unique identifier in a secondary L2 cache.

[0093] In some embodiments, the determination module 520 is further configured to concatenate the service name, the namespace name, and the name of the predetermined DNS zone to obtain the first global domain name.

[0094] In some embodiments, the first global domain name includes multiple subdomain names, and the determination module 520 is further configured to sort the multiple subdomain names in the first global domain name in reverse order; and determine the sorted first global domain name in reverse order as the first unique identifier of the corresponding service object.

[0095] In some embodiments, the device 500 also includes an update module, which is configured to determine the second global domain name of the service object corresponding to the change of the resource object and the second unique identifier corresponding to the second global domain name in response to determining that the resource objects included in the multiple clusters have changed, wherein the change includes any of the following: addition, change or deletion; and based on the second global domain name and the second unique identifier, update the first global domain name and the first unique identifier stored in the L2 cache.

[0096] In some embodiments, the device 500 also includes a write module configured to create a first-level L1 cache corresponding to a predetermined DNS zone corresponding to multiple clusters, and the L1 cache can be accessed through the name of the predetermined DNS zone; associate the predetermined DNS zone with a cache directory of the L2 cache, and the cache directory indicates a first global domain name and a first unique identifier of the service object; in response to determining that a service object associated with the cache directory has changed, obtain event data corresponding to the change; and write the event data into the corresponding L1 cache.

[0097] In some embodiments, the write module is further configured to obtain a write function of the L1 cache; in response to obtaining the write function, write the event data to the corresponding L1 cache through the write function; and in response to not obtaining the write function, continue to obtain the write function until the write function is obtained, and write the event data to the corresponding L1 cache through the write function.

[0098] In some embodiments, the device 500 also includes a return module, which is configured to determine, in response to receiving a domain name resolution request sent by a client, a predetermined DNS zone corresponding to the domain name resolution request based on the domain name resolution request; determine an L1 cache corresponding to the domain name resolution request based on the predetermined DNS zone corresponding to the domain name resolution request; and obtain corresponding data from the L1 cache corresponding to the domain name resolution request and return it to the client.

[0099] The modules included in the device 500 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units can be implemented using software and / or firmware, such as machine executable instructions stored on a storage medium. In addition to or as an alternative to machine executable instructions, some or all of the units in the device 500 can be implemented at least in part by one or more hardware logic components. As an example and not limitation, exemplary types of hardware logic components that can 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.

[0100] Figure 6 1 shows a block diagram of an electronic device 600 in which one or more embodiments of the present disclosure may be implemented. It should be understood that Figure 6 The electronic device 600 shown is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein.

[0101] like Figure 6 As shown, the electronic device 600 is in the form of a general-purpose computing device. The components of the electronic device 600 may include, but are not limited to, one or more processors or processing units 610, a memory 620, a storage device 630, one or more communication units 640, one or more input devices 650, and one or more output devices 660. The processing unit 610 may be an actual or virtual processor and is capable of performing various processes according to a program stored in the memory 620. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capabilities of the electronic device 600.

[0102] The electronic device 600 typically includes a plurality of computer storage media. Such media may be any available media accessible to the electronic device 600, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 620 may be a volatile memory (e.g., a register, a cache, a random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 630 may be a removable or non-removable medium, and may include a machine-readable medium, such as a flash drive, a disk, or any other medium, which may be capable of being used to store information and / or data (e.g., training data for training) and may be accessed within the electronic device 600.

[0103] The electronic device 600 may further include additional removable / non-removable, volatile / non-volatile storage media. Figure 6As shown in , a disk drive for reading or writing from a removable, non-volatile disk (e.g., a "floppy disk") and an optical drive for reading or writing from a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to the bus (not shown) by one or more data media interfaces. The memory 620 may include a computer program product 625 having one or more program modules that are configured to perform various methods or actions of various embodiments of the present disclosure.

[0104] The communication unit 640 implements communication with other electronic devices through a communication medium. Additionally, the functions of the components of the electronic device 600 can be implemented with a single computing cluster or multiple computing machines that can communicate through a communication connection. Therefore, the electronic device 600 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.

[0105] The input device 650 may be one or more input devices, such as a mouse, a keyboard, a tracking ball, etc. The output device 660 may be one or more output devices, such as a display, a speaker, a printer, etc. The electronic device 600 may also communicate with one or more external devices (not shown) through the communication unit 640 as needed, such as a storage device, a display device, etc., communicate with one or more devices that allow a user to interact with the electronic device 600, or communicate with any device that allows the electronic device 600 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).

[0106] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which one or more computer instructions are stored, wherein the one or more computer instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.

[0107] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products implemented according to the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0108] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0109] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0110] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse 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 realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.

[0111] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the marketplace, or to enable other persons of ordinary skill in the art to understand the implementations disclosed herein.

Claims

1. A method for data processing, comprising: Obtaining service names and namespace names associated with corresponding service objects included in the plurality of clusters, wherein the service objects are configured to provide access to resource objects running within the clusters; Determine, based on the service name, the namespace name, and predetermined domain name system (DNS) zones corresponding to the plurality of clusters, a first global domain name of the corresponding service object and a first unique identifier corresponding to the first global domain name; as well as The first global domain name and the first unique identifier are stored in a second-level L2 cache.

2. The method according to claim 1, wherein determining the first global domain name comprises: The service name, the namespace name, and the name of the predetermined DNS zone are concatenated to obtain the first global domain name.

3. The method of claim 2, wherein the first global domain name includes a multi-segment subdomain name, and wherein determining the first unique identifier comprises: sorting the multiple subdomains in the first global domain name in reverse order; as well as The first global domain name sorted in reverse order is determined as the first unique identifier of the corresponding service object.

4. The method according to claim 1, further comprising: In response to determining that the resource objects included in the plurality of clusters have changed, determining a second global domain name of a service object corresponding to the resource object after the change and a second unique identifier corresponding to the second global domain name, wherein the change includes any one of the following: addition, modification or deletion; as well as Based on the second global domain name and the second unique identifier, the first global domain name and the first unique identifier stored in the L2 cache are updated.

5. The method according to claim 1, further comprising: Creating a level 1 L1 cache corresponding to the predetermined DNS zone corresponding to the plurality of clusters, wherein the L1 cache can be accessed through a name of the predetermined DNS zone; Associating the predetermined DNS zone with a cache directory of the L2 cache, the cache directory indicating the first global domain name and the first unique identifier of the service object; In response to determining that the service object associated with the cache directory has changed, acquiring event data corresponding to the change; as well as The event data is written into the corresponding L1 cache.

6. The method according to claim 5, wherein writing the event data into the corresponding L1 cache comprises: Obtaining a write function of the L1 cache; In response to acquiring the write function, writing the event data into the corresponding L1 cache through the write function; as well as In response to not obtaining the write function, continuing to obtain the write function until the write function is obtained, and writing the event data into the corresponding L1 cache through the write function.

7. The method according to claim 5, further comprising: In response to receiving a domain name resolution request sent by a client, determining the predetermined DNS zone corresponding to the domain name resolution request based on the domain name resolution request; Determining an L1 cache corresponding to the domain name resolution request based on the predetermined DNS zone corresponding to the domain name resolution request; as well as The corresponding data is obtained from the L1 cache corresponding to the domain name resolution request and returned to the client.

8. A device for data processing, comprising: An acquisition module is configured to acquire service names and namespace names associated with corresponding service objects included in the plurality of clusters, wherein the service objects are configured to provide access to resource objects running within the clusters; a determination module configured to determine a first global domain name of the corresponding service object and a first unique identifier corresponding to the first global domain name based on the service name, the namespace name, and predetermined domain name system DNS zones corresponding to the plurality of clusters; as well as The storage module is configured to store the first global domain name and the first unique identifier in a second-level L2 cache.

9. An electronic device, comprising: at least one processing unit; as well as At least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, cause the electronic device to perform the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, wherein the computer program can be executed by a processor to implement the method according to any one of claims 1 to 7.

11. A computer program product comprising computer executable instructions, wherein the computer executable instructions, when executed by a processor, implement the method according to any one of claims 1 to 7.