WiFi network connection method, electronic equipment, system and readable storage medium

By establishing near-field communication and sharing WiFi connection information between electronic devices, the problem of cumbersome input of information manually when multiple devices connect to WiFi is solved, and the connection efficiency and user experience are improved.

CN120282238APending Publication Date: 2025-07-08HONOR DEVICE CO LTD

Patent Information

Application Number
CN202311855071.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-28
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

When multiple electronic devices are connected to WiFi networks, users need to manually enter WiFi connection information on each device, resulting in cumbersome and inefficient operations.

Method used

By establishing near-field communication between two electronic devices with a distance of less than a certain distance, using near-field communication to share WiFi connection information, and displaying a prompt message on one device so that the user can connect to the network with one click, avoiding manual input.

Benefits of technology

Improves the efficiency and user experience of connecting WiFi to multiple devices, ensuring that WiFi sharing can be achieved even if the device is not connected to the network or the cloud synchronization function is not enabled, simplifying the operation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120282238A_ABST
    Figure CN120282238A_ABST
Patent Text Reader

Abstract

The invention discloses a WiFi network connection method, electronic equipment, a WiFi network connection system and a readable storage medium, and belongs to the technical field of terminals. The method comprises the steps that when the distance between first electronic equipment and second electronic equipment is smaller than a first distance, near field communication is established between the first electronic equipment and the second electronic equipment, WiFi connection information sent by the second electronic equipment through the near field communication is received, a first prompt message is displayed, the first electronic equipment and the second electronic equipment log in the same equipment account, and the first electronic equipment and the second electronic equipment log in the same equipment account. The second electronic equipment is connected with the WiFi network, the first prompt message is not displayed under the condition that the distance between the first electronic equipment and the second electronic equipment is smaller than the second distance and larger than or equal to the first distance, and the first distance is smaller than the second distance. And after the connection operation is received, connecting the WiFi network based on the WiFi connection information. Thus, the WiFi connection information is shared through near field communication, and even if the first electronic equipment is not connected with the network, the first electronic equipment can be quickly connected with the WiFi network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of terminals, and in particular to a method for connecting to a WiFi network, an electronic device, a system, and a readable storage medium. Background Art

[0002] With the rapid development of terminal technology, electronic devices such as mobile phones, tablets, and computers emerge in an endless stream, and a user can usually have multiple electronic devices at the same time. In a possible scenario, if a user needs to connect multiple of their own electronic devices to a WiFi network, generally the user needs to input WiFi connection information (such as including a WiFi account and a WiFi password) on each of the multiple electronic devices in order to enable each of the multiple electronic devices to connect to the WiFi network.

[0003] However, since the user needs to manually input WiFi connection information in each electronic device, the operation is relatively cumbersome, resulting in a low networking efficiency for multiple devices. Summary of the Invention

[0004] This application provides a method for connecting to a WiFi network, an electronic device, a system, and a readable storage medium, which can solve the problem of low networking efficiency caused by the user having to input WiFi connection information one by one in the case where multiple electronic devices need to be connected to a WiFi network in the related art. The technical solutions are as follows:

[0005] In a first aspect, a method for connecting to a WiFi network is provided, which is applied to a first electronic device. The first electronic device and a second electronic device log in to the same device account, and the second electronic device is already connected to a WiFi network. The method includes:

[0006] When the distance between the first electronic device and the second electronic device is less than a first distance, establish a near-field communication with the second electronic device. Receive the WiFi connection information of the WiFi network sent by the second electronic device through the near-field communication, and display a first prompt message, where the first prompt message is used to indicate whether to synchronously connect to the WiFi network. Among them, when the distance between the first electronic device and the second electronic device is less than a second distance and greater than or equal to the first distance, the first prompt message is not displayed, and the first distance is less than the second distance. Receive a connection operation, and in response to the connection operation, connect to the WiFi network based on the WiFi connection information of the WiFi network.

[0007] In this way, the second electronic device shares the WiFi connection information with the first electronic device via near-field communication, causing the first electronic device to display a first prompt message, thereby facilitating the user to trigger the connection of the first electronic device to the WiFi network with one key, without the user having to input the WiFi connection information in the first electronic device again, improving the efficiency of WiFi network connection. Moreover, this method enables the first electronic device to share the WiFi connection information of the WiFi network connected by the second electronic device even when the first electronic device is not connected to any network, thus preventing the situation where the first electronic device cannot obtain the WiFi connection information shared by the second electronic device due to the first electronic device not being connected to the network in some scenarios. Additionally, since this method is not restricted by whether the WiFi cloud synchronization function is enabled, even if the WiFi cloud synchronization function is not enabled on the first electronic device and / or the second electronic device, the second electronic device can still share the WiFi with the first electronic device, thereby enhancing the user experience.

[0008] As an example of the present application, before the first electronic device connects to the WiFi network and after the second electronic device connects to the WiFi network, the first electronic device has not been connected to any network and has not been connected to the WiFi network. That is to say, even if the first electronic device cannot achieve WiFi sharing through the cloud server, it can still achieve WiFi sharing through near-field communication, thereby increasing the success rate of WiFi sharing.

[0009] As an example of the present application, the first electronic device is connected to other networks, has not been connected to the WiFi network, and the WiFi cloud synchronization function is not enabled on the first electronic device and / or the second electronic device. The WiFi cloud synchronization function refers to achieving WiFi sharing through the cloud server. In this way, even if the conditions for the first electronic device and the second electronic device to achieve WiFi sharing through the cloud server are not met, WiFi sharing can still be achieved through near-field communication.

[0010] As an example of the present application, the first electronic device not having been connected to the WiFi network includes: there is historical WiFi connection information of the WiFi network in the first electronic device, and there is no current WiFi connection information, where the historical WiFi connection information is the WiFi connection information set before the current WiFi connection information; or, there is no any WiFi connection information of the WiFi network in the first electronic device. In this way, even if the first electronic device has not been connected to this WiFi network, or has been connected to the WiFi network but the WiFi connection information of this WiFi network has been modified, the second electronic device can still share the WiFi connection information of this WiFi network with the first electronic device, enabling the first electronic device to quickly connect to the WiFi network.

[0011] As an example of this application, the specific implementation of displaying the first prompt message may include: querying whether there is WiFi connection information in the first electronic device, and if there is no WiFi connection information in the first electronic device, displaying the first prompt message. In this way, when there is no WiFi connection information in the first electronic device, it indicates that the user may have a need to connect to the WiFi network using the WiFi connection information. Therefore, the first electronic device displays the first prompt message. That is, the first prompt message is only displayed when it is predicted that the user may need to use the WiFi network to access the Internet, improving the user experience.

[0012] As an example of this application, when there is no WiFi connection information in the first electronic device, it is determined whether there is an application in the first electronic device that is requesting the network. If there is an application that is requesting the network, the first prompt message is displayed.

[0013] In this way, by querying whether there is an application that is requesting the network, it is determined whether the first electronic device has an Internet access requirement. When it is determined that the first electronic device has an Internet access requirement, the first prompt message will be displayed. Otherwise, when the first electronic device has no Internet access requirement, the first prompt message may not be displayed to meet the actual needs of the user, thereby improving the user experience.

[0014] As an example of this application, after the first prompt message is displayed, in response to a sliding operation on the first prompt message, the first prompt message is no longer displayed, where the sliding operation includes an upward sliding operation, a leftward sliding operation, or a rightward sliding operation; or, if no trigger operation on the first prompt message is received within a specified duration, the first prompt message is no longer displayed.

[0015] In this way, when a sliding operation on the first prompt message is received, it indicates that the user currently does not need to connect to the WiFi network based on the first prompt message, so the first prompt message can no longer be displayed, thereby reducing the occlusion of the current display interface by the first prompt message. Or, if no trigger operation on the first prompt message is received within a specified duration, it also indicates that the user currently does not need to connect to the WiFi network based on the first prompt message. For example, the user may not be using the first electronic device, or the user is using the first electronic device but does not trigger the first electronic device to connect to the WiFi network based on the first prompt message. In this case, the first prompt message can also no longer be displayed, thereby reducing the occlusion of the current display interface by the first prompt message.

[0016] As an example of the present application, after the first prompt message is no longer displayed, the first electronic device can also display the first prompt message in the notification center of the electronic device and store the WiFi connection information. In response to a trigger operation on the first prompt message in the notification center, based on the WiFi connection information, connect to the WiFi network.

[0017] In this way, after the first prompt message is not displayed, by displaying the first prompt message in the notification center and storing the WiFi connection information, when the user needs to connect to the WiFi network subsequently, the first electronic device can be triggered to connect with one key based on the first prompt message displayed in the notification center, without the user manually inputting the WiFi connection information, improving the operation convenience and the user experience.

[0018] As an example of the present application, in response to a connection operation, after connecting to the WiFi network based on the WiFi connection information of the WiFi network, receive a verification code acquisition operation on the verification interface of the first application. In response to the verification code acquisition operation, send a verification code acquisition request to the verification code system. The verification code acquisition request carries the connection information of the second electronic device, and the verification code acquisition request is used to request the verification code system to send the verification code information to the second electronic device based on the connection information. Receive the verification code information sent by the second electronic device through near-field communication. Display a second prompt message, and the second prompt message includes the verification code information.

[0019] That is, the verification code information is transmitted through a target channel, and the target channel is established when the distance between the second electronic device and the first electronic device is less than a first distance. In this way, the verification code information can also be shared through near-field communication, so that the first electronic device can quickly log in with the verification code information based on the second prompt message, improving the operation convenience.

[0020] As an example of the present application, the second prompt message includes a quick input control. In this case, after the second prompt message is displayed, in response to a trigger operation on the quick input control in the second prompt message, copy the verification code information to the verification interface and no longer display the second prompt message. In this way, by displaying the quick input control, the user can trigger the first electronic device to input the verification code information in the verification interface with one key, avoiding the need for the user to manually input, and improving the operation convenience.

[0021] As an example of the present application, before the first prompt message is displayed, the first electronic device and the second electronic device perform a trusted authentication when logging in to the same device account. In this case, when the trusted authentication is passed, the first prompt message is displayed. In this way, by establishing a trusted communication and sharing the WiFi connection information through the trusted communication, the reliability and security of data sharing are improved.

[0022] In a second aspect, a WiFi network connection method is provided, which is applied to a second electronic device. The second electronic device and a first electronic device log in to the same device account, and the second electronic device is already connected to a WiFi network. The method includes:

[0023] When the distance between the second electronic device and the first electronic device is less than a first distance, establish a near-field communication with the first electronic device. Send the WiFi connection information of the WiFi network to the first electronic device through the near-field communication, so that the first electronic device displays a first prompt message, and the first prompt message is used to indicate whether to synchronously connect to the WiFi network; wherein, when the distance between the second electronic device and the first electronic device is less than a second distance and greater than or equal to the first distance, the WiFi connection information is not sent, and the first distance is less than the second distance.

[0024] In this way, the second electronic device shares the WiFi connection information with the first electronic device through the near-field communication, so that the first electronic device displays the first prompt message, thereby facilitating the user to trigger the first electronic device to connect to the WiFi network with one key based on the first prompt message, without the user having to input the WiFi connection information in the first electronic device again, improving the efficiency of the WiFi network connection. Moreover, this method enables the first electronic device to share the WiFi connection information of the WiFi network connected by the second electronic device even when it is not connected to any network, thereby preventing the situation where the first electronic device fails to obtain the WiFi connection information shared by the second electronic device due to not being connected to the network in some scenarios. And since this method is not restricted by whether the WiFi cloud synchronization function is enabled, even if the first electronic device and / or the second electronic device do not enable the WiFi cloud synchronization function, the second electronic device can still share the WiFi with the first electronic device, thereby improving the user experience.

[0025] As an example of the present application, the specific implementation of sending the WiFi connection information of the WiFi network to the first electronic device through the near-field communication may include: determining that the WiFi connection information belongs to a white list, and sending the WiFi connection information to the first electronic device through the near-field communication.

[0026] In this way, by setting up a white list, when it is determined that the WiFi connection information to be shared belongs to the white list, the second electronic device sends the WiFi connection information, so that lightweight data can be shared through the near-field communication, improving the timeliness of data sharing.

[0027] As an example of this application, the second electronic device receives a verification code message, which includes verification code information. The verification code message is sent by the verification code system based on the connection information of the second electronic device after receiving a verification code acquisition request sent by the first electronic device. The verification code acquisition request carries the connection information, and the verification code acquisition request is triggered after the first electronic device receives a verification code acquisition operation on the verification interface of the first application. The verification code information is sent to the first electronic device through near-field communication. The verification code information is transmitted through a target channel, and the target channel is established when the distance between the second electronic device and the first electronic device is less than a first distance.

[0028] In this way, the verification code information can also be shared through near-field communication, so that the first electronic device can quickly log in with the verification code information based on the second prompt message, improving the convenience of operation.

[0029] In a third aspect, a WiFi network connection system is provided. The WiFi network connection system includes a first electronic device and a second electronic device. The first electronic device and the second electronic device log in to the same device account, and the second electronic device is already connected to the WiFi network;

[0030] The second electronic device is configured to establish near-field communication with the first electronic device when the distance between the first electronic device and the second electronic device is less than a first distance;

[0031] The second electronic device is configured to send the WiFi connection information of the WiFi network to the first electronic device through near-field communication;

[0032] The first electronic device is configured to receive the WiFi connection information of the WiFi network sent by the second electronic device through near-field communication and display a first prompt message, where the first prompt message is used to indicate whether to synchronously connect to the WiFi network. Among them, the first prompt message is not displayed when the distance between the first electronic device and the second electronic device is less than a second distance and greater than or equal to the first distance, and the first distance is less than the second distance;

[0033] The first electronic device is configured to be based on receiving a connection operation;

[0034] The first electronic device is configured to, in response to the connection operation, connect to the WiFi network based on the WiFi connection information.

[0035] In a fourth aspect, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the WiFi network connection method described in the first aspect or the second aspect is implemented.

[0036] Fifth aspect, a computer-readable storage medium is provided, in which instructions are stored, and when the instructions run on a computer, the computer is enabled to execute the WiFi network connection method described in the first aspect or the second aspect.

[0037] Sixth aspect, a computer program product including instructions is provided, and when the computer program product runs on a computer, the computer is enabled to execute the WiFi network connection method described in the first aspect or the second aspect.

[0038] The technical effects obtained in the above fourth aspect, fifth aspect and sixth aspect are similar to the technical effects obtained by the corresponding technical means in the above first aspect or second aspect, and will not be elaborated here. Description of the Drawings

[0039] Figure 1 is a schematic diagram of an interface shown according to an exemplary embodiment;

[0040] Figure 2 is a schematic diagram of an application scenario shown according to an exemplary embodiment;

[0041] Figure 3 is a schematic diagram of an application scenario shown according to another exemplary embodiment;

[0042] Figure 4 is a schematic diagram of an application scenario shown according to another exemplary embodiment;

[0043] Figure 5 is a schematic diagram of an application scenario shown according to another exemplary embodiment;

[0044] Figure 6 is a schematic diagram of an application scenario shown according to another exemplary embodiment;

[0045] Figure 7 is a schematic flowchart of a WiFi network connection method shown according to an exemplary embodiment;

[0046] Figure 8 is a schematic diagram of an application scenario shown according to another exemplary embodiment;

[0047] Figure 9 is a schematic diagram of an application scenario shown according to another exemplary embodiment;

[0048] Figure 10 is a schematic flowchart of a process of synchronizing verification code information shown according to an exemplary embodiment;

[0049] Figure 11 is a schematic flowchart of a method for establishing near field communication shown according to an exemplary embodiment;

[0050] Figure 12 It is a schematic structural diagram of an electronic device shown according to an exemplary embodiment. Detailed implementation manners

[0051] To make the objectives, technical solutions, and advantages of the present application clearer, the following will further describe the implementation manners of the present application in detail with reference to the accompanying drawings.

[0052] It should be understood that the "multiple" mentioned in the present application refers to two or more. In the description of the present application, unless otherwise specified, " / " means "or". For example, A / B may mean A or B. The "and / or" herein is only a description of the association relationship of the 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 order to clearly describe the technical solutions of the present application, terms such as "first" and "second" are used to distinguish the same items or similar items with basically the same functions and roles. Those skilled in the art can understand that the terms such as "first" and "second" do not limit the quantity and execution order, and the terms such as "first" and "second" do not necessarily limit to be different.

[0053] The reference to "an embodiment" or "some embodiments" etc. described in the specification of the present application means that a specific feature, structure, or characteristic described in combination with the embodiment is included in one or more embodiments of the present application. Thus, the statements such as "in an embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments" etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "include", "comprise", "have" and their variants all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0054] With the implementation of network construction, WiFi networks are becoming more and more popular. Most places such as airports, railway stations, libraries, and shopping malls have deployed WiFi networks. The popularity of WiFi networks has brought a lot of convenience to the Internet access of electronic devices. In applications, electronic devices usually need to connect to a WiFi network based on WiFi connection information, and the WiFi connection information generally includes a WiFi account and a WiFi password. For example, when a user needs to connect a mobile phone to a WiFi network, the user can enter the WiFi account and the WiFi password of the WiFi network to be connected in the mobile phone, and then trigger the mobile phone to connect to the WiFi network.

[0055] Currently, a user usually owns multiple electronic devices. For example, the multiple electronic devices include, but are not limited to, mobile phones, tablet computers, and laptop computers. The multiple electronic devices can log in to the same device account (such as a Honor account).

[0056] In some embodiments, if a user needs to connect multiple electronic devices to a WiFi network, the user needs to input the WiFi connection information one by one on each of the multiple electronic devices. That is, the user inputs the WiFi connection information on one of the multiple electronic devices and triggers this one electronic device to connect to the WiFi network. After that, the user continues to input the WiFi connection information on another one of the multiple electronic devices and triggers that another electronic device to connect to the WiFi network, and so on. The user inputs the WiFi connection information on each electronic device and triggers each electronic device to connect to the WiFi network. In this way, when the user needs to connect multiple electronic devices to the WiFi network, the operation of inputting the WiFi connection information needs to be repeated, and the operation is relatively cumbersome, resulting in a poor user experience.

[0057] In other embodiments, the user can trigger the sharing of WiFi connection information between multiple electronic devices with one key. In an example, when the user selects a WiFi account, inputs a WiFi password, and connects to the WiFi network on a tablet computer, the tablet computer can upload the WiFi account and the corresponding WiFi password to the cloud server; the mobile phone can obtain the WiFi account and the corresponding WiFi password shared by other devices from the cloud server. When the mobile phone also connects to the same WiFi account, the user does not need to input the WiFi password, and the mobile phone can directly connect to the WiFi network. However, in an example, when the mobile phone connects to a WiFi network, the mobile phone sends the WiFi account and the corresponding WiFi password to the cloud server. If the user wants to connect to the same WiFi network on the tablet computer, but after the mobile phone connects to the WiFi network and before the tablet computer connects to the WiFi network, the tablet computer has not connected to any network, and the tablet computer has not connected to the WiFi network either (that is, there is no WiFi connection information of the WiFi network in the tablet computer), then the tablet computer cannot obtain the WiFi account and the corresponding WiFi password of the WiFi network from the cloud server. Therefore, when the user selects the WiFi account to connect, the user still needs to manually input the WiFi password.

[0058] In addition, when synchronizing WiFi connection information between different electronic devices through a cloud server, user authorization is generally required. In one example, a cloud space application is provided in an electronic device (which can be a mobile phone or a tablet computer). A cloud synchronization master switch is provided in the cloud space application. When cloud synchronization is required for the electronic device, the user needs to turn on the cloud synchronization master switch. Additionally, in the case of turning on the cloud synchronization master switch, the user generally also needs to authorize which application data can be cloud-synchronized. For example, see Figure 1 , a control interface U1 is provided in the cloud space application. Control switches corresponding to application programs capable of cloud synchronization are provided in the control interface U1, such as including application programs like Gallery, Contacts, WLAN, etc. When the user turns on the control switch corresponding to the WLAN application program, the WiFi cloud synchronization function in the electronic device is turned on. The WiFi cloud synchronization function means achieving WiFi sharing through the cloud server, that is, at this time, the electronic device can synchronize WiFi connection information through the cloud server. Otherwise, if the cloud synchronization master switch is turned off, or the cloud synchronization master switch is turned on but the control switch corresponding to the WLAN application program is in the off state, the mobile phone cannot synchronize WiFi connection information through the cloud server.

[0059] It can be seen that the solution for synchronizing WiFi connection information between different electronic devices through the cloud server requires both the mobile phone and the tablet computer to be connected to the network and the cloud synchronization function to be turned on to achieve WiFi sharing. In some scenarios, if the tablet computer or the mobile phone is not connected to the network, or the tablet computer and / or the mobile phone do not turn on the WiFi cloud synchronization function, it will result in the inability to achieve WiFi sharing.

[0060] Scenario example: A user usually uses a mobile phone and a tablet at home. The mobile phone has a SIM card inserted and is connected to a mobile network. One day, the user changes the WiFi password. After changing the password: When connecting to the WiFi network on the mobile phone, the user enters the new WiFi password. However, due to the change of the WiFi password, the tablet cannot connect to the network, and the new WiFi password cannot be synchronized to the tablet through the cloud server. Therefore, the user needs to enter the new WiFi password on the tablet again to connect to the network; or, the tablet is connected to another WiFi network, but the mobile phone and / or the tablet do not have the WiFi cloud synchronization function enabled, and the new WiFi password cannot be synchronized to the tablet through the cloud server either; or, the user enters the new WiFi password on the tablet, but since the SIM card is not inserted in the mobile phone, the new WiFi password cannot be synchronized to the mobile phone through the cloud server. Therefore, the user needs to enter the new WiFi password on the mobile phone again to connect to the network; or, the user enters the new WiFi password on the tablet, the mobile phone has a SIM card inserted or is connected to another WiFi network, but the mobile phone and / or the tablet do not have the WiFi cloud synchronization function enabled, and the new WiFi password cannot be synchronized to the mobile phone through the cloud server either.

[0061] To this end, the embodiments of the present application provide a WiFi network connection method. When multiple electronic devices log in to the same device account and pass the trusted authentication, WiFi connection information can be synchronized based on the near-field communication established between the multiple electronic devices, enabling the multiple electronic devices to quickly share the WiFi network, avoiding the need for the user to repeatedly enter the WiFi connection information on each electronic device, thereby improving the user experience. Moreover, since the WiFi connection information is synchronized between the multiple electronic devices through near-field communication, even if the electronic devices are not connected to the network, WiFi sharing can still be achieved, and this synchronization process is not restricted by whether the WiFi cloud synchronization function is enabled, that is, even if the multiple electronic devices do not have the WiFi cloud synchronization function enabled, WiFi sharing can still be achieved.

[0062] For ease of understanding, the exemplary application scenarios related to the embodiments of the present application will be introduced next.

[0063] In one example, the user has two electronic devices, see Figure 2 , which are a mobile phone T1 and a tablet T2 respectively. The mobile phone T1 and the tablet T2 log in to the same device account. When the mobile phone T1 and the tablet T2 are close to each other, they can discover each other and can autonomously establish a connection, that is, near-field communication can be established, for example, through Bluetooth or other means. In some embodiments, these two electronic devices are said to be able to establish a trust ring. Next, an example will be given with the mobile phone T1 and the tablet T2 having established near-field communication.

[0064] The user carries these two electronic devices to a certain place (such as a certain coffee shop) that is covered by a WiFi network (for example, the WiFi account is WiFi-ABC), and neither the mobile phone T1 nor the tablet computer T2 has been connected to WiFi-ABC. When the user needs to connect both the tablet computer T2 and the mobile phone T1 to WiFi-ABC, the user can first enter the WiFi connection information of WiFi-ABC on the mobile phone T1 and trigger the mobile phone T1 to connect to WiFi-ABC. Refer to Figure 2 Figure (a) in Figure 2 After that, please refer to Figure 2 Figure (b) in

[0065] When they are close enough, the mobile phone T1 sends the WiFi connection information of WiFi-ABC to the tablet computer T2 through the near-field communication established with the tablet computer T2. After receiving the WiFi connection information, the tablet computer T2 displays a first prompt message for indicating to the user whether to synchronously connect to the WiFi network (i.e., WiFi-ABC) currently connected by the mobile phone T1. Exemplarily, the first prompt message is as shown in Figure 2 11 in Figure (c) in

[0066] The first prompt message 11 includes a prompt content, for example, the prompt content is "The PAD detects that the WiFi network connected by your mobile phone T1 is available. Do you allow the PAD device to synchronously connect?" In addition, the first prompt message 11 also includes a "Yes" control and a "No" control. The "Yes" control is used to trigger the tablet computer T2 to connect to the WiFi network, and the "No" control is used to trigger the tablet computer T2 not to connect to the WiFi network. Figure 3 Refer to Figure (a) in Figure 3In (b), after the tablet computer T2 successfully connects to the WiFi network, the prompt window 10 is no longer displayed in the tablet computer T2, and a WiFi icon is displayed in the upper left corner of the screen, indicating that the tablet computer T2 is successfully connected to the network. In this way, the WiFi connection information is synchronized from the mobile phone T1 to the tablet computer T2, so that the user can access the Internet with one click without repeatedly inputting the WiFi connection information on the tablet computer T2, thereby improving the speed at which the tablet computer T2 connects to the WiFi network.

[0067] It should be noted that the above Figure 2 The first prompt message 11 shown in FIG. (c) is only exemplary. In another example, the first prompt message 11 may also be displayed in other forms, such as a card, etc. In addition, the first prompt message 11 may also include other content, such as the WiFi account (i.e., WiFi-ABC) of the WiFi network to which the mobile phone T1 is connected.

[0068] See also Figure 4 In FIG. 5(a), when the tablet computer T2 displays the first prompt message 11, if the user does not perform any operation on the first prompt message 11 within a certain period of time (for example, 2 minutes), for example, the user may not have time to operate, then the tablet computer T2 may no longer display the first prompt message 11 in the current display interface, for example, Figure 4 In one example, the tablet computer T2 may display a first prompt message 11 in the notification center, see Figure 4 In Figure (c), when the user needs the tablet computer T2 to connect to WiFi-ABC, the user can slide down from the top of the tablet computer T2. Figure 4 In (d) of FIG. 1 , in response to the user's sliding operation, the tablet computer T2 displays a notification center, in which a first prompt message 11 is displayed. The user can click on the first prompt message 11 displayed in the notification center. In response to the user's clicking operation on the first prompt message 11 in the notification center, the tablet computer T2 connects to WiFi-ABC based on the WiFi connection information sent by the mobile phone T1. Figure 4 As shown in Figure (e), after connecting to WiFi-ABC, the tablet computer T2 no longer displays the prompt window 10, and a WiFi icon is displayed in the upper left corner of the screen, which means that the tablet computer T2 is connected to the Internet successfully.

[0069] In this way, after the tablet computer T2 displays the first prompt message 11, even if the user fails to click the first prompt message 11 in time to trigger the tablet computer T2 to connect to the WiFi network, since the tablet computer T2 will continue to display the first prompt message 11 in the notification center, the user can still trigger the tablet computer T2 to connect to the WiFi network with one click based on the first prompt message 11 from the notification center, thereby improving the user experience.

[0070] See Figure 5 In the (a) figure of Figure 5 , after the tablet computer T2 displays the first prompt message 11 in the notification center, if the user swipes left (or right) the first prompt message 11 in the notification center, it means that the user does not need to trigger the tablet computer T2 to connect to the WiFi network based on the first prompt message 11. In this case, see Figure 5 In the (b) figure of Figure 5 , in response to the user's left swipe (or right swipe), the tablet computer T2 can delete the first prompt message 11 from the notification center, that is, no longer display the first prompt message 11 in the notification center, so as to avoid the first prompt message 11 occupying space when there are too many messages in the notification center.

[0071] It should be noted that the above takes the tablet computer T2 deleting the first prompt message 11 from the notification center triggered by the user's left or right swipe after the tablet computer T2 displays the first prompt message 11 in the notification center as an example. In another example, when the first prompt message 11 is displayed in the notification center for a certain period of time, the tablet computer T2 can also automatically delete the first prompt message 11, that is, without the user manually deleting it, so as to avoid the first prompt message 11 occupying space when there are too many messages in the notification center.

[0072] See Figure 6 In the (a) figure of Figure 6 , when the tablet computer T2 displays the first prompt message 11, if the user does not need the tablet computer T2 to connect to WiFi-ABC at present, the user can click the "No" control in the first prompt message 11. In response to the user's click operation on the "No" control in the first prompt message 11, the tablet computer T2 can delete the WiFi connection information sent by the mobile phone T1 and does not connect to WiFi-ABC. In addition, as shown in the (b) figure of Figure 6 Figure 6 , the first prompt message 11 is no longer displayed, so as to avoid blocking the current display interface.

[0073] It should be noted that the above description is given by taking the "Yes" control and "No" control provided in the first prompt message 11 as an example. In another example, the "Yes" control and "No" control may not be provided in the first prompt message 11, and the first prompt message 11 is triggerable. When the user needs the tablet computer T2 to connect to WiFi-ABC, the user can click on the message body of the first prompt message 11. In response to the user's click operation on the message body of the first prompt message 11, the tablet computer T2 connects to WiFi-ABC based on the WiFi connection information sent by the mobile phone T1. When the user does not need the tablet computer T2 to connect to WiFi-ABC, the user can slide up the first prompt message 11. In response to the user's operation of sliding up the first prompt message 11, the tablet computer T2 no longer displays the first prompt message 11 and does not connect to WiFi-ABC either. Alternatively, in response to the user's operation of sliding up the first prompt message 11, the tablet computer T2 may not display the first prompt message 11 on the current display interface, but continue to display the first prompt message 11 in the notification center in case the user needs to surf the Internet with one key based on the first prompt message 11 later. The embodiments of the present application do not limit this.

[0074] Next, in combination with the attached Figure 7 The process of WiFi connection involved in the above application scenario will be introduced in detail. In the embodiments of the present application, after the mobile phone T1 connects to a WiFi network (such as WiFi-ABC) and before the tablet computer T2 connects to WiFi-ABC, the tablet computer T2 has not connected to any network, and the tablet computer T2 has never connected to WiFi-ABC. For example, in a possible scenario, the tablet computer T2 enters a new environment where WiFi-ABC is covered. Before this, the tablet computer T2 has never connected to WiFi-ABC, that is, there is no WiFi connection information of WiFi-ABC in the tablet computer T2. In this case, it can be defined that the tablet computer T2 has never connected to WiFi-ABC. In another possible scenario, the tablet computer T2 has connected to WiFi-ABC, but the WiFi password of WiFi-ABC has been modified, that is, the mobile phone T1 connects to WiFi-ABC based on the modified WiFi password, while only the historical WiFi connection information of WiFi-ABC (referring to the WiFi password before modification) exists in the tablet computer T2, and the current WiFi connection information (referring to the modified WiFi password) does not exist. Therefore, the tablet computer T2 cannot connect to WiFi-ABC currently. This situation can also be defined as the tablet computer T2 has never connected to WiFi-ABC. On this basis, the WiFi connection method may include the following parts or all of the content:

[0075] S701: In response to a Wi-Fi information input operation, the mobile phone T1 receives Wi-Fi connection information. The Wi-Fi information input operation is used to input the Wi-Fi connection information of the Wi-Fi network to which the mobile phone T1 is to be connected.

[0076] The Wi-Fi information input operation may include: a click operation to select a Wi-Fi account, an operation to input a Wi-Fi password, a click operation to confirm the connection, etc.

[0077] As described above, the mobile phone T1 has logged in to the device account. For example, the user inputs the device account when the mobile phone T1 is powered on for the first time; or during the use process after the mobile phone T1 is powered on, the user inputs the device account from the account login interface and triggers the mobile phone T1 to log in.

[0078] In one example, the mobile phone T1 scans Wi-Fi networks periodically, and the period duration can be set according to requirements. In another example, the user triggers the mobile phone T1 to scan the surrounding Wi-Fi networks. After the mobile phone T1 scans a Wi-Fi network, the Wi-Fi account of the scanned Wi-Fi network is displayed in the Wi-Fi list. The user can trigger the Wi-Fi account to be connected. In response to the user's trigger operation on the Wi-Fi account, the mobile phone T1 displays a Wi-Fi information input interface. In this way, the user can input the password in the Wi-Fi information input interface, that is, the Wi-Fi connection information that needs to be input by the user includes the password of the Wi-Fi network. Correspondingly, the mobile phone receives the Wi-Fi information input operation.

[0079] It should be noted that in the embodiment of this application, the example is that the mobile phone T1 scans a Wi-Fi network and displays the Wi-Fi account. In another example, the user can also input the Wi-Fi account and Wi-Fi password of the Wi-Fi network to be connected in the mobile phone T1. That is, at this time, the Wi-Fi connection information that needs to be input includes the Wi-Fi account and the Wi-Fi password. The embodiment of this application does not limit this.

[0080] S702: After the mobile phone T1 receives a connection operation, it connects to the Wi-Fi network based on the Wi-Fi connection information.

[0081] Exemplarily, a "Connect" control is provided in the Wi-Fi input interface. After the user correctly inputs the password in the Wi-Fi information input interface, the user can click the "Connect" control in the Wi-Fi information input interface. Correspondingly, the mobile phone T1 receives the connection operation. In response to the user's trigger operation on the "Connect" control in the Wi-Fi information input interface, the mobile phone T1 connects to the Wi-Fi network based on the Wi-Fi connection information input by the Wi-Fi information input operation. For example, the connected Wi-Fi account is Wi-Fi-ABC.

[0082] In this way, the mobile phone T1 is connected to the WiFi network. In this case, for the tablet computer T2, the user no longer needs to manually input the WiFi connection information on the tablet computer T2, but can synchronize the WiFi connection information through the mobile phone T1. The specific implementation can be seen below.

[0083] S703: When the distance between the mobile phone T1 and the tablet computer T2 is less than the first distance, near field communication is established between the mobile phone T1 and the tablet computer T2.

[0084] S704: The mobile phone T1 sends WiFi connection information to the tablet computer T2 via near field communication.

[0085] As mentioned above, the tablet computer T2 and the mobile phone T1 have logged into the same device account, and the tablet computer T2 and the mobile phone T1 have joined the same trust ring, or in other words, the tablet computer T2 and the mobile phone T1 have passed the trust ring authentication.

[0086] The first distance refers to the distance at which the mobile phone T1 and the tablet computer T2 can find each other and establish near field communication. Of course, when the distance between the mobile phone T1 and the tablet computer T2 is less than the second distance and greater than or equal to the first distance, the mobile phone T1 does not send WiFi connection information to the tablet computer T2. The first distance is less than the second distance, so when the distance between the mobile phone T1 and the tablet computer T2 is less than the second distance and greater than or equal to the first distance, they cannot find each other, or cannot establish near field communication. The first distance and the second distance can be set according to needs.

[0087] As an example but not a limitation, take the example of mobile phone T1 and tablet computer T2 establishing a connection via Bluetooth. Mobile phone T1 can scan messages through its own configured Bluetooth module, and tablet computer T2 can broadcast messages through its own configured Bluetooth module. When the distance between mobile phone T1 and tablet computer T2 is close enough, mobile phone T1 can scan the messages broadcast by tablet computer T2, thereby discovering tablet computer T2. After that, mobile phone T1 can establish a connection with tablet computer T2 via Bluetooth. The specific implementation of establishing a connection between mobile phone T1 and tablet computer T2 can be seen below. Figure 11 The embodiment shown.

[0088] When the mobile phone T1 and the tablet computer T2 establish a connection via Bluetooth, the first distance may be the longest distance at which the Bluetooth of the mobile phone T1 can scan the message of the tablet computer T2.

[0089] After the mobile phone T1 establishes a near-field communication with the tablet computer T2, it can send the WiFi connection information of the WiFi network it is connected to to the tablet computer T2 through the established near-field communication. Exemplarily, the mobile phone T1 packs and combines the WiFi connection information to obtain a first string, and then sends the obtained first string to the tablet computer T2, thereby synchronizing the WiFi connection information to the tablet computer T2.

[0090] As an example of the present application, before the mobile phone T1 sends the WiFi connection information to the tablet computer T2, it can query whether the WiFi connection information belongs to the whitelist. If the WiFi connection information belongs to the whitelist, the mobile phone T1 sends the WiFi connection information to the tablet computer T2. Otherwise, if the WiFi connection information does not belong to the whitelist, the mobile phone T1 does not send the WiFi connection information to the tablet computer T2.

[0091] Among them, the whitelist includes data that can be directly transmitted through the near-field communication established between devices, or in other words, the whitelist includes data that can be transmitted through the trust ring. As an example but not a limitation, the whitelist includes lightweight data. For example, the whitelist includes a first type of information, which is the WiFi connection information, indicating that the WiFi connection information can be transmitted through the near-field communication established between devices.

[0092] Optionally, the whitelist can also include a second type of information, which is the verification code information. That is, in addition to the WiFi connection information, the verification code information can also be transmitted through the near-field communication established between devices. The specific implementation can be referred to Figure 10 the embodiments shown.

[0093] In this way, for information such as WiFi connection information, which belongs to lightweight and highly timely data, by setting the whitelist, the mobile phone T1 can perform data synchronization through the near-field communication established between devices. After the data synchronization is completed, the tablet computer T2 can use it immediately. In this way, it is avoided that this type of data needs to be synchronized to the cloud server and then synchronized to the tablet computer T2 through the cloud server, which can improve the timeliness of data synchronization and thus greatly enhance the user experience. In addition, since the mobile phone T1 directly synchronizes the WiFi connection information through the near-field communication with the tablet computer T2, it is avoided that the tablet computer T2 needs to connect to the network to obtain the WiFi connection information, thereby improving the success rate of WiFi connection information synchronization and meeting the user's networking needs. The lightweight data refers to data smaller than a specified quantity threshold, and the specified quantity threshold can be set according to requirements. For example, the specified quantity threshold can be 1M, that is, data smaller than 1M can be synchronized using near-field communication.

[0094] As an example of this application, for data that does not belong to the whitelist, the mobile phone T1 can achieve data synchronization through cloud synchronization. For example, for heavyweight and / or less timely data, the mobile phone T1 can send this type of data to the cloud server and then synchronize it to the tablet computer T2 through the cloud server, which can ensure the integrity of the data and also avoid this type of data occupying the data transmission channel of the near-field communication between devices. Among them, heavyweight data refers to data that is greater than or equal to a specified quantity threshold, such as dozens or hundreds of megabytes, such as photos, videos, audio, etc.

[0095] S705: After the tablet computer T2 receives the WiFi connection information, query whether the local area includes this WiFi connection information.

[0096] Regarding whether the tablet computer T2 needs to use the WiFi connection information sent by the mobile phone T1 through near-field communication, there are the following two possible situations:

[0097] In a possible situation, the WiFi connection information has been stored in the tablet computer T2. For example, the user has previously connected to WiFi-ABC on the tablet computer T2; or, when the tablet computer T2 is connected to other WiFi networks and both the mobile phone T1 and the tablet computer T2 have the WiFi cloud sharing function enabled, the mobile phone T1 shares this WiFi connection information with the tablet computer T2 through the cloud server before establishing near-field communication with the tablet computer T2. In this possible situation, the tablet computer T2 does not need to use the WiFi connection information sent by the mobile phone T1.

[0098] In another possible situation, the WiFi connection information has not been stored in the tablet computer T2. Exemplarily, the tablet computer T2 has not connected to WiFi-ABC, and the mobile phone T1 has not shared the WiFi connection information with the tablet computer T2 through the cloud server. The situation where the mobile phone T1 has not shared the WiFi connection information with the tablet computer T2 through the cloud server includes: the tablet computer T2 is not currently connected to any network, so it is impossible to achieve WiFi synchronization through the cloud server; or, the tablet computer T2 is currently connected to other WiFi networks but cannot achieve WiFi synchronization through the cloud server because the mobile phone T1 and / or the tablet computer T2 do not have the WiFi cloud sharing function enabled; or, the mobile phone T1 can share the WiFi connection information with the tablet computer T2 through the cloud server, but because the synchronization data is not executed in real time (for example, the mobile phone T1 only performs data sharing when charging), when the mobile phone T1 and the tablet computer T2 establish near-field communication, the mobile phone T1 has not had time to synchronize the WiFi connection information to the tablet computer T2 through the cloud server. In this possible situation, the tablet computer T2 may need to use the WiFi connection information sent by the mobile phone T1.

[0099] Therefore, in order to determine whether to use the Wi-Fi connection information shared by mobile phone T1, tablet computer T2 can query whether the Wi-Fi connection information is stored locally.

[0100] In one example, tablet computer T2 can query whether the Wi-Fi connection information exists from a specified directory, where the specified directory is used to store the Wi-Fi connection information of the Wi-Fi networks that tablet computer T2 has connected to. The specified directory can be set according to requirements or can be set by tablet computer T2 by default.

[0101] It should be noted that since the amount of data transmitted is relatively small, after proximity discovery, mobile phone T1 can directly share the Wi-Fi connection information with tablet computer T2, and tablet computer T2 can determine whether to connect to the Wi-Fi network, without waiting for tablet computer T2 to synchronize its unconnected Wi-Fi network to mobile phone T1 before sending the Wi-Fi connection information. Since tablet computer T2 may need to go through multiple interactions to confirm whether to connect to the same Wi-Fi network when synchronizing the status to mobile phone T2, mobile phone T1 directly sharing the Wi-Fi connection information with tablet computer T2 can reduce information interaction.

[0102] In the case where the Wi-Fi connection information does not exist in tablet computer T2, the operation of S705 below is entered; in the case where the Wi-Fi connection information exists in tablet computer T2, tablet computer T2 can delete the Wi-Fi connection information and tablet computer T2 does not perform subsequent operations.

[0103] S706: When the Wi-Fi connection information does not exist locally, tablet computer T2 queries whether there is an application currently requesting the network.

[0104] In one possible case, there is an application in tablet computer T2 that is calling the network card module in tablet computer T2, that is, there is an application requesting the network. In this case, it indicates that the application has a need to access the Internet, and thus it can be determined that tablet computer T2 has a need to access the Internet. For example, referring to Figure 2 Figure (b) in it, the user opens the weather application in tablet computer T2. After the weather application starts, it will call the network card module of tablet computer T2 to request the network. Again, for example, when the user opens a certain video playback software in tablet computer T2, after the video playback software starts, it will call the network card module in tablet computer T2 to request the network. In this case, it can be determined that tablet computer T2 has a need to access the Internet. In another possible case, there is no application in tablet computer T2 that is calling the network card module in tablet computer T2, that is, there is no application requesting the network. In this case, it indicates that there is no application with a need to access the Internet, and thus it can be determined that tablet computer T2 currently has no need to access the Internet.

[0105] When the tablet computer T2 has an Internet access requirement, the tablet computer T2 can prompt the user that the mobile phone T1 has synchronized the WiFi connection information, so that the user can trigger the tablet computer T2 to connect to the WiFi network with one key. When the tablet computer T2 has no Internet access requirement, it can not prompt the user that the mobile phone T1 has synchronized the WiFi connection information to avoid disturbing the user. Therefore, as an example of the present application, when the tablet computer T2 queries that there is currently an application requesting the network, the following operation of S707 is entered. If the tablet computer T2 determines that there is currently no application requesting the network, the WiFi connection information sent by the mobile phone T1 can be deleted, that is, the tablet computer T2 does not perform the subsequent operations.

[0106] S707: When there is currently an application requesting the network, the tablet computer T2 displays a first prompt message, and the first prompt message is used to indicate whether to synchronize and connect to the WiFi network connected by the mobile phone T1.

[0107] As described above, if there is currently an application requesting the network, it means that the tablet computer T2 has an Internet access requirement. Therefore, in this case, the tablet computer T2 can display a first prompt message, and the first prompt message is used to prompt the user to confirm whether to connect to the WiFi network currently connected by the mobile phone T1. Exemplarily, referring to Figure 2 Figure (c) therein, the first prompt message is shown as 11 in the figure.

[0108] It should be noted that S705 to S707 are optional operations. In another example, after the tablet computer T2 receives the WiFi connection information, it can also directly display the first prompt message. Or in yet another example, the tablet computer T2 receives the WiFi connection information and queries whether there is WiFi connection information locally. If there is WiFi connection information locally, the first prompt message is not displayed. If there is no WiFi connection information locally, the first prompt message is displayed. That is, it is not necessary to query whether there is an application currently requesting the network. In this way, even if there is no application currently requesting the network, the tablet computer T2 still displays the first prompt message, enabling the user to trigger the connection of the tablet computer to the WiFi network with one key, so as to be able to access the Internet at any time during the subsequent use of the tablet computer T2. Or in another example, after the tablet computer T2 receives the WiFi connection information, if it is determined through query that there is no such WiFi connection information locally, it can detect whether it is currently connected to the WiFi network. If it is not connected to the WiFi network, the tablet computer T2 determines whether to display the first prompt message based on whether there is an application currently requesting the network; otherwise, if the tablet computer T2 is currently connected to the WiFi network and the currently connected WiFi network is not the same as the WiFi network shared by the mobile phone T1, for example, the WiFi connection information is different, the tablet computer T2 can delete the WiFi connection information shared by the mobile phone T1, or it can also not delete the WiFi connection information shared by the mobile phone T1. That is, the tablet computer T2 can store the WiFi connection information shared by the mobile phone T1 to facilitate subsequent WiFi network switching.

[0109] It should be noted that for different frequency bands of WiFi of the same router, they belong to different WiFi networks. If mobile phone T1 and tablet computer T2 are respectively connected to different frequency band WiFi networks, and there is no WiFi sharing through the cloud server between mobile phone T1 and tablet computer T2, that is, there is no WiFi connection information of the WiFi network connected to the peer device locally. After establishing near-field communication between mobile phone T1 and tablet computer T2, the WiFi connection information of the WiFi networks they are respectively connected to can be sent to the peer through near-field communication. After the peer receives the shared WiFi connection information through near-field communication, the first prompt message can not be displayed, and the received WiFi connection information can be stored locally so that the frequency band can be quickly switched subsequently. Exemplarily, if mobile phone T1 is connected to a 2.4 GHz frequency band WiFi network and tablet computer T2 is connected to a 5G frequency band WiFi network, after mobile phone T1 and tablet computer T2 are close to each other and establish near-field communication, tablet computer T2 can send the WiFi connection information of the 5G frequency band WiFi network it is connected to to mobile phone T1, and mobile phone T1 can store the WiFi connection information of the 5G frequency band WiFi network so that the user can subsequently trigger mobile phone T1 to switch from the 2.4G frequency band to the 5G frequency band with one click in the WiFi connection interface. And mobile phone T1 can send the WiFi connection information of the 2.4 GHz frequency band WiFi network it is connected to to tablet computer T2, and tablet computer T2 can store the WiFi connection information of the 2.4G frequency band WiFi network so that the user can subsequently trigger tablet computer T2 to switch from the 5G frequency band to the 2.4G frequency band with one click in the WiFi connection interface.

[0110] S708: Tablet computer T2 receives a connection operation.

[0111] As an example rather than a limitation, the connection operation can be a click operation. The first prompt message can support user clicks. Refer to Figure 3 Figure (a) in, when the user determines to connect to a WiFi network, the first prompt message can be clicked. Correspondingly, tablet computer T2 receives the connection operation. Or, the user can also click on the WiFi account in the system settings interface of the tablet computer. At this time, the tablet computer receives the connection operation.

[0112] S709: In response to the connection operation, tablet computer T2 connects to the WiFi network based on the WiFi connection information.

[0113] Upon receiving a connection operation, the tablet computer T2 determines that the user authorizes the tablet computer T2 to connect to the WiFi network connected by the mobile phone T1. At this time, the tablet computer T2 can connect to WiFi-ABC based on the WiFi connection information sent by the mobile phone T1, thus realizing that the user can trigger the tablet computer T2 to connect to the WiFi network with one key. After that, the tablet computer T2 can access the Internet through the WiFi network. After the tablet computer T2 connects to the WiFi network, it can add the WiFi account to the WiFi list of the tablet computer T2.

[0114] It should be noted that the embodiment of this application is described by taking receiving a connection operation based on the first prompt message as an example. In another example, a disconnection operation may also be received based on the first prompt operation. For example, see Figure 6 Figure (a) therein. When the user swipes up after selecting the first prompt message, the tablet computer T2 receives a disconnection operation. In this case, it indicates that the user currently does not need the tablet computer T2 to connect to the WiFi network currently connected by the mobile phone T1. In an optional implementation manner, the tablet computer T2 may no longer display the first prompt message and may delete the WiFi connection information sent by the mobile phone T1; in another optional implementation manner, the tablet computer T2 may also not delete the WiFi connection information sent by the mobile phone T1. The tablet computer T2 does not display the first prompt message on the current interface, but displays the first prompt message in the notification center so that the user can trigger the tablet computer T2 to connect to the WiFi network using the WiFi connection information based on the first prompt message displayed in the notification center when needed later.

[0115] It should be noted that the disconnection operation described in the embodiment of this application is only exemplary. In another example, the disconnection operation may also be a left swipe operation or a right swipe operation, etc. The embodiment of this application does not limit this.

[0116] In yet another example, after the tablet computer T2 displays the first prompt message, it can start timing. See Figure 4 Figure (b) therein. If no trigger operation on the first prompt message is received within the specified duration, the tablet computer T2 may no longer display the first prompt message to avoid blocking the screen by the first prompt message displayed on the screen of the tablet computer T2. The specified duration can be set according to actual needs. For example, the specified duration can be 2 minutes, etc. The embodiment of this application does not limit this.

[0117] In another example, see Figure 4 Figure (d) therein. If no trigger operation on the first prompt message is received within the specified duration, the tablet computer T2 may display the first prompt message in the notification center so that the user can trigger the tablet computer T2 to connect to WiFi-ABC with one key based on the first prompt message at any time.

[0118] When the tablet computer T2 is authorized by the user to connect to the WiFi network, the tablet computer T2 can store the WiFi connection information in a specified directory. So that after the tablet computer T2 disconnects the connection to WiFi-ABC, the next time it is within the coverage of the WiFi-ABC network and the tablet computer scans the WiFi-ABC network, it can automatically connect to WiFi-ABC based on the WiFi connection information stored in the specified directory, improving the networking efficiency.

[0119] It should be noted that the above is described by taking the mobile phone T1 synchronizing the WiFi connection information to the tablet computer T2 as an example. In another example, the tablet computer T2 can also synchronize the WiFi connection information to the mobile phone T1. For example, if the user enters the WiFi connection information on the tablet computer T2 and triggers the tablet computer T2 to connect to WiFi-ABC, then when the mobile phone T1 and the tablet computer T2 are close to each other, the tablet computer T2 can send the WiFi connection information of WiFi-ABC to the mobile phone T1. Correspondingly, after the mobile phone T1 receives the WiFi connection information sent by the tablet computer T2, it can display a first prompt message to prompt the user whether to synchronize the connection to WiFi-ABC.

[0120] It should be noted that the above is described by taking two electronic devices logging in to the same device account as an example. In another example, the user may have more electronic devices, and multiple electronic devices all log in to the same device account. In this case, the user only needs to enter the WiFi connection information on any one of the multiple electronic devices and trigger this electronic device to connect to the WiFi network. After that, when the user brings other electronic devices among the multiple electronic devices close to the electronic device that has already been connected to the WiFi network, the synchronization of the WiFi connection information can be achieved, avoiding the need for the user to repeatedly enter the WiFi connection information on each electronic device, thereby improving the user experience.

[0121] In the embodiment of the present application, when the first electronic device (such as the tablet computer T2) and the second electronic device (such as the mobile phone T1) log in to the same device account and pass the trusted authentication, after the first electronic device and the second electronic device are close to each other, the second electronic device synchronizes the WiFi connection information of the WiFi network it is connected to to the first electronic device, so that the first electronic device displays a first prompt message, and the first prompt message is used to indicate whether to synchronize the connection to this WiFi network. After that, the user can trigger the first electronic device to connect to the WiFi network based on this WiFi connection information with one key based on the first prompt message. In this way, there is no need for the user to manually enter the WiFi connection information in the first electronic device, improving the operation convenience, and thus improving the efficiency of the WiFi network connection.

[0122] Thus, when a trust ring is established between the first electronic device and the second electronic device, even if the first electronic device is not connected to the network and has never connected to the WiFi network currently connected by the second electronic device, the second electronic device can still share the WiFi connection information with the first electronic device, enabling the first electronic device to quickly connect to the WiFi network based on the shared WiFi connection information, improving the speed at which the first electronic device connects to the WiFi network and thus enhancing the user experience.

[0123] Moreover, since this method is not restricted by whether the WiFi cloud synchronization function is enabled, even if the WiFi cloud synchronization function is not enabled on the first electronic device and / or the second electronic device, the second electronic device can still share the WiFi with the first electronic device, thereby enhancing the user experience.

[0124] It should be noted that the embodiments of this application are described by taking the example of the mobile phone T1 sharing the WiFi connection information with the tablet computer T2 when the tablet computer T2 has never been connected to the WiFi network. In another example, when the mobile phone T2 is not connected to the network (such as not inserting a SIM card) and has never connected to this WiFi network, or when the mobile phone T2 and the tablet computer T1 cannot achieve WiFi sharing through the cloud server, if the tablet computer T2 is connected to the WiFi network and a trust ring is established between the mobile phone T1 and the tablet computer T2, the tablet computer T2 can also share the WiFi connection information with the mobile phone T1, and the implementation process can be referred to above.

[0125] In addition, as mentioned above, in addition to synchronizing the WiFi connection information through near-field communication between multiple electronic devices, in another application scenario, multiple electronic devices can also synchronize verification code information through near-field communication. Next, the synchronization process of the verification code information will be described by taking the example of the mobile phone T1 synchronizing the verification code information with the tablet computer T2. Among them, the mobile phone T1 and the tablet computer T2 are logged in with the same device account.

[0126] In a possible application scenario, the user opens the application login interface of the application App1 on the tablet computer T2. For example, the application login interface is as shown in Figure 8 U1 in Figure (a) below. The application login interface U1 includes an account input field, a password input field, and an option of "Login with User SMS Verification Code". The account input field can be used to enter the user account, and the user account can be a phone number. The password input field is used to enter the password corresponding to the user account. The option of "Login with User SMS Verification Code" can be used for the user to select to log in to APP1 through the verification code. When the user selects to log in through the verification code, the user triggers the option of "Login with SMS Verification Code". In response to the user's trigger operation on the option of "Login with SMS Verification Code", refer to Figure 8In figure (b), the tablet computer T2 displays a verification interface U2, and the verification interface U2 includes an account input field, a verification code input field, and a "Get Verification Code" option. Refer to Figure 8 In figure (c), the user can enter a phone number in the account input field. This phone number is the number of the SIM card in the mobile phone T1, for example, "181****1694", and click the "Get Verification Code" option. In response to the user's click operation on the "Get Verification Code" option, refer to Figure 8 In figure (d), the tablet computer T2 sends a verification code acquisition request to the verification code system. In response to this verification code acquisition request, the verification code system sends verification code information to this phone number. Thus, refer to Figure 8 In figure (e), the mobile phone T1 receives a text message 70. The text message 70 includes the verification code information sent by the verification code system. For example, the verification code information is "6143". The text message 70 may also include application information, which is used to indicate the application program APP1. The application information may be an application name, etc. For example, the application information is "APP1".

[0127] When the mobile phone T1 and the tablet computer T2 are close, refer to Figure 9 In figure (a), the mobile phone T1 sends this verification code information to the tablet computer T2 through the near-field communication established between the mobile phone T1 and the tablet computer T2. By way of example and not limitation, the mobile phone T1 may also send the application information to the tablet computer T2. After receiving the verification code information, the tablet computer T2 can display a second prompt message, and the second prompt message includes the verification code information. Refer to Figure 9 In figure (b), the second prompt message is shown as 80 in the figure. As an example of the present application, the second prompt message may include a quick input control. For example, the quick input control is a "One-key Input" control 81. Refer to Figure 9 In figure (c), the user can click the "One-key Input" control 81. Refer to Figure 9 In figure (d), in response to the user's click operation on the "One-key Input" control 81, the tablet computer T2 automatically enters the verification code information in the verification code input field of the verification interface U2. Thus, the user can directly click the "Login" control provided by the verification interface U2 to trigger the tablet computer T2 to log in to the application program APP1 based on the verification code information. Thus, when the mobile phone T1 and the tablet computer T2 are close, the mobile phone T1 sends the verification code information to the tablet computer T2 through near-field communication, and the tablet computer T2 displays the verification code information, avoiding the need for the user to view the verification code information from the mobile phone T1. In addition, since the second prompt message provides a quick input control, it enables the user to trigger the tablet computer T2 to input the verification code information into the verification code input field of the verification interface U2 with one key by triggering the input control, reducing the user's operation and improving the convenience of the operation, thereby improving the efficiency of inputting the verification code information.

[0128] It should be noted that Figure 9 The second prompt message shown in Figure (b) in is only exemplary. In another example, the second prompt message may further include other content and / or controls. For example, it may further include an "Ignore" control. When the user does not need the tablet computer T2 to display the second prompt message anymore, the user can click the "Ignore" control to trigger the tablet computer T2 to stop displaying the second prompt message. In another example, the second prompt message may not include the "One-key Input" control, but include a "Copy" control. The user can click the "Copy" control. In response to the user's triggering operation on the "Copy" control, the tablet computer T2 copies the verification code information sent by the mobile phone T1. The tablet computer T2 stops displaying the second prompt message, the cursor selects the verification code input field in the verification interface U2, and a paste control is displayed. When the user triggers the paste control, in response to the user's triggering operation on the paste control, the tablet computer T2 pastes the verification code information into the verification code input field. In another example, the second prompt message may also not include the "One-key Input" control. After the tablet computer T2 receives the verification code information, it displays the second prompt message, and directly displays the verification code information in the input field of the virtual keyboard. In this way, after the user clicks the input control in the virtual keyboard, the tablet computer T2 can be triggered to input the verification code information into the verification code input field. After that, after the user triggers the "Login" control in the verification interface U2, the tablet computer T2 can complete the login of the application APP1.

[0129] In addition, when the tablet computer T2 displays the second prompt message, if the user selects the second prompt message and swipes it upward, the tablet computer T2 may no longer display the second prompt message on the current display interface. In one example, the second prompt message can continue to be displayed in the notification center. For the specific display, reference can be made to the display method of the first prompt message.

[0130] Next, in combination with the attached Figure 10 The synchronization process of the verification code information involved in the above application scenario will be introduced in detail.

[0131] S1001: The tablet computer T2 receives a verification code acquisition operation on the verification interface of the first application.

[0132] The first application can be any application in the tablet computer T2 that needs to be verified for login, and the first application supports login by means of a verification code.

[0133] Exemplarily, the first application is Figure 8 the application APP1 in the embodiment shown, and the verification interface is Figure 8The verification interface U2 shown in Figure (b) therein. When the user clicks the "Get verification code" option in the verification interface U2, the tablet computer T2 receives a verification code acquisition operation.

[0134] S1002: In response to the verification code acquisition operation, the tablet computer T2 sends a verification code acquisition request to the verification code system. The verification code acquisition request carries the connection information of the mobile phone T1, and the verification code acquisition request is used to request the verification code system to send the verification code information to the mobile phone T1 based on the connection information.

[0135] The connection information is used for the verification code system to send the verification code information to the mobile phone T1. As an example of the present application, the connection information is the phone number of the SIM card being used by the mobile phone T1.

[0136] That is, after the tablet computer T2 receives the verification code acquisition operation, it sends a verification code acquisition request to the verification code system to request the verification code system to allocate the verification code information and send the verification code information to the mobile phone T1.

[0137] In an example, the application information of the first application is carried in the verification code acquisition request, so that the verification code system can know which application triggered the current verification code acquisition request according to the application information.

[0138] S1003: The verification code system sends a verification code message to the mobile phone T1 based on the connection information. The verification code message includes the verification code information and the application information.

[0139] In an example, after receiving the verification code acquisition request, the verification code system allocates the verification code information, and then sends a verification code message to the mobile phone T1 based on the phone number. The verification code message includes the verification code information. Optionally, the verification code message may further include the application information of the first application, so that the mobile phone T1 can determine which application triggered it according to the application information. Correspondingly, the mobile phone T1 can store the verification code information and the application information.

[0140] S1004: When the distance between the mobile phone T1 and the tablet computer T2 is less than the first distance, the mobile phone T1 sends a verification code message to the tablet computer T2 through near-field communication.

[0141] Since the mobile phone T1 and the tablet computer T2 log in to the same device account, when the distance between the mobile phone T1 and the tablet computer T2 is less than the first distance, near-field communication can be established between the mobile phone T1 and the tablet computer T2. For example, a connection can be established through Bluetooth. For the specific implementation of establishing the connection, reference can be made to Figure 11 the embodiments shown.

[0142] When the mobile phone T1 is close to the tablet computer T2, the mobile phone T1 can send a verification code message to the tablet computer T2 through the established near-field communication. For example, the verification code message may include verification code information and may also include application information.

[0143] It should be noted that the embodiment of this application is described by taking the mobile phone T1 forwarding the verification code message to the tablet computer T2 as an example. In another example, the mobile phone T1 can also recombine the verification code information and application information in the verification code message to obtain a second string, and then send the second string to the tablet computer T2, so as to synchronize the verification code information to the tablet computer T2.

[0144] As an example of this application, before the mobile phone T1 synchronizes the verification code information to the tablet computer T2, it can query whether the verification code information belongs to the white list. If the verification code information belongs to the white list, the mobile phone T1 sends the verification code information to the tablet computer T2. Otherwise, if the verification code information does not belong to the white list, the mobile phone T1 does not send the verification code information to the tablet computer T2.

[0145] As mentioned above, the white list may include lightweight data. For example, the white list includes the first type of information and the second type of information. The first type of information includes WiFi connection information, and the second type of information includes verification code information, indicating that the WiFi connection information and the verification code information can be transmitted through the near-field communication established between devices.

[0146] In this way, for information such as WiFi connection information and verification code information, which are lightweight and have strong timeliness, by setting the white list, the mobile phone T1 can perform data synchronization through the near-field communication established between devices. After the data synchronization is completed, the tablet computer T2 can be used immediately. In this way, it is avoided that this type of data needs to be synchronized to the cloud server and then synchronized to the tablet computer T2 by the cloud server, which can improve the timeliness of data synchronization and thus greatly enhance the user experience. In addition, since the mobile phone T1 directly performs information synchronization through the near-field communication with the tablet computer T2, it is avoided that the tablet computer T2 needs to be connected to the network to synchronize the verification code information, thereby improving the success rate of verification code information synchronization and further meeting the user's login requirements.

[0147] S1005: After the tablet computer T2 receives the verification code message, it determines whether the first application program is in the foreground running state according to the application information.

[0148] As an example of the present application, in addition to carrying verification code information, the verification code message also carries application information. Since mobile phone T1 may have established near-field communication with each of multiple electronic devices, that is, the multiple electronic devices form a trust ring, and the verification code message may be triggered by any one of the multiple electronic devices to send the verification code system. Therefore, for any one of the multiple electronic devices (such as tablet computer T2), after receiving the verification code message, it can detect whether there is an application program indicated by the application information in tablet computer T2, that is, query whether the application information matches the first application program. If there is an application program indicated by the application information in tablet computer T2, that is, the application information matches the first application program, then tablet computer T2 detects whether the first application program is in the foreground running state. When the first application program is in the foreground running state, it means that tablet computer T2 has a need to use the verification code information. In this case, the following operation of S1006 is entered. Otherwise, if the first application program indicated by the application information does not exist in tablet computer T2, or the first application program indicated by the application information exists in tablet computer T2, but the first application program in tablet computer T2 is not in the foreground running state, it can be determined that tablet computer T2 does not need to use the verification code information. In this case, tablet computer T2 can delete the verification code message.

[0149] S1006: When the first application program is in the foreground running state, tablet computer T2 displays a second prompt message, and the second prompt message includes the verification code information.

[0150] When the first application program is in the foreground running state, it can be determined that tablet computer T2 has a need to use the verification code information. In this case, tablet computer T2 can display a second prompt message. Exemplarily, the second prompt message is as shown in Figure 9 80 in figure (b) of

[0151] It is worth mentioning that after receiving the verification code message, tablet computer T2 queries whether there is a matching application program and it is in the foreground running state according to the application information in the verification code message, so as to determine whether tablet computer T2 really needs to use the verification code information, and will display the second prompt message only when it is determined that the verification code information needs to be used, and will not display the second prompt message when the verification code information does not need to be used. In this way, the second prompt message can be accurately pushed to the user, avoiding interference caused by incorrect pushing to the user, thus meeting the actual needs of the user and improving the user experience.

[0152] It should be noted that S1005 to S1006 are optional operations. In another example, after the tablet computer T2 receives the verification code message, it can query whether there is a first application program corresponding to the application information in the verification code message. If there is a first application program corresponding to the application information in the tablet computer T2 and the first application program is in a running state (it may be running in the foreground or in the background), the tablet computer T2 displays a second prompt message, that is, there is no need to query whether the first application program is running in the foreground. In this way, even if the first application program is temporarily running in the background, the tablet computer T2 can normally display the second prompt message to display the verification code information to the user, so that the user can use the verification code information in the tablet computer T2 when needed.

[0153] S1007: The tablet computer T2 receives a quick input operation based on the second prompt message.

[0154] As an example of the present application, the second prompt message includes a quick input control, for example, as shown in 81 in figure (c) in Figure 9 When the user needs to input the verification code information into the verification code input field in the verification interface, the quick input control can be triggered. Correspondingly, the tablet computer T2 receives a quick input operation based on the second prompt message.

[0155] S1008: In response to the quick input operation, the tablet computer T2 inputs the verification code information into the verification code input field of the verification interface U2 and no longer displays the second prompt message.

[0156] As an example of the present application, after the tablet computer T2 receives the trigger operation of the user on the quick input control, in response to the trigger operation of the user on the quick input control, the tablet computer T2 inputs the verification code information in the second prompt message into the verification code input field of the verification interface U2. In this way, after the second prompt message is displayed, the user can trigger the tablet computer T2 to input the verification code information in the verification interface with one key, which improves the convenience of the operation and thus improves the efficiency of inputting the verification code information.

[0157] Furthermore, the verification interface U2 includes a "login" control. After the tablet computer T2 inputs the verification code information into the verification code input field, the user can click the "login" control to trigger the tablet computer T2 to log in to the first application program.

[0158] It should be noted that the above steps S1007 to S1008 are optional operations. In another example, the second prompt message can include a copy control, and the user can input the verification code information into the verification code input field of the verification interface U2 based on the copy control. The specific operation process can refer to the previous text.

[0159] In an embodiment of the present application, when a first electronic device (such as a tablet computer T2) and a second electronic device (such as a mobile phone T1) log in to the same device account and pass a trusted authentication, if the first electronic device receives a verification code acquisition request on the verification interface of a first application, the first electronic device requests to obtain verification code information through the second electronic device. After the second electronic device receives the verification code information, when the first electronic device and the second electronic device are close to each other, the second electronic device synchronizes the received verification code information to the first electronic device through near-field communication. The first electronic device displays a second prompt message, and the verification code information is included in the second prompt message, so that the first electronic device can quickly obtain the verification code information. In this way, the user can input the verification code information into the verification interface with one key based on the second prompt message, avoiding the need for the user to view the verification code information from the second electronic device and also avoiding the need for the user to manually input the verification code information one by one in the verification interface of the first electronic device, thereby improving the efficiency of verification and login.

[0160] It should be noted that in the above Figure 10 shown embodiment, the tablet computer T2 may have been connected to a WiFi network before receiving the verification code information synchronized by the mobile phone T1. For example, it is connected to the WiFi network by the Figure 7 way provided in the shown embodiment, or it may not be connected to the WiFi network. When the tablet computer T2 is connected to the WiFi network, the mobile phone T1 may also send the verification code information to the tablet computer T2 through the WiFi network. The embodiments of the present application do not limit this.

[0161] It should be noted that the embodiments of the present application are described by taking multiple electronic devices logging in to the same system account as an example. In another example, if multiple electronic devices are all logged in to the same account system, even if they do not log in to the same device account, in the case where near-field communication can be established between the multiple electronic devices, the multiple electronic devices can also synchronize WiFi connection information and verification code information. The embodiments of the present application do not limit this.

[0162] In the above embodiment, the mobile phone T1 synchronizes the WiFi connection information through the near-field communication established with the tablet computer T2. Next, in combination with the attached Figure 11 , the process of establishing near-field communication between the mobile phone T1 and the tablet computer T2 will be introduced.

[0163] S1101: The tablet computer T2 sends a broadcast message through a communication module. The broadcast message includes a ciphertext, which is obtained by encrypting the device account with the public key corresponding to the device account logged in by the tablet computer T2.

[0164] In one example, when the tablet computer T2 is connected to the network, the public key corresponding to the device account can be obtained from the account system in advance. Exemplarily, the device account is a Honor account, and the tablet computer T2 can obtain the public key corresponding to the device account from Honor's account system in advance. In this way, the tablet computer T2 can use the public key to encrypt the device account to obtain a ciphertext, and then generate a broadcast message including the ciphertext, and send the broadcast message through the communication module. Exemplarily, the communication module can be a Bluetooth module or the like.

[0165] S1102: The mobile phone T1 scans the broadcast message through the communication module.

[0166] In one example, the mobile phone T1 can scan the broadcast message periodically through the communication module.

[0167] S1103: After the mobile phone T1 scans the broadcast message sent by the tablet computer T2, it reads the private key corresponding to the account device logged in on itself from its own trusted storage area.

[0168] The private key in the trusted storage area of the mobile phone T1 can be obtained from the account system in advance. For example, when the device account logged in on the mobile phone T1 is a Honor account, the mobile phone T1 obtains the private key corresponding to the device account logged in on itself from Honor's account system, and then stores it in the trusted storage area.

[0169] When the mobile phone T1 is close to the tablet computer T2, the mobile phone T1 can scan the broadcast message sent by the tablet computer T2. In this case, the mobile phone T1 obtains the private key from the trusted storage area to decrypt the ciphertext in the broadcast message using the private key.

[0170] S1104: The mobile phone T1 decrypts the ciphertext in the scanned broadcast message based on the obtained private key.

[0171] S1105: In the case of successful decryption, the mobile phone T1 sends a decryption success feedback message to the tablet computer T2 through the communication module.

[0172] If the decryption fails, the mobile phone T1 can send a decryption failure feedback message to the tablet computer T2 through the communication module.

[0173] S1106: After the tablet computer T2 receives the decryption success feedback message, it establishes a data transmission channel with the mobile phone T1.

[0174] When the tablet computer T2 receives the feedback message indicating successful decryption, it can determine that the mobile phone T1 and itself are logged in to the same device account and the same account system. In this case, the tablet computer T2 can establish a data transmission channel between the devices with the mobile phone T1. In one example, the tablet computer T2 can establish a data transmission channel with the mobile phone T1 via Bluetooth. In this way, the tablet computer T2 and the mobile phone T1 can perform near-field communication. After that, even if the tablet computer T2 is not connected to the network, since a trusted connection has been established with the mobile phone T1, the tablet computer T2 can also directly communicate with the mobile phone T1. In one example, a trust ring established between the tablet computer T2 (or the mobile phone T1) and the mobile phone T1 (or the tablet computer T2) within the discoverable range can be shown in the collaboration interface of the control center of the tablet computer T2 (or the mobile phone T1).

[0175] If the feedback message indicating failed decryption is received, the tablet computer T2 does not establish a data transmission channel with the mobile phone T1.

[0176] In this way, when the tablet computer T2 and the mobile phone T1 determine that they are logged in to the same device account and have passed the trusted authentication, a reliable data transmission channel is established to facilitate information synchronization between the devices through this data transmission channel. This method can ensure the security of data access between devices and prevent data from being illegally accessed.

[0177] Of course, it should be noted that the above is described by taking the tablet computer T2 sending a broadcast message through the communication module as an example. In another example, the tablet computer T2 can also scan for broadcast messages through the communication module, and the mobile phone T1 can also send broadcast messages through the communication module. In this way, the tablet computer T2 may also scan the mobile phone T1 first and thus actively establish a connection with the mobile phone T1. The embodiments of the present application do not make any limitations in this regard.

[0178] The electronic device involved in the embodiments of the present application may be a mobile phone, an action camera (GoPro), a digital camera, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, a vehicle-mounted device, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) / virtual reality (VR) device, etc. The embodiments of the present application do not make any limitations in this regard.

[0179] Figure 12 It is a schematic structural diagram of an electronic device provided by the embodiments of the present application. Refer to Figure 12, 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 jack 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.

[0180] It can be understood that the structure illustrated in the embodiments of this application does not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than those illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0181] 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.

[0182] 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 instructions and executing instructions.

[0183] A memory can 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 can hold 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 be directly retrieved from this memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0184] In some embodiments, the processor 110 may include one or more interfaces, such as an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0185] The charging management module 140 is configured to receive a charging input from a charger. The charger can be a wireless charger or a wired charger. While charging the battery 142, the charging management module 140 can also supply power to the electronic device 100 through the power management module 141.

[0186] 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 and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160, etc.

[0187] The wireless communication function of the electronic device 100 can be implemented through 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.

[0188] The electronic device 100 implements the display function through the GPU, the display screen 194, the application processor, etc. The GPU is a microprocessor for image processing, which is connected to the display screen 194 and the application processor. The GPU is used to execute mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.

[0189] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel may adopt a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is an integer greater than 1.

[0190] The electronic device 100 can implement the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, the application processor, etc.

[0191] 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 implement the data storage function. For example, files such as music and videos are saved in the external memory card.

[0192] The internal memory 121 can be used to store computer-executable program code, and the computer-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. The internal memory 121 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.). The data storage area can store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.). In addition, the internal memory 121 can include high-speed random access memory and can also include non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0193] The electronic device 100 can implement audio functions, such as music playback, recording, etc., through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0194] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor 180K can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, at a different position from the display screen 194.

[0195] The keys 190 include a power-on key, volume keys, etc. The keys 190 can be mechanical keys or 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.

[0196] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from a website, computer, server, or data center to another website, computer, server, or data center in a wired manner (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that includes one or more integrated available media. The available media may be magnetic media (such as floppy disks, hard disks, magnetic tapes), optical media (such as Digital Versatile Discs (DVDs)), or semiconductor media (such as Solid State Disks (SSDs)), etc.

[0197] The foregoing are optional embodiments provided by the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the technical scope disclosed in the present application shall be included within the protection scope of the present application.

Claims

1. A WiFi network connection method, characterized in that Applied to a first electronic device, the first electronic device and a second electronic device log in to the same device account, and the second electronic device is connected to a WiFi network; the method includes: When the distance between the first electronic device and the second electronic device is less than a first distance, establish a near-field communication with the second electronic device; Receive the WiFi connection information of the WiFi network sent by the second electronic device through the near-field communication, and display a first prompt message, where the first prompt message is used to indicate whether to synchronously connect to the WiFi network. Among them, when the distance between the first electronic device and the second electronic device is less than a second distance and greater than or equal to the first distance, the first prompt message is not displayed, and the first distance is less than the second distance; Receive a connection operation; In response to the connection operation, connect to the WiFi network based on the WiFi connection information of the WiFi network.

2. The method according to claim 1, wherein Before the first electronic device connects to the WiFi network after the second electronic device connects to the WiFi network, the first electronic device has not been connected to any network, and the first electronic device has not been connected to the WiFi network.

3. The method according to claim 1, wherein The first electronic device is connected to other networks, the first electronic device has not been connected to the WiFi network, and the WiFi cloud synchronization function is not enabled on the first electronic device and / or the second electronic device. The WiFi cloud synchronization function refers to realizing WiFi sharing through a cloud server.

4. The method according to claim 2 or 3, characterized in that, The first electronic device has not been connected to the WiFi network includes: There is historical WiFi connection information of the WiFi network in the first electronic device, and there is no such WiFi connection information. The historical WiFi connection information is the WiFi connection information set before the WiFi connection information; or, There is no WiFi connection information of the WiFi network in the first electronic device.

5. The method according to any one of claims 1-4, characterized in that The displaying of the first prompt message includes: Query whether there is such WiFi connection information in the first electronic device; When there is no such WiFi connection information in the first electronic device, display the first prompt message.

6. The method according to claim 5, characterized in that, The displaying of the first prompt message when there is no such WiFi connection information in the first electronic device includes: When there is no such WiFi connection information in the first electronic device, determine whether there is an application in the first electronic device that is requesting a network; If there is an application that is requesting a network, display the first prompt message.

7. The method according to any one of claims 1-6, characterized in that After the first prompt message is displayed, it further includes: In response to a sliding operation on the first prompt message, the first prompt message is no longer displayed, where the sliding operation includes an upward sliding operation, a left sliding operation, or a right sliding operation; or, If no trigger operation on the first prompt message is received within a specified duration, the first prompt message is no longer displayed.

8. The method according to claim 7, wherein After the first prompt message is no longer displayed, it further includes: Display the first prompt message in the notification center of the electronic device and store the WiFi connection information; In response to a trigger operation on the first prompt message in the notification center, connect to the WiFi network based on the WiFi connection information.

9. The method according to any one of claims 1-6, characterized in that, After connecting to the WiFi network based on the WiFi connection information of the WiFi network in response to the connection operation, it further includes: Receive a verification code acquisition operation on the verification interface of the first application; In response to the verification code acquisition operation, send a verification code acquisition request to the verification code system, where the verification code acquisition request carries the connection information of the second electronic device, and the verification code acquisition request is used to request the verification code system to send the verification code information to the second electronic device based on the connection information; Receive the verification code information sent by the second electronic device through the near-field communication; Display a second prompt message, where the second prompt message includes the verification code information.

10. The method according to claim 9, characterized in that, The second prompt message includes a quick input control; After displaying the second prompt message, it further includes: In response to a trigger operation on the quick input control in the second prompt message, copy the verification code information to the verification interface and no longer display the second prompt message.

11. The method according to claim 9 or 10, characterized in that, The receiving the verification code information sent by the second electronic device through the near-field communication includes: Receive the verification code information and application information sent by the second electronic device through the near-field communication; The displaying the second prompt message includes: Display the second prompt message when the application indicated by the application information is the first application and the first application is running in the foreground.

12. A WiFi network connection method, characterized in that, Applied to a second electronic device, the second electronic device and the first electronic device log in to the same device account, and the second electronic device is already connected to the WiFi network; the method includes: Establish near-field communication with the first electronic device when the distance between the second electronic device and the first electronic device is less than a first distance; Send the WiFi connection information of the WiFi network to the first electronic device through the near-field communication, so that the first electronic device displays a first prompt message, and the first prompt message is used to indicate whether to synchronously connect to the WiFi network; Wherein, when the distance between the second electronic device and the first electronic device is less than a second distance and greater than or equal to the first distance, the first electronic device does not display the WiFi connection information, and the first distance is less than the second distance.

13. The method according to claim 12, wherein The sending the WiFi connection information of the WiFi network to the first electronic device through the near-field communication includes: Determine that the WiFi connection information belongs to the white list; Send the WiFi connection information to the first electronic device through the near-field communication.

14. The method according to claim 12 or 13, characterized in that, The method further includes: Receive a verification code message, where the verification code message includes verification code information. The verification code message is sent by a verification code system based on connection information of the second electronic device after receiving a verification code acquisition request sent by the first electronic device. The verification code acquisition request carries the connection information, and the verification code acquisition request is triggered after the first electronic device receives a verification code acquisition operation on a verification interface of a first application program. Send the verification code information to the first electronic device through the near-field communication.

15. A WiFi network connection system, characterized in that, The WiFi network connection system includes a first electronic device and a second electronic device. The first electronic device and the second electronic device log in to the same device account, and the second electronic device is already connected to a WiFi network. The second electronic device is configured to establish near-field communication with the first electronic device when the distance between the first electronic device and the second electronic device is less than a first distance. The second electronic device is configured to send the WiFi connection information of the WiFi network to the first electronic device through the near-field communication. The first electronic device is configured to receive the WiFi connection information of the WiFi network sent by the second electronic device through the near-field communication and display a first prompt message for indicating whether to synchronously connect to the WiFi network. Among them, the first prompt message is not displayed when the distance between the first electronic device and the second electronic device is less than a second distance and greater than or equal to the first distance, and the first distance is less than the second distance. The first electronic device is configured to be based on receiving a connection operation. The first electronic device is configured to, in response to the connection operation, connect to the WiFi network based on the WiFi connection information.

16. An electronic device, characterized in that, The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the method according to any one of claims 1-11, or implements the method according to any one of claims 12-14.

17. A computer-readable storage medium, characterized in that, Instructions are stored in the computer-readable storage medium. When it runs on a computer, it causes the computer to execute the method according to any one of claims 1-11, or implement the method according to any one of claims 12-14.

Citation Information

Patent Citations

  • Method and equipment for setting seamless network sharing

    CN110062364A

  • Wireless data transmission method, electronic equipment, system and storage medium

    CN113691979A

  • Method, electronic equipment and system for acquiring verification code

    CN114006712A

  • Access method and system and electronic equipment

    CN114615660A

  • Method of operating function and resource of electronic device

    WO2015126198A1

Cited By

  • Wireless network access and service execution method and device based on near field communication

    CN121968364A