WO2020056558A1 - 一种蓝牙集群在线升级方法及装置 - Google Patents

一种蓝牙集群在线升级方法及装置 Download PDF

Info

Publication number
WO2020056558A1
WO2020056558A1 PCT/CN2018/106045 CN2018106045W WO2020056558A1 WO 2020056558 A1 WO2020056558 A1 WO 2020056558A1 CN 2018106045 W CN2018106045 W CN 2018106045W WO 2020056558 A1 WO2020056558 A1 WO 2020056558A1
Authority
WO
WIPO (PCT)
Prior art keywords
bluetooth
upgrade
upgraded
cluster
devices
Prior art date
Application number
PCT/CN2018/106045
Other languages
English (en)
French (fr)
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 CN201880001873.0A priority Critical patent/CN109417691B/zh
Priority to PCT/CN2018/106045 priority patent/WO2020056558A1/zh
Priority to EP18917576.3A priority patent/EP3651485B1/en
Priority to US16/680,379 priority patent/US11321070B2/en
Publication of WO2020056558A1 publication Critical patent/WO2020056558A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/70Services for machine-to-machine communication [M2M] or machine type communication [MTC]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • H04L45/04Interdomain routing, e.g. hierarchical routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/50Service provisioning or reconfiguring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/02Communication route or path selection, e.g. power-based or shortest path routing
    • H04W40/04Communication route or path selection, e.g. power-based or shortest path routing based on wireless node resources
    • H04W40/08Communication route or path selection, e.g. power-based or shortest path routing based on wireless node resources based on transmission power
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/24Connectivity information management, e.g. connectivity discovery or connectivity update
    • H04W40/248Connectivity information update
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/24Connectivity information management, e.g. connectivity discovery or connectivity update
    • H04W40/32Connectivity information management, e.g. connectivity discovery or connectivity update for defining a routing cluster membership
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 
    • H04L67/1051Group master selection mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
    • H04W4/08User group management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks
    • H04W84/20Master-slave selection or change arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W88/00Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
    • H04W88/02Terminal devices
    • H04W88/04Terminal devices adapted for relaying to or from another terminal or user
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • the present application relates to the field of Internet of Things, and in particular, to a method and a device for online upgrading of a Bluetooth cluster.
  • multiple Bluetooth devices can form a Bluetooth cluster to make up for the shortcoming of Bluetooth connection coverage.
  • the one-to-one upgrade method between Bluetooth can no longer meet the needs of smart buildings, smart homes and other application scenarios.
  • multiple Bluetooth devices can be upgraded online at the same time.
  • one-to-one upgrade technology is more common, but the upgrade efficiency is low.
  • each Bluetooth device needs to obtain upgrade data from the upgrade device.
  • the embodiments of the present application provide a method and a device for online upgrade of the Bluetooth cluster.
  • a first aspect of the embodiments of the present application provides a method for online upgrade of a Bluetooth cluster, including: an upgrade device selects a central node in the Bluetooth cluster to establish a Bluetooth connection with the central node; the upgrade device selects an upgrade path, and passes the center according to the upgrade path.
  • the node sends the upgrade data to the device to be upgraded, so that the device to be upgraded obtains the update data to implement the upgrade, and the device to be upgraded is a part or all of the Bluetooth devices in the Bluetooth cluster.
  • the method further includes: establishing an connection between the upgrading device and a Bluetooth device that has broadcast enabled in the Bluetooth cluster; the upgrading device passes The Bluetooth device connected to it sends an instruction to open the broadcast to the Bluetooth device in the Bluetooth cluster that does not turn on the broadcast; the upgrade device updates the scan to the Bluetooth device.
  • a method for the upgrading device to select a central node in the Bluetooth cluster includes: according to a strong received power of the Bluetooth device scanned by the upgrading device. Weak, the upgrade device selects one or more Bluetooth devices with the strongest receiving power as the central node of the Bluetooth cluster; or according to the number of Bluetooth devices connected to the next level of the Bluetooth device scanned by the upgrade device, the upgrade device selects the next level connected One or more Bluetooth devices with the largest number of Bluetooth devices serve as the central node of the Bluetooth cluster.
  • the method further includes: the upgrade device sends a device information request instruction to the Bluetooth through the central node. All Bluetooth devices in the cluster; the upgrade device receives device information of all Bluetooth devices sent by the central node; the upgrade device determines the device to be upgraded.
  • the method for selecting the upgrade path by the upgrade device includes: the upgrade device queries the central node to the outer layer to determine for the device to be upgraded Pre-order Bluetooth device; the upgrade device generates an upgrade path according to the device to be upgraded and its corresponding pre-order Bluetooth device.
  • the upgrading device queries the central node to the outer layer to determine the pre-order Bluetooth device for the device to be upgraded, including: The connection cost of the node to the device to be upgraded. Select one or more devices to be upgraded with the lowest connection cost as the first device from the devices to be upgraded, and record the corresponding central node as the pre-order Bluetooth device with the connection cost to be upgraded.
  • the device to be upgraded other than the first device is the second device; according to the connection cost of the central node or the first device to the second device, one or more devices to be upgraded with the least connection cost are selected from the second device to join the first device. And record the corresponding first device as the pre-order Bluetooth device with the least connection cost to be upgraded; repeat the previous step until all pre-order Bluetooth devices are determined for all the devices to be upgraded.
  • the method further includes: the upgrade device sets the upgrade path to the upgrade data; or the upgrade device upgrades The path is sent to the device to be upgraded through the central node.
  • a second aspect of the embodiments of the present application provides a method for online upgrade of a Bluetooth cluster, which includes: a Bluetooth device receives upgrade data and an upgrade path, and the upgrade path includes a device to be upgraded determined by the upgrade device and a corresponding pre-order Bluetooth device.
  • Information, the device to be upgraded is part or all of the Bluetooth devices in the Bluetooth cluster; the Bluetooth device sends the upgrade data and the upgrade path to the next-level device to be upgraded in the upgrade path; the Bluetooth device receives the next-level Bluetooth device in the upgrade path
  • the upgrade result information is sent, and the upgrade result information is sent to a pre-order Bluetooth device or an upgrade device of the Bluetooth device.
  • the method before the Bluetooth device receives the upgrade data and the upgrade path, the method further includes: receiving, by the Bluetooth device, device information sent by a higher-level Bluetooth device or an upgrade device connected to the Bluetooth device. Request instructions and send device information request instructions to the next-level Bluetooth device connected to it; the Bluetooth device receives the device information sent by the next-level Bluetooth device connected to it, and sends the device information and the device information of the Bluetooth device itself to the upgrade Device or the parent Bluetooth device connected to it.
  • the method further includes: a Bluetooth device Use the upgrade data to perform the upgrade; the Bluetooth device sends its upgrade result information to the pre-order Bluetooth device or the upgrade device corresponding to the Bluetooth device according to the upgrade path.
  • a third aspect of the embodiments of the present application provides an upgrade device for online upgrade of a Bluetooth cluster.
  • the upgrade device includes a first connection module for selecting a central node in the Bluetooth cluster and establishing a Bluetooth connection with the central node. Connection; and an upgrade module, which is used to select an upgrade path and send the upgrade data to the device to be upgraded through the central node according to the upgrade path, so that the device to be upgraded obtains the update data to implement the upgrade, and the device to be upgraded is a part or all of the Bluetooth devices in the Bluetooth cluster .
  • the upgrading device further includes: a second connection module, which is opened with the Bluetooth cluster before the first connection module selects a central node in the Bluetooth cluster.
  • a broadcast Bluetooth device establishes a connection; a first sending module is configured to send an instruction to open a broadcast to a Bluetooth device in a Bluetooth cluster where the broadcast is not turned on through the Bluetooth device connected to the second connection module; a scanning module is used to update the scanned Bluetooth device.
  • the first connection module further includes: a first selection sub-module for receiving the received power of the Bluetooth device scanned by the scanning module. Strength, select one or more Bluetooth devices with the strongest receiving power as the central node of the Bluetooth cluster; or select the next-level Bluetooth device connected according to the number of Bluetooth devices connected to the Bluetooth device scanned by the scanning module One or more Bluetooth devices with the largest number of devices serve as the central node of the Bluetooth cluster.
  • the upgrading device further includes: a second sending module, configured to establish a Bluetooth connection with the central node after the first connection module, The device information request instruction is sent to all Bluetooth devices in the Bluetooth cluster through the central node; the first receiving module is used to receive the device information of all Bluetooth devices sent by the central node; and the second selection module is used to determine the device to be upgraded.
  • the upgrade module includes: a query submodule, which is used to query the central node to the outer layer to determine for all the devices to be upgraded. Pre-order Bluetooth device; and a path generation sub-module for generating an upgrade path according to the device to be upgraded and its corresponding pre-order Bluetooth device.
  • the query sub-module includes: a pre-order Bluetooth device determining unit, configured to: from the central node to the device to be upgraded, from Among the devices to be upgraded, one or more devices to be upgraded with the lowest connection cost are selected as the first device, and the devices to be upgraded other than the first device are the second devices; the corresponding central node is the previous Sequence Bluetooth device; based on the connection cost between the central node and the first device to the second device, select one or more devices to be upgraded with the least connection cost from the second device to join the first device, and record the corresponding first device as the connection Pre-order Bluetooth devices with the least cost to be upgraded; repeat the previous step until pre-order Bluetooth devices are determined for all the devices to be upgraded.
  • a pre-order Bluetooth device determining unit configured to: from the central node to the device to be upgraded, from Among the devices to be upgraded, one or more devices to be upgraded with the lowest connection cost are selected as the first device, and the devices to be upgraded other than the first device are the second devices; the corresponding central no
  • the upgrade module further includes: a setting submodule for setting an upgrade path to the upgrade data; or the upgrade module is further used for , And send the upgrade path to the device to be upgraded through the central node.
  • a fourth aspect of the embodiments of the present application provides a Bluetooth device for online upgrade of a Bluetooth cluster.
  • the Bluetooth device includes: a second receiving module for receiving upgrade data and an upgrade path, and the upgrade path includes a parameter determined by the upgrade device.
  • the device to be upgraded and its corresponding pre-order Bluetooth device, the device to be upgraded is a part or all of the Bluetooth devices in the Bluetooth cluster;
  • the third sending module is used to send the upgrade data and the upgrade path to the next level to be upgraded in the upgrade path Device;
  • a third receiving module configured to receive the upgrade result information sent by the next-level Bluetooth device in the upgrade path; and a fourth sending module, configured to send the upgrade result information to the pre-order Bluetooth device or the upgrade device of the Bluetooth device.
  • the Bluetooth device further includes: a fourth receiving module, configured to receive the connection to the Bluetooth device before the first receiving module receives the upgrade data and the upgrade path.
  • a device information request instruction sent by a first-level Bluetooth device or an upgrade device a fifth sending module for sending a device information request instruction to a next-level Bluetooth device connected to the Bluetooth device; a fifth receiving module for receiving a Bluetooth device Device information sent by the connected lower-level Bluetooth device; and a sixth sending module for sending the device information to the upgraded device, or the device information and the device information of the Bluetooth device itself to the upper-level Bluetooth connected to the Bluetooth device device.
  • the Bluetooth device further includes: an upgrade execution module, configured to send the upgrade result information to the pre-order Bluetooth device of the Bluetooth device in the second sending module. Or after the device is upgraded, the Bluetooth device is upgraded according to the upgrade data; and a seventh sending module is configured to send the upgrade result information of the Bluetooth device to the pre-order Bluetooth device or the upgrade device corresponding to the Bluetooth device according to the upgrade path.
  • a fifth aspect of the embodiments of the present application provides an upgrade device for online upgrade of a Bluetooth cluster, including: a memory and a processor; the memory is coupled to the processor; the memory is used to store program instructions; the processor is used to The program instructions stored in the memory are called, so that the upgrade device executes the Bluetooth cluster online upgrade method described in the first aspect.
  • a sixth aspect of the embodiments of the present application provides a Bluetooth device for online upgrade of a Bluetooth cluster, including: a memory and a processor; the memory is coupled to the processor; the memory is used to store program instructions; the processor is used to The program instructions stored in the memory are called, so that the Bluetooth device executes the Bluetooth cluster online upgrading method described in the second aspect.
  • a seventh aspect of the embodiments of the present application provides a computer-readable storage medium including: a computer program stored thereon, and the computer program, when executed by a processor, implements the Bluetooth cluster online upgrade method described in the first aspect above.
  • An eighth aspect of the embodiments of the present application provides a computer-readable storage medium including: a computer program stored thereon, and the computer program, when executed by a processor, implements the Bluetooth cluster online upgrade method described in the second aspect above.
  • the embodiment of the present application has the beneficial effect that the embodiment of the present application provides a method and an apparatus for online upgrade of a Bluetooth cluster, and selects a central node and an upgrade device according to the connection relationship between the Bluetooth devices in the Bluetooth cluster. Establish a Bluetooth connection to transmit the upgrade data, select the upgrade path and upgrade the devices to be upgraded in the Bluetooth cluster according to the upgrade path. This improves the upgrade success rate of the Bluetooth cluster and shortens the upgrade time-consuming.
  • the Bluetooth cluster online upgrade method used in this application further expands the Bluetooth communication range, eliminating the need for one-to-one operation by the user, saving operation time, and using the connection between Bluetooth devices in the existing Bluetooth cluster to send upgrade data.
  • the upgrade device does not need to send upgrade data multiple times, which solves the problem of data congestion caused by multiple Bluetooth devices accessing the upgrade device at the same time.
  • the upgrade data since most Bluetooth devices do not need to directly obtain the upgrade data from the upgrade device, the upgrade data The number of Bluetooth devices passing through has become significantly smaller, which makes it significantly less time-consuming to upgrade when the Bluetooth cluster is large and the number of layers is large.
  • the upgrade of multiple Bluetooth devices in the Bluetooth cluster can be completed by only operating on the device side, providing users with simpler and more efficient services.
  • FIG. 1 is a system block diagram of a Bluetooth cluster online upgrade method according to an embodiment of the present application
  • FIG. 2 is a flowchart of an online upgrade method for a Bluetooth cluster on an upgrade device side according to an embodiment of the present application
  • FIG. 3 is a flowchart of steps before an upgrade device selects a central node in a Bluetooth cluster in an embodiment of the present application
  • FIG. 4 is a flowchart of steps after the upgrade device establishes a Bluetooth connection with a central node according to an embodiment of the present application
  • FIG. 5 is a flowchart of steps in which the upgrading device in the embodiment of the present application queries the central node as a center to determine the pre-order Bluetooth device for the device to be upgraded;
  • FIG. 6 is a network topology diagram of a Bluetooth device according to an embodiment of the present application.
  • FIG. 7 is a schematic diagram of an upgrade path obtained according to the network topology diagram of FIG. 6 according to an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a transfer path of upgrade data and upgrade result information obtained according to the network topology diagram of FIG. 6 according to an embodiment of the present application;
  • FIG. 9 is a flowchart of a Bluetooth cluster online upgrade method at a Bluetooth device end according to an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of an upgrade device according to an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of a Bluetooth device according to an embodiment of the present application.
  • FIG. 12 is a schematic structural diagram of another upgrade device according to an embodiment of the present application.
  • FIG. 13 is a schematic structural diagram of another Bluetooth device according to an embodiment of the present application.
  • FIG. 1 is a system block diagram of a Bluetooth cluster online upgrade method according to an embodiment of the present application.
  • This embodiment describes a Bluetooth cluster online upgrade method provided by an embodiment of the present application from the perspective of an upgrade device.
  • a Bluetooth cluster is a group of independent, wirelessly connected devices.
  • a Bluetooth cluster group represents multiple independent Bluetooth clusters, and there is no direct connection between the Bluetooth clusters.
  • the Bluetooth cluster online upgrade method is used to perform online upgrade of a Bluetooth cluster or a part or all of the Bluetooth devices in the Bluetooth cluster group at the same time.
  • This embodiment is described by taking an example of upgrading some or all Bluetooth devices in a Bluetooth cluster, but those skilled in the art should understand that selecting a Bluetooth cluster for upgrading is only an exemplary description.
  • a Bluetooth device is selected as a central node for description, but Those skilled in the art should understand that the selection of a Bluetooth device as the central node is only an exemplary description. In actual use, those skilled in the art may refer to the solution in the embodiment of this application to select multiple devices in a Bluetooth cluster.
  • a Bluetooth device serves as a central node to implement an online upgrade of a Bluetooth cluster.
  • Those skilled in the art may also refer to the solution in the embodiment of the present application to upgrade each Bluetooth cluster in a Bluetooth cluster group for each Bluetooth cluster. You can select one or more Bluetooth devices from this Bluetooth cluster As the central node for online upgrade for Bluetooth cluster group.
  • the Bluetooth device in this embodiment supports a multi-connection low-power Bluetooth protocol or a classic Bluetooth protocol, which is not limited in this embodiment.
  • FIG. 2 is a flowchart of a Bluetooth cluster online upgrade method according to an embodiment of the present application. The method includes:
  • Step 100 the upgrade device selects a central node in the Bluetooth cluster, and establishes a Bluetooth connection with the central node;
  • the upgrade device may be a terminal device with storage computing capabilities and a Bluetooth connection function, including but not limited to a mobile phone or a computer.
  • the upgrade device also includes upgrade management software and a user interface running on the upgrade device for user operation.
  • the upgrade device Before the upgrade device selects the central node, there needs to be a Bluetooth device in the Bluetooth cluster that is broadcast and can be scanned by the upgrade device.
  • the purpose is to enable the upgrade device to select different central nodes according to different usage scenarios to meet different user needs.
  • the operation before the upgrade device selects the central node in the Bluetooth cluster includes the following three steps:
  • Step 101 The upgrade device establishes a connection with a Bluetooth device whose broadcast has been turned on in the Bluetooth cluster;
  • the upgrade device scans a Bluetooth device that has opened the broadcast in the Bluetooth cluster to establish a connection with the Bluetooth device that has opened the broadcast.
  • the broadcast device that is scanned by the upgrade device and opens the broadcast can be one or more Bluetooth devices.
  • the upgrade device does not scan the Bluetooth device with the broadcast turned on, that is, all Bluetooth devices have not turned on the broadcast or the Bluetooth device with the broadcast turned on is not within the scanning range of the upgrade device, you need to set the turn on broadcast for one or more Bluetooth devices near the upgrade device. So that the upgraded device can be scanned.
  • Step 102 The upgrade device sends an instruction to open the broadcast to the Bluetooth device in the Bluetooth cluster that does not turn on the broadcast through the Bluetooth device connected to the upgrade device;
  • step 102 after the upgrade device is connected to the Bluetooth device with the broadcast enabled via Bluetooth, the upgrade device sends an instruction to open the broadcast to the Bluetooth device that has not turned on the broadcast in the Bluetooth cluster through the connected Bluetooth device, and the Bluetooth device receives the turn on After broadcasting the instructions, turn on your own broadcast so that the upgrade device can scan.
  • one or more Bluetooth devices in the Bluetooth cluster can be connected to the upgrade device, and the upgrade device can open the broadcast of all Bluetooth devices in the Bluetooth cluster through the Bluetooth device connected to it; for the Bluetooth cluster group, the upgrade device It can be connected with one or more Bluetooth devices in each Bluetooth cluster, and the upgrade device can open the broadcast of all Bluetooth devices in the corresponding Bluetooth cluster through the Bluetooth device connected to it, so that the upgrade device scans to the Bluetooth device and scans to Select the central node for the Bluetooth cluster that needs to be upgraded among the Bluetooth devices.
  • Step 103 Update the device to scan to the Bluetooth device.
  • the upgraded device can scan the most Bluetooth devices. It should be noted here that although all Bluetooth devices have broadcast turned on, the upgrade device may only scan some Bluetooth devices with broadcast turned on. The reason may be that the upgrade device is too far away from some Bluetooth devices.
  • the upgrade device scans the Bluetooth devices in the Bluetooth cluster, select one or more Bluetooth devices as the central node among the scanned Bluetooth devices. For a Bluetooth cluster group, the upgrade device scans to multiple Bluetooth devices in multiple Bluetooth clusters. Then, among the scanned Bluetooth devices, one or more Bluetooth devices can be selected as the central node of the Bluetooth cluster in which they are located.
  • the upgrade device selects the central node in the Bluetooth cluster in the following two ways:
  • the upgrading device selects one or more Bluetooth devices with the strongest receiving power as the central node of the Bluetooth cluster.
  • the central node plays a communication bridging function between the upgrade device and each Bluetooth device in the Bluetooth cluster. This method of selecting the central node can ensure the stability of the connection between the upgrade device and the central node, that is, the upgrade device and the Bluetooth cluster are guaranteed.
  • the stability of communication between various Bluetooth devices can ensure the success rate of data transmission and greatly reduce the probability of requesting retransmission due to data transmission failure.
  • This data includes but is not limited to device information request instructions, upgrade data, upgrade paths, and Upgrade result information.
  • the upgrade device selects one or more Bluetooth devices with the highest number of connected Bluetooth devices as the central node of the Bluetooth cluster.
  • connection information may be added to a broadcast packet of a Bluetooth device.
  • the upgrade device scans the Bluetooth device, the number of Bluetooth devices connected to the Bluetooth device can be obtained.
  • the number of Bluetooth devices connected to the central node is the largest, so there may be more parallel paths for data transmission, which can quickly transfer data from the upgraded device to all the devices to be upgraded.
  • This data includes but is not limited to Device information request instruction, upgrade data, upgrade path and upgrade result information.
  • the central node may be any one or more Bluetooth devices in a Bluetooth cluster, and it is not required that it has a connection capability other than Bluetooth.
  • the upgrade device After the upgrade device selects one or more central nodes, the upgrade device establishes a connection with the selected central node through Bluetooth.
  • the upgrade device can turn off the broadcast of all Bluetooth devices in the Bluetooth cluster, disconnect the upgrade device from other Bluetooth devices, and stop the scan mode to ensure lower power consumption.
  • the upgrade device can encrypt the connection to ensure the security of the transmitted data.
  • the device to be upgraded in the Bluetooth cluster needs to be determined.
  • the device to be upgraded is a Bluetooth device selected by the user to be upgraded.
  • the central node can also be selected as the device to be upgraded.
  • the center is specifically Nodes are defined separately. Therefore, in this embodiment, the device to be upgraded is described as other Bluetooth devices that need to be upgraded in addition to the central node.
  • the steps after the upgrade device establishes a Bluetooth connection with the central node include:
  • the upgrading device sends a device information request instruction to all Bluetooth devices in the Bluetooth cluster through the central node;
  • the upgrading device sends a device information request instruction to the central node that has established a connection with the central node.
  • the central node After receiving the device information request instruction sent by the upgrading device, the central node sends the device information request instruction to the connected Bluetooth device.
  • the Bluetooth device receiving the device information request instruction sends the device information request instruction to other Bluetooth devices until all the Bluetooth devices in the Bluetooth cluster receive the device information request instruction.
  • the device information request instruction is used to enable a Bluetooth device that receives the device information request instruction to send its own device information to a higher-level Bluetooth device.
  • the upper-level Bluetooth device generally refers to the device information request instruction connected to the device. Bluetooth device; after the center node receives the device information request instruction sent by the upgrading device, in addition to sending the device information request instruction to the connected Bluetooth device, it also needs to send its own device information to the upgrading device.
  • the upgrading device receives device information of all Bluetooth devices sent by the central node;
  • step 106 after receiving the device information request instruction, the central node sends its own device information to the upgrade device. Since the upgrade device is only connected to the central node, the device information of other Bluetooth devices other than the central node is first transmitted. To the central node, and then sent by the central node to the upgrade device.
  • Device information includes, but is not limited to, device number, device address, device name, connection information, current software version, and received signal strength (Received Signal Strength Indication, RSSI).
  • the upgraded device determines the device to be upgraded.
  • step 107 after the upgrade device receives all the device information in the Bluetooth cluster, the upgrade device can generate a network topology map based on the connection relationship between the Bluetooth devices and the received signal strength. According to the device number, device address, device name, Connection information and current software version, users can choose the device to be upgraded according to their needs.
  • Step 110 The upgrade device selects an upgrade path, and sends the upgrade data to the device to be upgraded through the central node according to the upgrade path, so that the device to be upgraded obtains the update data to implement the upgrade, and the device to be upgraded is part or all of the Bluetooth devices in the Bluetooth cluster.
  • step 110 there are generally several data transmission paths from the upgraded device to a certain device to be upgraded, and an upgrade path needs to be selected for the device to be upgraded.
  • the upgrade data includes all relevant information for performing a Bluetooth device upgrade, including but not limited to upgrade mode information and upgrade version data packets.
  • the steps for selecting the upgrade path by the upgrade device include:
  • the upgrading device queries the central node to the outer layer to determine the pre-order Bluetooth device for the device to be upgraded;
  • the upgrade device generates an upgrade path according to the device to be upgraded and its corresponding pre-order Bluetooth device.
  • the pre-order Bluetooth device of the device to be upgraded may be determined according to different standards.
  • the central node may be the pre-order Bluetooth device of all the devices M to be upgraded connected to it, and M may be used as all the devices N to be upgraded connected to M.
  • Pre-order Bluetooth device The connection here refers to the connection that does not cross other devices to be upgraded.
  • the pre-order Bluetooth device is determined only by connecting this condition. When a device to be upgraded receives the upgrade data, it will no longer receive other devices. Pre-upgrade data for Bluetooth devices.
  • D (x, y) -RSSI (x, y).
  • the upgrading device queries the central node to the outer layer, and the steps of determining the pre-order Bluetooth device for the device to be upgraded include:
  • Step 501 According to the connection cost of the central node to the device to be upgraded, select one or more devices to be upgraded with the lowest connection cost as the first device from the devices to be upgraded, and record the corresponding central node as the device to be upgraded with the least connection cost.
  • Pre-order Bluetooth device the device to be upgraded other than the first device is the second device;
  • Step 502 According to the connection cost of the central node or the first device to the second device, select one or more devices to be upgraded with the smallest connection cost from the second device to join the first device, and record the corresponding first device as the connection cost.
  • Step 503 Repeat step 502 until a pre-order Bluetooth device is determined for all the devices to be upgraded.
  • the connection cost of the central node or the first device to the second device includes at least two calculation methods for the connection cost.
  • the first method is: using the central node as the starting point, calculate any Bluetooth from the central node to the second device.
  • Method two Take the center node and any Bluetooth device in the first device as the starting point, calculate the connection cost to any Bluetooth device in the second device, and select one or more connections from the second device.
  • the device to be upgraded with the least cost is added to the first device, and the corresponding first device is recorded as a pre-order Bluetooth device that is connected to the device with the least cost.
  • the pre-order Bluetooth device in the second device may have one or Multiple
  • the devices to be upgraded in the second device may have the same pre-order Bluetooth device
  • the devices to be upgraded having the same pre-order Bluetooth device are the devices to be upgraded at the same level.
  • the upgrading device queries the central node as the center, if there is a relay node C that does not need to be upgraded between the two devices A and B to be upgraded, that is, C is a Bluetooth device that only needs to transmit data but does not need to be upgraded, Then the connection cost between the two devices to be upgraded A and B is the maximum value of the connection cost between A and C and the connection cost between C and B; if there is a device C to be upgraded between A and B, A is the first device, and Both C and B belong to the second device, then the connection cost between A and B is defined as infinite. This definition is to calculate the connection cost without cross-level. The cross-level here is for the second device.
  • connection cost of A through C to B must be greater than or equal to the connection cost of A to C, so in order to find the next level of the device to be upgraded Minimum connection cost, there is no need to cross-level, only the next level of the device to be upgraded is calculated; if there is a device C to be upgraded between A and B, A and C are the first device, and B is the second device, then define A The connection cost to B is the connection cost of A to C and C to B The maximum value of the connection cost, because the cross-level calculation is not for the second device, and here from A to B, there is no other second device, but only the first device C.
  • a and B The case where C exists between them is only an exemplary description. In actual use, there may be multiple points between A and B. Those skilled in the art may refer to the solutions in the embodiments of the present application to obtain two Bluetooths in other connection situations. The cost of the connection between the devices.
  • the network topology diagram of the Bluetooth device shown in Figure 6 Please refer to the network topology diagram of the Bluetooth device shown in Figure 6.
  • the numbers marked in Figure 6 represent the connection costs between Bluetooth devices, A represents the central node selected by the upgrade device, and points other than A represent the devices to be upgraded. .
  • the upgrade path of the network topology diagram of FIG. 6 is taken as an example.
  • the network topology diagram of FIG. 6 can also be understood as the network topology diagram of the device to be upgraded in the Bluetooth cluster. It should be noted that according to the existing technology, the field A technician can obtain the network topology diagram of the device to be upgraded from the device information of all Bluetooth devices in the Bluetooth cluster.
  • solving the upgrade path of the network topology diagram of FIG. 6 is only an exemplary description.
  • the upgrade path of the topology map further upgrades the Bluetooth cluster.
  • Other network topology diagrams include but are not limited to all or part of the Bluetooth devices in the Bluetooth cluster.
  • Other network topology diagrams can also include Bluetooth devices that do not require upgrading.
  • the obtained upgrade path may include a device to be upgraded or a Bluetooth device that does not need to be upgraded. Taking the method of calculating the connection cost as an example, the upgrade path in the network topology of FIG. 6 is solved.
  • the Bluetooth device with the lowest connection cost to the central node is selected from the devices to be upgraded.
  • the first-level device to be upgraded is set to the first device.
  • connection cost of A to E or F Since E or F is not directly connected to A, the connection cost of A to E or F must be greater than The connection cost of A to B, C, or D is large, so only the connection cost of A to B, C, and D need to be analyzed. And because the connection cost of A to C is 45, which is less than the connection cost of A to B and A to D, C is set as the first-level device to be upgraded to the first device, and the pre-order Bluetooth device of C is recorded For A;
  • the first device is A and C, analyze the second device B, D, E, and F. Since F is not connected to the first device, the connection cost of the first device to F must be higher than that of the first device to B, D, or E The connection cost is high, so you only need to analyze the connection cost of the first device to B, D, and E.
  • connection cost from A to C in the upgrade path is smaller, which is 45.
  • analyze the connection cost of the first device to D If directly from the central node A to D, the connection cost is 70; if from the central node to C through D in the upgrade path, the maximum connection cost is 45 and 60, which is 60 ; Therefore, the connection cost from A to C in the upgrade path is even smaller, which is 60. Finally, analyze the connection cost of the first device to E.
  • connection cost is infinite because it needs to pass through other second devices; if it is from the central node to C to E in the first device, the connection The cost is the maximum value of 45 and 55, which is 55; therefore, the connection cost from A to C through E in the first device is smaller, which is 55.
  • the minimum connection costs from A to B, D, and E are It is 45, 60, and 55, so select B to join the first device, and record the pre-order Bluetooth device where C is B. Refer to Figure 7 for the upgrade path.
  • connection cost is the first method.
  • N indicates the set of devices to be upgraded in the first device
  • w indicates the device to be added to N
  • n any one of the devices to be upgraded next to w that is not in N;
  • D (n) min (D '(n), max (D (w), D (w, n))) is explained as follows: if n and the central node can pass without other The device to be upgraded is directly connected, then D '(n) is not infinite. Compare it with max (D (w), D (w, n)). Note that w can be one or more devices to be upgraded. If D '(n) is small, it proves that the connection cost from the central node directly to n is smaller. If max (D (w), D (w, n)) is small, it proves that the connection cost from the central node to w through n is more small.
  • the execution steps of the algorithm are as follows:
  • S5 Repeat steps S3 and S4 until all the devices to be upgraded are added to the set N.
  • FIG. 7 for the upgrade path obtained according to the algorithm
  • FIG. 8 for the transmission path of the upgrade data and upgrade result information.
  • the solid line indicates the sending direction of the upgrade data
  • the dashed line indicates the sending direction of the upgrade result information.
  • the transfer path is the same as the upgrade data transfer path, but in the opposite direction.
  • the Bluetooth device needs to be restarted. In order to send the upgrade result information, the Bluetooth device needs to re-establish a connection with the pre-order Bluetooth device.
  • the Bluetooth device fails to re-establish a connection, the Bluetooth device will establish a connection with another Bluetooth device in the sequence according to the upgrade path.
  • the calculation algorithm of the upgrade path provided in this embodiment is only an exemplary description. In actual use, those skilled in the art may refer to the solution of the embodiment of the application and select other calculations. Algorithm of the upgrade path.
  • the upgrade device sets the upgrade path into the upgrade data, or the upgrade device sends the upgrade path to the device to be upgraded through the central node.
  • the upgrade path here contains all the information of the upgrade path, including the device to be upgraded and its pre-order Bluetooth device, and also the data transfer relationship between the devices to be upgraded, so that the Bluetooth device can send the upgrade data according to the upgrade path, and the Bluetooth device is sending the upgrade Before the data, you can determine whether to send the upgrade data and the object of the upgrade data according to the upgrade path information. Therefore, the upgrade device will send the upgrade path to the device to be upgraded before sending the upgrade data.
  • the upgrade path information can also use the upgrade path to transfer.
  • the embodiment of the present application provides a method for online upgrade of a Bluetooth cluster.
  • a central node is selected to establish a Bluetooth connection with the upgrade device to transmit upgrade data.
  • an upgrade path is selected and the Bluetooth cluster is selected according to the upgrade path.
  • the device to be upgraded is upgraded. This improves the upgrade success rate of the Bluetooth cluster and shortens the upgrade time-consuming.
  • the Bluetooth cluster online upgrade method used in this application further expands the Bluetooth communication range, eliminating the need for one-to-one operation by the user, saving operation time, and using the connection between Bluetooth devices in the existing Bluetooth cluster to send upgrade data.
  • the upgrade device does not need to send upgrade data multiple times, which solves the problem of data congestion caused by multiple Bluetooth devices accessing the upgrade device at the same time.
  • the upgrade data since most Bluetooth devices do not need to directly obtain the upgrade data from the upgrade device, the upgrade data The number of Bluetooth devices passing through has become significantly smaller, which makes it significantly less time-consuming to upgrade when the Bluetooth cluster is large and the number of layers is large.
  • the upgrade of multiple Bluetooth devices in the Bluetooth cluster can be completed by only operating on the device side, providing users with simpler and more efficient services.
  • the embodiment of the present application describes a method for online upgrading of a Bluetooth cluster provided by the embodiment of the present application from the perspective of a Bluetooth device.
  • FIG. 9 is a flowchart of a method for online upgrade of a Bluetooth cluster according to an embodiment of the present application.
  • the method includes:
  • Step 200 The Bluetooth device receives the upgrade data and the upgrade path, and the upgrade path includes information of the device to be upgraded and the corresponding pre-order Bluetooth device determined by the upgrade device, and the device to be upgraded is a part or all of the Bluetooth devices in the Bluetooth cluster;
  • the Bluetooth device here may be a central node or a non-central node; the device to be upgraded may also be a Bluetooth device that does not need to be upgraded, which is not limited in the embodiment of the present application.
  • the Bluetooth device before the Bluetooth device receives the upgrade data and the upgrade path, it further includes:
  • the Bluetooth device receives a device information request instruction sent by an upper-level Bluetooth device or an upgrade device connected to the Bluetooth device, and sends the device information request instruction to a lower-level Bluetooth device connected to the device;
  • the Bluetooth device receives the device information sent by the next-level Bluetooth device connected to it, and sends the device information and the device information of the Bluetooth device itself to the upgraded device or the upper-level Bluetooth device connected to it.
  • the upper-level Bluetooth device and the lower-level Bluetooth device are only for the original connection relationship of the Bluetooth cluster where the Bluetooth device is located, that is, the connection relationship that the upgrade device can obtain according to the device information, not for the upgrade path. After receiving all the device information, the upgrade path will be selected.
  • the upgrade device can obtain the device information through the central node. After the upgrade device receives all the device information, it can generate a network topology map based on the received device information, which can be easily used. Users understand the connection relationship of Bluetooth devices in the Bluetooth cluster, which is convenient for users to select the devices to be upgraded.
  • the upgrade device needs to send a device information request instruction to all Bluetooth devices in the Bluetooth cluster.
  • the upgrade device sends the device information request instruction to the central node.
  • the central node receives the device information request instruction sent by the class device. Then, the central node sends Send its own device information to the upgrade device and send the device information request instruction to all Bluetooth devices in the Bluetooth cluster. After the central node receives the device information of other Bluetooth devices, the central node sends the device information of the other Bluetooth devices to the upgrade device.
  • the Bluetooth device After receiving the device information request instruction sent by the upper-level Bluetooth device, the Bluetooth device sends its own device information to the upper-level Bluetooth device, and sends the device information request instruction to The next-level Bluetooth device, until all Bluetooth devices receive the device information request instruction, the device information sent by the Bluetooth device will be sent to the upgrade device through the central node.
  • the Bluetooth device receives the upgrade data and the upgrade path in at least two ways.
  • the first method is that the upgrade data received by the Bluetooth device includes the upgrade path information, that is, the upgrade device sets the upgrade path to the upgrade data.
  • the second method is The Bluetooth device received the upgrade path before receiving the upgrade data.
  • the upgrade path contains all the information of the upgrade path. , Including the information of the device to be upgraded and its pre-order Bluetooth device, as well as the data transfer relationship between the devices to be upgraded, and after receiving the upgrade path, the Bluetooth device can determine whether to send the upgrade data and determine the send object, and also You can determine whether the Bluetooth device needs to be upgraded.
  • step 200 after receiving a frame of upgrade data, the Bluetooth device checks the upgrade data of the frame, saves the successfully upgraded frame of data after the verification is successful, and checks the received second frame of upgrade data. After success, save the second frame of upgrade data until the complete upgrade data is verified and saved.
  • the Bluetooth device may request to retransmit the upgrade data of the verification failure of this frame to ensure the success rate of the upgrade. Then, the Bluetooth device sends the received upgrade data to the next-level device to be upgraded according to the upgrade path;
  • Step 210 The Bluetooth device sends the upgrade data and the upgrade path to the next-level device to be upgraded in the upgrade path;
  • step 210 if the Bluetooth device is directly connected to the next-level device to be upgraded in the upgrade path, it directly sends the upgrade data and the upgrade path to the next-level device to be upgraded; the Bluetooth device goes to the next device in the upgrade path. If the device to be upgraded must pass through the Bluetooth device that does not need to be upgraded, the upgrade data and the upgrade path are sent to the next device to be upgraded through the Bluetooth device that does not need to be upgraded.
  • Step 220 The Bluetooth device receives the upgrade result information sent by the next-level Bluetooth device in the upgrade path, and sends the upgrade result information to the pre-order Bluetooth device or the upgrade device of the Bluetooth device.
  • the update result information sent by the next-level Bluetooth device in the upgrade path received by the Bluetooth device includes not only the update result information of its next-level Bluetooth device, but also other Bluetooth received by its next-level Bluetooth device. Device upgrade result information.
  • the central node For the central node, if the central node needs to be upgraded, after the central node sends the upgrade result information sent by the device to be upgraded to the upgrade device, the central node performs the upgrade. After the central node upgrade is complete, it establishes a connection with the upgrade device and sends its own upgrade result information Give upgrade equipment.
  • the device to be upgraded After the device to be upgraded sends the upgrade result information sent by the device to be upgraded to the device to be upgraded, the device to be upgraded is upgraded, and after the upgrade is completed, a connection is established with the device to be upgraded. And send its own upgrade result information to the device to be upgraded.
  • the Bluetooth device that does not need to be upgraded, it only plays the role of transmitting data and does not perform the upgrade.
  • the data here includes but is not limited to the upgrade data and upgrade result information.
  • the equipment to be upgraded is upgraded.
  • Different upgrade strategies have different beneficial effects. For example, as long as the device to be upgraded receives the upgrade data, the device to be upgraded is upgraded.
  • This method can quickly upgrade the Bluetooth cluster.
  • the Bluetooth device after the Bluetooth device sends the update result information to the Bluetooth device or the pre-order device of the Bluetooth device, the method further includes: the Bluetooth device performs the upgrade using the update data; the Bluetooth device sends the update result information to the Bluetooth device according to the upgrade path Corresponding pre-order Bluetooth device or upgrade device. After the Bluetooth device sends the update result information to the pre-order Bluetooth device of the Bluetooth device or the upgraded device, there are two cases.
  • the Bluetooth device receives its next level to be upgraded. After the device's upgrade result information, the Bluetooth device performs the upgrade. After the upgrade is complete, the Bluetooth device re-establishes a connection with its pre-order Bluetooth device. The Bluetooth device sends its own upgrade result information to the pre-order Bluetooth device according to the upgrade path. Finally, the upgrade should be performed. The result information is sent to the upgrading equipment through the central node. For the case where the central node needs to be upgraded, it has been described in the foregoing, and is not repeated here.
  • the upgrade result information can be stored and displayed for users to view the upgrade result.
  • the nodes that failed to upgrade are automatically upgraded again to ensure that all nodes complete the upgrade.
  • the embodiment of the present application provides a method for online upgrade of a Bluetooth cluster.
  • a central node is selected to establish a Bluetooth connection with the upgrade device to transmit upgrade data.
  • an upgrade path is selected and the Bluetooth cluster is selected according to the upgrade path.
  • the device to be upgraded is upgraded. This improves the upgrade success rate of the Bluetooth cluster and shortens the upgrade time-consuming.
  • the Bluetooth cluster online upgrade method used in this application further expands the Bluetooth communication range, eliminating the need for one-to-one operation by the user, saving operation time, and using the connection between Bluetooth devices in the existing Bluetooth cluster to send upgrade data.
  • the upgrade device does not need to send upgrade data multiple times, which solves the problem of data congestion caused by multiple Bluetooth devices accessing the upgrade device at the same time.
  • the upgrade data since most Bluetooth devices do not need to directly obtain the upgrade data from the upgrade device, the upgrade data The number of Bluetooth devices passing through has become significantly smaller, which makes it significantly less time-consuming to upgrade when the Bluetooth cluster is large and the number of layers is large.
  • the upgrade of multiple Bluetooth devices in the Bluetooth cluster can be completed by only operating on the device side, providing users with simpler and more efficient services.
  • FIG. 10 is a schematic structural diagram of the upgrade device provided in this embodiment, and the device may execute the above-mentioned FIG. 2
  • the method shown in FIG. 8, as shown in FIG. 10, the upgrade device 30 includes:
  • the first connection module 31 is configured to select a central node in the Bluetooth cluster and establish a Bluetooth connection with the central node;
  • Upgrade module 32 used to select an upgrade path, and send the upgrade data to the device to be upgraded through the central node according to the upgrade path, so that the device to be upgraded obtains the update data to implement the upgrade, and the device to be upgraded is part or all of the Bluetooth devices in the Bluetooth cluster.
  • the device further includes:
  • a second connection module used to establish a connection with a Bluetooth device that has broadcast enabled in the Bluetooth cluster before the first connection module selects a central node in the Bluetooth cluster;
  • a first sending module configured to send an instruction to open a broadcast to a Bluetooth device in a Bluetooth cluster that has not turned on broadcasting through a Bluetooth device connected to the second connection module;
  • Scanning module used to update the scanned Bluetooth devices.
  • the first connection module further includes:
  • the first selection sub-module used to select the one or more Bluetooth devices with the strongest received power as the central node of the Bluetooth cluster according to the received power of the Bluetooth device scanned by the scanning module; The number of Bluetooth devices connected to the next-level Bluetooth device is selected, and one or more Bluetooth devices with the largest number of connected Bluetooth devices are selected as the central node of the Bluetooth cluster.
  • the upgrade device also includes:
  • the second sending module is configured to send a device information request instruction to all Bluetooth devices in the Bluetooth cluster after the first connection module establishes a Bluetooth connection with the center node;
  • a first receiving module configured to receive device information of all Bluetooth devices sent by a central node
  • the second selection module is used to determine a device to be upgraded.
  • the upgrade module includes:
  • Query sub-module used to query the central node to the outer layer to determine the pre-order Bluetooth device for all the devices to be upgraded;
  • the path generation sub-module is configured to generate an upgrade path according to a device to be upgraded and a corresponding pre-order Bluetooth device.
  • the query submodule includes:
  • the pre-order Bluetooth device determining unit is configured to select one or more devices to be upgraded with the smallest connection cost from the devices to be upgraded as the first device, and the devices to be upgraded outside the first device according to the connection cost of the central node to the devices to be upgraded.
  • the device is the second device; the corresponding central node is the pre-order Bluetooth device with the least connection cost to be upgraded; according to the connection cost between the central node and the first device to the second device, one or more are selected from the second device
  • the device to be upgraded with the least connection cost is added to the first device, and the corresponding first device is recorded as the pre-order Bluetooth device with the least connection cost to be upgraded; the previous step is repeated until the pre-order Bluetooth device is determined for all the devices to be upgraded.
  • the upgrade module also includes:
  • Setting submodule used to set the upgrade path to the upgrade data
  • the upgrade module is further configured to send the upgrade path to the device to be upgraded through the central node.
  • An embodiment of the present application provides an upgrade device.
  • a central node is selected to establish a Bluetooth connection with the upgrade device to transmit upgrade data.
  • an upgrade path is selected and the standby status in the Bluetooth cluster is selected according to the upgrade path. Upgrade the device to upgrade. This improves the upgrade success rate of the Bluetooth cluster and shortens the upgrade time-consuming.
  • the Bluetooth cluster online upgrade method used in this application further expands the Bluetooth communication range, eliminating the need for one-to-one operation by the user, saving operation time, and using the connection between Bluetooth devices in the existing Bluetooth cluster to send upgrade data.
  • the upgrade device does not need to send upgrade data multiple times, which solves the problem of data congestion caused by multiple Bluetooth devices accessing the upgrade device at the same time.
  • An embodiment of the present application may further provide a Bluetooth device for performing an online upgrade method of a Bluetooth cluster provided in the foregoing embodiment.
  • FIG. 11 is a schematic structural diagram of a Bluetooth device provided in this embodiment, and the Bluetooth device may execute the foregoing diagram. The method shown in FIG. 9, as shown in FIG. 11, the Bluetooth device 40 includes:
  • the second receiving module 41 is configured to receive upgrade data and an upgrade path.
  • the upgrade path includes a device to be upgraded and a corresponding pre-order Bluetooth device determined by the upgrade device, and the device to be upgraded is a part or all of the Bluetooth devices in the Bluetooth cluster;
  • the third sending module 42 is configured to send the upgrade data and the upgrade path to the next-level device to be upgraded in the upgrade path;
  • the third receiving module 43 is configured to receive the upgrade result information sent by the next-level Bluetooth device in the upgrade path.
  • the fourth sending module 44 a pre-order Bluetooth device or an upgrade device for sending the upgrade result information to the Bluetooth device;
  • the Bluetooth device also includes:
  • a fourth receiving module used to receive a device information request instruction sent by a superior Bluetooth device or an upgrading device connected to the Bluetooth device before the first receiving module receives the upgrade data and the upgrade path;
  • a fifth sending module configured to send a device information request instruction to a Bluetooth device connected to a Bluetooth device;
  • a fifth receiving module configured to receive device information sent by a next-level Bluetooth device connected to the Bluetooth device.
  • the sixth sending module is configured to send the device information to the upgrading device, or send the device information and the device information of the Bluetooth device itself to the upper-level Bluetooth device connected to the Bluetooth device.
  • the Bluetooth device further includes: an upgrade execution module configured to perform the upgrade on the Bluetooth device according to the upgrade data after the second sending module sends the upgrade result information to the pre-order Bluetooth device or the upgrade device of the Bluetooth device; and
  • the seventh sending module is configured to send the upgrade result information of the Bluetooth device to the pre-order Bluetooth device or the upgrade device corresponding to the Bluetooth device according to the upgrade path.
  • An embodiment of the present application provides a Bluetooth device.
  • a Bluetooth device According to a connection relationship between Bluetooth devices in a Bluetooth cluster, a central node is selected to establish a Bluetooth connection with the upgrade device to transmit upgrade data.
  • an upgrade path is selected and the standby status in the Bluetooth cluster is selected according to the upgrade path. Upgrade the device to upgrade. This improves the upgrade success rate of the Bluetooth cluster and shortens the upgrade time-consuming.
  • the Bluetooth cluster online upgrade method used in this application further expands the Bluetooth communication range, eliminating the need for one-to-one operation by the user, saving operation time, and using the connection between Bluetooth devices in the existing Bluetooth cluster to send upgrade data.
  • the upgrade device does not need to send upgrade data multiple times, which solves the problem of data congestion caused by multiple Bluetooth devices accessing the upgrade device at the same time.
  • the upgrade data has become significantly smaller, which makes it significantly less time-consuming to upgrade when the Bluetooth cluster is large and the number of layers is large.
  • the upgrade of multiple Bluetooth devices in the Bluetooth cluster can be completed by only operating on the device side, providing users with simpler and more efficient services.
  • An embodiment of the present application may further provide an upgrade device for performing the method for online upgrade of a Bluetooth cluster provided in the embodiment.
  • the device 50 includes: a memory 51 and a processor 52;
  • the memory 51 is coupled to the processor 52;
  • a memory 51 for storing program instructions
  • the processor 52 is configured to call a program instruction stored in the memory, so that the upgrade device executes the Bluetooth cluster online upgrade method.
  • the upgrade device provided in the embodiment of the present application can execute the Bluetooth cluster online upgrade method performed by the upgrade device provided in any of the embodiments described above.
  • the embodiment of the present application may further provide a Bluetooth device for performing the method for online upgrading of a Bluetooth cluster provided in the embodiment.
  • the device 60 includes a memory 61 and a processor 62.
  • the memory 61 is coupled to the processor 62;
  • a memory 61 for storing a program instruction
  • the processor 62 is configured to call a program instruction stored in the memory, so that the Bluetooth device executes a Bluetooth cluster online upgrade method.
  • the Bluetooth device provided in this embodiment of the present application can execute the Bluetooth cluster online upgrade method performed by the Bluetooth device provided in any one of the foregoing embodiments.
  • the Bluetooth device provided in any one of the foregoing embodiments can execute the Bluetooth cluster online upgrade method performed by the Bluetooth device provided in any one of the foregoing embodiments.
  • An embodiment of the present application may further provide a computer-readable storage medium having stored thereon a computer program which, when executed by the processor 52, implements a Bluetooth cluster online upgrade method performed by an upgrade device.
  • the computer-readable storage medium provided in the embodiments of the present application can execute the Bluetooth cluster online upgrade method performed by the upgrade device provided in any of the embodiments described above.
  • the Bluetooth cluster online upgrade method performed by the upgrade device provided in any of the embodiments described above.
  • the embodiment of the present application may further provide a computer-readable storage medium having a computer program stored thereon.
  • the computer program When executed by the processor 62, it implements a Bluetooth cluster online upgrade method performed by a Bluetooth device.
  • the computer-readable storage medium provided in the embodiment of the present application can execute the Bluetooth cluster online upgrade method performed by the Bluetooth device provided in any one of the foregoing embodiments.
  • the computer-readable storage medium provided in the embodiment of the present application can execute the Bluetooth cluster online upgrade method performed by the Bluetooth device provided in any one of the foregoing embodiments.
  • the processor may be an integrated circuit chip with signal processing capabilities.
  • each step of the foregoing method embodiment may be completed by using an integrated logic circuit of hardware in a processor or an instruction in a form of software.
  • the above processor may be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable Programming logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA off-the-shelf programmable gate array
  • Various methods, steps, and logical block diagrams disclosed in the embodiments of the present application can be implemented or executed.
  • a general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the steps of the method disclosed in combination with the embodiments of the present application may be directly implemented and executed by a hardware decoding processor, or may be executed and completed by using a combination of hardware and software modules in the decoding processor.
  • the software module may be located in a mature storage medium such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, and the like.
  • the storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the foregoing method in combination with its hardware.
  • the memory in the embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (erasable PROM, EPROM), or an electronic memory. Erase programmable read-only memory (EPROM, EEPROM) or flash memory.
  • the volatile memory may be a random access memory (RAM), which is used as an external cache.
  • RAM random access memory
  • DRAM dynamic random access memory
  • SDRAM synchronous dynamic random access memory
  • double SDRAM double SDRAM
  • DDR SDRAM double data rate synchronous dynamic random access memory
  • enhanced SDRAM enhanced SDRAM
  • SLDRAM synchronous connection dynamic random access memory
  • direct RAMbus RAM direct RAMbus RAM
  • B corresponding to A means that B is associated with A, and B can be determined according to A.
  • determining B based on A does not mean determining B based on A alone, but also determining B based on A and / or other information.
  • the disclosed systems, devices, and methods may be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the unit is only a logical function division.
  • multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, which may be electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objective of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each of the units may exist separately physically, or two or more units may be integrated into one unit.
  • the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the technical solution of this application is essentially a part that contributes to the existing technology or a part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium, including Several instructions are used to cause 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 described in the embodiments of the present application.
  • the aforementioned storage media include: U disks, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks or compact discs and other media that can store program codes .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

一种蓝牙集群在线升级方法与装置,涉及物联网领域。该方法包括:升级设备在蓝牙集群中选择中心节点,建立与中心节点的蓝牙连接(100);升级设备选择升级路径,按照升级路径通过中心节点发送升级数据给待升级设备,以使待升级设备获取升级数据实现升级,待升级设备为蓝牙集群中的一部分或者全部蓝牙设备(110)。采用该方法进一步拓宽了蓝牙的通信范围,无需用户一对一操作,利用现有的蓝牙集群中蓝牙设备间的连接发送升级数据,解决了因数据拥挤而导致的升级成功率低的问题,同时,解决了蓝牙集群规模大带来的升级耗时长的问题,仅仅在升级设备端操作就可以完成蓝牙集群在线升级。

Description

一种蓝牙集群在线升级方法及装置 技术领域
本申请涉及物联网领域,尤其涉及一种蓝牙集群在线升级方法及装置。
背景技术
随着蓝牙设备在物联网领域的应用场景增加,多个蓝牙设备可以组成蓝牙集群以弥补蓝牙连接覆盖范围小的缺陷。而随着蓝牙集群中蓝牙设备数量的不断增加,蓝牙间一对一的升级方式已经不能满足智能楼宇、智能家居等应用场景的需求,同时为了做到对不易触及的设备进行升级,必须对多个蓝牙设备同时进行在线升级。现有的蓝牙在线升级技术中,一对一的升级技术比较普遍,但是升级效率低,而对于现有的蓝牙集群在线升级技术,每一个蓝牙设备的升级都需要向升级设备获取升级数据,一方面容易使升级数据拥挤在单一蓝牙设备,增加蓝牙设备的升级数据传输难度,以至于升级成功率低,另一方面,在蓝牙集群规模大、层数多的情况下,升级耗时显著增加。
发明内容
针对现有技术中蓝牙集群升级成功率低和升级耗时长的问题,本申请实施例提供了一种蓝牙集群在线升级方法及装置。
本申请的实施例的第一方面提供了一种蓝牙集群在线升级方法,包括:升级设备在蓝牙集群中选择中心节点,建立与中心节点的蓝牙连接;升级设备选择升级路径,按照升级路径通过中心节点发送升级数据给待升级设备,以使待升级设备获取升级数据实现升级,待升级设备为蓝牙集群中的一部分或者全部蓝牙设备。
另外,结合第一方面,在第一方面的一种实现方式中,升级设备在蓝牙集群中选择中心节点之前,还包括:升级设备与蓝牙集群中已打开广播的蓝牙设备建立连接;升级设备通过与其连接的蓝牙设备向 蓝牙集群中未打开广播的蓝牙设备发送打开广播的指令;升级设备更新扫描到蓝牙设备。
另外,结合第一方面及其上述实现方式,在第一方面的另一种实现方式中,升级设备在蓝牙集群中选择中心节点的方法包括:根据升级设备扫描到的蓝牙设备的接收功率的强弱,升级设备选择接收功率最强的一个或多个蓝牙设备作为蓝牙集群的中心节点;或者根据升级设备扫描到的蓝牙设备连接的下一级蓝牙设备的数目,升级设备选择连接的下一级蓝牙设备数目最多的一个或多个蓝牙设备作为蓝牙集群的中心节点。
另外,结合第一方面及其上述实现方式,在第一方面的另一种实现方式中,升级设备建立与中心节点的蓝牙连接之后,还包括:升级设备通过中心节点发送设备信息请求指令给蓝牙集群中的全部蓝牙设备;升级设备接收中心节点发送的全部蓝牙设备的设备信息;升级设备确定待升级设备。
另外,结合第一方面及其上述实现方式,在第一方面的另一种实现方式中,升级设备选择升级路径的方法包括:升级设备以中心节点为中心向外层查询,为待升级设备确定前序蓝牙设备;升级设备根据待升级设备及其对应的前序蓝牙设备生成升级路径。
另外,结合第一方面及其上述实现方式,在第一方面的另一种实现方式中,升级设备以中心节点为中心向外层查询,为待升级设备确定前序蓝牙设备,包括:根据中心节点到待升级设备的连接代价,从待升级设备中选择一个或多个连接代价最小的待升级设备作为第一设备,并记录对应的中心节点为连接代价最小的待升级设备的前序蓝牙设备,第一设备之外的待升级设备为第二设备;根据中心节点或第一设备到第二设备的连接代价,从第二设备中选择一个或多个连接代价最小的待升级设备加入第一设备,并记录对应的第一设备为连接代价最小的待升级设备的前序蓝牙设备;重复上一步骤直到为全部待升级设备确定前序蓝牙设备。
另外,结合第一方面及其上述实现方式,在第一方面的另一种实现方式中,升级设备选择升级路径之后,还包括:升级设备将升级路 径设置到升级数据中;或者升级设备将升级路径通过中心节点发送给待升级设备。
本申请的实施例的第二方面提供了一种蓝牙集群在线升级方法,包括:蓝牙设备接收升级数据和升级路径,升级路径中包括升级设备确定的待升级设备及其对应的前序蓝牙设备的信息,待升级设备为蓝牙集群中的一部分或者全部蓝牙设备;蓝牙设备将升级数据和升级路径发送给升级路径中的下一级待升级设备;蓝牙设备收到升级路径中的下一级蓝牙设备发送的升级结果信息,并将升级结果信息发送给蓝牙设备的前序蓝牙设备或者升级设备。
另外,结合第二方面,在第二方面的一种实现方式中,在蓝牙设备接收升级数据和升级路径之前,还包括:蓝牙设备接收与其连接的上一级蓝牙设备或升级设备发送的设备信息请求指令,并将设备信息请求指令发送给与其连接的下一级蓝牙设备;蓝牙设备接收与其连接的下一级蓝牙设备发送的设备信息,并将设备信息和蓝牙设备自身的设备信息发送给升级设备或与其连接的上一级蓝牙设备。
另外,结合第二方面及其上述实现方式,在第二方面的另一种实现方式中,在蓝牙设备将升级结果信息发送给蓝牙设备的前序蓝牙设备或者升级设备之后,还包括:蓝牙设备使用升级数据执行升级;蓝牙设备依照升级路径将其升级结果信息发送给蓝牙设备对应的前序蓝牙设备或者升级设备。
本申请的实施例的第三方面提供了一种升级设备,用于蓝牙集群的在线升级,升级设备包括:第一连接模块,用于在蓝牙集群中选择中心节点,并建立与中心节点的蓝牙连接;以及升级模块,用于选择升级路径,按照升级路径通过中心节点发送升级数据给待升级设备,以使待升级设备获取升级数据实现升级,待升级设备为蓝牙集群中的一部分或者全部蓝牙设备。
另外,结合第三方面,在第三方面的一种实现方式中,升级设备还包括:第二连接模块,用于在第一连接模块在蓝牙集群中选择中心节点之前,与蓝牙集群中已打开广播的蓝牙设备建立连接;第一发送模块,用于通过与第二连接模块连接的蓝牙设备向蓝牙集群中未打开 广播的蓝牙设备发送打开广播的指令;扫描模块,用于更新扫描到的蓝牙设备。
另外,结合第三方面及其上述实现方式,在第三方面的另一种实现方式中,第一连接模块还包括:第一选择子模块,用于根据扫描模块扫描到的蓝牙设备的接收功率的强弱,选择接收功率最强的一个或多个蓝牙设备作为蓝牙集群的中心节点;或者用于根据扫描模块扫描到的蓝牙设备连接的下一级蓝牙设备数目,选择连接的下一级蓝牙设备数目最多的一个或多个蓝牙设备作为蓝牙集群的中心节点。
另外,结合第三方面及其上述实现方式,在第三方面的另一种实现方式中,升级设备还包括:第二发送模块,用于在第一连接模块建立与中心节点的蓝牙连接之后,通过中心节点发送设备信息请求指令给蓝牙集群中的全部蓝牙设备;第一接收模块,用于接收中心节点发送的全部蓝牙设备的设备信息;以及第二选择模块,用于确定待升级设备。
另外,结合第三方面及其上述实现方式,在第三方面的另一种实现方式中,升级模块包括:查询子模块,用于以中心节点为中心向外层查询,为所有待升级设备确定前序蓝牙设备;以及路径生成子模块,用于根据待升级设备及其对应的前序蓝牙设备生成升级路径。
另外,结合第三方面及其上述实现方式,在第三方面的另一种实现方式中,查询子模块包括:前序蓝牙设备确定单元,用于根据中心节点到待升级设备的连接代价,从待升级设备中选择一个或多个连接代价最小的待升级设备作为第一设备,第一设备之外的待升级设备为第二设备;记录对应的中心节点为连接代价最小的待升级设备的前序蓝牙设备;根据中心节点与第一设备到第二设备的连接代价,从第二设备中选择一个或多个连接代价最小的待升级设备加入第一设备,并记录对应的第一设备为连接代价最小的待升级设备的前序蓝牙设备;重复上一步骤直到为全部待升级设备确定前序蓝牙设备。
另外,结合第三方面及其上述实现方式,在第三方面的另一种实现方式中,升级模块还包括:设置子模块,用于将升级路径设置到升级数据中;或者升级模块还用于,将升级路径通过中心节点发送给待 升级设备。
本申请的实施例的第四方面提供了一种蓝牙设备,用于蓝牙集群的在线升级,蓝牙设备包括:第二接收模块,用于接收升级数据和升级路径,升级路径中包括升级设备确定的待升级设备及其对应的前序蓝牙设备,待升级设备为蓝牙集群中的一部分或者全部蓝牙设备;第三发送模块,用于将升级数据和升级路径发送给升级路径中的下一级待升级设备;第三接收模块,用于接收升级路径中的下一级蓝牙设备发送的升级结果信息;以及第四发送模块,用于将升级结果信息发送给蓝牙设备的前序蓝牙设备或者升级设备。
另外,结合第四方面,在第四方面的一种实现方式中,蓝牙设备还包括:第四接收模块,用于在第一接收模块接收升级数据和升级路径之前,接收与蓝牙设备连接的上一级蓝牙设备或升级设备发送的设备信息请求指令;第五发送模块,用于将设备信息请求指令发送给与蓝牙设备连接的下一级蓝牙设备;第五接收模块,用于接收与蓝牙设备连接的下一级蓝牙设备发送的设备信息;以及第六发送模块,用于将设备信息发送给升级设备,或者将设备信息和蓝牙设备自身的设备信息发送给与蓝牙设备连接的上一级蓝牙设备。
另外,另外,结合第四方面,在第四方面的另一种实现方式中,蓝牙设备还包括:升级执行模块,用于在第二发送模块将升级结果信息发送给蓝牙设备的前序蓝牙设备或者升级设备之后,依照升级数据对蓝牙设备执行升级;以及第七发送模块,用于依照升级路径将蓝牙设备的升级结果信息发送给蓝牙设备对应的前序蓝牙设备或者升级设备。
本申请的实施例的第五方面提供了一种升级设备,用于蓝牙集群的在线升级,包括:存储器和处理器;存储器与处理器耦合;存储器,用于存储程序指令;处理器,用于调用存储器存储的程序指令,使得升级设备执行上述第一方面所述的蓝牙集群在线升级方法。
本申请的实施例的第六方面提供了一种蓝牙设备,用于蓝牙集群的在线升级,包括:存储器和处理器;存储器与处理器耦合;存储器,用于存储程序指令;处理器,用于调用存储器存储的程序指令,使得 蓝牙设备执行上述第二方面所述的蓝牙集群在线升级方法。
本申请的实施例的第七方面提供了一种计算机可读存储介质,包括:其上存储有计算机程序,计算机程序被处理器执行时实现上述第一方面所述的蓝牙集群在线升级方法。
本申请的实施例的第八方面提供了一种计算机可读存储介质,包括:其上存储有计算机程序,计算机程序被处理器执行时实现上述第二方面所述的蓝牙集群在线升级方法。
与现有技术相比,本申请实施例的有益效果在于:本申请实施例提供了一种蓝牙集群在线升级方法及装置,依据蓝牙集群中蓝牙设备之间的连接关系,选择中心节点与升级设备建立蓝牙连接传送升级数据,同时选择升级路径并按照升级路径对蓝牙集群中的待升级设备进行升级。从而提高了蓝牙集群的升级成功率,缩短了升级耗时。本申请采用的蓝牙集群在线升级方法进一步拓宽了蓝牙的通信范围,无需用户一对一操作,节省了操作时间,并且,利用现有的蓝牙集群中蓝牙设备之间的连接发送升级数据,一方面升级设备不需要多次发送升级数据,解决了因多个蓝牙设备同时访问升级设备造成的数据拥挤问题,另一方面,由于大部分蓝牙设备的升级数据都不需要直接向升级设备获取,升级数据传递所经过的蓝牙设备数量明显变少,使得在蓝牙集群规模大、层数多的情况下,升级耗时显著减少。并且,仅仅在升级设备端操作就可以完成对蓝牙集群中多个蓝牙设备的升级,为用户提供更加简便、更加高效的服务。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例的一种蓝牙集群在线升级方法的系统框图;
图2为本申请实施例的升级设备端的一种蓝牙集群在线升级方法的流程图;
图3为本申请实施例中升级设备在蓝牙集群中选择中心节点之前的步骤的流程图;
图4为本申请实施例的升级设备建立与中心节点的蓝牙连接之后的步骤的流程图;
图5为本申请实施例的升级设备以中心节点为中心向外层查询,为待升级设备确定前序蓝牙设备的步骤的流程图;
图6为本申请实施例中的蓝牙设备的网络拓扑图;
图7为本申请实施例中根据图6的网络拓扑图求解得到的升级路径示意图;
图8为本申请实施例中根据图6的网络拓扑图求解得到的升级数据和升级结果信息的传递路径示意图;
图9为本申请实施例的蓝牙设备端的一种蓝牙集群在线升级方法的流程图;
图10为本申请实施例的一种升级设备的结构示意图;
图11为本申请实施例的一种蓝牙设备的结构示意图;
图12为本申请实施例的另一种升级设备的结构示意图;
图13为本申请实施例的另一种蓝牙设备的结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请的部分实施例采用举例的方式进行详细的阐述。然而,本领域的普通技术人员可以理解,在各例子中,为了使读者更好地理解本申请而提出了许多技术细节。但是,即使没有这些技术细节和基于以下各实施例的种种变化和修改,也可以实现本申请所要求保护的技术方案。
请参考图1,是本申请实施例的一种蓝牙集群在线升级方法的系统框图,本实施例从升级设备的角度对本申请实施例提供的一种蓝牙集群在线升级方法进行说明。蓝牙集群是一组相互独立的、通过无线互联的设备;蓝牙集群组表示多个相互独立的蓝牙集群,其蓝牙集群 间互相无直接连接。根据本申请实施例,该蓝牙集群在线升级方法用于对一个蓝牙集群或者蓝牙集群组中的一部分或者全部蓝牙设备同时进行在线升级。本实施例针对一个蓝牙集群中的部分或者全部蓝牙设备进行升级为例进行说明,但本领域的技术人员应当明了的是,选择一个蓝牙集群进行升级仅为示例性说明,在实际使用中,本领域的技术人员可以参照本申请实施例的方案,选择蓝牙集群组进行升级,也就是选择多个蓝牙集群进行升级;同样的,本实施例选择一个蓝牙设备作为中心节点为例进行描述,但本领域的技术人员应当明了的是,选择一个蓝牙设备作为中心节点仅为示例性说明,在实际使用中,本领域的技术人员可以参照本申请实施例的方案,选择一个蓝牙集群中的多个蓝牙设备作为中心节点,实现对一个蓝牙集群的在线升级;本领域的技术人员也可以参照本申请实施例的方案,在对蓝牙集群组中的蓝牙集群进行升级时,对每个蓝牙集群,可以从该蓝牙集群中选择一个或者多个蓝牙设备作为中心节点,实现对蓝牙集群组的在线升级。本实施例中的蓝牙设备支持多连接的低功耗蓝牙协议或经典蓝牙协议,本实施例对此不做限定。
请参考图2,图2是本申请实施例的一种蓝牙集群在线升级方法的流程图,该方法包括:
步骤100:升级设备在蓝牙集群中选择中心节点,建立与中心节点的蓝牙连接;
其中,升级设备可以是具有存储计算能力的,具有蓝牙连接功能的终端设备,包括但不限于手机或电脑。另外,升级设备还包括在升级设备上运行的升级管理软件和用户界面,以便用户操作。
升级设备选择中心节点之前,蓝牙集群中需要存在广播打开的并且可以被升级设备扫描到的蓝牙设备,其目的是使升级设备可以依据不同的使用场景选择不同的中心节点,满足不同的用户需求。
可选的,请参考图3,为了实现此目的,升级设备在蓝牙集群中选择中心节点之前的操作包括以下三个步骤:
步骤101:升级设备与蓝牙集群中已打开广播的蓝牙设备建立连接;
在步骤101中,升级设备扫描到蓝牙集群中打开广播的蓝牙设备才能与已打开广播的蓝牙设备建立连接,其中,升级设备扫描到的打开广播的蓝牙设备可以是一个或多个蓝牙设备,如果升级设备没有扫描到打开广播的蓝牙设备,即所有的蓝牙设备都没有打开广播或者打开广播的蓝牙设备不在升级设备的扫描范围内,则需要对一个或多个临近升级设备的蓝牙设备设置打开广播,以便升级设备可以扫描到。
步骤102:升级设备通过与其连接的蓝牙设备向蓝牙集群中未打开广播的蓝牙设备发送打开广播的指令;
在步骤102中,升级设备与打开广播的蓝牙设备通过蓝牙进行连接后,升级设备通过已经与它连接的蓝牙设备向蓝牙集群中未打开广播的蓝牙设备发送打开广播的指令,蓝牙设备收到打开广播的指令后打开自己的广播,以便让升级设备扫描。其中,与升级设备连接的可以是蓝牙集群中的一个或者多个蓝牙设备,升级设备可以通过与它连接的蓝牙设备去打开这个蓝牙集群中全部蓝牙设备的广播;对于蓝牙集群组,升级设备可以与每个蓝牙集群中的一个或者多个蓝牙设备连接,升级设备可以通过与它连接的蓝牙设备去打开对应蓝牙集群中的全部蓝牙设备的广播,以便升级设备扫描到蓝牙设备并在扫描到的蓝牙设备中为需要升级的蓝牙集群选择中心节点。
步骤103:升级设备更新扫描到蓝牙设备。
在步骤103中,蓝牙集群中所有蓝牙设备打开广播后,升级设备能够扫描到最多的蓝牙设备。这里需要注意的是,虽然所有蓝牙设备都打开了广播,但是升级设备可能只扫描到部分打开广播的蓝牙设备,其原因可能是升级设备距离部分蓝牙设备太远。升级设备扫描到蓝牙集群中的蓝牙设备后,在扫描到的蓝牙设备中选择一个或者多个蓝牙设备作为中心节点;对于蓝牙集群组,升级设备扫描到多个蓝牙集群中的多个蓝牙设备后,在扫描到的蓝牙设备中,可以选择一个或者多个蓝牙设备作为其所在的蓝牙集群的中心节点。
可选的,升级设备在蓝牙集群中选择中心节点包括以下两种方式:
一种方式是,根据升级设备扫描到的蓝牙设备的接收功率的强弱,升级设备选择接收功率最强的一个或多个蓝牙设备作为蓝牙集群的 中心节点。中心节点起到了升级设备与蓝牙集群中各个蓝牙设备之间的通信桥接功能,这种中心节点的选择方式能够保证升级设备与中心节点之间连接的稳定性,即保证了升级设备与蓝牙集群中各个蓝牙设备之间通信的稳定性,能够保证数据传输的成功率,大大减少了因数据传输失败而导致请求重传的概率,该数据包括但不限于设备信息请求指令、升级数据、升级路径与升级结果信息。
另一种方式是,根据升级设备扫描到的蓝牙设备连接的下一级蓝牙设备的数目,升级设备选择连接的下一级蓝牙设备数目最多的一个或多个蓝牙设备作为蓝牙集群的中心节点。为了实现这种选择中心节点的方式,可以在蓝牙设备的广播包中加入连接信息,这样,升级设备扫描到蓝牙设备之后,可以得到该蓝牙设备所连接的蓝牙设备的数目。使用这种方式,中心节点连接的下一级蓝牙设备数目最多,因此数据传输的并行路径可能更多,能够较快的实现数据从升级设备到全部待升级设备的传输,该数据包括但不限于设备信息请求指令、升级数据、升级路径与升级结果信息。
由以上两种选择中心节点的方式可以看出,中心节点可以是蓝牙集群中的任意一个或多个蓝牙设备,并不要求其具备除蓝牙以外的连接能力。
本实施例只列举了两种选择中心节点的方式,但本领域的技术人员应当明了的是,这两种选择中心节点的方式仅为示例性说明,在实际使用中,本领域的技术人员可以参照本申请实施例的方案,在不付出创造性劳动的前提下,还可以根据这两种选择中心节点的方式获得其他选择中心节点的方式。
其中,升级设备选择了一个或者多个中心节点之后,升级设备与所选择的中心节点通过蓝牙建立连接。
可选的,升级设备与中心节点建立连接后,升级设备可以关闭蓝牙集群中所有蓝牙设备的广播,断开升级设备与其他蓝牙设备的连接并停止扫描模式,可以保证更低的功耗。另外,升级设备与中心节点之间的连接建立完成后,升级设备可以对连接进行加密,以保证传输数据的安全。
升级设备建立与中心节点的蓝牙连接之后,需要确定蓝牙集群中的待升级设备。待升级设备是用户选定的需要升级的蓝牙设备,其中,中心节点也可以被选为待升级设备,但是由于中心节点可以直接与升级设备通信,而其他待升级设备则不能,所以特地将中心节点单独定义,因此,在本实施例中待升级设备描述为除了中心节点之外的其他需要升级的蓝牙设备。
可选的,请参考图4,为了确定待升级设备,升级设备建立与中心节点的蓝牙连接之后的步骤包括:
105:升级设备通过中心节点发送设备信息请求指令给蓝牙集群中的全部蓝牙设备;
在步骤105中,升级设备发送设备信息请求指令给已经与其建立连接的中心节点,该中心节点收到升级设备发送的设备信息请求指令后,将设备信息请求指令发送给与之连接的蓝牙设备,收到该设备信息请求指令的蓝牙设备将此设备信息请求指令发送给其他的蓝牙设备,直到蓝牙集群中的全部蓝牙设备收到该设备信息请求指令。其中,设备信息请求指令用于使收到该设备信息请求指令的蓝牙设备将自己的设备信息发送给上一级蓝牙设备,该上一级蓝牙设备一般指与之连接的发送设备信息请求指令的蓝牙设备;其中,该中心节点收到升级设备发送的设备信息请求指令后,除了将设备信息请求指令发送给与之连接的蓝牙设备之外,还需要将自己的设备信息发送给升级设备。
106:升级设备接收中心节点发送的全部蓝牙设备的设备信息;
在步骤106中,中心节点收到设备信息请求指令后,将自己的设备信息发送给升级设备,由于升级设备仅与中心节点连接,所以除了中心节点之外的其他蓝牙设备的设备信息首先被发送到中心节点,再由中心节点发送给升级设备。设备信息包括但不限于设备号、设备地址、设备名字、连接信息、当前软件版本和接收信号强度(Received Signal Strength Indication,RSSI)。
107:升级设备确定待升级设备。
在步骤107中,升级设备收到了蓝牙集群中的所有设备信息之后,根据蓝牙设备间的连接关系和接收信号强度,升级设备可以生成网络 拓扑图根据蓝牙设备的设备号、设备地址、设备名字、连接信息以及当前软件版本,用户可以根据需求选择待升级设备。
步骤110:升级设备选择升级路径,按照升级路径通过中心节点发送升级数据给待升级设备,以使待升级设备获取升级数据实现升级,待升级设备为蓝牙集群中的一部分或者全部蓝牙设备。
在步骤110中,升级设备到某一个待升级设备一般会有几条数据传输路径,需要针对待升级设备选择升级路径。其中,升级数据包括执行蓝牙设备升级的所有相关信息,包括但不限于升级方式信息和升级版本数据包。
可选的,升级设备选择升级路径的步骤包括:
升级设备以中心节点为中心向外层查询,为待升级设备确定前序蓝牙设备;
升级设备根据待升级设备及其对应的前序蓝牙设备生成升级路径。
其中,可以根据不同的标准确定待升级设备的前序蓝牙设备,例如,中心节点可以为与其连接的所有待升级设备M的前序蓝牙设备,而M可以作为与M连接的所有待升级设备N的前序蓝牙设备,此处的连接指的是不跨过其他待升级设备的连接,仅仅以连接这个条件来确定前序蓝牙设备,当某待升级设备收到升级数据之后,不再接收其他前序蓝牙设备的升级数据。
由于待升级设备间距离不一样或者从一个待升级设备到另一个待升级设备没有直接连接,需要其他蓝牙设备转发数据,因此这些数据传输路径的稳定性不一样,稳定性太低将会导致多次数据重传,为了避免这种情况,提高升级效率和成功率,可以选择根据蓝牙设备间的连接代价来确定选择升级路径。定义D(x,y)为数据从蓝牙设备x发送到蓝牙设备y的连接代价,一般的,数据从蓝牙设备x发送到蓝牙设备y的连接代价与数据从蓝牙设备y发送到蓝牙设备x的连接代价大致相等。由于接收信号强度RSSI通常是负数,因此设置-RSSI(x,y)作为x到y的连接代价,即D(x,y)=-RSSI(x,y),RSSI越大,连接代价越小,连接越稳定。
可选的,请参考图5,升级设备以中心节点为中心向外层查询,为待升级设备确定前序蓝牙设备的步骤包括:
步骤501:根据中心节点到待升级设备的连接代价,从待升级设备中选择一个或多个连接代价最小的待升级设备作为第一设备,并记录对应的中心节点为连接代价最小的待升级设备的前序蓝牙设备,第一设备之外的待升级设备为第二设备;
步骤502:根据中心节点或第一设备到第二设备的连接代价,从第二设备中选择一个或多个连接代价最小的待升级设备加入第一设备,并记录对应的第一设备为连接代价最小的待升级设备的前序蓝牙设备;
步骤503:重复步骤502直到为全部待升级设备确定前序蓝牙设备。
在步骤502中,中心节点或第一设备到第二设备的连接代价,包含至少两种连接代价的计算方式,方式一为:以中心节点为起点,计算中心节点到第二设备中任意一个蓝牙设备的连接代价,方式二为:轮流以中心节点和第一设备中任意一个蓝牙设备为起点,计算到第二设备中任意一个蓝牙设备的连接代价,从第二设备中选择一个或多个连接代价最小的待升级设备加入第一设备,并记录对应的第一设备为连接代价最小的待升级设备的前序蓝牙设备;注意第二设备中的待升级设备的前序蓝牙设备可以有一个或多个,第二设备中的待升级设备可以有同一个前序蓝牙设备,拥有相同的前序蓝牙设备的待升级设备为同一级待升级设备。
其中,升级设备以中心节点为中心向外层查询时,若两个待升级设备A与B间存在不需要升级的中继节点C,即C为仅需要传输数据但是不需要升级的蓝牙设备,那么A与B这两个待升级设备间的连接代价为A到C的连接代价与C到B的连接代价的最大值;如果A与B间存在待升级设备C,A为第一设备,且C与B都属于第二设备,那么定义A与B间的连接代价为无穷大,这样定义是为了不跨级地去计算连接代价,此处的跨级针对的是第二设备,如果A与B间存在待升级设备C,且B和C属于第二设备,A属于第一设备, 那么A经过C到B的连接代价一定大于等于A到C的连接代价,所以为了找到下一级待升级设备的最小连接代价,没必要跨级,只计算到A的下一级待升级设备;如果A与B间存在待升级设备C,A与C为第一设备,B属于第二设备,那么定义A与B间的连接代价为A到C的连接代价与C到B的连接代价的最大值,因为不跨级计算是针对第二设备的,而此处从A到B没有经过其他的第二设备,只经过了第一设备C,需要注意的是,A与B之间存在C的情况仅为示例性说明,在实际使用中,A与B之间可以存在多个点,本领域的技术人员可以参照本申请实施例的方案,得到其他连接情况下两个蓝牙设备之间的连接代价。
请参考图6所示的蓝牙设备的网络拓扑图,图6中标注的数字表示蓝牙设备间的连接代价,A表示升级设备所选的中心节点,除A之外的其他点都表示待升级设备。本实施例以求解图6这个网络拓扑图的升级路径为例,图6这个网络拓扑图也可以理解为蓝牙集群中待升级设备的网络拓扑图,需要注意的是,根据现有技术,本领域的技术人员可以由蓝牙集群的所有蓝牙设备的设备信息得到待升级设备的网络拓扑图。另外,本领域的技术人员应当明了的是,求解图6这个网络拓扑图的升级路径仅为示例性说明,在实际使用中,本领域的技术人员可以参照本申请实施例的方案,求解其他网络拓扑图的升级路径进而对蓝牙集群进行升级,其他网络拓扑图中包括但不限于蓝牙集群的全部或者部分蓝牙设备,其他网络拓扑图中还可以包括不需要升级的蓝牙设备,求解其他网络拓扑图得到的升级路径中可以包括待升级设备,也可以包括不需要升级的蓝牙设备。以方式一计算连接代价的方法为例,求解图6这个网络拓扑中的升级路径。从待升级设备中选择到中心节点连接代价最小的蓝牙设备为第一级待升级设备设置到第一设备中,由于E或F不与A直接连接,所以A到E或F的连接代价一定比A到B、C或D的连接代价大,所以只需要分析A到B、C和D的连接代价。又因为A到C的连接代价为45,比A到B和A到D的连接代价都小,所以将C作为第一级待升级设备设置到第一设备中,并记录C的前序蓝牙设备为A;
现在第一设备为A和C,分析第二设备B、D、E和F,由于F不与第一设备连接,因此第一设备到F的连接代价一定比第一设备到B、D或E的连接代价大,所以只需要分析第一设备到B、D和E的连接代价。首先分析第一设备到B的连接代价,如果直接从A到B,连接代价为50;如果从A经过升级路径中的C到B,连接代价为45和40的最大值,为45;特别的,此处跨级计算时并不设置为无穷大,因为不跨级计算是针对第二设备的,此处的C是属于第一设备的,在后面的描述中同理,不再赘述。所以,从A经过升级路径中的C到B的连接代价更小,为45。然后分析第一设备到D的连接代价,如果直接从中心节点A到D,连接代价为70;如果从中心节点经过升级路径中的C到D,连接代价为45和60的最大值,为60;所以,从A经过升级路径中的C到D的连接代价更小,为60。最后分析第一设备到E的连接代价,如果直接从中心节点A到E,由于需要经过其他的第二设备,所以连接代价为无穷;如果从中心节点经过第一设备中的C到E,连接代价为45和55的最大值,为55;所以,从A经过第一设备中的C到E的连接代价更小,为55;综上,从A到B、D和E的最小连接代价分别为45、60和55,所以选择B加入到第一设备中,并记录C为B的前序蓝牙设备。依此类推,得到升级路径请参考图7。
以求解图6这个网络拓扑图中的升级路径为例,计算连接代价的方法为方式一。对升级路径的计算算法定义如下:令从中心节点到待升级设备n的连接代价为D(n)=min(D'(n),max(D(w),D(w,n)));
符号定义:
N:表示第一设备中待升级设备的集合;
w:表示加入N中的待升级设备;
n:表示不在N中的w的下一级待升级设备中的任一个;
D'(n):表示为从中心节点直接到n的连接代价;
D(w):从中心节点到w的连接代价;
D(w,n):从w直接到n的连接代价;
max(D(w),D(w,n)):从中心节点经过w到n的连接代价。
由符号定义,表达式D(n)=min(D'(n),max(D(w),D(w,n)))的含义解释如下:若n与中心节点之间可以不经过其他待升级设备直接连接,那么D'(n)不为无穷大,将之与max(D(w),D(w,n))相比较,注意w可以是一个或者多个待升级设备,如果D'(n)小,则证明从中心节点直接到n的连接代价更小,如果max(D(w),D(w,n))小,则证明从中心节点经过w到n的连接代价更小。算法的执行步骤如下:
S1:初始化N,由于此时N中没有任何待升级设备,所以从中心节点经过w到n的连接代价不需要计算,只需要直接计算中心节点到n的连接代价,即D(n)=minD'(n):;
S2:计算D(n)并记录n的前序蓝牙设备;
S3:找出使D(n)最小的w,并将w加入集合N之中,并记录n的前序蓝牙设备;
S4:更新D(n);
S5:重复步骤S3、S4直到所有待升级设备都被加入到集合N中。根据该算法得到的升级路径请参考图7,升级数据和升级结果信息的传递路径请参考图8,其中,实线表示升级数据的发送方向,虚线表示升级结果信息的发送方向,升级结果信息的传递路径与升级数据的传递路径相同,只是方向相反,需要注意的是,由于升级之后,蓝牙设备需要重新启动,为了发送升级结果信息,蓝牙设备需要与前序蓝牙设备重新建立连接,如果与前序蓝牙设备重新建立连接失败,那么蓝牙设备会根据升级路径与其他前序蓝牙设备建立连接。另外,本领域的技术人员应当明了的是,本实施例提供的升级路径的计算算法仅为示例性说明,在实际使用中,本领域的技术人员可以参照本申请实施例的方案,选择其他计算升级路径的算法。
可选的,升级设备选择升级路径之后,升级设备将升级路径设置到升级数据中,或者升级设备将升级路径通过中心节点发送给待升级设备。此处的升级路径包含升级路径的所有信息,包括待升级设备及其前序蓝牙设备,还包括待升级设备间的数据传递关系,使得蓝牙设备可以根据升级路径发送升级数据,蓝牙设备在发送升级数据之前可以根据升级路径信息判断是否发送升级数据以及发送升级数据的对 象,因此,升级设备将在发送升级数据之前将升级路径发送给待升级设备,另外,该升级路径信息可以也利用升级路径来传递。
本申请实施例提供了一种蓝牙集群在线升级方法,依据蓝牙集群中蓝牙设备之间的连接关系,选择中心节点与升级设备建立蓝牙连接传送升级数据,同时选择升级路径并按照升级路径对蓝牙集群中的待升级设备进行升级。从而提高了蓝牙集群的升级成功率,缩短了升级耗时。本申请采用的蓝牙集群在线升级方法进一步拓宽了蓝牙的通信范围,无需用户一对一操作,节省了操作时间,并且,利用现有的蓝牙集群中蓝牙设备之间的连接发送升级数据,一方面升级设备不需要多次发送升级数据,解决了因多个蓝牙设备同时访问升级设备造成的数据拥挤问题,另一方面,由于大部分蓝牙设备的升级数据都不需要直接向升级设备获取,升级数据传递所经过的蓝牙设备数量明显变少,使得在蓝牙集群规模大、层数多的情况下,升级耗时显著减少。并且,仅仅在升级设备端操作就可以完成对蓝牙集群中多个蓝牙设备的升级,为用户提供更加简便、更加高效的服务。
以下,本申请实施例从蓝牙设备的角度对本申请实施例提供的一种蓝牙集群在线升级方法进行说明。
请参考图9,图9是本申请实施例的一种蓝牙集群在线升级方法的流程图,该方法包括:
步骤200:蓝牙设备接收升级数据和升级路径,升级路径中包括升级设备确定的待升级设备及其对应的前序蓝牙设备的信息,待升级设备为蓝牙集群中的一部分或者全部蓝牙设备;
需要说明的是,这里的蓝牙设备可以是中心节点也可以是非中心节点;可以是待升级设备也可以是不需要升级的蓝牙设备,本申请实施例对此不做限定。
可选的,在蓝牙设备接收升级数据和升级路径之前,还包括:
蓝牙设备接收与其连接的上一级蓝牙设备或升级设备发送的设备信息请求指令,并将设备信息请求指令发送给与其连接的下一级蓝牙设备;
蓝牙设备接收与其连接的下一级蓝牙设备发送的设备信息,并将 设备信息和蓝牙设备自身的设备信息发送给升级设备或与其连接的上一级蓝牙设备。需要注意的是,该上一级蓝牙设备与下一级蓝牙设备仅仅针对蓝牙设备所在蓝牙集群的原始连接关系,即升级设备根据设备信息可以得到的连接关系,并不针对升级路径,在升级设备收到所有的设备信息之后,才会选择升级路径。
其中,对于中心节点,中心节点通过蓝牙连接升级设备之后,升级设备可以通过中心节点获取设备信息,升级设备收到所有设备信息之后,可以根据收到的设备信息生成网络拓扑图,可以方便的使用户了解蓝牙集群内蓝牙设备的连接关系,方便用户选择待升级设备。获取设备信息之前需要升级设备发送设备信息请求指令给蓝牙集群中的全部蓝牙设备,升级设备将设备信息请求指令发送给中心节点,中心节点接收级设备发送的设备信息请求指令,然后,中心节点将自己的设备信息发送给升级设备并将设备信息请求指令发送给蓝牙集群中的全部蓝牙设备。在中心节点收到其他蓝牙设备的设备信息之后,中心节点将其他蓝牙设备的设备信息发送给升级设备。
对于除中心节点之外的蓝牙设备,该蓝牙设备收到上一级蓝牙设备发送的设备信息请求指令之后,将自己的设备信息发送给该上一级蓝牙设备,并且把设备信息请求指令发送给下一级蓝牙设备,直至所有的蓝牙设备都收到设备信息请求指令,蓝牙设备发送的设备信息将通过中心节点发送给升级设备。
在步骤200中,蓝牙设备接收升级数据和升级路径包括至少两种方式,方式一是蓝牙设备接收到的升级数据中包含升级路径信息,即升级设备将升级路径设置到升级数据中;方式二是蓝牙设备在接收到升级数据之前接收到了升级路径,如前所述,对于升级设备,在发送升级数据之前,已经将升级路径通过中心节点发送给了待升级设备,升级路径包含升级路径的所有信息,包括待升级设备及其前序蓝牙设备的信息,也包括待升级设备间的数据传递关系,而蓝牙设备在收到升级路径之后,就可以判断是否发送升级数据以及确定发送对象,并且,也可以判断本蓝牙设备是否需要执行升级。
在步骤200中,蓝牙设备收到一帧升级数据之后,对这一帧升级 数据进行校验,校验成功之后保存校验成功的一帧升级数据,对收到的第二帧升级数据校验成功之后,保存第二帧升级数据,直到完整的升级数据都校验成功并且保存完毕。在这个过程中,如果某一帧升级数据校验失败,蓝牙设备可以请求重传这一帧校验失败的升级数据,以保证升级的成功率。然后,蓝牙设备按照升级路径将收到的升级数据发送给下一级待升级设备;
步骤210:蓝牙设备将升级数据和升级路径发送给升级路径中的下一级待升级设备;
在步骤210中,该蓝牙设备如果直接与升级路径中的下一级待升级设备连接,则直接将升级数据和升级路径发送给下一级待升级设备;该蓝牙设备到升级路径中的下一级待升级设备如果必须经过不需要升级的蓝牙设备,则将升级数据和升级路径经过不需要升级的蓝牙设备发送给下一级待升级设备。
步骤220:蓝牙设备收到升级路径中的下一级蓝牙设备发送的升级结果信息,并将升级结果信息发送给蓝牙设备的前序蓝牙设备或者升级设备。
在步骤220中,蓝牙设备收到的升级路径中的下一级蓝牙设备发送的升级结果信息不仅包括其下一级蓝牙设备的升级结果信息,还包括其下一级蓝牙设备收到的其他蓝牙设备的升级结果信息。
对于中心节点,如果中心节点需要升级,中心节点将待升级设备发送的升级结果信息发送给升级设备后,中心节点执行升级,中心节点升级完成后与升级设备建立连接并将自己的升级结果信息发送给升级设备。
对于待升级设备,该待升级设备将下一级待升级设备发送的升级结果信息发送给上一级待升级设备后,该待升级设备执行升级,升级完成后与上一级待升级设备建立连接并将自己的升级结果信息发送给上一级待升级设备。
对于不需要升级的蓝牙设备,只起到传递数据的作用,并不执行升级,这里的数据包括但不限于升级数据与升级结果信息。
采用这种优先升级最后一级待升级设备的方法,如果在蓝牙设备 升级过程中升级被中断,再次升级时,升级完成的蓝牙设备将不参与到升级中,使得再次升级时升级路径缩短,节省了升级耗时,而如果优先升级先收到升级数据的待升级设备,在蓝牙集群进行升级时,可能升级路径中仍然存在该待升级设备,只是该待升级设备不需要升级,仅仅作为传输数据的蓝牙设备。但本领域的技术人员应当明了的是,优先升级最后一级待升级设备仅为示例性说明,在实际使用中,本领域的技术人员可以参照本申请实施例的方案,选择其他的升级策略,包括:优先升级第一级待升级设备,或者只要待升级设备收到升级数据,则待升级设备进行升级。不同的升级策略会有不同的有益效果,例如:只要待升级设备收到升级数据,则待升级设备进行升级,采用这种方法可以较快的实现对蓝牙集群的升级。可选的,在蓝牙设备将升级结果信息发送给蓝牙设备的前序蓝牙设备或者升级设备之后,还包括:蓝牙设备使用升级数据执行升级;蓝牙设备依照升级路径将其升级结果信息发送给蓝牙设备对应的前序蓝牙设备或者升级设备。在蓝牙设备将升级结果信息发送给蓝牙设备的前序蓝牙设备或者升级设备之后,存在两种情况,首先对于待升级设备,即需要升级的蓝牙设备,蓝牙设备收到它的下一级待升级设备的升级结果信息后,蓝牙设备执行升级,升级完毕后,蓝牙设备与自己的前序蓝牙设备重新建立连接,蓝牙设备按照升级路径将自己的升级结果信息发送给前序蓝牙设备,最后该升级结果信息通过中心节点发送给升级设备。对于中心节点需要升级的情况,在前文已经说明,此处不再赘述。
按照升级路径发送升级数据和升级结果信息完成后,可以对升级结果信息存储并显示,方便用户查看升级结果,升级完成后,对升级失败的节点自动进行再次升级,以确保所有节点完成升级。
本申请实施例提供了一种蓝牙集群在线升级方法,依据蓝牙集群中蓝牙设备之间的连接关系,选择中心节点与升级设备建立蓝牙连接传送升级数据,同时选择升级路径并按照升级路径对蓝牙集群中的待升级设备进行升级。从而提高了蓝牙集群的升级成功率,缩短了升级耗时。本申请采用的蓝牙集群在线升级方法进一步拓宽了蓝牙的通信范围,无需用户一对一操作,节省了操作时间,并且,利用现有的蓝 牙集群中蓝牙设备之间的连接发送升级数据,一方面升级设备不需要多次发送升级数据,解决了因多个蓝牙设备同时访问升级设备造成的数据拥挤问题,另一方面,由于大部分蓝牙设备的升级数据都不需要直接向升级设备获取,升级数据传递所经过的蓝牙设备数量明显变少,使得在蓝牙集群规模大、层数多的情况下,升级耗时显著减少。并且,仅仅在升级设备端操作就可以完成对蓝牙集群中多个蓝牙设备的升级,为用户提供更加简便、更加高效的服务。
本申请实施例还可提供一种升级设备,用于执行前述实施例中提出的一种蓝牙集群在线升级方法,图10为本实施例提供的升级设备的结构示意图,该设备可以执行上述图2至图8所示的方法,如图10所示,该升级设备30包括:
第一连接模块31:用于在蓝牙集群中选择中心节点,并建立与中心节点的蓝牙连接;
升级模块32:用于选择升级路径,按照升级路径通过中心节点发送升级数据给待升级设备,以使待升级设备获取升级数据实现升级,待升级设备为蓝牙集群中的一部分或者全部蓝牙设备。
可选的,所述装置还包括:
第二连接模块:用于在第一连接模块在蓝牙集群中选择中心节点之前,与蓝牙集群中已打开广播的蓝牙设备建立连接;
第一发送模块:用于通过与第二连接模块连接的蓝牙设备向蓝牙集群中未打开广播的蓝牙设备发送打开广播的指令;
扫描模块:用于更新扫描到的蓝牙设备。
可选的,第一连接模块还包括:
第一选择子模块:用于根据扫描模块扫描到的蓝牙设备的接收功率的强弱,选择接收功率最强的一个或多个蓝牙设备作为蓝牙集群的中心节点;或者用于根据扫描模块扫描到的蓝牙设备连接的下一级蓝牙设备数目,选择连接的下一级蓝牙设备数目最多的一个或多个蓝牙设备作为蓝牙集群的中心节点。
可选的,升级设备还包括:
第二发送模块:用于在第一连接模块建立与中心节点的蓝牙连接 之后,通过中心节点发送设备信息请求指令给蓝牙集群中的全部蓝牙设备;
第一接收模块:用于接收中心节点发送的全部蓝牙设备的设备信息;
第二选择模块:用于确定待升级设备。
另外,升级模块包括:
查询子模块:用于以中心节点为中心向外层查询,为所有待升级设备确定前序蓝牙设备;以及
路径生成子模块,用于根据待升级设备及其对应的前序蓝牙设备生成升级路径。
可选的,查询子模块包括:
前序蓝牙设备确定单元,用于根据中心节点到待升级设备的连接代价,从待升级设备中选择一个或多个连接代价最小的待升级设备作为第一设备,第一设备之外的待升级设备为第二设备;记录对应的中心节点为连接代价最小的待升级设备的前序蓝牙设备;根据中心节点与第一设备到第二设备的连接代价,从第二设备中选择一个或多个连接代价最小的待升级设备加入第一设备,并记录对应的第一设备为连接代价最小的待升级设备的前序蓝牙设备;重复上一步骤直到为全部待升级设备确定前序蓝牙设备。
可选的,升级模块还包括:
设置子模块:用于将升级路径设置到升级数据中;
或者升级模块还用于,将升级路径通过中心节点发送给待升级设备。
本申请实施例提供了一种升级设备,依据蓝牙集群中蓝牙设备之间的连接关系,选择中心节点与升级设备建立蓝牙连接传送升级数据,同时选择升级路径并按照升级路径对蓝牙集群中的待升级设备进行升级。从而提高了蓝牙集群的升级成功率,缩短了升级耗时。本申请采用的蓝牙集群在线升级方法进一步拓宽了蓝牙的通信范围,无需用户一对一操作,节省了操作时间,并且,利用现有的蓝牙集群中蓝牙设备之间的连接发送升级数据,一方面升级设备不需要多次发送升级 数据,解决了因多个蓝牙设备同时访问升级设备造成的数据拥挤问题,另一方面,由于大部分蓝牙设备的升级数据都不需要直接向升级设备获取,升级数据传递所经过的蓝牙设备数量明显变少,使得在蓝牙集群规模大、层数多的情况下,升级耗时显著减少。并且,仅仅在升级设备端操作就可以完成对蓝牙集群中多个蓝牙设备的升级,为用户提供更加简便、更加高效的服务。本申请实施例还可提供一种蓝牙设备,用于执行前述实施例提出的一种蓝牙集群的在线升级方法,图11为本实施例提供的蓝牙设备的结构示意图,该蓝牙设备可以执行上述图9所示的方法,如图11所示,该蓝牙设备40包括:
第二接收模块41:用于接收升级数据和升级路径,升级路径中包括升级设备确定的待升级设备及其对应的前序蓝牙设备,待升级设备为蓝牙集群中的一部分或者全部蓝牙设备;
第三发送模块42:用于将升级数据和升级路径发送给升级路径中的下一级待升级设备;
第三接收模块43:用于接收升级路径中的下一级蓝牙设备发送的升级结果信息;以及
第四发送模块44:用于将升级结果信息发送给蓝牙设备的前序蓝牙设备或者升级设备;
可选的,蓝牙设备还包括:
第四接收模块:用于在第一接收模块接收升级数据和升级路径之前,接收与蓝牙设备连接的上一级蓝牙设备或升级设备发送的设备信息请求指令;
第五发送模块:用于将设备信息请求指令发送给与蓝牙设备连接的下一级蓝牙设备;
第五接收模块,用于接收与蓝牙设备连接的下一级蓝牙设备发送的设备信息;以及
第六发送模块,用于将设备信息发送给升级设备,或者将设备信息和蓝牙设备自身的设备信息发送给与蓝牙设备连接的上一级蓝牙设备。
可选的,蓝牙设备还包括:升级执行模块,用于在第二发送模块 将升级结果信息发送给蓝牙设备的前序蓝牙设备或者升级设备之后,依照升级数据对蓝牙设备执行升级;以及
第七发送模块,用于依照升级路径将蓝牙设备的升级结果信息发送给蓝牙设备对应的前序蓝牙设备或者升级设备。
本申请实施例提供了一种蓝牙设备,依据蓝牙集群中蓝牙设备之间的连接关系,选择中心节点与升级设备建立蓝牙连接传送升级数据,同时选择升级路径并按照升级路径对蓝牙集群中的待升级设备进行升级。从而提高了蓝牙集群的升级成功率,缩短了升级耗时。本申请采用的蓝牙集群在线升级方法进一步拓宽了蓝牙的通信范围,无需用户一对一操作,节省了操作时间,并且,利用现有的蓝牙集群中蓝牙设备之间的连接发送升级数据,一方面升级设备不需要多次发送升级数据,解决了因多个蓝牙设备同时访问升级设备造成的数据拥挤问题,另一方面,由于大部分蓝牙设备的升级数据都不需要直接向升级设备获取,升级数据传递所经过的蓝牙设备数量明显变少,使得在蓝牙集群规模大、层数多的情况下,升级耗时显著减少。并且,仅仅在升级设备端操作就可以完成对蓝牙集群中多个蓝牙设备的升级,为用户提供更加简便、更加高效的服务。
本申请实施例还可提供一种升级设备,用于执行实施例提出的一种蓝牙集群在线升级方法,如图12所示,该设备50包括:存储器51和处理器52;
存储器51与处理器52耦合;
存储器51,用于存储程序指令;
处理器52,用于调用存储器存储的程序指令,使得升级设备执行蓝牙集群在线升级方法。
本申请实施例提供的升级设备,可执行上述任一所述实施例提供的升级设备执行的蓝牙集群在线升级方法,其具体的实现过程及有益效果参见上述,在此不再赘述。
本申请实施例还可提供一种蓝牙设备,用于执行实施例提出的一种蓝牙集群在线升级方法,如图13所示,该设备60包括:存储器61和处理器62;
存储器61与处理器62耦合;
存储器61,用于存储程序指令;
处理器62,用于调用存储器存储的程序指令,使得蓝牙设备执行蓝牙集群在线升级方法。
本申请实施例提供的蓝牙设备,可执行上述任一所述实施例提供的蓝牙设备执行的蓝牙集群在线升级方法,其具体的实现过程及有益效果参见上述,在此不再赘述。
本申请实施例还可提供一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器52执行时实现执行升级设备执行的蓝牙集群在线升级方法。
本申请实施例提供的计算机可读存储介质,可执行上述任一所述实施例提供的升级设备执行的蓝牙集群在线升级方法,其具体的实现过程及有益效果参见上述,在此不再赘述。
本申请实施例还可提供一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器62执行时实现执行蓝牙设备执行的蓝牙集群在线升级方法。
本申请实施例提供的计算机可读存储介质,可执行上述任一所述实施例提供的蓝牙设备执行的蓝牙集群在线升级方法,其具体的实现过程及有益效果参见上述,在此不再赘述。
应注意,本申请上述方法实施例可以应用于处理器中,或者由处理器实现。处理器可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或 者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。
可以理解,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable rom,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。应注意,本文描述的系统和方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
应理解,在本申请实施例中,“与A相应的B”表示B与A相关联,根据A可以确定B。但还应理解,根据A确定B并不意味着仅仅根据A确定B,还可以根据A和/或其它信息确定B。
另外,本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和 电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器 (random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (24)

  1. 一种蓝牙集群在线升级方法,其特征在于,包括:
    升级设备在蓝牙集群中选择中心节点,建立与所述中心节点的蓝牙连接;
    所述升级设备选择升级路径,按照所述升级路径通过所述中心节点发送升级数据给待升级设备,以使所述待升级设备获取所述升级数据实现升级,所述待升级设备为所述蓝牙集群中的一部分或者全部蓝牙设备。
  2. 根据权利要求1所述的一种蓝牙集群在线升级方法,其特征在于,所述升级设备在蓝牙集群中选择中心节点之前,还包括:
    所述升级设备与所述蓝牙集群中已打开广播的蓝牙设备建立连接;
    所述升级设备通过与其连接的蓝牙设备向所述蓝牙集群中未打开广播的蓝牙设备发送打开广播的指令;
    所述升级设备更新扫描到蓝牙设备。
  3. 根据权利要求2所述的一种蓝牙集群在线升级方法,其特征在于,所述升级设备在蓝牙集群中选择中心节点的方法包括:
    根据所述升级设备扫描到的蓝牙设备的接收功率的强弱,所述升级设备选择接收功率最强的一个或多个蓝牙设备作为所述蓝牙集群的中心节点;或者
    根据所述升级设备扫描到的蓝牙设备连接的下一级蓝牙设备的数目,所述升级设备选择连接的下一级蓝牙设备数目最多的一个或多个蓝牙设备作为所述蓝牙集群的中心节点。
  4. 根据权利要求1至3中任一项所述的一种蓝牙集群在线升级方法,其特征在于,所述升级设备建立与所述中心节点的蓝牙连接之后,还包括:
    所述升级设备通过所述中心节点发送设备信息请求指令给所述蓝牙集群中的全部蓝牙设备;
    所述升级设备接收所述中心节点发送的所述全部蓝牙设备的设备信息;
    所述升级设备确定所述待升级设备。
  5. 根据权利要求1至4中任一项所述的一种蓝牙集群在线升级方法,其特征在于,所述升级设备选择升级路径的方法包括:
    所述升级设备以所述中心节点为中心向外层查询,为所述待升级设备确定前序蓝牙设备;
    所述升级设备根据所述待升级设备及其对应的前序蓝牙设备生成所述升级路径。
  6. 根据权利要求5所述的一种蓝牙集群在线升级方法,其特征在于,所述升级设备以所述中心节点为中心向外层查询,为所述待升级设备确定前序蓝牙设备,包括:
    根据所述中心节点到所述待升级设备的连接代价,从所述待升级设备中选择一个或多个所述连接代价最小的待升级设备作为第一设备,并记录对应的中心节点为所述连接代价最小的待升级设备的前序蓝牙设备,所述第一设备之外的待升级设备为第二设备;
    根据所述中心节点或所述第一设备到所述第二设备的连接代价,从所述第二设备中选择一个或多个所述连接代价最小的待升级设备加入所述第一设备,并记录对应的第一设备为所述连接代价最小的待升级设备的前序蓝牙设备;
    重复上一步骤直到为所述全部待升级设备确定前序蓝牙设备。
  7. 根据权利要求1至6中任一项所述的一种蓝牙集群在线升级方法,其特征在于,所述升级设备选择所述升级路径之后,还包括:
    所述升级设备将所述升级路径设置到所述升级数据中;或者
    所述升级设备将所述升级路径通过所述中心节点发送给所述待升级设备。
  8. 一种蓝牙集群在线升级方法,其特征在于,包括:
    蓝牙设备接收升级数据和升级路径,所述升级路径中包括升级设备确定的待升级设备及其对应的前序蓝牙设备的信息,所述待升级设备为蓝牙集群中的一部分或者全部蓝牙设备;
    所述蓝牙设备将所述升级数据和升级路径发送给所述升级路径中的下一级待升级设备;
    所述蓝牙设备收到所述升级路径中的下一级蓝牙设备发送的升 级结果信息,并将所述升级结果信息发送给所述蓝牙设备的前序蓝牙设备或者所述升级设备。
  9. 根据权利要求8所述的一种蓝牙集群在线升级方法,其特征在于,在所述蓝牙设备接收升级数据和升级路径之前,还包括:
    所述蓝牙设备接收与其连接的上一级蓝牙设备或所述升级设备发送的设备信息请求指令,并将所述设备信息请求指令发送给与其连接的下一级蓝牙设备;
    所述蓝牙设备接收所述与其连接的下一级蓝牙设备发送的设备信息,并将所述设备信息和所述蓝牙设备自身的设备信息发送给所述升级设备或与其连接的上一级蓝牙设备。
  10. 根据权利要求8或9中所述的一种蓝牙集群在线升级方法,其特征在于,在所述蓝牙设备将所述升级结果信息发送给所述蓝牙设备的前序蓝牙设备或者所述升级设备之后,还包括:
    所述蓝牙设备使用所述升级数据执行升级;
    所述蓝牙设备依照所述升级路径将其升级结果信息发送给所述蓝牙设备对应的前序蓝牙设备或者所述升级设备。
  11. 一种升级设备,用于蓝牙集群的在线升级,所述升级设备包括:
    第一连接模块,用于在蓝牙集群中选择中心节点,并建立与所述中心节点的蓝牙连接;以及
    升级模块,用于选择升级路径,按照所述升级路径通过所述中心节点发送升级数据给待升级设备,以使所述待升级设备获取所述升级数据实现升级,所述待升级设备为所述蓝牙集群中的一部分或者全部蓝牙设备。
  12. 根据权利要求11所述的一种升级设备,其特征在于,所述升级设备还包括:
    第二连接模块,用于在所述第一连接模块在蓝牙集群中选择中心节点之前,与所述蓝牙集群中已打开广播的蓝牙设备建立连接;
    第一发送模块,用于通过与所述第二连接模块连接的蓝牙设备向所述蓝牙集群中未打开广播的蓝牙设备发送打开广播的指令;
    扫描模块,用于更新扫描到的蓝牙设备。
  13. 根据权利要求12所述的一种升级设备,其特征在于,所述第一连接模块还包括:
    第一选择子模块,用于根据所述扫描模块扫描到的蓝牙设备的接收功率的强弱,选择接收功率最强的一个或多个蓝牙设备作为所述蓝牙集群的中心节点;或者
    用于根据所述扫描模块扫描到的蓝牙设备连接的下一级蓝牙设备数目,选择连接的下一级蓝牙设备数目最多的一个或多个蓝牙设备作为所述蓝牙集群的中心节点。
  14. 根据权利要求11至13中任一项所述的一种升级设备,其特征在于,所述升级设备还包括:
    第二发送模块,用于在所述第一连接模块建立与所述中心节点的蓝牙连接之后,通过所述中心节点发送设备信息请求指令给所述蓝牙集群中的全部蓝牙设备;
    第一接收模块,用于接收所述中心节点发送的所述全部蓝牙设备的设备信息;以及
    第二选择模块,用于确定所述待升级设备。
  15. 根据权利要求11至14中任一项所述的一种升级设备,其特征在于,所述升级模块包括:
    查询子模块,用于以所述中心节点为中心向外层查询,为所有待升级设备确定前序蓝牙设备;以及
    路径生成子模块,用于根据所述待升级设备及其对应的前序蓝牙设备生成所述升级路径。
  16. 根据权利要求15所述的一种升级设备,其特征在于,所述查询子模块包括:
    前序蓝牙设备确定单元,用于根据所述中心节点到所述待升级设备的连接代价,从所述待升级设备中选择一个或多个所述连接代价最小的待升级设备作为第一设备,所述第一设备之外的待升级设备为第二设备;记录对应的中心节点为所述连接代价最小的待升级设备的前序蓝牙设备;根据所述中心节点与所述第一设备到所述第二设备的连 接代价,从所述第二设备中选择一个或多个所述连接代价最小的待升级设备加入所述第一设备,并记录对应的第一设备为所述连接代价最小的待升级设备的前序蓝牙设备;重复上一步骤直到为所述全部待升级设备确定前序蓝牙设备。
  17. 根据权利要求11至16中任一项所述的一种升级设备,其特征在于,所述升级模块还包括:
    设置子模块,用于将升级路径设置到所述升级数据中;或者
    所述升级模块还用于,将所述升级路径通过所述中心节点发送给所述待升级设备。
  18. 一种蓝牙设备,用于蓝牙集群的在线升级,其特征在于,所述蓝牙设备包括:
    第二接收模块,用于接收升级数据和升级路径,所述升级路径中包括升级设备确定的待升级设备及其对应的前序蓝牙设备,所述待升级设备为蓝牙集群中的一部分或者全部蓝牙设备;
    第三发送模块,用于将所述升级数据和升级路径发送给所述升级路径中的下一级待升级设备;
    第三接收模块,用于接收所述升级路径中的下一级蓝牙设备发送的升级结果信息;以及
    第四发送模块,用于将所述升级结果信息发送给所述蓝牙设备的前序蓝牙设备或者所述升级设备。
  19. 根据权利要求18中所述的一种蓝牙设备,其特征在于,所述蓝牙设备还包括:
    第四接收模块,用于在所述第一接收模块接收升级数据和升级路径之前,接收与所述蓝牙设备连接的上一级蓝牙设备或所述升级设备发送的设备信息请求指令;
    第五发送模块,用于将所述设备信息请求指令发送给与所述蓝牙设备连接的下一级蓝牙设备;
    第五接收模块,用于接收与所述蓝牙设备连接的下一级蓝牙设备发送的设备信息;以及
    第六发送模块,用于将所述设备信息发送给所述升级设备,或者 将所述设备信息和所述蓝牙设备自身的设备信息发送给与所述蓝牙设备连接的上一级蓝牙设备。
  20. 根据权利要求18或19所述的蓝牙设备,其特征在于,所述蓝牙设备还包括:
    升级执行模块,用于在所述第二发送模块将所述升级结果信息发送给所述蓝牙设备的前序蓝牙设备或者所述升级设备之后,依照所述升级数据对所述蓝牙设备执行升级;以及
    第七发送模块,用于依照所述升级路径将所述蓝牙设备的升级结果信息发送给所述蓝牙设备对应的前序蓝牙设备或者所述升级设备。
  21. 一种升级设备,用于蓝牙集群的在线升级,其特征在于,包括:存储器和处理器;
    所述存储器与所述处理器耦合;
    所述存储器,用于存储程序指令;
    所述处理器,用于调用所述存储器存储的程序指令,使得所述升级设备执行上述权利要求1至7中任一项所述的蓝牙集群在线升级方法。
  22. 一种蓝牙设备,用于蓝牙集群的在线升级,其特征在于,包括:存储器和处理器;
    所述存储器与所述处理器耦合;
    所述存储器,用于存储程序指令;
    所述处理器,用于调用所述存储器存储的程序指令,使得所述蓝牙设备执行上述权利要求8到10中任一项所述的蓝牙集群在线升级方法。
  23. 一种计算机可读存储介质,其特征在于,包括:其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现上述权利要求1至7中任一项所述的蓝牙集群在线升级方法。
  24. 一种计算机可读存储介质,其特征在于,包括:其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现上述权利要求8到10中任一项所述的蓝牙集群在线升级方法。
PCT/CN2018/106045 2018-09-17 2018-09-17 一种蓝牙集群在线升级方法及装置 WO2020056558A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN201880001873.0A CN109417691B (zh) 2018-09-17 2018-09-17 一种蓝牙集群在线升级方法及装置
PCT/CN2018/106045 WO2020056558A1 (zh) 2018-09-17 2018-09-17 一种蓝牙集群在线升级方法及装置
EP18917576.3A EP3651485B1 (en) 2018-09-17 2018-09-17 Bluetooth cluster online upgrade method and apparatus
US16/680,379 US11321070B2 (en) 2018-09-17 2019-11-11 Online upgrade method and apparatus for Bluetooth cluster

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/106045 WO2020056558A1 (zh) 2018-09-17 2018-09-17 一种蓝牙集群在线升级方法及装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/680,379 Continuation US11321070B2 (en) 2018-09-17 2019-11-11 Online upgrade method and apparatus for Bluetooth cluster

Publications (1)

Publication Number Publication Date
WO2020056558A1 true WO2020056558A1 (zh) 2020-03-26

Family

ID=65462123

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/106045 WO2020056558A1 (zh) 2018-09-17 2018-09-17 一种蓝牙集群在线升级方法及装置

Country Status (4)

Country Link
US (1) US11321070B2 (zh)
EP (1) EP3651485B1 (zh)
CN (1) CN109417691B (zh)
WO (1) WO2020056558A1 (zh)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114339706A (zh) * 2019-03-06 2022-04-12 乐鑫信息科技(上海)股份有限公司 在蓝牙Mesh网络中对多个待配网设备进行启动配置的方法
CN110264700A (zh) * 2019-06-28 2019-09-20 上海钧正网络科技有限公司 一种ble信标组网电子围栏及车辆监管方法
CN112039736A (zh) * 2020-08-14 2020-12-04 深圳市欧瑞博科技股份有限公司 智能设备的升级方法、装置、智能家居系统及电子设备
CN111917595A (zh) * 2020-08-14 2020-11-10 深圳市欧瑞博科技股份有限公司 系统升级方法、装置、智能设备以及存储介质
CN113225679A (zh) * 2020-09-09 2021-08-06 深圳市芯中芯科技有限公司 一种基于软件app技术的蓝牙设备固件升级数据传输方法
CN112527347B (zh) * 2020-11-28 2024-03-29 武汉蓝星科技股份有限公司 电子设备升级方法及系统
CN112689233A (zh) * 2020-12-29 2021-04-20 北京百瑞互联技术有限公司 一种蓝牙音频收发方法、蓝牙视听系统及存储介质
CN112910707A (zh) * 2021-02-04 2021-06-04 四川长虹电器股份有限公司 一种基于蓝牙ble的智能家居升级系统及方法
CN113950118B (zh) * 2021-10-14 2023-04-28 四川九州电子科技股份有限公司 基于Mesh的软件升级方法
CN114679439A (zh) * 2021-12-31 2022-06-28 诺领科技(南京)有限公司 一种用于物联网基于蓝牙ble的辅助下载升级包方法
CN114827967B (zh) * 2022-03-10 2023-08-01 上海富芮坤微电子有限公司 软件更新方法、蓝牙设备及存储介质
CN114785688B (zh) * 2022-06-21 2022-09-06 深圳市华曦达科技股份有限公司 一种终端设备升级方法及系统
CN115941449A (zh) * 2022-12-02 2023-04-07 合肥龙旗智能科技有限公司 一种批量固件升级的方法及其系统
CN117640279B (zh) * 2024-01-26 2024-05-07 深圳市迈腾电子有限公司 一种基于物联网的分布式智能家居控制方法及系统
CN118295685B (zh) * 2024-06-04 2024-08-27 浙江恒业电子股份有限公司 一种广播式升级方法及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104168145A (zh) * 2014-08-25 2014-11-26 深圳市有方科技有限公司 一种对无线通信单元进行无线升级的系统和方法
CN106681774A (zh) * 2016-12-30 2017-05-17 Tcl通力电子(惠州)有限公司 蓝牙扬声器的软件升级方法及智能终端
CN107041171A (zh) * 2016-11-25 2017-08-11 深圳市汇顶科技股份有限公司 低功耗蓝牙ble设备、数据更新系统及方法
CN107241680A (zh) * 2017-04-27 2017-10-10 北京摩拜科技有限公司 用于多个车辆的通信方法、车辆及服务器
CN107360636A (zh) * 2017-07-18 2017-11-17 广东欧珀移动通信有限公司 一种数据传输方法、装置、终端及计算机可读存储介质

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9134353B2 (en) * 2009-02-26 2015-09-15 Distributed Energy Management Inc. Comfort-driven optimization of electric grid utilization
EP2400812B1 (en) * 2010-06-24 2019-11-27 9Solutions Oy Bluetooth networking
CN104184785B (zh) * 2013-09-12 2017-10-24 中国林业科学研究院资源信息研究所 基于云平台的林业物联网系统
US9882804B2 (en) * 2013-09-26 2018-01-30 Cisco Technology, Inc. Co-existence of a distributed routing protocol and centralized path computation for deterministic wireless networks
CN103927233A (zh) * 2014-04-30 2014-07-16 无锡云动科技发展有限公司 多节点内存互联装置及一种大规模计算机集群
CN105430048B (zh) * 2015-10-29 2020-02-18 努比亚技术有限公司 一种基于多集群的消息投递系统和消息投递方法
US10541868B2 (en) * 2017-02-24 2020-01-21 Quanta Computer Inc. System and method for automatically updating bios setup options

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104168145A (zh) * 2014-08-25 2014-11-26 深圳市有方科技有限公司 一种对无线通信单元进行无线升级的系统和方法
CN107041171A (zh) * 2016-11-25 2017-08-11 深圳市汇顶科技股份有限公司 低功耗蓝牙ble设备、数据更新系统及方法
CN106681774A (zh) * 2016-12-30 2017-05-17 Tcl通力电子(惠州)有限公司 蓝牙扬声器的软件升级方法及智能终端
CN107241680A (zh) * 2017-04-27 2017-10-10 北京摩拜科技有限公司 用于多个车辆的通信方法、车辆及服务器
CN107360636A (zh) * 2017-07-18 2017-11-17 广东欧珀移动通信有限公司 一种数据传输方法、装置、终端及计算机可读存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3651485A4 *

Also Published As

Publication number Publication date
US20200089489A1 (en) 2020-03-19
EP3651485A1 (en) 2020-05-13
US11321070B2 (en) 2022-05-03
CN109417691A (zh) 2019-03-01
EP3651485A4 (en) 2020-05-13
CN109417691B (zh) 2021-11-16
EP3651485B1 (en) 2021-09-01

Similar Documents

Publication Publication Date Title
WO2020056558A1 (zh) 一种蓝牙集群在线升级方法及装置
US11716680B2 (en) PDU type setting method, UE policy setting method, and related entity
WO2021063059A1 (zh) 一种组网方法、装置、蓝牙设备及计算机可读介质
WO2018196643A1 (zh) 一种私有数据云存储系统及私有数据云存储方法
CN111885680A (zh) 一种建立网络连接的方法、系统及核心设备
CN105191405A (zh) 用于无线通信设备从源ap漫游到目标ap的ip地址续订
CN113141671B (zh) wifi设备的通信方法、设备和计算机可读存储介质
JP2013255219A (ja) インターネットにアクセスする方法および装置
US20220263879A1 (en) Multicast session establishment method and network device
WO2022142933A1 (zh) 无线接入点的入网方法、系统、ap及存储介质
WO2022183350A1 (zh) 物联网设备配网方法、终端设备和物联网设备
US20200336385A1 (en) BGP Logical Topology Generation Method, and Device
CN109981462B (zh) 一种报文处理方法及装置
WO2023040678A1 (zh) 信息传输方法、装置、电子设备、芯片、存储介质、程序及程序产品
CN114667720A (zh) 配置设备更换方法、装置、设备及存储介质
CN112433480B (zh) 智能家居系统及其控制方法以及设备
CN114125883B (zh) 智能设备的入网方法、装置、电子设备及存储介质
WO2018058385A1 (zh) 一种网络互通方法、网元及系统
CN109768905A (zh) 一种PPPoE报文传输的方法、系统、设备及存储介质
CN113660734B (zh) 一种网络设备的连接方法、装置、网络设备和介质
WO2023246368A1 (zh) Tsn网络的桥接方法、装置、电子设备及存储介质
CN111278011B (zh) 一种智能音箱的配网方法及智能音箱
WO2024164822A1 (zh) 联合学习方法、装置、相关设备及存储介质
CN114340037B (zh) 一种LoRaWAN设备间通信方法、系统、设备及介质
WO2024016179A1 (zh) 路径选择方法及装置、设备、存储介质

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2018917576

Country of ref document: EP

Effective date: 20191112

ENP Entry into the national phase

Ref document number: 2018917576

Country of ref document: EP

Effective date: 20191112

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

Ref document number: 18917576

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE