WO2021115193A1 - 一种设备组网方法、电子设备及系统 - Google Patents

一种设备组网方法、电子设备及系统 Download PDF

Info

Publication number
WO2021115193A1
WO2021115193A1 PCT/CN2020/133591 CN2020133591W WO2021115193A1 WO 2021115193 A1 WO2021115193 A1 WO 2021115193A1 CN 2020133591 W CN2020133591 W CN 2020133591W WO 2021115193 A1 WO2021115193 A1 WO 2021115193A1
Authority
WO
WIPO (PCT)
Prior art keywords
type
electronic device
master
network
electronic
Prior art date
Application number
PCT/CN2020/133591
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 EP20900056.1A priority Critical patent/EP4044755A4/en
Publication of WO2021115193A1 publication Critical patent/WO2021115193A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/44Star or tree networks
    • 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
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0212Power saving arrangements in terminal devices managed by the network, e.g. network or access point is master and terminal is slave
    • H04W52/0216Power saving arrangements in terminal devices managed by the network, e.g. network or access point is master and terminal is slave using a pre-established activity schedule, e.g. traffic indication frame
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0225Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal
    • H04W52/0229Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal where the received signal is a wanted signal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0261Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
    • H04W52/0274Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level by switching on or off the equipment or parts thereof
    • H04W52/028Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level by switching on or off the equipment or parts thereof switching on or off only a part of the equipment circuit blocks
    • 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

Definitions

  • This application relates to the field of communication technology, and in particular to a device networking method, electronic device and system.
  • a user or family often has multiple electronic devices that can communicate with each other.
  • Various electronic devices generally have their own device characteristics. For example, mobile phones are more portable, TV screens display better, and speakers have better sound quality.
  • multiple electronic devices can be networked, so that multiple electronic devices can be interconnected for collaborative work.
  • a certain preset electronic device such as a TV, a router, or a mobile phone
  • each electronic device except the master device can be used as a slave device to establish a communication connection (such as a Bluetooth connection, a Wi-Fi connection, etc.) with the master device to form a local area network with a star topology structure.
  • a communication connection such as a Bluetooth connection, a Wi-Fi connection, etc.
  • the master device as a central node can be used to manage and control each slave device in the local area network to complete the corresponding work tasks.
  • the main device in the network is disconnected, faulty, or power-off, the main device cannot continue to manage and control each slave device in the network, causing the entire network to not work normally, and the user experience is also reduced. .
  • This application provides a device networking method, electronic device, and system, which can extend the duration of the network and the stability of the network after networking, and improve the user experience.
  • this application provides a device networking method, including: a first device determines a second device as a master device in a communication system, where the second device is a first type device, and the first device is a second type device A device, the first type of device is a device (such as a router) powered by an external power source, and the second type of device is a device (such as a mobile phone) that uses battery power; further, the first device can be used as a slave device to establish a communication connection with the second device; When the second device is abnormal (that is, the current main device is abnormal), the first device can determine the third device as the new main device in the above-mentioned communication system, and the third device is the above-mentioned second-type device; A device can be used as a slave device to establish a communication connection with a third device (that is, a new master device).
  • the first type of equipment can be prioritized as the main equipment in the communication system to form a star structure network to ensure the duration of the network and the stability of the network
  • the main equipment can be migrated from the first type of equipment to the second type of equipment, so as to dynamically adjust the main equipment in the network to ensure that the duration of the network and the stability of the network are maximized excellent.
  • determining the second device as the master device in the communication system of the first device includes: the first device queries whether the communication system contains the first type device; if the first type device is included, Then the first device determines the second device as the master device in the first type of device. There may be one or more devices of the first type in the communication system, or the communication system may not include the devices of the first type.
  • a device information list is stored in the first device, and the device information list of each device in the communication system is recorded in the device information list, for example, the device type of each device; at this time, the first device queries Whether the above-mentioned communication system includes the first-type device includes: the first device can query whether the first-type device is included in the current communication system according to the device type of each device in its device information list.
  • the first device determines the second device in the first type of device as the master device, including: if the first type of device only includes the second device, it means that the current communication system only includes one first device. If a device of one type, the first device can determine the second device as the master device; if the device of the first type includes multiple devices, the first device can select from multiple devices of the first type according to a preset master device decision algorithm The second device is selected as the main device.
  • the first type of electronic equipment when the equipment is networked in the communication system, when the communication system contains the first type of electronic equipment, the first type of electronic equipment can be selected as the master device in the network.
  • the probability of abnormal situations such as power failure is low, which can ensure the stability of the entire network after networking.
  • the power consumption of the second type of electronic device in the network can be reduced, thereby extending the duration of the entire network after networking.
  • the first device determines the third device as the new master device in the above-mentioned communication system, including: when the second device is abnormal, the first device queries Whether the current communication system includes the first type device; if the first type device is not included, the first device determines the third device as the new master device in the second type device. There may be one or more devices of the second type in the communication system, or the communication system may not include the device of the second type.
  • the first device determines the third device as the new master device in the second type device, including: the first device determines the device information of the second type device according to the device information of the second type device recorded in the device information list.
  • the third device is determined to be the new master device.
  • the third device may be a device of the second type of device whose power is greater than the power threshold; and/or, the third device may be a device of the second type of devices whose wake-up time is greater than the time threshold; and/or, the third device It may be a device whose wake-up frequency is greater than the frequency threshold among the second type of devices.
  • the second type of electronic equipment can be used according to the wake-up time and power of each second type of electronic equipment.
  • the preferential selection of other parameters is conducive to the use of electronic devices with low power consumption and long network duration as the main device during networking, so as to ensure the stability of the entire network after networking.
  • the method further includes: the first device periodically sends the device information of the first device to the second device, and sends the device information from the second device to the second device.
  • the first device periodically sends the device information of the first device to the second device, and sends the device information from the second device to the second device.
  • the device information list stored in each slave device in the communication network is synchronized with the device information list stored in the current master device, and both are in the latest state.
  • each slave device can re-elect the master device for networking based on the latest device information list.
  • the period during which the first device sends device information to the second device may be set to be the same as the heartbeat period of the first device. In this way, the number of awakenings of the first device from the sleep state to the awakening state can be reduced, and the power consumption of the first device can be reduced.
  • the method further includes: if the first device receives a master device exception message sent by other slave devices in the communication system, then the first device The device can determine that the second device (that is, the current main device) is abnormal; or, if the first device detects that the communication connection with the second device is disconnected (for example, the first device detects the communication with the second device) Connection timeout), the first device can determine that the second device (that is, the current main device) is abnormal, thereby triggering each electronic device in the communication network to start reselecting a new main device for networking.
  • the method further includes: if the first device receives the master device migration message sent by the third device, it indicates that the third device is now If it is no longer suitable for the main device to continue to operate, the first device can re-determine a new main device for networking in the current communication system.
  • the first device acts as a slave device and establishes a communication connection with the second device, it further includes: when the second device (ie, the current master device) is abnormal, the first device can also connect itself Determined as the new master device in the current communication system, for example, when the first device is the second type device with the highest power in the current communication system, it can be determined as the new master device in the current communication system; further, the first device It can be used as the main device to establish communication connections with other devices in the communication system to form a star topology network.
  • the second device ie, the current master device
  • the first device can also connect itself Determined as the new master device in the current communication system, for example, when the first device is the second type device with the highest power in the current communication system, it can be determined as the new master device in the current communication system; further, the first device It can be used as the main device to establish communication connections with other devices in the communication system to form a star topology network.
  • the method further includes: the first device detects whether its operating state meets the preset master device migration condition; Set the master device migration condition, which means that the first device is no longer suitable for the master device to continue operating at this time, then the first device can send master device migration messages to other devices in the communication system, thereby triggering each electronic device in the communication network to start Reselect the new main device for networking.
  • the foregoing master device migration condition includes: the power of the master device is less than the power threshold; and/or the wake-up time of the master device is less than the time threshold; and/or the wake-up frequency of the master device is less than the frequency threshold.
  • the second type of device when the second type of device operates as the main device in the communication network, the second type of device can detect in real time whether its operating state is suitable for continuing to work as the main device, and if it is no longer suitable for continuing to work as the main device, then The electronic equipment in the communication network can be triggered to re-select the optimal electronic equipment as the new main equipment for networking and operation, thereby dynamically adjusting the main equipment in the network to optimize the stability of the network and the duration of the network.
  • the present application provides an electronic device, including: one or more processors, one or more memories, a communication module, and one or more computer programs; wherein the processor is coupled with the touch screen, the communication module, and the memory
  • the above-mentioned one or more computer programs are stored in a memory, and when the electronic device is running, the processor executes the one or more computer programs stored in the memory, so that the electronic device executes any of the above-mentioned device networking method.
  • this application provides a communication system, including one or more first-type devices and one or more second-type devices.
  • the first-type devices are devices powered by an external power source, and the second-type devices are batteries that use batteries. Power-supplying equipment; when the first equipment is a second type equipment, the first equipment can perform any of the above-mentioned equipment networking methods.
  • the present application provides a computer-readable storage medium, including computer instructions, which when the computer instructions run on an electronic device, cause the electronic device to execute the device networking method described in any one of the above.
  • the present application provides a computer program product, which when the computer program product runs on an electronic device, causes the electronic device to execute the device networking method described in any one of the above.
  • the electronic equipment described in the second aspect, the communication system described in the third aspect, the computer-readable storage medium described in the fourth aspect, and the computer program product described in the fifth aspect provided above are all used for The corresponding method provided above is executed. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects of the corresponding method provided above, which will not be repeated here.
  • FIG. 1 is a schematic diagram of the architecture of a communication system provided by an embodiment of this application.
  • FIG. 2 is a schematic structural diagram 1 of an electronic device provided by an embodiment of the application.
  • FIG. 3 is a schematic flowchart of a device networking method provided by an embodiment of this application.
  • FIG. 4 is a schematic diagram 1 of an application scenario of a device networking method provided by an embodiment of this application;
  • FIG. 5 is a schematic diagram 2 of an application scenario of a device networking method provided by an embodiment of this application;
  • FIG. 6 is a third schematic diagram of an application scenario of a device networking method provided by an embodiment of this application.
  • FIG. 7 is a fourth schematic diagram of an application scenario of a device networking method provided by an embodiment of this application.
  • FIG. 8 is a second structural diagram of an electronic device provided by an embodiment of this application.
  • the device networking method provided by the embodiment of the present application may be applied to the communication system 100 shown in FIG. 1, and the communication system 100 may include N (N is an integer greater than 1) electronic devices.
  • the above-mentioned electronic device may specifically be a first type of electronic device, or may be a second type of electronic device.
  • the first type of electronic device refers to an electronic device that uses alternating current to supply power to itself through an external power source (also can be referred to as a long-term electrical device or a first type of device).
  • the first type of electronic equipment may include televisions, routers, desktop computers, speakers, and so on. This type of electronic equipment can use an external power supply through plugs, data cables, etc. to obtain electrical energy provided by the power company during work. Therefore, the first type of electronic equipment can always be in a standby state after being connected to the external power supply. Power consumption generally does not make special requirements.
  • the second type of electronic device refers to an electronic device that uses a battery to supply power to itself (also called a battery device or a second type of device).
  • the second type of electronic equipment may include mobile phones, tablet computers, notebook computers, and so on. This type of electronic equipment needs to use a battery to power the equipment itself when it is working.
  • the mobile phone can enter the standby state (also known as the sleep state) after the screen is off.
  • the standby state also known as the sleep state
  • processor such as the CPU
  • Related communication modules such as Wi-Fi chips
  • the electronic device 101 and the electronic device 102 can form a network according to a certain topology and networking algorithm, so that the electronic devices in the communication system 100 can communicate with each other.
  • each node in the network can be connected to a master device (master, also called a central node or central node) in a point-to-point manner, and connected to the master device
  • the nodes can be called slave devices, and the master device is used to centrally control and manage each slave device in the network.
  • the electronic device 101 or the electronic device 102 in the communication system 100 can be used as the main device for networking.
  • the main device in the communication system 100 is determined, other electronic devices in the communication system 100 can be used as the main device.
  • the slave device establishes a communication connection with the master device, thereby completing the networking process of the communication system 100.
  • each electronic device in the communication system 100 can store and maintain a device information list.
  • the device information list may include device information of each electronic device in the communication system 100.
  • the device information may include one or more items of information reflecting the state of the device, such as device name, device type (for example, the first type or the second type), power information, wake-up duration, or wake-up frequency.
  • the power information refers to the remaining battery capacity or power percentage of the electronic device 102; for the first type of electronic device 101, since the user usually does not require the power of this type of electronic device, The power information of the electronic device 101 may be set to 100% in the device information list, or the parameter of power information may not be set in the device information list of the electronic device 101.
  • the aforementioned wake-up duration refers to the working duration after the processor in the electronic device is awakened within a certain period of time.
  • the above-mentioned wake-up frequency refers to the number of times the processor in the electronic device is awakened within a certain period of time.
  • the device information list stored by electronic device A is shown in Table 1.
  • electronic device A can query the specific names of other electronic devices (such as speaker 1, router or mobile phone 1) in the communication system 100.
  • Device status such as type, battery level, and wake-up time.
  • each electronic device can learn the latest device status of other electronic devices in the communication system 100 through the device information list stored in itself.
  • the above Table 1 may also include the device information of the electronic device A itself.
  • the device information shown in Table 1 is only an example. It can be understood that the device information may also include the device model, the network access time of the device, the IP (internet protocol, Internet Protocol) address, and MAC (media access control). Those skilled in the art can set the media access control address, services provided by the device, customized business information, etc. according to actual experience or actual application scenarios, and the embodiment of the present application does not impose any limitation on this.
  • each electronic device can obtain the latest device status of each electronic device in the communication system 100 according to the device information list stored by itself, and further, the electronic device can obtain the latest device status of each electronic device in the communication system 100 according to the communication
  • the latest device status of each electronic device in the system 100 determines which electronic device the main device in the current communication system 100 is.
  • the electronic device A can determine whether the first type of electronic device 101 is included in the communication system 100 after querying the device information list shown in Table 1. If the electronic device 101 of the first type is included, the electronic device A may preferentially determine the electronic device 101 of the first type (for example, a router) as the master device in the communication system 100.
  • the electronic device A may preferentially determine the electronic device 101 of the first type (for example, a router) as the master device in the communication system 100.
  • the electronic device A may determine the electronic device 101 with the earliest network access time as the main device of the current networking. For another example, when there are multiple electronic devices 101 of the first type, the electronic device A may determine the electronic device 101 with the highest priority according to the preset priority order as the master device of the current networking.
  • the electronic device as the main device generally has a relatively high load in the network, and when the first type of electronic device 101 is the main device in the communication system 100, since the electronic device 101 can use an external power supply to supply power to itself, the electronic device 101
  • the device 101 as the main device has strong stability when operating under a high load state, the main device is less likely to have abnormal conditions such as power failure, and the network lasts longer after the device is networked.
  • the electronic device A can determine a master from the plurality of electronic devices 102 according to the device information of the second type of electronic device 102 in the above device information list. equipment.
  • the electronic device A may determine the electronic device 102 whose power is greater than the preset value or the highest power to be the main device of the current networking based on the power information of the different electronic devices 102 in Table 1. That is to say, when there is no electronic device 101 of the first type, the electronic devices in the communication system 100 can determine the electronic device 102 of the second type with a higher power level as the master device when networking, reducing the number of master devices after networking. Abnormal situations occur due to low power, so as to ensure the stability of the network after networking and the duration of the network.
  • the electronic device A can determine the electronic device 102 whose wake-up time is greater than a preset value or the longest wake-up time according to the wake-up duration of the different electronic devices 102 in Table 1 as the master device of this networking. That is to say, when there is no electronic device 101 of the first type, the electronic device in the communication system 100 can determine the electronic device 102 of the second type with a longer wake-up time as the master device during networking. Since the electronic device 102 does not need to wake up the processor and related communication modules to increase power consumption when working as a master device in the wake-up state, selecting the electronic device 102 with a longer wake-up time as the master device can reduce the power consumption during networking. Cost, so as to ensure the stability of the network after networking and the duration of the network.
  • the electronic device A can also combine the power information, wake-up duration, or other device information (such as wake-up frequency, current wake-up state, etc.) of each electronic device 102 to select a second type of electronic device 102 as the main device to start networking.
  • the embodiments of this application do not impose any restriction on this.
  • all other electronic devices in the communication system 100 can determine the main device in the communication system 100 in the current networking according to the above method according to the device information list.
  • the determined master device can establish a communication connection (for example, Wi-Fi connection or Bluetooth connection, etc.) with other electronic devices (ie, slave devices) to complete the current networking process.
  • the master device in the communication system 100 can start to normally control and manage each slave device in the network. If it is detected that the current operating state of the main device meets the preset main device migration conditions, for example, the power of the main device is low or the main device enters a long-term sleep state, indicating that the current electronic device as the main device is no longer suitable for continuing operation as the main device . At this time, the master device can notify each slave device in the communication system 100 to re-determine a new master device for networking according to the above-mentioned method, so as to ensure the stability of the network and the duration of the network after the network is re-organized.
  • the device networking method provided by the embodiments of the present application can also dynamically adjust the main device in the network according to the operating state of the main device, so as to select the best electronic device in the communication system 100 as the main device in real time for networking and Operation, improve the stability of the network and the duration of the network.
  • the electronic devices in the aforementioned communication system 100 may specifically be mobile phones, tablet computers, desktops, laptops, notebook computers, ultra-mobile personal computers (UMPC), handheld computers, netbooks, and personal computers.
  • Digital assistants personal digital assistants, PDAs
  • wearable electronic devices are not limited in the embodiments of the present application.
  • FIG. 2 shows a schematic diagram of the structure of the mobile phone.
  • the mobile phone may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, and mobile
  • the communication module 150 the wireless communication module 160, the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, the sensor module 180, the camera 193, the display screen 194 and so on.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the mobile phone.
  • the mobile phone may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or arrange different components.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait.
  • AP application processor
  • modem processor modem processor
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • the different processing units may be independent devices or integrated in one or more processors.
  • a memory may also be provided in the processor 110 to store instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory can store instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
  • the processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / Or Universal Serial Bus (USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transceiver receiver/transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB Universal Serial Bus
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger can be a wireless charger or a wired charger.
  • the charging management module 140 may receive the charging input of the wired charger through the USB interface 130.
  • the charging management module 140 may receive the wireless charging input through the wireless charging coil of the mobile phone. While the charging management module 140 charges the battery 142, it can also supply power to the electronic device through the power management module 141.
  • the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.
  • the power management module 141 can also be used to monitor battery capacity, battery cycle times, battery health status (leakage, impedance) and other parameters.
  • the power management module 141 may also be provided in the processor 110.
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the wireless communication function of the mobile phone can be realized by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
  • the antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in the mobile phone can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna can be used in combination with a tuning switch.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G, etc., which are applied to mobile phones.
  • the mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), and the like.
  • the mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform processing such as filtering, amplifying and transmitting the received electromagnetic waves to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modem processor, and convert it into electromagnetic waves for radiation via the antenna 1.
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110.
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
  • the wireless communication module 160 can provide applications on mobile phones including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), and global navigation satellite systems ( Global navigation satellite system, GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • WLAN wireless local area networks
  • BT Bluetooth
  • GNSS global navigation satellite systems
  • FM frequency modulation
  • NFC near field communication
  • IR infrared technology
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110.
  • the wireless communication module 160 may also receive a signal to be sent from the processor 110, perform frequency modulation, amplify, and convert it into electromagnetic waves to radiate through the antenna 2.
  • the antenna 1 of the mobile phone is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the mobile phone can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite-based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite-based augmentation systems
  • the mobile phone realizes the display function through GPU, display screen 194, and application processor.
  • the GPU is an image processing microprocessor, which is connected to the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations and is used for graphics rendering.
  • the processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos, and the like.
  • the display screen 194 includes a display panel.
  • the display panel can use liquid crystal display (LCD), organic light-emitting diode (OLED), active matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • active-matrix organic light-emitting diode active-matrix organic light-emitting diode
  • AMOLED flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (QLED), etc.
  • the mobile phone may include one or N display screens 194, and N is a positive integer greater than one.
  • the mobile phone can realize the shooting function through ISP, camera 193, video codec, GPU, display 194 and application processor.
  • the ISP is used to process the data fed back from the camera 193. For example, when taking a picture, the shutter is opened, the light is transmitted to the photosensitive element of the camera through the lens, the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing and is converted into an image visible to the naked eye.
  • ISP can also optimize the image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 193.
  • the camera 193 is used to capture still images or videos.
  • the object generates an optical image through the lens and is projected to the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transfers the electrical signal to the ISP to convert it into a digital image signal.
  • ISP outputs digital image signals to DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the mobile phone may include one or N cameras 193, and N is a positive integer greater than one.
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the mobile phone selects the frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
  • Video codecs are used to compress or decompress digital video.
  • the phone can support one or more video codecs.
  • video codecs In this way, mobile phones can play or record videos in a variety of encoding formats, such as: moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
  • MPEG moving picture experts group
  • the external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, so as to expand the storage capacity of the mobile phone.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, video and other files in an external memory card.
  • the internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions.
  • the processor 110 executes various functional applications and data processing of the mobile phone by running instructions stored in the internal memory 121.
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, an application program (such as a sound playback function, an image playback function, etc.) required by at least one function, and the like.
  • the data storage area can store data (such as audio data, phone book, etc.) created during the use of the mobile phone.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
  • UFS universal flash storage
  • the mobile phone can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. For example, music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal.
  • the audio module 170 can also be used to encode and decode audio signals.
  • the audio module 170 may be provided in the processor 110, or part of the functional modules of the audio module 170 may be provided in the processor 110.
  • the speaker 170A also called “speaker” is used to convert audio electrical signals into sound signals.
  • the mobile phone can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
  • the voice can be heard by bringing the receiver 170B close to the human ear.
  • the microphone 170C also called “microphone”, “microphone”, is used to convert sound signals into electrical signals.
  • the user can make a sound by approaching the microphone 170C through the human mouth, and input the sound signal into the microphone 170C.
  • the mobile phone can be equipped with at least one microphone 170C.
  • the mobile phone may be equipped with two microphones 170C, which can realize noise reduction function in addition to collecting sound signals.
  • the mobile phone can also be equipped with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions.
  • the earphone interface 170D is used to connect wired earphones.
  • the earphone interface 170D may be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, and a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA, CTIA
  • the sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.
  • the above-mentioned mobile phone may also include one or more devices such as buttons, motors, indicators, and SIM card interfaces, which are not limited in the embodiment of the present application.
  • the various electronic devices in the user's home can be networked through the Wi-Fi network in the home.
  • the electronic device 1 after the electronic device 1 joins the Wi-Fi network at home, it can send its own device information to other electronic devices in the Wi-Fi network through DNS (domain name system, domain name system) multicast.
  • the electronic device in the Wi-Fi network receives the device information sent by the newly added electronic device 1, it can also reply its own device information to the electronic device 1.
  • the electronic device 1 joins the Wi-Fi network, it can obtain its own device information sent by each electronic device that has joined the Wi-Fi network, and form the device information list shown in Table 2.
  • the device information list records the device information of each electronic device in the Wi-Fi network, which is used to indicate the latest device status of each electronic device.
  • the device information list obtained by the newly added electronic device 1 includes the device information of each electronic device in the Wi-Fi network.
  • the device information may specifically include the device name, device type, power information, wake-up duration, and wake-up frequency of the device.
  • the above device information can also include the network access time of the device, current wake-up status, device model, IP address, MAC address, services provided by the device (such as voice, video, and camera), and custom business parameters (such as the last The wake-up time) and other parameters that can reflect the state of the device.
  • each electronic device in the above Wi-Fi network maintains a device information list. Furthermore, each electronic device can determine the current Wi-Fi based on the device information list stored in itself. The main device in the Fi network establishes a communication connection with the main device for networking.
  • the method for the electronic device 1 to determine the main device in the Wi-Fi network for networking based on the above device information list may include the following steps 300-307.
  • Step 300 The electronic device 1 determines whether the Wi-Fi network contains electronic devices of the first type.
  • Step 301 When the first type of electronic device is included in the Wi-Fi network, the electronic device 1 determines the first type of electronic device A as the master device in the Wi-Fi network.
  • the electronic device 1 may first query whether the electronic device of the first type is recorded in the device information list stored in itself. If the electronic device of the first type is recorded, it means that the electronic device of the first type has been connected to the current Wi-Fi network. Since the electronic equipment of the first type uses an external power supply when working, the probability of abnormal situations such as power failure is low. Therefore, the electronic equipment 1 can determine one of the electronic equipment of the first type as the master in the current Wi-Fi network. equipment.
  • electronic device A electronic device A may also be electronic device 1 itself
  • electronic device 1 may assign this unique first electronic device A type of electronic device A is determined as the main device in the current Wi-Fi network.
  • the electronic device 1 can make a decision according to the preset master device The algorithm selects one of the multiple electronic devices of the first type as the main device in the current Wi-Fi network.
  • the device information list shown in Table 2 can record the network access time for each electronic device to access the Wi-Fi network.
  • the above-mentioned main device decision algorithm may be: the first type of electronic device with the earliest network access time is the main device.
  • the electronic device 1 can determine the first type of electronic device A with the earliest network access time as the main device in the current Wi-Fi network according to the network access time of each first type of electronic device in the device information list.
  • the aforementioned master device decision algorithm may also be: selecting a specific type of electronic device as the master device.
  • the priority order between different first-type devices can be preset, for example, the priority of the TV is greater than the priority of the router, and the priority of the router is greater than the priority of the smart speaker level.
  • the electronic device 1 may determine the first-type device (for example, electronic device A) with the highest priority in the device information list as the main device in the current Wi-Fi network.
  • the above-mentioned main device decision-making algorithm can also be other decision-making algorithms such as the raft election algorithm.
  • Those skilled in the art can set the above-mentioned main device decision-making algorithm of the first type of device according to actual application scenarios or actual experience. This embodiment of the application does not do this. Any restrictions.
  • each electronic device in the Wi-Fi network can vote for the main device in the current Wi-Fi network according to different main device decision algorithms.
  • the electronic device 1 may determine the first type of electronic device A as the master device based on the stored device information list according to the master device decision algorithm 1, and broadcast the decision result 1 to other devices in the Wi-Fi network.
  • the electronic device 2 can determine the first type of electronic device C as the master device based on the stored device information list according to the master device decision algorithm 2, and broadcast the decision result 2 to other devices in the Wi-Fi network.
  • each electronic device in the Wi-Fi network can determine the first type of electronic device (for example, electronic device A) with the largest number of votes among all decision results as the main device in the current Wi-Fi network by voting. .
  • each electronic device of the first type in the Wi-Fi network may be configured to participate in the voting process described above. That is to say, when the Wi-Fi network contains multiple electronic devices of the first type, the multiple electronic devices of the first type can vote among each other to elect the master device in the current Wi-Fi network. At this time, the second type of electronic equipment in the Wi-Fi network does not need to participate in the above voting process, so that the power consumption of the second type of electronic equipment can be reduced.
  • the first type of electronic devices can be selected as the main device in the network.
  • the probability of abnormal situations such as power failure is low, which can ensure the stability of the entire network after networking.
  • the power consumption of the second type of electronic device in the network can be reduced, thereby extending the duration of the entire network after networking.
  • the electronic device 1 and other electronic devices in the Wi-Fi network can follow the method in step 305 to perform the second type of electronic device Determine the main device in the current Wi-Fi network.
  • Step 302 The electronic device 1 establishes a communication connection with the electronic device A.
  • the electronic device 1 After the electronic device 1 determines the electronic device A of the first type as the master device in the Wi-Fi network, as shown in FIG. 4, the electronic device 1 can be used as a slave device to establish a communication connection with the master device (ie, electronic device A).
  • the communication connection may be a network connection at the L3 layer.
  • the network connection of the L3 layer can specifically be a TCP (transmission control protocol) connection or a UDP (user datagram protocol, user datagram protocol)-based network connection, such as UDP-based CoAP (constrained application protocol, restricted Application protocol) connection, the embodiment of this application does not impose any restriction on this.
  • TCP transmission control protocol
  • UDP user datagram protocol, user datagram protocol
  • CoAP constrained application protocol, restricted Application protocol
  • other electronic devices in the Wi-Fi network can also determine the electronic device A as the master device in the Wi-Fi network according to the method in the above step 301, and communicate with the electronic device A.
  • the device A establishes a communication connection. In this way, the electronic device A in the Wi-Fi network is used as the main device to form a star topology network with other electronic devices.
  • the electronic device A in the Wi-Fi network may also determine that it is the main device in the current Wi-Fi network when performing step 301 above. Then, after the electronic device A determines that it is the master device, it can also broadcast the update message of the master device to other electronic devices in the Wi-Fi network, and the message can carry the identity of the electronic device A. After receiving the message, other electronic devices can perform step 302 to establish a communication connection with electronic device A to complete the networking process of the star topology.
  • Step 303 The electronic device 1 periodically sends its own device information to the electronic device A, and obtains the latest device information list from the electronic device A.
  • electronic device A When electronic device 1 and other slave devices have established a communication connection with electronic device A (ie the master device) to form a star topology network, electronic device A can be used as a central node to receive regular transmissions from each slave device in the Wi-Fi network And then update the device information of the corresponding device in the device information list, so that each device information in the device information list stored by electronic device A is in the latest state.
  • each slave device in the Wi-Fi network can also obtain the latest device information list from the electronic device A, so that each device in the Wi-Fi network can learn the latest device status of other devices.
  • the electronic device 1 when the electronic device 1 is an electronic device of the first type, the electronic device 1 may start the preset timer T1. When the timer T1 expires, the electronic device 1 can act as a slave device to send its latest device information to the current master device (ie, electronic device A). After the electronic device A receives the device information sent by the electronic device 1, it can update the device information of the corresponding electronic device 1 in its device information list, so that the device information list stored in the electronic device A is in the latest state.
  • the current master device ie, electronic device A
  • the electronic device A After the electronic device A receives the device information sent by the electronic device 1, it can update the device information of the corresponding electronic device 1 in its device information list, so that the device information list stored in the electronic device A is in the latest state.
  • electronic device A after electronic device A receives the device information sent by electronic device 1, it can also send the latest device information list to electronic device 1, so that electronic device 1 can learn about other electronic devices in the Wi-Fi network through the device information list The latest device status.
  • the electronic device 1 when the electronic device 1 is an electronic device of the second type, the electronic device 1 can start the preset timer T2. When the timer T2 expires, the electronic device 1 can act as a slave device to send its latest device information to the current master device (ie, electronic device A). Similarly, the electronic device A can update the device information of the corresponding electronic device 1 in its device information list. In addition, the electronic device A may send the latest device information list to the electronic device 1, so that the device information list stored in the electronic device 1 is synchronized with the device information list stored in the electronic device A, and both are in the latest state.
  • the electronic device 1 when the electronic device 1 is an electronic device of the second type, the electronic device 1 can start the preset timer T2. When the timer T2 expires, the electronic device 1 can act as a slave device to send its latest device information to the current master device (ie, electronic device A). Similarly, the electronic device A can update the device information of the corresponding electronic device 1 in its device information list. In addition, the electronic
  • the electronic device 1 when the electronic device 1 is the second type of electronic device, the electronic device 1 needs to consume extra power consumption to wake up the processor of the electronic device 1 when interacting with the electronic device A in the dormant state, resulting in the function of the electronic device 1. Increase in consumption. Therefore, the period of the timer T2 started by the electronic device 1 can be set to be synchronized with its own device wake-up period. That is, when the electronic device 1 is in the awake state, the electronic device 1 can be triggered to send its own latest device information to the electronic device A, and obtain the latest device information list from the electronic device A.
  • the timing duration of the timer T2 can be set to be synchronized with the period of the electronic device 1 sending the heartbeat message.
  • the timing duration of the timer T2 can be set to be synchronized with the period of the electronic device 1 sending the heartbeat message.
  • each time the electronic device 1 is awakened and sends a heartbeat message to the PUSH message server it can also send its own latest device information to the electronic device A, thereby reducing the number of wakeup times when the electronic device 1 is awakened from the dormant state to the awake state. The power consumption of the electronic device 1 is reduced.
  • the electronic device being in the awake state may refer to the state in which the processor in the electronic device is awakened to work
  • the electronic device being in the dormant state may refer to the state in which the processor in the electronic device is in sleep or low power consumption.
  • a corresponding flag bit may be preset in the electronic device to indicate the working state of the processor. For example, when the flag bit is 01, it indicates that the processor of the electronic device is in a working state, and when the flag bit is 00, it indicates that the processor of the electronic device is in a sleep state. Then, the electronic device can determine the duration or frequency of the electronic device in the awake state or the dormant state by counting the duration of the above-mentioned flag bit.
  • other slave devices in the Wi-Fi network can also periodically send their own device information to electronic device A (that is, the master device) according to the above method, and obtain the latest device information list from electronic device A.
  • the device information list stored in each slave device in the entire Wi-Fi network is synchronized with the device information list stored in the electronic device A (that is, the master device), and both are in the latest state.
  • Step 304 When the electronic device 1 detects that the connection with the electronic device A is disconnected, it broadcasts the master device abnormality message in the Wi-Fi network.
  • Electronic device 1 uses electronic device A as the master device, and after establishing a communication connection with electronic device A, as shown in FIG. 5, if electronic device 1 detects that the communication connection with electronic device A is disconnected, for example, electronic device 1 and The communication connection between electronic device A has timed out, or electronic device 1 has failed to send device information to electronic device A for N consecutive times, indicating that electronic device A may be offline, malfunctioning, or power off at this time. , Causing the connection between the electronic device 1 and the electronic device A to be disconnected.
  • the electronic device 1 can broadcast a master device exception message to other electronic devices in the Wi-Fi network to inform other electronic devices of the current master device (ie, electronic Device A) is abnormal to trigger each electronic device in the Wi-Fi network to start reselecting a new main device for networking.
  • a master device exception message to other electronic devices in the Wi-Fi network to inform other electronic devices of the current master device (ie, electronic Device A) is abnormal to trigger each electronic device in the Wi-Fi network to start reselecting a new main device for networking.
  • the electronic device 1 when the electronic device 1 broadcasts the master device exception message, it may also carry the latest device information of the electronic device 1 in the master device exception message.
  • the electronic device that receives the abnormal message of the main device can also broadcast its own latest device information on the Wi-Fi network.
  • the main device ie, electronic device A
  • each electronic device in the Wi-Fi network can obtain the latest device information of other devices, thereby obtaining a list of the latest device information.
  • each electronic device in the Wi-Fi network can re-select a new master device for networking based on the latest device information list.
  • step 304 the electronic device 1 detects that the connection with electronic device A has timed out as an example. It can be understood that when other slave devices in the Wi-Fi network detect that the connection with electronic device A has timed out, you can also follow step 304
  • the method broadcasts the abnormal message of the master device in the Wi-Fi network, which triggers each electronic device in the Wi-Fi network to start reselecting a new master device for networking.
  • electronic device 1 when electronic device 1 starts to re-select a new master device for networking, it can query whether the first type of electronic device is recorded in the latest device information list currently stored, that is, the current Wi-Fi Whether the first type of electronic equipment is included in the network. If the electronic device of the first type is included, the electronic device 1 can continue to determine the new master device according to the method described in step 301 above. Correspondingly, if the electronic device of the first type is not included, the electronic device 1 may perform the following step 305 to determine a new master device.
  • the electronic device A detects that the communication connection with a certain slave device is disconnected, it means that the slave device may be disconnected, malfunctioning, or power off. Then, the electronic device A can delete the related device information of the slave device in the maintained device information list, so that the device information list stored in the electronic device A is in the latest state.
  • Step 305 When the first type of electronic device is not included in the Wi-Fi network, the electronic device 1 determines the second type of electronic device B as the main device in the Wi-Fi network.
  • electronic device 1 if electronic device 1 detects that the connection with electronic device A is disconnected, or receives a master device exception message broadcast by other electronic devices, it means that you need to reselect the new one in the Wi-Fi network at this time. The main equipment for networking. Then, the electronic device 1 can query whether the electronic device of the first type is recorded in the stored latest device information list.
  • the electronic device 1 can use the device information of the second type of electronic device in the device information list , Determine the second type of electronic device B as the main device in the current Wi-Fi network.
  • electronic device B electronic device B can also be electronic device 1 itself
  • electronic device 1 may use this unique first One type of electronic device B is determined as the main device in the current Wi-Fi network.
  • the electronic device 1 can use the power information, wake-up time, or wake-up time of these second-type devices in the device information list. For parameters such as frequency, select a second type device as the main device in the current Wi-Fi network.
  • the electronic device 1 may determine the second type of device (for example, electronic device B) with the highest power in the device information list as the main device in the current Wi-Fi network.
  • the second type of equipment with higher power can be determined as the main device for networking, and the main equipment will appear due to low power after the network is reduced. Abnormal conditions, so as to ensure the stability of the network after networking and the duration of the network.
  • the electronic device 1 may determine the second type device (for example, electronic device B) with the longest wake-up time in the device information list as the main device in the current Wi-Fi network.
  • the second type device for example, electronic device B
  • the number of times the electronic device B needs to wake up its processor to start working when working as a master device is less. Therefore, when the Wi-Fi network does not contain the first type of electronic equipment, the second type of equipment with a longer wake-up time is selected as the main device for networking, which can reduce the power consumption during networking and ensure that the networking is The stability of the network and the duration of the network.
  • the electronic device 1 may determine the second type device (for example, electronic device B) with the highest wake-up frequency in the device information list as the main device in the current Wi-Fi network.
  • the wake-up frequency of electronic device B is higher, electronic device B is used more frequently, and the processor in electronic device B is in working state for a longer time. At this time, electronic device B is awakened from sleep state when working as a master device. The fewer times. Therefore, when the Wi-Fi network does not contain the first type of electronic equipment, the second type of equipment with the higher wake-up frequency is selected as the main device for networking, which can reduce the power consumption during networking and ensure that the networking The stability of the network and the duration of the network.
  • the electronic device 1 may select the optimal second-type device as the main device in the current Wi-Fi network in combination with the wake-up time and the wake-up frequency of the second-type device. For example, the electronic device 1 may select the second type device with the highest wake-up frequency as the main device in the current Wi-Fi network among multiple second-type devices whose wake-up time is greater than a first preset value (for example, greater than 5 hours).
  • a first preset value for example, greater than 5 hours.
  • the device information list stored in the electronic device 1 may also include the current wake-up state of each second-type device, that is, the current second-type electronic device is in the wake-up state or the dormant state. Then, when the electronic device 1 determines the main device among the multiple second-type devices, it can also select the main device in combination with the current wake-up state of the second-type device. For example, if the wake-up time is greater than the first preset value, and there are multiple second-type devices with a wake-up frequency greater than the second preset value, the electronic device 1 may prioritize the second-type device that is currently awake as the current Wi-Fi device. The main device in the Fi network. In this way, the second type of device in the awake state does not need to wake up its processor to increase the power consumption of the device when it switches to work as the master device.
  • the electronic device 1 may select the optimal second-type device as the main device in the current Wi-Fi network in combination with multiple parameters such as the power information, wake-up time, and wake-up frequency of the second-type device. For example, when the wake-up time is greater than the first preset value and the wake-up frequency is greater than the second preset value, there are multiple devices of the second type, the electronic device 1 may select the second device with the highest power among the multiple devices of the second type.
  • the type device is the main device in the current Wi-Fi network. In this way, the power consumption overhead caused by waking up the second type of main device can be reduced, and the abnormal situation of the main device due to low power after networking can be reduced, so as to ensure the stability and stability of the network after networking.
  • the duration of the network is the duration of the network.
  • the electronic device 1 may also select multiple devices of the second type to take turns to work as the main device in the Wi-Fi network. For example, if electronic device 1 finds that the current Wi-Fi network contains three second-type devices in its device information list, electronic device 1 can determine that these three second-type devices have a certain working cycle (for example, 2 Hours) take turns to work as the main device in the Wi-Fi network. For another example, the electronic device 1 can determine two second-type devices with higher power and longer wake-up time based on the power information and wake-up time of the second-type device, and further, the electronic device 1 can determine the two second-type devices with higher power and longer wake-up time. The device takes turns to work as the main device in the Wi-Fi network in a certain work cycle.
  • a certain working cycle for example, 2 Hours
  • the electronic device can be used in the second type of electronic device according to the wake-up duration, power and other parameters of each second type of electronic device. Priority is given to selecting electronic devices with lower power consumption and longer network duration during networking as the main device, so as to ensure the stability of the entire network after networking.
  • Step 306 The electronic device 1 establishes a communication connection with the electronic device B.
  • the electronic device 1 can be used as a slave device and the master device (ie, electronic device B) Establish a communication connection and disconnect the communication connection with the original master device (ie, electronic device A).
  • other electronic devices in the Wi-Fi network can also determine electronic device B as the new master device in the Wi-Fi network according to the method in step 305 above, and establish a communication connection with the new master device In this way, as shown in FIG. 6, the electronic device B in the Wi-Fi network, as the new master device, forms a star topology network again between each other electronic devices.
  • the Wi-Fi network pair completes the control function of the related electronic equipment, thereby improving the user experience.
  • the electronic device 1 and other slave devices establish a communication connection with the new master device (ie, electronic device B) to form a star topology network
  • the working process is similar to that of electronic device A as the master device.
  • the electronic device Device B can act as a central node to receive the device information periodically sent by each slave device in the Wi-Fi network, and then update the device information of the corresponding device in the device information list, so that the device information in the device information list stored by electronic device B is up to date status.
  • each slave device in the Wi-Fi network can also obtain the latest device information list from electronic device B, so that the device information list stored by each device in the Wi-Fi network is synchronized with the device information list stored in electronic device B , Are in the latest state.
  • Step 307 When the operating state of the electronic device B meets the preset master device migration condition, the electronic device 1 re-executes the above step 301 or 305.
  • the electronic device B After the electronic device B of the second type starts to work as the master device, the electronic device B can detect in real time whether its running state meets the preset master device migration condition. As shown in FIG. 7, when the preset master device migration condition is met, it means that the electronic device B is no longer suitable to continue working as the master device in the Wi-Fi network at this time. Then, electronic device B can broadcast a master device migration message to each slave device in the Wi-Fi network, triggering the slave device (for example, electronic device 1) that has received the master device migration message to start reselecting a new one by performing steps 301 or 305 above.
  • the main equipment for networking is
  • the foregoing master device migration condition may include: the power of the master device is lower than the preset power, or the power of the master device is lower than the power of any slave device.
  • electronic device B After electronic device B starts working as a master device, it can obtain its own power information in real time. When its own power level is lower than the preset power level (for example, 50%), electronic device B continues to work as the main device at this time, and it is prone to power exhaustion and other situations that affect the stability of the network. Therefore, electronic device B can connect to the Wi-Fi network Each of the slave devices broadcasts the master device migration message, triggering the slave device to reselect a new master device for networking.
  • the preset power level for example, 50%
  • the electronic device B after the electronic device B starts working as the master device, it can obtain its own power information in real time, and compare its own power information with the power information of other electronic devices in the device information list. If its own power is lower than the power of each slave device in the Wi-Fi network, or its own power is lower than most of the slave devices (for example, 80% of the slave devices), similarly, electronic device B continues to be the master device at this time Work is prone to power exhaustion and other conditions that affect network stability. Therefore, electronic device B can broadcast a master device migration message to each slave device in the Wi-Fi network, triggering the slave device to reselect a new master device for networking.
  • the foregoing master device migration condition may include: the wake-up duration of the master device is less than the preset wake-up duration, or the wake-up frequency of the master device is less than the preset wake-up frequency.
  • the wake-up duration of the electronic device B in the wake-up state can be counted according to the working duration of the processor.
  • the processor in electronic device B has a shorter wake-up time, which will cause electronic device B to work as a master device and need to wake up the processor to increase the electronic device
  • electronic device B can broadcast a master device migration message to each slave device in the Wi-Fi network, triggering the slave device to reselect a new master device for networking.
  • the electronic device B may also calculate the sleep duration of the electronic device B in the sleep state according to the sleep duration of the processor. If the sleep duration of electronic device B is greater than the preset sleep duration, it means that electronic device B has entered the sleep state. If electronic device B continues to work as a master device, it needs to wake up the processor to increase the power consumption of electronic device B. Therefore, electronic device B It can broadcast a master device migration message to each slave device in the Wi-Fi network, triggering the slave device to reselect a new master device for networking.
  • the wake-up frequency of the electronic device B can also be calculated according to the working frequency of the processor. If the wake-up frequency of electronic device B is less than the preset wake-up frequency, it means that the processor in electronic device B is awakened less frequently. If electronic device B continues to work as a master device, it needs to wake up the processor to increase the power consumption of electronic device B. Therefore, the electronic device B can broadcast a master device migration message to each slave device in the Wi-Fi network, triggering the slave device to reselect a new master device for networking.
  • the foregoing master device migration conditions may also include other conditions that affect the continued operation of the electronic device B as the master device, which is not limited in the embodiment of the present application.
  • the master device migration condition may also be that the working time of the master device is greater than the preset time length. Then, if it is detected that the working time of electronic device B as the main device is longer than the preset time, in order to avoid the work task of the main device from causing excessive load on electronic device B, electronic device B can add to the Wi-Fi network
  • Each slave device broadcasts a master device migration message, triggering the slave device to reselect a new master device for networking.
  • each electronic device in the Wi-Fi network can also be triggered to start to reselect a new master device for networking by performing the aforementioned step 301 or 305.
  • This application The embodiment does not impose any limitation on this.
  • the device networking method can determine whether the main device is suitable for continuing to work as the main device according to the current operating state of the main device. If the current electronic device as the main device is no longer suitable to continue working as the main device, it can trigger the electronic device in the Wi-Fi network to re-select the best electronic device in the Wi-Fi network as the new main device for networking and operation , So as to dynamically adjust the main equipment in the network to optimize the stability of the network and the duration of the network.
  • the electronic device is used as an example to perform device networking in a Wi-Fi network. It is understandable that the electronic device can also be used in Bluetooth, near field communication (NFC) ), Voice over Internet Protocol (VoIP), Ethernet, Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Multi-Code Division Address access (code division multiple access, CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long-term evolution (long-term evolution) Term evolution, LTE) and other communication networks use the foregoing networking method to build a star topology network, and the embodiment of the present application does not impose any restriction on this.
  • NFC Near field communication
  • VoIP Voice over Internet Protocol
  • Ethernet Ethernet
  • GSM Global System for Mobile Communications
  • GSM Global System for Mobile Communications
  • GPRS General Packet Radio Service
  • Multi-Code Division Address access code division multiple access
  • CDMA code division multiple access
  • WCDMA wideband code division multiple access
  • an embodiment of the present application discloses an electronic device, including: a communication module 801; one or more processors 802; one or more memories 803; one or more application programs (not shown); And one or more computer programs 804, each of the above-mentioned devices may be connected through one or more communication buses 805.
  • the one or more computer programs 804 are stored in the aforementioned memory 803 and configured to be executed by the one or more processors 802, and the one or more computer programs 804 include instructions, and the aforementioned instructions can be used to execute the aforementioned Steps 300-307 shown in Figure 3 in the embodiment should be used.
  • the foregoing processor 802 may specifically be the processor 110 shown in FIG. 2
  • the foregoing memory 803 may specifically be the internal memory 121 shown in FIG. 2
  • the foregoing communication module 801 may specifically be the mobile communication module shown in FIG. 2 150 or wireless communication module 160.
  • the electronic device may also include a display screen, a touch sensor, and other devices, which are not limited in the embodiment of the present application.
  • the functional units in the various embodiments of the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solutions of the embodiments of the present application are essentially or the part that contributes to the prior art, or all or part of the technical solutions can be embodied in the form of software products, and the computer software products are stored in a storage
  • the medium includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: flash memory, mobile hard disk, read-only memory, random access memory, magnetic disk or optical disk and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Abstract

本申请提供一种设备组网方法、电子设备及系统,涉及通信技术领域,可延长组网后网络的持续时间以及网络的稳定性,提高用户的使用体验。该方法包括:第一设备在通信系统中将第二设备确定为主设备,第二设备为第一类型设备,第一设备为第二类型设备,第一类型设备为通过外接电源供电的设备,第二类型设备为使用电池供电的设备;第一设备作为从设备与第二设备建立通信连接;当第二设备出现异常时,第一设备在该通信系统中将第三设备确定为新的主设备,第三设备为第二类型设备;第一设备作为从设备与第三设备建立通信连接。

Description

一种设备组网方法、电子设备及系统
本申请要求于2019年12月11日提交国家知识产权局、申请号为201911268282.2、发明名称为“一种设备组网方法、电子设备及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,尤其涉及一种设备组网方法、电子设备及系统。
背景技术
随着智能家居技术的发展,一个用户或家庭中往往具备多个能够互相通信的电子设备。各类电子设备一般具有各自的设备特点,例如,手机的便携性更好,电视屏幕的显示效果更好,而音箱的音质效果更好。为了充分发挥不同电子设备的设备特点,多个电子设备之间可以进行组网,从而将多个电子设备互联进行协同工作。
以星型拓扑结构的组网过程举例,用户家中的各个电子设备进行组网时可将预设的某一电子设备(例如电视、路由器或手机等)确定为主设备(master)。进而,除主设备之外的每个电子设备可作为从设备(slave)与主设备建立通信连接(例如蓝牙连接、Wi-Fi连接等),形成星型拓扑结构的局域网。这样,主设备作为中心节点可用于管理和控制该局域网中的各个从设备,完成相应的工作任务。
但是,一旦网络中的主设备出现掉线、故障或断电等异常情况时,主设备无法继续管理和控制网络中的各个从设备,导致整个网络无法正常工作,用户的使用体验也随之降低。
发明内容
本申请提供一种设备组网方法、电子设备及系统,可延长组网后网络的持续时间以及网络的稳定性,提高用户的使用体验。
为达到上述目的,本申请采用如下技术方案:
第一方面,本申请提供一种设备组网方法,包括:第一设备在通信系统中将第二设备确定为主设备,其中,第二设备为第一类型设备,第一设备为第二类型设备,第一类型设备为通过外接电源供电的设备(例如路由器),第二类型设备为使用电池供电的设备(例如手机);进而,第一设备可作为从设备与第二设备建立通信连接;当第二设备出现异常(即当前的主设备出现异常)时,第一设备可在上述通信系统中将第三设备确定为新的主设备,第三设备为上述第二类型设备;进而,第一设备可作为从设备与第三设备(即新的主设备)建立通信连接。
可以看出,在选举通信系统中的主设备进行设备组网时,可优先将第一类型设备确定为通信系统中的主设备组建星型结构的网络,以保证网络的持续时间以及网络的稳定性;当第一类型设备出现异常时,可将主设备从第一类型设备迁移为第二类型设备,从而动态地调整网络中的主设备,以保证网络的持续时间以及网络的稳定性达到 最优。
在一种可能的实现方式中,第一设备在的通信系统中将第二设备确定为主设备,包括:第一设备查询该通信系统中是否包含第一类型设备;若包含第一类型设备,则第一设备在第一类型设备中将第二设备确定为主设备。其中,通信系统中的第一类型设备可以为一个或多个,或者,通信系统也可以不包含第一类型设备。
在一种可能的实现方式中,第一设备中存储有设备信息列表,该设备信息列表中记录有通信系统中各个设备的设备信息,例如,各个设备的设备类型;此时,第一设备查询上述通信系统中是否包含第一类型设备,包括:第一设备根据其设备信息列表中各个设备的设备类型,可查询到当前通信系统内是否包含第一类型设备。
在一种可能的实现方式中,第一设备在第一类型设备中将第二设备确定为主设备,包括:若第一类型设备中仅包括第二设备,说明当前通信系统中仅包括一个第一类型设备,则第一设备可将第二设备确定为主设备;若第一类型设备中包括多个设备,则第一设备可根据预设的主设备决策算法,从多个第一类型设备中选出第二设备作为主设备。
也就是说,在通信系统内进行设备组网时,当通信系统中包含第一类型的电子设备时,可优先选择将第一类型的电子设备作为网络中的主设备。一方面,第一类型的电子设备作为主设备时发生断电等异常情况的几率较低,可保证组网后整个网络的稳定性。另一方面,第一类型的电子设备作为主设备时可减轻网络中第二类型的电子设备的功耗开销,从而延续组网后整个网络的持续时间。
在一种可能的实现方式中,当第二设备出现异常时,第一设备在上述通信系统中将第三设备确定为新的主设备,包括:当第二设备出现异常时,第一设备查询当前的通信系统中是否包含第一类型设备;若不包含第一类型设备,则第一设备在第二类型设备中将第三设备确定为新的主设备。其中,通信系统中的第二类型设备可以为一个或多个,或者,通信系统也可以不包含第二类型设备。
在一种可能的实现方式中,第一设备在第二类型设备中将第三设备确定为新的主设备,包括:第一设备根据设备信息列表中记录的第二类型设备的设备信息,将第三设备确定为新的主设备。
示例性的,第三设备可以为第二类型设备中电量大于电量阈值的设备;和/或,第三设备可以为第二类型设备中唤醒时间大于时间阈值的设备;和/或,第三设备可以为第二类型设备中唤醒频率大于频率阈值的设备。
也就是说,在通信系统内进行设备组网时,当通信系统中不包含第一类型的电子设备时,可在第二类型的电子设备中根据各个第二类型的电子设备的唤醒时长、电量等参数优先选择有利于组网时功耗开销较小且网络持续时间较长的电子设备作为主设备,从而保证组网后整个网络的稳定性。
在一种可能的实现方式中,在第一设备作为从设备与第二设备建立通信连接之后,还包括:第一设备定期向第二设备发送第一设备的设备信息,并从第二设备中获取该通信系统中最新的设备信息列表。这样,通信网络中各个从设备中存储的设备信息列表与当前主设备中存储的设备信息列表同步,均处于最新的状态。一旦主设备发生异常,各个从设备可根据最新的设备信息列表重新选举主设备进行组网。
示例性的,由于第一设备为第二类型的电子设备,那么,可设置第一设备向第二设备发送设备信息的周期与第一设备的心跳周期相同。这样,可减少第一设备从休眠状态被唤醒至唤醒状态的唤醒次数,降低了第一设备的功耗。
在一种可能的实现方式中,在第一设备作为从设备与第二设备建立通信连接之后,还包括:若第一设备接收到通信系统内其他从设备发送的主设备异常消息,则第一设备可确定第二设备(即当前的主设备)出现异常;或者,若第一设备检测到与第二设备之间的通信连接断开(例如第一设备检测到与第二设备之间的通信连接超时),则第一设备可确定第二设备(即当前的主设备)出现异常,从而触发通信网络中的各个电子设备开始重新选择新的主设备进行组网。
在一种可能的实现方式中,在第一设备作为从设备与第三设备建立通信连接之后,还包括:若第一设备接收到第三设备发送的主设备迁移消息,说明第三设备此时已经不适合作为主设备继续运行,则第一设备可在当前的通信系统中重新确定新的主设备进行组网。
在一种可能的实现方式中,在第一设备作为从设备与第二设备建立通信连接之后,还包括:当第二设备(即当前的主设备)出现异常时,第一设备也可以将自身确定为当前通信系统中新的主设备,例如,当第一设备为当前通信系统中电量最高的第二类型设备时,可将自身确定为当前通信系统中新的主设备;进而,第一设备可作为主设备与通信系统中的其他设备建立通信连接,组成星型拓扑结构的网络。
在一种可能的实现方式中,在第一设备将自身确定为通信系统中新的主设备之后,还包括:第一设备检测自身的运行状态是否满足预设的主设备迁移条件;若满足预设的主设备迁移条件,说明第一设备此时已经不适合作为主设备继续运行,则第一设备可向通信系统中的其他设备发送主设备迁移消息,从而触发通信网络中的各个电子设备开始重新选择新的主设备进行组网。
示例性的,上述主设备迁移条件包括:主设备的电量小于电量阈值;和/或,主设备的唤醒时间小于时间阈值;和/或,主设备的唤醒频率小于频率阈值。
可以看出,当第二类型设备作为主设备在通信网络中运行后,该第二类型设备可实时检测自身的运行状态是否适合作为主设备继续工作,如果不再适合作为主设备继续工作,则可触发通信网络中的电子设备重新选择最优的电子设备作为新的主设备进行组网和运行,从而动态地调整网络中的主设备,使得网络的稳定性以及网络的持续时间达到最优。
第二方面,本申请提供一种电子设备,包括:一个或多个处理器、一个或多个存储器、通信模块以及一个或多个计算机程序;其中,处理器与触摸屏、通信模块以及存储器均耦合,上述一个或多个计算机程序被存储在存储器中,当电子设备运行时,该处理器执行该存储器存储的一个或多个计算机程序,以使电子设备执行上述任一项所述的设备组网方法。
第三方面,本申请提供一种通信系统,包括一个或多个第一类型设备以及一个或多个第二类型设备,第一类型设备为通过外接电源供电的设备,第二类型设备为使用电池供电的设备;当第一设备为第二类型设备时,第一设备可执行上述任一项所述的设备组网方法。
第四方面,本申请提供一种计算机可读存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行上述任一项所述的设备组网方法。
第五方面,本申请提供一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备执行上述任一项所述的设备组网方法。
可以理解地,上述提供的第二方面所述的电子设备、第三方面所述的通信系统、第四方面所述的计算机可读存储介质,以及第五方面所述的计算机程序产品均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
附图说明
图1为本申请实施例提供的一种通信系统的架构示意图;
图2为本申请实施例提供的一种电子设备的结构示意图一;
图3为本申请实施例提供的一种设备组网方法的流程示意图;
图4为本申请实施例提供的一种设备组网方法的应用场景示意图一;
图5为本申请实施例提供的一种设备组网方法的应用场景示意图二;
图6为本申请实施例提供的一种设备组网方法的应用场景示意图三;
图7为本申请实施例提供的一种设备组网方法的应用场景示意图四;
图8为本申请实施例提供的一种电子设备的结构示意图二。
具体实施方式
下面将结合附图对本实施例的实施方式进行详细描述。
本申请实施例提供的一种设备组网方法,可应用于图1所示的通信系统100中,通信系统100中可包括N(N为大于1的整数)个电子设备。
其中,上述电子设备具体可以为第一类型的电子设备,也可以为第二类型的电子设备。
第一类型的电子设备是指通过外接电源使用交流电向自身供电的电子设备(也可称为长电设备或第一类型设备)。例如,第一类型的电子设备可以包括电视、路由器、台式计算机、音箱等。这类电子设备在工作时可通过插头、数据线等使用外接电源获取电力公司提供的电能,因此,第一类型的电子设备接入外接电源后可一直处于待机状态,用户对这类电子设备的功耗一般不做特殊要求。
第二类型的电子设备是指使用电池向自身供电的电子设备(也可称为电池设备或第二类型设备)。例如,第二类型的电子设备可以包括手机、平板电脑、笔记本电脑等。这类电子设备在工作时需要使用电池向设备自身供电。以手机为第二类型的电子设备举例,手机息屏后可进入待机状态(也可称为休眠状态),当手机需要与其他电子设备交互时,需要先唤醒手机的处理器(例如CPU)及相关通信模块(例如Wi-Fi芯片)。当处理器或通信模块的唤醒次数较多时,会增加手机的功耗从而缩短待机时间。因此,用户在使用第二类型的电子设备时一般希望这类电子设备的功耗越小越好。
在本申请实施例中,上述通信系统100中可以包括X个第一类型的电子设备101和Y个第二类型的电子设备102,X+Y=N。电子设备101和电子设备102可按照一定的拓扑结构和组网算法组建网络,使得通信系统100内的各个电子设备之间可以互相 通信。
以星型拓扑结构举例,在星型拓扑结构中,网络中的各节点可通过点到点的方式连接到一个主设备(master,也可称为中心节点或中央节点)上,与主设备相连的节点可称为从设备,主设备用于集中控制和管理网络中的各个从设备。在本申请实施例中,上述通信系统100中的电子设备101或电子设备102都可以作为主设备进行组网,当通信系统100中的主设备确定后,通信系统100中的其他电子设备可作为从设备与主设备建立通信连接,从而完成通信系统100的组网过程。
在本申请实施例中,通信系统100中的各个电子设备内可存储并维护一份设备信息列表。该设备信息列表中可以包括通信系统100内每个电子设备的设备信息。例如,该设备信息可以包括设备名称、设备类型(例如第一类型或第二类型)、电量信息、唤醒时长或唤醒频率等一项或多项反映该设备状态的信息。其中,对于第二类型的电子设备102,电量信息是指电子设备102剩余的电池容量或电量百分比;对于第一类型的电子设备101,由于用户对这类电子设备的电量通常不做要求,因此可在设备信息列表中将电子设备101的电量信息设置为100%,或者,电子设备101的设备信息列表中可以不设置电量信息这一参数。上述唤醒时长是指一定时间内电子设备中的处理器被唤醒后的工作时长。上述唤醒频率是指一定时间内电子设备中处理器被唤醒的次数。
示例性的,电子设备A存储的设备信息列表如表1所示,电子设备A通过该设备信息列表可查询到通信系统100中其他电子设备(例如音箱1、路由器或手机1)的具体名称、类型、电量以及唤醒时长等设备状态。也就是说,每个电子设备通过自身存储的设备信息列表可以获知通信系统100中其他电子设备最新的设备状态。
表1
设备名称 设备类型 电量信息 唤醒时长(最近24小时) ……
音箱1 第一类型 100% 3小时10分钟 ……
路由器 第一类型 100% 24小时 ……
手机1 第二类型 67% 5小时46分钟 ……
需要说明的是,上述表1中也可以包括电子设备A自身的设备信息。另外,上述表1中所示的设备信息仅为举例说明,可以理解的是,该设备信息还可以包括设备型号、设备的入网时间、IP(internet protocol,互联网协议)地址、MAC(media access control,媒体访问控制)地址、设备提供的服务、自定义的业务信息等,本领域技术人员可根据实际经验或实际应用场景对此进行设置,本申请实施例对此不做任何限制。
那么,上述通信系统100中的各个电子设备在组网时,每个电子设备可根据自身存储的设备信息列表获取到通信系统100中各个电子设备最新的设备状态,进而,该电子设备可根据通信系统100中各个电子设备最新的设备状态,确定出当前通信系统100中的主设备具体为哪一个电子设备。
仍以电子设备A举例,电子设备A查询表1所示的设备信息列表后,可确定通信系统100中是否包含第一类型的电子设备101。如果包含第一类型的电子设备101,则电子设备A可优先将第一类型的电子设备101(例如路由器)确定为通信系统100中的主设备。
例如,当第一类型的电子设备101有多个时,电子设备A可将入网时间最早的电子设备101确定为本次组网的主设备。又例如,当第一类型的电子设备101有多个时,电子设备A可按照预设的优先级顺序将优先级最高的电子设备101确定为本次组网的主设备。
通常,作为主设备的电子设备在网络中的负载一般较高,而当第一类型的电子设备101为通信系统100中的主设备时,由于电子设备101可使用外接电源向自身供电,因此电子设备101作为主设备在高负载状态下运行时的稳定性较强,主设备出现断电等异常情况的几率较低,设备组网后网络的持续时间较长。
相应的,如果通信系统100中不包含第一类型的电子设备101,则电子设备A可根据上述设备信息列表中第二类型的电子设备102的设备信息,从多个电子设备102中确定一个主设备。
例如,电子设备A可根据表1中不同电子设备102的电量信息,将电量大于预设值或电量最高的电子设备102确定为本次组网的主设备。也就是说,当没有第一类型的电子设备101时,通信系统100中的电子设备在组网时可将电量较高的第二类型的电子设备102确定为主设备,减少组网后主设备因电量较低而出现异常的情况,从而保证组网后网络的稳定性以及网络的持续时间。
又例如,电子设备A可根据表1中不同电子设备102的唤醒时长,将唤醒时长大于预设值或唤醒时长最长的电子设备102确定为本次组网的主设备。也就是说,当没有第一类型的电子设备101时,通信系统100中的电子设备在组网时可将唤醒时长较长的第二类型的电子设备102确定为主设备。由于电子设备102在唤醒状态下作为主设备工作时不需要再额外唤醒处理器及相关通信模块增加功耗,因此,选择唤醒时长较长的电子设备102为主设备可降低组网时的功耗开销,从而保证组网后网络的稳定性以及网络的持续时间。
当然,电子设备A还可以结合各个电子设备102的电量信息、唤醒时长或其他设备信息(例如唤醒频率、当前的唤醒状态等),选择一个第二类型的电子设备102作为主设备开始组网,本申请实施例对此不做任何限制。
除了电子设备A之外,通信系统100中的其他电子设备均可按照上述方法,根据设备信息列表确定出本次组网时通信系统100内的主设备。这样,确定出的主设备可与其他电子设备(即从设备)建立通信连接(例如Wi-Fi连接或蓝牙连接等),完成本次组网过程。
组网成功后,通信系统100中的主设备可开始正常控制并管理网络中的各个从设备。如果检测到当前主设备的运行状态满足预设的主设备迁移条件,例如,主设备的电量较低或者主设备进入长期休眠状态,说明当前作为主设备的电子设备不再适合作为主设备继续运行。此时,主设备可通知通信系统100中的各个从设备重新按照上述方法确定出新的主设备进行组网,从而保证重新组网后网络的稳定性以及网络的持续时间。
也就是说,本申请实施例提供的设备组网方法还可以根据主设备的运行状态动态调整网络中的主设备,从而实时的选择通信系统100中最优的电子设备作为主设备进行组网和运行,提高网络的稳定性以及网络的持续时间。
示例性的,上述通信系统100中的电子设备具体可以是手机、平板电脑、桌面型、膝上型、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、手持计算机、上网本、个人数字助理(personal digital assistant,PDA)、可穿戴电子设备、车载设备、虚拟现实设备等,本申请实施例对此不做任何限制。
以手机为上述电子设备举例,图2示出了手机的结构示意图。
手机可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,摄像头193以及显示屏194等。
可以理解的是,本申请实施例示意的结构并不构成对手机的具体限定。在本申请另一些实施例中,手机可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过手机的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块 141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。
手机的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。手机中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在手机上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
无线通信模块160可以提供应用在手机上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,手机的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得手机可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
手机通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,手机可以包括1个或N个显示屏194,N为大于1的正整数。
手机可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,手机可以包括1个或N个摄像头193,N为大于1的正整数。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当手机在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。手机可以支持一种或多种视频编解码器。这样,手机可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展手机的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行手机的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储手机使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。
手机可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接 口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。手机可以通过扬声器170A收听音乐,或收听免提通话。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当手机接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。手机可以设置至少一个麦克风170C。在另一些实施例中,手机可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,手机还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。
传感器模块180可以包括压力传感器,陀螺仪传感器,气压传感器,磁传感器,加速度传感器,距离传感器,接近光传感器,指纹传感器,温度传感器,触摸传感器,环境光传感器,骨传导传感器等。
当然,上述手机还可以包括按键、马达、指示器以及SIM卡接口等一项或多项器件,本申请实施例对此不做任何限制。
以下将结合附图详细阐述本申请实施例提供的一种设备组网方法。
以用户家中的各个电子设备组成上述通信系统100举例,用户家中的各个电子设备可通过家中的Wi-Fi网络进行组网。示例性的,电子设备1加入家中的Wi-Fi网络后,可通过DNS(domain name system,域名系统)组播的方式向Wi-Fi网络中的其他电子设备发送自身的设备信息。并且,Wi-Fi网络中的电子设备接收到新加入的电子设备1发来的设备信息后,也可向电子设备1回复自身的设备信息。这样,电子设备1加入Wi-Fi网络时可获取到已加入该Wi-Fi网络的每个电子设备发来的自身的设备信息,形成表2所示的设备信息列表。该设备信息列表中记录了Wi-Fi网络中每个电子设备的设备信息,用于指示每个电子设备最新的设备状态。
表2
Figure PCTCN2020133591-appb-000001
如表2所示,新加入的电子设备1得到的设备信息列表中包含Wi-Fi网络中各个电子设备的设备信息。其中,该设备信息具体可以包括设备的设备名称、设备类型、电量信息、唤醒时长以及唤醒频率等。当然,上述设备信息还可以包括设备的入网时间、当前的唤醒状态、设备型号、IP地址、MAC地址、设备提供的服务(例如语音、视频、拍照等)、自定义的业务参数(例如最近一次的唤醒时间)等能够反映设备状态的参数。
与表2所示的设备信息列表类似的,上述Wi-Fi网络中的每个电子设备中均维护有一份设备信息列表,进而,每个电子设备可基于自身存储的设备信息列表确定当前Wi-Fi网络中的主设备,从而与主设备建立通信连接进行组网。
仍以电子设备1举例,如图3所示,电子设备1基于上述设备信息列表确定Wi-Fi网络中的主设备进行组网的方法可包括下述步骤300-307。
步骤300、电子设备1判断Wi-Fi网络中是否包含第一类型的电子设备。
步骤301、当Wi-Fi网络中包含第一类型的电子设备时,电子设备1将第一类型的电子设备A确定为Wi-Fi网络中的主设备。
具体的,电子设备1在确定当前Wi-Fi网络中的主设备时,可先查询自身存储的设备信息列表中是否记录有第一类型的电子设备。如果记录有第一类型的电子设备,说明当前的Wi-Fi网络中已接入了第一类型的电子设备。由于第一类型的电子设备工作时使用外接电源供电,发生断电等异常情况的几率较低,因此,电子设备1可在第一类型的电子设备中确定一个为当前Wi-Fi网络中的主设备。
示例性的,如果当前的Wi-Fi网络中只有一个第一类型的电子设备,例如,电子设备A(电子设备A也可以为电子设备1自身),则电子设备1可将这唯一的一个第一类型的电子设备A确定为当前Wi-Fi网络中的主设备。
或者,如果当前的Wi-Fi网络中包含多个第一类型的电子设备(这多个第一类型的电子设备中也可以包括电子设备1),则电子设备1可按照预设的主设备决策算法,在多个第一类型的电子设备中选择一个作为当前Wi-Fi网络中的主设备。
例如,表2所示的设备信息列表中可以记录每个电子设备接入Wi-Fi网络的入网时间。此时,上述主设备决策算法可以为:入网时间最早的第一类型的电子设备为主设备。那么,电子设备1可根据设备信息列表中各个第一类型的电子设备的入网时间,将入网时间最早的第一类型的电子设备A确定为当前Wi-Fi网络中的主设备。
又例如,上述主设备决策算法还可以为:将特定类型的电子设备优选为主设备。示例性的,可预先设置不同的第一类型设备(即第一类型的电子设备)之间的优先级顺序,例如,电视的优先级大于路由器的优先级,路由器的优先级大于智能音箱的优先级。那么,电子设备1可将设备信息列表中优先级最高的第一类型设备(例如电子设备A)确定为当前Wi-Fi网络中的主设备。
当然,上述主设备决策算法还可以为raft选举算法等其他决策算法,本领域技术人员可根据实际应用场景或实际经验设置上述第一类型设备的主设备决策算法,本申请实施例对此不做任何限制。
另外,除了上述电子设备1之外,上述Wi-Fi网络中的其他电子设备中均维护有对应的设备信息列表。因此,当Wi-Fi网络中包含第一类型的电子设备时,Wi-Fi网络 中的其他电子设备均可按照相同的主设备决策算法将第一类型的电子设备A确定为当前Wi-Fi网络中的主设备。
或者,Wi-Fi网络中的各个电子设备可按照不同的主设备决策算法投票选举当前Wi-Fi网络中的主设备。例如,电子设备1可基于其存储的设备信息列表,按照主设备决策算法1将第一类型的电子设备A确定为主设备,并向Wi-Fi网络中的其他设备广播该决策结果1。同样,电子设备2可基于其存储的设备信息列表,按照主设备决策算法2将第一类型的电子设备C确定为主设备,并向Wi-Fi网络中的其他设备广播该决策结果2。这样,Wi-Fi网络中的每个电子设备可通过投票选举的方式,将所有决策结果中票数最多的第一类型的电子设备(例如电子设备A)确定为当前Wi-Fi网络中的主设备。
在一些实施例中,可以设置由Wi-Fi网络中的各个第一类型的电子设备参加上述投票选举过程。也就是说,当Wi-Fi网络中包含多个第一类型的电子设备时,可由这多个第一类型的电子设备互相投票选举出当前Wi-Fi网络中的主设备。此时,Wi-Fi网络中第二类型的电子设备无需参加上述投票选举过程,从而可降低第二类型的电子设备的功耗开销。
可以看出,在进行设备组网时,当待组网的多个设备中包含第一类型的电子设备时,可优先选择将第一类型的电子设备作为网络中的主设备。一方面,第一类型的电子设备作为主设备时发生断电等异常情况的几率较低,可保证组网后整个网络的稳定性。另一方面,第一类型的电子设备作为主设备时可减轻网络中第二类型的电子设备的功耗开销,从而延续组网后整个网络的持续时间。
当然,如果当前的Wi-Fi网络中不包含第一类型的电子设备,则电子设备1以及Wi-Fi网络中的其他电子设备可按照下述步骤305中的方法,在第二类型的电子设备中确定当前Wi-Fi网络中的主设备。
步骤302、电子设备1与电子设备A建立通信连接。
当电子设备1将第一类型的电子设备A确定为Wi-Fi网络中的主设备后,如图4所示,电子设备1可作为从设备与主设备(即电子设备A)建立通信连接。例如,该通信连接可以是L3层的网络连接。
其中,L3层的网络连接具体可以是TCP(transmission control protocol,传输控制协议)连接或基于UDP(user datagram protocol,用户数据报协议)的网络连接,例如基于UDP的CoAP(constrained application protocol,受限应用程序协议)连接,本申请实施例对此不做任何限制。
除了电子设备1之外,仍如图4所示,Wi-Fi网络中的其他电子设备也可按照上述步骤301中的方法将电子设备A确定为Wi-Fi网络中的主设备,并与电子设备A建立通信连接,这样,Wi-Fi网络中的电子设备A作为主设备与其他各个电子设备之间组建形成了星型拓扑结构的网络。
在一些实施例中,Wi-Fi网络中的电子设备A在执行上述步骤301时,也可以确定出自身为当前Wi-Fi网络中的主设备。那么,电子设备A确定出自己为主设备后也可以向Wi-Fi网络中的其他电子设备广播主设备更新的消息,该消息中可以携带电子设备A的标识。其他电子设备接收到该消息后可执行步骤302与电子设备A建立通信 连接,完成星型拓扑结构的组网过程。
步骤303、电子设备1定期向电子设备A发送自身的设备信息,并从电子设备A中获取最新的设备信息列表。
当电子设备1等各个从设备与电子设备A(即主设备)建立了通信连接,形成星型拓扑结构的组网后,电子设备A可作为中心节点接收Wi-Fi网络中各个从设备定期发送的设备信息,进而更新设备信息列表中对应设备的设备信息,使得电子设备A存储的设备信息列表中的各个设备信息处于最新的状态。并且,Wi-Fi网络中的各个从设备还可以从电子设备A中获取最新的设备信息列表,使得Wi-Fi网络中的每个设备均可获知其他设备最新的设备状态。
示例性的,当电子设备1为第一类型的电子设备时,电子设备1可启动预设的定时器T1。当定时器T1超时时,电子设备1可作为从设备向当前的主设备(即电子设备A)发送自身最新的设备信息。电子设备A接收到电子设备1发来的设备信息后,可更新其设备信息列表中对应的电子设备1的设备信息,使得电子设备A中存储的设备信息列表处于最新的状态。
并且,电子设备A接收到电子设备1发来的设备信息后,还可以将最新的设备信息列表发送给电子设备1,使得电子设备1通过该设备信息列表可获知Wi-Fi网络内其他电子设备最新的设备状态。
相应的,当电子设备1为第二类型的电子设备时,电子设备1可启动预设的定时器T2。当定时器T2超时时,电子设备1可作为从设备向当前的主设备(即电子设备A)发送自身最新的设备信息。同样,电子设备A可更新其设备信息列表中对应的电子设备1的设备信息。并且,电子设备A可将最新的设备信息列表发送给电子设备1,使得电子设备1中存储的设备信息列表与电子设备A中存储的设备信息列表同步,均处于最新的状态。
不同的是,当电子设备1为第二类型的电子设备时,电子设备1在休眠状态下与电子设备A交互时需要消耗额外的功耗唤醒电子设备1的处理器,造成电子设备1的功耗增加。因此,可设置电子设备1启动的定时器T2的周期与自身的设备唤醒周期同步。也就是说,可以在电子设备1处于唤醒状态时触发电子设备1向电子设备A发送自身最新的设备信息,并从电子设备A获取最新的设备信息列表。
例如,由于第二类型的电子设备(例如手机、平板电脑)会定期向PUSH消息服务器发送心跳报文。那么,可设置定时器T2的定时时长与电子设备1发送心跳报文的周期同步。这样,电子设备1每次被唤醒向PUSH消息服务器发送心跳报文的同时,可向电子设备A发送自身最新的设备信息,从而减少了电子设备1从休眠状态被唤醒至唤醒状态的唤醒次数,降低了电子设备1的功耗。
其中,电子设备处于唤醒状态可以是指电子设备中处理器被唤醒工作的状态,相应的,电子设备处于休眠状态可以是指电子设备中处理器处于休眠或低功耗的状态。示例性的,电子设备中可预先设置相应的标志位用于指示处理器的工作状态。例如,当该标志位为01时,说明电子设备的处理器处于工作状态,当该标志位为00时,说明电子设备的处理器处于休眠状态。那么,电子设备通过统计上述标志位的持续时间,可确定出电子设备处于唤醒状态或休眠状态的时长或频率。
除了电子设备1之外,Wi-Fi网络中的其他从设备也可以按照上述方法定期向电子设备A(即主设备)发送自身的设备信息,并从电子设备A中获取最新的设备信息列表,使得整个Wi-Fi网络中每个从设备存储的设备信息列表与电子设备A(即主设备)中存储的设备信息列表同步,均处于最新的状态。
步骤304、当电子设备1检测到与电子设备A之间的连接断开后,在Wi-Fi网络中广播主设备异常消息。
电子设备1将电子设备A作为主设备,与电子设备A建立通信连接后,如图5所示,如果电子设备1检测到与电子设备A之间的通信连接断开,例如,电子设备1与电子设备A之间的通信连接超时,或者,电子设备1向电子设备A连续N次发送设备信息时均发送失败,则说明此时电子设备A可能出现了掉线、故障或断电等异常情况,导致电子设备1与电子设备A之间的连接断开。那么,为了保证Wi-Fi网络中的各个电子设备能够继续组网运行,电子设备1可向Wi-Fi网络中的其他电子设备广播主设备异常消息,告知其他电子设备当前的主设备(即电子设备A)发生异常,以触发Wi-Fi网络中的各个电子设备开始重新选择新的主设备进行组网。
示例性的,电子设备1在广播主设备异常消息时,还可以在主设备异常消息中携带电子设备1最新的设备信息。接收到该主设备异常消息的电子设备也可在Wi-Fi网络中广播自身最新的设备信息。这样,当主设备(即电子设备A)发生异常后,Wi-Fi网络中的每个电子设备均可以获取到其他设备最新的设备信息,从而得到一份最新的设备信息列表。后续,Wi-Fi网络中的每个电子设备可基于该最新的设备信息列表重新选择新的主设备进行组网。
步骤304中是以电子设备1检测到与电子设备A连接超时举例说明的,可以理解的是,当Wi-Fi网络中的其他从设备检测到与电子设备A连接超时后,也可以按照步骤304的方法在Wi-Fi网络中广播主设备异常消息,触发Wi-Fi网络中的各个电子设备开始重新选择新的主设备进行组网。
仍以电子设备1举例,当电子设备1开始重新选择新的主设备进行组网时,可查询当前存储的最新的设备信息列表中是否记录有第一类型的电子设备,即当前的Wi-Fi网络中是否包含第一类型的电子设备。如果包含第一类型的电子设备,则电子设备1可继续按照上述步骤301所述的方法确定新的主设备。相应的,如果不包含第一类型的电子设备,则电子设备1可执行下述步骤305确定新的主设备。
另外,如果电子设备A(即主设备)检测到与某一从设备之间的通信连接断开,说明该从设备可能出现了掉线、故障或断电等异常情况。那么,电子设备A可在维护的设备信息列表中将该从设备的相关设备信息删除,使得电子设备A中存储的设备信息列表处于最新的状态。
步骤305、当Wi-Fi网络中不包含第一类型的电子设备时,电子设备1将第二类型的电子设备B确定为Wi-Fi网络中的主设备。
仍以电子设备1举例,如果电子设备1检测到与电子设备A之间的连接断开,或接收到其他电子设备广播的主设备异常消息,说明此时需要在Wi-Fi网络中重新选择新的主设备进行组网。那么,电子设备1可在存储的最新的设备信息列表中查询是否记录有第一类型的电子设备。
如果设备信息列表中没有记录第一类型的电子设备,说明当前的Wi-Fi网络中不包含第一类型的电子设备,则电子设备1可根据设备信息列表中第二类型的电子设备的设备信息,将第二类型的电子设备B确定为当前Wi-Fi网络中的主设备。
示例性的,如果当前的Wi-Fi网络中只有一个第二类型的电子设备,例如,电子设备B(电子设备B也可以为电子设备1自身),则电子设备1可将这唯一的一个第一类型的电子设备B确定为当前Wi-Fi网络中的主设备。
或者,如果当前的Wi-Fi网络中包含多个第二类型的电子设备(即第二类型设备),则电子设备1可根据设备信息列表中这些第二类型设备的电量信息、唤醒时间或唤醒频率等参数,选择一个第二类型设备作为当前Wi-Fi网络中的主设备。
例如,电子设备1可将设备信息列表中电量最高的第二类型设备(例如电子设备B)确定为当前Wi-Fi网络中的主设备。也就是说,当Wi-Fi网络中不包含第一类型的电子设备时,可将电量较高的第二类型设备确定为主设备进行组网,减少组网后主设备因电量较低而出现异常的情况,从而保证组网后网络的稳定性以及网络的持续时间。
又例如,电子设备1可将设备信息列表中唤醒时间最长的第二类型设备(例如电子设备B)确定为当前Wi-Fi网络中的主设备。当电子设备B的唤醒时间越长时,电子设备B作为主设备工作时需要额外唤醒其处理器开始工作的次数越少。因此,当Wi-Fi网络中不包含第一类型的电子设备时,选择唤醒时间越长的第二类型设备作为主设备进行组网,可降低组网时的功耗开销,从而保证组网后网络的稳定性以及网络的持续时间。
又例如,电子设备1可将设备信息列表中唤醒频率最高的第二类型设备(例如电子设备B)确定为当前Wi-Fi网络中的主设备。类似的,当电子设备B的唤醒频率越高时,电子设备B使用越频繁,电子设备B中处理器处于工作状态的时间越长,此时电子设备B作为主设备工作时从休眠状态被唤醒的次数越少。因此,当Wi-Fi网络中不包含第一类型的电子设备时,选择唤醒频率越高的第二类型设备作为主设备进行组网,可降低组网时的功耗开销,从而保证组网后网络的稳定性以及网络的持续时间。
又或者,电子设备1可结合第二类型设备的唤醒时间和唤醒频率选择最优的第二类型设备作为当前Wi-Fi网络中的主设备。例如,电子设备1可在唤醒时间大于第一预设值(例如大于5小时)的多个第二类型设备中,选择唤醒频率最高的第二类型设备作为当前Wi-Fi网络中的主设备。
又或者,电子设备1存储的设备信息列表中还可以包括当前各个第二类型设备的唤醒状态,即当前第二类型的电子设备处于唤醒状态或休眠状态。那么,电子设备1在多个第二类型设备中确定主设备时,还可以结合当前第二类型设备的唤醒状态选择主设备。例如,如果唤醒时间大于第一预设值,且唤醒频率大于第二预设值的第二类型设备有多个,则电子设备1可优先将当前处于唤醒状态的第二类型设备作为当前Wi-Fi网络中的主设备。这样,处于唤醒状态的第二类型设备切换为主设备工作时无需额外唤醒其处理器增加设备功耗。
又或者,电子设备1可结合第二类型设备的电量信息、唤醒时间以及唤醒频率等多项参数选择最优的第二类型设备作为当前Wi-Fi网络中的主设备。例如,当唤醒时间大于第一预设值,且唤醒频率大于第二预设值的第二类型设备有多个时,电子设备 1可在这多个第二类型设备中选择电量最高的第二类型设备作为当前Wi-Fi网络中的主设备。这样,既可以降低因唤醒该第二类型的主设备而带来的功耗开销,还可以减少组网后主设备因电量较低而出现异常的情况,从而保证组网后网络的稳定性以及网络的持续时间。
在另一些实施例中,电子设备1还可以选择多个第二类型设备轮流作为Wi-Fi网络中的主设备进行工作。例如,如果电子设备1在其设备信息列表中查询到当前Wi-Fi网络中包含3个第二类型设备,则电子设备1可确定由这3个第二类型设备以一定的工作周期(例如2小时)轮流作为Wi-Fi网络中的主设备进行工作。又例如,电子设备1可根据第二类型设备的电量信息和唤醒时间确定出电量较高且唤醒时间较长的2个第二类型设备,进而,电子设备1可确定由这2个第二类型设备以一定的工作周期轮流作为Wi-Fi网络中的主设备进行工作。
另外,除了上述电子设备1之外,上述Wi-Fi网络中的其他电子设备中均存储有与电子设备1同步的设备信息列表。因此,当Wi-Fi网络中原有的主设备(即电子设备A)发生异常时,Wi-Fi网络中的其他电子设备均可按照上述步骤301或305中所述的方法重新确定当前Wi-Fi网络中的主设备。
可以看出,当待组网的多个电子设备中不包含第一类型的电子设备时,电子设备可在第二类型的电子设备中根据各个第二类型的电子设备的唤醒时长、电量等参数优先选择有利于组网时功耗开销较小且网络持续时间较长的电子设备作为主设备,从而保证组网后整个网络的稳定性。
步骤306、电子设备1与电子设备B建立通信连接。
与步骤302类似的,当电子设备1将第二类型的电子设备B确定为Wi-Fi网络中的主设备后,如图6所示,电子设备1可作为从设备与主设备(即电子设备B)建立通信连接,并断开与原主设备(即电子设备A)之间的通信连接。
除了电子设备1之外,Wi-Fi网络中的其他电子设备也可按照上述步骤305中的方法将电子设备B确定为Wi-Fi网络中新的主设备,并与新的主设备建立通信连接,这样,仍如图6所示,Wi-Fi网络中的电子设备B作为新的主设备与其他各个电子设备之间再次组建形成了星型拓扑结构的网络。对于用户而言,Wi-Fi网络中原有的主设备发生异常时,Wi-Fi网络中的其他设备可感知到该异常情况并自动确定出新的主设备重新进行组网,用户仍然可以正常使用该Wi-Fi网络对完成对相关电子设备的控制功能,从而提高了用户的使用体验。
当电子设备1等各个从设备与新的主设备(即电子设备B)建立了通信连接,形成星型拓扑结构的组网后,与电子设备A作为主设备的工作过程类似的,此时电子设备B可作为中心节点接收Wi-Fi网络中各个从设备定期发送的设备信息,进而更新设备信息列表中对应设备的设备信息,使得电子设备B存储的设备信息列表中的各个设备信息处于最新的状态。并且,Wi-Fi网络中的各个从设备还可以从电子设备B中获取最新的设备信息列表,使得Wi-Fi网络中每个设备存储的设备信息列表与电子设备B中存储的设备信息列表同步,均处于最新的状态。
步骤307、当电子设备B的运行状态满足预设的主设备迁移条件时,电子设备1重新执行上述步骤301或305。
当第二类型的电子设备B作为主设备开始工作后,电子设备B可实时检测自身的运行状态是否满足预设的主设备迁移条件。如图7所示,当满足预设的主设备迁移条件时,说明电子设备B已经不适合作为此时Wi-Fi网络中的主设备继续工作。那么,电子设备B可向Wi-Fi网络中的各个从设备广播主设备迁移消息,触发接收到该主设备迁移消息的从设备(例如电子设备1)通过执行上述步骤301或305开始重新选择新的主设备进行组网。
示例性的,上述主设备迁移条件可以包括:主设备的电量低于预设电量,或主设备的电量低于任意一个从设备的电量。
例如,电子设备B作为主设备开始工作后,可以实时获取自身的电量信息。当自身的电量低于预设电量(例如50%)时,此时电子设备B继续作为主设备工作容易出现电量耗尽等影响网络稳定性的情况,因此,电子设备B可向Wi-Fi网络中的各个从设备广播主设备迁移消息,触发从设备重新选择新的主设备进行组网。
又例如,电子设备B作为主设备开始工作后,可以实时获取自身的电量信息,并在设备信息列表中比较自身的电量信息与其他电子设备的电量信息。如果自身的电量低于Wi-Fi网络中各个从设备的电量,或者,自身的电量低于大部分从设备(例如80%的从设备)的电量,同样,电子设备B此时继续作为主设备工作容易出现电量耗尽等影响网络稳定性的情况,因此,电子设备B可向Wi-Fi网络中的各个从设备广播主设备迁移消息,触发从设备重新选择新的主设备进行组网。
示例性的,上述主设备迁移条件可以包括:主设备的唤醒时长小于预设的唤醒时长,或主设备的唤醒频率小于预设的唤醒频率。
例如,电子设备B作为主设备开始工作后,可以根据处理器的工作时长统计电子设备B处于唤醒状态的唤醒时长。当检测到电子设备B的唤醒时长小于预设的唤醒时长时,说明电子设备B中处理器被唤醒的时间较短,这会导致电子设备B作为主设备工作时需要额外唤醒处理器增加电子设备B的功耗,因此,电子设备B可向Wi-Fi网络中的各个从设备广播主设备迁移消息,触发从设备重新选择新的主设备进行组网。或者,电子设备B也可以根据处理器的休眠时长统计电子设备B处于休眠状态的休眠时长。如果电子设备B的休眠时长大于预设的休眠时长,说明电子设备B已进入休眠状态,若电子设备B继续作为主设备工作需要额外唤醒处理器增加电子设备B的功耗,因此,电子设备B可向Wi-Fi网络中的各个从设备广播主设备迁移消息,触发从设备重新选择新的主设备进行组网。
又例如,电子设备B作为主设备开始工作后,还可以根据处理器的工作频率统计出电子设备B的唤醒频率。如果电子设备B的唤醒频率小于预设的唤醒频率,说明电子设备B中处理器被唤醒的次数较少,若电子设备B继续作为主设备工作需要额外唤醒处理器增加电子设备B的功耗,因此,电子设备B可向Wi-Fi网络中的各个从设备广播主设备迁移消息,触发从设备重新选择新的主设备进行组网。
可以理解的是,上述主设备迁移条件还可以包括其他影响电子设备B作为主设备继续工作的条件,本申请实施例对此不做任何限制。例如,该主设备迁移条件还可以为主设备的工作时长大于预设时长。那么,如果检测到电子设备B作为主设备时工作的工作时长大于预设时长时,为了避免主设备的工作任务为电子设备B带来过高的负 载,电子设备B可向Wi-Fi网络中的各个从设备广播主设备迁移消息,触发从设备重新选择新的主设备进行组网。
另外,当上述Wi-Fi网络中接入了新的电子设备时,也可触发Wi-Fi网络中的各个电子设备通过执行上述步骤301或305开始重新选择新的主设备进行组网,本申请实施例对此不做任何限制。
可以看出,本申请实施例提供的设备组网方法可以根据当前主设备的运行状态确定该主设备是否适合继续作为主设备工作。如果当前作为主设备的电子设备不再适合作为主设备继续工作,则可触发Wi-Fi网络中的电子设备重新选择Wi-Fi网络中最优的电子设备作为新的主设备进行组网和运行,从而动态地调整网络中的主设备,使得网络的稳定性以及网络的持续时间达到最优。
需要说明的是,上述实施例中是以电子设备在Wi-Fi网络中进行设备组网举例说明的,可以理解的是,电子设备还可以在蓝牙、近距离无线通信技术(near field communication,NFC)、基于互联网协议的语音通话(voice over Internet protocol,VoIP)、以太网、全球移动通讯系统(global system for mobile communications,GSM)、通用分组无线服务(general packet radio service,GPRS)、码分多址接入(code division multiple access,CDMA)、宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE)等通信网络中使用上述组网方法组建星型拓扑结构的网络,本申请实施例对此不做任何限制。
如图8所示,本申请实施例公开了一种电子设备,包括:通信模块801;一个或多个处理器802;一个或多个存储器803;一个或多个应用程序(未示出);以及一个或多个计算机程序804,上述各器件可以通过一个或多个通信总线805连接。其中,该一个或多个计算机程序804被存储在上述存储器803中并被配置为被该一个或多个处理器802执行,该一个或多个计算机程序804包括指令,上述指令可以用于执行上述应实施例中图3所示的步骤300-307。
示例性的,上述处理器802具体可以为图2所示的处理器110,上述存储器803具体可以为图2所示的内部存储器121,上述通信模块801具体可以为图2所示的移动通信模块150或无线通信模块160。当然,电子设备中还可以包括显示屏、触摸传感器等器件,本申请实施例对此不做任何限制。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请实施例各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方 案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:快闪存储器、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请实施例的具体实施方式,但本申请实施例的保护范围并不局限于此,任何在本申请实施例揭露的技术范围内的变化或替换,都应涵盖在本申请实施例的保护范围之内。因此,本申请实施例的保护范围应以所述权利要求的保护范围为准。

Claims (18)

  1. 一种设备组网方法,其特征在于,包括:
    第一设备在通信系统中将第二设备确定为主设备,所述第二设备为第一类型设备,所述第一设备为第二类型设备,所述第一类型设备为通过外接电源供电的设备,所述第二类型设备为使用电池供电的设备;
    所述第一设备作为从设备与所述第二设备建立通信连接;
    当所述第二设备出现异常时,所述第一设备在所述通信系统中将第三设备确定为新的主设备,所述第三设备为所述第二类型设备;
    所述第一设备作为从设备与所述第三设备建立通信连接。
  2. 根据权利要求1所述的方法,其特征在于,所述第一设备在的通信系统中将第二设备确定为主设备,包括:
    所述第一设备查询所述通信系统中是否包含所述第一类型设备;
    若包含所述第一类型设备,则所述第一设备在所述第一类型设备中将所述第二设备确定为主设备。
  3. 根据权利要求2所述的方法,其特征在于,所述第一设备中存储有设备信息列表,所述设备信息列表中记录有所述通信系统中各个设备的设备信息,所述设备信息包括设备类型;
    其中,所述第一设备查询所述通信系统中是否包含所述第一类型设备,包括:
    所述第一设备根据所述设备信息列表中各个设备的设备类型,查询所述通信系统内是否包含所述第一类型设备。
  4. 根据权利要求2所述的方法,其特征在于,所述第一设备在所述第一类型设备中将所述第二设备确定为主设备,包括:
    若所述第一类型设备中仅包括所述第二设备,则所述第一设备将所述第二设备确定为主设备;
    若所述第一类型设备中包括多个设备,则所述第一设备根据预设的主设备决策算法,从多个所述第一类型设备中选出所述第二设备作为主设备。
  5. 根据权利要求1-4中任一项所述的方法,其特征在于,当所述第二设备出现异常时,所述第一设备在所述通信系统中将第三设备确定为新的主设备,包括:
    当所述第二设备出现异常时,所述第一设备查询所述通信系统中是否包含所述第一类型设备;
    若不包含所述第一类型设备,则所述第一设备在所述第二类型设备中将所述第三设备确定为新的主设备。
  6. 根据权利要求5所述的方法,其特征在于,所述第一设备在所述第二类型设备中将所述第三设备确定为新的主设备,包括:
    所述第一设备根据设备信息列表中所述第二类型设备的设备信息,将所述第三设备确定为新的主设备。
  7. 根据权利要求5或6所述的方法,其特征在于,
    所述第三设备为所述第二类型设备中电量大于电量阈值的设备;和/或,所述第三设备为所述第二类型设备中唤醒时间大于时间阈值的设备;和/或,所述第三设备为所 述第二类型设备中唤醒频率大于频率阈值的设备。
  8. 根据权利要求1-7中任一项所述的方法,其特征在于,在所述第一设备作为从设备与所述第二设备建立通信连接之后,还包括:
    所述第一设备定期向所述第二设备发送所述第一设备的设备信息,并从所述第二设备中获取所述通信系统中最新的设备信息列表。
  9. 根据权利要求8所述的方法,其特征在于,所述第一设备向所述第二设备发送设备信息的周期与所述第一设备的心跳周期相同。
  10. 根据权利要求1-9中任一项所述的方法,其特征在于,在所述第一设备作为从设备与所述第二设备建立通信连接之后,还包括:
    若所述第一设备接收到所述通信系统内其他从设备发送的主设备异常消息,则所述第一设备确定所述第二设备出现异常;或者,
    若所述第一设备检测到与所述第二设备之间的通信连接断开,则所述第一设备确定所述第二设备出现异常。
  11. 根据权利要求1-10中任一项所述的方法,其特征在于,在所述第一设备作为从设备与所述第三设备建立通信连接之后,还包括:
    若所述第一设备接收到所述第三设备发送的主设备迁移消息,则所述第一设备在所述通信系统中重新确定新的主设备。
  12. 根据权利要求1-11中任一项所述的方法,其特征在于,在所述第一设备作为从设备与所述第二设备建立通信连接之后,还包括:
    当所述第二设备出现异常时,所述第一设备将自身确定为所述通信系统中新的主设备;
    所述第一设备作为主设备与所述通信系统中的其他设备建立通信连接,组成星型拓扑结构的网络。
  13. 根据权利要求12所述的方法,其特征在于,在所述第一设备将自身确定为所述通信系统中新的主设备之后,还包括:
    所述第一设备检测所述第一设备的运行状态是否满足预设的主设备迁移条件;
    若满足预设的主设备迁移条件,则所述第一设备向所述通信系统中的其他设备发送主设备迁移消息。
  14. 根据权利要求13所述的方法,其特征在于,所述主设备迁移条件包括:主设备的电量小于电量阈值;和/或,主设备的唤醒时间小于时间阈值;和/或,主设备的唤醒频率小于频率阈值。
  15. 一种电子设备,其特征在于,包括:
    一个或多个处理器;
    存储器;
    通信模块;
    其中,所述存储器中存储有一个或多个计算机程序,所述一个或多个计算机程序包括指令,当所述指令被所述电子设备执行时,使得所述电子设备执行如权利要求1-14中任一项所述的一种设备组网方法。
  16. 一种通信系统,其特征在于,所述通信系统中包括一个或多个第一类型设备 以及一个或多个第二类型设备,所述第一类型设备为通过外接电源供电的设备,所述第二类型设备为使用电池供电的设备;
    当第一设备为所述第二类型设备时,所述第一设备用于执行如权利要求1-14中任一项所述的一种设备组网方法。
  17. 一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,其特征在于,当所述指令在电子设备上运行时,使得所述电子设备执行如权利要求1-14中任一项所述的一种设备组网方法。
  18. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在电子设备上运行时,使得所述电子设备执行如权利要求1-14中任一项所述的一种设备组网方法。
PCT/CN2020/133591 2019-12-11 2020-12-03 一种设备组网方法、电子设备及系统 WO2021115193A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP20900056.1A EP4044755A4 (en) 2019-12-11 2020-12-03 DEVICE NETWORKING METHOD, ELECTRONIC DEVICE AND SYSTEM

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911268282.2 2019-12-11
CN201911268282.2A CN112954819B (zh) 2019-12-11 2019-12-11 一种设备组网方法、电子设备及系统

Publications (1)

Publication Number Publication Date
WO2021115193A1 true WO2021115193A1 (zh) 2021-06-17

Family

ID=76234125

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/133591 WO2021115193A1 (zh) 2019-12-11 2020-12-03 一种设备组网方法、电子设备及系统

Country Status (3)

Country Link
EP (1) EP4044755A4 (zh)
CN (1) CN112954819B (zh)
WO (1) WO2021115193A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113453207B (zh) * 2021-06-21 2024-03-22 青岛海尔科技有限公司 身份类型确定方法、装置、存储介质及电子装置
CN114248657A (zh) * 2021-12-14 2022-03-29 浙江智充电力科技有限公司 基于现场总线的充电桩功率动态调节系统及方法
CN114979176A (zh) * 2022-05-11 2022-08-30 江苏领焰智能科技股份有限公司 基于网络的调光数据热备份方法、系统、设备及存储介质
CN117295183A (zh) * 2022-06-16 2023-12-26 华为技术有限公司 一种组网方法、系统及相关装置
CN115551124A (zh) * 2022-09-15 2022-12-30 Oppo广东移动通信有限公司 一种组网方法、装置、设备以及计算机存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004080400A (ja) * 2002-08-19 2004-03-11 Matsushita Electric Ind Co Ltd 自動ロール決定システム
CN1701570A (zh) * 2003-06-02 2005-11-23 松下电器产业株式会社 执行主/从切换处理的设备,方法及程序
CN104837168A (zh) * 2014-02-12 2015-08-12 华为技术有限公司 一种设备切换方法、设备及系统
CN105182774A (zh) * 2015-09-15 2015-12-23 烽火通信科技股份有限公司 基于G.hn的智能家庭网关控制系统及方法
US20170055104A1 (en) * 2015-08-19 2017-02-23 Gojo Industries, Inc. Wireless sensor network

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001103570A (ja) * 1999-09-30 2001-04-13 Toshiba Corp 通信システム、この通信システムに用いられる通信装置及び通信方法
US6704584B2 (en) * 2002-04-16 2004-03-09 Thomson Licensing S.A. Mechanism for a wireless device to relinquish its network master status based on its power reserve
JP4006452B2 (ja) * 2005-06-13 2007-11-14 キヤノン株式会社 通信装置、通信方法及びその通信方法をコンピュータに実行させるためのコンピュータプログラム
GB2483092A (en) * 2010-08-26 2012-02-29 Sivapathalingham Sivavakeesar A converged home network with context based delivery
US9052964B2 (en) * 2012-09-28 2015-06-09 International Business Machines Corporation Device operability enhancement with alternative device utilization
US9270708B2 (en) * 2013-02-20 2016-02-23 Apple Inc. System and method of establishing communication between electronic devices
CN113473518B (zh) * 2017-10-17 2023-11-03 华为技术有限公司 一种网络接入方法及设备
CN109842508B (zh) * 2017-11-27 2022-04-05 华为技术有限公司 多终端协同工作的方法,终端设备以及多终端协同系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004080400A (ja) * 2002-08-19 2004-03-11 Matsushita Electric Ind Co Ltd 自動ロール決定システム
CN1701570A (zh) * 2003-06-02 2005-11-23 松下电器产业株式会社 执行主/从切换处理的设备,方法及程序
CN104837168A (zh) * 2014-02-12 2015-08-12 华为技术有限公司 一种设备切换方法、设备及系统
US20170055104A1 (en) * 2015-08-19 2017-02-23 Gojo Industries, Inc. Wireless sensor network
CN105182774A (zh) * 2015-09-15 2015-12-23 烽火通信科技股份有限公司 基于G.hn的智能家庭网关控制系统及方法

Also Published As

Publication number Publication date
CN112954819A (zh) 2021-06-11
CN112954819B (zh) 2023-09-22
EP4044755A4 (en) 2022-11-16
EP4044755A1 (en) 2022-08-17

Similar Documents

Publication Publication Date Title
WO2021115193A1 (zh) 一种设备组网方法、电子设备及系统
WO2021063189A1 (zh) 一种多设备之间的信息同步方法、系统及电子设备
CN110364151B (zh) 一种语音唤醒的方法和电子设备
WO2020133183A1 (zh) 音频数据的同步方法及设备
WO2021185141A1 (zh) Wi-Fi Aware的建链方法、系统、电子设备和存储介质
CN111369988A (zh) 一种语音唤醒方法及电子设备
CN112533269B (zh) 一种数据收发方法、电子设备与计算机可读存储介质
WO2021043045A1 (zh) 一种网络配置信息的配置方法及设备
EP4311314A1 (en) Sleep scheduling method and device
WO2021013196A1 (zh) 一种同时响应的方法及设备
WO2022228051A1 (zh) 一种设备组网方法、电子设备及存储介质
WO2022237259A1 (zh) 终端设备的待机方法和终端设备
WO2021043277A1 (zh) 配置蓝牙连接参数的方法和电子设备
WO2021043250A1 (zh) 一种蓝牙通信方法及相关装置
WO2023179731A1 (zh) 休眠唤醒方法及电子设备
WO2023083068A1 (zh) 唤醒对齐方法、系统及相关装置
US20240039843A1 (en) Network Data Packet Filtering Method and Transmission Method, and Terminal Device
WO2022042265A1 (zh) 通信方法、终端设备及存储介质
WO2024051718A1 (zh) 一种数据同步方法及相关装置、系统
WO2024109623A1 (zh) 一种待机方法及装置
WO2024041359A1 (zh) 链路控制方法及电子设备
WO2023165513A1 (zh) 通信方法、电子设备及装置
WO2021098540A1 (zh) 终端设备和无线通信的方法
WO2023061217A1 (zh) 一种数据传输方法及装置
EP4322670A1 (en) Resource management method and device

Legal Events

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

Ref document number: 20900056

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020900056

Country of ref document: EP

Effective date: 20220513

NENP Non-entry into the national phase

Ref country code: DE