A method, apparatus, and electronic device for managing a DHCP agent.

Through the DHCP proxy manager, the selected information and request information of the DHCP proxy side are processed and forwarded, and the identification list is generated and sent to the DHCP scheduler. This solves the problem of message queue blocking caused by a large number of DHCP proxy side under the DHCP scheduler, and improves the system's Stability and efficiency.

CN114301875BActive Publication Date: 2025-02-07RUIJIE NETWORKS CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111574611.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-21
Publication Date
2025-02-07
Estimated Expiration
2041-12-21

AI Technical Summary

Technical Problem

When the DHCP scheduler manages a large number of DHCP proxy ends, excessive heartbeat information or request information causes the RPC message queue to block, affecting the communication between the DHCP scheduler and the DHCP proxy end.

Method used

The selected information and request information are received and processed through the DHCP proxy manager, and generated an identification list of the online DHCP proxy, and sent it to the DHCP scheduler to reduce sending messages directly to the DHCP scheduler, thereby avoiding message queue blocking.

Benefits of technology

It effectively reduces the amount of messages processed by the DHCP scheduler, avoids the blocking of the message queue, and improves the efficiency and stability of DHCP proxy management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114301875B_ABST
    Figure CN114301875B_ABST
Patent Text Reader

Abstract

A method, device and electronic device for managing and controlling a DHCP agent, the method comprising: receiving selected information or request information sent by each DHCP agent connected in communication, the request information being used to request to obtain corresponding network resource information from the DHCP agent manager, determining an identification list of online DHCP agents based on each selected information, and sending the identification list to the DHCP scheduler, or obtaining network resource information corresponding to each DHCP agent that sends each request information, and sending the network resource information corresponding to each DHCP agent to the corresponding DHCP agent. Through the above method, the DHCP agent manager is used instead of the DHCP scheduler to process the message sent by the DHCP agent to the DHCP scheduler, thereby avoiding the message queue being blocked due to the DHCP scheduler not processing a large number of messages in a timely manner.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer network communication technology, and in particular to a method, device and electronic device for controlling a DHCP agent. Background Art

[0002] Before the service host used by the user is connected to the Internet, the network administrator needs to configure an Internet Protocol (IP) address for the service host. With the development of network technology, the Dynamic Host Configuration Protocol (DHCP) technology can be used to realize the automatic allocation of the IP address of the service host. Specifically, the automatic allocation of the IP address of the service host can be realized based on the DHCP scheduler, DHCP agent and DHCP server. The specific process is as follows:

[0003] When a service host needs an IP address, it sends an IP address allocation request to the DHCP scheduler. After receiving the IP address allocation request, the DHCP scheduler determines all online DHCP agents connected to it, and parses the port information of the service host in the IP address allocation request. Based on the port information, it determines an online DHCP agent from all online DHCP agents, and sends an instruction to create a DHCP server to the determined online DHCP agent. The online DHCP agent will create a DHCP server according to the above instruction. The DHCP server will exchange information with the service host based on the port corresponding to the port information of the service host, allocate an IP address to the service host and send the IP address to the service host through the port of the service host, thereby realizing the automatic allocation of IP addresses to service hosts using DHCP technology.

[0004] In the above process of automatically allocating IP addresses of service hosts, the DHCP scheduler needs to determine all online DHCP agents, which can be determined specifically based on whether the DHCP agents report heartbeat information.

[0005] In addition, if the DHCP agent changes from an offline state to an online state, the DHCP agent will send a request message to the connected DHCP scheduler to request to obtain the network resource information associated with the DHCP agent from the data of the DHCP scheduler, and the network resource information includes: the network of the service host, the subnet of the service host, the port of the service host, etc. Among them, the heartbeat information or request information sent by the DHCP agent to the DHCP scheduler is transmitted through the message queue of the Remote Procedure Call (RPC).

[0006] If a single DHCP scheduler is connected to too many DHCP proxies, the single DHCP scheduler may receive too many heartbeat messages or request messages at the same time. If the number of heartbeat messages or request messages exceeds the carrying capacity of the RPC message queue, a large number of heartbeat messages or request messages will be queued in the RPC message queue, thereby blocking the RPC message queue between the DHCP scheduler and the connected DHCP proxies. Summary of the invention

[0007] The present application provides a management and control method, device and electronic device for a DHCP agent. By processing selected information and request information sent by a received DHCP agent, an identification list of online DHCP agents is generated according to the DHCP agent that sent the selected information, and the identification list is sent to a DHCP scheduler, and the binding relationship information between the DHCP agent and the network resource information corresponding to the request information is returned to the DHCP agent, thereby avoiding the problem that each selected information and request message is sent to the DHCP scheduler through a message queue, resulting in a message queue in the DHCP scheduler being blocked.

[0008] In a first aspect, the present application provides a method for managing and controlling a DHCP agent, the method comprising:

[0009] Receiving selected information or request information sent by each DHCP agent terminal in communication connection, wherein the request information is used to request to obtain corresponding network resource information from the DHCP agent terminal manager;

[0010] Determine the identification list of online DHCP agents based on each selected information, and send the identification list to the DHCP scheduler; or obtain the network resource information corresponding to the DHCP agent that sends each request information, and send the network resource information corresponding to each DHCP agent to the corresponding DHCP agent.

[0011] Through the method described above, the DHCP agent manager processes the selected information or request information sent by the DHCP agent, generates an identification list of online DHCP agents, and sends the identification list to the DHCP scheduler, thereby reducing the messages in the message queue and avoiding message blocking in the message queue.

[0012] In a possible design, before receiving the selected information and the request information sent by each DHCP agent end of the communication connection, the method further includes:

[0013] Detecting the number of DHCP agents to which the DHCP agent manager is communicatively connected;

[0014] Determining whether the quantity value exceeds a set threshold;

[0015] If it is determined that the quantity value exceeds the set threshold, migrating the selected DHCP agents in the quantity that exceed the threshold to the newly added DHCP agent manager;

[0016] If it is determined that the quantity value does not exceed the set threshold, the association relationship between the DHCP agent manager and the DHCP agent connected in communication is obtained, and the association relationship is sent to the DHCP scheduler.

[0017] In a possible design, obtaining network resource information corresponding to each DHCP agent that sends each request information includes:

[0018] Parsing the identification information corresponding to each DHCP agent from each request information;

[0019] The network resource information corresponding to each DHCP agent is obtained based on the parsed identification information.

[0020] In one possible design, sending the identification list to the DHCP scheduler specifically includes:

[0021] Reading the message distribution mechanism in the message queue of the DHCP agent manager;

[0022] Establishing a first information channel with the DHCP scheduler based on the message distribution mechanism;

[0023] The identification list is sent to the DHCP scheduler through the first information channel.

[0024] In a possible design, after determining a list of online DHCP agent identifications based on each selected information and sending the list of identifications to the DHCP scheduler; or obtaining network resource information corresponding to each DHCP agent sending each request information and sending the network resource information corresponding to each DHCP agent to the corresponding DHCP agent, the method further includes:

[0025] receiving first information sent by the DHCP scheduler, wherein the first information includes location information of a service host and identification information matched from a database of the DHCP scheduler based on the location information;

[0026] Determine the DHCP agent corresponding to the identification information;

[0027] The port information of the service host is sent to the DHCP agent corresponding to the identification information.

[0028] In a second aspect, the present application provides a management and control device for a DHCP agent, the device comprising:

[0029] A receiving module, used for receiving selected information or request information sent by each DHCP agent terminal of the communication connection;

[0030] The sending module is used to determine the identification list of online DHCP agents based on each selected information, send the identification list to the DHCP scheduler or obtain the network resource information corresponding to the DHCP agent that sends each request information, and send the network resource information corresponding to the DHCP agent to the corresponding DHCP agent.

[0031] In one possible design, the receiving module is specifically used to detect the number of DHCP agents that are communicatively connected to the DHCP agent manager, determine whether the number value exceeds a set threshold, and if it is determined that the number value exceeds the set threshold, migrate the selected DHCP agents that exceed the threshold in the number to a newly added DHCP agent manager; if it is determined that the number value does not exceed the set threshold, obtain an association relationship between the DHCP agent manager and the communicatively connected DHCP agents, and send the association relationship to the DHCP scheduler.

[0032] In a possible design, the sending module is specifically configured to parse out identification information corresponding to each DHCP agent from each request information, and obtain network resource information corresponding to each DHCP agent based on the parsed identification information.

[0033] In a possible design, the sending module is further used to establish a first information channel with the DHCP scheduler according to a message distribution mechanism in a message queue of the DHCP agent manager.

[0034] In one possible design, the sending module is further used to read a message distribution mechanism in a message queue of the DHCP agent manager, establish a first information channel with the DHCP scheduler based on the message distribution mechanism, and send the identification list to the DHCP scheduler through the first information channel.

[0035] In one possible design, the sending module is further used to receive first information sent by the DHCP scheduler, the first information including location information of the service host and identification information matched from a database of the DHCP scheduler based on the location information, determine the DHCP agent corresponding to the identification information, and send the port information of the service host to the DHCP agent corresponding to the identification information.

[0036] In a third aspect, the present application provides an electronic device, including:

[0037] Memory, used to store computer programs;

[0038] The processor is used to implement the above-mentioned steps of the management and control method of a DHCP agent when executing the computer program stored in the memory.

[0039] In a fourth aspect, a computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements the above-mentioned steps of the management and control method of a DHCP proxy.

[0040] For each aspect from the first to the fourth aspect and the technical effects that may be achieved by each aspect, please refer to the above description of the technical effects that can be achieved by the first aspect or various possible schemes in the first aspect, and no further details will be given here. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 A flowchart of the steps of a DHCP agent management and control method provided in this application;

[0042] Figure 2 A schematic diagram of the association relationship between the DHCP scheduler, DHCP agent manager, and DHCP agent provided in this application;

[0043] Figure 3 A schematic diagram of the association relationship between the message queue provided in this application and the DHCP agent manager and the DHCP agent;

[0044] Figure 4 A schematic diagram of the structure of a DHCP proxy management and control device provided in this application;

[0045] Figure 5 A schematic diagram of the structure of an electronic device provided in this application. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The specific operating methods in the method embodiments can also be applied to device embodiments or system embodiments. It should be noted that in the description of the present application, "multiple" is understood as "at least two". "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A is connected to B, which can represent: A is directly connected to B and A is connected to B through C. In addition, in the description of the present application, words such as "first" and "second" are only used to distinguish the purpose of description, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.

[0047] In the previous technology, a DHCP scheduler manages a large number of DHCP agents, and a DHCP scheduler processes the heartbeat information or request information sent by all DHCP agents. When there are many DHCP agents sending heartbeat information or request information, the same DHCP scheduler cannot process the heartbeat information or request information sent by the DHCP agents at the same time. The heartbeat information or request information will be in a queued waiting state in the RPC message queue, resulting in the blocking of the RPC message queue between the DHCP scheduler and the DHCP agents.

[0048] In order to solve the above problems, the embodiment of the present application provides a method for managing and controlling a DHCP agent, which manages a specified number of DHCP agents through a DHCP agent manager to prevent the DHCP agent from directly sending selected information or request information to the DHCP scheduler, thereby avoiding the blocking of the RPC message queue of the DHCP scheduler. Among them, the method and device described in the embodiment of the present application are based on the same technical concept. Since the principles of the problems solved by the method and the device are similar, the embodiments of the device and the method can refer to each other, and the repeated parts will not be repeated.

[0049] The embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0050] Reference Figure 1 The present application provides a DHCP agent management method, which can solve the problem of RPC message queue blocking between the DHCP scheduler and the DHCP agent. The implementation process of the method is as follows:

[0051] Step S1: receiving selected information or request information sent by each DHCP agent terminal in communication connection, wherein the request information is used to request to obtain corresponding network resource information from the DHCP agent terminal manager.

[0052] In the embodiment of the present application, in order to effectively manage the DHCP agent, a DHCP agent manager is set between the DHCP scheduler and the DHCP agent. The DHCP agent manager can manage multiple DHCP agents. The relationship diagram between the DHCP scheduler, the DHCP agent manager, and the DHCP agent is shown in FIG. Figure 2 As shown, Figure 2 The line in the figure represents the association relationship. n is the threshold for the DHCP agent manager to control the DHCP agent. For the association relationship between other DHCP agents and DHCP agent managers, please refer to Figure 2 The association relationship between any DHCP agent and the DHCP agent manager.

[0053] In order to enable a DHCP agent manager to control a specified number of DHCP agents and prevent too many DHCP agents from sending information to the DHCP agent manager, which would block the message queue of the DHCP agent manager, the DHCP agent manager needs to detect the number of DHCP agents in communication connections and determine whether the number of DHCP agents exceeds a threshold.

[0054] If the number of detected DHCP agents exceeds the threshold, it means that the number of DHCP agents is large, and it is necessary to add a DHCP agent manager, and the selected DHCP agents that exceed the threshold are migrated to the newly added DHCP agent manager for management. In the embodiment of the present application, when it is detected that the number of DHCP agents is large and it is necessary to increase the number of DHCP agent managers, the specific process of determining the number of DHCP agent managers is as follows:

[0055] When the current DHCP agent manager detects that the number of DHCP agents connected to the communication is large, it will migrate the DHCP agents that exceed the threshold to the newly added DHCP agent manager. The newly added DHCP agent manager will detect the number of DHCP agents connected to the communication again. If the number of received DHCP agents does not exceed the threshold, the DHCP agent manager will not be added. If the number of received DHCP agents exceeds the threshold, the DHCP agent manager will continue to be added, and the DHCP agents that exceed the threshold will be migrated to the added DHCP agent manager.

[0056] By the above method, the DHCP agent manager can be flexibly increased according to the number of DHCP agents, thereby avoiding the DHCP agent manager processing information sent by multiple DHCP agents at the same time, and realizing efficient management of the DHCP agents by the DHCP agent manager.

[0057] After the number of DHCP agent managers is determined, the association relationship between the DHCP agent manager and all DHCP agents communicating with the DHCP agent manager can also be established through the message queue of the DHCP agent manager. The specific process is as follows:

[0058] First, the message queue of the DHCP agent manager is associated with the DHCP agent connected to the DHCP agent manager, and then the DHCP agent manager is associated with the address information of the message queue. The association relationship between the DHCP agent manager, the DHCP agent, and the message queue is as follows: Figure 3 As shown, Figure 3 The line in the figure represents the association relationship. n represents the threshold at which the DHCP agent manager can control the DHCP agent. For other association relationships between DHCP agents and message queues, refer to Figure 3 Any relationship in .

[0059] After the DHCP agent manager is associated with all DHCP agents in communication connection, the DHCP agent manager will receive selected information or request information sent by the DHCP agent. In the embodiment of the present application, the selected information can be heartbeat information. The heartbeat information is sent according to a preset period. The heartbeat information indicates that the DHCP agent is currently online. The request information is used to request to obtain corresponding network resource information from the DHCP agent manager.

[0060] It should be further explained that, in the embodiment of the present application, when DHCP agents are upgraded in batches or a large number of them are offline and then come online, each DHCP agent will send a request for obtaining corresponding network resource information to the same DHCP agent manager through the RPC message queue, and the DHCP agent manager will receive the request for obtaining network resource information sent by the DHCP agent.

[0061] Through the above description, the DHCP agent manager will receive the heartbeat information or request information sent by the DHCP agent instead of the DHCP scheduler, avoiding sending the heartbeat information or request information directly to the DHCP scheduler, thereby avoiding the heartbeat information or request information from accumulating in the RPC message queue between the DHCP scheduler and the DHCP agent manager.

[0062] Step S2: determining the identification list of online DHCP agents based on each selected information, and sending the identification list to the DHCP scheduler; or obtaining the network resource information corresponding to the DHCP agent that sends each request information, and sending the network resource information corresponding to the DHCP agent to the corresponding DHCP agent.

[0063] In the above description, the DHCP agent manager can determine that the DHCP agent is an online DHCP agent through the heartbeat information sent by the DHCP agent. In the embodiment of the present application, the DHCP agent has three states, namely: offline state, online open state, and online closed state. The states of the DHCP agent and the functions of the DHCP agent in different states are shown in Table 1:

[0064]

[0065]

[0066] Table 1

[0067] In the embodiment of the present application, a DHCP agent in an offline state cannot send or receive any information, and the DHCP agent manager cannot detect the existence of a DHCP agent in an offline state; a DHCP agent in an online closed state sends a heartbeat message to prove that the DHCP agent is online, and will not receive information from the DHCP agent manager or send information to the DHCP agent manager; a DHCP agent in an online open state can send information to the DHCP agent manager, and can also receive information sent by the DHCP agent manager.

[0068] After explaining the three states of the DHCP agent, when the DHCP agent sends a heartbeat message to the DHCP agent manager, the DHCP agent can determine the online DHCP agent as the DHCP agent that sends the heartbeat message, and generate an identification list according to the online DHCP agent. The identification list is shown in Table 2:

[0069]

[0070] Table 2

[0071] In the above Table 2, only DHCP agent 1 and DHCP agent 2 are listed as examples of DHCP agents. The storage forms of other online DHCP agents in Table 2 refer to DHCP agent 1 or DHCP agent 2, which will not be elaborated here.

[0072] In addition, when DHCP agents are upgraded in batches or a large number of them are offline and then put online, the DHCP agent manager will receive request information sent by the DHCP agents. The DHCP agent manager will parse out identification information corresponding to each DHCP agent from each received request information. The identification information is used to identify the DHCP agent to which the DHCP agent manager is communicating. After obtaining the identification information of each DHCP agent, the network resource information corresponding to each DHCP agent is obtained based on each identification information. The network resource information includes information such as the network of the business host, the subnet of the business host, and the port of the business host. After obtaining the network resource information corresponding to each DHCP agent, the network resource information is sent to the corresponding DHCP agent.

[0073] From the above Table 1, it can be known that all DHCP agents that send request information to the DHCP agent manager are in the online open state. Therefore, the DHCP agent can determine the DHCP agent in the online open state and the DHCP agent in the online closed state through the DHCP agent that sends the heartbeat information and the DHCP agent that sends the request information. The DHCP agent in the online open state sends the heartbeat information and the request information to the DHCP agent manager, and the DHCP agent in the online closed state only sends the heartbeat message to the DHCP agent manager. Therefore, the DHCP agent that does not send the request information to the DHCP agent manager is regarded as the DHCP agent in the online closed state. The status list is shown in Table 3:

[0074]

[0075] Table 3

[0076] After receiving the request information sent by the DHCP agent of the communication connection, the DHCP agent manager will directly process the request information sent by the DHCP agent and will not send the request information to the DHCP scheduler. Therefore, the messages sent by the DHCP agent to the DHCP scheduler are reduced, thereby avoiding the blocking of the message queue of the DHCP scheduler.

[0077] Through the above description, the DHCP agent manager determines the online DHCP agent according to the DHCP scheduler that sends the heartbeat information, and generates an identification list based on the online DHCP agent. In addition, the DHCP agent manager determines the status list of the DHCP agent according to the DHCP agent that sends the request information. After the DHCP agent manager obtains the identification list and the status list, the DHCP agent manager needs to send the identification list and the status list to the DHCP scheduler. In a possible design, the DHCP agent manager can also directly send the identification list and the status list to the database of the DHCP scheduler.

[0078] Specifically, before the DHCP agent manager sends the identification list and the status list to the DHCP scheduler, the DHCP agent manager needs to establish a first information channel according to the message distribution mechanism in the message queue. Each DHCP agent manager will be bound to an information channel when it is established. Each information channel has address information. After the first information channel is established, the DHCP agent manager sends the address information of the first information channel directly to the DHCP scheduler or the database of the DHCP scheduler.

[0079] After the first information channel is established, the DHCP agent manager can send the identification list and the status list to the DHCP scheduler.

[0080] Through the above method, the DHCP agent manager directly processes the information sent by the DHCP agent, avoiding the DHCP scheduler to directly process the information sent by the DHCP agent, and sends the online DHCP agents to the DHCP scheduler in the form of an identification list, reducing the amount of information sent to the DHCP scheduler, thereby reducing the pressure on the DHCP scheduler to process the information sent by the DHCP agent, and further avoiding the blocking of the RPC message queue.

[0081] After the DHCP agent manager sends the identification list and status list to the DHCP dispatcher, when the user's business host needs an IP address, it needs to send an IP address allocation request to the DHCP dispatcher. After the DHCP dispatcher receives the IP address allocation request, it will parse the port information of the business host and the location information corresponding to the port information according to the IP address allocation request. The DHCP dispatcher then finds the first DHCP agent on the computer node to which the port information belongs based on the port information of the business host, determines the identification information of the first DHCP agent, and then generates the first information based on the identification information of the first DHCP agent and the port information of the business host, and sends the first information to the DHCP agent manager through the first information channel.

[0082] After receiving the first message, the DHCP agent manager reads the identification information in the first message, finds the first DHCP agent according to the identification information, and then sends the first message to the first DHCP agent. The first DHCP agent parses the content in the first message and creates a DHCP server according to the content of the first message.

[0083] After the first DHCP agent creates a DHCP server, the DHCP server obtains the port of the service host according to the port information of the service host. The DHCP server then allocates an IP address to the service host and sends the IP address to the service host through the port of the service host. In the embodiment of the present application, since the DHCP server allocates an IP address to the service host, which is a technology well known to those skilled in the art, it will not be elaborated here.

[0084] It should be further explained that a DHCP server can assign IP addresses to multiple service hosts in the same network. One network corresponds to one DHCP server. When a service host goes offline, the DHCP server will reclaim the IP address of the service host. When all service hosts in the network corresponding to a DHCP server go offline, the DHCP scheduler will notify the DHCP agent manager through the first information channel. The DHCP agent manager will pass the message to the corresponding DHCP agent, and the DHCP agent will delete the DHCP server corresponding to the network.

[0085] Through the method described above, the DHCP agent manager can receive and process the selected information and request information of the DHCP agent, avoiding the DHCP agent from sending a large amount of selected information and request information directly to the DHCP scheduler, reducing the pressure on the DHCP scheduler to process data information, and avoiding message queue congestion caused by a large number of DHCP agents sending information.

[0086] Based on the same inventive concept, the present application also provides a DHCP agent end control device for realizing the function of a DHCP agent end control method, referring to Figure 4 , the device comprises:

[0087] The receiving module 401 is used to receive the selected information or request information sent by each DHCP agent terminal of the communication connection;

[0088] The sending module 402 is used to determine the identification list of online DHCP agents based on each selected information, send the identification list to the DHCP scheduler or obtain the network resource information corresponding to the DHCP agent that sends each request information, and send the network resource information corresponding to the DHCP agent to the corresponding DHCP agent.

[0089] In one possible design, the receiving module 401 is specifically used to detect the number of DHCP agents connected to the DHCP agent manager for communication, determine whether the number value exceeds a set threshold, and if it is determined that the number value exceeds the set threshold, migrate the selected DHCP agents that exceed the threshold in the number to a newly added DHCP agent manager; if it is determined that the number value does not exceed the set threshold, obtain an association relationship between the DHCP agent manager and the DHCP agents connected for communication, and send the association relationship to the DHCP scheduler.

[0090] In a possible design, the sending module 402 is specifically configured to parse out identification information corresponding to each DHCP agent from each request information, and obtain network resource information corresponding to each DHCP agent based on the parsed identification information.

[0091] In a possible design, the sending module 402 is further configured to establish a first information channel with the DHCP scheduler according to a message distribution mechanism in a message queue of the DHCP agent manager.

[0092] In one possible design, the sending module 402 is further used to read a message distribution mechanism in a message queue of the DHCP agent manager, establish a first information channel with the DHCP scheduler based on the message distribution mechanism, and send the identification list to the DHCP scheduler through the first information channel.

[0093] In one possible design, the sending module 402 is further used to receive first information sent by the DHCP scheduler, the first information including location information of the service host and identification information matched from a database of the DHCP scheduler based on the location information, determine the DHCP agent corresponding to the identification information, and send the port information of the service host to the DHCP agent corresponding to the identification information.

[0094] Through the above device, the DHCP agent manager is used to manage the DHCP agents of the communication connection, and process the selected information or request information sent by the DHCP agent. After processing the selected information of the DHCP agent, an identification list is generated and sent to the DHCP scheduler, and the request information sent by the DHCP agent is directly processed instead of the DHCP scheduler, thereby reducing the information in the message queue and avoiding message blocking of the message queue.

[0095] Based on the same inventive concept, an electronic device is also provided in the embodiment of the present application, and the electronic device can realize the functions of the control device of the aforementioned DHCP proxy end, referring to Figure 5 , the electronic device comprises:

[0096] At least one processor 501, and a memory 502 connected to the at least one processor 501. The specific connection medium between the processor 501 and the memory 502 is not limited in the embodiment of the present application. Figure 5 In the example, the processor 501 and the memory 502 are connected via a bus 500. The bus 500 is Figure 5 The connections between other components are shown in bold lines, and are not intended to be limiting. The bus 500 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, Figure 5 Only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. Alternatively, the processor 501 can also be called a controller, and there is no limitation on the name.

[0097] In the embodiment of the present application, the memory 502 stores instructions that can be executed by at least one processor 501. The at least one processor 501 can execute the above-mentioned method for managing and controlling a DHCP proxy terminal by executing the instructions stored in the memory 502. The processor 501 can implement Figure 4 The functions of each module in the device shown.

[0098] Among them, the processor 501 is the control center of the device, and can use various interfaces and lines to connect the various parts of the entire control device. By running or executing instructions stored in the memory 502 and calling data stored in the memory 502, the various functions of the device and processing data, the device can be monitored as a whole.

[0099] In one possible design, the processor 501 may include one or more processing units, and the processor 501 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 501. In some embodiments, the processor 501 and the memory 502 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on separate chips.

[0100] The processor 501 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the management and control method of a DHCP proxy terminal disclosed in the embodiments of the present application may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0101] The memory 502 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 502 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 502 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 502 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.

[0102] By programming the processor 501, the code corresponding to the control method of a DHCP agent terminal introduced in the above embodiment can be fixed into the chip, so that the chip can execute the control method when running. Figure 1 The embodiment shown is a control step of a DHCP proxy terminal. How to design and program the processor 501 is a technology well known to those skilled in the art and will not be described in detail here.

[0103] Based on the same inventive concept, an embodiment of the present application further provides a storage medium, which stores computer instructions. When the computer instructions are executed on a computer, the computer executes a DHCP proxy management method discussed above.

[0104] In some possible implementations, various aspects of a DHCP proxy management method provided by the present application may also be implemented in the form of a program product, which includes a program code. When the program product is run on an apparatus, the program code is used to enable the control device to execute the steps of a DHCP proxy management method according to various exemplary implementations of the present application described above in this specification.

[0105] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0106] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0107] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0108] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0109] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A method for controlling a Dynamic Host Configuration Protocol DHCP agent, characterized in that: The method is applied to a DHCP agent manager provided on a selected computing server among at least one computing server, wherein the DHCP agent manager is communicatively connected with a DHCP agent on the at least one computing server, and the DHCP agent manager is also communicatively connected with a DHCP scheduler, and includes: Receiving selected information or request information sent by each DHCP agent terminal in communication connection, wherein the request information is used to request to obtain corresponding network resource information from the DHCP agent terminal manager; Based on each selected information, an identification list of online DHCP agents is determined, and a message distribution mechanism in a message queue of the DHCP agent manager is read; a first information channel with the DHCP scheduler is established based on the message distribution mechanism; the identification list is sent to the DHCP scheduler through the first information channel; or, network resource information corresponding to each DHCP agent that sends each request information is obtained, and the network resource information corresponding to each DHCP agent is sent to the corresponding DHCP agent.

2. The method according to claim 1, characterized in that Before receiving the selected information or request information sent by each DHCP agent end of the communication connection, the method further includes: Detecting the number of DHCP agents to which the DHCP agent manager is communicatively connected; determining whether the amount exceeds a set threshold; If it is determined that the number exceeds the set threshold, migrating the selected DHCP agents that exceed the threshold in the number to the newly added DHCP agent manager; If it is determined that the number does not exceed the set threshold, the association relationship between the DHCP agent manager and the DHCP agent connected in communication is obtained, and the association relationship is sent to the DHCP scheduler.

3. The method according to claim 1, characterized in that Obtain the network resource information corresponding to each DHCP agent that sends each request information, including: Parsing the identification information corresponding to each DHCP agent from each request information; Obtaining network resource information corresponding to each DHCP agent based on the parsed identification information; The identification list is sent to the DHCP scheduler through the first information channel.

4. The method according to any one of claims 1 to 3, characterized in that: Determine an identification list of online DHCP agents based on each selected information, and send the identification list to the DHCP scheduler; or obtain network resource information corresponding to each DHCP agent sending each request information, and send the network resource information corresponding to each DHCP agent to the corresponding DHCP agent, and further include: receiving first information sent by the DHCP scheduler, wherein the first information includes location information of a service host and identification information matched from a database of the DHCP scheduler based on the location information; Determine the DHCP agent corresponding to the identification information; The port information of the service host is sent to the DHCP agent corresponding to the identification information.

5. A DHCP agent control device, characterized in that: The device comprises: A receiving module, used for receiving selected information or request information sent by each DHCP agent terminal of the communication connection; The sending module is used to determine the identification list of online DHCP agents based on each selected information, read the message distribution mechanism in the message queue of the DHCP agent manager, establish a first information channel with the DHCP scheduler based on the message distribution mechanism, send the identification list to the DHCP scheduler through the first information channel or obtain the network resource information corresponding to the DHCP agent that sends each request information, and send the network resource information corresponding to the DHCP agent to the corresponding DHCP agent.

6. The device according to claim 5, characterized in that The sending module is specifically used to parse out identification information corresponding to each DHCP agent from each request information, and obtain network resource information corresponding to each DHCP agent based on the parsed identification information.

7. The device according to claim 5, characterized in that The receiving module is specifically configured to detect the number of DHCP agents that are communicatively connected to the DHCP agent manager, determine whether the number exceeds a set threshold, and if it is determined that the number exceeds the set threshold, migrate selected DHCP agents that exceed the threshold to a newly added DHCP agent manager; if it is determined that the number does not exceed the set threshold, obtain an association relationship between the DHCP agent manager and the communicatively connected DHCP agents, and send the association relationship to the DHCP scheduler.

8. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 4 when executing the computer program stored in the memory.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Resource payment method

    CN103703724A