CN112637265B - Equipment management method, device and storage medium - Google Patents

Equipment management method, device and storage medium Download PDF

Info

Publication number
CN112637265B
CN112637265B CN202011339375.2A CN202011339375A CN112637265B CN 112637265 B CN112637265 B CN 112637265B CN 202011339375 A CN202011339375 A CN 202011339375A CN 112637265 B CN112637265 B CN 112637265B
Authority
CN
China
Prior art keywords
component
connection
northbound
equipment
service request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011339375.2A
Other languages
Chinese (zh)
Other versions
CN112637265A (en
Inventor
郭祥斌
祝小燕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Technologies Co Ltd
Original Assignee
New H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN202011339375.2A priority Critical patent/CN112637265B/en
Publication of CN112637265A publication Critical patent/CN112637265A/en
Application granted granted Critical
Publication of CN112637265B publication Critical patent/CN112637265B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/562Brokering proxy services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The present disclosure provides a device management method, apparatus and storage medium, which are used to solve the technical problems that a controller does not support cross-NAT management in an active connection management mode and a fault recovery time is long. According to the method, the northbound component and the connecting component are deployed in the controller, message interaction is carried out on the northbound component and the connecting component through distributed publishing and subscribing message middleware, the connecting component provides virtual IP through load balancing to achieve load balancing of equipment management, active connection of the equipment to a controller cluster can be achieved, the controller automatically records equipment information and the corresponding relation between the connecting component and the equipment, the controller does not need to manually set the equipment information and the corresponding relation between the equipment information and a Master node, the controller cluster can manage the equipment in a load balancing mode, and the method has the advantages of being good in expansibility, fast in fault recovery and the like.

Description

Equipment management method, device and storage medium
Technical Field
The present disclosure relates to the field of network communication technologies, and in particular, to a device management method, apparatus, and storage medium.
Background
Software Defined Networking (SDN) is the mainstream large Network management control scheme. In an SDN scenario, a hardware server or a virtual machine is installed with software having a network management control function, which is called a controller, and hereinafter also referred to as a controller Node, or Node, Node for short, and the like, and please refer to specific context for understanding. A plurality of SDN controller nodes form a controller cluster mode, hundreds of devices are managed and configured in a unified mode, and the original mode that manual login devices are configured is replaced. There are many techniques for forming a cluster from a plurality of nodes, and they will not be described herein.
In the controller cluster, if the controller cluster adopts a traditional master-slave model, all the pressure is concentrated on one of the controller nodes (called as a controller master Leader node), which is not beneficial to the lateral expansion of the equipment scale managed by the controller. Therefore, a load balancing mechanism is needed, the management capability of the device is dispersed on each controller node in the cluster, when there is a Rest/UI request from north, the controller calculates the device involved in the request on the Master Leader node, and then distributes the request to the management controller nodes (called Master nodes) of each device, and each controller node realizes interaction with the device.
The Rest request refers to a service request sent to the controller in an HTTP/HTTPs manner from third-party software such as a cloud management platform, for example, a request of "creating a virtual router". The UI request refers to a service request sent to the controller by a user operating a software UI interface of the controller through a browser, such as a "create vrouter" request.
A controller directly controlling a certain device or some devices is called a Master node of the devices, for example, if the device 1 is directly controlled by the controller 1, the controller 1 is the Master node of the device 1; assuming that both the device 2 and the device 3 are directly controlled by the controller 2, the controller 2 is referred to as a Master node of the device 2 and the device 3.
Kafka is a high throughput distributed publish-subscribe messaging system that can be viewed as a messaging middleware. Kafka defines the producer and consumer roles of messages, with producers and consumers implementing message interactions through Topic. Assume that there are two independently running programs, program 1 and program 2, and one independently deployed kafka program. The three can be operated in independent processes or independent micro-service modes respectively, can be on the same physical server or different physical servers, and can realize communication as long as independent communication IP addresses and communication ports can be arranged among the three. When program 1 and program 2 communicate with each other, they can have the roles of "producer" and "consumer", respectively. If program 1 wishes to send requests to program 2 and receives responses from program 2, the following steps can be followed:
step a1. creates two topics in Kafka (Topic is a concept in Kafka, representing a collection of a class of messages), Request Topic represents a Request message, and Response Topic represents a Response message;
step a2, the program 1 writes the Request into the Request Topic, the program 2 monitors the Request Topic, then the Request message produced by the program 1 can be consumed, and after the Request message is processed, the Response message is written into the Response Topic;
step a3. program 1 listens for Response Topic, i.e. the Response message produced by program 2 is consumed and one communication ends.
In addition to the simple usage model described above, Kafka provides a partitioning mechanism whereby each Topic can create multiple different partitions, the producer can specify which partition of the Topic the message is written to, and the consumer can specify which partition of the Topic is listened to.
At present, an active entry management model is adopted for managing equipment by a controller cluster, and load balancing management is realized according to the following steps:
(1) on the UI interface provided by the controller cluster, the user enters the devices managed by the controller, such as Dev1, Dev2, Dev3, Dev 4;
(2) a Master Leader node of the controller allocates a Master node to each device through a specific algorithm (such as a random UUID hash method);
(3) and the Master node of the equipment actively establishes connection with the equipment to manage the equipment.
And when a northbound Rest/UI request comes, the controller Master Leader node calculates the equipment related to the request, and distributes the request to the specified Master node according to the equipment Master node distribution information recorded by the controller Master node, wherein the Master node is connected with the equipment and interacts with the equipment.
By adopting the active entry type management model, a user needs to manually set the equipment information managed by the controller, the controller needs to be actively connected with the equipment, and the load balancing management model (such as Websocket) that the equipment is actively connected with the controller cannot be supported. The management model of active connection of the controller requires that each device must provide independent IP controller connection, and does not support device cross-NAT management, in addition, the controller cluster needs to respond to events such as controller node failure, device-to-Master connection failure and the like, if a failure occurs, the controller needs to dynamically calculate and adjust a new Master node of the device, and then establishes new connection for the device, and the service recovery time is long.
Disclosure of Invention
In view of this, the present disclosure provides a device management method, an apparatus and a storage medium, which are used to solve the technical problems that the controller does not support cross-NAT management in the active connection management mode and the failure recovery time is long.
Based on an embodiment of the present disclosure, the present disclosure provides an apparatus management method, which is applied to a controller in a controller cluster, where a northbound component and/or a connection component are deployed in one or more controllers of the controller cluster, and the method includes:
the connection component establishes connection with the equipment through a load balancer and establishes connection with the northbound component through distributed publish-subscribe message middleware, and the northbound component records the corresponding relation between the equipment serial number and the partition number of the connection component;
after receiving the service request, the northbound component determines the equipment related to the service request, and sends the service request to a connecting component corresponding to the partition number of the connecting component through the distributed publishing and subscribing message middleware according to the corresponding relation between the equipment serial number and the partition number of the connecting component;
the connection component reads a service request from the distributed publish-subscribe message middleware according to the partition number of the connection component, and interacts with equipment corresponding to the equipment serial number in the service request;
when the equipment responds to the service request, the connecting component sends a response to the corresponding northbound component through the distributed publishing and subscribing message middleware.
According to a preferred embodiment of the present disclosure, the method for the connection component to establish a connection with the device through the load balancer and establish a connection with the northbound component through the distributed publish-subscribe message middleware includes:
the connection component receives a connection request actively initiated by the equipment through the load balancer, and reports a connection establishment event to a northbound component located in the controller through distributed publish-subscribe message middleware, wherein the event carries the partition number of the connection component and the equipment serial number;
and after receiving the connection establishment event, the northbound component establishes connection with the connection component through the distributed publish-subscribe message middleware and records the corresponding relation between the equipment serial number and the partition number of the connection component.
According to another embodiment of the present disclosure, the connection component establishes a connection with the device through the load balancer, and the method for establishing a connection with the northbound component through the distributed publish-subscribe message middleware is as follows:
the northbound component distributes the connecting components for the equipment by using a preset distribution algorithm according to the pre-configured equipment information to obtain the corresponding relation between the equipment serial number and the partition number of the connecting component;
the northbound component sends a connection establishment event to the connection component corresponding to the equipment serial number through the distributed publishing and subscribing message middleware, wherein the connection establishment event carries the partition number and the equipment serial number of the northbound component;
and after receiving the connection establishment event of the northbound component, the connection component actively initiates a connection request to the equipment through the load balancer according to the equipment serial number.
Further, the method for the northbound component to send the service request to the connection component corresponding to the connection component partition number through the distributed publish-subscribe message middleware includes:
the northbound component finds a corresponding connection component partition number according to the equipment serial number, and writes a service Request into a partition corresponding to the connection component partition number in a distributed publish-subscribe message middleware Request Topic so that the connection component reads the service Request, wherein the service Request carries the northbound component partition number;
the method for the connecting component to send the response to the corresponding northbound component through the distributed publish-subscribe message middleware comprises the following steps:
and the connecting component writes the response into a partition corresponding to the northbound component partition number in the distributed publish-subscribe message middleware response Topic Request Topic according to the northbound component partition number in the service Request so as to enable the northbound component to read the response.
Further, the method further comprises: when the device senses that the controller for managing the device fails or a link between the controller and the device fails, the device actively initiates a connection request to the controller cluster again through the virtual IP exposed by the load balancer so as to establish connection with the connection components and the northbound components on other health controllers.
According to an embodiment of the present disclosure, the present disclosure further provides an apparatus for device management, where the apparatus is applied to a controller in a controller cluster, and the apparatus includes a northbound component and/or a connection component:
the connection component is used for establishing connection with the equipment through the load balancer and establishing connection with the northbound component through the distributed publish-subscribe message middleware; the connection component reads a service request from the distributed publish-subscribe message middleware according to the own partition number, and interacts with equipment corresponding to an equipment serial number in the service request; when the equipment responds to the service request, sending a response to the corresponding northbound component through the distributed publishing and subscribing message middleware;
the north orientation component is used for recording the corresponding relation between the equipment serial number and the partition number of the connection component; and after receiving the service request, determining the equipment related to the service request, and sending the service request to a connecting component corresponding to the connecting component partition number through the distributed publish-subscribe message middleware according to the corresponding relation between the equipment serial number and the connecting component partition number.
According to a preferred embodiment of the present disclosure, the connection component receives a connection request actively initiated by a device through a load balancer, and reports a connection establishment event to a northbound component located in a controller through a distributed publish-subscribe message middleware, wherein the event carries a partition number of the connection component and the device serial number;
and after receiving the connection establishment event, the northbound component establishes connection with the connection component through the distributed publish-subscribe message middleware and records the corresponding relation between the equipment serial number and the partition number of the connection component.
According to another embodiment of the present disclosure, the northbound component allocates a connection component to the device by using a preset allocation algorithm according to the preconfigured device information, so as to obtain a correspondence between the device serial number and the connection component partition number;
the northbound component sends a connection establishment event to the connection component corresponding to the equipment serial number through the distributed publishing and subscribing message middleware, wherein the connection establishment event carries the partition number and the equipment serial number of the northbound component;
and after receiving the connection establishment event of the northbound component, the connection component actively initiates a connection request to the equipment through the load balancer according to the equipment serial number.
Further, the northbound component finds a corresponding partition number of the connection component according to the equipment serial number, and writes a service Request into a partition corresponding to the partition number of the connection component in a Request subject Request Topic of the distributed publish-subscribe message middleware so that the connection component reads the service Request, wherein the service Request carries the northbound component partition number;
and the connecting component writes the response into a partition corresponding to the northbound component partition number in the distributed publish-subscribe message middleware response Topic Request Topic according to the northbound component partition number in the service Request so as to enable the northbound component to read the response.
According to the method, the northbound component and the connecting component are deployed in the controller, message interaction is carried out on the northbound component and the connecting component through distributed publishing and subscribing message middleware, the connecting component provides virtual IP through load balancing to achieve load balancing of equipment management, active connection of the equipment to a controller cluster can be achieved, the controller automatically records equipment information and the corresponding relation between the connecting component and the equipment, the controller does not need to manually set the equipment information and the corresponding relation between the equipment information and a Master node, the controller cluster can manage the equipment in a load balancing mode, and the method has the advantages of being good in expansibility, fast in fault recovery and the like.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments of the present disclosure or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present disclosure, and other drawings can be obtained by those skilled in the art according to the drawings of the embodiments of the present disclosure.
Fig. 1 is a schematic structural diagram of a device management framework according to an embodiment of the present disclosure;
FIG. 2 is a flowchart illustrating steps of a method for managing devices according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an apparatus management device according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a controller according to an embodiment of the disclosure.
Detailed Description
The terminology used in the embodiments of the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the embodiments of the present disclosure. As used in the embodiments of the present disclosure, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The term "and/or" as used in this disclosure is meant to encompass any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information in the embodiments of the present disclosure, such information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of embodiments of the present disclosure. Depending on the context, moreover, the word "if" as used may be interpreted as "at … …" or "when … …" or "in response to a determination".
The present disclosure aims to provide a method and an apparatus for supporting a device to actively connect to a controller and managing and controlling the device in a load-balanced manner, so as to improve flexibility of device management and speed of service recovery. Fig. 1 is a schematic structural diagram of an apparatus management framework provided in an embodiment of the present disclosure, in the framework, a controller cluster includes a plurality of controller nodes (for short, controllers), and the present disclosure does not limit a deployment form of the controllers, and may be independent physical hosts, virtual machines, and the like.
In the framework of the device management system of the present disclosure, the software packages installed on the controllers, which may also be referred to as components/plug-ins/software modules, are logically divided into northbound components and connected components. The northbound component is used to directly handle service requests, such as Rest/UI requests, from the user or upper level software. The connection component is used to manage connections with the devices. Distributed publish-subscribe message middleware (abbreviated message middleware), such as Kafka, is deployed between the northbound component and the connecting component for enabling message interaction between the northbound component and the connecting component.
In fig. 1, 3 controller nodes are taken as an example, and the number of actually deployed controller nodes is not limited.
On multiple controller nodes of a controller cluster, 1 or more northbound components may be activated. For example, the northbound component instance (without limitation, process mode or microservice mode) may be launched on control 1 and not launched on controller 2, controller 3. One or more northbound components may also be activated on each controller.
The northbound component may employ a single point, backup or load sharing mode to process the service request from the northbound (referring to the user UI service request or the Rest service request of the upper layer software), and the disclosure is not limited thereto.
On a plurality of controller nodes of a controller cluster, 1 or more connecting components can be started, and the number of the connecting components can be dynamically expanded and contracted according to the traffic load condition. For example, a connection component may be deployed in each of the controller 1 and the controller 2 in an initial state, and not deployed in the controller 3, when the number of managed devices increases, a connection component is expanded in the controller 3, and when the number of devices decreases, a connection component in a certain controller is shrunk, and the number of instances of the connection component is dynamically expanded/shrunk to intelligently adapt to the needs of the network and the service. Specific expansion and contraction modes the present disclosure is not limited, for example, under the micro service architecture, kubernets (abbreviated as K8S) may be adopted to schedule the number of connected component instances to be increased or decreased as required.
The distributed publish-subscribe message middleware, such as Kafka, may employ an independent server deployment manner, or may multiplex servers of the controller node, which is not limited in this disclosure.
The plurality of connection components in the embodiment of the present disclosure implement balancing of the device among the plurality of connection components through the load balancer, and the plurality of connection components uniformly use the virtual IP provided by the load balancer, and expose the IP address to the outside through the load balancer. The present disclosure does not limit the particular load balancer type used; each connection component needs to be assigned a unique partition number.
In an embodiment of the present disclosure, a connectivity component is deployed using a K8S microservice architecture, a POD is assigned to each connectivity component, a POD number is assigned to a connectivity component when the connectivity component is started, and the POD number is used as a partition number in Topic in Kafka for each connectivity component. Wherein the Pod is used to carry the operation of the connection assembly. The POD is the smallest unit that can be created and deployed in K8S, and the POD contains one or more containers and also includes resources shared by the respective containers such as storage and network.
In another embodiment of the present disclosure, an external cache server, such as Redis, is used to assign a unique partition number to each connection component by way of lock contention.
The present disclosure does not limit the deployment manner and partition number allocation manner of the connection component, for example, the connection component is deployed in a microservice or process manner, and the partition number is allocated in a POD number or a Redis allocation manner.
Fig. 2 is a flowchart of steps of a device management method applied to controllers in a controller cluster based on the device management framework structure, where a northbound component is deployed in one or more controllers of the controller cluster, and a connection component is deployed in one or more controllers, and the method includes:
step 210, the connection component establishes connection with the equipment through a load balancer and establishes connection with a northbound component through distributed publish-subscribe message middleware, wherein the northbound component records the corresponding relation between the equipment serial number and the partition number of the connection component;
in one implementation of the present disclosure, a connection between a connection component and a northbound component in a controller is established in a manner that a device actively initiates a connection request to the controller, specifically in the following manner:
step A211, a connection component receives a connection request actively initiated by a device through a load balancer, and reports a connection establishment event to a northbound component located in a controller through distributed publish-subscribe message middleware, wherein the event carries a partition number of the connection component and a device serial number;
step A212, after receiving a connection establishment event, the northbound component establishes connection with the connection component through distributed publish-subscribe message middleware, and records a corresponding relationship between the equipment serial number and a connection component partition number;
for example, the connection components report a connection establishment Event to the northbound component through kafka, the Event carries its own partition number, and then each connection component listens to the corresponding partition in Kafak's Event Topic message with its own partition number. After receiving the connection establishment Event, the northbound component sends a response of the connection establishment Event to a partition corresponding to a connection component group number in Event Topic according to the corresponding relation between the equipment serial number and the connection component partition number, and the connection component obtains the response of the northbound component by monitoring the partition corresponding to the own partition number, so that service connection with the northbound component is established. All topics mentioned in this disclosure can be created manually or in a software-automated manner, and this disclosure is not described in detail.
In another implementation of the present disclosure, a connection between a controller and a device is established by using the controller to actively initiate a connection request to the device, specifically, in the following manner:
b211, distributing a connecting component for the equipment by the northbound component according to the pre-configured equipment information by using a preset distribution algorithm to obtain a corresponding relation between the equipment serial number and a connecting component partition number;
b212, the northbound component sends a connection establishment event to a connection component corresponding to the equipment serial number through distributed publish-subscribe message middleware, wherein the connection establishment event carries the partition number and the equipment serial number of the northbound component;
and step A213, after receiving the connection establishment event of the northbound component, the connection component actively initiates a connection request to the equipment through the load balancer according to the equipment serial number.
Step 220, after receiving the service request, the northbound component determines the equipment related to the service request, and sends the service request to the connection component corresponding to the connection component partition number through the distributed publish-subscribe message middleware according to the corresponding relation between the equipment serial number and the connection component partition number;
in one implementation of the present disclosure, a northbound component receives a Rest/UI service Request, determines a device related to the service Request through calculation, distributes the service Request to a corresponding connection component, finds a corresponding connection component partition number according to a device serial number during distribution, and writes the connection component partition number into a partition corresponding to the connection component partition number in Request Topic of Kafka; meanwhile, the service request message carries the partition number of the northbound component (the number is unique, and the allocation mode is similar to that of the connection component), and then the northbound component listens for the partition number (the northbound component partition number) in the Response Topic.
Step 230, the connection component reads the service request from the distributed publish-subscribe message middleware according to the partition number of the connection component, and interacts with the equipment corresponding to the equipment serial number in the service request;
in the step, the connection component listens to a partition corresponding to its own partition number in the message middleware Request Topic, and when receiving a service Request from the northbound component, obtains an equipment serial number from the service Request, and interacts with the equipment.
And 240, when the equipment answers the service request, the connecting component sends an answer response to the corresponding northbound component through the distributed publishing and subscribing message middleware.
In this step, when receiving a Response from the device to the connection component, the connection component writes a Response message into a partition corresponding to the northbound component partition number in the message middleware Response Topic according to the northbound component partition number in the corresponding service request, and the northbound component responds to the service request after monitoring that a Response message exists in the Response Topic partition corresponding to its own partition number.
In an embodiment of the present disclosure, when a device senses that a controller managing the device fails or a link between the controller and the device fails, the device actively initiates a connection request to the controller cluster again through a virtual IP exposed by the load balancer to establish a connection with a connection component and a northbound component on other health controllers.
The embodiment of the disclosure can realize that the device actively connects with the controller cluster under the Network Address Translation (NAT) configuration environment, and realize that the load of the controller cluster is balanced to manage the device. Based on the management framework in the embodiment of the disclosure, when one connection fails (a link failure, a controller node failure, etc.), the device can actively sense the link problem, quickly and actively initiate connection to another healthy node, and the controller can realize the convergence of the failure without additional processing, thereby improving the service reliability and the failure convergence time.
The technical scheme of the disclosure can be compatible with a management model supporting the original controller active connection equipment. For example, a user enters device information managed by the controller, such as Dev1, Dev2, Dev3, Dev4, etc., on the controller, the controller assigns a connection component to each device through a specific algorithm (e.g., random UUID hashing, etc.), the connection component actively initiates a connection with the device, and the subsequent processing steps are the same as the "device actively connects to the controller" model.
It should be recognized that embodiments of the present disclosure can be implemented or embodied in computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer readable memory. The method may be implemented in a computer program using standard programming techniques, including a non-transitory computer readable storage medium configured with the computer program, where the storage medium so configured causes a computer to operate in a specific and predefined manner. Each program may be implemented in a high level procedural or object oriented programming language to communicate with a computer system. However, the program(s) can be implemented in assembly or machine language, if desired. In any case, the language may be a compiled or interpreted language. Furthermore, the program can be run on a programmed application specific integrated circuit for this purpose.
Further, operations of processes described by the present disclosure may be performed in any suitable order unless otherwise indicated herein or otherwise clearly contradicted by context. The processes described in this disclosure (or variations and/or combinations thereof) may be performed under the control of one or more computer systems configured with executable instructions and may be implemented as code (e.g., executable instructions, one or more computer programs, or one or more applications) executing collectively on one or more processors, by hardware, or combinations thereof. The computer program includes a plurality of instructions executable by one or more processors.
Further, the method may be implemented in any type of computing platform operatively connected to a suitable interface, including but not limited to a personal computer, mini computer, mainframe, workstation, networked or distributed computing environment, separate or integrated computer platform, or in communication with a charged particle tool or other imaging device, and the like. Aspects of the disclosure may be embodied in machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated into a computing platform, such as a hard disk, optically read and/or write storage medium, RAM, ROM, or the like, such that it may be read by a programmable computer, which when read by the storage medium or device, is operative to configure and operate the computer to perform the procedures described herein. Further, the machine-readable code, or portions thereof, may be transmitted over a wired or wireless network. The invention described in this disclosure includes these and other different types of non-transitory computer-readable storage media when such media include instructions or programs that implement the steps described above in conjunction with a microprocessor or other data processor. The disclosure also includes the computer itself when programmed according to the methods and techniques described in this disclosure.
Fig. 3 is a schematic structural diagram of an apparatus management device according to an embodiment of the present disclosure, where each functional module in the device may be implemented in a form of a software module, and may also be implemented in a form of a hardware unit. The device is applied to the controller in the controller cluster, and comprises a northbound component and/or a connecting component. The device management apparatus 300 includes: a north direction component 310 and a connecting component 320.
A connection component 320 for establishing a connection with a device through a load balancer and establishing a connection with the northbound component 310 through distributed publish-subscribe message middleware; reading a service request from distributed publish-subscribe message middleware according to a partition number of the service request, and interacting with equipment corresponding to an equipment serial number in the service request; when the equipment responds to the service request, sending a response to the corresponding northbound component through the distributed publishing and subscribing message middleware;
a northbound component 310, configured to record a correspondence between the device serial number and the connection component partition number; after receiving the service request, determining the device related to the service request, and sending the service request to the connection component 320 corresponding to the connection component partition number through the distributed publish-subscribe message middleware according to the corresponding relationship between the device serial number and the connection component partition number.
According to a preferred embodiment of the present disclosure, the connection component 320 receives a connection request actively initiated by a device through a load balancer, and reports a connection establishment event to the northbound component 310 located in the controller through distributed publish-subscribe message middleware, where the event carries a partition number of the connection component and the device serial number;
after receiving the connection establishment event, the northbound component 310 establishes a connection with the connection component 320 through the distributed publish-subscribe message middleware, and records a corresponding relationship between the device serial number and the connection component partition number.
According to another embodiment of the present disclosure, the northbound component 320 allocates connection components to the device according to the preconfigured device information by using a preset allocation algorithm, so as to obtain a corresponding relationship between the device serial number and the connection component partition number;
the northbound component 310 sends a connection establishment event to the connection component 320 corresponding to the equipment serial number through the distributed publish-subscribe message middleware, wherein the connection establishment event carries the partition number and the equipment serial number of the northbound component;
the connection component 320 actively initiates a connection request to the device through the load balancer according to the device serial number after receiving the connection establishment event of the northbound component 310.
Further, the northbound component 320 finds a corresponding partition number of the connection component according to the device serial number, and writes the service Request into a partition corresponding to the partition number of the connection component in the Request Topic of the distributed publish-subscribe message middleware so that the connection component 320 reads the service Request, where the service Request carries the northbound component partition number;
the connection component 320 writes the response into the partition corresponding to the northbound component partition number in the distributed publish-subscribe message middleware response Topic Request Topic according to the northbound component partition number in the service Request so that the northbound component 310 reads the response.
Fig. 4 is a schematic structural diagram of a controller according to an embodiment of the present disclosure, where the controller 400 includes: a processor 410 such as a Central Processing Unit (CPU), an internal bus 420, a network interface 440, and a computer-readable storage medium 430. Wherein the processor 410 and the computer-readable storage medium 430 can communicate with each other through an internal bus 420. The computer readable storage medium 430 may store therein a computer program provided by the present disclosure for implementing the device management method provided by the present disclosure, and when the computer program is executed by the processor 410, the computer program can implement the functions of the steps of the device management method provided by the present disclosure.
The machine-readable storage medium may include Random Access Memory (RAM) and may also include Non-volatile Memory (NVM), such as at least one disk Memory. Additionally, the machine-readable storage medium 1202 may also be at least one memory device located remotely from the aforementioned processor. The Processor may be a general-purpose Processor including a Central Processing Unit (CPU), a Network Processor (NP), etc.; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The equipment provided by the embodiment of the disclosure and the method provided by the embodiment of the disclosure have the same technical concept and have the same beneficial effects as the method adopted, operated or realized by the equipment.
The above description is only an example of the present disclosure and is not intended to limit the present disclosure. Various modifications and variations of this disclosure will occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present disclosure should be included in the protection scope of the present disclosure.

Claims (8)

1. A device management method is applied to controllers in a controller cluster, wherein northbound components and/or connected components are deployed in one or more controllers of the controller cluster, and the method comprises the following steps:
the connection component receives a connection request actively initiated by the equipment through the load balancer, and reports a connection establishment event to a northbound component located in the controller through distributed publish-subscribe message middleware, wherein the event carries the partition number of the connection component and the equipment serial number;
after receiving the connection establishment event, the northbound component establishes connection with the connection component through the distributed publish-subscribe message middleware and records the corresponding relation between the equipment serial number and the partition number of the connection component;
after receiving the service request, the northbound component determines the equipment related to the service request, and sends the service request to a connecting component corresponding to the partition number of the connecting component through the distributed publishing and subscribing message middleware according to the corresponding relation between the equipment serial number and the partition number of the connecting component;
the connection component reads a service request from the distributed publish-subscribe message middleware according to the own partition number, and interacts with equipment corresponding to an equipment serial number in the service request;
when the equipment responds to the service request, the connecting component sends a response to the corresponding northbound component through the distributed publishing and subscribing message middleware.
2. The method of claim 1, wherein the connection component establishes a connection with the device through a load balancer, and wherein the connection with the northbound component is established through distributed publish-subscribe message middleware by:
the northbound component allocates a connecting component for the equipment by using a preset allocation algorithm according to the pre-configured equipment information to obtain a corresponding relation between the equipment serial number and the partition number of the connecting component;
the northbound component sends a connection establishment event to the connection component corresponding to the equipment serial number through the distributed publishing and subscribing message middleware, wherein the connection establishment event carries the partition number and the equipment serial number of the northbound component;
and after receiving the connection establishment event of the northbound component, the connection component actively initiates a connection request to the equipment through the load balancer according to the equipment serial number.
3. The method of claim 1, wherein the northbound component sends the service request to the connection component corresponding to the connection component partition number through the distributed publish-subscribe message middleware by:
the northbound component finds a corresponding partition number of the connection component according to the equipment serial number, and writes a service Request into a partition corresponding to the partition number of the connection component in a Request Topic of the distributed publish-subscribe message middleware so that the service Request is read by the connection component, wherein the service Request carries the northbound component partition number;
the method for the connecting component to send the response to the corresponding northbound component through the distributed publish-subscribe message middleware comprises the following steps:
and the connecting component writes the response into a partition corresponding to the northbound component partition number in the distributed publish-subscribe message middleware response Topic Request Topic according to the northbound component partition number in the service Request so as to enable the northbound component to read the response.
4. The method of claim 1, further comprising:
when the device senses that the controller for managing the device fails or a link between the controller and the device fails, the device actively initiates a connection request to the controller cluster again through the virtual IP exposed by the load balancer so as to establish connection with the connection component and the northbound component on other health controllers.
5. A device management apparatus, which is applied to a controller in a controller cluster, includes a northbound component and/or a connection component:
the connection component is used for receiving a connection request actively initiated by the equipment through the load balancer, and reporting a connection establishment event to a northbound component located in the controller through the distributed publish-subscribe message middleware, wherein the event carries the partition number and the equipment serial number of the connection component; the connection component is also used for reading a service request from the distributed publish-subscribe message middleware according to the partition number of the connection component, and interacting with equipment corresponding to the equipment serial number in the service request; when the equipment responds to the service request, sending a response to the corresponding northbound component through the distributed publish-subscribe message middleware;
the north orientation component is used for establishing connection with the connection component through the distributed publishing and subscribing message middleware after receiving the connection establishing event and recording the corresponding relation between the equipment serial number and the partition number of the connection component; and the distributed publishing and subscribing message middleware is used for sending the service request to the connecting component corresponding to the connecting component partition number according to the corresponding relation between the equipment serial number and the connecting component partition number.
6. The apparatus of claim 5,
the northbound component distributes the connecting components for the equipment by using a preset distribution algorithm according to the pre-configured equipment information to obtain the corresponding relation between the equipment serial number and the partition number of the connecting component;
the northbound component sends a connection establishment event to the connection component corresponding to the equipment serial number through the distributed publishing and subscribing message middleware, wherein the connection establishment event carries the partition number and the equipment serial number of the northbound component;
and after receiving the connection establishment event of the northbound component, the connection component actively initiates a connection request to the equipment through the load balancer according to the equipment serial number.
7. The apparatus of claim 5,
the northbound component finds a corresponding connection component partition number according to the equipment serial number, and writes a service Request into a partition corresponding to the connection component partition number in a distributed publish-subscribe message middleware Request Topic so that the connection component reads the service Request, wherein the service Request carries the northbound component partition number;
and the connecting component writes the response into a partition corresponding to the northbound component partition number in the distributed publish-subscribe message middleware response Topic Request Topic according to the northbound component partition number in the service Request so as to enable the northbound component to read the response.
8. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1 to 4.
CN202011339375.2A 2020-11-25 2020-11-25 Equipment management method, device and storage medium Active CN112637265B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011339375.2A CN112637265B (en) 2020-11-25 2020-11-25 Equipment management method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011339375.2A CN112637265B (en) 2020-11-25 2020-11-25 Equipment management method, device and storage medium

Publications (2)

Publication Number Publication Date
CN112637265A CN112637265A (en) 2021-04-09
CN112637265B true CN112637265B (en) 2022-07-12

Family

ID=75303968

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011339375.2A Active CN112637265B (en) 2020-11-25 2020-11-25 Equipment management method, device and storage medium

Country Status (1)

Country Link
CN (1) CN112637265B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113572815B (en) * 2021-06-25 2023-07-07 广州大学 Cross-heterogeneous-platform communication technical method, system and medium
CN117376662B (en) * 2023-12-08 2024-02-09 杭州领信数科信息技术有限公司 Cluster type video safety boundary exchange method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101631134A (en) * 2008-07-14 2010-01-20 李�真 Network message exchange service manager for distributed type computing environment
CN101848236A (en) * 2010-05-06 2010-09-29 北京邮电大学 Real-time data distribution system with distributed network architecture and working method thereof
CN103581307A (en) * 2013-10-17 2014-02-12 北京邮电大学 Publishing/subscribing system based on clusters and method for guaranteeing reliability of publishing/subscribing system based on clusters
CN104092767A (en) * 2014-07-21 2014-10-08 北京邮电大学 Posting/subscribing system for adding message queue models and working method thereof
CN106411972A (en) * 2015-07-29 2017-02-15 中国科学院沈阳自动化研究所 Real-time data distribution system and method based on Openflow protocol
CN106953901A (en) * 2017-03-10 2017-07-14 重庆邮电大学 A kind of trunked communication system and its method for improving message transmission performance
CN110069335A (en) * 2019-05-07 2019-07-30 江苏满运软件科技有限公司 Task processing system, method, computer equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10469391B2 (en) * 2015-09-23 2019-11-05 Google Llc Distributed software defined wireless packet core system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101631134A (en) * 2008-07-14 2010-01-20 李�真 Network message exchange service manager for distributed type computing environment
CN101848236A (en) * 2010-05-06 2010-09-29 北京邮电大学 Real-time data distribution system with distributed network architecture and working method thereof
CN103581307A (en) * 2013-10-17 2014-02-12 北京邮电大学 Publishing/subscribing system based on clusters and method for guaranteeing reliability of publishing/subscribing system based on clusters
CN104092767A (en) * 2014-07-21 2014-10-08 北京邮电大学 Posting/subscribing system for adding message queue models and working method thereof
CN106411972A (en) * 2015-07-29 2017-02-15 中国科学院沈阳自动化研究所 Real-time data distribution system and method based on Openflow protocol
CN106953901A (en) * 2017-03-10 2017-07-14 重庆邮电大学 A kind of trunked communication system and its method for improving message transmission performance
CN110069335A (en) * 2019-05-07 2019-07-30 江苏满运软件科技有限公司 Task processing system, method, computer equipment and storage medium

Also Published As

Publication number Publication date
CN112637265A (en) 2021-04-09

Similar Documents

Publication Publication Date Title
KR102425996B1 (en) Multi-cluster Ingress
US10581674B2 (en) Method and apparatus for expanding high-availability server cluster
US9999030B2 (en) Resource provisioning method
JP6224846B2 (en) Client premises resource control via provider-defined interface
EP3353952B1 (en) Managing groups of servers
US9942158B2 (en) Data traffic policy management system
US9690670B1 (en) Systems and methods for doing agentless backup in scale-out fashion
WO2022206229A1 (en) Data processing method and apparatus, device, and storage medium
CN112165532A (en) Node access method, device, equipment and computer readable storage medium
US10205775B2 (en) Server selection in a highly available network
US11201930B2 (en) Scalable message passing architecture in a cloud environment
CN112637265B (en) Equipment management method, device and storage medium
CN110716787A (en) Container address setting method, apparatus, and computer-readable storage medium
US11108673B2 (en) Extensible, decentralized health checking of cloud service components and capabilities
US20160344582A1 (en) Call home cluster
CN110764963A (en) Service exception handling method, device and equipment
WO2023076371A1 (en) Automatic encryption for cloud-native workloads
US9106676B1 (en) Grid-based server messaging infrastructure
EP3703342B1 (en) Dynamic load balancing in network centric process control systems
CN115378944B (en) Network system, service grid configuration method, storage medium and electronic equipment
JP2015162029A (en) server
CN114827177B (en) Deployment method and device of distributed file system and electronic equipment
CN112655185A (en) Apparatus, method and storage medium for service distribution in software defined network
CN113535402A (en) Load balancing processing method and device based on 5G MEC and electronic equipment
CN109510864B (en) Forwarding method, transmission method and related device of cache request

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant