Account login method and related equipment
Through near-field communication technology, password-free login between devices is achieved, which solves the problem that users need to remember multiple accounts and passwords, improves the convenience and security of login, and simplifies user operation steps.
Patent Information
- Application Number
- CN202510080804.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2044-06-20
AI Technical Summary
In the prior art, users need to remember multiple accounts and passwords, which makes it difficult to remember and affect the user experience of electronic devices.
Through near-field communication technology, password-free login between devices is realized. Users only need to bring two devices close together, automatically pull up the scanning interface and graphics, establish a connection, and log in by scanning the code, avoiding the input of traditional passwords.
It simplifies user operation steps, improves the convenience and security of login, avoids the risk of password leakage, and prevents the persistence of data leakage through a timeliness token mechanism.
Smart Images

Figure CN120151832A_ABST
Abstract
Description
[0001] This application is a divisional application. The application number of the original application is 202410799669.5, and the filing date of the original application is June 20, 2024. The entire content of the original application is incorporated herein by reference. Technical Field
[0002] This application relates to the technical field of terminals, and in particular, to an account login method and related devices. Background Art
[0003] To protect privacy, the operating system, applications, files, etc. of an electronic device can all set up accounts and set corresponding login passwords for the accounts. After a user logs in to an account with a password, the user can view the relevant information in the account. However, in this way, the user needs to remember the account and password, which places relatively high requirements on the user. Moreover, when there are many accounts, the memory difficulty is great, affecting the use experience of the electronic device. Summary of the Invention
[0004] Embodiments of this application provide an account login method and related devices, which are used to achieve passwordless login and can simplify the user operation steps required for the passwordless login process, improving convenience.
[0005] In a first aspect, an account login method is provided. This method can be applied to a communication system. The communication system includes a first device and a second device. The operating system of the first device is currently logged in to a first account. For example, the second device displays a first interface, and the first interface is an interface for logging in to an account. The first device responds to detecting the proximity of the second device and displays a scanning code interface. The second device responds to detecting the proximity of the first device and displays a first graphic, and the first graphic is used to establish near-field communication. The first device scans the first graphic through the scanning code interface to establish a near-field communication connection with the second device. The first device sends first data to the second device through the near-field communication connection, and the first data includes a first login credential of the first device. The second device logs in to the first account based on the first login credential.
[0006] In the embodiment of the present application, when the second device displays the first interface and the second device approaches the first device, the two devices can automatically pull up the corresponding interfaces. For example, the first device pulls up the scanning code interface, and the second device pulls up the first graphic. In this process, it is not necessary for the user to perform cumbersome operations on the first device and the second device respectively to open the scanning code interface and the first graphic, which simplifies the user operation steps and improves the convenience. Moreover, when the second device displays the first interface, the two devices approaching can automatically pull up the corresponding interfaces, which can avoid accidental triggering to a certain extent. For example, when the second device displays other interfaces other than the first interface, the two devices approaching will not pull up the interface. In addition, after the first device and the second device establish a near-field communication connection, the first device can send the first login credential of the first device to the second device through the near-field communication connection, so that the second device can use the first login credential to log in to the first account. In this process, the first device does not transmit the account information and password information of the first account to the second device, which will not cause password leakage. Moreover, the first login credential has timeliness. In this way, after the first login credential is stolen, as long as it exceeds the validity period, it cannot be used, which can avoid the persistence of data leakage to a certain extent.
[0007] In a possible design, the first interface includes any one of the following items: the first interface is an interface for logging in to an account in the settings application of the second device, the first interface is an interface in the OOBE process of the second device, or the first interface is an interface for migrating data from other devices.
[0008] In the embodiment of the present application, when the second device displays the first interface, the two devices approaching can automatically pull up the corresponding interfaces, which can avoid accidental triggering to a certain extent. Moreover, the first interface may be an interface in multiple scenarios. For example, the first interface is an interface for logging in to an account in the settings application of the second device, or an interface in the OOBE process of the second device, or an interface for migrating data from other devices. Therefore, in the account login scenario, OOBE scenario, or data migration scenario, the two devices approaching can automatically pull up the corresponding interfaces. In addition, after the two devices pull up the interfaces, a near-field communication connection is established by scanning the code, and then the requirements of account login, OOBE, and data migration are realized based on the near-field communication connection, realizing convenient account login, OOBE, and data migration and improving the user experience.
[0009] In a possible design, the first device is currently in a network-free state.
[0010] In the embodiment of the present application, when the first device is in a network-free state, it can assist the second device to log in to the first account, breaking the limitation in the traditional technology that the old device (i.e., the first device) must be connected to the network to assist the new device (i.e., the second device) to log in to the account.
[0011] In a possible design, before the first device displays a code scanning interface in response to detecting the proximity of the second device, the method further includes: the first device displays a lock screen interface, a black screen, a desktop, a negative first screen, or an application interface.
[0012] In the embodiments of the present application, when the second device displays a first interface, the proximity of the two devices can automatically pull up the corresponding interface. In this process, the interface of the first device is not limited. The user does not need to open a specific interface on the first device, saving the user's operation.
[0013] In a possible design, the detection of the proximity of the second device includes: detecting that the distance between the first device and the second device is less than a first distance, and / or receiving a request signal broadcast by the second device, where the request signal is a short-range communication signal; the detection of the proximity of the first device includes: detecting that the distance between the first device and the second device is less than a second distance, and / or receiving a consent signal returned by the first device.
[0014] In the embodiments of the present application, when the two devices are close to each other to pull up an interface, it can be that when the distance between the two devices is detected to be close, the interface is pulled up, or when a short-range communication signal from the other party is received, the interface is pulled up. In short, this method does not require the user to perform cumbersome operations on the first device and the second device respectively to open the code scanning interface and the first graphic, simplifying the user operation steps and improving the convenience.
[0015] In a possible design, the first device displays a code scanning interface in response to detecting the proximity of the second device, including: the first device displays a prompt message in response to detecting the proximity of the second device, where the prompt message is used to prompt whether to agree to the second device logging in to the first account; when the first device receives an approval operation, it displays a code scanning interface.
[0016] In the embodiments of the present application, when the first device detects the proximity of the second device, it can first output a prompt message. After obtaining the user's consent, it then pulls up the code scanning interface to avoid directly pulling up the code scanning interface and causing the interruption of the service that the user is currently in.
[0017] In a possible design, the method further includes: the first device sends a consent instruction to the second device, where the consent instruction is used to indicate agreement for the second device to log in to the first account; the second device displays a first graphic in response to detecting the proximity of the first device, including: when the second device receives the consent instruction, it displays a first graphic.
[0018] In an embodiment of the present application, after the user of the first device agrees, the first device sends an approval instruction to the second device, and the second device pulls up the first graphic, avoiding directly pulling up the first graphic by the second device without obtaining the consent of the user of the first device, which affects the user experience.
[0019] In a possible design, the first login credential is a token.
[0020] In an embodiment of the present application, the first device may send the first login credential (token) of the first device to the second device through a near-field communication connection, so that the second device uses the first login credential to log in to the first account. The token has timeliness. In this way, even if the token is stolen, it cannot be used as long as it exceeds the validity period, which can avoid the persistence of data leakage to a certain extent.
[0021] In a possible design, the first data does not include the login password of the first account, and / or the first data is encrypted using a first key, and the first key is a key agreed upon by the first device and the server corresponding to the first account.
[0022] In an embodiment of the present application, the first device may send the first login credential (token) of the first device to the second device through a near-field communication connection, so that the second device uses the first login credential to log in to the first account. In this process, the first device does not transmit the account information and password information of the first account to the second device, and password leakage will not occur. Moreover, the first data is encrypted, which further ensures the security of the first login credential.
[0023] In a possible design, the first device displays a scanning code interface in response to detecting the proximity of the second device, including: the first device displays N accounts of the first device in response to detecting the proximity of the second device, where N is a positive integer; the first device displays the scanning code interface when it receives an operation for selecting the first account.
[0024] In an embodiment of the present application, the first device can display multiple accounts, and the user of the first device can select an account, enabling the second device to log in to the account, providing a better user experience.
[0025] In a possible design, the second device logs in to the first account based on the first login credential, including: the second device sends a login request to the server corresponding to the first account, the login request is used to request to log in to the first account, and the login request includes the first login credential; the second device receives a second login credential sent by the server.
[0026] In an embodiment of the present application, the second device uses the first login credential of the first device to log in to the first account. For the server of the first account, it belongs to the second device proxying the first device to log in to the first account. In this process, the first device does not transmit the account information and password information of the first account to the second device, avoiding password leakage.
[0027] In a possible design, before the second device receives the second login credential sent by the server, the method further includes: the second device receives a prompt message sent by the server, where the prompt message is used to prompt that the first device needs to be network-connected for authentication; the second device sends the prompt message to the first device through the near-field communication connection; the first device outputs the prompt message; after the first device connects to the network, it sends authentication information to the server, where the authentication information is used to indicate consent for the second device to log in to the first account.
[0028] In an embodiment of the present application, the second device uses the first login credential of the first device to log in to the first account. For the server of the first account, the first login credential originally issued to the first device is now at the second device, and the server will think that the second device has stolen the first login credential of the first device. Therefore, the server can require the first device to perform network-connected authentication. Since the first device is in a non-network state, the server can send a prompt message to the second device, so as to send a prompt message to the first device through the second device to remind the first device to perform network-connected authentication and ensure the security of account login.
[0029] In a possible design, when the first interface is an interface for migrating data from other devices, the method further includes: the first device sends second data to the second device through the near-field communication connection, where the second data includes user data stored in the first device; the second device stores the second data.
[0030] In an embodiment of the present application, after the first device and the second device are close to each other to pull up an interface, a near-field communication connection is established by scanning, and then data migration is performed through the near-field communication connection to improve the efficiency of data transmission.
[0031] In a second aspect, an account login method is further provided, which is applied to a first device. The operating system of the first device is currently logged in to a first account. The method includes: the first device displays a scanning code interface in response to detecting that a second device is approaching; the first device scans a first graphic on the second device through the scanning code interface to establish a near-field communication connection with the second device; the first device sends first data to the second device through the near-field communication connection, and the first data includes a first login credential of the first device, and the first login credential is used for the second device to log in to the first account.
[0032] In a possible design, the first device is currently in a network-free state.
[0033] In a possible design, before the first device displays a scanning code interface in response to detecting that the second device is approaching, the method further includes: the first device displays a lock screen interface, a black screen, a desktop, a negative first screen or an application interface.
[0034] In a possible design, the detection that the second device is approaching includes: detecting that the distance between the first device and the second device is less than a first distance, and / or receiving a request signal broadcast by the second device, and the request signal is a short-range communication signal.
[0035] In a possible design, the first device displays a scanning code interface in response to detecting that the second device is approaching, including: the first device displays a prompt message in response to detecting that the second device is approaching, and the prompt message is used to prompt whether to agree that the second device logs in to the first account; when the first device receives an approval operation, it displays a scanning code interface.
[0036] In a possible design, the first login credential is a token.
[0037] In a possible design, the first data does not include the login password of the first account, and / or the first data is encrypted using a first key, and the first key is a key agreed upon by the first device and the server corresponding to the first account.
[0038] In a possible design, the first device displays a scanning code interface in response to detecting that the second device is approaching, including: the first device displays N accounts of the first device in response to detecting that the second device is approaching, where N is a positive integer; when the first device receives an operation for selecting the first account, it displays the scanning code interface.
[0039] In a possible design, the method further includes: the first device receives a prompt message sent by the second device through the near-field communication connection, where the prompt message is used to prompt that the first device needs to be network-authenticated; the first device outputs the prompt message; after the first device connects to the network, the first device sends authentication information to the server corresponding to the first account, where the authentication information is used to indicate consent for the second device to log in to the first account.
[0040] In a possible design, when the first interface is an interface for migrating data from other devices, the method further includes: the first device sends second data to the second device through the near-field communication connection, where the second data includes user data stored in the first device.
[0041] In a third aspect, an account login method is further provided, which is applied to the second device. The method includes: the second device displays a first interface, where the first interface is an interface for logging in to an account; the second device displays a first graphic in response to detecting the proximity of the first device, where the first graphic is used to establish near-field communication; the second device establishes a near-field communication connection with the first device in response to the first device scanning the first graphic; the second device receives first data sent by the first device through the near-field communication connection, where the first data includes a first login credential of the first device; the second device logs in to the first account based on the first login credential.
[0042] In a possible design, the first interface includes any one of the following items: the first interface is an interface for logging in to an account in the settings application of the second device, the first interface is an interface during the OOBE process of the second device, or the first interface is an interface for migrating data from other devices.
[0043] In a possible design, the first device is currently in a network-free state.
[0044] In a possible design, before the first device displays a scanning code interface in response to detecting the proximity of the second device, the method further includes: the first device displays a lock screen interface, a black screen, a desktop, a negative first screen, or an application interface.
[0045] In a possible design, the detection of the proximity of the first device includes: detecting that the distance between the first device and the second device is less than a second distance, and / or receiving a consent signal returned by the first device.
[0046] In a possible design, before the second device displays the first graphic in response to detecting the proximity of the first device, the method further includes: when the second device receives a consent instruction sent by the first device, the second device displays the first graphic, where the consent instruction is used to indicate consent for the second device to log in to the first account.
[0047] In a possible design, the first login credential is a token.
[0048] In a possible design, the first data does not include the login password of the first account, and / or the first data is encrypted using a first encryption key, where the first encryption key is an encryption key agreed upon by the first device and the server corresponding to the first account.
[0049] In a possible design, for the second device to log in to the first account based on the first login credential, it includes: the second device sends a login request to the server corresponding to the first account, where the login request is used to request logging in to the first account and includes the first login credential; the second device receives a second login credential sent by the server.
[0050] In a possible design, before the second device receives the second login credential sent by the server, the method further includes: the second device receives a prompt message sent by the server, where the prompt message is used to prompt that the first device needs to be connected to the network for authentication; the second device sends the prompt message to the first device through the near-field communication connection.
[0051] In a possible design, when the first interface is an interface for migrating data from other devices, the method further includes: the second device receives second data sent by the first device through the near-field communication connection, where the second data includes user data stored in the first device; the second device stores the second data.
[0052] In a fourth aspect, an account login method applied to a server is further provided. The method includes: receiving a login request from a second device, where the login request is used to request logging in to a first account and includes a first login credential of a first device; sending a second login credential to the second device.
[0053] In the embodiments of the present application, the server can implement proxy login of different devices for the same account. For example, when the second device uses the first login credential of the first device to log in to the first account, for the server of the first account, it belongs to the second device proxying the first device to log in to the first account, without restricting that the second device must obtain the password of the first account to log in to the first account, achieving the efficiency and convenience of passwordless login.
[0054] In a possible design, the login request includes a first code value; before sending the second login credential to the second device, the method further includes: determining that the first code value is a code value that the server has sent to the second device and the first code value is within the valid period.
[0055] In the embodiments of the present application, the server can verify the second device (for example, verify the first code value), and only after the verification is passed, issue the second login credential to the second device to ensure the security of the account.
[0056] In a possible design, before sending the second login credential to the second device, the method further includes: sending a prompt message to the second device, where the prompt message is used to prompt that the first device needs to be network-connected for authentication; receiving the authentication information sent by the first device, where the authentication information is used to indicate authorization for the second device to log in to the first account.
[0057] In the embodiments of the present application, the second device uses the first login credential of the first device to log in to the first account. For the server of the first account, the first login credential originally issued to the first device is now at the second device, and the server will consider that the second device has stolen the first login credential of the first device. Therefore, the server can require the first device to perform network-connected authentication. For example, the server can send a prompt message to the second device to remind that the first device needs to be network-connected for authentication to ensure the security of the account.
[0058] In a fifth aspect, there is also provided an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where when the processor executes the computer program, the method described in the second aspect or the third aspect above is implemented.
[0059] In a sixth aspect, there is also provided an electronic device, including a module / unit for executing the method corresponding to any one of the designs in the second aspect or the third aspect above. These modules / units can be implemented by hardware or by hardware executing corresponding software.
[0060] In a seventh aspect, there is also provided a server, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where when the processor executes the computer program, the method described in the fourth aspect above is implemented.
[0061] In an eighth aspect, there is also provided a server, including a module / unit for executing the method corresponding to any one of the designs in the fourth aspect above. These modules / units can be implemented by hardware or by hardware executing corresponding software.
[0062] In a ninth aspect, a chip is further provided, including a processor and an interface; the processor is configured to read instructions through the interface to execute the method described in any one of the first aspect, the second aspect, the third aspect, or the fourth aspect above.
[0063] In a tenth aspect, a chip system is further provided, the chip system includes a processing circuit and a storage medium, and instructions are stored in the storage medium; when the instructions are executed by the processing circuit, the method described in any one of the first aspect, the second aspect, the third aspect, or the fourth aspect above is implemented.
[0064] In an eleventh aspect, a communication system is further provided, including: a first device configured to execute the method described in the second aspect above; a second device configured to execute the method described in the third aspect above.
[0065] In a twelfth aspect, a communication system is further provided, including: a first device configured to execute the method described in the second aspect above; a second device configured to execute the method described in the third aspect above; and a server configured to execute the method described in the fourth aspect above.
[0066] In a thirteenth aspect, a computer-readable storage medium is further provided, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of the first aspect, the second aspect, the third aspect, or the fourth aspect above is implemented.
[0067] In a fourteenth aspect, a computer program product is further provided, the computer program product includes a computer program, and when the computer program runs on a computer, the computer is caused to execute the method described in any one of the first aspect, the second aspect, the third aspect, or the fourth aspect above.
[0068] For the beneficial effects of the designs in any one of the second aspect to the fourteenth aspect above, reference may be made to the beneficial effects of the corresponding designs in the first aspect above, and the present application will not elaborate on them one by one. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] Figure 1 It is a schematic diagram of a communication system provided by an embodiment of the present application;
[0070] Figure 2 It is a schematic diagram of scan code login provided by an embodiment of the present application;
[0071] Figures 3A to 3B It is two example diagrams of scan code login provided by an embodiment of the present application;
[0072] Figure 4 It is another schematic diagram of scan login provided by an embodiment of the present application;
[0073] Figures 5A to 5F A schematic diagram of the interface for pulling up two devices close to each other provided by an embodiment of the present application;
[0074] Figures 6A to 6B Another schematic diagram of the interface for pulling up two devices close to each other provided by an embodiment of the present application;
[0075] Figures 7A to 7B Another schematic diagram of the interface for pulling up two devices close to each other provided by an embodiment of the present application;
[0076] Figure 8 The first flowchart schematic diagram of the account login method provided by an embodiment of the present application;
[0077] Figure 9 The second flowchart schematic diagram of the account login method provided by an embodiment of the present application;
[0078] Figure 10 The third flowchart schematic diagram of the account login method provided by an embodiment of the present application;
[0079] Figures 11A to 11B The fourth flowchart schematic diagram of the account login method provided by an embodiment of the present application;
[0080] Figure 12A The fifth flowchart schematic diagram of the account login method provided by an embodiment of the present application;
[0081] Figure 12B The sixth flowchart schematic diagram of the account login method provided by an embodiment of the present application;
[0082] Figure 13 A schematic diagram of an electronic device provided by an embodiment of the present application;
[0083] Figure 14 Another schematic diagram of a communication system provided by an embodiment of the present application;
[0084] Figure 15 Another schematic diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0085] Hereinafter, some terms in the embodiments of the present application are explained to facilitate the understanding of those skilled in the art.
[0086] At least one involved in the embodiments of the present application includes one or more; among them, multiple means greater than or equal to two. In addition, it should be understood that in the description of this specification, terms such as "first" and "second" are only used for the purpose of distinguishing descriptions, and cannot be construed as explicitly or implicitly indicating relative importance, nor can they be construed as explicitly or implicitly indicating an order. For example, the first device and the second device do not represent the importance degree of the two or represent the order of the two, but are only for distinguishing descriptions. In the embodiments of the present application, "and / or" only describes the association relationship and indicates that three relationships can exist. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this article generally represents an "or" relationship between the associated objects before and after.
[0087] The orientation terms mentioned in the embodiments of the present application, such as "up", "down", "left", "right", "inside", "outside", etc., are only references to the direction of the attached drawings. Therefore, the orientation terms used are for better and clearer explanation and understanding of the embodiments of the present application, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus cannot be construed as a limitation to the embodiments of the present application.
[0088] Describing with reference to "one embodiment", "in some examples" or "some embodiments" in this specification means that a specific feature, structure or characteristic described in combination with the embodiment is included in one or more embodiments of this specification. Thus, statements such as "in some examples", "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments" and the like 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 "comprising", "including", "having" and their variants all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0089] As described above, the way for a user to input a password to log in to an account requires the user to remember the account and password, which places relatively high requirements on the user. To solve this problem, in the embodiments of the present application, the account can be logged in by a password-free login method. In this way, the user does not need to remember the password, reducing the memory difficulty and helping to improve the use experience of the electronic device. In the embodiments of the present application, password-free login can include: scanning code login. Scanning code login involves two devices, one is the device that has logged in to the account, such as device A, and the other is the device that has not logged in to the account, such as device B. Device B can display a graphic to be scanned, such as a two-dimensional code, a bar code, etc. Device A can display a scanning code interface. Device A scans the graphic displayed by device B through the scanning code interface so that device B logs in to the account of device A.
[0090] The following will describe the QR code scanning login process provided by the embodiments of the present application in detail in conjunction with the accompanying drawings.
[0091] The technical solution provided by the embodiments of the present application can be applied to a communication system. For example, please refer to Figure 1 , which is a schematic diagram of a communication system provided by an embodiment of the present application. As Figure 1 , the communication system includes a first device, a second device, and a cloud side.
[0092] Figure 1 In, the first device logs in to the first account. Therefore, the first device can be referred to as a logged-in device. Optionally, for the first device to log in to the first account, it may include: the first operating system of the first device logs in to the first account (i.e., the first account is a system account), or the first application in the first device logs in to the first account. The first operating system can be any operating system such as the Android system, the HarmonyOS system, system, system, system, system, system, system, etc. The first application can be any application in the first device, which can be a system application or a third-party application. Optionally, the first account can be an account in any form such as a mobile phone number, an email address, a bank card number, etc., and the embodiments of the present application do not make any limitations. Figure 1 In, taking the first device as a mobile phone as an example, it should be understood that the first device can also be other types of devices. For example, the first device can be a portable device such as a mobile phone, a tablet computer, a laptop computer, a personal computer (PC), an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc.; or, it can also be a wearable device such as a watch or a bracelet; or, it can also be a virtual reality (VR) device, an augmented reality (AR) device, a mixed reality technology (MR) device, etc. In short, the embodiments of the present application do not make any limitations on the specific type of the first device.
[0093] In an embodiment of the present application, the first device may have distance sensing capabilities and be able to sense the distance between other devices and the first device. For example, the first device includes a ranging unit. Optionally, the ranging unit may be a laser ranging unit, an acoustic ranging unit, an ultrasonic ranging unit, a radar, etc., which is not limited in the embodiments of the present application. After the first device senses the distance between other devices and the first device, if the distance is less than the first distance, it is determined that the other device is approaching the first device, and a corresponding interface can be automatically pulled up, which will be described later.
[0094] Figure 1 In [the above context], the second device is not logged in to the first account. Therefore, the second device can be referred to as an unlogged device. Optionally, the second device not being logged in to the first account may include: the second operating system of the second device is not logged in to the first account, or the second application in the second device is not logged in to the first account. The second operating system may be system, system, system, system, system, system, system, any operating system such as [a certain] system. Optionally, the second operating system and the first operating system may be the same operating system or different operating systems. For example, both the second operating system and the first operating system are system. The second application may be any application in the second device, which may be a system application or a third-party application. Optionally, the second application and the first application in the foregoing may be the same application or different applications. Figure 1 In [the above context], taking the second device as a mobile phone as an example, it should be understood that the second device may also be other types of devices. For example, the second device may be a portable device such as a mobile phone, a tablet computer, a laptop computer, a PC, a UMPC, a netbook, a PDA, etc.; or, it may also be an entertainment device such as a television, a game console, etc.; or, it may also be a wearable device such as a watch, a bracelet, etc.; or, it may also be a vehicle-mounted device, such as a device mounted in a vehicle, such as a display device; of course, the vehicle may also be replaced with other vehicles or transportation means such as a train, an aircraft, a mobile platform, etc.; or, it may also be a VR device, an AR device, an MR device, etc. In short, the embodiments of the present application do not limit the specific type of the second device. Optionally, the second device and the first device may be the same type of device or different types of devices. For example, the first device is a mobile phone, and the second device is a PC or a tablet computer. In this article, the first device and the second device are both mobile phones as an example for illustration.
[0095] In an embodiment of the present application, the second device may have distance sensing capabilities and be able to sense the distance between other devices and the second device. For example, the second device includes a ranging unit. For details about the ranging unit, please refer to the foregoing content. After the second device senses the distance between other devices and the second device, if the distance is less than the first distance, it is determined that the other device is approaching the second device, and a corresponding interface can be automatically pulled up. This process will be described later.
[0096] Figure 1 In this case, the cloud side may include a server corresponding to the first account, that is, the login server of the first account, such as the first server. When the first device logs in to the first account, it can be simply understood that the first device can access the data resources in the first server. When the second device does not log in to the first account, it can be simply understood that the second device cannot access the data resources in the first server. Optionally, the first server can be various types of servers, such as an application server (Application Server), an account server (Account Server), an identity management (Identity Management, IDM) server, etc. Figure 1 In this case, the cloud side may further include other servers, such as the second server. The second server can be understood as an auxiliary server of the first server. For example, for a device that needs to perform scan code login (such as the second device), the second server can provide it with verification information. The verification information may be a login code value (code), hereinafter simply referred to as: code value. Optionally, the code value can be a combination of any one or more forms such as text, numerical value, symbol, letter, pattern, sound, video, etc. The code value can be used to generate a graphic to be scanned, such as a two-dimensional code, a bar code, or any other form of graphic. That is to say, the second server can be used to generate a code value and provide the code value to a device that needs to perform scan code login (such as the second device), so that the device displays the graphic to be scanned. When the graphic is scanned by a device that has logged in to the account (such as the first device), passwordless login can be achieved. Exemplarily, the second server can be a Quick Response code (QR code) server, and the generated code value can be a QR code, and the QR code is used to generate various forms of graphics such as two-dimensional codes and bar codes. It should be noted that Figure 1 In this case, taking the second server and the first server as two independent servers as an example, it can be understood that the second server and the first server can also be one server. For example, the second server is integrated in the first server. In other words, the first server has the function of generating a code value.
[0097] Continue with the following Figure 1 shown communication system as an example for illustration.
[0098] Figure 1 Among them, the first device has logged in to the first account, and the second device has not logged in to the first account. For the sake of easy understanding, taking the example that the first operating system of the first device has logged in to the first account and the second operating system of the second device has not logged in to the first account, if both the first operating system and the second operating system are Huawei systems, then the first account can be a Huawei account. In the embodiments of the present application, the second operating system of the second device can log in to the first account by means of scanning a code for login.
[0099] For example, please refer to Figure 2 , which is a schematic diagram of scanning a code for login provided by an embodiment of the present application. Figure 2 Among them, the first operating system of the first device has logged in to the first account. The second operating system of the second device has not logged in to the first account. As Figure 2 (a), the second device displays the interface 100, and the interface 100 includes a first graphic. As Figure 2 (b), the first device displays the interface 200. The interface 200 can also be called a code-scanning interface. The interface 200 includes an image captured by the camera of the first device. The user can aim the camera of the first device at the first graphic on the second device for scanning, so that the second operating system of the second device logs in to the first account. The specific login process will be described later. Figure 2 Among them, the first graphic can be a graphic in various forms such as a two-dimensional code, a bar code, etc. Optionally, the shape of the first graphic can be any shape such as a square, a rectangle, a circle, an annular shape, etc., which is not limited in the embodiments of the present application.
[0100] In the embodiments of the present application, the generation method of the first graphic can include the following two types.
[0101] The first type, the first graphic is generated based on a first code value. The first code value is obtained by the second device from the cloud side (for example, obtained from the Figure 1 second server in Figure 3A ) and is a code value used to implement password-free login. For example, as
[0102] , the second device displays the first graphic, and the first graphic is a two-dimensional code generated based on the first code value. The first device scans the two-dimensional code to obtain the first code value, and then requests authorization from the cloud side for the second device to log in to the first account based on the first code value. Figure 1The code value for implementing passwordless login obtained by the second server (in the second device), and the second code value can be locally generated by the second device or obtained from a third server, where the third server may be the same as or different from the second server and the first server. Different functions include, for example: the first code value is used by the cloud side to authenticate the second device to determine whether to authorize the second device to log in to the first account, while the second code value is used to establish a near-field communication connection. For example, as Figure 3B , the second device displays a first graphic, and the first graphic is a circular code generated based on the second code value. If the operating system of the second device is the HarmonyOS, the circular code can be called a Harmony Ring. Of course, the embodiments of this application do not limit this name. When the first device scans the circular code, a near-field communication connection can be established with the second device. The first device can assist the second device to log in to the first account through the near-field communication connection. The specific implementation process will be described later.
[0103] In the embodiments of this application, the second device can generate the first graphic based on any one of the above two methods. For example, if the second device only includes the program code of the first method, the first method is used to generate the first graphic. Or, if the second device only includes the program code of the second method, the second method is used to generate the first graphic. Or, if the second device includes both the program code of the first method and the program code of the second method, in this case, the second device can randomly select one method, or select one method according to the actual situation. For example, if the second device determines that the near-field communication function (such as Bluetooth) is not enabled, the first method can be used, otherwise, the second method can be used; or, the user can also set which method the second device uses.
[0104] It should be noted that different generation methods of the first graphic (such as the above first or second method) correspond to different login processes, which will be described separately later. For the sake of understanding, the following mainly takes the second method of generating the first graphic (that is Figure 3B ) as an example for description, that is, the first graphic is used to establish a near-field communication connection. As Figure 3B , to implement scan code login, the second device needs to open interface 100, and the first device needs to open interface 200. The following will describe the process of the second device opening interface 100 and the first device opening interface 200. It should be emphasized that the principles of the second device opening interface 100 and the first device opening interface 200 in the following also apply to Figure 3A .
[0105] For example, as Figure 4(a), The second device displays the desktop. After the second device receives one or more user operations (e.g., click operations), it displays an interface for logging in to an account, e.g., an interface for logging in to a system account (e.g., a Huawei account). The interface can be, for example, the interface as shown in Figure 4 (b). The interface includes a "Near-Field Login" button. When the second device receives an operation on the "Near-Field Login" button, it displays an interface 100 as shown in Figure 4 (c). The interface 100 includes a first graphic, which is used to establish a near-field communication connection. As shown in Figure 4 (d), The first device displays the desktop. After the first device receives one or more user operations (e.g., click operations), it displays an interface as shown in Figure 4 (e). The interface can be the interface of the account center of the first device's account. The interface includes a "Scan" button. When the first device receives an operation on the "Scan" button, it activates the camera and displays an interface 200 as shown in Figure 4 (f). Therefore, through the process of Figure 4 , the second device opens the interface 100 and the first device opens the interface 200. However, in this process, the user needs to perform cumbersome operations on the first device and the second device respectively, which is not convenient and the experience is not good.
[0106] To simplify the user operation steps and enable the second device to quickly open the interface 100, and / or the first device to quickly open the interface 200. A possible solution is that the two devices automatically pull up the corresponding interfaces when triggered by a trigger condition. Optionally, the trigger condition may include: the two devices are close. That is, when the two devices are close, they automatically pull up the corresponding interfaces.
[0107] For example, as shown in Figure 5A (b), when the first device detects that the second device is close, there are two processing methods. Method A, the first device pops up a prompt box as shown in Figure 5A (e). The prompt box includes the account information of the first device (e.g., mobile phone number), and also includes a prompt message for prompting that the account of the first device will be logged in on the second device. The prompt box also includes a "Log in with this account" button. When the first device receives an operation on the "Log in with this account" button, it pulls up an interface 200 as shown in Figure 5A (d), that is, the scanning code interface. Method B, the first device directly pulls up an interface 200 as shown in Figure 5A (d). As shown in Figure 5A (a), when the second device detects that the first device is close, it can directly pull up an interface 100 as shown in Figure 5A (c). The interface 100 includes a first graphic, which is used to establish a near-field communication connection; or, when the second device receives a pull-up instruction sent by the first device, it pulls up as shown inFigure 5A (c)'s interface 100. For example, Figure 5A In (f), after the first device receives an operation on the "Log in with this account" button, it sends a pull-up instruction to the second device. After the second device receives the pull-up instruction, it pulls up the interface 100 as shown in Figure 5A (c).
[0108] It should be noted that Figure 5A Taking the case where the first device displays the desktop and when the second device displays the desktop, the two devices automatically pull up the corresponding interface when they get close. Optionally, before the second device pulls up interface 100, it can also display other interfaces other than the desktop, such as the lock screen, black screen or other interfaces. The other interfaces can be the negative first screen or any interface that the user enters under the unlocked condition. Optionally, before the first device pulls up interface 200, it can also display other interfaces other than the desktop, such as the lock screen, black screen or other interfaces. The other interfaces can be the negative first screen or any interface that the user enters under the unlocked condition.
[0109] Compare Figure 5A with the previous text Figure 4 In Figure 4 , the user needs to perform cumbersome operations on the first device and the second device respectively, while Figure 5A in
[0110] Figure 5A , when the two devices get close, they automatically pull up the corresponding interface. Specifically, there can be multiple implementation methods.
[0111] Method A: When the second device detects that the first device is approaching, it automatically displays interface 100 and triggers the first device to display interface 200. For example, it sends an instruction to open interface 200 to the first device so that the first device opens interface 200 based on this instruction. In this method, the second device performs distance detection. When it determines that the first device is approaching according to the distance (for example, the distance is less than the first distance), it displays interface 100 by itself and triggers the first device to display interface 200. In this method, the workload of the first device is relatively small.
[0112] Method B: When the first device detects that the second device is approaching, it automatically displays interface 200 and triggers the second device to display interface 100. For example, it sends an instruction to open interface 100 to the second device so that the second device opens interface 100 based on this instruction. In this method, the first device performs distance detection. When it determines that the second device is approaching according to the distance (for example, the distance is less than the second distance), it displays interface 200 by itself and triggers the second device to display interface 100. In this method, the workload of the second device is relatively small.
[0113] In Mode C, when the second device detects that the first device is approaching, it automatically displays Interface 100; when the first device detects that the second device is approaching, it automatically displays Interface 200. In this mode, the computational load of the first device and the second device is balanced.
[0114] Optionally, the system can default to using the above-mentioned Mode A, that is, by default, the device without a logged-in account (i.e., the second device) performs distance detection and interface pulling up. A possible situation is that when no account is logged in to the second operating system of the second device, the distance sensing unit in the second device (which can be referred to the previous description) can always be in an on state, that is, always sense whether there is another device approaching, so as to be ready to pull up the interface when approaching and complete the scan code login as soon as possible. And the first operating system of the first device has logged in the first account, and the distance sensing unit in the first device does not need to be always on. The first device only needs to pull up Interface 200 after receiving the interface pulling-up instruction from the second device. Of course, the system can also default to using Mode B or default to using Mode C, which is not limited in the embodiments of the present application.
[0115] Figure 5A In this case, when the two devices approach, the corresponding interface is automatically pulled up. In the embodiments of the present application, it is also considered that when the two devices approach and the interface is automatically pulled up, it may not be what the user expects. For example, the user has no intention of logging in to the first account with the second operating system of the second device, but simply places the second device and the first device in a relatively close position. If the two devices automatically pull up the interface, it may affect the user experience.
[0116] Therefore, in order to avoid mis-triggering, the embodiments of the present application provide the following solutions.
[0117] The first solution is that when the second device displays the first interface (which can also be called the first specific interface), when the two devices approach, the corresponding interface is automatically pulled up. When the second device does not display the first interface, the two devices approaching will not pull up the interface to avoid mis-triggering.
[0118] In different scenarios, the first interface of the second device can be different. Three scenarios are exemplified below.
[0119] The first scenario is the scenario where the second device logs in to an account. Optionally, the scenario of logging in to an account can be the scenario of logging in to a system account (for example, a Huawei account).
[0120] For example, as Figure 5B (a), the second device displays the desktop. After the second device receives one or more user operations, it displays the interface for logging in to an account. Taking logging in to a system account (for example, a Huawei account) as an example, the interface for logging in to the system account can be, for example, Figure 5BThe interface 301 shown in (b). As an example, the process for the second device to open the interface 301 may include: Desktop -> Settings -> Account. As Figure 5B shown in (b), the interface 301 includes a "Proximity Login" button. When the second device receives an operation on the "Proximity Login" button, it may display an interface 302 as shown in Figure 5B (c), or directly display an interface 100 as shown in Figure 5B (d). It should be noted that, as Figure 5B shown in the interface 301 of (b), the account can be a mobile phone number, an email address, or an account name, and is used to log in to the operating system on the second device.
[0121] Optionally, the first interface can be Figure 5B the interface 301 of (b), Figure 5B the interface 302 of (c), Figure 5B the interface 100 of (d), any one of these interfaces or other interfaces. Other interfaces can be, for example, the home page of the settings application or any interface entered from the home page.
[0122] Taking the first interface being Figure 5B the interface 302 of (c) as an example. When the second device displays the interface 302, if the two devices are close, the corresponding interface can be pulled up. For example, as Figure 5B shown in (e), when the first device displays the desktop and detects that the second device is close (the second device is displaying the interface 302), there are two processing methods. Method A: The first device automatically pops up a prompt box as shown in Figure 5B (f). The prompt box includes a prompt message for prompting that the account of the first device will be logged in on the second device. The prompt box also includes a "Log in with this account" button. When the first device receives an operation on the "Log in with this account" button, it pulls up an interface 200 as shown in Figure 5B (g). Method B: The first device directly pulls up an interface 200 as shown in Figure 5B (g) without going through the process of Figure 5B (f), saving operations and simplifying the process. When the second device displays the interface 302, if it detects that the first device is close, it can automatically pull up an interface 100 as shown in Figure 5B (d), or when it receives a pull-up instruction sent by the first device, it pulls up an interface 100 as shown in Figure 5B (d). For example, Figure 5B in (f), after the first device receives an operation on the "Log in with this account" button, it sends a pull-up instruction to the second device. After the second device receives the pull-up instruction, it pulls up an interface as shown in Figure 5BThe interface 100 in (d). It should be noted that in this example, when the second device displays the interface 302 and the first device displays the desktop, the two devices will automatically pull up the interface when they are close to each other. Optionally, the first device can also display other interfaces other than the desktop, such as the lock screen, black screen, or other interfaces. The other interfaces can be any interface that the user enters when the first device is unlocked. For example, the negative first screen or the interface of a certain application.
[0123] Taking the first interface as Figure 5B the interface 100 in (d) as an example. When the second device displays the interface 100, if the two devices are close to each other, the corresponding interface can be pulled up. For example, as Figure 5B (e), when the first device displays the desktop and the first device detects that the second device is close (the second device is displaying the interface 100), there are two processing methods, namely method A and method B as described above. It should be understood that since the second device is already displaying the interface 100, when the second device detects that the first device is close, the second device will continue to stay on the interface 100. It should be noted that in this example, when the second device displays the interface 100 and the first device displays the desktop, the two devices will automatically pull up the interface when they are close to each other. Optionally, the first device can also display other interfaces other than the desktop, such as the lock screen, black screen, or other interfaces. The other interfaces can be any interface that the user enters when the first device is unlocked. For example, the negative first screen or the interface of a certain application.
[0124] Taking the first interface as Figure 5B the interface 301 in (b) as an example. When the second device displays the interface 301, if the two devices are close to each other, the corresponding interface can be pulled up. For example, as Figure 5B (e), when the first device displays the desktop and the first device detects that the second device is close (the second device is displaying the interface 301), there are two processing methods, namely method A and method B as described above. When the second device displays the interface 301, if it detects that the first device is close, it can directly pull up the interface as Figure 5B in (d); or, when receiving the pull-up instruction sent by the first device, pull up the interface as Figure 5B in (d). For example, Figure 5B in (f), after the first device receives the operation on the "Log in with this account" button, it sends a pull-up instruction to the second device. After the second device receives the pull-up instruction, it pulls up the interface as Figure 5B in (d). It should be noted that in this example, when the second device displays the interface 301 and the first device displays the desktop, the two devices will automatically pull up the interface when they are close to each other. Optionally, the first device can also display other interfaces other than the desktop, such as the lock screen, black screen, or other interfaces. The other interfaces can be any interface that the user enters when the first device is unlocked. For example, the negative first screen or the interface of a certain application.
[0125] The second scenario is the out-of-box experience (OOBE) scenario of the second device.
[0126] For example, as Figure 5C (a), the second device is in a shutdown state. After the second device receives a power-on operation, it can display the power-on interface as shown in Figure 5C (b). Optionally, the second device can perform processes such as searching for and registering a SIM card so that the SIM card can be used normally. Optionally, it can also perform a wireless connection process, such as accessing a WLAN. These processes are not described in detail in the embodiments of the present application. After completing the above processes, the second device can display the interface 303 as shown in Figure 5C (c). The user can select a language, such as Simplified Chinese, within the interface 303. When the second device receives an operation on the "Start" button, it displays the interface 304 as shown in Figure 5C (d). The user can select a region, such as China, within the interface 304. When the second device receives an operation on the "Continue" button, it can display an interface for logging in to an account. For example, an interface for logging in to a system account (such as a Huawei account). The interface can be, for example, the interface 305 as shown in Figure 5C (e), or the interface 100 as shown in Figure 5C (f). The interface 305 includes a prompt message: Please bring another device closer to this device to easily complete the setup.
[0127] Optionally, the first interface can be any interface during the OOBE process. For example, Figure 5C the interface 303 in Figure 5C (c), Figure 5C the interface 304 in Figure 5C (d),
[0128] Taking the first interface being Figure 5C the interface 305 shown in Figure 5C (e) as an example. When the second device displays the interface 305, if the two devices are close, a corresponding interface can be pulled up. For example, as Figure 5C (g), when the first device displays the lock screen interface and detects that the second device is close (the second device is displaying the interface 305), there are two processing methods. Method A: The first device automatically pops up a prompt box as shown in Figure 5CThe interface 200 shown in (h). Optionally, since the first device is in the locked screen state, when the first device receives an operation on the "Settings" button, it can prompt the user to perform identity authentication (this process Figure 5C is not shown) to ensure that the owner of the first device is operating. For example, the first device can prompt the user to enter an unlock fingerprint or an unlock password. If the verification passes, it will pull up the interface 200 as shown in Figure 5C (h). Method B: The first device directly pulls up the interface 200 as shown in Figure 5C (h) without popping up the Figure 5C prompt box in (g), saving operations and simplifying the process. When the second device displays the interface 305, if it detects that the first device is approaching, it can automatically pull up the interface 100 as shown in Figure 5C (f); or, when it receives a pull-up instruction sent by the first device, it pulls up the interface 100 as shown in Figure 5C (f). For example, Figure 5C in (g), after the first device receives an operation on the "Settings" button, it sends a pull-up instruction to the second device. After the second device receives the pull-up instruction, it pulls up the interface 100 as shown in Figure 5C (f). It should be noted that in this example, taking the case where the second device displays the interface 305 and the first device displays the locked screen interface, when the two devices approach and automatically pull up the interface, optionally, the first device can also display other interfaces other than the locked screen interface, such as a black screen, or any interface that the user enters when unlocked, such as the desktop, the negative first screen, or the interface of an application.
[0129] Taking the first interface as Figure 5C the interface 100 shown in (f) as an example. When the second device displays the interface 100, if the two devices approach, the corresponding interface can be pulled up. For example, as shown in Figure 5C (g), when the first device displays the locked screen interface and the first device detects that the second device is approaching (the second device is displaying the interface 100), there are two processing methods, namely Method A and Method B as described above. It should be understood that since the second device already displays the interface 100, when it detects that the first device is approaching, the second device remains on the interface 100. It should be noted that in this example, taking the case where the second device displays the interface 100 and the first device displays the locked screen interface, when the two devices approach and automatically pull up the interface, optionally, the first device can also display other interfaces other than the locked screen interface, such as a black screen, or any interface that the user enters when unlocked, such as the desktop, the negative first screen, or the interface of an application.
[0130] Taking the first interface as Figure 5C the interface 304 shown in (d) as an example. When the second device displays the interface 304, if the two devices approach, the corresponding interface can be pulled up. For example, as shown in Figure 5C(g), when the first device displays the lock screen interface and detects the approach of the second device (the second device is displaying interface 304), there are two handling methods, namely method A and method B as described above. When the second device displays interface 304, if it detects the approach of the first device, it can directly pull up interface 100 as shown in Figure 5C (f); or, when receiving the pull-up instruction sent by the first device, it pulls up interface 100 as shown in Figure 5C (f). For example, Figure 5C in (g), after the first device receives an operation on the "Settings" button, it sends a pull-up instruction to the second device. After the second device receives the pull-up instruction, it pulls up interface 100 as shown in Figure 5C (f). It should be noted that in this example, taking the case where the two devices approach and automatically pull up the interface when the second device displays interface 304 and the first device displays the lock screen interface as an example, optionally, the first device can also display other interfaces other than the lock screen interface, such as a black screen, or any interface that the user enters in the unlocked state, such as the desktop, the negative first screen, or the interface of a certain application.
[0131] The third scenario is the data cloning scenario.
[0132] For example, as Figure 5D (a), the second device displays an interface that includes two options: "This is the old device" and "This is the new device". Optionally, the process for the second device to open the interface shown in Figure 5D (a) can include: Desktop -> Settings -> System and Updates -> Data Cloning; or, after the second device installs an application for data cloning (such as "Huawei Phone Clone") from the application market, it opens the interface shown in Figure 5D (a). When the second device receives an operation on the option "This is the new device", it can display the interface 306 shown in Figure 5D (b), or directly display the interface 100 shown in Figure 5D (c).
[0133] Optionally, the first interface can be Figure 5D the interface 306 in (b), Figure 5D the interface 100 in (c) or other interfaces, and other interfaces can be other interfaces that may be displayed after the second device receives an operation on the option "This is the new device".
[0134] Taking the first interface being Figure 5D the interface 306 in (b) as an example. When the second device displays interface 306, if the two devices approach, the corresponding interface can be pulled up. For example, as Figure 5D(f), when the first device displays the lock screen interface and detects that the second device is approaching (the second device is displaying interface 306), there are two processing methods. Method A: The first device automatically pops up a prompt box as shown in Figure 5D (f). The prompt box includes the device information of the second device and a prompt message for prompting to clone data to the second device. The prompt box also includes an "OK" button. When the first device receives an operation on the "OK" button, it can pull up interface 200 as shown in Figure 5D (g); or, when the first device receives an operation on the "OK" button, it can prompt the user to perform identity authentication (this process is Figure 5D not shown) to ensure that the owner of the first device is operating. For example, the first device can prompt the user to enter the unlock fingerprint or unlock password. If the verification passes, it pulls up interface 200 as shown in Figure 5D (g). Method B: The first device directly pulls up interface 200 as shown in Figure 5D (g) without popping up the Figure 5D (f) prompt box, saving operations and simplifying the process. When the second device displays interface 306, if it detects that the first device is approaching, it can directly pull up interface 100 as shown in Figure 5D (c); or, when it receives a pull-up instruction sent by the first device, it pulls up interface 100 as shown in Figure 5D (c). For example, Figure 5D (f), after the first device receives an operation on the "OK" button, it sends a pull-up instruction to the second device. After the second device receives the pull-up instruction, it pulls up interface 100 as shown in Figure 5D (c). It should be noted that in this example, when the second device displays interface 306 and the first device displays the lock screen interface, when the two devices approach, the interface is automatically pulled up. Optionally, the first device can also display other interfaces other than the lock screen interface, such as a black screen, or any interface that the user enters in the unlocked state, such as the desktop, the negative first screen, or the interface of an application.
[0135] Taking the first interface as Figure 5D (c) interface 100 as an example. When the second device displays interface 100, if the two devices approach, the corresponding interface can be pulled up. For example, as shown in Figure 5D(f), when the first device displays the lock screen interface and detects the proximity of the second device (the second device is displaying interface 100), there are two processing methods, namely method A and method B as described above. It should be understood that since the second device is already displaying interface 100, when the second device detects the proximity of the first device, the second device continues to remain on interface 100. It should be noted that in this example, taking the case where the second device displays interface 100 and the first device displays the lock screen interface, and the two devices automatically pull up the interface when they are close to each other as an example, optionally, the first device can also display other interfaces other than the lock screen interface, such as a black screen, or any interface that the user enters in the unlocked state, such as the desktop, the negative first screen, or the interface of a certain application.
[0136] As Figure 5D , after the first device scans the first graphic in the interface 100 of the second device through the scanning code interface 200, a near-field communication connection is established with the second device. For example, the first device can display an interface as shown in Figure 5D (h), and a prompt message "Connecting..." is displayed in this interface. After the connection is successful, the first device displays an interface as shown in Figure 5D (i), and this interface includes a prompt message "Please operate on the new device (i.e., the second device)". The second device can display an interface for logging in to an account, for example, an interface for logging in to a system account (such as a Huawei account), and the interface can be an interface as shown in Figure 5D (k), and this interface includes the account information of the first device (such as a mobile phone number), and also includes a prompt message for prompting the second device to log in to the account of the first device, and also includes two buttons "Synchronously log in to this account" and "Set later".
[0137] Figure 5D (k), when the second device receives an operation on the "Synchronously log in to this account" button, it logs in to the account of the first device through the near-field communication connection (the implementation principle will be described later). For example, the second device can display an interface as shown in Figure 5DThe interface of (l), in which a prompt message "Logging in" is displayed. After the second device logs in to the account of the first device through near-field communication, there are multiple ways to obtain the data of this account. Method A: Since the second device has logged in to the account of the first device, the second device can obtain the data of this account from the cloud side. Method B: The second device does not need to obtain data from the cloud side, but receives the data of this account from the first device through near-field communication connection. Method C: Considering that the first device may upload a part of the data to the cloud side and another part of the data is not uploaded to the cloud side. Therefore, the second device can obtain the uploaded data from the cloud side, and for the data not uploaded to the cloud side, it can be obtained from the first device through near-field communication connection. Taking Method B as an example, the second device can obtain all or part of the data of this account from the first device through near-field communication connection, and the part of the data can be the data selected by the user. For example, Figure 5D In (l), after the second device successfully logs in to the account of the first device, it can display Figure 5D The data selection interface of (d), where the user can select data in this interface. When the second device receives an operation on the "Start Migration" button, it sends a start migration instruction to the first device. After receiving the start migration instruction, the first device migrates the data (the data selected by the user) to the second device through near-field communication connection. For example, the first device can display a prompt message such as Figure 5D (j): Data migrating. The second device displays a migration progress such as Figure 5D (e).
[0138] Figure 5D In (k), when the second device receives an operation on the "Set Later" button, since it does not need to log in to the account of the first device, the second device can directly display Figure 5D The data selection interface of (d), where the user can select data in this interface. When the second device receives an operation on the "Start Migration" button, it sends a start migration instruction to the first device. After receiving the start migration instruction, the first device migrates the data (the data selected by the user) to the second device through near-field communication connection. For example, the first device can display a prompt message such as Figure 5D (j): Data migrating. The second device displays a migration progress such as Figure 5D (e).
[0139] The above are several examples of the first interface. It should be understood that the first interface can also be other interfaces, and the embodiments of the present application will not list them one by one. It should be noted that in the first solution, when the second device displays the first interface, there is no requirement for the display interface of the first device. No matter what interface the first device displays (such as the lock screen, black screen, desktop, negative first screen or any other interface), it can achieve automatically pulling up the interface when approaching.
[0140] In the second solution, when the first device displays the second interface (which can also be called the second specific interface), the corresponding interface is automatically pulled up when the two devices are close to each other. When the first device does not display the second interface, the two devices will not pull up the interface when they are close to each other to avoid accidental triggering.
[0141] Taking the first scenario in the previous text (the scenario where the second device logs in to the account) as an example, the first device has logged in to the account, and the second interface can be any interface in the account center of the first device. For example, as Figure 5E (a), the first device displays the desktop. After the first device receives one or more user operations, it displays the interface 401 as shown in Figure 5E (b). Regarding the process of the first device opening the interface 401, it will not be elaborated. The upper right corner of the interface 401 includes a scan button. When the first device receives an operation on the scan button, it displays the interface 200 as shown in Figure 5E (c).
[0142] Optionally, the second interface can be Figure 5E the interface 401 in Figure 5E (b),
[0143] Taking the second interface as Figure 5E the interface 200 in Figure 5E (c) as an example. When the first device displays the interface 200, if the two devices are close to each other, the corresponding interface can be pulled up. For example, as Figure 5E (d), the second device displays the desktop. When the second device detects that the first device is close (the first device is displaying the interface 200), there can be two processing methods. Method A, the second device pops up a prompt box as shown in Figure 5E (f). The prompt box includes a prompt message: whether to log in to the account of the first device, and also includes a "Log in with this account" button. When the second device receives an operation on the confirmation button, it pulls up the interface 100 as shown in Figure 5E (e). Method B, the second device directly pulls up the interface 100 as shown in Figure 5E (e) without popping up the
[0144] Taking the second interface as Figure 5E the interface 401 in Figure 5E (b) as an example. When the first device displays the interface 401, if the two devices are close to each other, the corresponding interface can be automatically pulled up. For example, the first device automatically pulls up the interface 200, as shown in Figure 5E(d), When the second device displays the desktop and detects the approach of the first device (the first device is displaying interface 401), it automatically pulls up interface 100 as shown in Figure 5E (e).
[0145] It should be noted that in the Figure 5E example, taking the second device displaying the desktop as an example, optionally, the second device can also display the lock screen interface, black screen or other interfaces. The other interfaces can be any interfaces that the user enters after unlocking, such as the desktop, negative first screen or application interface.
[0146] Taking the third scenario (data cloning scenario) in the previous text as an example, as Figure 5F (a), the first device displays an interface, which includes two options: "This is the old device" and "This is the new device". Optionally, the process of the first device opening the Figure 5F interface shown in (a) can include: Desktop -> Settings -> System and Updates -> Data Cloning; or, after the first device installs an application for data cloning (such as "Huawei Phone Clone") from the application market, it opens the interface shown in Figure 5F (a). When the first device receives an operation on the "This is the old device" option, it displays interface 402 as shown in Figure 5F (b), or directly displays interface 200 as shown in Figure 5F (c).
[0147] Optionally, the second interface can be Figure 5F interface 402 in (b), Figure 5F interface 200 in (c) or other interfaces. The other interfaces can be other interfaces that the first device may display in response to the operation on "This is the old device".
[0148] Taking the second interface being Figure 5F interface 402 in (b) as an example. When the first device displays interface 402, if the two devices are close, the corresponding interface can be automatically pulled up. For example, as Figure 5F (g), the second device displays the lock screen interface. When the second device detects the approach of the first device (the first device is displaying interface 402), there are two processing methods. Method A, the second device automatically pops up a prompt box as shown in Figure 5F (g). The prompt box includes the device information of the first device and a prompt message. The prompt message is used to prompt that the data of the first device will be cloned to the second device. The prompt box also includes an "OK" button. When the second device receives an operation on the "OK" button, it can pull up Figure 5F interface 100 as shown in (h); or, when the second device receives an operation on the "OK" button, it can prompt the user to perform identity authentication (this process Figure 5F(not shown in the figure) to ensure that the owner of the second device is operating it. For example, the second device can prompt the user to enter an unlocking fingerprint or password. If the verification is passed, the interface 100 as shown in Figure 5F (h) is pulled up. Method B: The second device directly pulls up the interface 100 as shown in Figure 5F (h) without popping up the Figure 5F (g) prompt box, saving operations and simplifying the process. When the first device displays the interface 402, if it detects that the second device is approaching, it can directly pull up the interface 200 as shown in Figure 5F (c); or, when receiving the pull-up instruction sent by the second device, it pulls up the interface 200 as shown in Figure 5F (c). For example, Figure 5F in (g), after the second device receives the operation on the "Confirm" button, it sends a pull-up instruction to the first device. After the first device receives the pull-up instruction, it pulls up the interface 200 as shown in Figure 5F (c). It should be noted that in this example, taking the case where the first device displays the interface 402 and the second device displays the lock screen interface, when the two devices approach, the interface is automatically pulled up. Optionally, the second device can also display other interfaces other than the lock screen interface, such as a black screen, or any interface that the user enters in the unlocked state, such as the desktop, the negative first screen, or the interface of an application.
[0149] Taking the second interface as Figure 5F (c) the interface 200 as an example. When the first device displays the interface 200, if the two devices approach, the corresponding interface can be automatically pulled up. For example, as shown in Figure 5F (g), when the second device displays the lock screen interface and the second device detects that the first device is approaching (the first device is displaying the interface 200), there are two processing methods, namely method A and method B as described above. Since the first device has already displayed the interface 200, when the two devices approach, the first device continues to stay on the interface 200. It should be noted that in this example, taking the case where the first device displays the interface 200 and the second device displays the lock screen interface, when the two devices approach, the interface is automatically pulled up. Optionally, the second device can also display other interfaces other than the lock screen interface, such as a black screen, or any interface that the user enters in the unlocked state, such as the desktop, the negative first screen, or the interface of an application.
[0150] For example, as shown in Figure 5F , after the first device scans the first graphic in the interface 100 of the second device through the scanning interface 200, a near-field communication connection can be established. For example, the first device can display an interface as shown in Figure 5F (d), and a prompt message "Connecting" is displayed in this interface. After the connection is successful, the first device displays an interface as shown in Figure 5FThe interface of (e), which includes a prompt message: Please operate on the new device (i.e., the second device). The second device can display an interface for logging in to an account. For example, an interface for logging in to a system account (e.g., a Huawei account). The interface can be the interface shown in Figure 5F (k). This interface includes the account information of the first device (e.g., a mobile phone number), and also includes a prompt message for prompting the second device to log in to the account of the first device. It also includes two buttons, "Synchronously Log in to This Account" and "Set Later". When the second device receives an operation on the "Synchronously Log in to This Account" button, it logs in to the account of the first device through a near-field communication connection (the implementation principle will be described later). For example, the second device can display an interface such as Figure 5F (l). This interface displays a prompt message "Logging in...". After the second device logs in to the account of the first device through a near-field communication connection, it can obtain the data of this account. For example, it can obtain the data through any one of the methods A to C described above. Taking method B as an example, after the second device successfully logs in to the account of the first device, it can display Figure 5F (i)'s data selection interface, where the user can select data. When the second device receives an operation on the "Start Migration" button, it sends a start migration instruction to the first device. After the first device receives the start migration instruction, it migrates the data (the data selected by the user) to the second device through a near-field communication connection. For example, the first device can display a prompt message such as Figure 5F (f): Data migrating. The second device displays a migration progress such as Figure 5F (j). In Figure 5F (k), when the second device receives an operation on the "Set Later" button, since there is no need to log in to the account of the first device, the second device can directly display Figure 5F (i)'s data selection interface, and then perform data migration. The principle is as described above and will not be repeated here.
[0151] The above are several examples of the second interface. It should be understood that the second interface can also be other interfaces, and the embodiments of the present application will not list them one by one. It should be noted that in the second solution, when the first device displays the second interface, there is no requirement for the display interface of the second device. No matter what interface the second device displays (such as a lock screen interface, a black screen, a desktop, a negative first screen, or any other interface), it can achieve automatically pulling up the interface when approaching.
[0152] The third solution is that when the two devices are close to each other, it is judged whether the conditions are met. If the conditions are met, the corresponding interface is pulled up; otherwise, the interface is not pulled up. In this solution, the condition judgment can be executed by any one of the two devices; or, the two devices can also perform the condition judgment separately. As mentioned above, when the two devices are close to each other and the interface is automatically pulled up, it can include three methods, namely Method A to Method C. If Method A is adopted, the second device performs the condition judgment. If Method B is adopted, the first device performs the condition judgment. If Method C is adopted, the two devices perform the condition judgment separately. When the two devices perform the condition judgment separately, the judgment conditions corresponding to each device can be the same or different. The following takes Method A as an example for illustration, that is, when the second device detects that the first device is close, it judges whether the conditions are met. If the conditions are met, the interface 100 is automatically displayed, and the first device is triggered to display the interface 200. Optionally, the conditions may include at least one of the following:
[0153] Condition a: The second operating system of the second device is the same as the first operating system of the first device. For example, both are HarmonyOS.
[0154] Condition b: No account is logged in to the second operating system of the second device.
[0155] Condition c: An account is currently logged in to the first operating system of the first device. In this way, the second device needs to judge whether an account is logged in to the first operating system of the first device. A possible method is that the second device sends a query request (for example, via Bluetooth) to the first device to request to query whether an account is logged in to the first operating system of the first device. After the second device receives the query response returned by the first device, it determines whether an account is logged in to the first operating system of the first device based on the query response. Optionally, the query response may include the account information of the account currently logged in to the first operating system of the first device, such as the account name, avatar, etc. The account name can be the mobile phone number, email of the registered account, and of course, it can also be the nickname set by the user, etc.
[0156] Condition d: The first account is not logged in to the second operating system of the second device, and the first account is the account currently logged in to the first operating system of the first device. In this way, the second device needs to determine the currently logged-in account (i.e., the first account) of the first operating system of the first device, and then judge whether the first account is logged in to the second operating system of the second device. The method for the second device to determine the currently logged-in account of the first operating system of the first device can refer to the relevant description of Condition c, and will not be repeated here.
[0157] Condition e: The second device outputs a prompt message to prompt whether to log in to the first account of the first device, and the second device receives a confirmation instruction for confirming the device account for logging in to the first device. Optionally, in response to the approach of the second device, the first device can also output a prompt message to prompt whether to agree to authorize the second device to log in to the first account; if the first device receives an approval instruction, it pulls up a QR code scanning interface. In this way, after the two devices approach, the interface is pulled up only with the user's consent, avoiding directly pulling up the interface when the two devices approach and affecting the user experience.
[0158] The above three solutions can be used alone or in combination. Taking the combination of the first solution and the second solution as an example, when the second device displays the first interface and the first device displays the second interface, the two devices approach and automatically pull up the corresponding interfaces. The above three solutions are listed, and all can avoid mis-triggering. It should be understood that there can be other solutions to prevent mis-triggering, and the embodiments of the present application will not list them one by one.
[0159] In the above text, the two devices approaching can automatically pull up the interface, simplifying the user operation steps. However, in actual use, the user may not be aware that the two devices have the function of automatically pulling up the interface when approaching, and thus may not use this function well. To guide the user, a possible solution is that the first device and / or the second device can output guiding information to guide the user on how to operate and improve the user experience.
[0160] Taking the second device outputting guiding information (which can be called the first guiding information) as an example, as Figure 6A (a), the second device displays interface 600, and the guiding information is included in interface 600: Please bring another device closer to log in to the account of another device. According to the guiding information, the user brings the first device closer to the second device. As Figure 6A (b), when the first device displays the desktop or other interfaces outside the desktop (the other interfaces can include, for example, the lock screen, black screen, negative first screen, or any interface entered after unlocking), it approaches the second device. When the first device detects the approach of the second device, there are two processing methods. Method A: The first device pops up a prompt box as shown in Figure 6A (f). The prompt box includes the account information of the first device (for example, the mobile phone number), and also includes a prompt message for prompting that the account of the first device will be logged in on the second device. The prompt box also includes a "Log in with this account" button. When the first device receives an operation on the "Log in with this account" button, it pulls up interface 200 as shown in Figure 6A (d). Method B: The first device directly pulls up interface 200 as shown in Figure 6A (d). When the second device detects the approach of the first device, it can directly pull up interface 200 as shown in Figure 6AThe interface 100 in (c), or when receiving a pull-up instruction sent by the first device, pull up as Figure 6A the interface 100 in (c). For example, Figure 6A in (f), after the first device receives an operation on the "Log in with this account" button, it sends a pull-up instruction to the second device. After receiving the pull-up instruction, the second device pulls up as Figure 6A the interface 100 in (c). It should be noted that Figure 6A in (a), the embodiment of the present application does not limit the way for the second device to open the interface 600. For example, in the previous text Figure 5B in the interface 300 in (b), there is a button (for example, a near-field login button). When the button is triggered, the interface 600 is opened.
[0161] Taking the first device outputting guidance information (which can be called the second guidance information) as an example, as Figure 6B (a), the first device displays the interface 700, and the interface 700 includes guidance information: Please get closer to another device to authorize it to log in to this account. The user gets the second device closer to the first device according to the guidance information. As Figure 6B (b), when the second device displays the desktop or other interfaces outside the desktop (the other interfaces can include, for example, the lock screen, the black screen, the negative first screen, or any interface entered after unlocking), it gets closer to the first device. When the first device detects that the second device is getting closer, there are two processing methods. Method A, the first device pops up a prompt box as shown in Figure 6B (f). The prompt box includes the account information of the first device (for example, the mobile phone number), and also includes a prompt message for prompting that the account of the first device will be logged in on the second device. The prompt box also includes a "Log in with this account" button. When the first device receives an operation on the "Log in with this account" button, it pulls up as Figure 6B the interface 200 in (d). Method B, the first device directly pulls up as Figure 6B the interface 200 shown in (d). When the second device detects that the first device is getting closer, it can directly pull up as Figure 6B the interface 100 in (c), or when receiving a pull-up instruction sent by the first device, pull up as Figure 6B the interface 100 in (c). For example, Figure 6B in (f), after the first device receives an operation on the "Log in with this account" button, it sends a pull-up instruction to the second device. After receiving the pull-up instruction, the second device pulls up as Figure 6B the interface 100 in (c). It should be noted that Figure 6B in (a), the embodiment of the present application does not limit the way for the first device to open the interface 700.
[0162] In the above solution, when the first operating system of the first device has logged in to the first account, the first device and the second device are brought close to each other to automatically pull up the corresponding interface, and then the second operating system of the second device logs in to the first account by scanning the code for login. There is a possible situation: there are multiple accounts corresponding to the first operating system of the first device. For example, the multiple accounts are the accounts that the first operating system has logged in to before, and the first account is the currently logged-in account among the multiple accounts. Or, there is an association relationship among the multiple accounts. For example, the multiple accounts belong to family-associated accounts. For example, the first account is an adult account, and the other accounts are child accounts corresponding to the adult account.
[0163] When there are multiple accounts for the first operation of the first device, the user can select one of the accounts so that the second operating system of the second device logs in to the account selected by the user. Optionally, when the user selects an account, the user can select on the first device or on the second device.
[0164] Taking the selection on the first device as an example, for example, as Figure 7A (a), the second device displays interface 600, or it can also display other interfaces or a black screen. As Figure 7A (b), the first device displays the desktop or other interfaces outside the desktop. When the first device and the second device are brought close to each other, the second device automatically pulls up interface 100 as shown in Figure 7A (c). The first device automatically pulls up an interface as shown in Figure 7A (d). This interface includes the identifiers of multiple accounts (for example, mobile phone numbers, avatars, etc.). The user can select a certain account. For example, the user can select an account by swiping left or right. When the first device receives an operation on the "Log in with this account" button, it displays interface 200 as shown in Figure 7A (e). At this time, when the first device scans the first graphic in interface 100 of the second device through interface 200, it can authorize the second device to log in to the account selected by the user.
[0165] Taking the selection on the second device as an example, for example, as Figure 7B (a), the second device displays interface 600, or it can also display other interfaces. The other interfaces can be the lock screen, black screen, desktop, negative first screen, or any interface entered after unlocking. As Figure 7B (b), the first device displays the desktop or other interfaces outside the desktop. The other interfaces can be the lock screen, black screen, negative first screen, or any interface entered after unlocking. When the first device and the second device are brought close to each other, the second device automatically pulls up an interface as shown in Figure 7BThe interface of (c), which includes the identifiers of multiple accounts of the first device, and the user can select a certain account. In this way, the second device needs to determine which accounts the first device corresponds to. For example, it can query which accounts the first device corresponds to by means of Bluetooth broadcast query information. When the second device receives an operation on the "Log in with this account" button, it displays the interface 100 as shown in Figure 7B (d). The second device can notify the first device of the account selected by the user. After the first device determines the account selected by the user, there are two ways. Way A, the first device pops up a prompt box as shown in Figure 7B (f). The prompt box includes the account information selected by the user (such as the mobile phone number), and also includes a prompt message for prompting that the account will be logged in on the second device. The prompt box also includes a "Log in with this account" button. When the first device receives an operation on the "Log in with this account" button, it displays the interface 200 as shown in Figure 7B (e). Way B, the first device directly displays the interface 200 as shown in Figure 7B (e). At this time, when the first device scans the first graphic in the interface 100 of the second device through the interface 200, it can authorize the second device to log in to the account selected by the user.
[0166] The above embodiments illustrate the process of the second device opening the interface 100 and the first device opening the interface 200. It should be understood that after the second device opens the interface 100 and the first device opens the interface 200, the scan code login can be performed.
[0167] The following will continue to describe the implementation principle of the scan code login in combination with the drawings.
[0168] As described above, there are two ways to generate the first graphic. When the first graphic is generated in different ways, the corresponding login processes are different. For example, if the first graphic is generated in the second way (i.e., the first graphic is used to establish a near-field communication connection), the corresponding Figure 8 、 Figure 9 or Figure 10 shown login process. If the first graphic is generated in the first way, it can correspond to the login process shown in Figure 11A . The following will be described separately.
[0169] Taking the second device generating the first graphic in the second way as an example, that is, the first graphic is used to establish a near-field communication connection, then the second device can realize password-free login of the account based on the near-field communication connection. Among them, the second device realizing password-free login of the account based on the near-field communication connection can at least include the following three schemes.
[0170] The first scheme
[0171] Please refer to Figure 8, which is another schematic flow diagram of the account login method provided by an embodiment of the present application. This process can be applied to Figure 1 , Figure 2 , Figure 3B , Figures 5A to 5F shown scenarios. As Figure 8 , the process may include:
[0172] S800, the first device logs in to the first account.
[0173] Taking the first device in the system shown in Figure 1 as an example, when the first device logs in to the first account, that is, the first device logs in to the cloud side through the first account, for example, logs in to the first server in the cloud side. Taking the example that the user inputs the account information and password information of the first account on the first device for login, S800 may include four sub-steps, namely S800a, S800b, S800c, and S800d. S800a, the first device receives an input operation, and the input operation is used to input the account information and password information of the first account. The account information is, for example, the account name. The account name can be the mobile phone number, email of the registered account, and of course, it can also be the nickname set by the user, etc. The password information can be the login password set by the user. For example, it is a combination of one or more of numbers, letters, and symbols. S800b, the first device sends a login request to the cloud side to request to log in to the first account. The login request may include the account information and password information of the first account. S800c, the cloud side verifies the first account according to the login request. Verifying the first account may include: verifying the correctness of the account information and password information of the first account. For example, the cloud side compares the account information and password information carried in the login request with the stored account information and password information. If they are consistent, the verification passes; otherwise, the verification fails. After the verification passes, S800d is executed. The cloud side sends the first login credential to the first device. Correspondingly, the first device receives the first login credential sent by the cloud side. The first login credential can be understood as the identity credential issued by the cloud side for the first device, representing that the first device has logged in successfully. After that, the first device can use the first login credential to access the data of the cloud side. For example, when the first device needs to access data, it can send a data access request to the cloud side and carry the first login credential in the data access request. After the cloud side receives the data access request, it verifies the identity of the first device based on the first login credential carried in the data access request. After the verification passes, it returns the data to the first device. Among them, the cloud side verifying the identity of the first device based on the first login credential carried in the data access request may include: comparing the first login credential carried in the data access request with the login credential locally stored by the cloud side. If they are consistent, the verification passes; otherwise, the verification fails.
[0174] Exemplarily, the first login credential may be a token.
[0175] Optionally, the first login credential may remain unchanged. Of course, to ensure data security, the first login credential may also be dynamically changed. For example, the server may update the first login credential at a certain period and send the updated first login credential to the first device so that the first device can use the latest first login credential to access data. The period may be one week, 15 days, one month, or of course, one day, two days, etc. The embodiments of the present application do not make any limitation. In other words, the first login credential has a validity period, and it is valid within the specified time period and invalid outside the specified time period. Therefore, once the first login credential is stolen, it cannot be used as long as it exceeds the validity period, which can avoid the persistence of data leakage to a certain extent.
[0176] It should be noted that, as can be seen from the four sub-steps of S800, the first login credential is different from the password of the first account. The first login credential is an identity credential issued by the cloud side to the first device after verifying the account information and password information of the first account. After that, the first device can access data based on the first login credential, and when accessing data, it does not need to carry the account information and password information, thus avoiding password leakage. In addition, generally speaking, the password of the first account remains unchanged unless the user modifies the password, but the first login credential can be dynamically changed and has a validity period. For the principle, please refer to the foregoing.
[0177] S801. The second device displays a first interface. The first interface may be the first interface in the first scenario (i.e., the scenario of logging in to an account) described above, that is Figure 5B interface 301 in (b), Figure 5B interface 302 in (c), Figure 5B interface 100 in (d); or, it may also be the first interface in the second scenario (OOBE scenario) described above, such as Figure 5C interface 303 in (c), Figure 5C interface 304 in (d), Figure 5C interface 305 in (e), Figure 5C interface 100 in (f); or, it may also be the first interface in the third scenario (data cloning scenario) described above, such as Figure 5D interface 306 in (b), Figure 5D interface 100 in (c), etc. Optionally, S801a may or may not be executed, so it is represented by a dashed line in the figure.
[0178] S802. The second device and the first device are brought close to automatically pull up an interface, where the second device is not logged in to the first account.
[0179] Optionally, S802 may include S802a to S801e.
[0180] S802a, the second device broadcasts a request signal, and the request signal is a short - range communication signal, such as a Bluetooth signal; when the first device is close to the second device (e.g., within 30 cm), it will receive the request signal. For the three different application scenarios mentioned above, the content requested by the request signal may be different. Taking the first scenario (i.e., the scenario of logging in to an account) as an example, when the second device displays the first interface ( Figure 5B (interface 301 of (b), Figure 5B (interface 302 of (c) or Figure 5B (interface 100 of (d)), it broadcasts a request signal, and the request signal is used to request assistance in logging in to the account. Taking the second scenario (OOBE scenario) as an example, when the second device displays the first interface ( Figure 5C (interface 303 of (c), Figure 5C (interface 304 of (d), Figure 5C (interface 305 of (e) or Figure 5C (interface 100 of (f)), it broadcasts a request signal, which is used to request assistance in logging in to the account. Taking the third scenario (data cloning scenario) as an example, when the second device displays the first interface ( Figure 5D (interface 306 of (b), Figure 5D (interface 100 of (c)), it broadcasts a request signal, which is used to request data migration.
[0181] S802b, the first device outputs a prompt message to prompt whether to agree to the content requested by the request signal. Taking the first scenario as an example, after the first device receives the request signal, it displays a prompt box as shown in Figure 5B (f), and the prompt box includes a "Log in with this account" button. Taking the second scenario as an example, after the first device receives the request signal, it displays a prompt box as shown in Figure 5C (g), and the prompt box includes a settings button. Taking the third scenario as an example, after the first device receives the request signal, it displays a prompt box as shown in Figure 5D (f), and the prompt box includes a confirmation button.
[0182] S802c, when the first device receives an approval operation, it sends an approval signal to the second device. Taking the first scenario as an example, after the first device displays the prompt box as shown in Figure 5B (f), and receives an operation on the "Log in with this account" button, it sends an approval signal to the second device. Taking the second scenario as an example, after the first device displays the prompt box as shown in Figure 5C (g), when it receives an operation on the settings button, it sends an approval signal to the second device. Taking the third scenario as an example, after the first device displays the prompt box as shown in Figure 5DAfter the prompt box shown in (f), when an operation on the confirmation button is received, send an approval signal to the second device.
[0183] Optionally, S802b to S802c may or may not be executed, so they are shown as dashed lines in the figure. If not executed, directly execute S801d and S801e after S801a.
[0184] S802d, the second device displays a first graphic. The first graphic is generated based on a second code value and is used to establish a near-field communication connection. For the second code value, please refer to the previous description. Exemplarily, the first graphic may be the Figure 5B interface 100 in (d), or Figure 5C interface 100 in (f), or Figure 5D the HarmonyOS ring in interface 100 in (c).
[0185] S802e, the first device displays a code scanning interface. Exemplarily, the code scanning interface may be the Figure 5B interface 200 in (g), Figure 5C interface 200 in (h), or Figure 5D interface 200 in (g).
[0186] S803, the first device scans the first graphic to establish a near-field communication connection.
[0187] Since the first graphic is generated based on the second code value, when the first device scans the first graphic, it can obtain the second code value, and a near-field communication connection can be established based on the second code value. A possible implementation is that the first device sends a near-field communication connection request to the second device, and the request includes the second code value. After receiving the request, the second device can verify the first device. After the verification passes, it sends an indication of consent to connect to the first device to complete the near-field communication connection. Among them, one way for the second device to verify the first device is that the second device compares the second code value carried in the request with the second code value stored locally. If they are the same, the verification passes; otherwise, the verification fails. Optionally, the near-field communication connection request may also include the service ID of the second device. The service ID may be created by the second device. For example, the second device broadcasts a signal that includes the service ID. After the first device receives the signal, the first device obtains the service ID in the signal, and then sends the second code value and the service ID together in the near-field communication connection to the second device. After receiving the near-field communication connection request, the second device verifies the first device. For example, the second device compares the second code value carried in the near-field communication connection request with the second code value stored locally, and compares the service ID carried in the near-field communication connection request with the service ID stored locally. If both are the same, the verification passes; otherwise, the verification fails.
[0188] Optionally, to ensure data security, the data transmitted through the near-field communication connection can be encrypted using a session key. For example, the second device generates a session key and synchronizes the session key to the first device. In this way, when the first device and the second device transmit data through the near-field communication connection, the session key can be used for encryption to prevent data leakage.
[0189] S804, the second device obtains a first code value from the cloud side.
[0190] It should be noted that the execution order between S804 and S802 - S803 is not limited.
[0191] S805, the second device sends a first request to the first device through the near-field communication connection. The first request is used to request to log in to the account of the first device. For example, the first request may include the first code value.
[0192] S806, the first device sends an authorization login request to the cloud side, which is used to request authorization for the second device to request to log in to the first account.
[0193] Optionally, the authorization login request may include at least one of the following information:
[0194] (1) The first login credential. For the first login credential, please refer to the previous description.
[0195] (2) The first code value. For the first code value, please refer to the previous description.
[0196] (3) Information related to the first account. The information related to the first account may include the account information of the first account. Optionally, it may also include the password information of the first account. For the account information and password information of the first account, please refer to the previous description.
[0197] (4) Device information of the first device. The device information of the first device may include the device type, device model, etc. of the first device.
[0198] (5) Device information of the second device. The device information of the second device may include the device type, device model, etc. of the second device.
[0199] S807, the cloud side verifies according to the authorization login request.
[0200] Optionally, S807 may include: the cloud side verifies at least one of the first account, the first device, and the second device. Among them, when the cloud side verifies the first account, it may include: verifying the correctness of the account information and password information of the first account, which has been described in the previous section S800 and will not be repeated here. When the cloud side verifies the first device, it may include: verifying the identity of the first device. For example, the authorization login request includes a first login credential. The cloud side compares the first login credential carried in the authorization login request with the stored login credential of the first device. If they are the same, the verification passes; otherwise, the verification fails. For another example, the authorization login request includes the device information of the first device. The cloud side matches the device information of the first device carried in the authorization login request with the device information corresponding to the stored first account. If they are the same, the verification passes; otherwise, the verification fails. When the cloud side verifies the second device, it may include verifying the identity of the second device. For example, the authorization login request includes a first code value. As described above, the first code value is the verification information applied by the second device to the cloud side for scanning code login. The cloud side may determine whether the first code value carried in the authorization login request is the code value sent by the cloud side to the second device and / or whether it is within the validity period. If so, the verification passes; otherwise, the verification fails. The validity period may be the validity period of the code value specified by the cloud side, such as 30 seconds, 50 seconds, etc. For another example, the authorization login request includes the device information of the second device. The cloud side matches the device information of the second device carried in the authorization login request with the device information corresponding to the stored first account. If they are the same, the verification passes; otherwise, the verification fails.
[0201] S808, the cloud side sends a second login credential to the second device.
[0202] In the first solution (i.e., Figure 8 the solution shown), the first device requests the cloud side to authorize the second device to log in to the first account. For the cloud side, since the authorization login request is sent by the first device, the cloud side will consider that the first device has agreed to authorize the second device to log in to the first account. Therefore, the cloud side does not need to perform secondary verification (which will be described later), saving the processing flow.
[0203] The second solution
[0204] In the first solution (i.e., Figure 8 the solution shown), the first device sends an authorization login request to the cloud side. This requires the first device to be in an online state. If the first device is not online, it cannot send an authorization login request to the cloud side, that is, it cannot assist the second device to log in to the first account. Different from the first solution, in the second solution, when the first device is in a network-free state, it can also assist the second device to log in to the first account.
[0205] For example, please refer to Figure 9 , which is another schematic flowchart of the account login method provided by an embodiment of this application. This process can be applied to Figure 1 , Figure 2 , Figure 3B , [[ID=2 shown scenarios. As , the process may include:
[0206] S900, the first device logs in to the first account.
[0207] It should be noted that the implementation principle of S900 is the same as that of S800 in the previous text . For example, S900 may also include four sub-steps ( not shown), which have been described in detail in the previous text and will not be repeated here.
[0208] S901, the second device displays the first interface. Please refer to the previous description for the first interface.
[0209] S902, when the second device gets close to the first device, the interface is automatically pulled up. Among them, the second device has not logged in to the first account.
[0210] As described above, when the two devices get close, the second device pulls up the first graphic. The first graphic is generated based on the second code value and is used to establish a near-field communication connection. The second device pulls up the scanning code interface. It should be noted that the implementation principle of S902 is the same as that of S802 in the previous text . For example, S902 may also include five sub-steps ( not shown). Since has been described in detail, it will not be repeated here.
[0211] S903, the first device scans the first graphic to establish a near-field communication connection.
[0212] It should be noted that for the process of the first device establishing a near-field communication connection with the second device, please refer to S803 in the previous text , which will not be repeated here.
[0213] S904, the first device sends the account information and password information of the first account to the second device through the near-field communication connection.
[0214] S905, the second device sends a login request to the cloud side. The login request includes the account information and password information of the first account.
[0215] S906, the cloud side verifies according to the login request.
[0216] Optionally, S906 may include: the cloud side verifies the correctness of the account information and password information of the first account. For example, the cloud side compares the account information and password information carried in the login request with the stored account information and password information. If they are consistent, the verification passes; otherwise, the verification fails.
[0217] S907, the cloud side sends a second login credential to the second device.
[0218] In the second solution (i.e., the solution shown), the first device sends the account information and password information of the first account to the second device through a near-field communication connection. After receiving the account information and password information, the second device logs in to the first account. In this solution, the first device does not need to send an authorization login request to the cloud side, so the first device can be in a network-free state. Therefore, this solution breaks the limitation that the old device (i.e., the first device) must be connected to the network to assist the new device (i.e., the second device) in logging in to the account.
[0219] The third solution
[0220] In the second solution (i.e., the solution shown), the first device needs to send the account information and password information of the first account to the second device, which easily leads to password leakage. Once the password is leaked, the first account will be occupied by others and it is difficult to retrieve. Different from the second solution, in the third solution, the first device does not need to send the password to the second device and can still assist the second device in logging in to the first account, reducing the possibility of password leakage. Moreover, the third solution can also be used when the first device is in a network-free state.
[0221] For example, please refer to , which is another schematic flowchart of the account login method provided by an embodiment of the present application. This process can be applicable to , , , shown scenarios. As , the process may include:
[0222] S1000, the first device logs in to the first account.
[0223] It should be noted that the implementation principle of S1000 is the same as that of S800 in the previous text . For example, S1000 may also include four sub-steps ( not shown in the figure), which have been described in detail in the previous text and will not be repeated here.
[0224] S1001, the first device agrees on a first secret key with the cloud side.
[0225] Optionally, when the first device is in an online state, it can agree on a first key with the cloud side.
[0226] S1002, the second device displays a first interface. For the description of the first interface, please refer to the previous description.
[0227] S1003, when the second device gets close to the first device, an interface is automatically pulled up. Among them, the second device is not logged in to the first account.
[0228] As described above, when the two devices get close, the second device pulls up a first graphic. The first graphic is generated based on a second code value and is used to establish a near-field communication connection. The second device pulls up a scanning code interface. It should be noted that the implementation principle of S1003 is the same as that of S802 described above. For example, S1003 can also include five sub-steps ( not shown in the figure), since it has been described in detail above and will not be repeated here.
[0229] S1004, the first device scans the first graphic to establish a near-field communication connection.
[0230] It should be noted that for the process of the first device establishing a near-field communication connection with the second device, please refer to S803 described above and will not be repeated here.
[0231] S1005, the second device obtains a first code value from the cloud side.
[0232] S1006, the second device sends a first request to the first device through the near-field communication connection. The first request is used to request to log in to the account of the first device. For example, the first request includes the first code value. For the description of the first code value, please refer to the previous description.
[0233] Optionally, S1005 and S1006 can be executed or not, so it is represented by a dotted line in the figure.
[0234] Optionally, the implementation principles of S1002 to S1006 are the same as those of S801 to S805 described above and will not be repeated here.
[0235] S1007, the first device encrypts the first data using the first key.
[0236] In some embodiments, the first data includes a first login credential of the first device. For the description of the first login credential, please refer to the previous description. Optionally, the first data may further include other information, such as device information of the first device, account information of the first account, the first code value, etc. To prevent password leakage, the first data does not contain the login password of the first account.
[0237] S1008. The first device sends the encrypted first data to the second device through near-field communication connection.
[0238] S1009. The second device sends a login request to the cloud side to request to log in to the first account. The login request includes the encrypted first data.
[0239] S1010. The cloud side uses the first key to decrypt the encrypted first data.
[0240] S1011. The cloud side performs verification according to the login request. Regarding S1011, please refer to S906 in it, which will not be repeated here.
[0241] It should be noted that in, S1001, S1007, and S1010 may not be executed, so in these three steps are represented by dashed lines. In addition, in S1001, in addition to agreeing on the first key between the first device and the cloud side, a key ID is also agreed. The key ID is used to indicate the first key. In this way, after the first device encrypts the first data using the first key in S1007, the key ID and the encrypted first data can be sent to the second device together. The second device carries the key ID and the encrypted first data in the login request and sends them to the cloud side. The cloud side can first determine the first key according to the key ID, and then use the first key to decrypt the encrypted first data. In this way, the cloud side can efficiently find the first key according to the key ID.
[0242] S1012. The second device receives the prompt information sent by the cloud side, which is used to prompt that the first device needs to perform network authentication.
[0243] It should be understood that in the previous text, the login request sent by the second device to the cloud side includes the first login credential of the first device. The cloud side may suspect that the second device has stolen the first login credential of the first device. For the sake of security, the cloud side can perform secondary verification (i.e., S1012 - S1014), that is, verify whether the first device agrees to authorize the second device to log in to the first account. Optionally, S1012 - S1014 can be executed or not, so in is represented by a dashed line.
[0244] Optionally, before S1012, it may further include: the cloud side determines whether the first device is in an online state. If it is determined that the first device is in an offline state, then S1012 is executed. If it is determined that the first device is in an online state, a prompt message is sent to the first device to prompt whether the first device agrees to authorize the second device to log in to the first account. Optionally, after receiving the prompt message, the first device may output the prompt message. Optionally, a corresponding display component may also be displayed. The display component may include buttons (such as an agree button and a reject button) or others. When the first device receives an operation on the agree button, an instruction to agree to authorize is sent to the cloud side. After receiving the instruction, the cloud side sends a second login credential to the second device.
[0245] S1013, the second device sends a prompt message to the first device through a near-field communication connection.
[0246] In the embodiment of the present application, after receiving the prompt message from the cloud side, the second device may send the prompt message to the first device through a near-field communication connection. The first device may output the prompt message. Optionally, a corresponding display component may also be displayed. The display component may include buttons (such as an agree button and a reject button) or others.
[0247] S1014, the first device performs network authentication.
[0248] After the first device outputs the prompt message, the user sees the prompt message and can connect the first device to the network. A possible way is that after the first device detects the network connection, it actively sends authentication information to the cloud side to indicate confirmation of agreeing to authorize the second device to log in to the first account. After receiving the authentication information, the cloud side sends a second login credential to the second device. Another possible way is that the cloud side can continuously (such as every 5 s) send a prompt message to the first device. After the first device is connected to the network, it can receive the prompt message sent by the cloud side. Then the first device can output the prompt message and can also display a corresponding display component. After the first device receives an operation on the agree button, it sends an instruction to agree to authorize to the cloud side. After receiving the instruction, the cloud side sends a second login credential to the second device.
[0249] S1015, the cloud side sends a second login credential to the second device.
[0250] Compare and . In, the first device sent the account information and password information of the first account to the second device through a near-field communication connection. In this way, the second device can use the account information and password information to request to log in to the first account from the cloud side. In this way, for the cloud side, the second device logs in based on the account information and password information, which belongs to independent login. In this case, the first device sends the first data to the second device via a near-field communication connection. The first data includes the first login credential of the first device. The login request sent by the second device to the cloud side includes the first data. For the cloud side, the first login credential originally issued to the first device appears in the login request of the second device. The cloud side will consider that the second device is proxying the first device to log in to the first account, which belongs to proxy login. Therefore, and are two different login processes. It should be noted that, in this case, when the first device sends the first login credential to the second device via a near-field communication connection, there is a certain risk of leakage. However, since the first login credential has a time limit, once it is stolen, it cannot be used as long as it exceeds the validity period. In this way, the password is not leaked, so the first account will not be occupied by others. Compared with the situation of password leakage, to a certain extent, the continuous data leakage can be avoided.
[0251] In the above embodiments, three schemes for realizing passwordless login of the second device based on near-field communication connection are listed. The system (for example, the communication system shown) can use any one of the three schemes, or can also select one of the schemes according to the actual situation. Optionally, the selection methods include the following.
[0252] Method A: The first device can determine whether it is currently connected to the network. If it is connected to the network, it can use the first scheme. If it is not connected to the network, it can use the second scheme or the third scheme.
[0253] Method B: As mentioned above, the first login credential has a time limit. Therefore, the first device can determine whether the first login credential has expired. If it has expired, it can use the first scheme or the second scheme. If the first login credential has not expired, it can use the third scheme. A possible scenario is that the first device has not been connected to the network for a long time. Although the cloud side has updated the first login credential, since the first device has not been connected to the network all the time, the cloud side cannot synchronize the latest first login credential to the first device, resulting in the expiration of the first login credential. In this case, the first device can use the first scheme or the second scheme.
[0254] The above Method A and Method B can be used alone or in combination. Taking the combined use as an example, the first device uses Method A to determine to use the second scheme or the third scheme (that is, the first device is not connected to the network). Further, the first device uses Method B to determine to use the third scheme (the first login credential has not expired).
[0255] As mentioned above, when the first operation of the first device has multiple accounts, the user can select one of the accounts so that the second operating system of the second device logs in to the account selected by the user. In this case, the above Among them, the account information included in the login request (or the authorized login request) is the account information of the account selected by the user.
[0256] In the foregoing , taking the second device generating the first graphic in the second way (that is, the first graphic is used to establish a near-field communication connection) as an example. If the second device generates the first graphic in the first way (that is, generates the first graphic based on the first code value), the shown login process can be used. As , it is another schematic flowchart of the account login method provided by an embodiment of the present application. This process can be applicable to , , shown scenarios. As , the process may include:
[0257] S1100, the first device logs in to the first account.
[0258] Optionally, the implementation principle of S1100 is the same as that of S800 in
[0259] S1101, the second device displays the first interface. As (a), the second device displays the desktop. After the second device receives one or more user operations, it displays the interface 1101 as shown in (b). The interface 1101 includes a "scan code to log in" button. When the second device receives an operation on the "scan code to log in" button, it displays the interface 1102 as shown in (c), or directly displays the interface 100 as shown in (d). The interface 100 includes a first graphic, and the first graphic is generated based on the first code value, and the first code value is obtained by the second device from the cloud side. The first interface may be (c)'s interface 1102, or (d)'s interface 100.
[0260] S1102, when the first device and the second device are close to each other, the interface is automatically pulled up. Among them, the second device has not logged in to the first account.
[0261] Optionally, S1102 may include S1102a to S1102e.
[0262] S1102a, the second device broadcasts a request signal, and the request signal is a short-range communication signal, such as a Bluetooth signal. If the first device is close to the second device (for example, within 30 cm), it will receive the request signal. The request signal is used to request to log in to the account of the first device. For example, as (e) When the first device displays the desktop, it receives a request signal from the second device. Optionally, the first device can also display other interfaces other than the desktop, such as the lock screen interface, the black screen, the negative first screen, the interface of a certain application, or any interface entered after the first device is unlocked.
[0263] S1102b, The first device outputs a prompt message to prompt whether to agree to the second device to log in to the account of the first device. For example, (e) When the first device displays the desktop, it receives a request signal from the second device, and then displays (f) The prompt box shown. The prompt box includes a prompt message asking whether to agree to the second device to log in to this account. The prompt box can also include a "Log in with this account" button.
[0264] S1102c, When the first device receives an approval operation, it sends an approval signal to the second device. For example, (f) The first device receives an operation on the "Log in with this account" button and sends an approval signal to the second device.
[0265] Optionally, S1102b to S1102c can be executed or not executed, so they are represented by dashed lines in the figure. If not executed, that is, directly execute S1102d and S1102e after S1102a.
[0266] S1102d, The second device displays a first graphic. The first graphic is generated based on a first code value, and the first code value is obtained from the cloud side. For the first code value, please refer to the previous description. Exemplarily, the first graphic is, for example The HarmonyOS ring in the interface 100 of (d).
[0267] S1102e, The first device displays a scanning code interface. Exemplarily, the scanning code interface can be Figure 11B The interface 200 in (g).
[0268] S1103, The first device scans the first graphic to obtain the first code value.
[0269] One possible way is that the first device obtains the image of the first graphic by means of scanning, and then parses the first code value by itself according to the image of the first graphic. Another possible way is that the first device obtains the image of the first graphic by means of scanning, and then sends the image to the cloud side (for example, the second server), uses the cloud side to parse the first code value, and then returns the first code value to the first device.
[0270] S1104, The first device sends an authorization login request to the cloud side. The authorization login request is used to indicate authorizing the second device to request to log in to the first account.
[0271] S1105, the cloud side performs verification based on the authorized login request.
[0272] S1106, the cloud side sends a second login credential to the second device.
[0273] Optionally, the principles of S1104 to S1106 are the same as those of Figure 8 S806 to S808 in
[0274] Figure 12A Another process schematic diagram of the account login method provided by an embodiment of this application. This process can be applied to the first scenario in the foregoing (i.e., Figure 5B ) or the second scenario (i.e., Figure 5C ). As Figure 12A , the process includes:
[0275] S1200, the first device logs in to the first account. The implementation principle of S1200 is the same as that of Figure 8 S800 in
[0276] S1201, the second device displays a first interface. Optionally, the first interface is an interface used by the second device to log in to an account. Taking the first scenario in the foregoing (i.e., Figure 5B the scenario of logging in to an account) as an example, the first interface can be Figure 5B interface 301 in (b), Figure 5B interface 302 in (c), Figure 5B interface 100 in (d). Taking the second scenario in the foregoing (i.e., Figure 5C the OOBE scenario) as an example, the first interface can be Figure 5C interface 303 in (c), Figure 5C interface 304 in (d), Figure 5C interface 305 in (e), Figure 5C interface 100 in (f). Taking the third scenario in the foregoing (i.e., Figure 5D the data cloning scenario) as an example, the first interface can be Figure 5D interface 306 in (b), Figure 5D interface 100 in (c).
[0277] S1202, the first device and the second device automatically pull up an interface when they get close.
[0278] For example, in response to detecting that the second device is approaching, the first device displays a scanning code interface. Optionally, before pulling up the scanning code interface, the first device can display any interface, such as a lock screen, black screen, desktop, negative first screen, or application interface, etc.
[0279] Optionally, in response to detecting the proximity of the second device, the first device displays a prompt message. The prompt message is used to prompt whether to agree to the second device to log in to the first account. Taking the first scenario (i.e., Figure 5B the scenario of the logged-in account) as an example, the prompt message can be Figure 5B the prompt box shown in (f), and the prompt box includes a "Log in with this account" button. Taking the second scenario (i.e., Figure 5C the OOBE scenario) as an example, the prompt message can be Figure 5C the prompt box shown in (g), and the prompt box includes a settings button. Taking the third scenario (i.e., Figure 5D the data cloning scenario) as an example, the prompt message can be, for example, Figure 5D the prompt box shown in (f), and the prompt box includes a confirmation button. After the first device displays the prompt message, if an approval operation is received, a scanning code interface is displayed. Taking the first scenario as an example, after the first device displays the prompt box shown in Figure 5B (f), if an operation on the "Log in with this account" button is received, Figure 5B the scanning code interface 200 shown in (g) is displayed. Taking the second scenario as an example, after the first device displays the prompt box shown in Figure 5C (g), if an operation on the settings button is received, the scanning code interface 200 shown in Figure 5C (h) is displayed. Taking the third scenario (i.e., Figure 5D the data cloning scenario) as an example, after the first device displays the prompt box shown in Figure 5D (f), if an operation on the confirmation button is received, Figure 5D the scanning code interface 200 shown in (g) is displayed.
[0280] Optionally, the first device detecting the proximity of the second device may include: the first device detecting that the distance between the first device and the second device is less than a first distance (e.g., 30 cm), and / or the first device receiving a request signal broadcast by the second device, where the request signal is a short-range communication signal, such as a Bluetooth signal, please refer to Figure 8 S801 in
[0281] For example, in response to detecting the proximity of the first device, the second device displays a first graphic, where the first graphic is used to establish near-field communication. Optionally, in response to detecting the proximity of the first device, the second device may directly display the first graphic, or display the first graphic when receiving an approval instruction from the first device. Taking Figure 5B as an example, when the second device displays the interface 302, if it detects the proximity of the first device, it can automatically pull up the interface 100 shown in Figure 5B (d), and the interface 100 includes the first graphic; or, when the second device receives a pull-up instruction sent by the first device, it pulls up the interface shown in Figure 5BThe interface 100 of (d). For example, Figure 5B In (f), after the first device receives an operation on the "Log in with this account" button, it sends a pull-up instruction to the second device. After the second device receives the pull-up instruction, it pulls up the interface 100 as shown in Figure 5B (d).
[0282] Optionally, the second device detecting the proximity of the first device may include: the second device detecting that the distance between the first device and the second device is less than a second distance (e.g., 30 cm), and / or the second device receiving a consent signal returned by the first device. Please refer to Figure 8 S801 in. Taking the first scenario as an example, after the first device displays the prompt box shown in Figure 5B (f) and then receives an operation on the "Log in with this account" button, it sends a consent signal to the second device. Taking the second scenario as an example, after the first device displays the prompt box shown in Figure 5C (g) and then receives an operation on the settings button, it sends a consent signal to the second device. Taking the third scenario as an example, after the first device displays the prompt box shown in Figure 5D (f) and then receives an operation on the confirmation button, it sends a consent signal to the second device.
[0283] S1203. The first device scans the first graphic through the scan code interface to establish a near-field communication connection with the second device.
[0284] Optionally, by scanning the first graphic, the first device can obtain a second code value. The principle of establishing a near-field communication connection based on the second code value can be found in Figure 8 S803 in.
[0285] S1204. The first device sends first data to the second device through the near-field communication connection, where the first data includes a first login credential.
[0286] Optionally, the first login credential may be a token. In some embodiments, the first data may not include the login password of the first account to avoid password leakage. In other embodiments, the first data is encrypted using a first key, which is a key agreed upon by the first device and the server corresponding to the first account. Please refer to Figure 10 S1007 in.
[0287] S1205. The second device logs in to the first account based on the first login credential.
[0288] Optionally, for the implementation principle of S1206, please refer to Figure 10 S1009 to S1012 in.
[0289] It should be noted that if the first interface displayed by the second device in S1201 is the first interface in the third scenario described above (i.e., Figure 5D the data cloning scenario), for example Figure 5D interface 306 in (b), Figure 5D interface 100 in (c), then after S1205, it may further include: the first device sends second data to the second device through a near-field communication connection, and the second data is user data stored in the first device. After receiving the second data, the second device stores the second data. For example, Figure 5D in (l), after the second device successfully logs in to the account of the first device, it can display Figure 5D the data selection interface in (d), where the user can select data in this interface. When the second device receives an operation on the "start migration" button, it sends a start migration instruction to the first device. After receiving the start migration instruction, the first device sends the second data (for example, the data selected by the user) to the second device through a near-field communication connection. For example, the first device can display a prompt message such as Figure 5D "Data migration in progress" in (j). The second device displays a migration progress such as Figure 5D in (e).
[0290] Figure 12B Another flowchart of the account login method provided by an embodiment of the present application. This process can be applied to the third scenario described above (i.e., Figure 5D ). As Figure 12B , the process includes:
[0291] S1300, the first device logs in to the first account. The implementation principle of S1200 is the same as that of S800 in Figure 8 and will not be repeated here.
[0292] S1301, the second device displays the first interface. The first interface is an interface for migrating data from other devices. Taking the third scenario described above (i.e., Figure 5D the data cloning scenario) as an example, the first interface can be Figure 5D interface 306 in (b), Figure 5D interface 100 in (c).
[0293] S1302, the first device and the second device are brought close to automatically pull up the interface.
[0294] For example, in response to detecting the approach of the second device, the first device displays a scanning code interface. Optionally, before pulling up the scanning code interface, the first device can display any interface, such as a lock screen, black screen, desktop, negative first screen, or application interface, etc.
[0295] Optionally, in response to detecting the proximity of the second device, the first device displays a prompt message. The prompt message is used to prompt whether to agree to migrate data to the second device. Taking the third scenario (i.e., Figure 5D the data cloning scenario) as an example, the prompt message can be, for example, Figure 5D the prompt box shown in (f), and the prompt box includes an OK button. After the first device displays the prompt message, if an approval operation is received, a scanning code interface is displayed. Taking the third scenario as an example, after the first device displays the prompt box shown in Figure 5D (f), when an operation on the OK button is received, Figure 5D the scanning code interface 200 shown in (g) is displayed.
[0296] Optionally, the first device detecting the proximity of the second device may include: the first device detecting that the distance between the first device and the second device is less than a first distance (e.g., 30 cm), and / or the first device receiving a request signal broadcast by the second device, where the request signal is a short-range communication signal, such as a Bluetooth signal. Please refer to Figure 8 S801 in
[0297] For example, in response to detecting the proximity of the first device, the second device displays a first graphic, where the first graphic is used to establish a near-field communication. Optionally, in response to detecting the proximity of the first device, the second device may directly display the first graphic, or display the first graphic when receiving an approval instruction from the first device. Taking Figure 5D as an example, when the second device displays the interface 306, if it detects the proximity of the first device, it can automatically pull up the interface 100 shown in Figure 5D (c), and the interface 100 includes the first graphic; or, when the second device receives a pull-up instruction sent by the first device, it pulls up the interface 100 shown in Figure 5D (c). For example, Figure 5D in (f), after the first device receives an operation on the "OK" button, it sends a pull-up instruction to the second device, and after the second device receives the pull-up instruction, it pulls up the interface 100 shown in Figure 5D (c).
[0298] Optionally, the second device detecting the proximity of the first device may include: the second device detecting that the distance between the first device and the second device is less than a second distance (e.g., 30 cm), and / or the second device receiving an approval signal returned by the first device. Please refer to Figure 8 S801 in Figure 5D (f). Taking the third scenario as an example, after the first device displays the prompt box shown in (f) and receives an operation on the OK button, it sends an approval signal to the second device.
[0299] S1304. The first device scans the first graphic through a code scanning interface to establish a near-field communication connection with the second device.
[0300] Optionally, by scanning the first graphic, the first device can obtain a second code value. For the principle of establishing a near-field communication connection based on the second code value, please refer to Figure 8 803 in
[0301] S1305. The first device sends first data to the second device through the near-field communication connection. The first data includes user data stored in the first device. The user data can be data in various applications (system applications or third-party applications) in the first device, such as data in the photo album application, memo, address book, calendar, and other applications.
[0302] S1306. The second device stores the first data.
[0303] The following describes the electronic device provided in the embodiments of the present application. The electronic device can be the first device, the second device, or the cloud side mentioned above.
[0304] Exemplarily, please refer to Figure 13 , which is a schematic structural diagram of the electronic device provided in an embodiment of the present application. As Figure 13 shown, the electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. 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.
[0305] 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. Among them, the controller may be the nerve center and command center of the electronic device. The controller may generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching and executing instructions. A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory may save the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0306] In some embodiments, the processor 110 may execute the account login method provided in the embodiments of the present application.
[0307] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include 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.
[0308] The I2C interface is a two-way synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be respectively coupled to the touch sensor 180K, charger, flashlight, camera 193, etc. through different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K through the I2C interface, enabling the processor 110 to communicate with the touch sensor 180K through the I2C bus interface to implement the touch function of the electronic device 100.
[0309] The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple groups of I2S buses. The processor 110 may be coupled to the audio module 170 through the I2S bus to implement communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit audio signals to the wireless communication module 160 through the I2S interface to implement the function of answering a call through a Bluetooth headset.
[0310] The PCM interface can also be used for audio communication to sample, quantize, and encode analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through the PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface to implement the function of answering a call through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0311] The UART interface is a general-purpose serial data bus for asynchronous communication. This bus can be a two-way communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is usually used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 may transmit audio signals to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
[0312] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate through the CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device 100.
[0313] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0314] The USB interface 130 is an interface that complies with the USB standard specification, and can specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. This interface can also be used to connect other electronic devices, such as AR devices, etc.
[0315] It can be understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are only illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 can also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0316] The wireless communication function of the electronic device 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. The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example: The antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0317] The mobile communication module 150 may provide solutions for wireless communications such as 2G / 3G / 4G / 5G applied to an electronic device. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 may receive electromagnetic waves through antenna 1, filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves through antenna 1 and radiate it out. In some embodiments, at least some functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be disposed in the same device.
[0318] The wireless communication module 160 may provide solutions for wireless communications such as wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc. applied to an electronic device. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves through antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 may also receive the signal to be sent from the processor 110, perform frequency modulation and amplification on it, and convert it into electromagnetic waves through antenna 2 and radiate it out.
[0319] In some embodiments, antenna 1 of the electronic device is coupled to the mobile communication module 150, and antenna 2 is coupled to the wireless communication module 160, so that the electronic device can communicate with the network and other devices through wireless communication technologies.
[0320] The display screen 194 is used to display the display interface of the application, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0321] The electronic device 100 can implement the shooting function through the ISP, camera 193, video codec, GPU, display screen 194, application processor, etc. Among them, the ISP is used to process the data fed back by the camera 193.
[0322] The internal memory 121 can be used to store computer-executable program codes, and the executable program codes include instructions. The processor 110 executes various functional applications and data processing of the electronic device 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 the operating system and software codes of at least one application program, etc. The data storage area can store the data generated during the use of the electronic device (such as images, videos, 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, flash memory device, universal flash memory, etc.
[0323] 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. The external memory card communicates with the processor 110 through the external memory interface 120 to achieve the data storage function. For example, save files such as pictures and videos in the external memory card.
[0324] The electronic device can implement audio functions through the audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor, etc. Such as music playback, recording, etc.
[0325] The audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert analog audio input into a digital audio signal. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be set in the processor 110, or part of the functional modules of the audio module 170 can be set in the processor 110.
[0326] The speaker 170A, also called the "loudspeaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to hands-free calls and other external playback scenarios through one or more speakers 170A.
[0327] The receiver 170B, also called the "earpiece", can be one or more, and is used to convert an audio electrical signal into a sound signal. When the electronic device 100 answers a call or a voice message, the voice can be received by placing the receiver 170B close to the human ear.
[0328] The microphone 170C, also called the "microphone", "transmitter", is used to convert a sound signal into an electrical signal.
[0329] The headphone jack 170D is used to connect a wired headphone.
[0330] The pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194.
[0331] The gyroscope sensor 180B can be used to determine the motion posture of the electronic device. In some embodiments, the angular velocity of the electronic device around three axes (i.e., the x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake during shooting.
[0332] The barometric pressure sensor 180C is used to measure barometric pressure. In some embodiments, the electronic device calculates the altitude based on the barometric pressure value measured by the barometric pressure sensor 180C to assist in positioning and navigation.
[0333] The magnetic sensor 180D includes a Hall sensor. The electronic device can use the magnetic sensor 180D to detect the opening and closing of a flip leather case.
[0334] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device in various directions (generally three axes). When the electronic device is stationary, the magnitude and direction of gravity can be detected.
[0335] The distance sensor 180F is used to measure distance. The electronic device can measure distance through infrared or laser.
[0336] The proximity light sensor 180G can include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The light-emitting diode can be an infrared light-emitting diode. The electronic device emits infrared light outward through the light-emitting diode. The electronic device uses the photodiode to detect the infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device. When insufficient reflected light is detected, the electronic device can determine that there is no object near the electronic device.
[0337] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device can adaptively adjust the brightness of the display screen 194 according to the sensed ambient light brightness.
[0338] The fingerprint sensor 180H is used to collect fingerprints.
[0339] The temperature sensor 180J is used to detect temperature.
[0340] The touch sensor 180K, also known as the "touch panel". The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 together form a touch screen, also known as the "touch control screen". The touch sensor 180K is used to detect touch operations acting on it or in its vicinity. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event.
[0341] The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire vibration signals of the vibrating bone mass of the human vocal part.
[0342] The button 190 includes a power-on button, a volume button, etc. The button 190 can be a mechanical button or a touch button. The electronic device can receive button inputs and generate key signal inputs related to the user settings and function controls of the electronic device. The motor 191 can generate vibration prompts. The motor 191 can be used for incoming call vibration prompts and also for touch vibration feedback. The indicator 192 can be an indicator light, which can be used to indicate the charging state, power change, and can also be used to indicate messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect the SIM card. The SIM card can be in contact with and separated from the electronic device by being inserted into or removed from the SIM card interface 195.
[0343] It can be understood that Figure 13 the components shown do not constitute a specific limitation on the electronic device. The electronic device in the embodiments of the present invention can include more or fewer components than Figure 13 . In addition, Figure 13 the combination / connection relationship between the components in
[0344] Figure 14 is also adjustable and modifiable. Figure 14 As shown, the communication system includes a first device and a second device. Optionally, although Figure 14 not shown, the communication system can also include a cloud side. Figure 14 The left half in Figure 14In the case where the distributed architecture is independent of the second operating system, optionally, the distributed architecture may also be built into the second operating system. The first device includes various applications and the first operating system. The first operating system may include a code value acquisition unit and an account login unit. The first device may also include a distributed architecture. The distributed architecture includes a device discovery module and a device connection module. It should be noted that Figure 14 In the case where the distributed architecture is independent of the first operating system, optionally, the distributed architecture may also be built into the first operating system.
[0345] In the following, Figure 14 is taken as an example to illustrate the account login method provided by the embodiments of the present application.
[0346] The device discovery module in the distributed architecture of the second device can discover surrounding devices. Therefore, when the first device approaches the second device, the device discovery module in the second device can discover the first device. Similarly, the device discovery module in the distributed architecture of the first device can also discover surrounding devices. Therefore, when the second device approaches the first device, the device discovery module in the first device can also discover the second device. In other words, the first device and the second device can discover each other.
[0347] After that, the code value acquisition unit in the second device acquires a second code value. The second operating system generates a first graphic based on the second code value for establishing a near-field communication connection and displays the first graphic. The second device can trigger the first device to pull up a scanning code interface. For example, the second device broadcasts a signal through the distributed architecture, and the signal is used to instruct the receiving end to pull up the scanning code interface. After the first device receives the signal, it pulls up the scanning code interface.
[0348] After that, the first device scans the first graphic displayed by the second device through the scanning code interface, and establishes a near-field communication connection through the connection module in the distributed architecture. The account login unit in the first device can assist the second device to log in to the first account based on the near-field communication connection. Among them, the account login unit in the first device can assist the second device to log in to the first account through three schemes. The three schemes are the first scheme, the second scheme, and the third scheme in the foregoing. For the three schemes, please refer to the foregoing, and details are not repeated here.
[0349] Figure 15 It is another structural schematic diagram of the electronic device provided by the embodiments of the present application. The electronic device 1500 may be the first device, the second device, or the cloud side in the foregoing. As Figure 15As shown, the electronic device 1500 may include: one or more processors 1501; one or more memories 1502; a communication interface 1503, and one or more computer programs 1504. The above components may be connected through one or more communication buses 1505. The one or more computer programs 1504 are stored in the memory 1502 and configured to be executed by the one or more processors 1501. The one or more computer programs 1504 include instructions. For example, when the electronic device 1500 is the first device in the foregoing, the instructions may be used to execute the relevant steps of the first device in any of the foregoing embodiments. For example, when the electronic device 1500 is the second device in the foregoing, the instructions may be used to execute the relevant steps of the second device in any of the foregoing embodiments. For example, when the electronic device 1500 is the cloud side in the foregoing, the instructions may be used to execute the relevant steps of the cloud side in any of the foregoing embodiments. The communication interface 1503 is used to implement the communication between the electronic device 1500 and other devices. For example, the communication interface may be a transceiver. Figures 1 to 14 In any of the foregoing embodiments of the first device. For example, when the electronic device 1500 is the second device in the foregoing, the instructions may be used to execute the relevant steps of the second device in any of the foregoing embodiments. Figures 1 to 14 In any of the foregoing embodiments of the second device. For example, when the electronic device 1500 is the cloud side in the foregoing, the instructions may be used to execute the relevant steps of the cloud side in any of the foregoing embodiments. Figures 1 to 14 In any of the foregoing embodiments of the cloud side. The communication interface 1503 is used to implement the communication between the electronic device 1500 and other devices. For example, the communication interface may be a transceiver.
[0350] In the embodiments provided in the present application above, the methods provided in the embodiments of the present application are introduced from the perspective of an electronic device (such as a mobile phone or the cloud side) as the execution subject. To implement each function in the methods provided in the embodiments of the present application above, the terminal device may include a hardware structure and / or software module, and implement the above functions in the form of a hardware structure, a software module, or a combination of a hardware structure and a software module. Whether a certain function among the above functions is executed in the form of a hardware structure, a software module, or a combination of a hardware structure and a software module depends on the specific application and design constraints of the technical solution.
[0351] 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 program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present invention are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that the computer can access or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)). Without conflict, the solutions of the above embodiments can be combined and used.
[0352] Based on the above embodiments, the present application further provides a computer program product containing instructions. When the computer program product runs on a computer, the computer is caused to execute the various methods described in the embodiments of the present application.
[0353] Based on the above embodiments, the present application further provides a computer-readable storage medium. A computer program is stored in the computer-readable storage medium. When the computer program is executed by a computer, the computer is caused to execute the various methods described in the embodiments of the present application.
[0354] Based on the above embodiments, the present application further provides a chip. The chip is used to read the computer program stored in the memory and implement the various methods described in the embodiments of the present application.
[0355] Based on the above embodiments, the present application provides a chip system. The chip system includes a processor for supporting a computer device to implement the various methods described in the embodiments of the present application. In a possible design, the chip system further includes a memory for storing the necessary programs and data of the computer device. The chip system can be composed of chips or can include chips and other discrete devices.
[0356] Based on the above embodiments, the present application provides a communication system, including: a first device and a second device. Optionally, a server (i.e., the cloud side) may also be included. For the method steps executed by the first device, the second device, and the server, please refer to the foregoing description.
[0357] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0358] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0359] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that implement the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0360] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0361] Obviously, those skilled in the art can make various changes and modifications to this application without departing from the scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalent technologies, this application is also intended to include these modifications and variations.
Claims
1. An account login method, characterized in that: Applied to a communication system, the communication system includes a first device and a second device, and the method includes: The second device displays a first interface, where the first interface is an interface for logging into an account; In a case where the operating system of the first device is currently logged in to the first account, the first device displays a code scanning interface in response to detecting that the second device is approaching; In response to detecting that the first device is approaching, the second device displays a first graphic, where the first graphic is used to establish near field communication; The first device scans the first graphic through the code scanning interface to establish a near field communication connection with the second device; The first device sends first data to the second device through the near field communication connection, wherein the first data includes a first login credential of the first device; The second device logs in to the first account based on the first login credential.
2. The method according to claim 1, characterized in that The first interface includes any one of the following items: The first interface is an interface for logging into an account in a setting application of the second device, The first interface is an interface of the second device during OOBE, or The first interface is an interface for migrating data from other devices.
3. The method according to claim 1 or 2, characterized in that: The first device is currently in a no-network state.
4. The method according to any one of claims 1 to 3, characterized in that: Before the first device displays a code scanning interface in response to detecting that the second device is approaching, the method also includes: the first device displays a lock screen interface, a black screen, a desktop, a negative one screen, or an application interface.
5. The method according to any one of claims 1 to 4, characterized in that: The detecting that the second device is approaching includes: detecting that the distance between the first device and the second device is less than a first distance, and / or receiving a request signal broadcast by the second device, wherein the request signal is a short-range communication signal; The detecting that the first device is approaching includes: detecting that the distance between the first device and the second device is less than a second distance, and / or receiving an agreement signal returned by the first device.
6. The method according to any one of claims 1 to 5, characterized in that: In response to detecting that the second device is approaching, the first device displays a code scanning interface, including: In response to detecting that the second device is approaching, the first device displays a prompt message, wherein the prompt message is used to prompt whether to agree to allow the second device to log in to the first account; When the first device receives the consent operation, it displays a code scanning interface.
7. The method according to claim 6, characterized in that The method also includes: the first device sends a consent instruction to the second device, the consent instruction is used to indicate consent for the second device to log in to the first account; the second device displays a first graphic in response to detecting that the first device is approaching, including: when the second device receives the consent instruction, the first graphic is displayed.
8. The method according to any one of claims 1 to 7, characterized in that: The first login credential is a token.
9. The method according to any one of claims 1 to 8, characterized in that: The first data does not include a login password of the first account, and / or the first data is encrypted using a first key, where the first key is a key agreed upon between the first device and a server corresponding to the first account.
10. The method according to any one of claims 1 to 9, characterized in that: In response to detecting that the second device is approaching, the first device displays a code scanning interface, including: In response to detecting that the second device is approaching, the first device displays N accounts of the first device, where N is a positive integer; When the first device receives the operation for selecting the first account, the code scanning interface is displayed.
11. The method according to claim 1, characterized in that: The second device logs in to the first account based on the first login credential, including: The second device sends a login request to a server corresponding to the first account, where the login request is used to request to log in to the first account, and the login request includes the first login credential; The second device receives the second login credential sent by the server.
12. The method according to claim 11, characterized in that Before the second device receives the second login credential sent by the server, the method further includes: The second device receives a prompt message sent by the server, where the prompt message is used to prompt that the first device needs to be authenticated online; The second device sends the prompt information to the first device through the near field communication connection; The first device outputs the prompt information; After the first device is connected to the network, it sends authentication information to the server, where the authentication information is used to indicate that it agrees to allow the second device to log in to the first account.
13. The method according to any one of claims 2 to 12, characterized in that: When the first interface is an interface for migrating data from other devices, the method further includes: The first device sends second data to the second device through the near field communication connection, where the second data includes user data stored in the first device; The second device stores the second data.
14. A method for logging into an account, characterized in that: Applied to a first device, the method includes: In a case where the operating system of the first device is currently logged in to the first account, the first device displays a code scanning interface in response to detecting that the second device is approaching; The first device scans the first graphic on the second device through the code scanning interface to establish a near field communication connection with the second device; The first device sends first data to the second device through the near field communication connection, where the first data includes first login credentials of the first device, and the first login credentials are used for the second device to log in to the first account.
15. The method according to claim 14, characterized in that The first device is currently in a no-network state.
16. The method according to claim 14 or 15, characterized in that Before the first device displays a code scanning interface in response to detecting that the second device is approaching, the method also includes: the first device displays a lock screen interface, a black screen, a desktop, a negative one screen, or an application interface.
17. The method according to any one of claims 14 to 16, characterized in that: In response to detecting that the second device is approaching, the first device displays a code scanning interface, including: In response to detecting that the second device is approaching, the first device displays a prompt message, wherein the prompt message is used to prompt whether to agree to allow the second device to log in to the first account; When the first device receives the consent operation, it displays a code scanning interface.
18. The method according to any one of claims 14 to 17, characterized in that: The first login credential is a token.
19. The method according to any one of claims 14 to 18, characterized in that: The first data does not include a login password of the first account, and / or the first data is encrypted using a first key, where the first key is a key agreed upon between the first device and a server corresponding to the first account.
20. The method according to any one of claims 14 to 19, characterized in that: In response to detecting that the second device is approaching, the first device displays a code scanning interface, including: In response to detecting that the second device is approaching, the first device displays N accounts of the first device, where N is a positive integer; When the first device receives the operation for selecting the first account, the code scanning interface is displayed.
21. The method according to any one of claims 14 to 20, characterized in that: The method further comprises: The first device receives prompt information sent by the second device through the near field communication connection, wherein the prompt information is used to prompt that the first device needs to be networked and authenticated; The first device outputs the prompt information; After the first device is connected to the network, it sends authentication information to the server corresponding to the first account, where the authentication information is used to indicate that the second device is allowed to log in to the first account.
22. The method according to any one of claims 15 to 21, characterized in that: When the first interface is an interface for migrating data from other devices, the method further includes: The first device sends second data to the second device through the near field communication connection, where the second data includes user data stored in the first device.
23. An account login method, characterized in that: Applied to the second device, the method includes: The second device displays a first interface, where the first interface is an interface for logging into an account; In response to detecting that the first device is approaching, the second device displays a first graphic, wherein the first graphic is used to establish near field communication; The second device establishes a near field communication connection with the first device in response to the first device scanning the first graphic; The second device receives, through the near field communication connection, first data sent by the first device, where the first data includes a first login credential of the first device; The second device logs into the first account based on the first login credential.
24. The method according to claim 23, characterized in that The first interface includes any one of the following items: The first interface is an interface for logging into an account in a setting application of the second device, The first interface is an interface of the second device during OOBE, or The first interface is an interface for migrating data from other devices.
25. The method according to claim 23, characterized in that Before the second device displays the first graphic in response to detecting that the first device is approaching, the method also includes: when the second device receives a consent instruction sent by the first device, the second device displays the first graphic, and the consent instruction is used to indicate consent for the second device to log in to the first account.
26. The method according to any one of claims 23 to 25, characterized in that: The first login credential is a token.
27. The method according to any one of claims 23 to 26, characterized in that: The first data does not include a login password of the first account, and / or the first data is encrypted using a first key, where the first key is a key agreed upon between the first device and a server corresponding to the first account.
28. The method according to any one of claims 23 to 27, characterized in that: The second device logs in to the first account based on the first login credential, including: The second device sends a login request to a server corresponding to the first account, where the login request is used to request to log in to the first account, and the login request includes the first login credential; The second device receives the second login credential sent by the server.
29. The method according to claim 28, characterized in that Before the second device receives the second login credential sent by the server, the method further includes: The second device receives a prompt message sent by the server, where the prompt message is used to prompt that the first device needs to be authenticated online; The second device sends the prompt information to the first device through the near field communication connection.
30. The method according to any one of claims 25 to 29, characterized in that: When the first interface is an interface for migrating data from other devices, the method further includes: The second device receives second data sent by the first device through the near field communication connection, where the second data includes user data stored in the first device; The second device stores the second data.
31. A method for logging into an account, characterized in that: Applied to a server, the method comprises: Receiving a login request sent by a second device, the login request being used to request to log in to a first account, the login request including a first login credential of the first device; Sending second login credentials to the second device.
32. The method according to claim 31, characterized in that The login request includes a first code value; before sending the second login credential to the second device, the method further includes: It is determined that the first code value is a code value that the server has sent to the second device, and the first code value is within a validity period.
33. The method according to claim 31 or 32, characterized in that Before sending the second login credential to the second device, the method further includes: Sending a prompt message to the second device, where the prompt message is used to prompt that the first device needs to be authenticated online; Receive authentication information sent by the first device, where the authentication information is used to indicate consent for the second device to log in to the first account.
34. A communication system, characterized in that: include: A first device, configured to execute the method according to any one of claims 14 to 22; The second device is used to execute the method according to any one of claims 23-30.
35. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 14 to 22 is implemented, or the method according to any one of claims 23 to 30 is implemented, or the method according to any one of claims 31 to 33 is implemented.
36. A chip system, characterized in that: The chip system includes a processing circuit and a storage medium, wherein the storage medium stores instructions; when the instructions are executed by the processing circuit, the method described in any one of claims 1 to 33 is implemented.
37. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 33 is implemented.
38. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is run on a computer, the computer is caused to perform the method according to any one of claims 1 to 33.
Citation Information
Patent Citations
Two-dimensional code scanning method and apparatus, and computer readable storage medium
CN108509818A
Wireless pairing method and device, equipment and storage medium
CN115665657A
Code scanning method and device and electronic equipment
CN116776905A
Account login method and related device
CN116821911A
Self-styling apparatus having unmanned kiosk function
KR102538224B1