CN115087135A - Network distribution method and related device - Google Patents

Network distribution method and related device Download PDF

Info

Publication number
CN115087135A
CN115087135A CN202110271305.6A CN202110271305A CN115087135A CN 115087135 A CN115087135 A CN 115087135A CN 202110271305 A CN202110271305 A CN 202110271305A CN 115087135 A CN115087135 A CN 115087135A
Authority
CN
China
Prior art keywords
electronic device
data link
distribution network
success rate
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110271305.6A
Other languages
Chinese (zh)
Inventor
李前国
叶筠
王晓风
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202110271305.6A priority Critical patent/CN115087135A/en
Publication of CN115087135A publication Critical patent/CN115087135A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/11Allocation or use of connection identifiers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B5/00Near-field transmission systems, e.g. inductive or capacitive transmission systems
    • H04B5/70Near-field transmission systems, e.g. inductive or capacitive transmission systems specially adapted for specific purposes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application provides a network distribution method and a related device, and relates to the field of artificial intelligence. In the method, a first electronic device establishes a first data link with a second electronic device. The first data link is used for the first electronic device to transmit the distribution network information to the second electronic device. In the process of establishing the first data link, the first electronic equipment estimates the success rate of establishing the first data link by using a fuzzy control method. And if the estimated success rate is lower than the preset success rate, the first electronic equipment and the second electronic equipment establish a second data link, and the distribution network information is sent to the second electronic equipment through the second data link. The second electronic device can access the wireless access device by using the distribution network information. The method can reduce the time spent on waiting for the first data link to carry out overtime distribution network in the process of switching the distribution network by using the first data link to the distribution network by using the second data link, and improves the efficiency of the distribution network.

Description

Network distribution method and related device
Technical Field
The application relates to the field of artificial intelligence, in particular to a network distribution method and a related device.
Background
With the development of the internet of things technology, more and more electronic devices can be connected to a network and remotely controlled through the network. However, many electronic devices (such as a smart lamp, a smart oven, etc.) are inconvenient for users to directly input the distribution network information (such as the name and password of the router). The user can carry out network distribution for the electronic equipment which is inconvenient for the user to directly input the network distribution information through the electronic equipment such as a mobile phone, a tablet personal computer and the like.
At present, a method for a mobile phone to distribute a network to a device to be distributed may include a Neighbor Awareness Network (NAN) distribution network, a soft access point (soft ap) distribution network, a bluetooth distribution network, a sound wave distribution network, and the like. The mobile phone can combine two or more than two distribution methods to distribute the network for the equipment to be distributed so as to improve the success rate of the distribution network. The performance of the NAN distribution network is better than that of other distribution network methods. The mobile phone can use the NAN network distribution method to distribute the network for the equipment to be distributed. If the NAN distribution network fails, the mobile phone can be switched to a softAP distribution network and other methods for distributing the network for the equipment to be distributed. However, in the process of switching the distribution network method by the mobile phone, the mobile phone can be switched to other distribution network methods for distribution network only after the NAN distribution network is confirmed to be failed. In the process of network distribution, because the current network distribution method is not good and needs to be switched to another network distribution method, long time needs to be waited, so that the time for the mobile phone to distribute the network for the equipment to be distributed is too long, and the user experience is poor.
Disclosure of Invention
The application provides a network distribution method and a related device. The first electronic device may combine two or more distribution methods to distribute a network for the second electronic device. The first electronic device may estimate a probability of success of the distribution network of the previous distribution network method. When the probability that the distribution network is successfully distributed by the prior distribution network method is estimated to be low, the first electronic device can be immediately switched to the subsequent distribution network method to be distributed to the second electronic device. The time spent for waiting for the overtime of the prior distribution network method to confirm the failure of the prior distribution network method can be reduced, and the efficiency of the distribution network is improved.
In a first aspect, an embodiment of the present application provides a network distribution method. In the method, a first electronic device may establish a first data link with a second electronic device. The second electronic equipment is in a state of network distribution. The first data link may be used for the first electronic device to transmit the distribution network information to the second electronic device. The distribution network information may include a name and password of the wireless access device. The distribution network information can be used for the second electronic device to access the wireless access device. During the first data link establishment, the first electronic device may estimate a success rate of the first data link establishment. And under the condition that the success rate is smaller than the first threshold, the first electronic device may establish a second data link with the second electronic device, and send the distribution network information to the second electronic device through the second data link.
The distribution network method for the first electronic device to transmit the distribution network information to the second electronic device through the first data link may be a first distribution network method (i.e., the foregoing prior distribution network method). The distribution network method for the first electronic device to transmit the distribution network information to the second electronic device through the second data link may be a second distribution network method (i.e., the foregoing behind distribution network method).
The first network distribution method requires a first data link to be established between the first electronic device and the second electronic device. And if the first data link is failed to be established, the first distribution network method fails. That is, the success rate of establishing the first data link may indicate the probability of success of the distribution network of the first distribution network method.
The requirement for the device distance between the first electronic device and the second electronic device for establishing the first data link is higher than the requirement for the device distance for establishing the second data link.
According to the method, the first electronic device can be immediately switched to the second network distribution method to distribute the network to the second electronic device when the success rate of establishing the first data link is estimated to be smaller than the first threshold. Therefore, the time spent by the first electronic device for waiting for the time overtime of the distribution network by using the first distribution network method to confirm the failure of the first distribution network method due to the failure of the first distribution network method can be reduced, and the efficiency of the distribution network is improved.
In connection with the first aspect, the second electronic device may comprise a near field communication, NFC, tag (tag). The NFC TAG may contain an NFC TAG model. The NFC TAG module may store device identification information and TAG identification information of the second electronic device.
With reference to the first aspect, in some embodiments, the first data link may be a neighbor aware network NAN data link. Namely, the first network distribution method is a NAN network distribution network.
Before the first electronic device establishes a NAN data link with the second electronic device, the first electronic device may touch an NFC tag of the second electronic device. The method for the first electronic device to estimate the success rate of the first data link establishment may be: the first electronic device may determine a touch time and a device distance, and estimate a success rate of NAN data link establishment using the touch time and the device distance. The touch time may be a duration of time for the first electronic device to touch the NFC tag of the second electronic device. The longer the touch duration, the greater the success rate. The device distance may be a distance between the first electronic device and the second electronic device during the NAN data link establishment. The closer the equipment is, the greater the success rate.
The first electronic device may calculate the length of the touch time according to a time when the NFC signal from the second electronic device starts to be received and a time when the NFC signal from the second electronic device terminates. During NAN data link establishment, the first electronic device may calculate a received signal strength from a received signal from the second electronic device (a Wi-Fi network based communication signal). The received signal strength is related to the device distance. The greater the device distance, the lower the received signal strength. Further, the first electronic device may determine the device distance according to the conversion relationship between the received signal strength and the device distance.
In some embodiments, after the first electronic device touches the NFC tag of the second electronic device, the first electronic device may obtain the device identification information and the tag identification information of the second electronic device from the NFC tag. The device identification information may be used to uniquely identify the second electronic device. The tag identification information may be used to uniquely identify the NFC tag of the second electronic device. By using the device identification information and the tag identification information, the first electronic device may determine, from the cloud server, whether the NFC tag of the second electronic device is legal and whether the second electronic device is in a network.
The cloud server may store device identification information of a plurality of electronic devices, tag identification information of each of the plurality of electronic devices, and a distribution network status of the plurality of electronic devices. The first electronic device may transmit the device identification information acquired from the NFC tag of the second electronic device and the tag identification information to the cloud server. The cloud server may query whether the plurality of electronic devices include the second electronic device according to the received device identification information. If the plurality of electronic devices include a second electronic device, the cloud server may compare whether the received tag identification information matches the tag identification information of the second electronic device stored by the cloud server. If the first electronic device and the second electronic device are matched, the cloud server can judge that the NFC label of the second electronic device is legal. When the plurality of electronic devices are found to include the second electronic device, the cloud server may obtain the distribution network state of the second electronic device stored by the cloud server. The cloud server may send a result of whether the NFC tag is legitimate and a distribution network state of the second electronic device to the first electronic device.
If the NFC tag of the second electronic device is legal and the second electronic device is not in a network distribution, the first electronic device may establish a NAN data link with the second electronic device, and the network distribution is performed for the second electronic device through the NAN data link.
In some embodiments, the first electronic device may obtain the distribution network application from the cloud server before the first electronic device establishes the first data link with the second electronic device. The distribution network application program can be used for establishing a first data link between the first electronic device and the second electronic device, estimating the success rate of establishing the first data link in the process of establishing the first data link, establishing a second data link between the first electronic device and the second electronic device under the condition that the success rate is smaller than a first threshold value, and sending distribution network information to the second electronic device through the second data link.
In some embodiments, the method for the first electronic device to estimate the success rate of NAN data link establishment by using the touch time and the device distance may be: the first electronic equipment fuzzifies the touch time and the equipment distance to respectively obtain a first fuzzy vector and a second fuzzy vector. And the first electronic equipment determines that the fuzzy vector corresponding to the success rate is the third fuzzy vector under the condition that the touch time corresponds to the first fuzzy vector and the equipment distance corresponds to the second fuzzy vector according to the first fuzzy relation. The first fuzzy relation is used for indicating the relation among fuzzy vectors corresponding to touch time, equipment distance and success rate. And the first electronic equipment performs defuzzification on the third fuzzy vector to obtain a success rate.
In some embodiments, after the first data link is successfully established, the first electronic device may send the distribution network information to the second electronic device through the first data link. After the first data link is successfully established, the first electronic device may stop estimating the success rate of establishing the first data link. The second electronic device may send a distribution network information reception response to the first electronic device after receiving the distribution network information.
If the first electronic device does not receive the distribution network information receiving response within a preset time period after the first electronic device sends the distribution network information through the first data link, the first electronic device may determine whether the first data link still exists. If the first data link still exists, the first electronic device may send the distribution network information to the second electronic device through the first data link again. If the first data link does not exist, the first electronic device may establish a second data link with the second electronic device, and send the distribution network information to the second electronic device through the second data link.
In some embodiments, the first data link is established at the touch time. The longer the touch time of the first electronic device touching the NFC tag of the second electronic device is, the longer the time for which the first electronic device and the second electronic device are kept in the close-range state is. The longer the touch time is, the higher the success rate of establishing the NAN data link between the first electronic device and the second electronic device is. It can be appreciated that the above-described impact of touch time on the success rate of NAN data link establishment can be attributed to the impact of device distance on the success rate of NAN data link establishment. The first electronic device may reduce factors affecting the success rate of the NAN data link establishment to a device distance when estimating the success rate. That is, the first electronic device may utilize the device distance to estimate a success rate of the NAN data link establishment.
Illustratively, the first electronic device fuzzifies the device distance to obtain a distance fuzzy vector. And the first electronic equipment determines the fuzzy vector corresponding to the success rate as the success rate fuzzy vector under the condition that the distance between the equipment and the corresponding distance fuzzy vector is according to the second fuzzy relation. The second fuzzy relation is used for indicating the relation between fuzzy vectors corresponding to the equipment distance and the success rate. And the first electronic equipment performs defuzzification on the success rate fuzzy vector to obtain the success rate.
The method can also simplify the operation of the first electronic device for estimating the success rate of the NAN data link establishment, and improve the efficiency of estimating the success rate of the NAN data link establishment.
In some embodiments, the first data link may be a data link other than a NAN data link. Factors that affect the success rate of the first data link establishment may include, but are not limited to: touch time, device distance. The first electronic device may estimate the success rate of the first data link establishment using a fuzzy control method according to factors affecting the success rate of the first data link establishment.
In some embodiments, the second data link is a data link for transmitting distribution network information in any one of the following distribution network methods: the soft access point softAP distribution network, the Bluetooth distribution network and the sound wave distribution network.
In some embodiments, the second electronic device may receive the user action before the first electronic device establishes the first data link with the second electronic device. The user operation may trigger the second electronic device to enter a to-be-provisioned state.
Optionally, the NFC TAG module in the NFC TAG of the second electronic device may be connected to the microprocessor of the second electronic device through a bus. When the NFC TAG module senses that an RF field exists nearby, the NFC TAG module may send a message to the microprocessor to indicate that an NFC TAG exists where another electronic device touches a second electronic device. When detecting that other electronic devices touch the NFC tag of the second electronic device, the second electronic device can enter a to-be-networked state. The user can not trigger the second electronic equipment to enter the to-be-networked state through other user operations. The method can simplify the user operation in the process of distribution network and improve the user experience.
In a possible implementation manner, the first network distribution method is a NAN network distribution network. The second distribution network method is a softAP distribution network. When the second electronic device is in the state of waiting for network distribution, the second electronic device may send a service subscription frame to search for an electronic device that may provide network distribution services for the second electronic device. Also, the second electronic device may also broadcast the hotspot. The electronic device connected to the hotspot of the second electronic device may establish a local area network with the second electronic device. The local area network may be used to transmit distribution network information.
In a second aspect, an embodiment of the present application provides an electronic device. The electronic device is a first electronic device. The first electronic equipment comprises a communication device, a memory and a processor. Wherein the communication means are operable to establish a communication connection. The communication connection includes one or more of: NFC connection, communication connection communicating over NAN data link. The memory may be used to store a computer program. The processor may be configured to invoke the computer program described above, so that the first electronic device performs any of the possible implementations of the first aspect.
In a third aspect, an embodiment of the present application provides a chip applied to the electronic device provided in the second aspect, where the chip includes one or more processors, and the one or more processors are configured to invoke computer instructions to cause the electronic device provided in the second aspect to perform any possible implementation manner as in the first aspect.
In a fourth aspect, embodiments of the present application provide a computer program product including instructions, which, when run on a device, cause the electronic device provided in the second aspect to perform any one of the implementation manners as described in the first aspect.
In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, which includes instructions, when the instructions are executed on a device, causing the electronic device provided in the second aspect to perform any one of the possible implementation manners as in the first aspect.
It is understood that the chip provided by the third aspect, the computer program product provided by the fourth aspect, and the computer-readable storage medium provided by the fifth aspect are all used to execute the method provided by the embodiments of the present application. Therefore, the beneficial effects achieved by the method can refer to the beneficial effects in the corresponding method, and are not described herein again.
Drawings
Fig. 1 is a schematic architecture diagram of a communication system according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an electronic device 100 according to an embodiment of the present disclosure;
fig. 3 is a flowchart of a method for establishing a NAN data link according to an embodiment of the present application;
fig. 4A is a flowchart of a method for a NAN distribution network according to an embodiment of the present disclosure;
fig. 4B is a schematic timeline of a NAN distribution network according to an embodiment of the present application;
fig. 5 is a schematic view of a scenario for triggering the electronic device 200 to enter a to-be-configured network state according to an embodiment of the present application;
fig. 6 is a schematic view of a network, where the electronic device 100 is an electronic device 200, according to an embodiment of the present disclosure;
fig. 7 is a schematic diagram of a user interface of the electronic device 100 for acquiring distribution network information according to an embodiment of the present application;
fig. 8 is a flowchart of a method for a network distribution by softAP according to an embodiment of the present disclosure;
fig. 9 is a schematic diagram illustrating a method for estimating a success rate of NAN data link establishment according to an embodiment of the present application;
fig. 10 is a flowchart of a method for network distribution according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described in detail and clearly with reference to the accompanying drawings. In the description of the embodiments herein, "/" means "or" unless otherwise specified, for example, a/B may mean a or B; the "and/or" in the text is only an association relation describing the association object, and indicates that three relations may exist, for example, a and/or B may indicate: three cases of a alone, a and B both, and B alone exist, and in addition, "a plurality" means two or more than two in the description of the embodiments of the present application.
In the following, the terms "first", "second" are used for descriptive purposes only and are not to be understood as implying or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of embodiments of this application, a "plurality" means two or more unless indicated otherwise.
Fig. 1 illustrates an architectural diagram of a communication system 10 to which the present application relates.
As shown in fig. 1, the communication system 10 may include an electronic device 100, an electronic device 200, a router 300, and a cloud server 400. The electronic device 100 may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a Personal Digital Assistant (PDA), and the like. The electronic device 200 may be an intelligent lamp, an intelligent oven, an intelligent fan, an intelligent air conditioner, an intelligent television, an intelligent bracelet, an intelligent sound box, an intelligent refrigerator, an intelligent door and window, an intelligent automobile, an intelligent monitor, an intelligent robot, etc. The embodiment of the present application does not limit the specific types of the electronic devices 100 and 200.
Electronic device 100 may be in a connected state with router 300. Electronic device 100 may be a network for electronic device 200. That is, the electronic device 200 is a device to be networked. The electronic device 100 may transmit the distribution network information to the electronic device 200. The distribution network information may include a name and password of the router 300.
The electronic device 200 may establish a connection with the router 300 using the distribution network information, thereby accessing a network and connecting to the cloud server 400.
The electronic device 100 may establish a binding relationship with the electronic device 200. For example, electronic device 100 and electronic device 200 may establish a binding relationship through the same account (e.g., hua is an account).
The electronic device 100 may be connected to the cloud server 400 through a 2G network, a 3G network, a 4G network, a 5G network, a Wireless Local Area Network (WLAN), or the like. The electronic device 100 may download an application for configuring the network for the electronic device 200 from the cloud server 400.
In addition, the electronic device 100 may remotely control an electronic device, such as the electronic device 200, having a binding relationship with the electronic device 100 through the cloud server 400. The electronic device having a binding relationship with the electronic device 100 may also report its own status information to the electronic device 100 through the cloud server 400.
The cloud server 400 may store a binding relationship between the electronic device 100 and an electronic device having a binding relationship with the electronic device 100. In one possible implementation, the cloud server 400 may store information of a plurality of electronic devices associated with the same account. And the electronic devices associated with the same account have a binding relationship. For example, there is a binding relationship between the electronic device 100 and the electronic device 200. The cloud server 400 may receive an instruction from the electronic device 100 to control the electronic device 200 (e.g., an instruction instructing the electronic device 200 to turn on). When it is determined that the electronic device 100 and the electronic device 200 are electronic devices associated with the same account, the cloud server 400 may send the control instruction to the electronic device 200, so that the electronic device 200 executes an operation corresponding to the control instruction. The cloud server 400 may also receive a message (e.g., a message indicating the power amount of the electronic device 200) from the electronic device 200 for reporting its own status information to the electronic device 100. When it is determined that the electronic device 100 and the electronic device 200 are electronic devices associated with the same account, the cloud server 400 may send the message indicating the state information of the electronic device 200 to the electronic device 100, so that the electronic device 100 updates the state information of the electronic device 200.
The router 300 may be used to provide network access services for the electronic devices 100 and 200. The network access service is not limited to a router, and other wireless access devices may also provide the network access service for the electronic devices 100 and 200.
It should be noted that, in this application, the electronic device 100 is the electronic device 200 and is configured with a network may refer to a process in which the electronic device 100 establishes a communication connection with the electronic device 200 and sends the acquired distribution network information to the electronic device 200, and the electronic device 200 is connected to a router by using the distribution network information and accesses the network. The distribution network information may include a name and a password of the router.
The electronic device 100 may obtain the distribution network information by receiving the distribution network information input by the user. Alternatively, the electronic device 100 is in a connected state with the router. The electronic device 100 stores therein distribution network information. The electronic device 100 may transmit the stored distribution network information to the electronic device 200. Thus, when the electronic device 100 is the electronic device 200 and the network is distributed, the user does not need to input the distribution network information again, so that the user operation is reduced, and the efficiency of the distribution network is improved. The method for acquiring the distribution network information by the electronic device 100 is not limited in the embodiment of the present application.
A schematic structural diagram of an electronic device 100 provided in an embodiment of the present application is described below.
As shown in fig. 2, the electronic device 100 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, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identity Module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the illustrated structure of the embodiment of the present invention does not specifically limit the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a memory, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
In some embodiments, processor 100 may include a softAP distribution network module. The softAP distribution network module may be integrated in the AP or NPU or other chip. When it is confirmed that the NAN distribution network fails, the electronic device 100 may wake up the softAP distribution network module, and use a softAP distribution network method to distribute a network to the electronic device 200. In other embodiments, processor 100 may include a bluetooth distribution network module, a sonic distribution network module, and the like. The chip for integrating the distribution network modules of different types is not limited in the embodiment of the application. The different types of distribution network modules may be awakened after the electronic device 100 confirms that the NAN distribution network has failed. The electronic device 100 may provide the electronic device 200 with the corresponding distribution network service by using the different types of distribution network modules.
The controller may be, among other things, a neural center and a command center of the electronic device 100. The controller can generate an operation control signal according to the instruction operation code and the time sequence signal to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold 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 called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transmit data between the electronic device 100 and a peripheral device. And the earphone can also be used for connecting an earphone and playing audio through the earphone. The interface may also be used to connect other electronic devices, such as AR devices and the like.
The charging management module 140 is configured to receive charging input from a charger.
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 provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the electronic device 100. 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 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave.
The wireless communication module 160 may provide a solution for wireless communication applied to the electronic device 100, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (bluetooth, BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like. 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, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, with N being a positive integer greater than 1.
The electronic device 100 may implement a shooting function through the ISP, the camera 193, the video codec, the GPU, the display 194, the application processor, and the like.
The ISP is used to process the data fed back by the camera 193. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image visible to naked eyes. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into image signal in standard RGB, YUV and other formats. In some embodiments, the electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor that processes input information quickly by using a biological neural network structure, for example, by using a transfer mode between neurons of a human brain, and can also learn by itself continuously. Applications such as intelligent recognition of the electronic device 100 can be realized through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capability of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121.
The electronic device 100 may implement audio functions via the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals.
The speaker 170A, also called a "horn", is used to convert the audio electrical signal into an acoustic signal.
The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into an acoustic signal.
The microphone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals.
The headphone interface 170D is used to connect a wired headphone.
The pressure sensor 180A is used for sensing a pressure signal, and converting the pressure signal into an electrical signal.
The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., the x, y, and z axes) may be determined by gyroscope sensor 180B.
The air pressure sensor 180C is used to measure air pressure.
The magnetic sensor 180D includes a hall sensor.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. The method can also be used for identifying the posture of the electronic equipment 100, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light to the outside through the light emitting diode. The electronic device 100 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there are no objects near the electronic device 100.
The ambient light sensor 180L is used to sense the ambient light level.
The fingerprint sensor 180H is used to collect a fingerprint.
The temperature sensor 180J is used to detect temperature.
The touch sensor 180K is also referred to as a "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation applied thereto or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type.
The bone conduction sensor 180M may acquire a vibration signal.
The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The electronic apparatus 100 may receive a key input, and generate a key signal input related to user setting and function control of the electronic apparatus 100.
The motor 191 may generate a vibration cue.
Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card can be brought into and out of contact with the electronic apparatus 100 by being inserted into the SIM card interface 195 or being pulled out of the SIM card interface 195. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. In some embodiments, the electronic device 100 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
The structural diagram of the electronic device 200 may refer to the structural diagram of the electronic device 100 shown in fig. 2. Electronic device 200 may include more or fewer components than shown in FIG. 2, or combine certain components, or split certain components, or a different arrangement of components. The embodiment of the present application does not limit the specific structure of the electronic device 200.
In some embodiments, the electronic device 100 may utilize a NAN distribution network method to distribute the network for the electronic device 200. The NAN distribution network is a distribution network method based on a wireless-fidelity neighbor awareness network (Wi-FinAN). The Wi-FinAN is a communication technology of a Wi-Fi wireless network with point-to-point interconnection and intercommunication. The communication technology can bypass network infrastructure (such as Access Points (APs) or cellular networks), realize one-to-one, one-to-many or many-to-many Wi-Fi connection between electronic devices in the same Wi-FiNAN, and perform services such as file sharing and data mutual transmission.
In the NAN network distribution process, the electronic device 100 and the electronic device 200 need to establish a Wi-FiNAN data link (hereinafter referred to as NAN data link in the following embodiments). When the NAN data link is successfully established, the electronic device 100 and the electronic device 200 are in the same Wi-FiNAN. The electronic device 100 may utilize the NAN data link to provide network distribution services for the electronic device 200. That is, the electronic device 100 sends the distribution network information to the electronic device 200 through the NAN data link.
Fig. 3 illustrates a flowchart of a method for the electronic device 100 to establish a NAN data link with the electronic device 200.
As shown in fig. 3, the NAN data link establishment procedure may include steps S101 to S106. Wherein:
s101, the electronic device 200 may broadcast a service subscription frame (subscribe message).
The electronic device 200, such as a smart oven, may broadcast a service subscription frame on a particular channel (e.g., channel 6 on a 2.4GHz channel) over the Wi-Fi interface. The service subscription frame may be used to indicate service content requested by the electronic device 200. The electronic device 200 may query, through the service subscription frame, an electronic device that may provide service content corresponding to the service subscription frame for the electronic device 200. For example, the electronic device 200 is in a state of being connected to a network, and requests other electronic devices to provide services of the network. The service content corresponding to the service subscription frame broadcast by the electronic device 200 may be a service requesting a distribution network.
S102, upon receiving the service subscription frame from the electronic device 200, the electronic device 100 may transmit a service publication frame (publish message) to the electronic device 200.
The electronic device 100, such as a cell phone, may receive the service subscription frame from the electronic device 200 on the specific channel through the Wi-Fi interface. If it is determined that the electronic device 200 can be provided with the service of the distribution network, the electronic device 100 may transmit a service distribution frame to the electronic device 200. The service publishing frame may be used to indicate that a sender of the service publishing frame may provide service content corresponding to the service subscription frame. That is, the electronic device 200 may notify the electronic device 200 that itself may provide the service of the distribution network for the electronic device 200 through the service distribution frame.
S103, the electronic device 200 may send a NAN data link establishment request to the electronic device 100.
Upon receiving the service announcement frame from the electronic device 100, the electronic device 200 may transmit a NAN data link establishment request to the electronic device 100, requesting establishment of a NAN data link with the electronic device 100.
S104, the electronic device 100 may send a NAN data link reply message to the electronic device 200.
S105, the electronic device 200 may transmit a NAN data link confirmation message to the electronic device 100.
The electronic device 100 and the electronic device 200 exchange the NAN data link reply message and the NAN data link confirmation message, which are described above, may be used for the two electronic devices to agree on a communication mode using a NAN, a communication channel, and other related information.
S106, the electronic device 100 may send the NAN data link key to the electronic device 200.
The electronic device 100 may generate a NAN data link key and send the NAN data link key to the electronic device 200. The NAN data link key may be used to encrypt the interactive data when the electronic device 100 and the electronic device 200 perform data interaction by using the NAN data link. The embodiment of the present application does not limit the specific method for generating the NAN data link key by the electronic device 100.
When the electronic device 200 receives the NAN data link key, the NAN data link between the electronic device 100 and the electronic device 200 is successfully established. The electronic device 100 and the electronic device 200 are in a Wi-Fi NAN under the NAN data link connection. The electronic device 100 may provide network-distribution services to the electronic device 200 via the NAN data link.
The electronic device 100 and the electronic device 200 may further interact with more messages in the NAN data link establishment process, which is not limited in the embodiment of the present application.
Based on the method for establishing the NAN data link shown in fig. 3, a method for distributing a NAN network provided in an embodiment of the present application is described below.
Fig. 4A illustrates a flowchart of a method for the electronic device 100 to utilize a NAN distribution network to distribute a network for the electronic device 200.
As shown in fig. 4A, the NAN distribution network method may include steps S201 to S210. Wherein:
s201, the electronic device 200 receives a user operation for triggering the electronic device 200 to enter a to-be-distributed network state, and enters the to-be-distributed network state.
The user operation for triggering the electronic apparatus 200 to enter the to-be-networked state may be, for example, a long-press operation (for example, a long press for 3 seconds) acting on the key 202 of the electronic apparatus 200 as shown in fig. 5. The embodiment of the present application does not limit the user operation for triggering the electronic device 200 to enter the to-be-configured-network state.
In some embodiments, in the to-be-provisioned state, the electronic device 200 may broadcast a service subscription frame. And the server subscribes the service content corresponding to the frame as the service requesting the distribution network. The electronic device 200 may query for electronic devices that may provide the distribution network service for the electronic device 200 through the server subscription frame.
S202, the electronic device 100 touches the NFC tag of the electronic device 200.
S203, the electronic device 200 sends the device identification information and the TAG identification information of the electronic device 200 stored in the NFC TAG (TAG) module to the electronic device 100.
The electronic device 100 may include an NFC module therein. The electronic device 200 may include an NFC tag 201 as shown in fig. 5. The NFC TAG 201 may include an NFC TAG module therein. The NFC TAG module of the electronic device 200 may store device identification information and TAG identification information of the electronic device 200. The embodiment of the present application does not limit the specific types of the device identification information and the tag identification information of the electronic device 200.
In one possible implementation, the electronic device 100 may generate a Radio Frequency (RF) field with a specified frequency (e.g., 13.56 mhz) through the NFC module, and acquire data in the NFC TAG module by load-modulating the RF field with the NFC TAG module within a specified distance range from the electronic device 100 (e.g., within 10 cm from the electronic device 100).
As shown in fig. 6, the electronic device 100 may touch the NFC tag 201 of the electronic device 200. The electronic device 100 may generate an RF field through the NFC module. The NFC TAG module in the electronic device 200 may load modulate the RF field, and send the device identification information and the TAG identification information of the electronic device 200 in the NFC TAG module to the electronic device 100.
The embodiment of the present application does not limit the specific implementation method for performing near field communication between the electronic device 100 and the electronic device 200.
S204, the electronic device 100 searches, according to the device identification information and the tag identification information of the electronic device 200, the information of the NFC tag of the electronic device 200 and the distribution network state in the cloud server 400, and determines that the NFC tag of the electronic device 200 is legal and the electronic device 200 is not in a distribution network.
The cloud server 400 may store device identification information, tag identification information, distribution network status, and the like of the electronic device 200. The electronic device 100 may find the relevant information of the electronic device 200 in the cloud server 400 according to the received device identification information. Furthermore, the electronic device 100 may compare the received tag identification information with the tag identification information of the electronic device 200 in the cloud server 400, and determine whether the NFC tag 201 is legitimate. If the tag identification information received by the electronic device 100 is the same as the tag identification information of the electronic device 200 in the cloud server 400, the electronic device 100 may determine that the NFC tag 201 of the electronic device 200 is legal.
In addition, according to the related information of the electronic device 200 found in the cloud server 400, the electronic device 100 may obtain the distribution network state of the electronic device 200, so as to determine whether the electronic device 200 is distributed.
The embodiment of the present application does not limit the method for determining whether the tag of the electronic device 200 is legal or not and whether the electronic device 200 is configured with the network or not by the electronic device 100.
After determining that the NFC tag 201 of the electronic device 200 is legal and the electronic device 200 is not equipped with a network, the electronic device 100 may perform step S205 described below.
S205, the electronic device 100 may download the distribution network application from the cloud server.
The distribution network application can be used to provide the electronic device 100 with distribution network services for the electronic device 200.
In some embodiments, if the distribution network application is stored in the electronic device 100, the electronic device 100 may directly run the distribution network application to provide a distribution network for the electronic device 200.
S206, the NAN data link is established between the electronic device 100 and the electronic device 200 and is successful.
In a possible implementation manner, when the distribution network application in step S205 is executed, the electronic device 100 may utilize a NAN distribution network method to distribute a network for the electronic device 200. The electronic device 100 may receive the service subscription frame broadcast by the electronic device 200 in the to-be-configured state in step S201. The electronic device 100 may establish the NAN data link with the electronic device 200 according to the aforementioned NAN data link establishment method illustrated in fig. 3. For a specific process, reference may be made to the foregoing embodiments, which are not described herein again.
When the NAN data link is successfully established between the electronic device 100 and the electronic device 200, the electronic device 100 may perform step S207 described below.
S207, the electronic device 100 receives the distribution network information input by the user, where the distribution network information includes a name and a password of the router.
S208, the electronic device 100 sends the distribution network information to the electronic device 200 through the NAN data link.
The electronic device 100 may receive the distribution network information input by the user and transmit the distribution network information to the electronic device 200 through the NAN data link.
Illustratively, the electronic device 100 may display a user interface 710 as shown in FIG. 7. User interface 710 may include distribution network information input box 711. The distribution network information input box 711 may include a name input field 711A, a password input field 711B, and a confirmation control 711C. Therein, the name entry field 711A may be used to enter the name of the router (i.e., the name of the access Wi-Fi). Password entry field 711B may be used to enter a password for the router (i.e., a password for Wi-Fi access). The confirmation control 711C may be used to trigger the electronic device 100 to send the received name of the router and the password to the electronic device 200.
Fig. 7 is only an exemplary illustration of a user interface of the electronic device 100 for receiving the distribution network information input by the user in the present application, and is not limited in the present application.
In some embodiments, the electronic device 100 stores therein distribution network information. The electronic device 100 may directly send the distribution network information to the electronic device 200 through the NAN data link. Thus, when the electronic device 100 is a network distribution device for different electronic devices, the user does not need to input the distribution network information each time, and the user operation in the network distribution process is simplified.
S209, the electronic device 200 may send a distribution network information receiving response to the electronic device 100.
The electronic device 200 may indicate that the electronic device 100 itself has received the distribution network information through the distribution network information reception response. When receiving the distribution network information receiving response, the electronic device 100 may confirm that the NAN distribution network is successful.
S210, the electronic device 200 may exit the state to be configured, and connect to the router using the received distribution network information.
When receiving the distribution network information from the electronic device 100, the electronic device 200 may exit the to-be-distributed state and connect to the router 300 using the distribution network information. When exiting the to-be-configured network state, the electronic device 200 may stop broadcasting the server subscription frame in step S201.
It should be noted that the electronic device 100 may encrypt the distribution network information according to an agreed encryption method. When receiving the encrypted distribution network information, the electronic device 200 may perform decryption according to an agreed decryption method. The embodiment of the present application does not limit the encryption method and the decryption method.
Compared with the network distribution methods such as the bluetooth network distribution method and the softAP network distribution method, the NAN network distribution method shown in fig. 4A has shorter time delay and better network distribution performance. However, the success rate of the NAN distribution network is affected by the success rate of the NAN data link establishment between the electronic devices. If the NAN data link is not successfully established between the electronic device 100 and the electronic device 200, the electronic device 100 cannot send the distribution network information to the electronic device 200. The electronic device 200 cannot be connected to the router 300. The device distance between the electronic device 100 and the electronic device 200 is a key factor affecting the NAN data link established between the electronic device 100 and the electronic device 200. The closer the device distance between the electronic device 100 and the electronic device 200 is, the higher the success rate of NAN data link establishment is.
In addition, before the electronic device 100 uses the NAN network distribution method to distribute the network to the electronic device 200, the electronic device 100 detects whether the NFC tag of the electronic device 200 is legal and whether the electronic device 200 is distributed by touching the NFC tag of the electronic device 200. In addition to the device distance, the time when the electronic device 100 touches the NFC tag of the electronic device 200 is also a factor affecting the NAN data link between the electronic device 100 and the electronic device 200.
Referring to fig. 4B, fig. 4B schematically shows a time axis diagram of the NAN distribution network.
As shown in fig. 4B, the electronic apparatus 100 starts touching the NFC tag of the electronic apparatus 200 at time t1 (step S202 shown in fig. 4A). The electronic apparatus 100 may determine the time at which it starts receiving the NFC signal from the electronic apparatus 200 as the time t1 described above. The electronic device 100 leaves the NFC tag of the electronic device 200 at time t 3. Wherein the distance between the electronic device 100 and the electronic device 200 gradually increases. At the above-mentioned time t3, the distance between the electronic apparatus 100 and the electronic apparatus 200 reaches the critical distance of the near field communication range. The electronic apparatus 100 may determine a change timing from the reception of the NFC signal from the electronic apparatus 200 to the non-reception of the NFC signal of the electronic apparatus 200 as the timing t3 described above.
The time elapsed from the time t1 to the time t3 is the touch time when the electronic apparatus 100 touches the electronic apparatus 200. As can be seen from fig. 4A, in the above touch time, the electronic device 100 may obtain the device identification information and the tag identification information of the electronic device 200 from the NFC tag of the electronic device 200. The electronic device 100 may determine whether the NFC tag of the electronic device 200 is valid and whether the electronic device 200 is in a network using the acquired device identification information and tag identification information. When it is determined that the NFC tag of the electronic device 200 is legal and the electronic device 200 is not in a network distribution, the electronic device may download a network distribution application program from the cloud server and operate the network distribution application program to distribute a network for the electronic device 200.
In the above touch time, the electronic device 100 may also start to use the NAN network distribution method to distribute the network to the electronic device 200.
For example, the electronic device 100 determines that the NFC tag of the electronic device 200 is valid and the electronic device 200 is not in a distribution network, and the elapsed time of the process of downloading the distribution network application program from the cloud server by the electronic device 100 is the time period from the time t1 to the time t2 within the touch time.
Further, the electronic device 100 may start running the distribution network application. That is, the electronic device 100 may start to utilize the NAN distribution network method to distribute the network for the electronic device 200. For example, the time when the electronic device 100 starts to use the method for distributing the NAN to distribute the network for the electronic device 200 may be the time t 2. In the NAN network distribution process, a NAN data link is established between the electronic device 100 and the electronic device 200.
As can be seen from fig. 4B, the longer the electronic apparatus 100 touches the NFC tag of the electronic apparatus 200 (the longer the time between the time t2 and the time t 3), the longer the time for which the electronic apparatus 100 and the electronic apparatus 200 maintain the close-distance state is. It is understood that the longer the above touch time is, the higher the success rate of the NAN data link establishment between the electronic device 100 and the electronic device 200 is.
In a possible implementation manner, if the time for the NAN distribution network between the electronic device 100 and the electronic device 200 is overtime, the electronic device 100 may determine that the NAN distribution network fails, and the method for switching the electronic device 100 to the softAP distribution network is used for distributing the network to the electronic device 200.
In some embodiments, if the electronic device 100 does not receive the distribution network information reception response in step S209 in fig. 4A within the preset time, the time for the NAN distribution network between the electronic device 100 and the electronic device 200 is timed out.
Optionally, in other embodiments, if the time for the electronic device 100 and the electronic device 200 to establish the NAN data link exceeds the preset time, the time for the NAN network between the electronic device 100 and the electronic device 200 is expired. As can be seen from fig. 3, due to the influence of the touch time of the electronic device 100 touching the NFC tag of the electronic device 200 and the device distance between the electronic device 100 and the electronic device 200, after the electronic device 200 sends the NAN data link establishment request to the electronic device 100, the NAN data link reply message from the electronic device 100 may not be received. If the time for the electronic device 200 to wait for the NAN data link reply message exceeds the preset time, the electronic device 100 and the electronic device 200 may fail to establish the NAN data link.
If the time for the electronic device 200 to wait for the NAN data link key after sending the NAN data link confirmation message exceeds the preset time, the electronic device 100 fails to establish the NAN data link with the electronic device 200.
If the time for the electronic device 100 to wait for the NAN data link acknowledgement message after transmitting the NAN data link reply message exceeds the preset time, the electronic device 100 fails to establish the NAN data link with the electronic device 200.
In the NAN data link establishment process shown in fig. 3, if the electronic device 200 waits for timeout, the electronic device 200 may send a message indicating that the NAN data link establishment fails to the electronic device 100. After receiving the message indicating the NAN data link establishment failure, the electronic device 100 may confirm that the NAN distribution network fails. In the event that the electronic device 100 waits for a timeout, the electronic device 100 may confirm that the NAN data link establishment failed. I.e. NAN distribution network failure.
Not limited to the above method, the electronic device 100 may also confirm the timeout of the NAN network by other methods.
Typically, the time required to wait for the timeout is on the order of seconds. That is, in the course of the NAN network distribution, the NAN data link may not be successfully established due to the above touch time and the device distance. But electronic device 100 and/or electronic device 200 still need to wait several seconds to complete the process of waiting for the timeout specified in the distribution network protocol. Further, the electronic device 100 can confirm the NAN distribution network identification and switch to another distribution network method to distribute the network for the electronic device 200.
When it is confirmed that the NAN distribution network fails, the electronic device 100 may switch to the softAP distribution network to provide the distribution network service for the electronic device 200.
In one possible implementation, the electronic device 100 may be configured with a softAP distribution network module. The softAP distribution network module may be integrated in the AP or NPU or other chip. When it is confirmed that the NAN distribution network fails, the electronic device 100 may wake up the softAP distribution network module, and distribute the network to the electronic device 200 by using the softAP distribution network method. The electronic device 200 may also broadcast a hot spot message in the to-be-configured state. That is, in response to a user operation for triggering the electronic device 200 to enter the to-be-network-connected state, the electronic device 200 may start a hotspot and broadcast a hotspot message in addition to broadcasting a service subscription frame for requesting a network distribution service.
The method for network distribution by softAP provided by the embodiment of the application is described below.
Fig. 8 illustrates a flowchart of a method for the electronic device 100 to distribute the network for the electronic device 200 by using the softAP distribution network.
As shown in fig. 8, the method for distribution of softAP network may include steps S301 to S308. Wherein:
s301, the electronic device 200 starts the hot spot.
When receiving a user operation for triggering the electronic device 200 to enter the to-be-networked state, the electronic device 100 may open the hotspot. The user operation for triggering the electronic apparatus 200 to enter the to-be-networked state may be, for example, a long-press operation (for example, a long press for 3 seconds) acting on the key 202 of the electronic apparatus 200 as shown in fig. 5. The embodiment of the present application does not limit the user operation for triggering the electronic device 200 to enter the to-be-configured-network state.
S302, the electronic device 200 may broadcast the hotspot message.
The hotspot message may include the physical address of the electronic device 200.
S303, the electronic device 100 may receive the hotspot message from the electronic device 200, and receive a user operation for selecting a hotspot of the electronic device 200.
S304, the electronic device 100 may connect to a hotspot of the electronic device 200.
In some embodiments, electronic device 100 may receive a hotspot message for at least one electronic device. The at least one electronic device includes an electronic device 200. The electronic device 100 may display a name of a hotspot containing the at least one electronic device. In response to a user operation for selecting a hotspot of the electronic device 200, the electronic device 100 may connect to the hotspot of the electronic device 200 according to the physical address of the electronic device 200 in the hotspot message.
When a hotspot of the electronic device 200 is connected, the electronic device 100 and the electronic device 200 may establish a local area network between the devices. The local area network may be used for data transmission between the electronic device 100 and the electronic device 200.
S305, the electronic device 100 may receive the distribution network information input by the user, where the distribution network information may include a name and a password of the router.
The process of the electronic device 100 receiving the distribution network information input by the user may refer to step S207 in the method shown in fig. 4A. And will not be described in detail herein.
In some embodiments, the distribution network information is stored in the electronic device 100. The electronic device 100 may not require the user to input the distribution network information.
S306, the electronic device 100 may send the distribution network information to the electronic device 200 through the local area network.
The electronic device 100 may transmit the distribution network information to the electronic device 200 using a local area network between the electronic device 100 and the electronic device 200.
S307, the electronic device 200 may send a distribution network information receiving response to the electronic device 100.
When receiving the distribution network information, the electronic device 200 may send a distribution network information receiving response to the electronic device 100 to indicate that the electronic device 100 has received the distribution network information.
It should be noted that, when the electronic device 100 sends the distribution network information, the distribution network information may be encrypted. When receiving the encrypted distribution network information, the electronic device 200 may perform decryption to obtain the distribution network information. The embodiment of the present application does not limit the encryption and decryption methods.
S308, the electronic device 200 may close the hotspot, and connect to the router using the received distribution network information.
When the hotspot is turned off, the electronic device 200 may stop broadcasting the hotspot message. With the received distribution network information, the electronic device 200 may establish a connection with the router 300.
The embodiment of the present application does not limit the method for performing softAP network distribution between the electronic device 100 and the electronic device 200. The electronic device 100 and the electronic device 200 may also interact with more or less information during the distribution of the softAP network.
As can be seen from the foregoing embodiments, the electronic device 100 needs to switch to the softAP distribution network after confirming that the NAN distribution network fails. The electronic device 100 needs to wait for the time of the NAN network to be overtime before confirming that the NAN network fails. That is, after the time for the NAN distribution network is expired, the electronic device 100 may switch to the softAP distribution network method. The time spent waiting for the timeout of the NAN network is relatively long. If the NAN distribution network fails, the time required by the electronic device 100 to utilize the NAN distribution network in combination with the softAP distribution network to distribute the network to the electronic device 200 is long. The time out waiting for the NAN distribution network may result in a low efficiency of the electronic device 100 to distribute the network to the electronic device 200.
The application provides a network distribution method, in which the electronic device 100 may estimate a success rate of establishing a NAN data link between the electronic device 100 and the electronic device 200 by using a touch time of the electronic device 100 touching an NFC tag of the electronic device 200 and a device distance between the electronic device 100 and the electronic device 200. If the success rate of the NAN data link establishment is estimated to be lower than the preset success rate, the electronic device 100 may immediately switch to another distribution method (e.g., softAP distribution) to distribute the network for the electronic device 200. Therefore, the time spent by the electronic device 100 for waiting for the time timeout of the NAN distribution network to confirm the failure of the NAN distribution network due to the failure of the NAN distribution network can be reduced, and the efficiency of the distribution network can be improved.
As can be seen from the foregoing embodiments shown in fig. 4A and 4B, the success rate of the NAN data link establishment between the electronic device 100 and the electronic device 200 is affected by the touch time of the electronic device 100 touching the NFC tag of the electronic device 200 and the device distance between the electronic device 100 and the electronic device 200. Therefore, the electronic device 100 may estimate the success rate of NAN data link establishment by using the touch time of the electronic device 100 touching the NFC tag of the electronic device 200 and the device distance between the electronic device 100 and the electronic device 200 in the NAN data link establishment process.
The following specifically describes the concept of touch time and device distance.
1. Touch time
The touch time may be a time elapsed for the electronic device 100 to receive the NFC signal from the electronic device 200. That is, the electronic device 100 may calculate the length of the touch time from the moment when the NFC signal from the electronic device 200 starts to be received to the moment when the NFC signal from the electronic device 200 terminates.
2. Distance of equipment
The device distance is a distance between the electronic device 100 and the electronic device 200 in the NAN data link establishment process. In the NAN data link establishment process, the electronic device 100 may calculate the received signal strength according to a signal received from the electronic device 200. The signal from the electronic device 200 is a communication signal based on a Wi-Fi network (hereinafter referred to as a Wi-Fi signal in the following embodiments). For example, the aforementioned signal indicating a NAN data link setup request, a signal indicating a NAN data link acknowledgement message, or other signals shown in fig. 3. The embodiment of the present application does not limit the method for calculating the received signal strength.
Further, the electronic apparatus 100 may determine the apparatus distance between itself and the electronic apparatus 200 according to a conversion relationship between the received signal strength and the apparatus distance. The conversion relationship between the received signal strength and the device distance can be referred to the following relationship (1):
Figure BDA0002974553310000161
wherein d is the device distance. RSSI is the received signal strength. A represents the received signal strength when the device distance between the signal transmitting end (i.e., the electronic device 200) and the signal receiving end (i.e., the electronic device 100) is 1 meter. The optimal value range of A is [45, 49 ]. The above [45, 49] is a value range of 45 or more and 49 or less. The value of A is not limited to the above-mentioned optimum value range, and A may be other values. n represents an ambient attenuation factor. The optimal value range of n is [3.25, 4.5 ]. The above [3.25, 4.5] is a value range of 3.25 or more and 4.5 or less. The value of n is not limited to the above-mentioned optimum value range, and n may take other values.
The longer the touch time is, the closer the device distance is, the higher the success rate of the NAN data link establishment is.
The above-mentioned touching time is long or short, and the distance between the devices is close or far without clear limit, which is a fuzzy concept and can be described by a fuzzy set. For example, a device being close is a fuzzy set. This fuzzy set may refer to device distances with varying degrees of proximity between electronic devices, and is not well defined. Based on the concept of ambiguity described above, the electronic device 100 may establish a Fuzzy Controller (FC) that utilizes a fuzzy control method to estimate a success rate of NAN data link establishment.
The following describes a method for estimating a success rate of NAN data link establishment according to an embodiment of the present application.
As can be seen from fig. 3, after the electronic device 100 sends the service announcement frame to the electronic device 200, the electronic device 100 and the electronic device 200 may start to establish a NAN data link. The electronic device 100 may estimate a success rate of NAN data link establishment from a time when the service announcement frame is transmitted and determine whether the success rate is lower than a preset success rate. The value of the preset success rate is not limited in the embodiment of the application. For example, the preset success rate may be 30%.
In one possible implementation, the electronic device 100 may estimate a success rate of NAN data link establishment every preset time and determine whether the success rate is lower than a preset success rate. When the estimated success rate is lower than the preset success rate, or the NAN data link is successfully established between the electronic device 100 and the electronic device 200, the electronic device 100 may stop estimating the success rate of the NAN data link establishment.
The electronic device 100 may utilize the fuzzy controller 910 as shown in fig. 9 to estimate a success rate of the NAN data link establishment.
It should be noted that, besides the device distance and the touch time, the success rate of the NAN data link establishment is also affected by the power of the Wi-Fi module in the electronic device 200. The Wi-Fi module can be used for transmitting Wi-Fi signals. Under the condition that the device distance between the electronic device 100 and the electronic device 200 is the same, the higher the power of the Wi-Fi module is, the higher the strength of the Wi-Fi signal received by the electronic device 100 from the electronic device 200 is, and the higher the success rate of the NAN data link establishment is. The power of Wi-Fi modules in most electronic devices is the same. The input to the fuzzy controller 910 may thus be simplified by the electronic device 100 when estimating the success rate of NAN data link establishment. That is, the electronic device 100 may not use the power of the Wi-Fi module as an input to the fuzzy controller 910.
As shown in fig. 9, the input of the fuzzy controller 910 may include touch time, device distance. The touch time and the device distance may be calculated by referring to the foregoing embodiments, which are not described herein again. The output of the fuzzy controller 910 may be the success rate of the NAN data link establishment. The fuzzy controller 910 may include a fuzzification interface 911, a knowledge base 912, an inference engine 913, and a defuzzification interface 914. Wherein:
the fuzzification interface 911 can be used to fuzzify the input of the fuzzy controller 910, converting the input with a determined amount into a fuzzy vector.
For example, the touch time can be divided into five fuzzy sets according to the time: negative large (NBt), negative small (NSt), zero (ZOt), positive small (PSt), positive large (PBt). The value intervals of the touch time corresponding to the five fuzzy sets may be: the units of the value intervals are seconds, it can be understood that the longer the touch time is, the higher the success rate of the NAN data link establishment is, the higher the value of the touch time is, the higher the probability that the touch time is divided into the fuzzy set PBt is, for example, the touch time is 3 seconds, the fuzzification interface 911 may divide the touch time into the fuzzy set ZOt, and determine the fuzzy vector corresponding to the touch time according to the touch time membership assignment table shown in table 1 below.
Figure BDA0002974553310000171
TABLE 1
As can be seen from Table 1, the fuzzy vector corresponding to fuzzy set ZOt is [ 00.510.50 ]. That is, when the touch time of the input fuzzy controller 910 is 3 seconds, the fuzzification interface 911 may convert the input into a fuzzy vector [ 00.510.50 ].
The device distance can be divided into five fuzzy sets according to the distance: positive large (PBd), positive small (PSd), zero (ZOd), negative small (NSd), negative large (NBd). The value intervals of the device distances corresponding to the five fuzzy sets may be: the unit of the value interval is centimeter, it is understood that the closer the device distance is, the higher the success rate of the NAN data link establishment is, the higher the probability that the device distance is divided into the fuzzy set PBd is, the higher the device distance is, for example, 20 centimeters, the fuzzification interface 911 may divide the touch time into the fuzzy set PBd, and determine the fuzzy vector corresponding to the device distance according to the device distance membership assignment table shown in table 2 below.
Figure BDA0002974553310000181
TABLE 2
As shown in table 2, the fuzzy vector corresponding to the fuzzy set PB is [ 10.5000 ]. I.e., when the device distance input to the fuzzy controller 910 is 20 centimeters, the fuzzification interface 911 may convert the input to a fuzzy vector 10.5000.
The membership of each fuzzy set in the membership assignment table (such as a touch time membership assignment table and an equipment distance membership assignment table) under different variation levels can be determined according to an empirical value. The embodiment of the present application does not limit the value of each membership degree in the membership degree assignment table.
Knowledge base 912 may include a database 912A and a rules base 912B.
The database 912A may be configured to store membership assignment tables corresponding to input variables and output variables. That is, the database 912A may store the above table 1 and the above table 2. In addition, the database 912A may also store a success rate membership assignment table. The success rate of the NAN data link establishment can be divided into five fuzzy sets according to the value of the success rate: negative large (NBs), Negative Small (NSs), Zero (ZOs), Positive Small (PSs), positive large (PBs). The value intervals of the success rates corresponding to the five fuzzy sets can be respectively as follows: [0, 30% ], (30%, 45% ], (45%, 55%, 85% ], (85%, 100% ]. the success rate membership assignment table may record the success rate of the establishment of NAN data links of different values and the membership of the fuzzy sets.a success rate membership assignment table may refer to table 3 below.
Figure BDA0002974553310000182
TABLE 3
The method for dividing the fuzzy sets corresponding to the touch time, the equipment distance and the success rate is not limited in the embodiment of the application. The fuzzy sets can be further divided into more or less fuzzy sets according to the touch time (or the distance between the devices or the success rate value). For example, the touch time can be divided into seven fuzzy sets according to the length of the touch time: negative large (NBt), negative medium (NMt), negative small (NSt), zero (ZOt), positive small (PSt), positive medium (PMt), positive large (PBt). The value range of the touch time corresponding to each of the seven fuzzy sets may be set empirically, which is not limited in the embodiment of the present application.
The rules repository 912B may be used to store fuzzy control rules. The fuzzy control rules may be based on expert knowledge or long-term accumulated experience of a manual operator. The fuzzy control rule may be formed by a series of relation words connected together. For example, IF (IF), THEN (THEN), AND (AND), OR (OR), ELSE (ELSE), AND so on.
In general, the fuzzy control rule "IF a AND B THEN C" may correspond to the fuzzy relationship H. Wherein the content of the first and second substances,
Figure BDA0002974553310000191
above (A X B) T1 It can be shown that the matrix resulting from the a × B operation is extended to a column vector. In a relational expression
Figure BDA0002974553310000197
The synthesis operation of the blur matrix can be represented. The specific operation rules can be referred to in the prior artThe operation rules are not described here.
Based on the fuzzy relationship H, given the corresponding outputs of inputs A1 and B1
Figure BDA0002974553310000192
The above (A1X B1) T2 It can be shown that the matrix resulting from the a1 × B1 operation is expanded into row vectors.
For example, the relationship between touch time, device distance, and success rate of NAN data link establishment may derive the following basic fuzzy rule:
1. the closer the IF equipment is to the AND touch time, the longer the THEN NAN data link is established, AND the higher the success rate is;
2. the more distant the IF device is from the AND touch time, the shorter the success rate of the THEN NAN data link establishment.
Based on the basic fuzzy rule, the rule base 912B may store a fuzzy control table shown in table 4 below.
Figure BDA0002974553310000193
TABLE 4
As can be seen from Table 4, there are 25 fuzzy control rules in the fuzzy control table, and each fuzzy control rule is consistent with the meaning represented by the basic fuzzy rule.
From the fuzzy control rules in the fuzzy control table, the electronic device 100 can obtain the fuzzy relation R.
In particular, a first fuzzy control rule R 1 Can be as follows: if the device distance belongs to the fuzzy set NBd and the touch time belongs to the fuzzy set NBt, the success rate of NAN data link establishment belongs to the fuzzy set NBs. I.e., IF NBd AND NBt THEN NBs. Wherein R is as defined above 1 Can be expressed as
Figure BDA0002974553310000194
As shown in Table 2, NBd ═ 0000.51]. As can be seen from table 1, NBt ═ 10.5000]. As can be seen from Table 3, NBs means[1 0.5 0 0 0]. Then according to the operation rule of the fuzzy set, it can know that:
Figure BDA0002974553310000195
then the column vector expanded by NBd x NBt is a 25 row, 1 column vector.
Figure BDA0002974553310000196
R 1 A matrix of 25 rows and 5 columns.
Second fuzzy control rule R 2 Can be as follows: if the device distance belongs to the fuzzy set NSd and the touch time belongs to the fuzzy set NBt, the success rate of NAN data link establishment belongs to the fuzzy set NBs. I.e., IF NSd AND NBt THEN NBs. Wherein R is as defined above 2 Can be represented as R 2 =NSd×NBt×NBs。
By analogy, the electronic device 100 can obtain 25 fuzzy control rules R in the fuzzy control table 1 ,R 2 ,...,R 25 . Further, the electronic device 100 may calculate the fuzzy relation R. Wherein R ═ R 1 ∪R 2 ∪...∪R 25 . Through the union operation, the electronic device 100 may obtain a matrix with 25 rows and 5 columns (i.e., the fuzzy relation R).
The inference engine 913 may use the fuzzy relation R in the rule base 912B to infer to which fuzzy set the success rate of NAN data link establishment belongs according to the input fuzzy vector.
For example, the electronic device 100 detects that the touch time is 3 seconds, and the device distance is 20 centimeters. The fuzzifying interface 911 may fuzzify the touch time to obtain a touch time fuzzy vector a2 ═ 00.510.50]. The fuzzification interface 911 may fuzzify the device distance to obtain a device distance fuzzy vector B2 ═ 10.5000]. The inference engine 913 may receive the above a2 and B2 and calculate an inference result C2. Wherein the content of the first and second substances,
Figure BDA0002974553310000201
according to the operation rule of the fuzzy set, the following steps are known:
Figure BDA0002974553310000202
through the above operations, the inference result C2 obtained by the inference engine 913 is a vector of 1 row and 5 columns.
The inference engine 913 may input the inference result (i.e., the fuzzy set to which the success rate of the NAN data link establishment belongs) to the defuzzification interface 914.
The defuzzification interface 914 may defuzzify the inference result of the inference engine 913, and convert the fuzzy set to which the success rate of the NAN data link establishment belongs into an output with a determined amount (i.e., the success rate of the NAN data link establishment).
In one possible implementation, the defuzzification interface 914 may defuzzify the received inference result C2 using a center of gravity method. Specifically, the defuzzification interface 914 may calculate the success rate of the NAN data link establishment according to the following formula (2):
Figure BDA0002974553310000203
wherein s is i The value in the ith column of the above inference result C2. I.e. C2 ═ s 1 s 2 s 3 s 4 s 5 ]. Then m takes the value 5. x is the number of i The value of each fuzzy set node when the fuzzy sets corresponding to the success rates are divided in the foregoing embodiments. I.e. x 1 =30%,x 2 =45%,x 3 =55%,x 4 =85%,x 5 100%. u is the success rate of NAN data link establishment output by the fuzzy controller 910.
The defuzzification interface 914 may defuzzify the inference result from the inference engine 913 by another method, not limited to the above-described method of defuzzification by the center of gravity method.
The specific numerical operations in the foregoing embodiments are only exemplary illustrations of the present application, and should not be limited to the method for the electronic device 100 to estimate the success rate of NAN data link establishment.
In some embodiments, the input to the fuzzy controller 910 may be the device distance. That is, the electronic device 100 may further simplify the input of the fuzzy controller 910 by taking the device distance as an input of the fuzzy controller 910.
As can be seen from the foregoing embodiments, the longer the touch time of the electronic apparatus 100 touching the NFC tag of the electronic apparatus 200 is, the longer the time for which the electronic apparatus 100 and the electronic apparatus 200 maintain the close-distance state is. Since the closer the device distance is, the higher the success rate of the NAN data link establishment is, the longer the above touch time is, the higher the success rate of the NAN data link establishment is. It can be appreciated that the above-described impact of touch time on the success rate of NAN data link establishment can be attributed to the impact of device distance on the success rate of NAN data link establishment. The electronic device 100 reduces the input of the fuzzy controller 910 to the device distance and can still estimate the success rate of NAN data link establishment through the fuzzy control method described above. The above simplification method may also simplify the operation of the electronic device 100 to estimate the success rate of the NAN data link establishment, and improve the efficiency of estimating the success rate of the NAN data link establishment.
Specifically, the fuzzification interface 911 in the fuzzy controller 910 may fuzzify the device distance.
The relationship between device distance and success rate of NAN data link establishment can derive the following basic fuzzy rule:
1. the closer the IF device is to the THEN NAN, the higher the success rate of the establishment of the data link is;
2. the farther the IF device is from the THEN NAN data link establishment is successful.
The fuzzy control table based on the basic fuzzy rule and the fuzzy relation can be stored in the rule base 912B of the fuzzy controller 910. The fuzzy relationship may be used to reflect a relationship between device distance and success rate of NAN data link establishment.
An inference engine in the fuzzy controller 910 may estimate a success rate of NAN data link establishment based on the obfuscated device distance and the above-described fuzzy relationship.
For a specific implementation process of the electronic device 100 for estimating the success rate of establishing the NAN data link by using the fuzzy control method based on the device distance, reference may be made to the embodiment shown in fig. 9, which is not described herein again.
When the success rate of the NAN data link establishment is obtained, the electronic device 100 may determine whether the success rate is lower than a preset success rate. If the success rate is lower than the preset success rate, the electronic device 100 may immediately switch to another distribution network method (e.g., softAP distribution network) to distribute the network to the electronic device 200.
Based on the method for estimating the success rate of establishing the NAN data link shown in fig. 9, a network distribution method provided in the embodiment of the present application is specifically described below.
Fig. 10 is a flowchart illustrating a method for network distribution provided in the present application. As shown in fig. 9, the network distribution method may include steps S401 to S410. Wherein:
s401, the electronic device 200 receives a user operation for triggering the electronic device 200 to enter a to-be-distributed network state, and enters the to-be-distributed network state.
In some embodiments, in the to-be-provisioned state, the electronic device 200 may send a service subscription frame to find an electronic device that may provide a distribution network service for itself. The electronic device 200 may also broadcast hotspots. An electronic device connected to a hotspot of electronic device 200 may establish a local area network with electronic device 200 between the devices.
S402, the electronic device 100 touches the NFC tag of the electronic device 200.
S403, the electronic device 200 sends the device identification information and the TAG identification information of the electronic device 200 stored in the NFC TAG module to the electronic device 100.
S404, the electronic device 100 searches, according to the device identification information and the tag identification information of the electronic device 200, the information of the NFC tag of the electronic device 200 and the distribution network state in the cloud server 400, and determines that the NFC tag of the electronic device 200 is legal and the electronic device 200 is not in a distribution network.
S405, the electronic device 100 may download the distribution network application from the cloud server.
The above steps S401 to S405 may refer to the steps S201 to S205 in the method shown in fig. 2, and are not described herein again.
S406, a NAN data link is established between the electronic device 100 and the electronic device 200.
The electronic device 100 may run the distribution network application in step S405, and send a service distribution frame to the electronic device 200 to prompt that the electronic device 200 itself may provide the service of the distribution network. Further, the NAN data link may be established between the electronic device 100 and the electronic device 200 according to the method for establishing the NAN data link illustrated in fig. 3.
S407, in the NAN data link establishment stage, the electronic device 100 estimates a success rate of NAN data link establishment, and determines that the success rate is lower than a preset success rate.
In the NAN data link establishment phase, the electronic device 100 may estimate a success rate of the NAN data link establishment according to the method shown in fig. 9. When the success rate of the NAN data link establishment is estimated, the electronic device 100 may determine whether the success rate is lower than a preset success rate.
If the estimated success rate is not lower than the preset success rate, the electronic device 100 may continue to establish the NAN data link according to the method shown in fig. 3 to perform a NAN network distribution. Also, the electronic device 100 may estimate a success rate of NAN data link establishment every preset time.
If the estimated success rate is lower than the preset success rate, the electronic device 100 may perform the following step S408.
S408, the electronic device 100 stops the NAN distribution network and wakes up the softAP distribution network module.
The success rate of the NAN distribution network may also be low since the success rate of the NAN data link establishment is estimated to be lower than the preset success rate. The electronic device 100 may immediately stop the NAN distribution network and wake up the softAP distribution network module.
S409, the electronic device 100 may distribute the network for the electronic device 200 by using the network distribution method of the softAP through the softAP network distribution module.
S410, when the distribution network information from the electronic device 100 is received, the electronic device 200 may exit the state to be distributed, and connect to the router using the received distribution network information.
For the implementation process of the electronic device 100 for distributing the network for the electronic device 200 by using the softAP network distribution method, reference may be made to the foregoing embodiment shown in fig. 8, which is not described herein again.
When the estimated success rate of establishing the NAN data link is lower than the preset success rate, the electronic device 100 may also switch to other network distribution methods, such as a bluetooth network distribution method, a sound wave network distribution method, and the like.
As can be seen from the method shown in fig. 10, the electronic device 100 may estimate a success rate of NAN data link establishment during the NAN network distribution process. NAN network failure may result from NAN data link establishment failure. The electronic device 100 may allocate the network for the electronic device 200 by timely switching to another network allocation method when it is estimated that the success rate of the NAN data link establishment is low. Thus, if the NAN data link is failed to be established, the electronic device 100 may switch to the other distribution network in advance to perform the distribution network, instead of waiting for the NAN distribution network to be switched to the other distribution network after being overtime. This may reduce the time it takes for the electronic device 100 to wait for the time out of the NAN distribution network to confirm the NAN distribution network failure because the NAN distribution network has failed, improving the efficiency of the distribution network.
In some embodiments, the electronic device 100 may estimate the success rate of the NAN data link establishment multiple times during the NAN data link establishment. The NAN data link establishment process includes a process of using a NAN network distribution method with the electronic device 100 to distribute a network to the electronic device 200. After the electronic device 100 transmits the service announcement frame to the electronic device 200 (i.e., after the electronic device 100 performs step S102 shown in fig. 3), the electronic device 100 may start to establish a NAN data link with the electronic device 200. When the NAN data link key is sent to the electronic device 200 (i.e., step S106 shown in fig. 3), the electronic device 100 and the electronic device 200 successfully establish a NAN data link. That is, the electronic device 100 may estimate the success rate of NAN data link establishment a plurality of times from the time when the service announcement frame is transmitted to the time when the electronic device 100 transmits the NAN data link key.
It should be noted that, if the success rate estimated by the electronic device 100 is lower than the preset success rate, the electronic device 100 may stop estimating the success rate of the NAN data link, and switch to another distribution network method to distribute the network to the electronic device 200.
If the NAN data link is successfully established, the electronic device 100 may stop estimating the success rate of the NAN data link, and send the distribution network information to the electronic device 200 through the NAN data link. Further, if the electronic device 100 receives the distribution network information receiving response of the electronic device 200, the electronic device 100 may determine that the NAN distribution network is successful.
If the electronic device 100 does not receive the distribution network information reception response of the electronic device 200 within the preset time for sending the distribution network information, the electronic device 100 may detect whether the NAN data link still exists. If the NAN data link still exists, the electronic device 100 may send the distribution network information to the electronic device 200 through the NAN data link again. If the NAN data link does not exist, the electronic device 100 may switch to another network distribution method to distribute the network for the electronic device 200.
In some embodiments, the electronic device 100 may estimate the success rate of NAN data link establishment multiple times during the process of using the NAN distribution network method to distribute the network for the electronic device 200. That is, after the electronic device 100 and the electronic device 200 successfully establish the NAN data link, the electronic device 100 may still estimate the success rate of the NAN data link establishment before the electronic device 100 ends the NAN distribution network.
When the success rate of the NAN data link establishment is estimated to be not lower than the preset success rate, the electronic device 100 may continue to perform related operations in the NAN network distribution process. When the NAN data link is successfully established between the electronic device 100 and the electronic device 200, the electronic device 100 may send the distribution network information to the electronic device 200 by using the established NAN data link.
In some embodiments, when the success rate of the NAN data link establishment is estimated to be lower than the preset success rate, the electronic device 100 may immediately switch to the other distribution network to distribute the network to the second electronic device. If the NAN data link is successfully established between the electronic device 100 and the electronic device 200 before the success rate of establishing the NAN data link is estimated to be lower than the preset success rate, the electronic device 100 may send the distribution network information to the electronic device 200 after the NAN data link is successfully established.
For example, the electronic device 100 may continuously estimate the success rate of the NAN data link establishment before estimating that the success rate of the NAN data link establishment is lower than the preset success rate, or before receiving the distribution network information reception response from the electronic device 200 as shown in S209 in fig. 4A. The NAN data link is successfully established between the electronic device 100 and the electronic device 200. The electronic device 100 transmits the distribution network information to the electronic device 200 using the NAN data link. In the time period after the electronic device 100 transmits the distribution network information and before the distribution network information reception response of the electronic device 200 is received, the electronic device 100 estimates that the success rate of NAN data link establishment is lower than the preset success rate. Further, the electronic device 100 may switch to another method for distributing the network (e.g., softAP network distribution) to distribute the network to the electronic device 200.
If the electronic device 200 receives the distribution network information sent by the electronic device 100 through the NAN data link, the electronic device 200 may send a distribution network information receiving response to the electronic device 100, and exit the to-be-distributed state. Thus, the electronic device 100 cannot use the other network distribution method to distribute the network to the electronic device 200, and determines that the network distribution is successful after receiving the network distribution information receiving response.
Alternatively, if the electronic device 200 does not receive the distribution network information sent by the electronic device 100 through the NAN data link, the electronic device 200 may utilize the other distribution network method to distribute the network for the electronic device 200.
When the electronic device 100 is configured to be the electronic device 200, the electronic device 100 may first use the first network distribution method to be the electronic device 200. If the first network distribution method fails, the electronic device 200 may switch to the second network distribution method to distribute the network for the electronic device 200.
The first network distribution method is not limited to the NAN network distribution in the foregoing embodiment, and may also be other network distribution methods. For example, the first network distribution method may be a bluetooth network distribution. The second distribution network method may be a softAP distribution network. In the first distribution network method, the distribution network information may be transmitted through the first data link. For example, when the first network distribution method is a NAN network distribution, the first data link is a NAN data link. When the first network distribution method is a bluetooth network distribution, the first data link may be a bluetooth data link. In the second distribution network method, the distribution network information may be transmitted through a second data link.
Wherein, the requirement of establishing the first data link for the device distance between the electronic device 100 and the electronic device 200 is higher than the requirement of establishing the second data link for the device distance.
The electronic device 100 may estimate a success rate of the first data link establishment in the process of establishing the first data link. If the success rate of establishing the first data link is estimated to be lower than the preset success rate, the electronic device 100 may immediately switch to the second network distribution method to distribute the network to the electronic device 200. In this way, the electronic device 100 does not need to wait for the first distribution network method to be switched to another distribution network method after being timed out. This may reduce the time that it takes for the electronic device 100 to wait for the timeout of the distribution time using the first distribution method to confirm the failure of the first distribution method because the first distribution method has failed, and improve the efficiency of the distribution network.
The method for the electronic device 100 to estimate the success rate of the first data link establishment may refer to the fuzzy control method shown in fig. 9. Factors affecting the success rate of the first data link establishment may include, but are not limited to, touch time, device distance of the foregoing embodiments. The specific implementation process of the electronic device 100 for estimating the success rate is not described in detail in this embodiment.
In some embodiments, the NFC TAG on the electronic device 200 contains an NFC TAG module. The NFC TAG module may be connected to the microprocessor of the electronic device 200 through a bus. When the NFC TAG module senses that an RF field exists nearby, the NFC TAG module may send a message to the microprocessor to indicate that an NFC TAG exists in which another electronic device touches the electronic device 200. Further, the electronic device 200 may execute the relevant instruction, so that the electronic device 200 enters a to-be-networked state. That is to say, when the electronic device 100 touches the NFC TAG of the electronic device 200, the electronic device 100 may not only obtain the device identification information and the TAG identification information stored in the NFC TAG module, but also trigger the electronic device 200 to enter a to-be-networked state. The user may not trigger the electronic device 200 to enter the to-be-networked state through other user operations. The method can simplify the user operation in the distribution network process and improve the user experience.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (12)

1. A network distribution method, characterized in that the method comprises:
the method comprises the steps that a first data link is established between first electronic equipment and second electronic equipment; the second electronic device is in a state of waiting for network distribution, the first data link is used for the first electronic device to transmit distribution network information to the second electronic device, the distribution network information comprises a name and a password of a wireless access device, and the distribution network information is used for the second electronic device to access the wireless access device;
in the process of establishing the first data link, the first electronic equipment estimates the success rate of establishing the first data link;
and under the condition that the success rate is smaller than a first threshold value, the first electronic device and the second electronic device establish a second data link, and the distribution network information is sent to the second electronic device through the second data link.
2. The method of claim 1, wherein the first data link is a Neighbor Aware Network (NAN) data link.
3. The method of claim 2, wherein prior to the first electronic device establishing the first data link with the second electronic device, the method further comprises:
the first electronic device touches a Near Field Communication (NFC) tag of the second electronic device;
the estimating, by the first electronic device, a success rate of establishing the first data link specifically includes:
the first electronic device determines touch time and device distance, and estimates a success rate of the NAN data link establishment by using the touch time and the device distance; the touch time is the time length of the first electronic device touching the NFC label of the second electronic device, and the longer the touch time is, the greater the success rate is; the device distance is a distance between the first electronic device and the second electronic device in the NAN data link establishment process, and the closer the device distance is, the greater the success rate is.
4. The method of claim 3, wherein the first data link is established at a time within the touch time.
5. The method according to claim 3 or 4, characterized in that after the first electronic device touches the NFC tag of the second electronic device, the method further comprises:
the first electronic device determines that the NFC label of the second electronic device is legal and the second electronic device is not in a network distribution mode from a cloud server by using device identification information and label identification information; the device identification information is used for uniquely identifying the second electronic device, and the tag identification information is used for uniquely identifying an NFC tag of the second electronic device; the device identification information and the tag identification information are acquired from the NFC tag by the first electronic device when the NFC tag is touched.
6. The method of any of claims 2-5, wherein prior to the first electronic device establishing the first data link with the second electronic device, the method further comprises:
the first electronic equipment acquires a distribution network application program from a cloud server; the distribution network application program is used for establishing the first data link between the first electronic device and the second electronic device, estimating the success rate of establishing the first data link in the process of establishing the first data link, establishing a second data link between the first electronic device and the second electronic device under the condition that the success rate is smaller than the first threshold value, and sending the distribution network information to the second electronic device through the second data link.
7. The method according to any of claims 3-6, wherein the estimating the success rate of the NAN data link establishment using the touch time and the device distance specifically comprises:
the first electronic equipment fuzzifies the touch time and the equipment distance to respectively obtain a first fuzzy vector and a second fuzzy vector;
the first electronic equipment determines that the fuzzy vector corresponding to the success rate is a third fuzzy vector under the condition that the touch time corresponds to the first fuzzy vector and the equipment distance corresponds to the second fuzzy vector according to a first fuzzy relation; the first fuzzy relation is used for indicating the relation among fuzzy vectors corresponding to the touch time, the equipment distance and the success rate;
and the first electronic equipment performs defuzzification on the third fuzzy vector to obtain the success rate.
8. The method according to any one of claims 1-7, further comprising:
and after the first data link is successfully established, the first electronic equipment sends the distribution network information to the second electronic equipment through the first data link.
9. The method according to any of claims 1 to 8, wherein the second data link is a data link for transmitting distribution network information in any of the following distribution network methods: the soft access point softAP distribution network, the Bluetooth distribution network and the sound wave distribution network.
10. An electronic device, the electronic device being a first electronic device, the first electronic device comprising a communication apparatus, a memory, and a processor, wherein:
the communication device is used for establishing a communication connection, and the communication connection comprises one or more of the following: the communication connection is Near Field Communication (NFC) connection and communication is carried out through a Neighbor Awareness Network (NAN) data link;
the memory is used for storing a computer program; the processor is configured to invoke the computer program to cause the first electronic device to perform the method of any of claims 1-9.
11. A computer storage medium, comprising: computer instructions; the computer instructions, when executed on a first electronic device, cause the first electronic device to perform the method of any of claims 1-9.
12. A computer program product, characterized in that, when run on a first electronic device, causes the first electronic device to perform the method according to any of claims 1-9.
CN202110271305.6A 2021-03-12 2021-03-12 Network distribution method and related device Pending CN115087135A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110271305.6A CN115087135A (en) 2021-03-12 2021-03-12 Network distribution method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110271305.6A CN115087135A (en) 2021-03-12 2021-03-12 Network distribution method and related device

Publications (1)

Publication Number Publication Date
CN115087135A true CN115087135A (en) 2022-09-20

Family

ID=83241013

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110271305.6A Pending CN115087135A (en) 2021-03-12 2021-03-12 Network distribution method and related device

Country Status (1)

Country Link
CN (1) CN115087135A (en)

Similar Documents

Publication Publication Date Title
JP7317242B2 (en) Bluetooth connection methods, systems and electronic devices
CN112449328B (en) Bluetooth searching method, system and related device
WO2021052178A1 (en) Wi-fi connection method and device
CN112289313A (en) Voice control method, electronic equipment and system
CN111369988A (en) Voice awakening method and electronic equipment
WO2020216098A1 (en) Method for providing forwarding service across electronic apparatuses, apparatus, and system
CN112312366A (en) Method, electronic equipment and system for realizing functions through NFC (near field communication) tag
WO2022068670A1 (en) Method for touching to establish wireless connection between devices, electronic device, and chip
CN113676879A (en) Method, electronic device and system for sharing information
WO2022042265A1 (en) Communication method, terminal device, and storage medium
CN113365274B (en) Network access method and electronic equipment
CN115119336B (en) Earphone connection system, earphone connection method, earphone, electronic device and readable storage medium
CN115087135A (en) Network distribution method and related device
CN115525366A (en) Screen projection method and related device
CN114116610A (en) Method, device, electronic equipment and medium for acquiring storage information
CN115134404A (en) Method for managing push connection and electronic equipment
CN114157412A (en) Information verification method, electronic device and computer readable storage medium
CN115734323B (en) Power consumption optimization method and device
WO2023236670A1 (en) Data transmission management method, electronic device and storage medium
WO2021189418A1 (en) Service providing method and apparatus
CN116708062B (en) Equipment management method and electronic equipment
CN115802326A (en) Bluetooth connection method and electronic equipment
CN116074359A (en) Distribution network method and electronic equipment
CN116055233A (en) Internet of things equipment network distribution method, terminal and system
CN115134402A (en) Device connection method and electronic device

Legal Events

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