Distribution network method and related device
By immediately switching the distribution network method after the probability of success of the first distribution network method is estimated, the problem of long waiting time in the prior art is solved, and the distribution network efficiency and user experience are improved.
Patent Information
- Application Number
- CN202110271305.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-12
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2041-03-12
AI Technical Summary
In the prior art, when a mobile phone is distributed for the network device to be distributed, it is necessary to wait a long time to confirm that the NAN distribution network fails and then switch to other distribution network methods, resulting in poor user experience.
By estimating the success probability of the previous distribution network method, if it is lower than the threshold, immediately switch to the later distribution network method for distribution network to reduce the waiting time.
Improve the efficiency of distribution network, reduce the time to wait for confirmation failure due to the failure of the previous distribution network method, and improve the user experience.
Smart Images

Figure CN115087135B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence, and particularly to a power distribution network method and related devices. Background Art
[0002] With the development of Internet of Things technology, more and more electronic devices can be connected to the network and remotely controlled through the network. However, there are many electronic devices (such as smart lights, smart ovens, etc.) that are not convenient for users to directly input power distribution network information (such as the name and password of the router). Users can use electronic devices such as mobile phones and tablets to perform power distribution network for the above-mentioned electronic devices that are not convenient for users to directly input power distribution network information.
[0003] Currently, the methods for a mobile phone to perform power distribution network for a device to be powered on can include neighbor awareness networking (NAN) power distribution network, soft access point (softAP) power distribution network, Bluetooth power distribution network, sound wave power distribution network, and so on. Among them, the mobile phone can combine two or more power distribution network methods to perform power distribution network for the device to be powered on to improve the success rate of power distribution network. The performance of the above NAN power distribution network is better than other power distribution network methods. The mobile phone can first use the NAN power distribution network method to perform power distribution network for the device to be powered on. If the above NAN power distribution network fails, the mobile phone can switch to other methods such as softAP power distribution network to perform power distribution network for the device to be powered on. However, during the process of the mobile phone switching the power distribution network method, it is necessary to wait for confirmation that the NAN power distribution network fails before the mobile phone can switch to other power distribution network methods for power distribution network. During the power distribution network process, before switching to another power distribution network method due to the poor current power distribution network method, a long time needs to be waited, resulting in too long time for the mobile phone to perform power distribution network for the device to be powered on and poor user experience. Summary of the Invention
[0004] This application provides a power distribution network method and related devices. The first electronic device can combine two or more power distribution network methods to perform power distribution network for the second electronic device. The first electronic device can estimate the probability of successful power distribution network by the prior power distribution network method. When it is estimated that the probability of successful power distribution network by the prior power distribution network method is low, the first electronic device can immediately switch to the subsequent power distribution network method to perform power distribution network for the second electronic device. This can reduce the time spent waiting for the prior power distribution network method to time out to confirm the failure of the prior power distribution network method and improve the efficiency of power distribution network.
[0005] In a first aspect, an embodiment of the present application provides a power distribution network method. In this method, a first electronic device may establish a first data link with a second electronic device. The second electronic device is in a state to be networked. The first data link can be used for the first electronic device to transmit power distribution network information to the second electronic device. The power distribution network information may include the name and password of a wireless access device. The power distribution network information can be used for the second electronic device to access the wireless access device. During the establishment of the first data link, the first electronic device may estimate the success rate of establishing the first data link. When the success rate is less than a first threshold, the first electronic device may establish a second data link with the second electronic device and send the power distribution network information to the second electronic device through the second data link.
[0006] The power distribution network method in which the first electronic device transmits the power distribution network information to the second electronic device through the first data link may be a first power distribution network method (i.e., the aforementioned prior power distribution network method). The power distribution network method in which the first electronic device transmits the power distribution network information to the second electronic device through the second data link may be a second power distribution network method (i.e., the aforementioned subsequent power distribution network method).
[0007] The first power distribution network method requires the establishment of a first data link between the first electronic device and the second electronic device. If the establishment of the first data link fails, the above first power distribution network method fails. That is to say, the success rate of establishing the above first data link can represent the probability of successful power distribution network by the first power distribution network method.
[0008] The requirement for the device distance between the first electronic device and the second electronic device to establish the above first data link is higher than the requirement for the device distance to establish the above second data link.
[0009] As can be seen from the above method, when the first electronic device estimates that the success rate of establishing the first data link is less than the first threshold, it can immediately switch to the second power distribution network method to network the second electronic device. This can reduce the time spent waiting for the time-out of using the first power distribution network method to network due to the failure of the first power distribution network method to confirm the failure of the first power distribution network method, and improve the efficiency of power distribution network.
[0010] In combination with the first aspect, the second electronic device may include a Near Field Communication (NFC) tag. The NFC tag may contain an NFC TAG model. The device identification information and tag identification information of the second electronic device may be stored in the NFC TAG module.
[0011] In combination with the first aspect, in some embodiments, the above first data link may be a Neighbor Awareness Network (NAN) data link. That is, the above first power distribution network method is NAN power distribution network.
[0012] Before establishing a NAN data link between the first electronic device and the second electronic device, the first electronic device can touch the NFC tag of the second electronic device. The method for the first electronic device to estimate the success rate of establishing the first data link can be: the first electronic device can determine the touch time and the device distance, and use the touch time and the device distance to estimate the success rate of establishing the NAN data link. The touch time can be the duration of the first electronic device touching the NFC tag of the second electronic device. The longer the touch duration, the greater the success rate. The device distance can be the distance between the first electronic device and the second electronic device during the establishment of the NAN data link. The closer the device distance, the greater the success rate.
[0013] Among them, the first electronic device can calculate the length of the above touch time according to the moment when it starts to receive the NFC signal from the second electronic device to the moment when the NFC signal from the second electronic device terminates. During the establishment of the NAN data link, based on the signal received from the second electronic device (communication signal based on the Wi-Fi network), the first electronic device can calculate the received signal strength. The above received signal strength is related to the device distance. The greater the device distance, the smaller the received signal strength. Further, the first electronic device can determine the device distance according to the conversion relationship between the above received signal strength and the device distance.
[0014] In some embodiments, after the first electronic device touches the NFC tag of the second electronic device, the first electronic device can obtain the device identification information and the tag identification information of the second electronic device from the NFC tag. The device identification information can be used to uniquely identify the second electronic device. The tag identification information can be used to uniquely identify the NFC tag of the second electronic device. Using the above device identification information and tag identification information, the first electronic device can determine whether the NFC tag of the second electronic device is legal and whether the second electronic device is networked from the cloud server.
[0015] Among them, the device identification information of multiple electronic devices, the respective tag identification information of these multiple electronic devices, and the network configuration status of these multiple electronic devices can be stored in the cloud server. The first electronic device can send the device identification information and the tag identification information obtained from the NFC tag of the second electronic device to the cloud server. The cloud server can query whether the second electronic device is included in the above-mentioned multiple electronic devices according to the received device identification information. If the above-mentioned multiple electronic devices include the second electronic device, the cloud server can compare whether the received tag identification information matches the tag identification information of the second electronic device stored by itself. If they match, the cloud server can determine that the NFC tag of the second electronic device is legal. When it is found that the above-mentioned multiple electronic devices include the second electronic device, the cloud server can obtain the network configuration status of the second electronic device stored by itself. The cloud server can send the result of whether the NFC tag is legal and the network configuration status of the second electronic device to the first electronic device.
[0016] If the NFC tag of the second electronic device is legal and the second electronic device is not network-configured, the first electronic device can establish a NAN data link with the second electronic device and configure the network for the second electronic device through the NAN data link.
[0017] In some embodiments, before the first electronic device establishes a first data link with the second electronic device, the first electronic device can obtain a network configuration application program from the cloud server. The network configuration application program can be used for the first electronic device to establish a first data link with the second electronic device, estimate the success rate of establishing the first data link during the establishment process of the first data link. When the success rate is less than the first threshold, the first electronic device establishes a second data link with the second electronic device and sends the network configuration information to the second electronic device through the second data link.
[0018] In some embodiments, the method for the first electronic device to estimate the success rate of establishing a NAN data link using the touch time and the device distance can be as follows: The first electronic device fuzzifies the touch time and the device distance to obtain a first fuzzy vector and a second fuzzy vector respectively. The first electronic device determines that the fuzzy vector corresponding to the success rate is a third fuzzy vector according to the first fuzzy relationship when the touch time corresponds to the first fuzzy vector and the device distance corresponds to the second fuzzy vector. The first fuzzy relationship is used to indicate the relationship between the fuzzy vectors corresponding to the touch time, the device distance, and the success rate respectively. The first electronic device defuzzifies the third fuzzy vector to obtain the success rate.
[0019] In some embodiments, after the first data link is successfully established, the first electronic device may send the network configuration information to the second electronic device via the first data link. Among them, after the first data link is successfully established, the first electronic device may stop estimating the success rate of establishing the first data link. After receiving the network configuration information, the second electronic device may send a network configuration information reception response to the first electronic device.
[0020] If the first electronic device does not receive a network configuration information reception response within a preset time period after sending the network configuration information via 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 network configuration information to the second electronic device via 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 network configuration information to the second electronic device via the second data link.
[0021] In some embodiments, the moment when the first data link starts to be established is within the above-mentioned touch time. The longer the touch time of the first electronic device touching the NFC tag of the second electronic device, the longer the duration of the close-range state maintained between the first electronic device and the second electronic device. Then, the longer the above-mentioned touch time, the higher the success rate of establishing the NAN data link between the first electronic device and the second electronic device. It can be understood that the influence of the above-mentioned touch time on the success rate of establishing the NAN data link can be attributed to the influence of the device distance on the success rate of establishing the NAN data link. When estimating the success rate of establishing the NAN data link, the first electronic device may simplify the factors affecting the above success rate to the device distance. That is, the first electronic device may use the device distance to estimate the success rate of establishing the NAN data link.
[0022] Exemplarily, the first electronic device fuzzifies the device distance to obtain a distance fuzzy vector. According to the second fuzzy relationship, when the device distance corresponds to the distance fuzzy vector, the first electronic device determines that the fuzzy vector corresponding to the success rate is the success rate fuzzy vector. The second fuzzy relationship is used to indicate the relationship between the fuzzy vectors corresponding to the device distance and the success rate respectively. The first electronic device defuzzifies the success rate fuzzy vector to obtain the success rate.
[0023] The above method can also simplify the operation of the first electronic device estimating the success rate of establishing the NAN data link and improve the efficiency of estimating the success rate of establishing the NAN data link.
[0024] In some embodiments, the first data link may be a data link other than the NAN data link. The factors affecting the success rate of establishing the first data link may include, but are not limited to, touch time and device distance. The first electronic device may use a fuzzy control method to estimate the success rate of establishing the first data link based on the factors affecting the success rate of establishing the first data link.
[0025] In some embodiments, the second data link is the data link used to transmit network configuration information in any of the following network configuration methods: Soft Access Point (softAP) network configuration, Bluetooth network configuration, and acoustic wave network configuration.
[0026] In some embodiments, before the first electronic device and the second electronic device establish the first data link, the second electronic device may receive a user operation. This user operation may trigger the second electronic device to enter the network configuration waiting state.
[0027] 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 an RF field nearby, the NFC TAG module may send a message to the above-mentioned microprocessor to indicate that there is another electronic device touching the NFC tag of the second electronic device. When it is detected that there is another electronic device touching its own NFC tag, the second electronic device may enter the network configuration waiting state. The user does not need to trigger the second electronic device to enter the network configuration waiting state through other user operations. This can simplify the user operations in the network configuration process and improve the user experience.
[0028] In a possible implementation, the above first network configuration method is NAN network configuration. The above second network configuration method is softAP network configuration. When in the network configuration waiting state, the second electronic device may send a service subscription frame to find an electronic device that can provide network configuration services for itself. In addition, the second electronic device may also broadcast a hotspot. An electronic device connected to the hotspot of the second electronic device may form a local area network between devices with the second electronic device. This local area network can be used to transmit network configuration information.
[0029] In a second aspect, an embodiment of the present application provides an electronic device. This electronic device is the first electronic device. The first electronic device includes a communication device, a memory, and a processor. Among them, the communication device can be used to establish a communication connection. The communication connection includes one or more of the following: NFC connection, a communication connection for communicating through the NAN data link. The memory can be used to store a computer program. The processor can be used to call the above computer program so that the first electronic device executes any possible implementation in the first aspect.
[0030] In a third aspect, an embodiment of the present application provides a chip, which is applied to the electronic device provided in the second aspect. The chip includes one or more processors, and the one or more processors are configured to call computer instructions to cause the electronic device provided in the second aspect to execute any possible implementation manner in the first aspect.
[0031] In a fourth aspect, an embodiment of the present application provides a computer program product including instructions. When the computer program product runs on a device, it causes the electronic device provided in the second aspect to execute any possible implementation manner in the first aspect.
[0032] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium including instructions. When the instructions run on a device, it causes the electronic device provided in the second aspect to execute any possible implementation manner in the first aspect.
[0033] It can be understood that the chip provided in the third aspect, the computer program product provided in the fourth aspect, and the computer-readable storage medium provided in the fifth aspect are all used to execute the method provided in the embodiment of the present application. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method, which will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 is a schematic diagram of the architecture of a communication system provided by an embodiment of the present application;
[0035] Figure 2 is a schematic diagram of the structure of an electronic device 100 provided by an embodiment of the present application;
[0036] Figure 3 is a flowchart of a method for establishing a NAN data link provided by an embodiment of the present application;
[0037] Figure 4A is a flowchart of a method for NAN network configuration provided by an embodiment of the present application;
[0038] Figure 4B is a schematic timeline diagram of NAN network configuration provided by an embodiment of the present application;
[0039] Figure 5 is a schematic diagram of a scenario for triggering an electronic device 200 to enter a state to be network-configured provided by an embodiment of the present application;
[0040] Figure 6 is a schematic diagram of a scenario where an electronic device 100 configures a network for an electronic device 200 provided by an embodiment of the present application;
[0041] Figure 7 is a schematic diagram of a user interface for an electronic device 100 to obtain network configuration information provided by an embodiment of the present application;
[0042] Figure 8 is a flowchart of a method for softAP network configuration provided by an embodiment of the present application;
[0043] Figure 9 is a schematic diagram of a method for estimating the success rate of establishing a NAN data link provided by an embodiment of the present application;
[0044] Figure 10 is a flowchart of a method for network configuration provided by an embodiment of the present application. Detailed implementation manners
[0045] Next, the technical solutions in the embodiments of the present application will be clearly and exhaustively described with reference to the accompanying drawings. Among them, in the description of the embodiments of the present application, unless otherwise specified, " / " means "or". For example, A / B may mean A or B; "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B may mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality of" means two or more than two.
[0046] Hereinafter, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as implying or suggesting relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of the present application, unless otherwise specified, the meaning of "a plurality of" is two or more than two.
[0047] Figure 1 Exemplarily shows a schematic diagram of the architecture of a communication system 10 involved in the present application.
[0048] As Figure 1 shown, the communication system 10 may include an electronic device 100, an electronic device 200, a router 300, and a cloud server 400. Among them, 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, and a personal digital assistant (PDA), etc. The electronic device 200 may be a smart lamp, a smart oven, a smart fan, a smart air conditioner, a smart TV, a smart bracelet, a smart speaker, a smart refrigerator, smart doors and windows, a smart car, a smart monitor, a smart robot, etc. The embodiments of the present application do not limit the specific types of the electronic device 100 and the electronic device 200.
[0049] The electronic device 100 can be in a connected state with the router 300. The electronic device 100 can configure the network for the electronic device 200. That is, the electronic device 200 is the device to be network-configured. The electronic device 100 can send the network configuration information to the electronic device 200. The network configuration information can include the name and password of the router 300.
[0050] The electronic device 200 can use the network configuration information to establish a connection with the router 300, thereby accessing the network and connecting to the cloud server 400.
[0051] The electronic device 100 can establish a binding relationship with the electronic device 200. For example, the electronic device 100 and the electronic device 200 can establish a binding relationship through the same account (such as a Huawei account).
[0052] The electronic device 100 can connect to the cloud server 400 through a 2G network, 3G network, 4G network, 5G network, wireless local area network (WLAN), etc. The electronic device 100 can download an application program for configuring the network for the electronic device 200 from the cloud server 400.
[0053] In addition, the electronic device 100 can remotely control an electronic device that has a binding relationship with the electronic device 100, such as the electronic device 200, through the cloud server 400. An electronic device that has a binding relationship with the electronic device 100 can also report its own status information to the electronic device 100 through the cloud server 400.
[0054] The cloud server 400 can store the binding relationship between the electronic device 100 and the electronic devices that have a binding relationship with the electronic device 100. In a possible implementation, the cloud server 400 can store information about multiple electronic devices associated with the same account. There is a binding relationship between the multiple electronic devices associated with the same account. For example, there is a binding relationship between the electronic device 100 and the electronic device 200. The cloud server 400 can receive an instruction from the electronic device 100 for controlling the electronic device 200 (such as an instruction to turn on the electronic device 200). 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 can send the control instruction to the electronic device 200, so that the electronic device 200 executes the operation corresponding to the control instruction. The cloud server 400 can also receive a message from the electronic device 200 for reporting its own status information to the electronic device 100 (such as a message indicating the battery level of the electronic device 200). 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 can send the message indicating the status information of the electronic device 200 to the electronic device 100, so that the electronic device 100 updates the status information of the electronic device 200.
[0055] The router 300 can be used to provide network access services for the electronic device 100 and the electronic device 200. It is not limited to a router, and other wireless access devices can also provide network access services for the electronic device 100 and the electronic device 200.
[0056] It should be noted that in this application, the process of the electronic device 100 configuring the network for the electronic device 200 may refer to the process in which the electronic device 100 establishes a communication connection with the electronic device 200 and sends the obtained network configuration information to the electronic device 200, and the electronic device 200 uses this network configuration information to connect to the router and access the network. The above network configuration information may include the name and password of the router.
[0057] Among them, the electronic device 100 can obtain the network configuration information by receiving the network configuration information input by the user. Alternatively, the electronic device 100 is in a connected state with the router. The network configuration information is stored in the electronic device 100. The electronic device 100 can send the stored network configuration information to the electronic device 200. In this way, when the electronic device 100 configures the network for the electronic device 200, the user does not need to input the network configuration information again, reducing user operations and improving the efficiency of network configuration. The embodiments of this application do not limit the method for the electronic device 100 to obtain the network configuration information.
[0058] Next, a schematic structural diagram of an electronic device 100 provided by an embodiment of this application is introduced.
[0059] As Figure 2 shown, 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, a headphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. Among them, the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric 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, etc.
[0060] It can be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0061] The processor 110 may include one or more processing units. For example, 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. Among them, different processing units may be independent devices or integrated in one or more processors.
[0062] In some embodiments, the processor 110 may include a softAP network configuration module. The softAP network configuration module may be integrated in the AP, NPU, or other chips. When it is confirmed that the NAN network configuration fails, the electronic device 100 may wake up the softAP network configuration module and use the softAP network configuration method to configure the network for the electronic device 200. In other embodiments, the processor 110 may include a Bluetooth network configuration module, an acoustic wave network configuration module, and so on. The embodiments of the present application do not limit the chips integrating the above different types of network configuration modules. The above different types of network configuration modules may be woken up after the electronic device 100 confirms that the NAN network configuration fails. The electronic device 100 may use the above different types of network configuration modules to provide corresponding network configuration services for the electronic device 200.
[0063] Among them, the controller may be the nerve center and command center of the electronic device 100. The controller may generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.
[0064] 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. This memory may save the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0065] The USB interface 130 is an interface compliant with the USB standard specification, which can specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used for data transmission between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. This interface can also be used to connect other electronic devices, such as AR devices, etc.
[0066] The charging management module 140 is used to receive charging input from the charger.
[0067] 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 inputs from the battery 142 and / or the charging management module 140 to supply power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160, etc.
[0068] The wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, and the baseband processor, etc.
[0069] The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas.
[0070] The mobile communication module 150 can provide solutions for wireless communications such as 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 can include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves by the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor and convert it into electromagnetic waves through the antenna 1 and radiate it out.
[0071] The wireless communication module 160 may provide solutions for wireless communications applied to the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite systems (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. 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 the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 may also receive the signals to be sent from the processor 110, perform frequency modulation and amplification on them, and convert them into electromagnetic waves through the antenna 2 for radiation.
[0072] The electronic device 100 realizes the display function through the GPU, the display screen 194, and the application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change the display information.
[0073] The display screen 194 is used to display images, videos, etc. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.
[0074] The electronic device 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the application processor, etc.
[0075] The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, and the light passes through the lens and is transmitted to the camera photosensitive element. The optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. In some embodiments, the ISP may be provided in the camera 193.
[0076] The camera 193 is used to capture static images or videos. An object generates an optical image through a lens and projects it onto a photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard format such as RGB or YUV. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.
[0077] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc.
[0078] The video codec is used to compress or decompress digital videos. The electronic device 100 can support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0079] The NPU is a neural-network (NN) computing processor. By referring to the structure of a biological neural network, such as the transmission pattern between human brain neurons, it can quickly process the input information and can also continuously self-learn. Through the NPU, applications such as intelligent cognition of the electronic device 100 can be realized, such as image recognition, face recognition, speech recognition, text understanding, etc.
[0080] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to achieve the data storage function. For example, files such as music and videos are saved in the external memory card.
[0081] The internal memory 121 can be used to store computer-executable program code, and the executable program code includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121.
[0082] The electronic device 100 can implement audio functions through the audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor, etc. For example, music playback, recording, etc.
[0083] The audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal. The audio module 170 can also be used for encoding and decoding audio signals.
[0084] The speaker 170A, also known as the "loudspeaker", is used to convert an audio electrical signal into a sound signal.
[0085] The receiver 170B, also known as the "earpiece", is used to convert an audio electrical signal into a sound signal.
[0086] The microphone 170C, also known as the "microphone" or "transmitter", is used to convert a sound signal into an electrical signal.
[0087] The headphone jack 170D is used to connect a wired headphone.
[0088] The pressure sensor 180A is used to sense a pressure signal and can convert the pressure signal into an electrical signal.
[0089] The gyroscope sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., the x, y, and z axes) can be determined by the gyroscope sensor 180B.
[0090] The barometric pressure sensor 180C is used to measure barometric pressure.
[0091] The magnetic sensor 180D includes a Hall sensor.
[0092] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device 100 and is applied to applications such as horizontal and vertical screen switching and pedometers.
[0093] The distance sensor 180F is used to measure distance. The electronic device 100 can measure distance through infrared or laser.
[0094] 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 outward through the light-emitting diode. The electronic device 100 uses the photodiode to detect the infrared reflected light from nearby objects. 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 is no object near the electronic device 100.
[0095] The ambient light sensor 180L is used to sense the ambient light brightness.
[0096] The fingerprint sensor 180H is used to collect fingerprints.
[0097] The temperature sensor 180J is used to detect temperature.
[0098] The touch sensor 180K, also known as the "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, also known as the "touch screen". The touch sensor 180K is used to detect touch operations acting thereon or nearby. The touch sensor may transmit the detected touch operation to the application processor to determine the type of touch event.
[0099] The bone conduction sensor 180M can acquire vibration signals.
[0100] The keys 190 include a power-on key, volume keys, etc. The keys 190 may be mechanical keys. They may also be touch keys. The electronic device 100 can receive key inputs and generate key signal inputs related to the user settings and function controls of the electronic device 100.
[0101] The motor 191 can generate vibration prompts.
[0102] The indicator 192 may be an indicator light, which can be used to indicate the charging state, power change, and can also be used to indicate messages, missed calls, notifications, etc.
[0103] The SIM card interface 195 is used to connect the SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with the electronic device 100. The electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1. In some embodiments, the electronic device 100 uses an eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
[0104] The structural schematic diagram of the electronic device 200 can be referred to Figure 2Schematic diagram of the structure of the electronic device 100 shown. The electronic device 200 may include more or fewer components than Figure 2 shown, or combine certain components, or split certain components, or have different component arrangements. The specific structure of the electronic device 200 is not limited in the embodiments of the present application.
[0105] In some embodiments, the electronic device 100 may use the NAN network configuration method to configure the network for the electronic device 200. The above NAN network configuration is a network configuration method based on the wireless-fidelity neighbor awareness networking (Wi-Fi NAN). Among them, Wi-Fi NAN is a communication technology for a point-to-point interconnected Wi-Fi wireless network. This communication technology can bypass network infrastructures (such as access points (APs) or cellular networks, etc.) to achieve one-to-one, one-to-many, or many-to-many Wi-Fi connections between electronic devices in the same Wi-Fi NAN, and perform services such as file sharing and data intertransmission.
[0106] During the above NAN network configuration process, the electronic device 100 and the electronic device 200 need to establish a Wi-Fi NAN data link (abbreviated as NAN data link in subsequent embodiments). When the NAN data link is successfully established, the electronic device 100 and the electronic device 200 are in the same Wi-Fi NAN. The electronic device 100 can use this NAN data link to provide network configuration services for the electronic device 200. That is, the electronic device 100 sends the network configuration information to the electronic device 200 through this NAN data link.
[0107] Figure 3 Exemplarily shows a flowchart of a method for the electronic device 100 and the electronic device 200 to establish a NAN data link.
[0108] As Figure 3 shown, the establishment process of the NAN data link may include steps S101 to S106. Among them:
[0109] S101. The electronic device 200 may broadcast a service subscription frame (subscribe message).
[0110] An electronic device 200, such as a smart oven, can broadcast a service subscription frame over a Wi-Fi interface on a specific channel (e.g., channel 6 on the 2.4 GHz band). This service subscription frame can be used to indicate the service content requested by the electronic device 200. The electronic device 200 can use this service subscription frame to query for an electronic device that can provide the service content corresponding to this service subscription frame for the electronic device 200. For example, the electronic device 200 is in a state waiting to be network-configured and requests other electronic devices to provide network-configuration services. The service content corresponding to the service subscription frame broadcast by the electronic device 200 can be the service of requesting network configuration.
[0111] S102. When receiving a service subscription frame from the electronic device 200, the electronic device 100 can send a service publish message to the electronic device 200.
[0112] An electronic device 100, such as a mobile phone, can receive a service subscription frame from the electronic device 200 over a Wi-Fi interface on the above-mentioned specific channel. If it is determined that it can provide network-configuration services for the electronic device 200, the electronic device 100 can send a service publish message to the electronic device 200. This service publish message can be used to indicate that the sender of the service publish message can provide the service content corresponding to the above service subscription frame. That is to say, the electronic device 200 can use this service publish message to notify the electronic device 200 that it can provide network-configuration services for the electronic device 200.
[0113] S103. The electronic device 200 can send a NAN data link establishment request to the electronic device 100.
[0114] When receiving the service publish message from the electronic device 100, the electronic device 200 can send a NAN data link establishment request to the electronic device 100, requesting to establish a NAN data link with the electronic device 100.
[0115] S104. The electronic device 100 can send a NAN data link reply message to the electronic device 200.
[0116] S105. The electronic device 200 can send a NAN data link confirmation message to the electronic device 100.
[0117] The exchange of the above NAN data link reply message and NAN data link confirmation message between the electronic device 100 and the electronic device 200 can be used to agree on relevant information such as the communication method and communication channel using NAN between the two electronic devices.
[0118] S106. The electronic device 100 can send a NAN data link key to the electronic device 200.
[0119] The electronic device 100 can generate a NAN data link key and send the NAN data link key to the electronic device 200. The NAN data link key can be used to encrypt the data during data interaction between the electronic device 100 and the electronic device 200 using the NAN data link. The embodiments of the present application do not limit the specific method for the electronic device 100 to generate the NAN data link key.
[0120] When the electronic device 200 receives the above 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 Wi-Fi NAN under the connection of the NAN data link. The electronic device 100 can provide a network configuration service for the electronic device 200 through the NAN data link.
[0121] The electronic device 100 and the electronic device 200 can also exchange more messages during the establishment process of the above NAN data link. The embodiments of the present application do not limit this.
[0122] Based on Figure 3 the method for establishing the NAN data link shown above, the following introduces a NAN network configuration method provided by the embodiments of the present application.
[0123] Figure 4A An exemplary flowchart of the method for the electronic device 100 to configure the network for the electronic device 200 using NAN network configuration is shown.
[0124] As Figure 4A shown, the NAN network configuration method may include steps S201 to S210. Among them:
[0125] S201. The electronic device 200 receives a user operation for triggering the electronic device 200 to enter the network configuration waiting state and enters the network configuration waiting state.
[0126] The user operation for triggering the electronic device 200 to enter the network configuration waiting state can be, for example, a long press operation (for example, long press for 3 seconds) acting on the key 202 of the electronic device 200 as Figure 5 shown. The embodiments of the present application do not limit the above user operation for triggering the electronic device 200 to enter the network configuration waiting state.
[0127] In some embodiments, in the network configuration waiting state, the electronic device 200 can broadcast a service subscription frame. The service content corresponding to the server subscription frame is a service for requesting network configuration. The electronic device 200 can query the electronic device that can provide the network configuration service for the electronic device 200 through the server subscription frame.
[0128] S202. The electronic device 100 touches the NFC tag of the electronic device 200.
[0129] 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.
[0130] The electronic device 100 may include an NFC module. The electronic device 200 may include an NFC tag 201 as shown in Figure 5 . The NFC tag 201 may include an NFC TAG module. The device identification information and the tag identification information of the electronic device 200 may be stored in the NFC TAG module of the electronic device 200. The specific types of the device identification information and the tag identification information of the electronic device 200 in the embodiments of the present application are not limited.
[0131] In a possible implementation manner, the electronic device 100 may generate a radio frequency (RF) field with a specified frequency (such as 13.56 MHz) through the NFC module, and obtain the data in the NFC TAG module by means of load modulating the RF field by the NFC TAG module within a specified distance range from the electronic device 100 (such as within 10 cm from the electronic device 100).
[0132] As shown in Figure 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.
[0133] The embodiments of the present application do not limit the specific implementation method for the electronic device 100 and the electronic device 200 to perform near-field communication.
[0134] S204. The electronic device 100 searches for the information of the NFC tag of the electronic device 200 and the network configuration status in the cloud server 400 according to the device identification information and the tag identification information of the electronic device 200, and determines that the NFC tag of the electronic device 200 is legal and the electronic device 200 is not network-configured.
[0135] The device identification information, tag identification information, and network configuration status of the electronic device 200 can be stored in the cloud server 400. The electronic device 100 can 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 can compare the received tag identification information with the tag identification information of the electronic device 200 in the cloud server 400 to determine whether the NFC tag 201 is legal. 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 can determine that the NFC tag 201 of the electronic device 200 is legal.
[0136] In addition, according to the relevant information of the electronic device 200 found in the cloud server 400, the electronic device 100 can obtain the network configuration status of the electronic device 200, so as to determine whether the electronic device 200 is network-configured.
[0137] The embodiments of the present application do not limit the method for the electronic device 100 to determine whether the tag of the electronic device 200 is legal and whether the electronic device 200 is network-configured.
[0138] After determining that the NFC tag 201 of the electronic device 200 is legal and the electronic device 200 is not network-configured, the electronic device 100 can execute the following step S205.
[0139] S205: The electronic device 100 can download the network configuration application program from the cloud server.
[0140] The above-mentioned network configuration application program can be used to provide network configuration services for the electronic device 200 by the electronic device 100.
[0141] In some embodiments, if the above-mentioned network configuration application program has been stored in the electronic device 100, the electronic device 100 can directly run the above-mentioned network configuration application program to configure the network for the electronic device 200.
[0142] S206: A NAN data link is successfully established between the electronic device 100 and the electronic device 200.
[0143] In a possible implementation manner, by running the network configuration application program in the above step S205, the electronic device 100 can configure the network for the electronic device 200 by using the NAN network configuration method. Among them, the electronic device 100 can receive the service subscription frame broadcast by the electronic device 200 in the network configuration waiting state in the above step S201. The electronic device 100 can establish a NAN data link with the electronic device 200 according to the method for establishing the NAN data link Figure 3 shown above. The specific process can refer to the foregoing embodiments and will not be elaborated here.
[0144] When a NAN data link is successfully established between the electronic device 100 and the electronic device 200, the electronic device 100 may perform the following step S207.
[0145] S207. The electronic device 100 receives network configuration information input by the user. The network configuration information includes the name and password of the router.
[0146] S208. The electronic device 100 sends the network configuration information to the electronic device 200 through the NAN data link.
[0147] The electronic device 100 can receive the network configuration information input by the user and send the network configuration information to the electronic device 200 through the NAN data link.
[0148] Exemplarily, the electronic device 100 may display a user interface 710 as Figure 7 shown. The user interface 710 may include a network configuration information input box 711. The network configuration information input box 711 may include a name input field 711A, a password input field 711B, and a confirmation control 711C. Among them, the name input field 711A may be used to input the name of the router (i.e., the name of the accessed Wi-Fi). The password input field 711B may be used to input the password of the router (i.e., the password of the accessed Wi-Fi). The confirmation control 711C may be used to trigger the electronic device 100 to send the received name and password of the router to the electronic device 200.
[0149] Figure 7 This is only an exemplary description of the user interface for the electronic device 100 to receive network configuration information input by the user in this application, and does not limit this application.
[0150] In some embodiments, the network configuration information is stored in the electronic device 100. The electronic device 100 may directly send the above network configuration information to the electronic device 200 through the NAN data link. In this way, when the electronic device 100 configures the network for different electronic devices, the user does not need to input the above network configuration information every time, simplifying the user operation in the network configuration process.
[0151] S209. The electronic device 200 may send a network configuration information reception reply to the electronic device 100.
[0152] The electronic device 200 may indicate to the electronic device 100 that it has received the network configuration information through the network configuration information reception reply. When receiving the above network configuration information reception reply, the electronic device 100 may confirm that the above NAN network configuration is successful.
[0153] S210. The electronic device 200 may exit the state of waiting for network configuration and connect to the router using the received network configuration information.
[0154] When receiving the network configuration information from the electronic device 100, the electronic device 200 can exit the state of waiting for network configuration and use the network configuration information to connect to the router 300. Among them, when exiting the state of waiting for network configuration, the electronic device 200 can stop broadcasting the server subscription frame in the above step S201.
[0155] It should be noted that the electronic device 100 can encrypt the above network configuration information according to the agreed encryption method. When receiving the encrypted network configuration information, the electronic device 200 can decrypt it according to the agreed decryption method. The embodiments of the present application do not limit the above encryption method and decryption method.
[0156] Compared with network configuration methods such as Bluetooth network configuration and softAP network configuration, Figure 4A the NAN network configuration method shown has a shorter delay and better network configuration performance. However, the success rate of NAN network configuration is affected by the success rate of establishing the NAN data link between electronic devices. If the NAN data link cannot be successfully established between the electronic device 100 and the electronic device 200, the electronic device 100 cannot send the network configuration information to the electronic device 200. Then the electronic device 200 cannot connect to the router 300. And the device distance between the electronic device 100 and the electronic device 200 is the key factor affecting the establishment of the NAN data link 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, the higher the success rate of establishing the NAN data link.
[0157] In addition, before the electronic device 100 configures the network for the electronic device 200 by using the NAN network configuration method, the electronic device 100 touches the NFC tag of the electronic device 200 to detect whether the NFC tag of the electronic device 200 is legal and whether the electronic device 200 is network-configured. In addition to the above 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.
[0158] Please refer to Figure 4B Figure 4B which exemplarily shows the time axis schematic diagram of the above NAN network configuration.
[0159] As Figure 4B shown, the electronic device 100 starts to touch the NFC tag of the electronic device 200 at time t1 ( Figure 4A The step S202) shown. The electronic device 100 may determine the moment when it starts to receive the NFC signal from the electronic device 200 as the above-mentioned t1 moment. The electronic device 100 leaves the NFC tag of the electronic device 200 at the t3 moment. Among them, the distance between the electronic device 100 and the electronic device 200 gradually increases. At the above-mentioned t3 moment, the distance between the electronic device 100 and the electronic device 200 reaches the critical distance of the near-field communication range. The electronic device 100 may determine the change moment when the NFC signal received from the electronic device 200 changes to not receiving the NFC signal of the electronic device 200 as the above-mentioned t3 moment.
[0160] The time elapsed from the t1 moment to the t3 moment is the touch time when the electronic device 100 touches the electronic device 200. From Figure 4A It can be seen that within the above-mentioned touch time, the electronic device 100 can obtain the device identification information and label identification information of the electronic device 200 from the NFC tag of the electronic device 200. The electronic device 100 can use the obtained device identification information and label identification information to determine whether the NFC tag of the electronic device 200 is legal and whether the electronic device 200 is networked. When it is determined that the NFC tag of the electronic device 200 is legal and the electronic device 200 is not networked, the electronic device can download the network configuration application program from the cloud server and run the network configuration application program to network the electronic device 200.
[0161] Within the above-mentioned touch time, the electronic device 100 can also start to network the electronic device 200 by using the NAN networking method.
[0162] Exemplarily, the electronic device 100 determines that the NFC tag of the electronic device 200 is legal and the electronic device 200 is not networked, and the time elapsed during the process of the electronic device 100 downloading the network configuration application program from the cloud server is the time period from the t1 moment to the t2 moment within the touch time.
[0163] Furthermore, the electronic device 100 can start to run the above-mentioned network configuration application program. That is, the electronic device 100 can start to network the electronic device 200 by using the NAN networking method. For example, the moment when the electronic device 100 starts to network the electronic device 200 by using the NAN networking method can be the above-mentioned t2 moment. During the above-mentioned NAN networking process, a NAN data link is established between the electronic device 100 and the electronic device 200.
[0164] By Figure 4BIt can be seen that the longer the touch time of the NFC tag of the electronic device 100 touching the electronic device 200 (the longer the time between the above-mentioned time t2 and time t3), the longer the duration of the close proximity state maintained between the electronic device 100 and the electronic device 200. It can be understood that the longer the above-mentioned touch time, the higher the success rate of establishing the NAN data link between the electronic device 100 and the electronic device 200.
[0165] In a possible implementation manner, if the time for NAN network configuration between the electronic device 100 and the electronic device 200 times out, the electronic device 100 can confirm that the NAN network configuration fails, and the electronic device 100 can switch to the softAP network configuration method to configure the network for the electronic device 200.
[0166] In some embodiments, if the electronic device 100 does not receive the Figure 4A network configuration information reception response in the above-mentioned step S209 within the preset time, the time for NAN network configuration between the electronic device 100 and the electronic device 200 times out.
[0167] Optionally, in some 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 NAN network configuration between the electronic device 100 and the electronic device 200 times out. Among them, Figure 3 it can be known that affected by the touch time of the NFC tag of the electronic device 100 touching the electronic device 200 and the device distance between the electronic device 100 and the electronic device 200, after the electronic device 200 sends a request to establish the NAN data link to the electronic device 100, it may not be able to receive the NAN data link reply message from the electronic device 100. If the time for the electronic device 200 to wait for the above-mentioned NAN data link reply message exceeds the preset time, the establishment of the NAN data link between the electronic device 100 and the electronic device 200 fails.
[0168] 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 establishment of the NAN data link between the electronic device 100 and the electronic device 200 fails.
[0169] If the time for the electronic device 100 to wait for the NAN data link confirmation message after sending the NAN data link reply message exceeds the preset time, the establishment of the NAN data link between the electronic device 100 and the electronic device 200 fails.
[0170] Among them, in the above-mentioned Figure 3During the process of establishing the NAN data link shown, if the electronic device 200 waits for a timeout, the electronic device 200 can send a message to the electronic device 100 to indicate the failure of establishing the NAN data link. After receiving the above message indicating the failure of establishing the NAN data link, the electronic device 100 can confirm the failure of NAN network configuration. In the case where the electronic device 100 waits for a timeout, the electronic device 100 can confirm the failure of establishing the NAN data link. That is, the NAN network configuration fails.
[0171] Not limited to the above method, the electronic device 100 can also confirm the timeout of the time for NAN network configuration through other methods.
[0172] Generally, the time order of magnitude of the above waiting timeout is in seconds. That is to say, during the process of NAN network configuration, affected by the above touch time and device distance, the NAN data link may not be successfully established. However, the electronic device 100 and / or the electronic device 200 still need to wait for several seconds to complete the waiting timeout process specified in the network configuration protocol. Furthermore, the electronic device 100 can confirm the NAN network configuration recognition and switch to another network configuration method to configure the network for the electronic device 200.
[0173] When confirming the failure of NAN network configuration, the electronic device 100 can switch to the softAP network configuration method to provide network configuration services for the electronic device 200.
[0174] In a possible implementation manner, the electronic device 100 may be configured with a softAP network configuration module. The softAP network configuration module can be integrated in an AP or an NPU or other chips. When confirming the failure of NAN network configuration, the electronic device 100 can wake up the softAP network configuration module and use the softAP network configuration method to configure the network for the electronic device 200. Among them, when the electronic device 200 is in the state of waiting for network configuration, it can also broadcast hotspot messages. That is to say, in response to the user operation for triggering the electronic device 200 to enter the state of waiting for network configuration, in addition to broadcasting a service subscription frame for requesting network configuration services, the electronic device 200 can also turn on the hotspot and broadcast hotspot messages.
[0175] Next, a softAP network configuration method provided by an embodiment of the present application will be introduced.
[0176] Figure 8 An exemplary flowchart of the method for the electronic device 100 to configure the network for the electronic device 200 using softAP network configuration is shown.
[0177] As Figure 8 shown, the softAP network configuration method may include steps S301 to S308. Among them:
[0178] S301. The electronic device 200 turns on the hotspot.
[0179] When receiving a user operation for triggering the electronic device 200 to enter the network configuration waiting state, the electronic device 100 can turn on the hotspot. The above-mentioned user operation for triggering the electronic device 200 to enter the network configuration waiting state can be, for example, a long-press operation (e.g., long-press for 3 seconds) acting on the button 202 of the electronic device 200 as shown in Figure 5 the following. The embodiments of the present application do not limit the above-mentioned user operation for triggering the electronic device 200 to enter the network configuration waiting state.
[0180] S302. The electronic device 200 can broadcast hotspot messages.
[0181] The hotspot message can include the physical address of the electronic device 200.
[0182] S303. The electronic device 100 can receive the hotspot message from the electronic device 200 and receive a user operation for selecting the hotspot of the electronic device 200.
[0183] S304. The electronic device 100 can connect to the hotspot of the electronic device 200.
[0184] In some embodiments, the electronic device 100 can receive hotspot messages of at least one electronic device. The at least one electronic device includes the electronic device 200. The electronic device 100 can display the hotspot names of the above-mentioned at least one electronic device. In response to a user operation for selecting the hotspot of the electronic device 200, the electronic device 100 can connect to the hotspot of the electronic device 200 according to the physical address of the electronic device 200 in the hotspot message.
[0185] When connected to the hotspot of the electronic device 200, the electronic device 100 and the electronic device 200 can establish a local area network between the devices. The local area network can be used for data transmission between the electronic device 100 and the electronic device 200.
[0186] S305. The electronic device 100 can receive network configuration information input by the user. The network configuration information can include the name and password of the router.
[0187] The process of the electronic device 100 receiving the network configuration information input by the user can refer to step S207 in the method shown in the foregoing Figure 4A and will not be elaborated here.
[0188] In some embodiments, the above-mentioned network configuration information is stored in the electronic device 100. The electronic device 100 can dispense with the user input of network configuration information.
[0189] S306. The electronic device 100 can send the network configuration information to the electronic device 200 through the local area network.
[0190] Using the local area network between the electronic device 100 and the electronic device 200, the electronic device 100 can send the above-mentioned network configuration information to the electronic device 200.
[0191] S307. The electronic device 200 can send a network configuration information reception response to the electronic device 100.
[0192] When receiving the above-mentioned network configuration information, the electronic device 200 can send a network configuration information reception response to the electronic device 100 to indicate that the electronic device 100 itself has received the network configuration information.
[0193] It should be noted that the electronic device 100 can encrypt the network configuration information when sending it. When receiving the encrypted network configuration information, the electronic device 200 can decrypt it to obtain the network configuration information. The embodiments of the present application do not limit the above-mentioned encryption and decryption methods.
[0194] S308. The electronic device 200 can turn off the hotspot and connect to the router using the received network configuration information.
[0195] When turning off the hotspot, the electronic device 200 can stop broadcasting hotspot messages. Using the received network configuration information, the electronic device 200 can establish a connection with the router 300.
[0196] The embodiments of the present application do not limit the method for softAP network configuration between the electronic device 100 and the electronic device 200. During the softAP network configuration process, the electronic device 100 and the electronic device 200 can also exchange more or less information.
[0197] It can be seen from the above embodiments that the electronic device 100 needs to switch to the softAP network configuration method after reconfirming the failure of NAN network configuration. And the electronic device 100 needs to wait until the time for NAN network configuration times out before it can confirm the failure of NAN network configuration. That is to say, when the time for NAN network configuration times out, the electronic device 100 can switch to the softAP network configuration method. The time spent waiting for the time for NAN network configuration to time out is relatively long. If the NAN network configuration fails, then the time required for the electronic device 100 to configure the network for the electronic device 200 using NAN network configuration combined with softAP network configuration is relatively long. The above-mentioned waiting for the time for NAN network configuration to time out will result in a low efficiency of the electronic device 100 for configuring the network for the electronic device 200.
[0198] The present application provides a power distribution method. The electronic device 100 can estimate the success rate of establishing a NAN data link between the electronic device 100 and the electronic device 200 by using the touch time when the electronic device 100 touches the NFC tag of the electronic device 200 and the device distance between the electronic device 100 and the electronic device 200. If the estimated success rate of establishing the NAN data link is lower than the preset success rate, the electronic device 100 can immediately switch to other power distribution methods (such as softAP power distribution) to distribute power to the electronic device 200. This can reduce the time spent waiting for the time-out of the NAN power distribution to confirm the failure of the NAN power distribution due to the failure of the NAN power distribution, and improve the efficiency of the power distribution.
[0199] From the embodiments described above Figure 4A and Figure 4B it can be seen that the success rate of establishing a NAN data link between the electronic device 100 and the electronic device 200 is affected by the touch time when the electronic device 100 touches the NFC tag of the electronic device 200 and the device distance between the electronic device 100 and the electronic device 200. Therefore, during the process of establishing the NAN data link, the electronic device 100 can estimate the success rate of establishing the NAN data link by using the touch time when the electronic device 100 touches the NFC tag of the electronic device 200 and the device distance between the electronic device 100 and the electronic device 200.
[0200] The concepts of the touch time and the device distance are specifically introduced below.
[0201] 1. Touch time
[0202] The touch time can be the time elapsed for the electronic device 100 to receive the NFC signal from the electronic device 200. That is, the electronic device 100 can calculate the length of the above touch time according to the start time of receiving the NFC signal from the electronic device 200 to the end time of the NFC signal from the electronic device 200.
[0203] 2. Device distance
[0204] The device distance is the distance between the electronic device 100 and the electronic device 200 during the process of establishing the NAN data link. Among them, during the process of establishing the NAN data link, according to the received signal from the electronic device 200, the electronic device 100 can calculate the received signal strength. The above signal from the electronic device 200 is a communication signal based on the Wi-Fi network (hereinafter referred to as the Wi-Fi signal in the subsequent embodiments). For example, the signals shown above Figure 3 used to indicate the NAN data link establishment request signal, the signal used to indicate the NAN data link confirmation message, or other signals. The present application embodiment does not limit the calculation method of the above received signal strength.
[0205] Further, the electronic device 100 can determine the device distance between itself and the electronic device 200 according to the conversion relationship between the received signal strength and the device distance. The conversion relationship between the received signal strength and the device distance can refer to the following relational expression (1):
[0206] (1)
[0207] Wherein, is the device distance. is the received signal strength. represents the received signal strength when the device distance between the signal transmitter (i.e., the electronic device 200) and the signal receiver (i.e., the electronic device 100) is 1 meter. The best value range of is [45, 49]. The above [45, 49] is a value range greater than or equal to 45 and less than or equal to 49. It is not limited to taking the values within the best value range of the above The values within the best value range, Other values can also be taken. represents the environmental attenuation factor. The best value range of is [3.25, 4.5]. The above [3.25, 4.5] is a value range greater than or equal to 3.25 and less than or equal to 4.5. It is not limited to taking the values within the best value range of the above The values within the best value range, Other values can also be taken.
[0208] The longer the above touch time and the closer the above device distance, the higher the success rate of establishing the NAN data link.
[0209] There is no clear boundary for the above long or short touch time and near or far device distance. It is a fuzzy concept and can be described by a fuzzy set. For example, a near device distance is a fuzzy set. This fuzzy set can refer to the device distances in different cases of the closeness between electronic devices, and there is no clear boundary. Based on the above fuzzy concept, the electronic device 100 can establish a fuzzy controller (FC) and use the fuzzy control method to estimate the success rate of establishing the NAN data link.
[0210] Next, a method for estimating the success rate of establishing the NAN data link provided by the embodiments of the present application will be specifically introduced.
[0211] By Figure 3It can be known that after the electronic device 100 sends a service publication frame to the electronic device 200, an NAN data link can start to be established between the electronic device 100 and the electronic device 200. The electronic device 100 can start from the moment when the service publication frame is sent, estimate the success rate of establishing the NAN data link, and determine whether the success rate is lower than a preset success rate. The embodiment of the present application does not limit the value of the preset success rate. For example, the value of the preset success rate can be 30%.
[0212] In a possible implementation manner, the electronic device 100 can estimate the success rate of establishing the NAN data link every preset time and determine whether the success rate is lower than the preset success rate. When the estimated success rate is lower than the preset success rate, or when the NAN data link is successfully established between the electronic device 100 and the electronic device 200, the electronic device 100 can stop estimating the success rate of establishing the NAN data link.
[0213] The electronic device 100 can use the Figure 9 shown fuzzy controller 910 to estimate the success rate of establishing the NAN data link.
[0214] It should be noted that in addition to the above device distance and touch time, the success rate of establishing the NAN data link is also affected by the power of the Wi-Fi module in the electronic device 200. The above Wi-Fi module can be used to transmit Wi-Fi signals. Among them, when the device distance between the electronic device 100 and the electronic device 200 is the same, the greater the power of the Wi-Fi module, the higher the intensity of the Wi-Fi signal received by the electronic device 100 from the electronic device 200, and the higher the success rate of establishing the NAN data link. The power of the Wi-Fi module in most electronic devices is the same. Therefore, when estimating the success rate of establishing the NAN data link, the electronic device 100 can simplify the input of the fuzzy controller 910. That is, the electronic device 100 can not use the power of the Wi-Fi module as the input of the fuzzy controller 910.
[0215] As Figure 9 shown, the inputs of the fuzzy controller 910 can include touch time and device distance. The calculation methods of touch time and device distance can refer to the foregoing embodiments and will not be elaborated here. The output of the fuzzy controller 910 can be the success rate of establishing the NAN data link. The fuzzy controller 910 can include a fuzzification interface 911, a knowledge base 912, an inference engine 913, and a defuzzification interface 914. Among them:
[0216] The fuzzification interface 911 can be used to fuzzify the input of the fuzzy controller 910 and convert the input with a definite quantity into a fuzzy vector.
[0217] Exemplarily, the touch time can be divided into five fuzzy sets according to the length of time: Negative Big (NBt), Negative Small (NSt), Zero (ZOt), Positive Small (PSt), Positive Big (PBt). The value ranges of the touch time corresponding to these five fuzzy sets can be: [0, 1.5], (1.5, 2], (2, 3], (3, 3.5], (3.5, 5] respectively. The unit of the above value ranges is seconds. It can be understood that the longer the touch time, the higher the success rate of establishing the NAN data link. Then, the larger the value of the touch time, the higher the probability that the touch time is classified into the fuzzy set PBt. For example, when the touch time is 3 seconds, the fuzzification interface 911 can classify this 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.
[0218]
[0219] Table 1
[0220] As can be seen from Table 1, the fuzzy vector corresponding to the fuzzy set ZOt is . That is, when the touch time input to the fuzzy controller 910 is 3 seconds, the fuzzification interface 911 can convert this input into the fuzzy vector .
[0221] The device distance can be divided into five fuzzy sets according to the distance: Positive Big (PBd), Positive Small (PSd), Zero (ZOd), Negative Small (NSd), Negative Big (NBd). The value ranges of the device distance corresponding to these five fuzzy sets can be: [0, 30], (30, 50], (50, 60], (60, 80], (80, 100] respectively. The unit of the above value ranges is centimeters. It can be understood that the closer the device distance, the higher the success rate of establishing the NAN data link. Then, the smaller the value of the device distance, the higher the probability that the device distance is classified into the fuzzy set PBd. For example, when the device distance is 20 centimeters, the fuzzification interface 911 can classify this 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.
[0222]
[0223] Table 2
[0224] As can be seen from Table 2, the fuzzy vector corresponding to the fuzzy set PB is . That is, when the device distance input to the fuzzy controller 910 is 20 centimeters, the fuzzification interface 911 can convert this input into the fuzzy vector .
[0225] The membership degrees of each fuzzy set in the above membership degree assignment tables (such as the touch time membership degree assignment table and the device distance membership degree assignment table) under different change levels can be determined according to empirical values. In the embodiments of the present application, the values of the membership degrees in the above membership degree assignment tables are not limited.
[0226] The knowledge base 912 may include a database 912A and a rule base 912B.
[0227] Among them, the database 912A can be used to store the membership degree assignment tables corresponding to the input variables and output variables. That is to say, the above Table 1 and the above Table 2 can be stored in the database 912A. In addition, the database 912A can also store the success rate membership degree assignment table. Among them, the success rate of 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 ranges of the success rates corresponding to these five fuzzy sets can be: [0, 30%], (30%, 45%], (45%, 55%], (55%, 85%], (85%, 100%]. The success rate membership degree assignment table can record the success rate of NAN data link establishment with different values and the membership degrees of the fuzzy sets. The success rate membership degree assignment table can refer to Table 3 below.
[0228]
[0229] Table 3
[0230] In the embodiments of the present application, the method for dividing the fuzzy sets corresponding to the above touch time, device distance, and success rate is not limited. These fuzzy sets can also be divided into more or fewer fuzzy sets according to the length of the touch time (or the distance of the device, or the value of the success rate). 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 above seven fuzzy sets can be set according to experience, and the embodiments of the present application do not limit this.
[0231] The rule base 912B can be used to store fuzzy control rules. The above fuzzy control rules can be based on expert knowledge or the long-term accumulated experience of manual operators. The fuzzy control rules can be connected by a series of relational words. For example, if (IF), then (THEN), and (AND), or (OR), else (ELSE), etc.
[0232] Generally, the fuzzy control rule "IF A AND B THEN C" can correspond to the fuzzy relation H. Among them, . The above It can represent expanding the matrix obtained by the operation into a column vector. The " " in the relational expression can represent the composition operation of the fuzzy matrix. The specific operation rules can refer to the operation rules in the prior art and will not be elaborated here.
[0233] Based on the above fuzzy relation H, the output corresponding to the given inputs A1 and B1 is . The above can represent expanding the matrix obtained by the operation into a row vector.
[0234] Exemplarily, the relationship between the touch time, the device distance, and the success rate of establishing the NAN data link can deduce the following basic fuzzy rules:
[0235] 1. IF the device distance is closer AND the touch time is longer THEN the success rate of establishing the NAN data link is higher;
[0236] 2. IF the device distance is farther AND the touch time is shorter THEN the success rate of establishing the NAN data link is lower.
[0237] Based on the above basic fuzzy rules, the fuzzy control table shown in Table 4 below can be stored in the rule base 912B.
[0238]
[0239] Table 4
[0240] As can be seen from Table 4, there are a total of 25 fuzzy control rules in this fuzzy control table, and each of the fuzzy control rules therein is consistent with the meaning expressed by the foregoing basic fuzzy rules.
[0241] From the fuzzy control rules in the above fuzzy control table, the electronic device 100 can obtain the fuzzy relation .
[0242] Specifically, the first fuzzy control rule can be: If the device distance belongs to the fuzzy set NBd and the touch time belongs to the fuzzy set NBt, then the success rate of establishing the NAN data link belongs to the fuzzy set NBs. That is, IF NBd AND NBt THEN NBs. Among them, the above can be expressed as . Referring to Table 2 above, NBd = . Referring to Table 1 above, NBt = . Referring to Table 3 above, NBs = . Then according to the operation rules of the fuzzy sets, it can be known that:
[0243]
[0244] Then, The column vector obtained by expansion is a column vector with 25 rows and 1 column.
[0245] . It is a matrix with 25 rows and 5 columns.
[0246] The second fuzzy control rule can be: If the device distance belongs to the fuzzy set NSd and the touch time belongs to the fuzzy set NBt, then the success rate of establishing the NAN data link belongs to the fuzzy set NBs. That is, IF NSd AND NBt THEN NBs. Among them, the above can be expressed as .
[0247] And so on, the electronic device 100 can obtain 25 fuzzy control rules in the fuzzy control table . Further, the electronic device 100 can calculate the fuzzy relation . Among them, . After the above union operation, the electronic device 100 can obtain a matrix with 25 rows and 5 columns (i.e., the fuzzy relation ).
[0248] The inference engine 913 can, according to the input fuzzy vector, use the fuzzy relation in the rule base 912B to infer which fuzzy set the success rate of establishing the NAN data link belongs to.
[0249] Exemplarily, the electronic device 100 detects that the above touch time is 3 seconds and the device distance is 20 cm. Then the fuzzification interface 911 can fuzzify the touch time to obtain the touch time fuzzy vector A2 = . The fuzzification interface 911 can fuzzify the device distance to obtain the device distance fuzzy vector B2 = . The inference engine 913 can receive the above A2 and B2 and calculate the inference result C2. Among them, . According to the operation rules of the fuzzy set, it can be known that:
[0250]
[0251] After the above operation, the inference result C2 obtained by the inference engine 913 is a vector with 1 row and 5 columns.
[0252] The inference engine 913 can input the inference result (i.e., the fuzzy set to which the success rate of establishing the NAN data link belongs) into the defuzzification interface 914.
[0253] The defuzzification interface 914 can defuzzify the inference result of the inference engine 913, converting the fuzzy set to which the success rate of the NAN data link establishment belongs into an output with a definite quantity (i.e., the success rate of the NAN data link establishment).
[0254] In a possible implementation, the defuzzification interface 914 can defuzzify the received inference result C2 using the centroid method. Specifically, the defuzzification interface 914 can calculate the success rate of the NAN data link establishment according to the following formula (2):
[0255] (2)
[0256] Where, is the value of the th column in the above inference result C2. That is, C2 = . Then takes the value of 5. is the value of each fuzzy set node when dividing the fuzzy set corresponding to the success rate in the foregoing embodiment. That is , , , , . is the success rate of the NAN data link establishment output by the fuzzy controller 910.
[0257] Not limited to the method of defuzzification using the centroid method above, the defuzzification interface 914 can also defuzzify the inference result from the inference engine 913 through other methods.
[0258] The specific numerical operations in the foregoing embodiment are only illustrative descriptions of this application and should not limit the method for the electronic device 100 to estimate the success rate of the NAN data link establishment.
[0259] In some embodiments, the input of the above fuzzy controller 910 can be the above device distance. That is, the electronic device 100 can further simplify the input of the fuzzy controller 910 and use the above device distance as the input of the fuzzy controller 910.
[0260] As can be seen from the foregoing embodiments, the longer the contact time of the electronic device 100 with the NFC tag of the electronic device 200, the longer the duration during which the electronic device 100 and the electronic device 200 maintain a close distance state. Since the closer the devices are, the higher the success rate of establishing the NAN data link, the longer the above contact time, the higher the success rate of establishing the NAN data link. It can be understood that the influence of the above contact time on the success rate of establishing the NAN data link can be attributed to the influence of the device distance on the success rate of establishing the NAN data link. Then, by simplifying the input of the fuzzy controller 910 of the electronic device 100 to the device distance, the success rate of establishing the NAN data link can still be estimated by the above fuzzy control method. The above simplification method can also simplify the operation of the electronic device 100 to estimate the success rate of establishing the NAN data link and improve the efficiency of estimating the success rate of establishing the NAN data link.
[0261] Specifically, the fuzzification interface 911 in the fuzzy controller 910 can fuzzify the device distance.
[0262] The following basic fuzzy rules can be derived from the relationship between the device distance and the success rate of establishing the NAN data link:
[0263] 1. IF the device distance is closer THEN the success rate of establishing the NAN data link is higher;
[0264] 2. IF the device distance is farther THEN the success rate of establishing the NAN data link is lower.
[0265] The fuzzy control table based on the above basic fuzzy rules and the fuzzy relationship can be stored in the rule base 912B in the fuzzy controller 910. The fuzzy relationship can be used to reflect the relationship between the device distance and the success rate of establishing the NAN data link.
[0266] The inference engine in the fuzzy controller 910 can estimate the success rate of establishing the NAN data link based on the fuzzified device distance and the above fuzzy relationship.
[0267] Among them, the specific implementation process of the electronic device 100 estimating the success rate of establishing the NAN data link by using the fuzzy control method based on the device distance can refer to the foregoing Figure 9 illustrated embodiments and will not be elaborated here.
[0268] When the success rate of establishing the NAN data link is obtained, the electronic device 100 can determine whether the success rate is lower than the preset success rate. If it is determined that the success rate is lower than the preset success rate, the electronic device 100 can immediately switch to other network configuration methods (such as softAP network configuration) to configure the network for the electronic device 200.
[0269] Based on Figure 9The method for estimating the success rate of establishing a NAN data link is shown, and a network configuration method provided in an embodiment of the present application is specifically introduced below.
[0270] Figure 10 The following is an exemplary flow chart of a method for network distribution provided by the present application. Figure 9 As shown, the network configuration method may include steps S401 to S410. Among them:
[0271] S401: The electronic device 200 receives a user operation for triggering the electronic device 200 to enter a network configuration ready state, and enters the network configuration ready state.
[0272] In some embodiments, in the network configuration waiting state, the electronic device 200 may send a service subscription frame to find an electronic device that can provide network configuration services for itself. The electronic device 200 may also broadcast a hotspot. An electronic device connected to the hotspot of the electronic device 200 may establish a local area network between the electronic device 200 and the electronic device 200.
[0273] S402 : The electronic device 100 touches the NFC tag of the electronic device 200 .
[0274] S403 : The electronic device 200 sends the device identification information and tag identification information of the electronic device 200 stored in the NFC TAG module to the electronic device 100 .
[0275] S404, the electronic device 100 searches the cloud server 400 for information on the NFC tag and network configuration status of the electronic device 200 according to the device identification information and tag identification information of the electronic device 200, and determines that the NFC tag of the electronic device 200 is legal and the electronic device 200 is not network configured.
[0276] S405 . The electronic device 100 may download a network configuration application from the cloud server.
[0277] The above steps S401 to S405 can refer to the above Figure 2 Steps S201 to S205 in the method shown are not repeated here.
[0278] S406 . A NAN data link is established between the electronic device 100 and the electronic device 200 .
[0279] The electronic device 100 can run the network configuration application in the above step S405 and send a service publishing frame to the electronic device 200 to prompt the electronic device 200 that it can provide network configuration services. Figure 3 The method for establishing a NAN data link shown establishes a NAN data link.
[0280] S407. During the NAN data link establishment phase, the electronic device 100 estimates the success rate of NAN data link establishment and determines that the success rate is lower than the preset success rate.
[0281] During the NAN data link establishment phase, the electronic device 100 may estimate the success rate of NAN data link establishment according to the method described above. Figure 9 When the success rate of NAN data link establishment is estimated, the electronic device 100 may determine whether the success rate is lower than the preset success rate.
[0282] 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 described above for NAN network configuration. Moreover, the electronic device 100 may estimate the success rate of NAN data link establishment every preset time. Figure 3 If the estimated success rate is lower than the preset success rate, the electronic device 100 may execute the following step S408.
[0283] S408. The electronic device 100 stops NAN network configuration and wakes up the softAP network configuration module.
[0284] Since it is estimated that the success rate of NAN data link establishment is lower than the preset success rate, the success rate of NAN network configuration may also be low. The electronic device 100 may immediately stop NAN network configuration and wake up the softAP network configuration module.
[0285] S409. The electronic device 100 may use the softAP network configuration method through the softAP network configuration module to configure the electronic device 200.
[0286] S410. When receiving the network configuration information from the electronic device 100, the electronic device 200 may exit the to-be-configured network state and connect to the router using the received network configuration information.
[0287] The implementation process of the electronic device 100 configuring the electronic device 200 using the softAP network configuration method may refer to the foregoing embodiments and will not be elaborated here.
[0288] When it is determined that the estimated success rate of NAN data link establishment is lower than the preset success rate, the electronic device 100 may also immediately switch to other network configuration methods, such as Bluetooth network configuration, acoustic wave network configuration, etc. Figure 8 For example.
[0289] Among them, when it is determined that the estimated success rate of NAN data link establishment is lower than the preset success rate, the electronic device 100 may also immediately switch to other network configuration methods, such as Bluetooth network configuration, acoustic wave network configuration, and so on.
[0290] By Figure 10As can be seen from the method shown, the electronic device 100 can estimate the success rate of establishing a NAN data link during the NAN network configuration process. Since the failure to establish a NAN data link will result in the failure of NAN network configuration. When the electronic device 100 estimates that the success rate of establishing a NAN data link is relatively low, it can promptly switch to other network configuration methods to configure the network for the electronic device 200. In this way, if the NAN data link establishment fails, the electronic device 100 can switch to other network configuration methods in advance for network configuration, instead of waiting for the NAN network configuration to time out and then switching to other network configuration methods. This can reduce the time spent waiting for the NAN network configuration to time out to confirm the failure of the NAN network configuration due to the failure of the NAN data link establishment, and improve the efficiency of network configuration.
[0291] In some embodiments, the electronic device 100 can estimate the success rate of establishing a NAN data link multiple times during the establishment process of the NAN data link. The above-mentioned process of establishing a NAN data link includes the process of using the NAN network configuration method of the electronic device 100 to configure the network for the electronic device 200. Among them, after the electronic device 100 sends a service advertisement frame to the electronic device 200 (that is, after the electronic device 100 executes Figure 3 the step S102 shown), the electronic device 100 can start to establish a NAN data link with the electronic device 200. When sending the NAN data link key to the electronic device 200 (that is, Figure 3 the step S106 shown), the NAN data link is successfully established between the electronic device 100 and the electronic device 200. That is to say, the electronic device 100 can estimate the success rate of establishing a NAN data link multiple times during the period from the moment when the service advertisement frame is sent until the moment when the NAN data link key is sent by the electronic device 100.
[0292] 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 can stop estimating the success rate of the NAN data link and switch to other network configuration methods to configure the network for the electronic device 200.
[0293] If the NAN data link is successfully established, the electronic device 100 can stop estimating the success rate of the NAN data link and send the network configuration information to the electronic device 200 through the NAN data link. Further, if the electronic device 100 receives a network configuration information reception response from the electronic device 200, the electronic device 100 can determine that the NAN network configuration is successful.
[0294] If the electronic device 100 does not receive the network configuration information reception response of the electronic device 200 within the preset time for sending the network configuration information, the electronic device 100 can detect whether the NAN data link still exists. If the NAN data link still exists, the electronic device 100 can send the network configuration information to the electronic device 200 through the NAN data link again. If the NAN data link does not exist, the electronic device 100 can switch to other network configuration methods to configure the network for the electronic device 200.
[0295] In some embodiments, during the process of configuring the network for the electronic device 200 by using the NAN network configuration method, the electronic device 100 can estimate the success rate of establishing the NAN data link multiple times. That is to say, after the electronic device 100 and the electronic device 200 successfully establish the NAN data link and before the electronic device 100 ends the NAN network configuration, the electronic device 100 can still estimate the success rate of establishing the NAN data link.
[0296] When it is estimated that the success rate of establishing the NAN data link is not lower than the preset success rate, the electronic device 100 can continue to perform the relevant operations in the NAN network configuration process. When the NAN data link is successfully established between the electronic device 100 and the electronic device 200, the electronic device 100 can use the established NAN data link to send the network configuration information to the electronic device 200.
[0297] In some embodiments, when the electronic device 100 estimates that the success rate of establishing the NAN data link is lower than the preset success rate, it can immediately switch to other network configuration methods to configure the network for the second electronic device. Among them, if the NAN data link has been successfully established between the electronic device 100 and the electronic device 200 before it is estimated that the success rate of establishing the NAN data link is lower than the preset success rate, the electronic device 100 can send the network configuration information to the electronic device 200 after the NAN data link is successfully established.
[0298] For example, before the electronic device 100 estimates that the success rate of establishing the NAN data link is lower than the preset success rate, or before receiving Figure 4A the network configuration information reception response from the electronic device 200 shown in S209, the success rate of establishing the NAN data link can be continuously estimated. The NAN data link is successfully established between the electronic device 100 and the electronic device 200. The electronic device 100 uses the NAN data link to send the network configuration information to the electronic device 200. During the period after the electronic device 100 sends the network configuration information and before receiving the network configuration information reception response of the electronic device 200, the electronic device 100 estimates that the success rate of establishing the NAN data link is lower than the preset success rate. Further, the electronic device 100 can switch to other network configuration methods (such as softAP network configuration) to configure the network for the electronic device 200.
[0299] Among them, if the electronic device 200 receives the network configuration information sent by the electronic device 100 through the NAN data link, the electronic device 200 can send a network configuration information reception response to the electronic device 100 and exit the state of waiting for network configuration. In this way, the electronic device 100 cannot use the above other network configuration methods to configure the network for the electronic device 200, and determines that the network configuration is successful after receiving the above network configuration information reception response.
[0300] Alternatively, if the electronic device 200 does not receive the network configuration information sent by the electronic device 100 through the NAN data link, the electronic device 200 can use the above other network configuration methods to configure the network for the electronic device 200.
[0301] When the electronic device 100 configures the network for the electronic device 200, the electronic device 100 can first use the first network configuration method to configure the network for the electronic device 200. If the first network configuration method fails, the electronic device 200 can switch to the second network configuration method to configure the network for the electronic device 200.
[0302] The above first network configuration method is not limited to the NAN network configuration in the foregoing embodiments, and may also be other network configuration methods. For example, the first network configuration method may be a Bluetooth network configuration. The second network configuration method may be a softAP network configuration. In the above first network configuration method, the network configuration information can be transmitted through the first data link. For example, when the first network configuration method is NAN network configuration, the first data link is the NAN data link. When the first network configuration method is Bluetooth network configuration, the first data link may be a Bluetooth data link. In the above second network configuration method, the network configuration information can be transmitted through the second data link.
[0303] Among them, the requirement for the device distance between the electronic device 100 and the electronic device 200 to establish the above first data link is higher than the requirement for the device distance to establish the above second data link.
[0304] The electronic device 100 can estimate the success rate of establishing the first data link during the process of establishing the first data link. If it is estimated that the success rate of establishing the first data link is lower than the preset success rate, the electronic device 100 can immediately switch to the second network configuration method to configure the network for the electronic device 200. In this way, the electronic device 100 does not have to wait for the first network configuration method to time out and then switch to other network configuration methods. This can reduce the time spent waiting for the first network configuration method to time out to confirm the failure of the first network configuration method due to the failure of the first network configuration method, and improve the efficiency of network configuration.
[0305] The method for the electronic device 100 to estimate the success rate of establishing the first data link can refer to the foregoing Figure 9The fuzzy control method shown. The factors affecting the success rate of establishing the first data link may include, but are not limited to, the touch time and device distance in the foregoing embodiments. The specific implementation process of the electronic device 100 estimating the success rate in the embodiments of the present application will not be elaborated herein.
[0306] In some embodiments, the NFC tag on the electronic device 200 includes an NFC TAG module. The NFC TAG module can be connected to the microprocessor of the electronic device 200 through a bus. When the NFC TAG module senses an RF field nearby, the NFC TAG module can send a message to the above-mentioned microprocessor to indicate that there is another electronic device touching the NFC tag of the electronic device 200. Further, the electronic device 200 can execute relevant instructions to make the electronic device 200 enter the network waiting state. That is to say, when the electronic device 100 touches the NFC tag of the electronic device 200, not only can the electronic device 100 obtain the device identification information and tag identification information stored in the NFC TAG module, but also it can trigger the electronic device 200 to enter the network waiting state. The user can trigger the electronic device 200 to enter the network waiting state without other user operations. This can simplify the user operations in the network configuration process and improve the user experience.
[0307] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A distribution network method, characterized in that, The method includes: A first electronic device touches a Near Field Communication (NFC) tag of a second electronic device; After the first electronic device receives a first data frame from the second electronic device, the first electronic device and the second electronic device start to establish a Neighbor Awareness Network (NAN) data link, and estimate the success rate of establishing the NAN data link according to the touch time and the device distance. Wherein, the first data frame is used to indicate that the second electronic device requests network configuration. The touch time is the duration when the first electronic device touches the NFC tag of the second electronic device. The longer the touch time, the greater the success rate. The device distance is the distance between the first electronic device and the second electronic device during the establishment of the NAN data link. The closer the device distance, the greater the success rate. The NAN data link is used for the first electronic device to transmit network configuration information to the second electronic device. The network configuration information includes the name and password of a wireless access device, and the network configuration information is used for the second electronic device to access the wireless access device; When the success rate is greater than or equal to a first threshold, the first electronic device continues to establish the NAN data link; When the success rate is less than the first threshold, the first electronic device stops establishing the NAN data link, establishes a second data link with the second electronic device, and sends the network configuration information to the second electronic device through the second data link.
2. The method according to claim 1, wherein The moment when the NAN data link starts to be established is within the touch time.
3. The method according to claim 1 or 2, characterized in that, After the first electronic device touches the Near Field Communication (NFC) tag of the second electronic device, the method further includes: The first electronic device uses device identification information and tag identification information to determine from a cloud server that the NFC tag of the second electronic device is legal and the second electronic device is not network-configured. The device identification information is used to uniquely identify the second electronic device, and the tag identification information is used to uniquely identify the NFC tag of the second electronic device. The device identification information and the tag identification information are obtained by the first electronic device from the NFC tag when touching the NFC tag.
4. The method according to claim 1 or 2, characterized in that Before the first electronic device and the second electronic device start to establish the NAN data link, the method further includes: The first electronic device obtains a network configuration application from the cloud server. The network configuration application is used for the first electronic device and the second electronic device to establish the NAN data link, estimate the success rate of establishing the NAN data link during the establishment of the NAN data link. When the success rate is less than the first threshold, the first electronic device establishes a second data link with the second electronic device and sends the network configuration information to the second electronic device through the second data link.
5. The method according to claim 3, wherein Before the first electronic device and the second electronic device start to establish the NAN data link, the method further includes: The first electronic device obtains a network configuration application from a cloud server; the network configuration application is used for the first electronic device to establish the NAN data link with the second electronic device, and estimate the success rate of establishing the NAN data link during the establishment process of the NAN data link. When the success rate is less than the first threshold, the first electronic device establishes a second data link with the second electronic device, and sends the network configuration information to the second electronic device through the second data link.
6. The method according to any one of claims 1, 2, and 5, characterized in that Estimating the success rate of establishing the NAN data link according to the touch time and the device distance, the method specifically includes: The first electronic device fuzzifies the touch time and the device distance to obtain a first fuzzy vector and a second fuzzy vector respectively; The first electronic device determines that the fuzzy vector corresponding to the success rate is a third fuzzy vector when the touch time corresponds to the first fuzzy vector and the device distance corresponds to the second fuzzy vector according to a first fuzzy relationship; the first fuzzy relationship is used to indicate the relationship between the fuzzy vectors corresponding to the touch time, the device distance, and the success rate respectively; The first electronic device defuzzifies the third fuzzy vector to obtain the success rate.
7. The method according to claim 3, wherein Estimating the success rate of establishing the NAN data link according to the touch time and the device distance, the method specifically includes: The first electronic device fuzzifies the touch time and the device distance to obtain a first fuzzy vector and a second fuzzy vector respectively; The first electronic device determines that the fuzzy vector corresponding to the success rate is a third fuzzy vector when the touch time corresponds to the first fuzzy vector and the device distance corresponds to the second fuzzy vector according to a first fuzzy relationship; the first fuzzy relationship is used to indicate the relationship between the fuzzy vectors corresponding to the touch time, the device distance, and the success rate respectively; The first electronic device defuzzifies the third fuzzy vector to obtain the success rate.
8. The method according to claim 4, characterized in that Estimating the success rate of establishing the NAN data link according to the touch time and the device distance, the method specifically includes: The first electronic device fuzzifies the touch time and the device distance to obtain a first fuzzy vector and a second fuzzy vector respectively; The first electronic device determines that the fuzzy vector corresponding to the success rate is a third fuzzy vector when the touch time corresponds to the first fuzzy vector and the device distance corresponds to the second fuzzy vector according to a first fuzzy relationship; the first fuzzy relationship is used to indicate the relationship between the fuzzy vectors corresponding to the touch time, the device distance, and the success rate respectively; The first electronic device defuzzifies the third fuzzy vector to obtain the success rate.
9. The method according to any one of claims 1, 2, 5, 7, and 8, characterized in that, The method further includes: After the NAN data link is successfully established, the first electronic device sends the network configuration information to the second electronic device through the NAN data link.
10. The method according to claim 3, characterized in that, The method further includes: After the NAN data link is successfully established, the first electronic device sends the network configuration information to the second electronic device through the NAN data link.
11. The method according to claim 4, wherein The method further includes: After the NAN data link is successfully established, the first electronic device sends the network configuration information to the second electronic device through the NAN data link.
12. The method according to claim 6, wherein The method further includes: After the NAN data link is successfully established, the first electronic device sends the network configuration information to the second electronic device through the NAN data link.
13. The method according to any one of claims 1, 2, 5, 7, 8, 10 - 12, characterized in that, The second data link is a data link used to transmit network configuration information in any of the following network configuration methods: Soft Access Point (softAP) network configuration, Bluetooth network configuration, and acoustic wave network configuration.
14. The method according to claim 3, characterized in that, The second data link is a data link used to transmit network configuration information in any of the following network configuration methods: Soft Access Point (softAP) network configuration, Bluetooth network configuration, and acoustic wave network configuration.
15. The method according to claim 4, characterized in that, The second data link is a data link used to transmit network configuration information in any of the following network configuration methods: Soft Access Point (softAP) network configuration, Bluetooth network configuration, and acoustic wave network configuration.
16. The method according to claim 6, wherein The second data link is a data link used to transmit network configuration information in any of the following network configuration methods: Soft Access Point (softAP) network configuration, Bluetooth network configuration, and acoustic wave network configuration.
17. The method according to claim 9, wherein The second data link is a data link used to transmit network configuration information in any of the following network configuration methods: Soft Access Point (softAP) network configuration, Bluetooth network configuration, and acoustic wave network configuration.
18. An electronic device, the electronic device being a first electronic device, characterized in that, The first electronic device includes a communication device, a memory, and a processor, where: The communication device is used to establish a communication connection, and the communication connection includes one or more of the following: Near Field Communication (NFC) connection, and a communication connection through a Neighbor Awareness Network (NAN) data link; The memory is used to store a computer program; the processor is used to call the computer program so that the first electronic device executes the method according to any one of claims 1-17.
19. A computer storage medium, characterized in that, Including: Computer instructions; when the computer instructions run on the first electronic device, the first electronic device is caused to execute the method according to any one of claims 1-17.
20. A computer program product, characterized in that, When the computer program product runs on the first electronic device, the first electronic device is caused to execute the method according to any one of claims 1-17.
Citation Information
Patent Citations
Network configuration method and device of household appliances
CN106211264A