CN117834506A - Multicast technology-based equipment configuration method and device and electronic equipment - Google Patents

Multicast technology-based equipment configuration method and device and electronic equipment Download PDF

Info

Publication number
CN117834506A
CN117834506A CN202311873718.7A CN202311873718A CN117834506A CN 117834506 A CN117834506 A CN 117834506A CN 202311873718 A CN202311873718 A CN 202311873718A CN 117834506 A CN117834506 A CN 117834506A
Authority
CN
China
Prior art keywords
service interface
description information
equipment
service
interface description
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.)
Pending
Application number
CN202311873718.7A
Other languages
Chinese (zh)
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.)
Yuweng Information Technology Co ltd
Original Assignee
Yuweng Information Technology 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 Yuweng Information Technology Co ltd filed Critical Yuweng Information Technology Co ltd
Priority to CN202311873718.7A priority Critical patent/CN117834506A/en
Publication of CN117834506A publication Critical patent/CN117834506A/en
Pending legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a device configuration method based on a multicast technology, a device and an electronic device thereof, wherein the device configuration method comprises the following steps: for each device in a preset network, the control device acquires service interface description information of a third-party program, broadcasts the service interface description information of the device in the preset network by adopting a multicast technology, monitors the service interface description information of other devices, characterizes the monitored other devices as neighbor devices of the device under the condition of monitoring the service interface description information of the other devices, stores the service interface description information of the neighbor devices into a local database of the device, selects a target device from all the devices in the preset network, and adopts a management interface of the target device to carry out service configuration on each neighbor device of the target device. The invention solves the technical problems of complicated configuration process and redundancy caused by the fact that each device needs to be respectively accessed for service configuration in the related art.

Description

Multicast technology-based equipment configuration method and device and electronic equipment
Technical Field
The present invention relates to the field of network communication technologies, and in particular, to a device configuration method and apparatus based on a multicast technology, and an electronic device.
Background
In the current network environment, multiple devices need to be configured one by one, and the configuration process is complex and redundant. For example, assuming that two devices (device a and device B) exist in a local network, when a hot standby configuration or a load configuration is required for multiple devices, the IP (Internet Protocol, i.e., internet protocol) address of each device (i.e., the IP addresses of device a and device B) must be planned in advance. Then, it is necessary to enter the management interface of the device a to configure the network (e.g., route, gateway, etc.) of the device a and various services (e.g., data synchronization, hot standby, or load, etc., such as configuring keepaled (i.e., a virtual routing redundancy protocol) and LVS REDIS (i.e., a virtual server cluster system, etc., to implement the corresponding services)). And also needs to go to another device (i.e., device B) to perform the same configuration step. However, when cluster configuration is supported, the configuration portion of the device will be a complex process. In addition, once a configuration problem or a functional problem occurs in a certain device node, repeated inspection work is required for each device node, which consumes a lot of effort and time.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the invention provides a device configuration method and device based on a multicast technology and electronic equipment, and aims to at least solve the technical problems that in the related technology, service configuration needs to be carried out by entering each device respectively, so that the configuration process is complex and redundant.
According to an aspect of the embodiment of the present invention, there is provided a device configuration method based on a multicast technology, including: for each device in a preset network, controlling the device to acquire service interface description information of a third party program, wherein each device is pre-deployed with the corresponding third party program, the third party program pre-stores configuration data of different services, and the service interface description information comprises: a plurality of service interface descriptions, each of said service interface descriptions relating to a service interface for accessing said configuration data of said service concerned; broadcasting the service interface description information of the equipment in the preset network by adopting a multicast technology, and monitoring the service interface description information of other equipment; characterizing the monitored other equipment as neighbor equipment of the equipment under the condition that the service interface description information of the other equipment is monitored, and storing the service interface description information of the neighbor equipment into a local database of the equipment; selecting a target device from all the devices in the preset network, and carrying out service configuration on each neighbor device of the target device by adopting a management interface of the target device, wherein the service interface description information of the neighbor device is used as reference information when carrying out service configuration.
Further, before controlling the device to obtain the service interface description information of the third party program, the method further comprises: determining an address prefix of a preset link address; for each device, acquiring a network card address corresponding to the device, and generating an address suffix of the device based on the network card address; and constructing the preset link address of the equipment based on the address prefix and the address suffix.
Further, before controlling the device to obtain the service interface description information of the third party program, the method further comprises: for each third party program, configuring each service in the third party program based on a preset remote call protocol and equipment requirements; configuring a preset interface for each third-party program, wherein the preset interface is used for acquiring the service interface description information of the third-party program; each third party program is deployed on the corresponding device.
Further, broadcasting the service interface description information of the device in the preset network by adopting a multicast technology, including: determining a multicast address of the preset network; characterizing a preset link address of the device as a source address, and characterizing the multicast address as a destination address; and transmitting the service interface description information to the multicast address by adopting the multicast technology.
Further, the step of monitoring the service interface description information of the other devices includes: monitoring the multicast address; judging whether a source address of the service interface description information is a preset link address of the equipment or not under the condition that the multicast address receives the service interface description information; and under the condition that the source address of the service interface description information is not the preset link address of the equipment, acquiring the service interface description information, and storing the service interface description information into the local database of the equipment.
Further, the step of performing service configuration on each of the neighbor devices of the target device by using the management interface of the target device includes: determining a source address corresponding to the service interface description information, and determining a neighbor link address of the neighbor device based on the source address; analyzing the service interface description information to obtain a plurality of service interfaces; calling each service interface by adopting a preset calling tool, and acquiring the configuration data of the service corresponding to the service interface; and on a management interface of the target equipment, carrying out service configuration on the neighbor equipment based on the neighbor link address and the configuration data, and returning a configuration result to the neighbor equipment based on the neighbor link address.
Further, the device configuration method further includes: under the condition that the error service of the preset network is detected, determining the service interface related to the error service; determining equipment to be updated with wrong configuration based on the service interface; and adjusting the configuration information of the equipment to be updated.
According to another aspect of the embodiment of the present invention, there is also provided a device configuration apparatus based on a multicast technology, including: the device comprises an acquisition unit, a service interface description unit and a service interface management unit, wherein the acquisition unit is used for controlling each device in a preset network to acquire service interface description information of a third party program, each device is pre-deployed with the corresponding third party program, the third party program pre-stores configuration data of different services, and the service interface description information comprises: a plurality of service interface descriptions, each of said service interface descriptions relating to a service interface for accessing said configuration data of said service concerned; a broadcasting unit, configured to broadcast, in the preset network, the service interface description information of the device, and monitor the service interface description information of other devices by using a multicast technology; the characterization unit is used for characterizing the monitored other equipment as neighbor equipment of the equipment under the condition that the service interface description information of the other equipment is monitored, and storing the service interface description information of the neighbor equipment into a local database of the equipment; and the configuration unit is used for selecting target equipment from all the equipment in the preset network, and carrying out service configuration on each neighbor equipment of the target equipment by adopting a management interface of the target equipment, wherein the service interface description information of the neighbor equipment is used as reference information when carrying out service configuration.
Further, the device configuration apparatus further includes: the first determining module is used for determining an address prefix of a preset link address before controlling the equipment to acquire service interface description information of a third-party program; the first generation module is used for acquiring a network card address corresponding to each device and generating an address suffix of the device based on the network card address; and the first construction module is used for constructing the preset link address of the equipment based on the address prefix and the address suffix.
Further, the device configuration apparatus further includes: the first configuration module is used for configuring each service in the third party program based on a preset remote call protocol and equipment requirements for each third party program before controlling the equipment to acquire service interface description information of the third party program; the second configuration module is used for configuring a preset interface for each third-party program, wherein the preset interface is used for acquiring the service interface description information of the third-party program; and the first deployment module is used for deploying each third-party program on the corresponding equipment.
Further, the broadcasting unit includes: a second determining module, configured to determine a multicast address of the preset network; the first characterization module is used for characterizing a preset link address of the equipment as a source address and characterizing the multicast address as a destination address; and the first sending module is used for sending the service interface description information to the multicast address by adopting the multicast technology.
Further, the broadcasting unit further includes: the first monitoring module is used for monitoring the multicast address; the first judging module is used for judging whether the source address of the service interface description information is a preset link address of the equipment or not under the condition that the multicast address receives the service interface description information; the first obtaining module is configured to obtain the service interface description information and store the service interface description information into the local database of the device when the source address of the service interface description information is not the preset link address of the device.
Further, the configuration unit includes: a third determining module, configured to determine a source address corresponding to the service interface description information, and determine a neighbor link address of the neighbor device based on the source address; the first analysis module is used for analyzing the service interface description information to obtain a plurality of service interfaces; the first calling module is used for calling each service interface by adopting a preset calling tool and acquiring the configuration data of the service corresponding to the service interface; and the third configuration module is used for carrying out service configuration on the neighbor equipment based on the neighbor link address and the configuration data on the management interface of the target equipment, and returning a configuration result to the neighbor equipment based on the neighbor link address.
Further, the device configuration apparatus further includes: a fourth determining module, configured to determine, when an error service occurs in the preset network, the service interface related to the error service; a fifth determining module, configured to determine, based on the service interface, a device to be updated with a configuration error; and the first adjusting module is used for adjusting the configuration information of the equipment to be updated.
According to another aspect of the embodiment of the present invention, there is further provided a computer readable storage medium, where the computer readable storage medium includes a stored computer program, where when the computer program runs, a device where the computer readable storage medium is controlled to execute any one of the above device configuration methods based on multicast technology.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including one or more processors and a memory for storing one or more programs, where the one or more programs, when executed by the one or more processors, cause the one or more processors to implement any of the above-mentioned device configuration methods based on multicast technology.
In the invention, for each device in a preset network, a control device acquires service interface description information of a third party program, broadcasts the service interface description information of the device in the preset network by adopting a multicast technology, monitors the service interface description information of other devices, characterizes the monitored other devices as neighbor devices of the device under the condition of monitoring the service interface description information of the other devices, stores the service interface description information of the neighbor devices in a local database of the device, selects a target device from all the devices in the preset network, and adopts a management interface of the target device to carry out service configuration on each neighbor device of the target device. In the invention, each device in the preset network can be controlled to acquire the service interface description information of the corresponding third party program, then the multicast technology is adopted to broadcast the service interface description information of the device in the preset network, and meanwhile, the service interface description information of other devices can be monitored, if the service interface description information of the other devices is monitored, the monitored other devices can be used as the neighbor devices of the device, then one target device can be selected from all the devices, and the service configuration is carried out on all the neighbor devices by adopting the management interface of the target device according to the corresponding service interface description information, so that the devices in the preset network can autonomously find the other devices, and can manage the service configuration of all the other devices through any one device, thereby reducing the configuration process and further solving the technical problems of complicated and redundant configuration process caused by the need of respectively entering each device in the related technology.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
fig. 1 is a flow chart of an alternative multicast technology based device configuration method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an alternative multicast technology based remote management configuration in accordance with an embodiment of the present invention;
fig. 3 is a schematic diagram of an alternative multicast-based device configuration apparatus according to an embodiment of the present invention;
fig. 4 is a block diagram of a hardware structure of an electronic device (or mobile device) for a device configuration method based on a multicast technology according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that, the relevant information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present invention are information and data authorized by the user or fully authorized by each party, and the collection, use and processing of the relevant data need to comply with relevant laws and regulations and standards of the relevant area, and are provided with corresponding operation entries for the user to select authorization or rejection.
The invention provides a remote management configuration method based on a multicast technology, which can ensure that equipment does not carry out IP address planning in advance, does not need to enter into management interfaces of different equipment to carry out equipment configuration, can realize the configuration of all the equipment only by entering into the management interface of any one of the equipment, and can effectively reduce the configuration process of (virtual/physical) equipment and reduce the operation flow.
The invention can realize the functions of autonomous discovery, autonomous description, single-point configuration, plug and play of a plurality of devices and the like in the local network.
The present invention will be described in detail with reference to the following examples.
Example 1
According to an embodiment of the present invention, there is provided an embodiment of a device configuration method based on a multicast technology, it should be noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be performed in an order different from that herein.
Fig. 1 is a flowchart of an alternative device configuration method based on multicast technology according to an embodiment of the present invention, as shown in fig. 1, the method includes the steps of:
Step S101, for each device in a preset network, a control device obtains service interface description information of a third party program, where each device is pre-deployed with a corresponding third party program, the third party program pre-stores configuration data of different services, and the service interface description information includes: a plurality of service interface descriptions, each service interface description relating to a service interface for accessing configuration data of a service in question.
Step S102, broadcasting the service interface description information of the equipment in a preset network by adopting a multicast technology, and monitoring the service interface description information of other equipment.
And step S103, under the condition that the service interface description information of other equipment is monitored, the monitored other equipment is characterized as the neighbor equipment of the equipment, and the service interface description information of the neighbor equipment is stored in a local database of the equipment.
Step S104, selecting a target device from all devices in a preset network, and carrying out service configuration on each neighbor device of the target device by adopting a management interface of the target device, wherein when carrying out service configuration, service interface description information of the neighbor device is used as reference information.
Through the steps, for each device in the preset network, the control device can acquire the service interface description information of the third party program, broadcast the service interface description information of the device in the preset network by adopting a multicast technology, monitor the service interface description information of other devices, characterize the monitored other devices as neighbor devices of the device under the condition of monitoring the service interface description information of the other devices, store the service interface description information of the neighbor devices into a local database of the device, select the target device from all the devices in the preset network, and perform service configuration on each neighbor device of the target device by adopting a management interface of the target device. In the embodiment of the invention, each device in the preset network can be controlled to acquire the service interface description information of the corresponding third party program, then the multicast technology is adopted to broadcast the service interface description information of the device in the preset network, meanwhile, the service interface description information of other devices can be monitored, if the service interface description information of the other devices is monitored, the monitored other devices can be used as the neighbor devices of the device, then one target device can be selected from all the devices, and the service configuration is carried out on all the neighbor devices by adopting the management interface of the target device according to the corresponding service interface description information, so that the devices in the preset network can autonomously find the other devices, and the service configuration of all the other devices can be managed by any one device, thereby reducing the configuration process, and further solving the technical problems that the configuration process is complicated and redundant because the service configuration needs to be carried out in each device respectively in the related technology.
Embodiments of the present invention will be described in detail with reference to the following steps.
An optional embodiment, before the control device obtains the service interface description information of the third party program, further includes: determining an address prefix of a preset link address; for each device, acquiring a network card address corresponding to the device, and generating an address suffix of the device based on the network card address; and constructing a preset link address of the equipment based on the address prefix and the address suffix.
In the embodiment of the invention, for the control of a device, the IP address of the device needs to be known first. For IP addresses configured using the IPv4 (Internet Protocol vers ion, i.e., internet communication protocol version four) protocol, an IP address that does not conflict with the IP addresses of other devices cannot be configured in advance unless a unified configuration center or protocol (e.g., dial-up network or DHCP (Dynamic Host Configurat ion Protocol, i.e., dynamic host configuration protocol) dynamic address allocation) is used, which of course requires that dial-up servers or DHCP servers, etc. are again configured in advance, which increases the operating cost and the reliability of these servers is also low.
Thus, this embodiment may solve the above IP planning problem using the IPv6 (Internet Protocol Vers ion, i.e., internet protocol version 6) protocol. The address allocation mechanism based on the IPv6 protocol can firstly determine the address prefix (for example, FE80: 64) of a preset link address (namely, a local link address), then can acquire the network card address (namely, MAC (Media Access Control Address, namely, a media access control address) address corresponding to each device, wherein the MAC address has uniqueness), can generate the address suffix of the corresponding device according to the network card address (namely, the MAC of the network card is used for generating the IPv6 address suffix by adopting an algorithm), and then constructs the preset link address of the corresponding device based on the address prefix and the address suffix, thereby ensuring the uniqueness of the IP address of the device, effectively avoiding the conflict between the IP address of the device and the IP addresses of other devices, and further effectively avoiding the problem of IP advanced planning.
Optionally, before the control device obtains the service interface description information of the third party program, the method further includes: for each third party program, configuring each service in the third party program based on a preset remote call protocol and equipment requirements; configuring a preset interface for each third-party program, wherein the preset interface is used for acquiring service interface description information of the third-party program; each third party program is deployed on a corresponding device.
In the embodiment of the invention, because the data required to be centrally managed and controlled by different devices are different (namely, some devices need to centrally manage the data A and some devices need to centrally manage the data B), in order to ensure that remote management configuration can be applied to different devices, JSONRPC (JavaScript Object Notat ion Remote Procedure Cal l, a lightweight remote procedure call protocol) can be used for docking different services, other devices can be realized by using different JSONRPCs, thus different interfaces are realized, and different data can be acquired by using stacking to perform interface call.
In the embodiment of the invention, a corresponding third party program can be deployed for each device, the third party program can pre-store configuration data of different services (i.e. data needed when the device is configured with the services), specifically, each service in the third party program can be configured based on a preset remote call protocol (i.e. JSONRPC) and device requirements (e.g. load requirements, hot standby requirements, etc.), then a preset interface (e.g. method_registry interface) is configured for each third party program, and the preset interface is used for acquiring service interface description information of the third party program (i.e. the third party program can use JSONRPC to realize own services and at least one interface method_registry to illustrate own service interface, so that the device can acquire service interface description of the third party program by accessing the method_registry interface of the third party program). Thereafter, each third party program is deployed on the corresponding device.
Step S101, for each device in a preset network, a control device obtains service interface description information of a third party program, where each device is pre-deployed with a corresponding third party program, the third party program pre-stores configuration data of different services, and the service interface description information includes: a plurality of service interface descriptions, each service interface description relating to a service interface for accessing configuration data of a service in question.
In the embodiment of the present invention, each device in a preset network (i.e., a pre-built local network) is pre-deployed with a corresponding third party program, where the third party program pre-stores configuration data of different services, may obtain a service interface description of the third party program through accessing a method_region interface of the corresponding third party program (i.e., for each device in the preset network, a control device obtains service interface description information of the third party program), where the service interface description information includes: a plurality of service interface descriptions, each service interface description relating to a service interface for accessing configuration data of a service in question.
Step S102, broadcasting the service interface description information of the equipment in a preset network by adopting a multicast technology, and monitoring the service interface description information of other equipment.
In the embodiment of the invention, the IPV6 multicast technology can be used to announce the service interface description information of the device, and monitor the IPV6 multicast announcement of other devices on the link (i.e., on the preset network) (i.e., broadcast the service interface description information of the device in the preset network and monitor the service interface description information of other devices by adopting the multicast technology).
Optionally, broadcasting service interface description information of the device in the preset network by adopting a multicast technology, including: determining a multicast address of a preset network; characterizing a preset link address of the device as a source address and characterizing a multicast address as a destination address; and transmitting the service interface description information to the multicast address by adopting a multicast technology.
In the embodiment of the present invention, since each device already has a unique IPv6 address (i.e., a preset link address), an IPv6 multicast technique may be used, so that the device can know the preset link address of each other device. In this embodiment, the multicast address of the preset network may be determined first (for example, the multicast address may use FF 00:/8 as a prefix and is bound with the network card at the same time), when the device sends the data packet, the preset link address of the device may be used as the source address, the multicast address may be used as the destination address (the preset link address of the device is characterized as the source address, the multicast address is characterized as the destination address, and the service interface description information is sent to the multicast address by using the multicast technology), so that the preset link address of any other device may be obtained by any device, and thus any device may be used to manage all other devices, and further the device centralized management problem is solved.
Optionally, the step of monitoring service interface description information of other devices includes: monitoring the multicast address; judging whether the source address of the service interface description information is a preset link address of the equipment or not under the condition that the multicast address receives the service interface description information; and under the condition that the source address of the service interface description information is not the preset link address of the equipment, acquiring the service interface description information, and storing the service interface description information into a local database of the equipment.
In the embodiment of the invention, each device can monitor the multicast address, if the multicast address is monitored to receive the service interface description information, whether the source address of the received service interface description information is the preset link address of the device can be judged first, if the source address of the service interface description information is not the preset link address of the device, the service interface description information can be obtained, and the service interface description information is stored in the local database of the device.
And step S103, under the condition that the service interface description information of other equipment is monitored, the monitored other equipment is characterized as the neighbor equipment of the equipment, and the service interface description information of the neighbor equipment is stored in a local database of the equipment.
In the embodiment of the invention, if the equipment monitors the service interface description information of other equipment, the monitored other equipment can be characterized as the neighbor equipment of the equipment, and then the service interface description information of the neighbor equipment is stored in the local database of the equipment.
Step S104, selecting a target device from all devices in a preset network, and carrying out service configuration on each neighbor device of the target device by adopting a management interface of the target device, wherein when carrying out service configuration, service interface description information of the neighbor device is used as reference information.
Optionally, the step of performing service configuration on each neighbor device of the target device using the management interface of the target device includes: determining a source address corresponding to the service interface description information, and determining a neighbor link address of neighbor equipment based on the source address; analyzing the service interface description information to obtain a plurality of service interfaces; calling each service interface by adopting a preset calling tool, and acquiring configuration data of a service corresponding to the service interface; and on a management interface of the target equipment, carrying out service configuration on the neighbor equipment based on the neighbor link address and the configuration data, and returning a configuration result to the neighbor equipment based on the neighbor link address.
In the embodiment of the present invention, a target device may be selected randomly from all devices in a preset network, so as to perform configuration of all devices by using the target device (that is, a management interface of the target device is used to perform service configuration on each neighbor device of the target device, and when performing service configuration, service interface description information of the neighbor device is used as reference information), specifically: the method comprises the steps of determining a source address corresponding to service interface description information, determining a neighbor link address of neighbor equipment according to the source address, analyzing the service interface description information to obtain a plurality of service interfaces, calling each service interface by adopting a preset calling tool (namely, calling the service interface of the neighbor equipment (the neighbor equipment is equipment which is required to be monitored by using an IPV 6), acquiring configuration data of a service corresponding to the service interface, carrying out service configuration on the corresponding neighbor equipment on a management interface of target equipment according to the neighbor link address and the configuration data, returning a configuration result to the neighbor equipment according to the neighbor link address (namely, the target equipment remotely calls the service interface of a third-party program to carry out configuration, and returning the configuration result to the corresponding neighbor equipment).
Optionally, the device configuration method further includes: under the condition that the error service of the preset network is detected, determining a service interface related to the error service; determining equipment to be updated with configuration errors based on a service interface; and adjusting the configuration information of the equipment to be updated.
In the embodiment of the invention, if the error service of the preset network is detected, the service interface related to the error service can be directly determined, the equipment to be updated with the configuration error is determined according to the service interface, and the configuration information of the equipment to be updated is adjusted, so that the equipment with the configuration error can be directly determined without sequentially detecting the equipment one by one.
The following detailed description is directed to alternative embodiments.
In the embodiment of the invention, a remote management configuration method based on a multicast technology is provided, and functions of autonomous discovery, autonomous description, single-point configuration, plug and play of a plurality of devices and the like can be realized.
Fig. 2 is a schematic diagram of an alternative remote management configuration based on multicast technology according to an embodiment of the present invention, and as shown in fig. 2, a local device and other devices may deploy a third party program, where the third party program needs to implement at least one interface method_registry. The local device and other devices can perform service description announcement through IPV6 multicast technology, monitor other service description announcement on the link, record all neighbor devices, and store the service description of the neighbor devices into the local database. The local device may employ a calling tool to call the service interface of the neighboring device based on the service description obtained from the database to implement service configuration for other devices.
In the embodiment of the invention, the equipment can not carry out IP address planning in advance, the equipment configuration is not required to enter the management interfaces of different equipment, the configuration of all the equipment can be realized only by entering the management interface of any one of the equipment, and the configuration process of the equipment can be effectively reduced.
The following describes in detail another embodiment.
Example two
The device configuration apparatus based on the multicast technology provided in this embodiment includes a plurality of implementation units, each of which corresponds to each implementation step in the above-described embodiment.
Fig. 3 is a schematic diagram of an alternative device configuration apparatus based on multicast technology according to an embodiment of the present invention, and as shown in fig. 3, the device configuration apparatus may include: an acquisition unit 30, a broadcasting unit 31, a characterization unit 32, a configuration unit 33, wherein,
an obtaining unit 30, configured to, for each device in a preset network, control the device to obtain service interface description information of a third party program, where each device is pre-deployed with a corresponding third party program, and the third party program pre-stores configuration data of different services, where the service interface description information includes: a plurality of service interface descriptions, each service interface description relating to a service interface for accessing configuration data of a related service;
A broadcasting unit 31, configured to broadcast service interface description information of a device in a preset network by using a multicast technology, and monitor service interface description information of other devices;
a characterization unit 32, configured to characterize the monitored other device as a neighboring device of the device, and store the service interface description information of the neighboring device into a local database of the device, where the service interface description information of the other device is monitored;
a configuration unit 33, configured to select a target device from all devices in a preset network, and perform service configuration on each neighbor device of the target device by using a management interface of the target device, where service interface description information of the neighbor device is used as reference information when performing service configuration.
In the above device configuration apparatus, the obtaining unit 30 may be configured to obtain, for each device in the preset network, the service interface description information of the third party program by using the control device, the broadcasting unit 31 may use a multicast technology to broadcast the service interface description information of the device in the preset network and monitor the service interface description information of the other device, the characterizing unit 32 may be configured to characterize the monitored other device as a neighboring device of the device and store the service interface description information of the neighboring device in the local database of the device, the configuring unit 33 may be configured to select the target device from all devices in the preset network, and use the management interface of the target device to perform service configuration on each neighboring device of the target device. In the embodiment of the invention, each device in the preset network can be controlled to acquire the service interface description information of the corresponding third party program, then the multicast technology is adopted to broadcast the service interface description information of the device in the preset network, meanwhile, the service interface description information of other devices can be monitored, if the service interface description information of the other devices is monitored, the monitored other devices can be used as the neighbor devices of the device, then one target device can be selected from all the devices, and the service configuration is carried out on all the neighbor devices by adopting the management interface of the target device according to the corresponding service interface description information, so that the devices in the preset network can autonomously find the other devices, and the service configuration of all the other devices can be managed by any one device, thereby reducing the configuration process, and further solving the technical problems that the configuration process is complicated and redundant because the service configuration needs to be carried out in each device respectively in the related technology.
Optionally, the device configuration apparatus further includes: the first determining module is used for determining an address prefix of a preset link address before the control equipment acquires the service interface description information of the third-party program; the first generation module is used for acquiring a network card address corresponding to the equipment for each piece of equipment and generating an address suffix of the equipment based on the network card address; the first construction module is used for constructing a preset link address of the equipment based on the address prefix and the address suffix.
Optionally, the device configuration apparatus further includes: the first configuration module is used for configuring each service in the third-party program based on a preset remote call protocol and equipment requirements for each third-party program before the control equipment acquires the service interface description information of the third-party program; the second configuration module is used for configuring a preset interface for each third-party program, wherein the preset interface is used for acquiring service interface description information of the third-party program; the first deployment module is used for deploying each third-party program on the corresponding device.
Optionally, the broadcasting unit includes: a second determining module, configured to determine a multicast address of a preset network; the first characterization module is used for characterizing a preset link address of the equipment as a source address and characterizing a multicast address as a destination address; and the first sending module is used for sending the service interface description information to the multicast address by adopting a multicast technology.
Optionally, the broadcasting unit further comprises: the first monitoring module is used for monitoring the multicast address; the first judging module is used for judging whether the source address of the service interface description information is a preset link address of the equipment or not under the condition that the multicast address receives the service interface description information; the first acquisition module is used for acquiring the service interface description information and storing the service interface description information into a local database of the equipment under the condition that the source address of the service interface description information is not a preset link address of the equipment.
Optionally, the configuration unit includes: the third determining module is used for determining a source address corresponding to the service interface description information and determining a neighbor link address of the neighbor device based on the source address; the first analysis module is used for analyzing the service interface description information to obtain a plurality of service interfaces; the first calling module is used for calling each service interface by adopting a preset calling tool and acquiring configuration data of a service corresponding to the service interface; and the third configuration module is used for carrying out service configuration on the neighbor equipment based on the neighbor link address and the configuration data on the management interface of the target equipment, and returning the configuration result to the neighbor equipment based on the neighbor link address.
Optionally, the device configuration apparatus further includes: a fourth determining module, configured to determine a service interface related to the error service when the error service occurs in the preset network; a fifth determining module, configured to determine, based on the service interface, a device to be updated with a configuration error; the first adjusting module is used for adjusting the configuration information of the equipment to be updated.
The above-described device configuration apparatus may further include a processor and a memory, and the above-described acquisition unit 30, broadcast unit 31, characterization unit 32, configuration unit 33, and the like are stored in the memory as program units, and the processor executes the above-described program units stored in the memory to realize the corresponding functions.
The processor includes a kernel, and the kernel fetches a corresponding program unit from the memory. The kernel may set one or more, select a target device from all devices in a preset network by adjusting kernel parameters, and perform service configuration on each neighbor device of the target device by using a management interface of the target device.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), which includes at least one memory chip.
The invention also provides a computer program product adapted to perform, when executed on a data processing device, a program initialized with the method steps of: for each device in a preset network, the control device acquires service interface description information of a third-party program, broadcasts the service interface description information of the device in the preset network by adopting a multicast technology, monitors the service interface description information of other devices, characterizes the monitored other devices as neighbor devices of the device under the condition of monitoring the service interface description information of the other devices, stores the service interface description information of the neighbor devices into a local database of the device, selects a target device from all the devices in the preset network, and adopts a management interface of the target device to carry out service configuration on each neighbor device of the target device.
According to another aspect of the embodiments of the present invention, there is further provided a computer readable storage medium, where the computer readable storage medium includes a stored computer program, where the device in which the computer readable storage medium is located is controlled to execute the above device configuration method based on the multicast technology when the computer program runs.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including one or more processors and a memory for storing one or more programs, where the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the above-mentioned device configuration method based on multicast technology.
Fig. 4 is a block diagram of a hardware structure of an electronic device (or mobile device) for a device configuration method based on a multicast technology according to an embodiment of the present invention. As shown in fig. 4, the electronic device may include one or more (shown in fig. 4 as 402a, 402b, … …,402 n) processors 402 (the processors 402 may include, but are not limited to, a microprocessor MCU, a programmable logic device FPGA, etc. processing means), a memory 404 for storing data. In addition, the method may further include: a display, an input/output interface (I/O interface), a Universal Serial Bus (USB) port (which may be included as one of the ports of the I/O interface), a network interface, a keyboard, a power supply, and/or a camera. It will be appreciated by those of ordinary skill in the art that the configuration shown in fig. 4 is merely illustrative and is not intended to limit the configuration of the electronic device described above. For example, the electronic device may also include more or fewer components than shown in FIG. 4, or have a different configuration than shown in FIG. 4.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present invention, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present invention, it should be understood that the disclosed technology may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, for example, may be a logic function division, and may be implemented in another manner, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.

Claims (10)

1. A device configuration method based on multicast technology, comprising:
for each device in a preset network, controlling the device to acquire service interface description information of a third party program, wherein each device is pre-deployed with the corresponding third party program, the third party program pre-stores configuration data of different services, and the service interface description information comprises: a plurality of service interface descriptions, each of said service interface descriptions relating to a service interface for accessing said configuration data of said service concerned;
broadcasting the service interface description information of the equipment in the preset network by adopting a multicast technology, and monitoring the service interface description information of other equipment;
characterizing the monitored other equipment as neighbor equipment of the equipment under the condition that the service interface description information of the other equipment is monitored, and storing the service interface description information of the neighbor equipment into a local database of the equipment;
Selecting a target device from all the devices in the preset network, and carrying out service configuration on each neighbor device of the target device by adopting a management interface of the target device, wherein the service interface description information of the neighbor device is used as reference information when carrying out service configuration.
2. The apparatus configuration method according to claim 1, characterized by further comprising, before controlling the apparatus to acquire service interface description information of a third party program:
determining an address prefix of a preset link address;
for each device, acquiring a network card address corresponding to the device, and generating an address suffix of the device based on the network card address;
and constructing the preset link address of the equipment based on the address prefix and the address suffix.
3. The apparatus configuration method according to claim 1, characterized by further comprising, before controlling the apparatus to acquire service interface description information of a third party program:
for each third party program, configuring each service in the third party program based on a preset remote call protocol and equipment requirements;
Configuring a preset interface for each third-party program, wherein the preset interface is used for acquiring the service interface description information of the third-party program;
each third party program is deployed on the corresponding device.
4. The device configuration method according to claim 1, wherein the step of broadcasting the service interface description information of the device in the preset network using a multicast technology comprises:
determining a multicast address of the preset network;
characterizing a preset link address of the device as a source address, and characterizing the multicast address as a destination address;
and transmitting the service interface description information to the multicast address by adopting the multicast technology.
5. The device configuration method according to claim 1, wherein the step of listening to the service interface description information of the other device comprises:
monitoring the multicast address;
judging whether a source address of the service interface description information is a preset link address of the equipment or not under the condition that the multicast address receives the service interface description information;
and under the condition that the source address of the service interface description information is not the preset link address of the equipment, acquiring the service interface description information, and storing the service interface description information into the local database of the equipment.
6. The device configuration method according to claim 1, wherein the step of performing traffic configuration for each of the neighbor devices of the target device using a management interface of the target device includes:
determining a source address corresponding to the service interface description information, and determining a neighbor link address of the neighbor device based on the source address;
analyzing the service interface description information to obtain a plurality of service interfaces;
calling each service interface by adopting a preset calling tool, and acquiring the configuration data of the service corresponding to the service interface;
and on a management interface of the target equipment, carrying out service configuration on the neighbor equipment based on the neighbor link address and the configuration data, and returning a configuration result to the neighbor equipment based on the neighbor link address.
7. The device configuration method according to claim 1, characterized in that the device configuration method further comprises:
under the condition that the error service of the preset network is detected, determining the service interface related to the error service;
determining equipment to be updated with wrong configuration based on the service interface;
And adjusting the configuration information of the equipment to be updated.
8. A device configuration apparatus based on multicast technology, comprising:
the device comprises an acquisition unit, a service interface description unit and a service interface management unit, wherein the acquisition unit is used for controlling each device in a preset network to acquire service interface description information of a third party program, each device is pre-deployed with the corresponding third party program, the third party program pre-stores configuration data of different services, and the service interface description information comprises: a plurality of service interface descriptions, each of said service interface descriptions relating to a service interface for accessing said configuration data of said service concerned;
a broadcasting unit, configured to broadcast, in the preset network, the service interface description information of the device, and monitor the service interface description information of other devices by using a multicast technology;
the characterization unit is used for characterizing the monitored other equipment as neighbor equipment of the equipment under the condition that the service interface description information of the other equipment is monitored, and storing the service interface description information of the neighbor equipment into a local database of the equipment;
And the configuration unit is used for selecting target equipment from all the equipment in the preset network, and carrying out service configuration on each neighbor equipment of the target equipment by adopting a management interface of the target equipment, wherein the service interface description information of the neighbor equipment is used as reference information when carrying out service configuration.
9. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored computer program, wherein the computer program, when run, controls a device in which the computer readable storage medium is located to perform the multicast technology based device configuration method according to any one of claims 1 to 7.
10. An electronic device comprising one or more processors and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the multicast technology based device configuration method of any of claims 1-7.
CN202311873718.7A 2023-12-29 2023-12-29 Multicast technology-based equipment configuration method and device and electronic equipment Pending CN117834506A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311873718.7A CN117834506A (en) 2023-12-29 2023-12-29 Multicast technology-based equipment configuration method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311873718.7A CN117834506A (en) 2023-12-29 2023-12-29 Multicast technology-based equipment configuration method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN117834506A true CN117834506A (en) 2024-04-05

Family

ID=90522475

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311873718.7A Pending CN117834506A (en) 2023-12-29 2023-12-29 Multicast technology-based equipment configuration method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN117834506A (en)

Similar Documents

Publication Publication Date Title
CN107592209B (en) Method and system for automatically configuring IP address information by multi-network card server
CN102137004B (en) Edge-facing router capable of automatically identifying
CN108886538B (en) Method and apparatus for configuring M2M device
CN102710811B (en) Realize method and the switch of dhcp address safety distribution
CN108777640B (en) Server detection method, device, system and storage medium
EP1774702A1 (en) System, network entities and computer programs for configuration management of a dynamic host configuration protocol framework
CN106412680B (en) Multi-screen control method and device
CN102594944B (en) A kind of method of automatic configuration and the network equipment
CN105635327A (en) Method and device of address distribution
US20160380830A1 (en) Method and system for managing multiple devices within a network system
US20120269092A1 (en) Auto-configuration of network devices
CN101197811A (en) Method for improving server reliability in dynamic main unit configuration protocol under proxy mode
CN115314571A (en) Cloud protocol gateway implementation method and system supporting heterogeneous device access
CN107968725B (en) Method and device for returning and configuring configuration information of home gateway unit type terminal device
US20080301273A1 (en) Centrally assigning branch specific network addresses
CN104023001A (en) Method for AC equipment to forward unauthorized message information
CN110247778B (en) Operating system installation method and device, electronic equipment and storage medium
US7370227B2 (en) Desktop computer blade fault identification system and method
CN112667293B (en) Method, device and storage medium for deploying operating system
US20150229520A1 (en) Network monitoring system, communication device, network management method
JP2007243825A (en) Controller to which programmable controller is applied
CN103581107A (en) Server and working mode setting method thereof
US11750560B2 (en) Zero Touch Provisioning for a network element over IPv6 unnumbered interfaces in OSPFv3 networks
CN117834506A (en) Multicast technology-based equipment configuration method and device and electronic equipment
CN111164953B (en) Method and switch for providing name service in industrial automation system

Legal Events

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