Cluster management method, system, device and medium for edge servers

By electing the master and slave servers in the edge server cluster, the master server adjusts the operating status based on the busyness data of the slave server, solving the problems of resource waste and management efficiency in the existing technology, and achieving more efficient resource utilization and cost reduction.

CN116032932BActive Publication Date: 2025-05-23INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211643327.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-20
Publication Date
2025-05-23
Estimated Expiration
2042-12-20

AI Technical Summary

Technical Problem

The prior art is difficult to efficiently manage edge server clusters, especially in complex scenarios, where task load and idle servers are not effectively monitored, resulting in waste of resources.

Method used

By electing the master and slave servers in the edge server cluster, the master server sends data query requests to the slave server to obtain busyness data, and modify the operating status of the slave server based on this, and manages it using hash table and queue linked list data structures.

Benefits of technology

Improve the work efficiency of edge servers in complex scenarios, reduce resource costs, and optimize resource utilization by dynamically adjusting the server's operating status.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116032932B_ABST
    Figure CN116032932B_ABST
Patent Text Reader

Abstract

The present application provides a cluster management method, system, device and medium for edge servers, including: selecting a master server and a slave server from multiple edge servers; the master server sends a data query request to the slave server to obtain the slave server data corresponding to the slave server and stores it in the master server; the master server determines the busyness of the slave server based on the returned slave server data; the master server modifies the first operating state of the slave server based on the busyness of the slave server. By adding the function of detecting and sorting the busyness of the slave server, the working efficiency of the edge server in complex scenarios is effectively improved and the resource cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a cluster management method, system, electronic device and computer-readable storage medium for edge servers. Background Art

[0002] With the maturity of 5G technology and its increasing application in the commercial field, edge computing has gradually become a hot word in the IT / CT industry. In recent years, edge computing has played an important role in the upgrade of multiple vertical industries such as industry, transportation and agriculture. Among them, edge servers that carry edge computing power have an important position. However, with the implementation and deployment of edge computing application scenarios in various companies, various problems have also emerged. For scenarios with high demand for edge servers, how to efficiently manage edge servers, monitor the presence and running status of edge servers, and dynamically scale the monitoring group has become the most troublesome problem for solution engineers in various companies. However, compared with the centralized management of cloud computing servers (most of which are based on Kubernetes container orchestration), the deployment of edge servers is relatively sparse and dispersed. At the same time, the reasoning tasks on the edge side are usually based on a single edge server (excluding reasoning scenarios such as vehicle-road collaboration that require task offloading), which does not require pooling management of computing resources and storage resources for edge server clusters.

[0003] The existing cluster management technology can only detect abnormal status or keep-alive detection (also called in-place status detection) in the cluster, but cannot monitor the task load of each single edge server in the cluster and manage idle edge servers; for example, in some edge scenarios, regardless of whether there are tasks to execute, idle edge servers and busy edge servers will always run at rated power, and this operating mode causes a certain amount of additional resource waste for idle servers.

[0004] Therefore, there is an urgent need for a cluster management method that can improve the working efficiency of edge servers in complex scenarios to solve the above technical problems. Summary of the invention

[0005] Based on this, it is necessary to provide a cluster management method, system, electronic device and computer-readable storage medium for edge servers to address the above technical problems, so as to add the function of detecting and sorting the busyness of edge servers, further improve the work efficiency of edge servers in complex scenarios, and reduce resource costs.

[0006] In a first aspect, the present application provides a cluster management method for edge servers, the method comprising:

[0007] Select the master server and slave servers from multiple edge servers;

[0008] The master server sends a data query request to the slave server to obtain slave server data corresponding to the slave server and store the data in the master server;

[0009] The master server determines the busyness of the slave server based on the returned slave server data;

[0010] The master server modifies the first operating state of the slave server based on the busyness of the slave server.

[0011] In some embodiments, before the master server broadcasts a data query request to the slave server to obtain slave server data corresponding to the slave server and stores the data in the master server, the method further includes:

[0012] Establishing a hash table in the master server;

[0013] The key of the hash table is used to maintain the slave server IP, and the value of the hash table is used to maintain the slave server data corresponding to the slave server.

[0014] In some embodiments, the master server sends a data query request to the slave server to obtain slave server data corresponding to the slave server and stores the data in the master server, including:

[0015] The master server broadcasts the data query request to the slave server at a preset time interval;

[0016] After receiving the data query request, the slave server returns the corresponding slave server data to the master server.

[0017] In some embodiments, the method further comprises:

[0018] Establishing a queue list on the main server, wherein the queue list includes active queues and inactive queues;

[0019] Wherein, the values ​​of the hash table are stored in the active queue and the inactive queue in the form of linked list nodes;

[0020] The main server manages the linked list nodes in the active queue and the inactive queue based on a preset deactivation mechanism.

[0021] In some embodiments, the main server manages the linked list nodes in the active queue and the inactive queue based on a preset deactivation mechanism, including:

[0022] Determine the active state of the corresponding slave server according to the value of the hash table stored in the linked list node in the active queue;

[0023] If it is determined according to the preset deactivation mechanism that the active state of the slave server does not meet the active condition, the linked list node is rolled back from the active queue to the inactive queue.

[0024] In some embodiments, the method further comprises:

[0025] A status interface is added in the active queue and the inactive queue for a user to modify the second running status of the slave server corresponding to the linked list nodes in the active queue and the inactive queue.

[0026] In some embodiments, the method further comprises:

[0027] If the first running state corresponding to the slave server is inconsistent with the second running state, the running state of the slave server is modified to the first running state.

[0028] In a second aspect, the present application provides a cluster management system for edge servers, the system comprising:

[0029] An election module is used to elect a master server and a slave server from multiple edge servers;

[0030] A processing module, used for sending a data query request to the slave server by using the master server to obtain the slave server data corresponding to the slave server and store it in the master server;

[0031] The processing module is further used to use the master server to determine the busyness of the slave server based on the slave server data returned;

[0032] A maintenance module is used to modify the first operating state of the slave server based on the busyness of the slave server by using the master server.

[0033] In a third aspect, the present application provides an electronic device, the electronic device comprising:

[0034] one or more processors;

[0035] and a memory associated with the one or more processors, the memory being used to store program instructions, the program instructions when read and executed by the one or more processors performing the following operations:

[0036] Select the master server and slave servers from multiple edge servers;

[0037] The master server sends a data query request to the slave server to obtain slave server data corresponding to the slave server and store the data in the master server;

[0038] The master server determines the busyness of the slave server based on the returned slave server data;

[0039] The master server modifies the first operating state of the slave server based on the busyness of the slave server.

[0040] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program enables a computer to perform the following operations:

[0041] Select the master server and slave servers from multiple edge servers;

[0042] The master server sends a data query request to the slave server to obtain slave server data corresponding to the slave server and store the data in the master server;

[0043] The master server determines the busyness of the slave server based on the returned slave server data;

[0044] The master server modifies the first operating state of the slave server based on the busyness of the slave server.

[0045] The beneficial effects achieved by this application are:

[0046] The present application provides a cluster management method for edge servers, the method comprising: selecting a master server and a slave server from multiple edge servers; the master server sends a data query request to the slave server to obtain the slave server data corresponding to the slave server and stores it in the master server; the master server determines the busyness of the slave server based on the returned slave server data; the master server modifies the first operating state of the slave server based on the busyness of the slave server. By adding the function of detecting and sorting the busyness of the slave server, the working efficiency of the edge server in complex scenarios is effectively improved and the resource cost is reduced.

[0047] Furthermore, the cluster management method provided in the present application adopts a one-master-multiple-slave management method, and the master server maintains a complex data structure. The information of each slave server is stored in a linked list node, and each linked list node is maintained in a hash table of the master server in the form of IP as the key, which is convenient for managing and querying the operating status of different slave servers.

[0048] In addition, two bidirectional queue linked lists are maintained in the master server, namely the inactive queue and the slave server active queue, which record the relative activity status of the slave servers. Therefore, the administrator can set different operating powers for the slave servers in the two states according to their relative activity status, thereby achieving the purpose of saving resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work, among which:

[0050] Figure 1 This is a first schematic diagram of a cluster management method for edge servers provided in an embodiment of the present application;

[0051] Figure 2 It is a schematic diagram of the data structure provided in the embodiment of the present application;

[0052] Figure 3 This is a second schematic diagram of a cluster management method for edge servers provided in an embodiment of the present application;

[0053] Figure 4 It is a schematic diagram of the cluster management system architecture for edge servers provided in an embodiment of the present application;

[0054] Figure 5 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0055] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0056] It should be understood that in the description of the present application, unless the context clearly requires otherwise, words such as "include", "comprises", and the like in the entire specification and claims should be interpreted as inclusive rather than exclusive or exhaustive; that is, the meaning of "including but not limited to".

[0057] It should also be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, "plurality" means two or more.

[0058] It should be noted that the terms "S1", "S2", etc. are only used for the purpose of describing the steps, and do not specifically refer to the order or sequence, nor are they used to limit the present application. They are only for the convenience of describing the method of the present application, and cannot be understood as indicating the order of the steps. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present application.

[0059] Embodiment 1

[0060] The present application embodiment provides a cluster management method for edge servers, specifically, Figure 1 As shown, applying the cluster management method to manage the edge server includes:

[0061] S1. Select a master server and a slave server from the edge servers in the cluster.

[0062] Specifically, the main server is selected in the edge server according to the election mechanism, and the remaining edge servers are used as slave servers; wherein, the election mechanism can adopt the Bully algorithm (bully election algorithm) or the Zab (Zookeeper Atomic Broadcast, Zookeeper atomic broadcast) algorithm and other common election algorithms in distributed systems, and this application does not limit the specific election algorithm. Taking the Bully algorithm as an example, the edge servers corresponding to all nodes in the cluster can determine whether their ID is the largest ID among the surviving nodes. If it is, the edge server of the node tells the edge servers of other nodes "I am the main node"; if not, the edge server of the node sends a message of "I need election" to other node servers whose ID is greater than its own ID, and waits for other nodes to return a message of "agree to election". The edge server corresponding to the node that sends the message of "I am the main node" is the main server; if a node sends a message of "I need election" and does not wait for the message of "agree to election", then within a certain time range, the node will become the main node, and send a message of "I am the main node" to other nodes, at which time the edge server corresponding to the node will be the main server. The edge servers other than the main node server in the edge server are slave servers.

[0063] S2. The master server obtains the slave server data and maintains the slave server data in the form of a hash table.

[0064] Specifically, before obtaining the slave server data, the master server establishes a hash table inside it, which is filled with key-value pair information, where the key is used to maintain the slave server IP and the value is used to maintain the slave server data corresponding to the slave server; the above-mentioned slave server data is usually the server busy status and task completion flag, etc., which are used to reflect the busyness of the slave server.

[0065] Among them, the master service broadcasts a data query request to the slave server once at a preset time interval based on the breathing mechanism to enable the master server to continuously poll the slave server to obtain the latest slave server data. After receiving the data query request, the slave server packages the corresponding slave server data and sends it to the master server. The master server stores the slave server data returned by the slave server in the value of the hash table.

[0066] In some implementation scenarios, the main server also maintains a queue list, including two queues: an active queue and an inactive queue. It is worth noting that Figure 2 The data structure shown, the slave server data obtained by the master server is stored in a linked list node and used as the value of the hash table, and each linked list node is maintained in the hash table of the master server in the form of the slave server IP as the key. Among them, the embodiment of the present application also adds a state interface in the active queue and the inactive queue for the user to modify the second running state of the slave server corresponding to the linked list node in the active queue and the inactive queue, for example, the slave server corresponding to the linked list node in the active queue can be required to run at rated power, while the slave server corresponding to the linked list node in the inactive queue is only allowed to run at 2 / 3 of the rated power. According to the value of the hash table stored in the linked list node in the active queue (i.e., the slave server data), the active state of the corresponding slave server is determined; if the active state of the slave server is judged not to meet the active condition according to the preset deactivation mechanism, the linked list node is rolled back from the active queue to the inactive queue. Among them, the preset deactivation mechanism is a mechanism defined by the user according to the specific business content, for example: if no new task triggers activity within five minutes after the completion of the slave server task, then the linked list node corresponding to the slave server will be rolled back from the active queue to the inactive queue, and the slave server will be run as required by the inactive queue. This application proposes to manage slave servers through a bidirectional linked list, thereby achieving the timing of management. Every time the manager wants to operate an inactive queue or an active queue, he does not need to traverse the entire table, but only needs to traverse the corresponding linked list, which greatly saves query time and further improves management efficiency.

[0067] S3. The master server determines the busyness of the slave server based on the returned slave server data and modifies the first operating state of the slave server according to the busyness of the slave server.

[0068] Specifically, the master server continuously obtains the slave server data of each slave server based on the method in step S2 to monitor the busyness of the slave server. Specifically, the busyness judgment standard is customized according to the business content, that is, the customer defines what is busy and what is not busy. For example, the busyness of the slave server is judged by judging whether a certain task process is started. If the task process is started, it is busy, and if the task process is started, it is not busy; or the busyness of the slave server is judged by detecting the concurrency of the business. If the concurrency exceeds a certain threshold, it is busy, and if the concurrency does not exceed the threshold, it is not busy; or the busyness of the slave server is judged by the CPU occupancy rate. If the CPU occupancy rate exceeds a certain threshold, it is busy, and if it does not exceed, it is not busy. The above data used to judge the busyness of the slave service are all included in the slave server data returned by the slave server.

[0069] If the master server determines that a slave server is busy, it increases the operating power of the slave server and uses the current operating power of the slave server as the new first operating state; if the master server determines that a slave server is not busy, it reduces the operating power of the slave server and uses the current operating power of the slave server as the new first operating state. It is worth noting that since the second operating state of the slave service corresponding to the linked list node in the queue is pre-defined in the active queue and the inactive queue through the state interface, but since the modification of the first operating state by the master service is dynamically adjusted under the condition of real-time monitoring of the slave server, in order to realize the dynamic maintenance of the operating state of the slave server, when the operating power of the slave service specified in the first operating state and the second operating state is inconsistent, the operating power specified in the first operating state is used as the operating power of the slave server.

[0070] The embodiment of the present application proposes a cluster management method for edge servers, which determines that a target server is selected as a manager in an edge server cluster by an election mechanism, and the remaining edge servers are managed, and the master server maintains a data structure combination based on a linked list queue and a hash to detect the busyness of the slave server, thereby determining whether the slave server can run at a lower power to achieve the purpose of saving resources. In addition, the method disclosed in the embodiment of the present application is business-oriented and meets customization requirements. Different deactivation mechanisms and slave server operating states can be designed according to different customer needs for different services.

[0071] It is also worth noting that the method disclosed in the embodiment of the present application is not isolated from other methods. The method disclosed in the present application can be easily integrated into other edge server cluster management methods, such as in the cluster management method for anomaly detection; in the cluster management method for anomaly detection, it is only necessary to modify the key-value pair information maintained in the hash table and add an isolation area to merge the two methods.

[0072] Embodiment 2

[0073] Corresponding to the above-mentioned embodiment 1, the embodiment of the present application further provides a cluster management method for edge servers, such as Figure 3 As shown, the details are as follows:

[0074] 3100. Select a master server and a slave server from multiple edge servers;

[0075] 3200. The master server sends a data query request to the slave server to obtain slave server data corresponding to the slave server and stores the data in the master server;

[0076] Preferably, before the master server broadcasts a data query request to the slave server to obtain slave server data corresponding to the slave server and stores the data in the master server, the method further includes:

[0077] 3210. Establish a hash table in the master server;

[0078] The key of the hash table is used to maintain the slave server IP, and the value of the hash table is used to maintain the slave server data corresponding to the slave server.

[0079] Preferably, the master server sends a data query request to the slave server to obtain slave server data corresponding to the slave server and stores the data in the master server, including:

[0080] 3220. The master server broadcasts the data query request to the slave server at a preset time interval;

[0081] 3230. After receiving the data query request, the slave server returns the corresponding slave server data to the master server.

[0082] Preferably, the method further comprises:

[0083] 3240. Establish a queue list on the primary server, where the queue list includes an active queue and an inactive queue;

[0084] Wherein, the values ​​of the hash table are stored in the active queue and the inactive queue in the form of linked list nodes;

[0085] 3250. The main server manages the linked list nodes in the active queue and the inactive queue based on a preset deactivation mechanism.

[0086] Preferably, the main server manages the linked list nodes in the active queue and the inactive queue based on a preset deactivation mechanism, including:

[0087] 3251. Determine the active state of the corresponding slave server according to the value of the hash table stored in the linked list node in the active queue;

[0088] 3252. If it is determined according to a preset deactivation mechanism that the active state of the slave server does not meet the active condition, the linked list node is rolled back from the active queue to the inactive queue.

[0089] Preferably, the method further comprises:

[0090] 3260. Determine the active state of the corresponding slave server according to the value of the hash table stored in the linked list node in the active queue;

[0091] 3270. If it is determined according to a preset deactivation mechanism that the active state of the slave server does not meet the active condition, the linked list node is rolled back from the active queue to the inactive queue.

[0092] Preferably, the method further comprises:

[0093] 3280. Add a status interface in the active queue and the inactive queue to allow a user to modify a second running status of the slave server corresponding to the linked list nodes in the active queue and the inactive queue.

[0094] 3300. The master server determines the busyness of the slave server based on the returned slave server data;

[0095] 3400. The master server modifies the first operating state of the slave server based on the busyness of the slave server.

[0096] Preferably, the method further comprises:

[0097] 3410. If the first operating state corresponding to the slave server is inconsistent with the second operating state, modify the operating state of the slave server to the first operating state.

[0098] Embodiment 3

[0099] Corresponding to the above-mentioned embodiment 1 and embodiment 2, the embodiment of the present application further provides a cluster management system for edge servers, such as Figure 4 As shown, the system includes:

[0100] An election module 410, used to elect a master server and a slave server from a plurality of edge servers;

[0101] Processing module 420, used to use the master server to send a data query request to the slave server to obtain the slave server data corresponding to the slave server and store it in the master server;

[0102] The processing module 420 is further configured to use the master server to determine the busyness of the slave server based on the slave server data returned;

[0103] The maintenance module 430 is used to modify the first operating state of the slave server based on the busyness of the slave server by using the master server.

[0104] In some embodiments, the processing module 420 is also used to establish a hash table in the master server before using the master server to send a data query request to the slave server; wherein the key of the hash table is used to maintain the slave server IP, and the value of the hash table is used to maintain the slave server data corresponding to the slave server.

[0105] In some embodiments, the processing module 420 is also used to broadcast the data query request to the slave server at a preset time period using the master server; the processing module 420 is also used to return the corresponding slave server data to the master server after the slave server receives the data query request.

[0106] In some embodiments, the processing module 420 is also used to establish a queue linked list on the main server, and the queue linked list includes an active queue and an inactive queue; wherein the values ​​of the hash table are stored in the active queue and the inactive queue in the form of linked list nodes; the processing module 420 is also used to use the main server to manage the linked list nodes in the active queue and the inactive queue based on a preset deactivation mechanism.

[0107] In some embodiments, the processing module 420 is also used to determine the active status of the corresponding slave server based on the value of the hash table stored in the linked list node in the active queue; if it is determined according to the preset deactivation mechanism that the active status of the slave server does not meet the active condition, the processing module 420 is also used to roll back the linked list node from the active queue to the inactive queue.

[0108] In some embodiments, the processing module 420 is further configured to add a status interface in the active queue and the inactive queue for a user to modify the second running status of the slave server corresponding to the linked list nodes in the active queue and the inactive queue.

[0109] In some embodiments, the maintenance module 430 is further configured to modify the operating state of the slave server to the first operating state when the first operating state corresponding to the slave server is inconsistent with the second operating state.

[0110] Embodiment 4

[0111] Corresponding to all the above embodiments, an embodiment of the present application provides an electronic device, including: one or more processors; and a memory associated with the one or more processors, the memory being used to store program instructions, and the program instructions, when read and executed by the one or more processors, perform the following operations:

[0112] Select the master server and slave servers from multiple edge servers;

[0113] The master server sends a data query request to the slave server to obtain slave server data corresponding to the slave server and store the data in the master server;

[0114] The master server determines the busyness of the slave server based on the returned slave server data;

[0115] The master server modifies the first operating state of the slave server based on the busyness of the slave server.

[0116] In some implementation scenarios, the following operations are also performed:

[0117] Establishing a hash table in the master server;

[0118] The key of the hash table is used to maintain the slave server IP, and the value of the hash table is used to maintain the slave server data corresponding to the slave server.

[0119] In some implementation scenarios, the following operations are also performed:

[0120] The master server broadcasts the data query request to the slave server at a preset time interval;

[0121] After receiving the data query request, the slave server returns the corresponding slave server data to the master server.

[0122] In some implementation scenarios, the following operations are also performed:

[0123] Establishing a queue list on the main server, wherein the queue list includes active queues and inactive queues;

[0124] Wherein, the values ​​of the hash table are stored in the active queue and the inactive queue in the form of linked list nodes;

[0125] The main server manages the linked list nodes in the active queue and the inactive queue based on a preset deactivation mechanism.

[0126] In some implementation scenarios, the following operations are also performed:

[0127] Determine the active state of the corresponding slave server according to the value of the hash table stored in the linked list node in the active queue;

[0128] If it is determined according to the preset deactivation mechanism that the active state of the slave server does not meet the active condition, the linked list node is rolled back from the active queue to the inactive queue.

[0129] In some implementation scenarios, the following operations are also performed:

[0130] A status interface is added in the active queue and the inactive queue for a user to modify the second running status of the slave server corresponding to the linked list nodes in the active queue and the inactive queue.

[0131] In some implementation scenarios, the following operations are also performed:

[0132] If the first running state corresponding to the slave server is inconsistent with the second running state, the running state of the slave server is modified to the first running state.

[0133] in, Figure 5 The architecture of the electronic device is shown as an example, which may include a processor 510, a video display adapter 511, a disk drive 512, an input / output interface 513, a network interface 514, and a memory 520. The processor 510, the video display adapter 511, the disk drive 512, the input / output interface 513, the network interface 514, and the memory 520 may be communicatively connected via a bus 530.

[0134] Among them, the processor 510 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, etc., to execute relevant programs to implement the technical solution provided in this application.

[0135] The memory 520 can be implemented in the form of ROM (Read Only Memory, programmable memory), RAM (Random Access Memory, random access memory), static storage device, dynamic storage device, etc. The memory 520 can store an operating system 521 for controlling the execution of the electronic device 500, and a basic input and output system (BIOS) 522 for controlling the low-level operations of the electronic device 500. In addition, a web browser 523, a data storage management system 524, and an icon font processing system 525, etc. can also be stored. The above-mentioned icon font processing system 525 can be an application program that specifically implements the operations of the aforementioned steps in the embodiment of the present application. In short, when the technical solution provided in the present application is implemented by software or firmware, the relevant program code is stored in the memory 520 and is called and executed by the processor 510.

[0136] The input / output interface 513 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0137] The network interface 514 is used to connect to a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0138] The bus 530 comprises a pathway for transmitting information between the various components of the device (eg, the processor 510, the video display adapter 511, the disk drive 512, the input / output interface 513, the network interface 514, and the memory 520).

[0139] In addition, the electronic device 500 can also obtain information on specific collection conditions from the virtual resource object collection condition information database for use in condition judgment, etc.

[0140] It should be noted that, although the above device only shows a processor 510, a video display adapter 511, a disk drive 512, an input / output interface 513, a network interface 514, a memory 520, a bus 530, etc., in the specific implementation process, the device may also include other components necessary for normal execution. In addition, it can be understood by those skilled in the art that the above device may also only include components necessary for implementing the solution of the present application, and does not necessarily include all the components shown in the figure.

[0141] Embodiment 5

[0142] Corresponding to all the above embodiments, the embodiments of the present application further provide a computer-readable storage medium, characterized in that it stores a computer program, and the computer program enables a computer to perform the following operations:

[0143] Select the master server and slave servers from multiple edge servers;

[0144] The master server sends a data query request to the slave server to obtain slave server data corresponding to the slave server and store the data in the master server;

[0145] The master server determines the busyness of the slave server based on the returned slave server data;

[0146] The master server modifies the first operating state of the slave server based on the busyness of the slave server.

[0147] In some embodiments, the computer program causes the computer to further perform the following operations:

[0148] Establishing a hash table in the master server;

[0149] The key of the hash table is used to maintain the slave server IP, and the value of the hash table is used to maintain the slave server data corresponding to the slave server.

[0150] In some embodiments, the computer program causes the computer to further perform the following operations:

[0151] The master server broadcasts the data query request to the slave server at a preset time interval;

[0152] After receiving the data query request, the slave server returns the corresponding slave server data to the master server.

[0153] In some embodiments, the computer program causes the computer to further perform the following operations:

[0154] Establishing a queue list on the main server, wherein the queue list includes active queues and inactive queues;

[0155] Wherein, the values ​​of the hash table are stored in the active queue and the inactive queue in the form of linked list nodes;

[0156] The main server manages the linked list nodes in the active queue and the inactive queue based on a preset deactivation mechanism.

[0157] In some embodiments, the computer program causes the computer to further perform the following operations:

[0158] Determine the active state of the corresponding slave server according to the value of the hash table stored in the linked list node in the active queue;

[0159] If it is determined according to the preset deactivation mechanism that the active state of the slave server does not meet the active condition, the linked list node is rolled back from the active queue to the inactive queue.

[0160] In some embodiments, the computer program causes the computer to further perform the following operations:

[0161] A status interface is added in the active queue and the inactive queue for a user to modify the second running status of the slave server corresponding to the linked list nodes in the active queue and the inactive queue.

[0162] In some embodiments, the computer program causes the computer to further perform the following operations:

[0163] If the first running state corresponding to the slave server is inconsistent with the second running state, the running state of the slave server is modified to the first running state.

[0164] It can be seen from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., including several instructions for enabling a computer device (which can be a personal computer, a cloud service end, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.

[0165] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.

[0166] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A cluster management method for edge servers, characterized in that, the method includes: electing a primary server and slave servers from multiple edge servers; establishing a hash table in the primary server; wherein, the key of the hash table is used to maintain the IP of the slave server, and the value of the hash table is used to maintain the slave server data corresponding to the slave server; the primary server sends a data query request to the slave server to obtain the slave server data corresponding to the slave server and stores it in the primary server; the primary server determines the busy degree of the slave server based on the returned slave server data; the primary server modifies the first running state of the slave server based on the busy degree of the slave server; the method further includes establishing a queue linked list in the primary server, and the queue linked list includes an active queue and an inactive queue; wherein, the value of the hash table is stored in the active queue and the inactive queue in the form of a linked list node; the primary server manages the linked list nodes in the active queue and the inactive queue based on a preset deactivation mechanism.

2. The method according to claim 1, characterized in that, the primary server sends a data query request to the slave server to obtain the slave server data corresponding to the slave server and stores it in the primary server, including: the primary server broadcasts the data query request to the slave server at preset time intervals; after receiving the data query request, the slave server returns the corresponding slave server data to the primary server.

3. The method according to claim 1, characterized in that, the primary server manages the linked list nodes in the active queue and the inactive queue based on a preset deactivation mechanism, including: determining the active state of the corresponding slave server according to the value of the hash table stored in the linked list node in the active queue; if it is determined according to the preset deactivation mechanism that the active state of the slave server does not meet the active condition, the linked list node is rolled back from the active queue to the inactive queue.

4. The method according to claim 3, characterized in that, the method further includes: adding a status interface in the active queue and the inactive queue for the user to modify the second running state of the slave server corresponding to the linked list node in the active queue and the inactive queue.

5. The method according to claim 4, characterized in that, the method further includes: if the first running state corresponding to the slave server is inconsistent with the second running state, modifying the running state of the slave server to the first running state.

6. A cluster management system for edge servers, characterized in that, the system includes: an election module for electing a primary server and slave servers from multiple edge servers; a processing module for establishing a hash table in the primary server; wherein, the key of the hash table is used to maintain the IP of the slave server, and the value of the hash table is used to maintain the slave server data corresponding to the slave server; The processing module is further used to use the master server to send a data query request to the slave server to obtain the slave server data corresponding to the slave server and store it in the master server; The processing module is further used to use the master server to determine the busyness of the slave server based on the slave server data returned; A maintenance module, configured to modify the first operating state of the slave server based on the busyness of the slave server by using the master server; The processing module is further used to establish a queue list on the main server, wherein the queue list includes active queues and inactive queues; Wherein, the values ​​of the hash table are stored in the active queue and the inactive queue in the form of linked list nodes; The main server manages the linked list nodes in the active queue and the inactive queue based on a preset deactivation mechanism.

7. An electronic device, It is characterized in that The electronic device comprises: one or more processors; And a memory associated with the one or more processors, the memory is used to store program instructions, and when the program instructions are read and executed by the one or more processors, the method according to any one of claims 1-5 is executed.

8. A computer-readable storage medium, It is characterized in that The computer program stores a computer program, wherein the computer program enables a computer to execute the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Monitoring server operation method, monitoring server and storage medium

    CN111565135A

  • Server monitoring method and system

    CN112131073A

  • Server cluster management method and device and related components

    CN112437145A