WO2018227365A1 - Method and system for selecting main device in network link - Google Patents

Method and system for selecting main device in network link Download PDF

Info

Publication number
WO2018227365A1
WO2018227365A1 PCT/CN2017/088017 CN2017088017W WO2018227365A1 WO 2018227365 A1 WO2018227365 A1 WO 2018227365A1 CN 2017088017 W CN2017088017 W CN 2017088017W WO 2018227365 A1 WO2018227365 A1 WO 2018227365A1
Authority
WO
WIPO (PCT)
Prior art keywords
devices
primary device
network link
election
votes
Prior art date
Application number
PCT/CN2017/088017
Other languages
French (fr)
Chinese (zh)
Inventor
李炜
Original Assignee
深圳市伊特利网络科技有限公司
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 深圳市伊特利网络科技有限公司 filed Critical 深圳市伊特利网络科技有限公司
Priority to PCT/CN2017/088017 priority Critical patent/WO2018227365A1/en
Publication of WO2018227365A1 publication Critical patent/WO2018227365A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/22Arrangements for detecting or preventing errors in the information received using redundant apparatus to increase reliability

Definitions

  • the present invention relates to the field of communications, and in particular, to a method and system for selecting a master device in a network link.
  • a smart phone belongs to a common device used by people for daily use.
  • a master device cannot be elected by voting, resulting in a network link device having no primary and secondary points, and unified scheduling cannot be achieved, and the user experience is low.
  • a method for selecting a master device in a network link is provided, which solves the disadvantage of low user experience in the prior art.
  • a method for selecting a master device in a network link includes the following steps:
  • the method further includes:
  • the second device that votes the second most among all devices is extracted, and the second device is determined as the standby primary device.
  • the method further includes:
  • the standby primary device switches to the primary device and sends an election for the alternate primary device.
  • a master device selection system in a network link includes:
  • a determining unit configured to determine all connected devices in the network connection, and all devices are formed into a first multicast group
  • An election unit configured to initiate an election message in the first multicast group, where the election message is used to vote for the primary device
  • the control unit is configured to receive voting information sent by other devices. If the number of votes is the largest, the device is determined to be the master device.
  • system further includes:
  • control unit configured to extract a second device that votes the second most among all devices, and determine the second device as the standby primary device.
  • system further includes:
  • the control unit is configured to switch the standby master device to the master device and send the candidate for the standby master device if the master device fails.
  • a computer readable storage medium having stored thereon a computer program that, when executed by a processor, implements a master device selection method in the network link.
  • a terminal comprising one or more processors, a memory, a transceiver, and one or more programs, the one or more programs being stored in the memory and configured by the Executed by one or more processors, the program including instructions for performing the steps in the master device selection method in the network link described above.
  • the technical solution provided by the specific embodiment of the present invention determines all the connected devices in the network connection, and all the devices form a first multicast group, and an election message is initiated in the first multicast group, and the election message is used to vote for the primary device to receive
  • the voting information sent by other devices if the number of votes is the largest, determines that the device is the master device, so it has the device that initiates the voting and determines the number of votes to be the master device, thereby achieving unified scheduling and facilitating the advantages of the user.
  • FIG. 1 is a flowchart of a method for selecting a master device in a network link according to the present invention.
  • FIG. 2 is a structural diagram of a master device selection system in a network link according to the present invention.
  • FIG. 3 is a schematic structural diagram of hardware of a terminal provided by the present invention.
  • FIG. 1 is a flowchart of a method for selecting a master device in a network link according to a first preferred embodiment of the present invention.
  • the method is implemented by a terminal.
  • the method is as shown in FIG. 1 , and includes the following steps:
  • Step S101 Determine all connected devices in the network connection, and combine all the devices into the first multicast group.
  • Step S102 Initiating an election message in the first multicast group, where the election message is used to vote for the primary device;
  • Step S103 Receive voting information sent by other devices. If the number of votes is the largest, determine that the device is the master device.
  • the technical solution provided by the specific embodiment of the present invention determines all the connected devices in the network connection, and all the devices form a first multicast group, and an election message is initiated in the first multicast group, and the election message is used to vote for the primary device to receive
  • the voting information sent by other devices if the number of votes is the largest, determines that the device is the master device, so it has the device that initiates the voting and determines the number of votes to be the master device, thereby achieving unified scheduling and facilitating the advantages of the user.
  • the method may further include:
  • the second device that votes the second most among all devices is extracted, and the second device is determined as the standby primary device.
  • the method may further include:
  • the standby primary device switches to the primary device and sends an election for the alternate primary device.
  • FIG. 2 is a schematic diagram of a master device selection system in a network link according to a second preferred embodiment of the present invention.
  • the system includes the following:
  • the determining unit 201 is configured to determine all connected devices in the network connection, and form all the devices into the first multicast group;
  • the election unit 202 is configured to initiate an election message in the first multicast group, where the election message is used to vote for the primary device;
  • the control unit 203 is configured to receive voting information sent by other devices. If the number of votes is the largest, the device is determined to be the master device.
  • the technical solution provided by the specific embodiment of the present invention determines all the connected devices in the network connection, and all the devices form a first multicast group, and an election message is initiated in the first multicast group, and the election message is used to vote for the primary device to receive
  • the voting information sent by other devices if the number of votes is the largest, determines that the device is the master device, so it has the device that initiates the voting and determines the number of votes to be the master device, thereby achieving unified scheduling and facilitating the advantages of the user.
  • the above system may further include:
  • the control unit 203 is configured to extract a second device that votes the second most among all devices, and determine the second device as the standby primary device.
  • the above system may further include:
  • the control unit 203 is configured to switch to the primary device and send the election of the standby primary device, such as the failure of the primary device.
  • a specific embodiment of the present invention further provides a computer readable storage medium having stored thereon a computer program, the program being implemented by the processor to implement a method for selecting a master device in the network link.
  • a specific embodiment of the present invention further provides a terminal, as shown in FIG. 3, including one or more processors 302, a memory 301, a transceiver 303, and one or more programs, the one or more programs being stored in The memory is, and is configured to be executed by, the one or more processors, the program comprising instructions for performing the steps in the master device selection method of the network link described above.
  • Computer readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another.
  • a storage medium may be any available media that can be accessed by a computer.
  • the computer readable medium may include random access memory (Random) Access Memory, RAM), Read-Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), Compact Disc Read-Only Memory, CD-ROM, or other optical disc storage, magnetic storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. Also. Any connection may suitably be a computer readable medium.
  • a disk and a disc include a compact disc (CD), a laser disc, a compact disc, a digital versatile disc (DVD), a floppy disk, and a Blu-ray disc, wherein the disc is usually magnetically copied, and the disc is The laser is used to optically replicate the data. Combinations of the above should also be included within the scope of the computer readable media.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

Provided in the present invention are a method and a system for selecting a main device in a network link, the method comprising the following steps: determining all of the connected devices in a network link, and grouping all of the devices into a first multicast group; initiating an election message in the first multicast group, the election message being used for voting to elect a main device; receiving vote information sent by the other devices and, if the number of votes is the most, determining that the present device is the main device. The technical solution provided by the present invention has the advantage of good user experience.

Description

网络链接中主设备推选方法及系统  Master device selection method and system in network link 技术领域Technical field
本发明涉及通信领域,尤其涉及一种网络链接中主设备推选方法及系统。The present invention relates to the field of communications, and in particular, to a method and system for selecting a master device in a network link.
背景技术Background technique
智能手机属于人日常使用的常用设备,在网络链接的群组中无法通过投票选举主设备,导致网络链接的设备无主次之分,无法实现统一调度,用户体验度低。A smart phone belongs to a common device used by people for daily use. In a group of network links, a master device cannot be elected by voting, resulting in a network link device having no primary and secondary points, and unified scheduling cannot be achieved, and the user experience is low.
技术问题technical problem
提供一种网络链接中主设备推选方法,其解决了现有技术用户体验度低的缺点。A method for selecting a master device in a network link is provided, which solves the disadvantage of low user experience in the prior art.
技术解决方案Technical solution
一方面,提供一种网络链接中主设备推选方法,所述方法包括如下步骤:In one aspect, a method for selecting a master device in a network link is provided, and the method includes the following steps:
确定网络连接中所有连接的设备,将所有设备组成第一组播组;Determine all connected devices in the network connection and group all the devices into the first multicast group.
在第一组播组中发起选举消息,该选举消息用于投票选举主设备;Initiating an election message in the first multicast group, where the election message is used to vote for the primary device;
接收其他设备发送的投票信息,如票数最多,则确定本设备为主设备。Receive voting information sent by other devices. If the number of votes is the most, determine that the device is the master device.
可选的,所述方法还包括:Optionally, the method further includes:
提取所有设备中投票第二多的第二设备,将第二设备确定为备用主设备。The second device that votes the second most among all devices is extracted, and the second device is determined as the standby primary device.
可选的,所述方法还包括:Optionally, the method further includes:
如主设备故障,备用主设备切换成主设备并发送备用主设备的选举。If the primary device fails, the standby primary device switches to the primary device and sends an election for the alternate primary device.
第二方面,提供一种网络链接中主设备推选系统,所述方法包括:In a second aspect, a master device selection system in a network link is provided, and the method includes:
确定单元,用于确定网络连接中所有连接的设备,将所有设备组成第一组播组;a determining unit, configured to determine all connected devices in the network connection, and all devices are formed into a first multicast group;
选举单元,用于在第一组播组中发起选举消息,该选举消息用于投票选举主设备;An election unit, configured to initiate an election message in the first multicast group, where the election message is used to vote for the primary device;
控制单元,用于接收其他设备发送的投票信息,如票数最多,则确定本设备为主设备。The control unit is configured to receive voting information sent by other devices. If the number of votes is the largest, the device is determined to be the master device.
可选的,所述系统还包括:Optionally, the system further includes:
控制单元,用于提取所有设备中投票第二多的第二设备,将第二设备确定为备用主设备。And a control unit, configured to extract a second device that votes the second most among all devices, and determine the second device as the standby primary device.
可选的,所述系统还包括:Optionally, the system further includes:
控制单元,用于如主设备故障,备用主设备切换成主设备并发送备用主设备的选举。The control unit is configured to switch the standby master device to the master device and send the candidate for the standby master device if the master device fails.
第三方面,提供一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述网络链接中主设备推选方法。In a third aspect, a computer readable storage medium is provided having stored thereon a computer program that, when executed by a processor, implements a master device selection method in the network link.
第四方面,提供一种终端,包括一个或多个处理器、存储器、收发器,以及一个或多个程序,所述一个或多个程序被存储在所述存储器中,并且被配置由所述一个或多个处理器执行,所述程序包括用于执行上述网络链接中主设备推选方法中的步骤的指令。In a fourth aspect, a terminal is provided, comprising one or more processors, a memory, a transceiver, and one or more programs, the one or more programs being stored in the memory and configured by the Executed by one or more processors, the program including instructions for performing the steps in the master device selection method in the network link described above.
有益效果Beneficial effect
本发明具体实施方式提供的技术方案确定网络连接中所有连接的设备,将所有设备组成第一组播组,在第一组播组中发起选举消息,该选举消息用于投票选举主设备,接收其他设备发送的投票信息,如票数最多,则确定本设备为主设备,所以其具有发起投票并将票数最多的设备确定为主设备,从而实现统一调度,方便用户的优点。The technical solution provided by the specific embodiment of the present invention determines all the connected devices in the network connection, and all the devices form a first multicast group, and an election message is initiated in the first multicast group, and the election message is used to vote for the primary device to receive The voting information sent by other devices, if the number of votes is the largest, determines that the device is the master device, so it has the device that initiates the voting and determines the number of votes to be the master device, thereby achieving unified scheduling and facilitating the advantages of the user.
附图说明DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any creative work.
图1为本发明提供的一种网络链接中主设备推选方法的流程图。FIG. 1 is a flowchart of a method for selecting a master device in a network link according to the present invention.
图2为本发明提供的一种网络链接中主设备推选系统的结构图。2 is a structural diagram of a master device selection system in a network link according to the present invention.
图3为本发明提供的一种终端的硬件结构示意图。FIG. 3 is a schematic structural diagram of hardware of a terminal provided by the present invention.
本发明的实施方式Embodiments of the invention
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
参阅图1,图1为本发明第一较佳实施方式提供的一种网络链接中主设备推选方法的流程图,该方法由终端来完成,该方法如图1所示,包括如下步骤:Referring to FIG. 1 , FIG. 1 is a flowchart of a method for selecting a master device in a network link according to a first preferred embodiment of the present invention. The method is implemented by a terminal. The method is as shown in FIG. 1 , and includes the following steps:
步骤S101、确定网络连接中所有连接的设备,将所有设备组成第一组播组;Step S101: Determine all connected devices in the network connection, and combine all the devices into the first multicast group.
步骤S102、在第一组播组中发起选举消息,该选举消息用于投票选举主设备;Step S102: Initiating an election message in the first multicast group, where the election message is used to vote for the primary device;
步骤S103、接收其他设备发送的投票信息,如票数最多,则确定本设备为主设备。Step S103: Receive voting information sent by other devices. If the number of votes is the largest, determine that the device is the master device.
本发明具体实施方式提供的技术方案确定网络连接中所有连接的设备,将所有设备组成第一组播组,在第一组播组中发起选举消息,该选举消息用于投票选举主设备,接收其他设备发送的投票信息,如票数最多,则确定本设备为主设备,所以其具有发起投票并将票数最多的设备确定为主设备,从而实现统一调度,方便用户的优点。The technical solution provided by the specific embodiment of the present invention determines all the connected devices in the network connection, and all the devices form a first multicast group, and an election message is initiated in the first multicast group, and the election message is used to vote for the primary device to receive The voting information sent by other devices, if the number of votes is the largest, determines that the device is the master device, so it has the device that initiates the voting and determines the number of votes to be the master device, thereby achieving unified scheduling and facilitating the advantages of the user.
可选的,上述步骤S103之后还可以包括:Optionally, after the step S103, the method may further include:
提取所有设备中投票第二多的第二设备,将第二设备确定为备用主设备。The second device that votes the second most among all devices is extracted, and the second device is determined as the standby primary device.
可选的,上述步骤S103之后还可以包括:Optionally, after the step S103, the method may further include:
如主设备故障,备用主设备切换成主设备并发送备用主设备的选举。If the primary device fails, the standby primary device switches to the primary device and sends an election for the alternate primary device.
参阅图2,图2为本发明第二较佳实施方式提供的一种网络链接中主设备推选系统,该系统如图2所示,包括:Referring to FIG. 2, FIG. 2 is a schematic diagram of a master device selection system in a network link according to a second preferred embodiment of the present invention. The system includes the following:
确定单元201,用于确定网络连接中所有连接的设备,将所有设备组成第一组播组;The determining unit 201 is configured to determine all connected devices in the network connection, and form all the devices into the first multicast group;
选举单元202,用于在第一组播组中发起选举消息,该选举消息用于投票选举主设备;The election unit 202 is configured to initiate an election message in the first multicast group, where the election message is used to vote for the primary device;
控制单元203,用于接收其他设备发送的投票信息,如票数最多,则确定本设备为主设备。The control unit 203 is configured to receive voting information sent by other devices. If the number of votes is the largest, the device is determined to be the master device.
本发明具体实施方式提供的技术方案确定网络连接中所有连接的设备,将所有设备组成第一组播组,在第一组播组中发起选举消息,该选举消息用于投票选举主设备,接收其他设备发送的投票信息,如票数最多,则确定本设备为主设备,所以其具有发起投票并将票数最多的设备确定为主设备,从而实现统一调度,方便用户的优点。The technical solution provided by the specific embodiment of the present invention determines all the connected devices in the network connection, and all the devices form a first multicast group, and an election message is initiated in the first multicast group, and the election message is used to vote for the primary device to receive The voting information sent by other devices, if the number of votes is the largest, determines that the device is the master device, so it has the device that initiates the voting and determines the number of votes to be the master device, thereby achieving unified scheduling and facilitating the advantages of the user.
可选的,上述系统还可以包括:Optionally, the above system may further include:
控制单元203,用于提取所有设备中投票第二多的第二设备,将第二设备确定为备用主设备。The control unit 203 is configured to extract a second device that votes the second most among all devices, and determine the second device as the standby primary device.
可选的,上述系统还可以包括:Optionally, the above system may further include:
控制单元203,用于如主设备故障,备用主设备切换成主设备并发送备用主设备的选举。The control unit 203 is configured to switch to the primary device and send the election of the standby primary device, such as the failure of the primary device.
需要说明的是,对于前述的各方法实施方式或实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为根据本发明,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述实施方式或实施例均属于优选实施例,所涉及的动作和单元并不一定是本发明所必须的。It should be noted that, for the foregoing method embodiments or embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should know that the present invention is not subject to the described action sequence. Limitations, as certain steps may be performed in other sequences or concurrently in accordance with the present invention. In the following, those skilled in the art should also understand that the embodiments or examples described in the specification are preferred embodiments, and the actions and units involved are not necessarily required by the present invention.
本发明具体实施方式还提供一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述网络链接中主设备推选方法。A specific embodiment of the present invention further provides a computer readable storage medium having stored thereon a computer program, the program being implemented by the processor to implement a method for selecting a master device in the network link.
本发明具体实施方式还提供一种终端,如图3所示,包括一个或多个处理器302、存储器301、收发器303,以及一个或多个程序,所述一个或多个程序被存储在所述存储器中,并且被配置由所述一个或多个处理器执行,所述程序包括用于执行上述网络链接中主设备推选方法中的步骤的指令。A specific embodiment of the present invention further provides a terminal, as shown in FIG. 3, including one or more processors 302, a memory 301, a transceiver 303, and one or more programs, the one or more programs being stored in The memory is, and is configured to be executed by, the one or more processors, the program comprising instructions for performing the steps in the master device selection method of the network link described above.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above embodiments, the descriptions of the various embodiments are different, and the details that are not detailed in a certain embodiment can be referred to the related descriptions of other embodiments.
本发明实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。The steps in the method of the embodiment of the present invention may be sequentially adjusted, merged, and deleted according to actual needs.
本发明实施例装置中的单元可以根据实际需要进行合并、划分和删减。本领域的技术人员可以将本说明书中描述的不同实施例以及不同实施例的特征进行结合或组合。The units in the apparatus of the embodiment of the present invention may be combined, divided, and deleted according to actual needs. Those skilled in the art can combine or combine the different embodiments described in the specification and the features of the different embodiments.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本发明可以用硬件实现,或固件实现,或它们的组合方式来实现。当使用软件实现时,可以将上述功能存储在计算机可读介质中或作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是计算机能够存取的任何可用介质。以此为例但不限于:计算机可读介质可以包括随机存取存储器(Random Access Memory,RAM)、只读存储器(Read-Only Memory,ROM)、电可擦可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)或其他光盘存储、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质。此外。任何连接可以适当的成为计算机可读介质。例如,如果软件是使用同轴电缆、光纤光缆、双绞线、数字用户线(Digital Subscriber Line,DSL)或者诸如红外线、无线电和微波之类的无线技术从网站、服务器或者其他远程源传输的,那么同轴电缆、光纤光缆、双绞线、DSL或者诸如红外线、无线和微波之类的无线技术包括在所属介质的定影中。如本发明所使用的,盘(Disk)和碟(disc)包括压缩光碟(CD)、激光碟、光碟、数字通用光碟(DVD)、软盘和蓝光光碟,其中盘通常磁性的复制数据,而碟则用激光来光学的复制数据。上面的组合也应当包括在计算机可读介质的保护范围之内。Through the description of the above embodiments, those skilled in the art can clearly understand that the present invention can be implemented in hardware, firmware implementation, or a combination thereof. When implemented in software, the functions described above may be stored in or transmitted as one or more instructions or code on a computer readable medium. Computer readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another. A storage medium may be any available media that can be accessed by a computer. Taking this as an example, but not limited to: the computer readable medium may include random access memory (Random) Access Memory, RAM), Read-Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), Compact Disc Read-Only Memory, CD-ROM, or other optical disc storage, magnetic storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. Also. Any connection may suitably be a computer readable medium. For example, if the software is using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (Digital Subscriber Line, DSL) or wireless technology such as infrared, radio and microwave transmission from a website, server or other remote source, then coaxial cable, fiber optic cable, twisted pair, DSL or such as infrared, wireless and microwave Wireless technology is included in the fixing of the associated medium. As used in the present invention, a disk and a disc include a compact disc (CD), a laser disc, a compact disc, a digital versatile disc (DVD), a floppy disk, and a Blu-ray disc, wherein the disc is usually magnetically copied, and the disc is The laser is used to optically replicate the data. Combinations of the above should also be included within the scope of the computer readable media.
总之,以上所述仅为本发明技术方案的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。 In summary, the above description is only a preferred embodiment of the technical solution of the present invention, and is not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.

Claims (8)

  1. 一种网络链接中主设备推选方法,其特征在于,所述方法包括如下步骤: A method for selecting a master device in a network link, characterized in that the method comprises the following steps:
    确定网络连接中所有连接的设备,将所有设备组成第一组播组;Determine all connected devices in the network connection and group all the devices into the first multicast group.
    在第一组播组中发起选举消息,该选举消息用于投票选举主设备;Initiating an election message in the first multicast group, where the election message is used to vote for the primary device;
    接收其他设备发送的投票信息,如票数最多,则确定本设备为主设备。Receive voting information sent by other devices. If the number of votes is the most, determine that the device is the master device.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1 further comprising:
    提取所有设备中投票第二多的第二设备,将第二设备确定为备用主设备。The second device that votes the second most among all devices is extracted, and the second device is determined as the standby primary device.
  3. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1 further comprising:
    如主设备故障,备用主设备切换成主设备并发送备用主设备的选举。If the primary device fails, the standby primary device switches to the primary device and sends an election for the alternate primary device.
  4. 一种网络链接中主设备推选系统,其特征在于,所述系统包括:A master link selection system in a network link, characterized in that the system comprises:
    确定单元,用于确定网络连接中所有连接的设备,将所有设备组成第一组播组;a determining unit, configured to determine all connected devices in the network connection, and all devices are formed into a first multicast group;
    选举单元,用于在第一组播组中发起选举消息,该选举消息用于投票选举主设备;An election unit, configured to initiate an election message in the first multicast group, where the election message is used to vote for the primary device;
    控制单元,用于接收其他设备发送的投票信息,如票数最多,则确定本设备为主设备。The control unit is configured to receive voting information sent by other devices. If the number of votes is the largest, the device is determined to be the master device.
  5. 根据权利要求4所述的系统,其特征在于,The system of claim 4 wherein:
    所述控制单元,用于提取所有设备中投票第二多的第二设备,将第二设备确定为备用主设备。The control unit is configured to extract a second device that votes the second most among all devices, and determine the second device as the standby primary device.
  6. 根据权利要求4所述的系统,其特征在于, The system of claim 4 wherein:
    所述控制单元,用于如主设备故障,备用主设备切换成主设备并发送备用主设备的选举。The control unit is configured to switch to the primary device and send the election of the standby primary device, such as the failure of the primary device.
  7. 一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如权利要求1-3任意一项所述的网络链接中主设备推选方法。A computer readable storage medium having stored thereon a computer program, the program being executed by a processor to implement the method of selecting a master device in a network link according to any one of claims 1-3.
  8. 一种终端,其特征在于,包括一个或多个处理器、存储器、收发器,以及一个或多个程序,所述一个或多个程序被存储在所述存储器中,并且被配置由所述一个或多个处理器执行,所述程序包括用于执行1-3任意一项所述的网络链接中主设备推选方法中的步骤的指令。A terminal, comprising: one or more processors, a memory, a transceiver, and one or more programs, the one or more programs being stored in the memory and configured by the one Executing by a plurality of processors, the program comprising instructions for performing the steps in the master device selection method in the network link of any of 1-3.
PCT/CN2017/088017 2017-06-13 2017-06-13 Method and system for selecting main device in network link WO2018227365A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/088017 WO2018227365A1 (en) 2017-06-13 2017-06-13 Method and system for selecting main device in network link

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/088017 WO2018227365A1 (en) 2017-06-13 2017-06-13 Method and system for selecting main device in network link

Publications (1)

Publication Number Publication Date
WO2018227365A1 true WO2018227365A1 (en) 2018-12-20

Family

ID=64659405

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/088017 WO2018227365A1 (en) 2017-06-13 2017-06-13 Method and system for selecting main device in network link

Country Status (1)

Country Link
WO (1) WO2018227365A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080137528A1 (en) * 2006-12-06 2008-06-12 Cisco Technology, Inc. Voting to establish a new network master device after a network failover
CN101572626A (en) * 2009-06-01 2009-11-04 杭州华三通信技术有限公司 Collocation method and member device of stack logic interface
CN101621466A (en) * 2009-08-13 2010-01-06 中兴通讯股份有限公司 Method for establishing topological structure by switching device, switching device and stack system
CN105530179A (en) * 2014-09-29 2016-04-27 杭州华三通信技术有限公司 Data message processing method and network equipment
CN106331098A (en) * 2016-08-23 2017-01-11 东方网力科技股份有限公司 Server cluster system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080137528A1 (en) * 2006-12-06 2008-06-12 Cisco Technology, Inc. Voting to establish a new network master device after a network failover
CN101572626A (en) * 2009-06-01 2009-11-04 杭州华三通信技术有限公司 Collocation method and member device of stack logic interface
CN101621466A (en) * 2009-08-13 2010-01-06 中兴通讯股份有限公司 Method for establishing topological structure by switching device, switching device and stack system
CN105530179A (en) * 2014-09-29 2016-04-27 杭州华三通信技术有限公司 Data message processing method and network equipment
CN106331098A (en) * 2016-08-23 2017-01-11 东方网力科技股份有限公司 Server cluster system

Similar Documents

Publication Publication Date Title
WO2018218805A1 (en) Terminal ringing prompt method and system
WO2018209644A1 (en) Data encryption method and system for smart household
WO2018223550A1 (en) Terminal alarm clock setting method and system
WO2018218807A1 (en) Information reading method and system of wechat
WO2018218808A1 (en) Short message information reading method and system
WO2018227365A1 (en) Method and system for selecting main device in network link
WO2018223552A1 (en) Terminal app rapid exiting method and system
WO2018227332A1 (en) Positioning-based terminal quick payment method and system
WO2018227364A1 (en) Method and system for establishing terminal multicast group
WO2018227370A1 (en) Method and system for selecting terminal network connection
WO2018027576A1 (en) Method and system for collecting operating time in statistics in internet of things
WO2018223344A1 (en) Method and system for location sharing when visiting relatives
WO2018227333A1 (en) Positioning-based terminal app recommendation method and system
WO2018205273A1 (en) Smart terminal power management method and system
WO2018209511A1 (en) Method and system for updating app in terminal
WO2018209643A1 (en) Electric appliance control method and system for smart household
WO2018227335A1 (en) Team communication method and system for use when playing crossfire
WO2018214057A1 (en) Calculation method and system for packet loss in network link
WO2018214021A1 (en) Method and system for sharing cross-platform destination
WO2018214055A1 (en) Method and system for implementing positioning in flight mode
WO2018209510A1 (en) Method and system for intelligently improving electric quantity of terminal
WO2018209585A1 (en) Method and system for using positioning in historical walking path
WO2018205272A1 (en) Terminal fingerprint identification application method and system
WO2018223282A1 (en) Method and system for terminal incoming call processing during driving
WO2018227379A1 (en) Method and system for applying terminal positioning to service registration

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17913883

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17913883

Country of ref document: EP

Kind code of ref document: A1