Edge node access method, apparatus, device, and medium

By setting up proxy components in the edge computing environment and utilizing hash value calculation and consistent hashing algorithms, the load balancing problem of unstable network connection between edge nodes and the cloud is solved, achieving efficient access and stable management of edge nodes, and ensuring fast response and high-performance service.

CN119814786BActive Publication Date: 2025-12-09INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202412000434.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-12-09
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

Traditional load balancers struggle to operate consistently and effectively in edge computing environments, leading to uneven load distribution, request delays, or access failures, especially when the connection between edge nodes and the cloud network is unstable.

Method used

By pre-setting several proxy components, edge nodes are assigned to corresponding proxy components using hash value calculation. These proxy components receive and manage access requests from edge nodes. A consistent hashing algorithm is used to ensure balance and high availability. The proxy components are dynamically expanded to adapt to changes in the number of edge nodes.

Benefits of technology

It achieves efficient matching and load balancing between edge nodes and proxy components, ensuring rapid response and processing, avoiding linear increases in resource consumption as the number of nodes increases, supporting dynamic access of edge nodes, and ensuring high performance and stability of access services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814786B_ABST
    Figure CN119814786B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide an edge node access method, device, equipment and medium, comprising: setting a plurality of proxy components in advance; when the names of a plurality of edge nodes are received, calculating a first hash value according to the name of each edge node; assigning the corresponding proxy component to the edge node according to the first hash value and the second hash value corresponding to the proxy component obtained in advance; receiving the access request of the corresponding edge node through the proxy component; and accessing the edge node for the access request. In the embodiments of the present application, through the hash value calculation and the allocation of the proxy component, efficient matching and load balancing of the edge node and the proxy component are realized, the quick response and processing of the edge node access request are ensured, only the hash value of the edge node name is calculated, therefore, the resource consumption will not increase linearly with the increase of the edge node, and the dynamic access of the edge node is supported by setting the proxy component.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of caching, in particular to an edge node access method, device, equipment and medium. BACKGROUND

[0002] With the continuous progress of Internet of Things (IoT) technology, more and more devices such as intelligent transportation systems, remote monitoring devices, etc. are deployed at the edge of the network to collect and process data. Compared with nodes in traditional data centers, these edge nodes have characteristics such as location dispersion, complex network environment, and poor connection stability.

[0003] In order to effectively manage these edge nodes, container technology and its orchestration tools, especially Kubernetes, have become the industry standard. Kubernetes, as an open-source container orchestration engine, its main functions include automating container application deployment, application scaling, and application lifecycle management. However, the particularity of edge computing environment, such as network instability, makes it difficult for traditional data center node management methods to cope. In related technologies, a load balancer is deployed in the cloud, and load distribution is performed through random, load, and connection number algorithms. However, due to the frequent disconnection of network connections between edge nodes and the cloud, the load balancer is difficult to work continuously and effectively, resulting in uneven load distribution, request delay, or access failure. SUMMARY

[0004] The purpose of the embodiments of the present application is to provide an edge node access method, device, equipment and medium, and the specific technical solutions are as follows:

[0005] In the first aspect of the present application, an edge node access method is first provided, the method comprising:

[0006] Pre-setting a plurality of proxy components;

[0007] When receiving the names of a plurality of edge nodes, calculating the hash value according to the name of each edge node to obtain a first hash value;

[0008] According to the first hash value and the second hash value corresponding to the proxy component obtained in advance, the corresponding proxy component is allocated to the edge node;

[0009] The access request of the corresponding edge node is received through the proxy component, and each proxy component corresponds to at least one edge node;

[0010] Accessing the edge node for the access request.

[0011] Optionally, after the step of accessing the edge node for the access request, the method comprises:

[0012] determining a re-access time interval according to an access time of each of the edge nodes and a current time corresponding to each of the edge nodes in response to a restart instruction or a pre-set edge area network disconnection recovery event;

[0013] receiving an access request of the edge node according to the re-access time interval.

[0014] Optionally, after the step of accessing the edge node for the access request, the method comprises:

[0015] after sending the target message to the edge node, persisting the target message to generate a persistent rollback version;

[0016] the persisting the target message comprises:

[0017] storing the target message to a pre-set shared memory, the shared memory being used for storing target messages sent by each of the proxy components to each of the edge nodes;

[0018] after the step of persisting the target message and generating a persistent rollback version, the method further comprises:

[0019] when the proxy component corresponding to any of the edge nodes is in a failure state, re-determining a replacement proxy component corresponding to the edge node;

[0020] comparing, by the replacement proxy component, a current persistent rollback version and a latest persistent rollback version corresponding to a cluster;

[0021] if a first version number corresponding to the current persistent rollback version is consistent with a second version number corresponding to the latest persistent rollback version corresponding to the cluster, sending resource information corresponding to the current persistent rollback version to the edge node;

[0022] if the first version number corresponding to the current persistent rollback version is not consistent with the second version number corresponding to the latest persistent rollback version corresponding to the cluster, sending resource information corresponding to the latest persistent rollback version to the edge node.

[0023] Optionally, the assigning of the corresponding proxy component to the edge node according to the first hash value and a pre-acquired second hash value corresponding to the proxy component comprises:

[0024] acquiring a first address and port information corresponding to each proxy component to perform hash value calculation to obtain a second hash value corresponding to each of the proxy components;

[0025] searching for a proxy component corresponding to the second hash value identical to the first hash value, and taking the proxy component as the proxy component of the edge node.

[0026] Optionally, after the step of calculating the first address and port information of each proxy component to obtain the second hash value corresponding to each proxy component, the method comprises:

[0027] If there is no second hash value identical to the first hash value, a proxy component first appearing in all the proxy components is determined according to a preset order, and the proxy component first appearing is taken as the proxy component of the edge node.

[0028] Optionally, after the step of accessing the edge node according to the access request, the method comprises:

[0029] When it is detected that the number of edge nodes accessed by each proxy component in any one cluster is greater than a first preset threshold, the number of the proxy component is increased; the cluster is used for managing the edge nodes.

[0030] When it is detected that the resource usage of each proxy component in any one cluster is greater than a second preset threshold, the number of the proxy component is increased.

[0031] When it is detected that there is a timeout error log in a pre-acquired server log, the number of the cluster is increased.

[0032] When it is detected that the resource usage in any one cluster is greater than a third preset threshold, the number of the cluster is increased.

[0033] Optionally, after the step of accessing the edge node according to the access request, the method comprises:

[0034] When it is detected that the resource usage of all the proxy components in any one cluster is less than a fourth preset threshold, the number of the proxy component is decreased; the cluster is used for managing the edge nodes.

[0035] In the second aspect of the embodiment of the application, an edge node access device is further provided, and the device comprises:

[0036] a setting module configured to set a plurality of proxy components;

[0037] a calculating module configured to calculate a hash value of the name of each edge node to obtain a first hash value when the names of a plurality of edge nodes are received;

[0038] an allocation module configured to allocate a corresponding proxy component to the edge node according to the first hash value and a second hash value of the proxy component obtained in advance;

[0039] a receiving module configured to receive an access request of the corresponding edge node through the proxy component, each proxy component corresponding to at least one edge node;

[0040] an access module configured to access the edge node for the access request.

[0041] In a third aspect of the embodiments of the present application, a communication device is further provided, which comprises a transceiver, a memory, a processor and a program stored in the memory and executable on the processor;

[0042] The processor is configured to read the program in the memory to implement the edge node access method according to any one of the first aspect.

[0043] In a fourth aspect of the embodiments of the present application, a readable storage medium is further provided, wherein the program is executable on the processor to implement the edge node access method according to any one of the first aspect.

[0044] The edge node access method provided by the embodiments of the present application comprises the following steps: a plurality of proxy components are set in advance; when the names of a plurality of edge nodes are received, a first hash value is obtained by performing hash value calculation on the name of each edge node; a corresponding proxy component is allocated to the edge node according to the first hash value and a second hash value of the proxy component obtained in advance; an access request of the corresponding edge node is received through the proxy component, each proxy component corresponding to at least one edge node; and the edge node is accessed for the access request. In the embodiments of the present application, the efficient matching and load balancing of the edge node and the proxy component are realized through the hash value calculation and the allocation of the proxy component, the quick response and processing of the edge node access request are ensured, only the hash value of the edge node name is calculated, therefore, the resource consumption will not increase linearly with the increase of the edge node, the dynamic access of the edge node is supported by setting the proxy component, the proxy component can be expanded and contracted in the future, and the high performance and stability of the access service can be ensured. BRIEF DESCRIPTION OF DRAWINGS

[0045] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the drawings needed in the embodiments or the prior art description will be briefly introduced.

[0046] Figure 1 A step flowchart of an edge node access method provided by the embodiments of the present application;

[0047] Figure 2is a device block diagram of an edge node access device provided by an embodiment of the application;

[0048] Figure 3 is a communication device schematic diagram provided by an embodiment of the application;

[0049] Figure 4 is an exemplary edge node access architecture schematic diagram provided by an embodiment of the application;

[0050] Figure 5 is an exemplary decision algorithm schematic diagram provided by an embodiment of the application. DETAILED DESCRIPTION

[0051] To make the objectives, technical solutions, and advantages of the embodiments of the application clearer, the various embodiments of the application will be described in detail below with reference to the drawings. However, those skilled in the art can understand that, in the various embodiments of the application, many technical details are presented in order to make the readers better understand the application. However, the technical solutions claimed by the application can be implemented even without these technical details and various changes and modifications based on the following embodiments. The division of the following various embodiments is for the convenience of description, and should not constitute any limitation on the specific implementation of the application, and the various embodiments can be combined and referenced with each other without contradiction.

[0052] It should be noted that, in the embodiments of the application, the overall application scenario architecture is referred to Figure 4 As shown in the figure, an edge node access method architecture, specifically, includes a cloud cluster and an edge node, in the embodiments of the application, the management of the edge node is implemented to realize the dynamic access of the edge node and the cloud end for the case of a large number of edge nodes.

[0053] Among them, there can be at least one k8s cluster on the cloud end, each k8s cluster can include a cluster management component, a proxy component, a decision component, and a detection component, and a multi-cluster management component is also deployed on the cloud end to manage and schedule multiple clusters.

[0054] Specifically, the multi-cluster management component: this component uniformly manages multiple k8s clusters and displays all edge nodes, through which a container application can be selected to be distributed to a specific edge node.

[0055] The cluster management component: the unified management of the edge node is implemented by using a K8S-based edge computing framework, a K8S cluster is composed of a management node and a computing node, the node on which the component is deployed is called a management node, and the edge node is a computing node in the K8S cluster, the management component can use a K8S native component, and three replicas are used for specific deployment to realize high availability.

[0056] Proxy component: the process of the native K8S or KubeEdge / OpenYurt computing node accessing the cluster is that all edge nodes are registered with the management component, since each management component caches the metadata of all edge nodes and container applications on the nodes, so it cannot be linearly expanded, and such an architecture has performance bottlenecks when facing a large number of edge nodes. Therefore, a horizontally scalable proxy component is designed and deployed in the cloud, and the edge node (computing node) accesses the K8S cluster through the proxy component.

[0057] Decision component: the decision component is designed and deployed in the cloud, and the edge node first inquires the decision component about which proxy component to access the cluster before accessing the proxy component, and accesses according to the returned proxy component access address.

[0058] Detection component: a detection module is designed in the cloud to detect whether the current cloud proxy component has performance bottlenecks, and if so, it needs to be expanded, or it needs to be scaled down as the number of edge nodes decreases.

[0059] Referring to Figure 4 It can be seen that, by the multi-level distributed edge node access method, massive edge nodes are dynamically accessed and managed, the horizontally scalable proxy component accesses the edge node, which can be automatically and dynamically expanded according to the number of edge nodes and access load, and the consistent hashing algorithm is used to ensure the balance and high availability of the edge node access.

[0060] Referring to Figure 1 , a step flowchart of an edge node access method provided by an embodiment of the application is shown, and the method can include:

[0061] Step 101, a plurality of proxy components are pre-set;

[0062] Step 102, when the names of a plurality of edge nodes are received, a hash value of each edge node name is calculated to obtain a first hash value;

[0063] It should be noted that in the embodiment of the application, the decision component is designed and deployed in the cloud, and the edge node first inquires the decision component about which proxy component to access the cluster before accessing the proxy component, and accesses according to the returned proxy component access address.

[0064] Therefore, first, the proxy component needs to be allocated to the edge node to be accessed, wherein the edge node calculates a hash value according to the node name to obtain a first hash value, for example, as shown in the accompanying Figure 2 , wherein the edge node 1 calculates the hash value as 80.

[0065] allocating a corresponding proxy component to the edge node according to the first hash value and a second hash value corresponding to the proxy component obtained in advance;

[0066] Further, the allocating a corresponding proxy component to the edge node according to the first hash value and a second hash value corresponding to the proxy component obtained in advance comprises:

[0067] calculating a hash value of first address and port information corresponding to each proxy component to obtain a second hash value corresponding to each proxy component;

[0068] finding a proxy component corresponding to the second hash value identical to the first hash value, and taking the proxy component as the proxy component of the edge node.

[0069] Further, after the step of calculating a hash value of first address and port information corresponding to each proxy component to obtain a second hash value corresponding to each proxy component, the method comprises:

[0070] if there is no second hash value identical to the first hash value, determining a first appearing proxy component in all the proxy components according to a pre-set order, and taking the first appearing proxy component as the proxy component of the edge node.

[0071] It should be noted that in the embodiment of the application, a hash value of first address and port information corresponding to each proxy component is calculated to obtain a second hash value, specifically, the IP+Port combination of the proxy component is calculated to obtain a second hash value, for example, a value of 0 to 1023, the edge node is calculated according to the node name, and is also mapped to a range of 0 to 1023, at this time, the proxy component equal to the hash value of the edge node name can be returned through the decision component, if not found, the first proxy component can be found clockwise, for example, as shown in Figure 5 the edge node 1 calculates a hash value of 80, and cannot find a proxy component equal to 80, so the first proxy component, i.e. the proxy component 2 with a hash value of 500 in the figure, can be found clockwise.

[0072] It should be noted that in the hash calculation process, when the edge node is accessed, the edge node name needs to be provided, a random string is uniformly generated through the decision component, for example, edgenode-xxx, wherein xxx is a randomly generated string, and the edge node name is converted into a random string, which can improve the balance of the edge node falling into the consistent hash proxy component instance.

[0073] Step 104, receiving an access request of the corresponding edge node through the proxy component, each proxy component corresponding to at least one edge node;

[0074] It should be noted that in the embodiment of the application, after the proxy component is determined, the access request of the corresponding edge node is received through the proxy component.

[0075] Specifically, after a certain proxy component is selected, the proxy component generates an edge node access command, and then the token of the decision component is returned to the edge node.

[0076] The token of the decision component is a unified token authentication management center provided in the decision component. When the access address is returned to the access node, the token is provided, and when the proxy component receives the access request of the edge node, the validity of the token provided by the edge node can be verified in the token authentication management center of the decision component.

[0077] Step 105, accessing the edge node according to the access request.

[0078] The proxy component is responsible for receiving the access request of the edge node, and then sending the request to the cluster management component for registration of the edge node, and the proxy component records the information of the edge node, including the name, IP, session, etc.

[0079] When the management component needs to send an instruction to a certain edge node, the proxy component listens to the instruction and forwards it to the corresponding edge node through the session.

[0080] It should be noted that in the embodiment of the application, each proxy component is only responsible for part of the edge node access and management, so the metadata maintained by each proxy component is also within a certain value that is relatively predictable, so the resource consumption of a single proxy component will not increase with the increase of the number of edge nodes, thereby horizontal expansion can be performed. A certain proxy component can only belong to one K8S cluster, and a single K8S cluster can have multiple proxy components. During initialization, only one cluster and one proxy component can be deployed, and as the number of edge nodes increases, the number of proxy components can be expanded.

[0081] In addition, in the embodiment of the application, the proxy component exposes an edge node access address on a network accessible by the edge node, which includes IP, port number, access token, etc. The token is authentication information when accessing. At the same time, an interface for generating an access command is provided for the decision component to call.

[0082] In one embodiment, after the step of accessing the edge node according to the access request, the method comprises:

[0083] in response to a restart instruction or a pre-set edge area network outage recovery event, determining a re-access time interval according to a pre-acquired access time of each of the edge nodes and a current time corresponding to each of the edge nodes;

[0084] receiving an access request of the edge node according to the re-access time interval.

[0085] It should be noted that in the embodiment of the present application, when the management node of the cloud is restarted (in response to a restart instruction) or the edge area network is recovered (in response to a pre-set edge area network outage recovery event), all or a large number of edge nodes will simultaneously re-access the cloud, resulting in a transient bottleneck, therefore, at this time, the proxy component adopts a preset backoff algorithm, that is, it re-accesses through different time window lengths.

[0086] Specifically, the preset backoff algorithm is: taking the difference between the access time of the edge node to the cloud and the current time of the edge node in seconds, taking the modulus of 100, and taking the remainder as the re-access interval time, so that different edge nodes will randomly re-access the cloud within 100 seconds.

[0087] In another embodiment, after the step of accessing the edge node according to the access request, the method comprises:

[0088] After sending the target message to the edge node, persisting the target message to generate a persistent rollback version;

[0089] The persisting the target message comprises:

[0090] storing the target message to a pre-set shared memory, the shared memory being used to store target messages sent by each of the proxy components to each of the edge nodes;

[0091] It should be noted that in the embodiment of the present application, the latest message sent by the proxy component to the edge node is persisted, and shared storage is used between different proxy components to realize data sharing, and the message here is resource change information in K8S, such as Pod and Service.

[0092] After the step of persisting the target message and generating a persistent rollback version, the method further comprises:

[0093] When any of the proxy components corresponding to the edge nodes is in a fault state, re-determining a replacement proxy component corresponding to the edge node;

[0094] comparing, by the replacement agent component, a current persistent rollback version with a latest persistent rollback version corresponding to the cluster;

[0095] if the first version number corresponding to the current persistent rollback version is consistent with the second version number corresponding to the latest persistent rollback version corresponding to the cluster, then sending resource information corresponding to the current persistent rollback version to the edge node;

[0096] if the first version number corresponding to the current persistent rollback version is inconsistent with the second version number corresponding to the latest persistent rollback version corresponding to the cluster, then sending resource information corresponding to the latest persistent rollback version to the edge node.

[0097] It should be noted that in the embodiment of the application, the health state of the agent component can be detected by the detection component, and if some agent components fail, they need to be removed from the consistent hashing ring to avoid the edge node connecting to the failed agent component.

[0098] Specific detection method: multiple detection is performed, if it is judged as failure multiple times within a specified time, then it is finally failure, and the judgment method is to obtain an edge node access command as a health identifier.

[0099] Therefore, when a certain agent component fails, the agent component taken over by the edge node after re-distribution by the decision component continues to send messages.

[0100] Since the change of resources in K8S will correspond to a specific version number revision, the new agent component re-sends, therefore, only the consistency of the current persistent reversion and the latest revision of K8S needs to be compared.

[0101] Specifically, if the first version number corresponding to the current persistent rollback version is consistent with the second version number corresponding to the latest persistent rollback version corresponding to the cluster, then it can continue to be sent.

[0102] If the first version number corresponding to the current persistent rollback version is inconsistent with the second version number corresponding to the latest persistent rollback version corresponding to the cluster, that is, the sent version is old, then the latest version resource information is sent.

[0103] In addition, in the embodiment of the application, if only a temporary restart occurs, the memory cache message is also lost, and the sent and unsent need to be compared, rather than re-sending all messages.

[0104] In another embodiment, after the step of accessing the edge node according to the access request, the method comprises:

[0105] when it is detected that the number of edge nodes accessed by each of the agent components in any one cluster is greater than a first preset threshold, the number of the corresponding agent components is increased; the cluster is used to manage the edge nodes;

[0106] when it is detected that the resource usage of each of the agent components in any one of the clusters is greater than a second preset threshold, the number of the corresponding agent components is increased;

[0107] when it is detected that there are timeout error logs in the pre-acquired server logs, the number of the corresponding cluster is increased;

[0108] when it is detected that the resource usage in any one of the clusters is greater than a third preset threshold, the number of the corresponding cluster is increased.

[0109] It should be noted that, in the embodiments of the present application, by setting the agent components, the performance of the agent components can be detected, and the agent components and the clusters deployed in the cloud can be processed correspondingly according to the current performance, for example, expansion or contraction.

[0110] Specifically, the edge nodes are accessed into the cluster through the agent components, and then the cluster manages the accessed edge nodes. The expansion of the access agent components: the following two methods can be used, one is to set the maximum number of edge nodes accessed by the agent, when most of the instances in the agent component reach a percentage of the maximum number, such as 80%, the agent component instance is expanded; the second is that the resources of the agent component reach the performance bottleneck, including CPU, memory and network bandwidth, as long as one of the resources reaches the bottleneck, such as the CPU exceeds 80% of the total, expansion is needed. The two methods can also be combined, when the number of accessed edge nodes exceeds a certain value, the resource pool performance bottleneck detection is performed again, so as to avoid the resource consumption caused by the detection of resource performance usage when the number of nodes is too small.

[0111] Multiple cluster expansion opportunity: the management components of a single cluster are mainly etcd and apiserver, which have a performance upper limit bottleneck, and the constraint conditions are CPU, memory and network bandwidth, so under the premise of a single cluster, the agent components cannot be expanded infinitely to realize the access of a large number of edge nodes, and multiple clusters need to be horizontally expanded, and the agent components are increased in the new clusters. The detection method is: one is to detect the apiserver logs regularly, and when the timeout error logs are found, a new cluster is added; the second is to detect whether the CPU, memory and network bandwidth performance of the cluster reaches the bottleneck, such as the usage rate exceeds a percentage, such as 80%. The goal of the present application is not to manage a large number of edge nodes through a large number of clusters, but to further expand the scale of the edge nodes managed by a single cluster, and to control the number of clusters in a small order of magnitude, which saves resources and reduces the complexity of management.

[0112] In addition, in the embodiment of the present application, after detecting the performance bottleneck, multiple execution strategies are supported: 1) the most conservative strategy: warning, prompting the expansion of the proxy component or the expansion of the cluster, and expanding by human; 2) the medium strategy: notifying the decision module to reject access of the edge node, and guaranteeing stability of the existing system; and 3) the automatic strategy: triggering the automatic expansion mechanism, and needing to access the automatically expanded system.

[0113] In another embodiment, after the step of accessing the edge node for the access request, the method comprises:

[0114] When it is detected that the resource utilization of all the proxy components in any one cluster is less than a fourth preset threshold, the corresponding number of the proxy components is reduced; and the cluster is used for managing the edge node.

[0115] It should be noted that, in the embodiment of the present application, in addition to the expansion described above, it can also be determined whether the expansion can be reduced based on the resource utilization of the edge node and the proxy component, so as to dynamically reduce the overall system loss.

[0116] Specifically, the expansion reduction occasion is that when it is detected that the overall processing of the proxy component is below a certain resource utilization, the number of the proxy component is reduced to save resource consumption. The specific detection method is that the CPU, memory and network bandwidth of each proxy component are polled. If each index is below a certain threshold, such as 30%, the proxy components are reduced one by one to avoid the impact of simultaneously reducing the proxy components on the simultaneous access of a large number of edge nodes. Until a certain threshold, such as 60%, is reached, the reduction of the proxy components is stopped. Since the reduction of the cluster will cause the migration of the container application across the cluster, the business continuity of the edge application will be affected. Therefore, the cluster is reduced only when there is no edge node in the cluster.

[0117] In addition, in the embodiment of the present application, after the edge node is reduced, the proxy component can also be reduced correspondingly, can be directly removed from the hash ring, and the corresponding component service is closed. The edge node originally proxied by the reduced component will be re-accessed, and the new node is allocated according to a new consistent hashing algorithm when accessing.

[0118] In addition, with reference to Figure 4 It can be seen that the embodiment of the present application can further expand the scale of the single cluster managing the edge node, and also realize the unified management of the super-large-scale edge node. At the same time, through the automatic sensing of the load, the dynamic access and push-out of the edge node are met, the overall operation and management complexity is reduced, and the resource consumption level is also reduced. Through the real-time monitoring of the system performance by the performance detection component, the self-adaptive expansion of the system is realized in combination with the automatic expansion mechanism, and the stability and response speed of the system are guaranteed.

[0119] The edge node access method provided by the embodiment of the application comprises the following steps: a plurality of proxy components are set in advance; when the names of a plurality of edge nodes are received, a first hash value is calculated according to the name of each edge node; a corresponding proxy component is allocated to the edge node according to the first hash value and a second hash value corresponding to the proxy component obtained in advance; an access request of the corresponding edge node is received through the proxy component, each proxy component corresponding to at least one edge node; and the edge node is accessed according to the access request. In the embodiment of the application, the efficient matching and load balancing of the edge node and the cloud proxy component are realized through the hash value calculation and the allocation of the proxy component, the quick response and processing of the edge node access request are ensured, the cloud only calculates the hash value of the edge node name, therefore, the resource consumption will not increase linearly with the increase of the edge node, the dynamic access of the edge node is supported through the setting of the proxy component, the proxy component can be expanded and contracted in the future, and the high performance and stability of the cloud access service can be ensured.

[0120] With reference to Figure 2 , a structure schematic diagram of an edge node access device provided by an embodiment of the application is shown, the device comprises:

[0121] The setting module 201 is configured to set a plurality of proxy components in advance.

[0122] The calculation module 202 is configured to, when the names of a plurality of edge nodes are received, calculate a first hash value according to the name of each edge node.

[0123] The allocation module 203 is configured to allocate a corresponding proxy component to the edge node according to the first hash value and a second hash value corresponding to the proxy component obtained in advance.

[0124] The receiving module 204 is configured to receive an access request of the corresponding edge node through the proxy component, each proxy component corresponding to at least one edge node.

[0125] The access module 205 is configured to access the edge node according to the access request.

[0126] The edge node access device provided in this embodiment of the invention pre-sets several proxy components. When receiving the names of several edge nodes, it calculates a hash value for each edge node name to obtain a first hash value. Based on the first hash value and a pre-obtained second hash value corresponding to the proxy component, it allocates a corresponding proxy component to the edge node. The proxy component receives the access request from the corresponding edge node, with each proxy component corresponding to at least one edge node. The device then accesses the edge node in response to the access request. In this embodiment, through hash value calculation and proxy component allocation, efficient matching and load balancing between edge nodes and proxy components are achieved, ensuring rapid response and processing of edge node access requests. Since only the hash value of the edge node name is calculated, resource consumption does not increase linearly with the increase of edge nodes. By setting up proxy components, dynamic access of edge nodes is supported. The proxy components can be scaled up and down subsequently, ensuring high performance and stability of the access service.

[0127] This invention also provides a communication device, such as... Figure 3 As shown, it includes a processor 301, a communication interface 302, a memory 303, and a communication bus 304, wherein the processor 301, the communication interface 302, and the memory 303 communicate with each other through the communication bus 304.

[0128] Memory 303 is used to store computer programs;

[0129] When processor 301 executes a program stored in memory 303, it can perform the following steps:

[0130] Pre-configure several proxy components;

[0131] When the names of several edge nodes are received, a hash value is calculated based on the name of each edge node to obtain a first hash value;

[0132] The corresponding proxy component is assigned to the edge node according to the first hash value and the second hash value corresponding to the pre-acquired proxy component;

[0133] The proxy component receives the access request of the corresponding edge node, and each proxy component corresponds to at least one edge node;

[0134] The edge node is accessed in response to the access request.

[0135] The memory and the processor are connected by a bus, which can include any number of interconnecting buses and bridges, and the bus connects the various circuits of the one or more processors and the memory together. The bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art, and therefore, will not be described any further. A bus interface provides an interface between the bus and a transceiver. The transceiver can be a single element or multiple elements, such as a plurality of receivers and transmitters, which provides a means for communicating with various other apparatus over a transmission medium. The data processed by the processor can be transmitted over a wired medium or over a wireless medium via an antenna, and further, the antenna receives data and transfers the data to the processor. The processor is responsible for managing the bus and general processing, and can also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. The memory can be used for storing data used by the processor in executing operations.

[0136] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus.

[0137] The communication interface is used for communication between the terminal and other devices.

[0138] The memory can include a Random Access Memory (RAM), and can also include a non-volatile memory, such as at least one disk memory. Optionally, the memory can also be at least one storage device located away from the aforementioned processor.

[0139] The processor described above can be a general processor, including a central processing unit (CPU), a network processor (NP), etc.; or can be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.

[0140] In yet another embodiment provided by the present application, a computer readable storage medium is provided, which stores instructions, when executed on a computer, cause the computer to perform the edge node access method according to any of the above embodiments.

[0141] In yet another embodiment provided by the present application, a computer program product is provided, which contains instructions, when executed on a computer, cause the computer to perform the edge node access method according to any of the above embodiments.

[0142] In the above embodiments, the implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented by using software, the implementation can be in a form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the flow or function described in the embodiments of the present application is entirely or partially generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable apparatus. The computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)), etc.

[0143] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0144] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0145] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.

Claims

1. An edge node access method, characterized by, The method comprises: Pre-setting a plurality of proxy components; When receiving the names of a plurality of edge nodes, calculating a hash value according to the name of each edge node to obtain a first hash value; According to the first hash value and the second hash value corresponding to the proxy component obtained in advance, the corresponding proxy component is allocated to the edge node; Through the proxy component, an access request of the corresponding edge node is received, and each proxy component corresponds to at least one edge node; Accessing the edge node for the access request; When it is detected that the number of edge nodes accessed by each proxy component in any one cluster is greater than a first preset threshold, the number of the corresponding proxy component is increased; the cluster is used to manage the edge node; When it is detected that the resource usage rate of each proxy component in any one cluster is greater than a second preset threshold, the number of the corresponding proxy component is increased; When it is detected that there is a timeout error log in the server log obtained in advance, the number of the corresponding cluster is increased; When it is detected that the resource usage rate in any one cluster is greater than a third preset threshold, the number of the corresponding cluster is increased.

2. The method of claim 1, wherein, After the step of accessing the edge node for the access request, the method comprises: In response to a restart instruction or a pre-set edge area network outage recovery event, a re-access time interval is determined according to the access time of each edge node obtained in advance and the current time corresponding to each edge node; According to the re-access time interval, the access request of the edge node is received.

3. The method of claim 1, wherein, After the step of accessing the edge node for the access request, the method comprises: After sending a target message to the edge node, the target message is persisted to generate a persistent rollback version; The step of persisting the target message comprises: The target message is stored in a pre-set shared memory, and the shared memory is used to store the target message sent by each proxy component to each edge node; After the step of persisting the target message and generating a persistent rollback version, the method further comprises: When the proxy component corresponding to any edge node is in a fault state, a replacement proxy component corresponding to the edge node is re-determined; According to the current persistent rollback version and the latest persistent rollback version corresponding to the cluster, a comparison is made through the replacement proxy component; If the first version number corresponding to the current persistent rollback version is consistent with the second version number corresponding to the latest persistent rollback version corresponding to the cluster, the resource information corresponding to the current persistent rollback version is sent to the edge node; If the first version number corresponding to the current persistent rollback version is not consistent with the second version number corresponding to the latest persistent rollback version corresponding to the cluster, the resource information corresponding to the latest persistent rollback version is sent to the edge node.

4. The method of claim 1, wherein, The step of allocating the corresponding proxy component to the edge node according to the first hash value and the second hash value corresponding to the proxy component obtained in advance comprises: Hash value calculation is performed on the first address and port information of each proxy component to obtain a second hash value corresponding to each proxy component; A proxy component corresponding to the second hash value identical to the first hash value is searched for, and the proxy component is taken as the proxy component of the edge node.

5. The method of claim 1, wherein, After the step of performing Hash value calculation on the first address and port information of each proxy component to obtain a second hash value corresponding to each proxy component, the method comprises: If there is no second hash value identical to the first hash value, a proxy component first appearing in all the proxy components is determined in a pre-set order, and the proxy component first appearing is taken as the proxy component of the edge node.

6. The method of claim 1, wherein, After the step of accessing the edge node for the access request, the method comprises: When it is detected that the resource usage of all the proxy components in any one cluster is less than a fourth preset threshold, the number of the proxy components is reduced; the cluster is used for managing the edge node.

7. An edge node access device, characterized by The device comprises: A setting module is configured to pre-set a plurality of proxy components; A calculation module is configured to perform Hash value calculation on the name of each edge node to obtain a first hash value when the name of the plurality of edge nodes is received; An allocation module is configured to allocate a corresponding proxy component to the edge node according to the first hash value and the second hash value of the proxy component pre-obtained; A receiving module is configured to receive an access request of the corresponding edge node through the proxy component; each proxy component corresponds to at least one edge node; An access module is configured to access the edge node for the access request; when it is detected that the number of edge nodes accessed by each proxy component in any one cluster is greater than a first preset threshold, the number of the proxy components is increased; the cluster is used for managing the edge node; when it is detected that the resource usage of each proxy component in any one cluster is greater than a second preset threshold, the number of the proxy components is increased; when it is detected that there is a timeout error log in a pre-obtained server log, the number of the cluster is increased; when it is detected that the resource usage in any one cluster is greater than a third preset threshold, the number of the cluster is increased.

8. A communication device, characterized by It comprises: a transceiver, a memory, a processor, and a program stored in the memory and executable on the processor; The processor is configured to read the program in the memory to implement the edge node access method in any one of claims 1-6.

9. A readable storage medium for storing a program, characterized in that, The program is executed by the processor to implement the edge node access method in any one of claims 1-6.

Citation Information

Patent Citations

  • Method and device for processing connection allocation, equipment and storage medium

    CN114625527A

  • Service identifier distribution method in computing power aware network and communication device

    CN114844865A