CN115665165A - Decentralized method of distributed system and decentralized distributed system - Google Patents

Decentralized method of distributed system and decentralized distributed system Download PDF

Info

Publication number
CN115665165A
CN115665165A CN202211252950.4A CN202211252950A CN115665165A CN 115665165 A CN115665165 A CN 115665165A CN 202211252950 A CN202211252950 A CN 202211252950A CN 115665165 A CN115665165 A CN 115665165A
Authority
CN
China
Prior art keywords
devices
equipment
priority
distributed system
link list
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
CN202211252950.4A
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.)
Vtron Group Co Ltd
Original Assignee
Vtron Group 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 Vtron Group Co Ltd filed Critical Vtron Group Co Ltd
Priority to CN202211252950.4A priority Critical patent/CN115665165A/en
Publication of CN115665165A publication Critical patent/CN115665165A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention relates to the field of distributed systems, in particular to a decentralized method of a distributed system and a decentralized distributed system, comprising the following steps: when the distributed system is initialized, all equipment in the system stores the same system configuration information; selecting one of the devices according to a preset rule, and randomly sequencing the priorities of all the devices through the device to generate a priority link list; selecting the equipment with the highest priority in the priority link list as the main equipment; the master device sends control commands to other devices in the distributed system. The distributed processor system is used for realizing decentralized processing of the distributed system, all devices in the system are not limited in type, can be subjected to self-negotiation and self-adaptation and serve as management nodes, self-adaptation processing can be guaranteed when partial devices break down or new devices are added, manual intervention is not needed, normal use of the distributed processor system is not affected, and stability and reliability of operation of the distributed system are improved.

Description

Decentralized method of distributed system and decentralized distributed system
Technical Field
The invention relates to the field of distributed systems, in particular to a decentralized method of a distributed system and a decentralized distributed system.
Background
At present, a distributed processor is usually used in a command center wall splicing system, and the distributed wall splicing system is composed of various encoding boxes, decoding boxes and switching devices with different interfaces, and management service devices, generally management servers or management node machines, need to be configured. All control is issued through the management server or the management node machine, and if the management server or the management node machine fails, the application of the distributed processor system is paralyzed and cannot be normally used, so that the system has safety risks and poor stability.
Disclosure of Invention
The present invention is directed to overcome at least one defect (deficiency) of the prior art, and provides a decentralized method and a decentralized distributed system, which are used to implement decentralized of a distributed system and improve stability and reliability of operation of the distributed system.
The technical scheme adopted by the invention is as follows:
in a first aspect, a distributed system decentralized method is provided, including: when the distributed system is initialized, all equipment in the system stores the same system configuration information; selecting one of the devices according to a preset rule, and randomly sequencing the priorities of all the devices through the device to generate a priority link list; selecting the equipment with the highest priority in the priority link list as the main equipment; the master device sends control commands to other devices in the distributed system.
The invention solves the problem that a server or a management node machine needs to be managed in a distributed system, integrates the functions of management service equipment into each equipment in the system by utilizing a class block chain technology and using decentralized design logic, and realizes decentralized of the distributed system by carrying out internal coordination among the equipment and synchronous refreshing of data in multiple directions, wherein all the equipment are not limited in type and can be self-negotiated and self-adaptive to be used as main equipment.
Further, the method of the present invention further comprises: the main device judges the online states of other devices by monitoring the heartbeats periodically sent by other devices in the distributed system.
Further, the method of the present invention further comprises: the main device periodically sends heartbeat to other devices, so that the other devices judge the online state of the main device by monitoring the heartbeat sent by the main device.
The online state of the other side is judged by mutually monitoring heartbeats between the main device and the other devices, the main device needs to monitor heartbeats of all devices except the main device in the distributed system, and the other devices in the distributed system only need to monitor the heartbeats of the main device.
Further, the present invention also includes: when the main equipment does not monitor the heartbeat sent by some other equipment, judging that the some other equipment is not on line; and the master equipment updates the priority of the other equipment which is not on line in the priority link list to the lowest level and sends the updated priority link list to the other equipment.
When a certain other device fails or goes offline due to other reasons, the master device cannot monitor the heartbeat sent by the certain other device, and then determines that the certain other device is not online, and the master device needs to adjust the priority link list according to the heartbeat and send the priority link list to all other devices for updating.
Further, the present invention also includes: when one other device with the highest priority and in an online state in the priority link list does not monitor the heartbeat sent by the main device, the other device judges that the main device is not online, and the other device automatically becomes a new main device; and the new master equipment updates the priority of the off-line original master equipment in the priority link list to the lowest priority, and sends the updated priority link list to other equipment.
When the master device fails or is offline due to other reasons, other devices cannot monitor the heartbeat sent by the master device, a new master device needs to be reselected according to the priority link list, the device with the highest priority and online at present is obtained according to the priority sequence and serves as the new master device, and the new master device needs to adjust the priority link list according to the priority link list and send the priority link list to all devices for updating. When the master equipment fails, new master equipment is reselected according to the priority link table, so that the normal use of the distributed processor system is not influenced after the current master equipment fails.
Further, the present invention also includes: and other equipment reports the updating result to the main equipment after receiving the updated priority link list sent by the main equipment. The master device confirms the receiving conditions of other devices, and ensures that all the devices receive the updated priority link list so as to avoid errors in the data transmission process.
Further, the present invention also includes: and the master equipment updates the system configuration information in real time in a certain period and sends the system configuration information to other equipment. For example, when a device is offline or a new device is online, the master device needs to adjust system configuration information in the distributed system according to the device state and synchronize all devices in the system in time. To ensure that the normal operation of the system is not affected, the master device will periodically update the system configuration information.
Further, when the new device comes online, the following steps are carried out: the new equipment actively sends a broadcast instruction; and after receiving the broadcast instruction of the new equipment, the main equipment adds the new equipment into the priority link list and sends the updated priority link list to other equipment and the new equipment.
When the online equipment is not on line again or the new equipment is on line, the main equipment updates the priority link list and sends the priority link list to other equipment, and the effect of self-adaptive recovery of the new equipment service can be achieved.
Further, the method also comprises the following steps: the main device inquires system configuration information and distributes the system configuration information to the new device, so that the new device updates the built-in system configuration information and the priority link table after receiving the system configuration information distributed by the main device, and reports an update result to the main device. Meanwhile, the new online device periodically sends a heartbeat to the master device to maintain the online state.
When the new equipment is on line, the main equipment automatically distributes the system configuration information to the new equipment, so that automatic synchronous updating in the system can be realized, manual information input is not needed, and the new on-line equipment can directly work.
Therefore, when the internal sub-equipment of the system fails or new equipment is added, the self-adaptive operation can be realized, and manual intervention is not needed.
In a second aspect, a decentralized distributed system is provided, comprising a plurality of devices connected by a distribution; all the devices store the same system configuration information during initialization;
one of the plurality of devices is selected based on a preset rule and is used for randomly sequencing the priorities of all the plurality of devices to generate a priority link list and sending the priority link list to all the plurality of devices;
the device with the highest priority in the priority link list is automatically selected as a main device;
the master device sends control commands to other devices in the distributed system.
Furthermore, the devices comprise various encoding boxes, decoding boxes and switching devices with different interfaces, and all types of devices can compete in sequence as main devices according to priorities and send control commands to other devices in the distributed system.
Compared with the prior art, the invention has the beneficial effects that:
(1) The invention integrates the function of the management service equipment into all the equipment in the system, realizes decentralized of the distributed system, and all the types of equipment in the system can be self-negotiated and self-adapted to be used as main equipment, thereby ensuring that the normal use of the distributed processor system is not influenced after partial equipment fails;
(2) When new equipment is on line in the system, the main equipment automatically distributes system configuration information to the new equipment, and the new on-line equipment can directly work without manually inputting information.
Drawings
FIG. 1 is a flowchart of the method steps of example 1 of the present invention.
Fig. 2 is a flowchart of steps after the non-master device is offline in embodiment 1 of the present invention.
Fig. 3 is a flowchart of steps after the master device is offline in embodiment 1 of the present invention.
Fig. 4 is a flowchart of steps of a new device in an online process according to embodiment 1 of the present invention.
Detailed Description
The drawings are only for purposes of illustration and are not to be construed as limiting the invention. For a better understanding of the following embodiments, certain features of the drawings may be omitted, enlarged or reduced, and do not represent the size of an actual product; it will be understood by those skilled in the art that certain well-known structures in the drawings and descriptions thereof may be omitted.
Example 1
As shown in fig. 1, the present embodiment provides a decentralized method for a distributed system, including:
s1, when a distributed system is initialized, all equipment in the system stores the same system configuration information;
s2, selecting one of the devices according to a preset rule, and randomly sequencing the priorities of all the devices through the device to generate a priority link list;
s3, selecting the equipment with the highest priority in the priority link list as main equipment;
and S4, the main equipment sends a control command to other equipment in the distributed system.
In this embodiment, all devices in the system store the same system configuration information during initialization, so that the effect that all devices can compete in sequence for use as the master device according to priority without limiting types is achieved, and synchronous update of all devices is realized through the master device, thereby realizing decentralized of the distributed system. The priority of the equipment is sequenced by using the method for randomly generating the priority link list, so that the main equipment is convenient to select, and when the equipment is subsequently on or off, the main equipment can update the priority link list in time and synchronously send the priority link list to other equipment, so that the normal use of the distributed processor system is not influenced after the faults of part of the equipment.
Wherein the other devices refer to devices other than the master device in the distributed system.
In step S1, the devices may include different types of devices such as encoding boxes, decoding boxes, switching devices, and the like with different interfaces, and all types of devices may be elected as master devices, thereby implementing decentralized of the distributed system. To ensure that all devices are adapted to operate as a master device, the system configuration information of all devices in the system needs to be updated synchronously.
In the specific implementation process of step S2, the preset rule may be preset, so that one of the devices may be selected based on the preset rule in the decentralized distributed system, the selected device is used to automatically generate the priority link table, and the automatically generated priority link table is shared with other devices, so as to perform step S3. For example, a device with a higher IP address may be selected according to the IP address of the device to generate the priority link table.
In step S3, a device with the highest priority is elected from the master as the master device based on the generated priority link table, and since the priority ranking is randomly generated, that is, all devices in the system can be elected as the master device.
In step S4, the master device is used to send control commands to other devices in the distributed system, so that the functions of the original management service device are randomly integrated into the pushed and selected master device, thereby implementing the control function to the center.
As shown in fig. 2 and 3, the present embodiment further includes:
a0, the main device judges the online states of other devices by monitoring the heartbeats periodically sent by the other devices in the distributed system; the main device periodically sends heartbeat to other devices, so that the other devices judge the online state of the main device by monitoring the heartbeat sent by the main device.
The main equipment and other equipment judge the health condition of the equipment by periodically sending heartbeat information, judge whether the other side is alive or not, and judge that the equipment fails if the heartbeat information of the equipment is not received within a specified time.
This embodiment still includes: when a certain device is off line due to failure or other reasons, the following steps are carried out:
a1, when the main equipment does not monitor the heartbeat sent by some other equipment, judging that the some other equipment is not on-line;
a2, the main device updates the priority of the other off-line devices in the priority link list to the lowest level, and sends the updated priority link list to the other devices;
a3, when one other device with the highest priority and in an online state in the priority link list does not monitor the heartbeat sent by the main device, the other device judges that the main device is not online, and the other device automatically becomes a new main device;
and A4, the new master device updates the priority of the off-line original master device in the priority link list to the lowest priority, and sends the updated priority link list to other devices.
In a specific implementation process, the original main device is a device with a first priority in a priority link list, when the original main device goes offline, the device with a second priority in the priority link list does not monitor the original main device for two times continuously within a specified time, the original main device is judged to be offline, the device with the second priority in the priority link list automatically becomes a new main device, and the new main device is used as the main device to send heartbeat to other devices for confirmation; when the device with the third priority in the priority link list does not monitor the heartbeat sent by the master device for three consecutive times within the specified time, judging that the original master device and the device with the second priority in the priority link list are not on line, automatically changing the device with the third priority in the priority link list into a new master device, and sending the heartbeat to other devices as the master device for confirmation; and so on until some other device with the highest priority and in an online state in the priority link table becomes a new master device. The new main equipment actively sends heartbeat to other equipment and synchronously updates the priority link table, so that the other equipment can timely know the replacement information of the main equipment, and the heartbeat is sent to the new main equipment.
This embodiment still includes: and other equipment reports the updating result to the main equipment after receiving the updated priority link list sent by the main equipment. The main device ensures that all devices receive the updated priority link list through the information fed back by other devices, so as to avoid errors or omissions in the data transmission process.
This embodiment still includes: and the master equipment updates the system configuration information in real time in a certain period and sends the system configuration information to other equipment. The main device periodically updates the system configuration information, can timely synchronize information to other devices under the condition of ensuring that the normal work of the system is not influenced, and ensures that all devices in the system can be synchronously refreshed.
As shown in fig. 4, the present embodiment further includes: when the new device is on line, the following steps are carried out:
b1, the new equipment actively sends a broadcast instruction;
b2, after the main device receives the broadcast instruction of the new device, adding the new device into the priority link list, and sending the updated priority link list to other devices and the new device;
b3, the main equipment inquires system configuration information and distributes the system configuration information to the new equipment, so that the new equipment updates the built-in system configuration information and the priority link table after receiving the system configuration information distributed by the main equipment, and reports an update result to the main equipment;
and B4, periodically sending a heartbeat to the master device by the new device so as to maintain the online state.
When the online equipment is not on line again or the new equipment is on line, the main equipment updates the priority link list and sends the priority link list to other equipment, and the effect of self-adaptive recovery of the new equipment service can be achieved. Meanwhile, the main equipment automatically distributes the system configuration information to the new equipment, automatic synchronous updating in the system can be achieved, manual information input is not needed, and the new on-line equipment can be directly added into the system and work is conducted. Therefore, when the internal sub-equipment of the system fails or new equipment is added, the self-adaptive operation can be realized, and manual intervention is not needed.
Example 2
The embodiment provides a decentralized distributed system, which comprises a plurality of devices connected in a distributed manner; the devices comprise coding boxes, decoding boxes and switching devices with various interfaces.
All the devices store the same system configuration information during initialization; in order to ensure that all devices can adaptively operate as a master device, system configuration information in all devices needs to be updated synchronously.
One of the plurality of devices is selected based on a preset rule and is used for randomly sequencing the priorities of all the plurality of devices to generate a priority link list and sending the priority link list to all the plurality of devices; the preset rule can be preset, so that one device can be selected based on the preset rule in the decentralized distributed system, the selected device is utilized to automatically generate the priority link table, the mode of generating the priority link table is used to facilitate real-time updating of device information in the system, and meanwhile, the priority link table also needs to be synchronously updated in all devices in the system.
The equipment with the highest priority in the priority link list is automatically selected as the main equipment; and the equipment with the highest priority is taken as the main equipment, the main equipment needs to perform subsequent work of updating the priority link list and synchronously updates the priority link list to all the equipment, and all the equipment in the system can work as the main equipment because the priority sequence is generated randomly.
The main equipment sends control commands to other equipment in the distributed system; all types of equipment in the system can be used as main equipment to send control commands to other equipment in the distributed system, and the main equipment is used for sending the control commands to the other equipment in the distributed system, so that the functions of the management service equipment in the prior art are randomly integrated into the pushed and selected main equipment, and the control function of going to the center is realized.
It should be understood that the above-mentioned embodiments of the present invention are only examples for clearly illustrating the technical solutions of the present invention, and are not intended to limit the specific embodiments of the present invention. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention claims should be included in the protection scope of the present invention claims.

Claims (10)

1. A distributed system decentralized method, comprising:
when the distributed system is initialized, all equipment in the system stores the same system configuration information;
selecting one of the devices according to a preset rule, and randomly sequencing the priorities of all the devices through the device to generate a priority link list;
selecting the equipment with the highest priority in the priority link list as the main equipment;
the master device sends control commands to other devices in the distributed system.
2. The distributed system decentralization method of claim 1, further comprising:
the main device judges the online states of other devices by monitoring the heartbeats periodically sent by other devices in the distributed system.
3. The distributed system decentralization method of claim 1, further comprising:
the main device periodically sends heartbeat to other devices, so that the other devices judge the online state of the main device by monitoring the heartbeat sent by the main device.
4. The distributed system decentralization method of claim 2, further comprising:
when the main device does not monitor the heartbeat sent by some other device, judging that the some other device is not on-line;
and the master device updates the priority of the other off-line devices in the priority link list to the lowest level and sends the updated priority link list to the other devices.
5. The distributed system decentralization method of claim 3, further comprising:
when one other device with the highest priority and in an online state in the priority link list does not monitor the heartbeat sent by the main device, the other device judges that the main device is not online, and the other device automatically becomes a new main device;
and the new master equipment updates the priority of the off-line original master equipment in the priority link list to the lowest priority and sends the updated priority link list to other equipment.
6. The decentralized method according to claim 4 or 5, wherein the other devices report the update result to the master device after receiving the updated prioritized link list sent by the master device.
7. The distributed system decentralization method of claim 1, further comprising: and the master equipment updates the system configuration information in real time in a certain period and sends the system configuration information to other equipment.
8. The distributed system decentralized method according to claim 7, characterized in that when a new device is online, the following steps are performed:
the new equipment actively sends a broadcast instruction;
and after receiving the broadcast instruction of the new equipment, the main equipment adds the new equipment into the priority link list and sends the updated priority link list to other equipment and the new equipment.
9. The distributed system decentralization method of claim 8, further comprising:
the main device inquires system configuration information and distributes the system configuration information to the new device, so that the new device updates the built-in system configuration information and the priority link table after receiving the system configuration information distributed by the main device, and reports an update result to the main device.
10. A decentralized distributed system comprising a plurality of devices connected by a distribution; the method is characterized in that all the devices store the same system configuration information during initialization;
one of the plurality of devices is selected based on a preset rule and is used for randomly sequencing the priorities of all the plurality of devices to generate a priority link list and sending the priority link list to all the plurality of devices;
the device with the highest priority in the priority link list is automatically selected as a main device;
the master device sends control commands to other devices in the distributed system.
CN202211252950.4A 2022-10-13 2022-10-13 Decentralized method of distributed system and decentralized distributed system Pending CN115665165A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211252950.4A CN115665165A (en) 2022-10-13 2022-10-13 Decentralized method of distributed system and decentralized distributed system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211252950.4A CN115665165A (en) 2022-10-13 2022-10-13 Decentralized method of distributed system and decentralized distributed system

Publications (1)

Publication Number Publication Date
CN115665165A true CN115665165A (en) 2023-01-31

Family

ID=84987173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211252950.4A Pending CN115665165A (en) 2022-10-13 2022-10-13 Decentralized method of distributed system and decentralized distributed system

Country Status (1)

Country Link
CN (1) CN115665165A (en)

Similar Documents

Publication Publication Date Title
CN102426415A (en) Redundancy manager
CN112653734B (en) Real-time master-slave control and data synchronization system and method for server cluster
CN105607590A (en) Methods and apparatus to provide redundancy in a process control system
US20070270984A1 (en) Method and Device for Redundancy Control of Electrical Devices
CN109218126B (en) Method, device and system for monitoring node survival state
EP2983342A2 (en) Internet protocol addressing of industrial control devices employing the network ring topology
CN111460039A (en) Relational database processing system, client, server and method
US8335177B2 (en) Communication system
US20120254377A1 (en) Redundant Automation System
CN108173971A (en) A kind of MooseFS high availability methods and system based on active-standby switch
KR101705504B1 (en) Programmable controller and programmable controller system
CN105577444A (en) Wireless controller management method and wireless controller
CN105812161A (en) Controller fault backup method and system
CN113965494A (en) Method for fault detection and role selection in a redundant process network
CN115665165A (en) Decentralized method of distributed system and decentralized distributed system
CN105049263A (en) Data processing method and data processing system
US11646909B2 (en) Method for data transmission in a redundantly operable communications network and coupling communication device
JPWO2002045352A1 (en) Network monitoring and control system
CN101877714A (en) Integrated server
CN109101372A (en) Redundancy switching method, storage medium and the Shelf Management Module of Shelf Management Module
CN107528730A (en) Multiple redundancy method, multiple redundancy server and system
WO2013051145A1 (en) Computer system, management device, management method, and program
KR20010065409A (en) Master machine selecting method in distribution type intelligent network system
CN110955210B (en) AGV scheduling method, device and system
CN112272105B (en) SDN controller cluster member control method, system and medium

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