An account cloning method, an electronic device, a server, and a communication system
By transferring account data and access tokens between old and new devices, the problem of users having to manually log in to their accounts when switching devices is solved, enabling automatic account login, improving user experience, and ensuring data security and privacy.
Patent Information
- Application Number
- CN202210851628.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-19
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2042-07-19
AI Technical Summary
When switching electronic devices, users need to log in to their accounts again on the new device, which is cumbersome and reduces the user experience.
Automatic account login is achieved by transferring account data and access tokens between old and new devices, eliminating the need for users to manually enter their usernames and passwords.
It simplifies user operations, improves user experience, and ensures the security and privacy of data transmission.
Smart Images

Figure CN117459938B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to an account cloning method, electronic device, server, and communication system. Background Technology
[0002] Nowadays, people are replacing electronic devices (such as mobile phones) more and more frequently. When replacing electronic devices, data migration can be used to clone commonly used applications (APPs), important files, documents, and other important content from the old device to the new device to achieve the purpose of switching devices.
[0003] However, in related technologies, after switching devices, users need to log in to their accounts again on the new devices, which is cumbersome and reduces the user experience. Summary of the Invention
[0004] This application provides an account cloning method, electronic device, server, and communication system that can simplify user operations after switching devices.
[0005] The embodiments of this application adopt the following technical solutions:
[0006] In a first aspect, an account cloning method is provided, in which a first electronic device clones the login information of a second app on a second electronic device via a first application (APP); the first electronic device and the second electronic device are communicatively connected; the method includes: the first electronic device, in response to a first operation on the first app, displays a first interface of the first app; the first interface includes identifiers of multiple apps and an identifier of the second app, the identifiers of the multiple apps are used to select whether to clone the corresponding app, and the identifier of the second app is used to select whether to clone the login information of the second app; the first electronic device, in response to a user's selection operation on the identifier of the second app in the first interface, sends login information of a first account to the second electronic device; wherein, the first electronic device has logged into the first account in the second app; the login information of the first account includes account data and a first access token, the account data including the account name and the account avatar; the first access token is assigned by the server of the second app to the second electronic device, and is used by the second electronic device to automatically log into the first account on the second app of the second electronic device.
[0007] Based on the first aspect, after the first electronic device responds to the first operation on the first APP, it displays the first interface of the first APP. The first interface includes identifiers of multiple APPs and an identifier of the second APP. Since the identifiers of the multiple APPs are used to select whether to clone the corresponding APP, and the identifier of the second APP is used to select whether to clone the login information of the second APP, the first electronic device can send the login information of the first account to the second electronic device in response to the user's selection operation of the identifier of the second APP in the first interface. Since the first electronic device logs in to the first account on the second APP, the login information of the first account includes account data and a first access token. The account data includes the username and the username avatar. The first access token is assigned by the server of the second APP to the second electronic device for the second electronic device to automatically log in to the first account on the second APP of the second electronic device. Therefore, the user does not need to manually enter the account and password to log in on the second APP of the second electronic device, which simplifies the user operation and improves the user experience.
[0008] In one implementation of the first aspect, before sending the login information of the first account to the second electronic device, the method further includes: when the first electronic device launches an application, randomly generating a first random string; the first electronic device obtaining a second random string and hardware information of the second electronic device from the second electronic device through a first APP; the first electronic device using the first random string, the second random string, the hardware information of the first electronic device, and the hardware information of the second electronic device to generate a first symmetric encryption key; the first electronic device using the first symmetric encryption key to encrypt the login information of the first account; wherein sending the login information of the first account to the second electronic device includes: the first electronic device sending the encrypted login information of the first account to the second electronic device.
[0009] In this implementation, before sending the login information of the first account to the second electronic device, the first electronic device uses a first random string, a second random string, the hardware information of the first electronic device, and the hardware information of the second electronic device to generate a first symmetric encryption key, and uses the first symmetric encryption key to encrypt the login information of the first account; then, the first electronic device sends the encrypted login information of the first account to the second electronic device, thereby ensuring the security and privacy of the login information of the first account.
[0010] In one implementation of the first aspect, the first electronic device obtains a second random string and hardware information of the second electronic device from the second electronic device via a first APP, including: the first electronic device calling a camera to scan a QR code provided by the first APP on the second electronic device; wherein the QR code is used to provide hardware information and the second random string of the second electronic device; and the first electronic device obtains the hardware information and the second random string of the second electronic device from the QR code.
[0011] In this implementation, the first electronic device can obtain the second random string and the hardware information of the second electronic device by scanning the QR code provided by the first APP on the second electronic device, which facilitates user operation and improves user experience.
[0012] In one implementation of the first aspect, after the first electronic device obtains the second random string and the hardware information of the second electronic device from the second electronic device through the first APP, the method further includes: the first electronic device reporting the hardware information of the second electronic device to the server to request a token for the second electronic device to log in to the second APP; and the first electronic device receiving a first access token from the server.
[0013] In this implementation, the first electronic device can report the hardware information of the second electronic device to the server. The server then generates a token for the second electronic device to log in to the second APP based on the hardware information of the second electronic device, ensuring the accuracy of the generated token.
[0014] In one implementation of the first aspect, before sending the login information of the first account to the second electronic device, the method further includes: the first electronic device determining that the version of the first APP is greater than or equal to a preset version.
[0015] In this implementation, before sending the login information of the first account to the second electronic device, the first electronic device also needs to determine the version of the first APP. When the version of the first APP is greater than or equal to the preset version, the first electronic device sends the login information of the first account to the second electronic device, and cloning can be performed. Conversely, if the version of the first APP is less than the preset version, the first electronic device will not send the login information of the first account to the second electronic device, and cloning cannot be performed, which can effectively reduce device power consumption.
[0016] In one implementation of the first aspect, after sending the login information of the first account to the second electronic device, the method further includes: the first electronic device closing its network connection to disconnect the communication connection with the server.
[0017] In this implementation, after the first electronic device sends the login information of the first account to the second electronic device, the first electronic device closes its network connection to disconnect the communication connection with the server and prevent the cloning process from being interfered with.
[0018] In one implementation of the first aspect, the method further includes: a first electronic device receiving a notification message from a server; the notification message is used to notify the user that the first account has logged in on a second APP of the second electronic device.
[0019] In this implementation, after cloning is complete, the server will also send a notification message to the first electronic device to notify the user to log in to the second APP on the second electronic device with the first account, further improving the user experience.
[0020] Secondly, an account cloning method is provided, for a second electronic device to clone the login information of a second APP of a first electronic device through a first application APP; the second electronic device and the first electronic device are communicatively connected; the method includes: the second electronic device receiving login information of a first account from the first electronic device; wherein the login information of the first account includes account data and a first access token, the account data including account name and account avatar; the first access token is assigned to the second electronic device by the server of the second APP; the second electronic device sends a login request of the first account to the server to automatically log in to the first account on the second APP of the second electronic device; wherein the login request of the first account carries the hardware information of the second electronic device and the first access token.
[0021] Based on the second aspect, the second electronic device can receive login information from the first account of the first electronic device. Since the login information of the first account includes account data and a first access token, the account data includes the account name and account avatar; the first access token is assigned to the second electronic device by the server of the second APP; the second electronic device sends a login request for the first account to the server to automatically log in to the first account on the second APP of the second electronic device. Therefore, the second electronic device can use the login information of the first account to automatically log in to the first account on the second APP of the second electronic device, without requiring the user to manually enter the account and password to log in on the second APP of the second electronic device, which simplifies the user operation and improves the user experience.
[0022] In one implementation of the second aspect, the method further includes: a first electronic device receiving a second access token from a server, the second access token being used to maintain the login status of the first account on a second APP of the second electronic device.
[0023] In this implementation, since the token has an expiration time, the server can send a second access token to the first electronic device to maintain the login status of the first account on the second APP of the second electronic device.
[0024] In one implementation of the second aspect, the login information of the first account is encrypted; the method further includes: the second electronic device obtaining a first random string and the hardware information of the first electronic device from the first electronic device; when the second electronic device starts the first APP, it randomly generates a second random string; the second electronic device uses the first random string, the second random string, the hardware information of the first electronic device, and the hardware information of the second electronic device to generate a second symmetric encryption key; after the second electronic device receives the login information of the first account from the first electronic device, the method further includes: the second electronic device using the second symmetric encryption key to decrypt the encrypted login information of the first account to obtain the unencrypted login information of the first account.
[0025] In this implementation, since the login information of the first account is encrypted, the second electronic device uses the first random string, the second random string, the hardware information of the first electronic device, and the hardware information of the second electronic device to generate a second symmetric encryption key. After receiving the login information of the first account from the first electronic device, the second symmetric encryption key is used to decrypt the encrypted login information of the first account to obtain the unencrypted login information of the first account, thereby ensuring the security and privacy of the login information of the first account.
[0026] In one implementation of the second aspect, before the second electronic device receives login information from the first account of the first electronic device, the method further includes: after the second electronic device launches the first APP, it displays a QR code; wherein the QR code is used to provide hardware information of the second electronic device and a second random string.
[0027] In this implementation, the second electronic device can display a QR code after launching the first APP, providing the first electronic device with the hardware information and a second random string of the second electronic device, which facilitates user operation and improves user experience.
[0028] In one implementation of the second aspect, before the second electronic device receives login information from the first electronic device for the first account, the method further includes: the second electronic device determining that the version of the first APP is greater than or equal to a preset version.
[0029] In this implementation, before the second electronic device receives the login information of the first account from the first electronic device, the second electronic device also needs to determine the version of the first APP. When the version of the first APP is greater than or equal to the preset version, the second electronic device receives the login information of the first account sent by the first electronic device, and cloning can be performed. Conversely, if the version of the first APP is less than the preset version, the second electronic device cannot receive the login information of the first account sent by the second electronic device, and cloning cannot be performed, which can effectively reduce device power consumption.
[0030] In one implementation of the second aspect, the method further includes: the second electronic device determining that the first APP is not logged into an account.
[0031] In this implementation, if the first APP on the second electronic device is logged into an account, cloning cannot be performed. Therefore, the second electronic device also needs to determine whether the first APP is logged into an account. If it is not logged into, cloning can be performed, which effectively reduces device power consumption.
[0032] Thirdly, an account cloning method is provided for cloning login information of a second application (APP) of a first electronic device to a second APP of a second electronic device; the first electronic device and the second electronic device are communicatively connected; the method includes: a server receiving hardware information of the second electronic device from the first electronic device; the server sending a first access token to the first electronic device in response to the hardware information; the server receiving a login request from the second electronic device, the login request carrying the hardware information and the first access token; and the server allowing the second electronic device to log in to the first account on the second APP based on the hardware information and the first access token.
[0033] Based on the third aspect, the server can generate a first access token based on the hardware information of the second electronic device sent by the first electronic device. After the server receives the login request from the second electronic device, it allows the second electronic device to log in to the first account on the second APP based on the hardware information and the first access token carried in the login request. Therefore, the user does not need to manually enter the account and password to log in on the second APP of the second electronic device, which simplifies the user operation and improves the user experience.
[0034] Fourthly, an electronic device is provided, which has the function of implementing the method described in the first or second aspect above. This function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-described function.
[0035] Fifthly, an electronic device is provided, which can be a first electronic device. The first electronic device clones the login information of a second APP in the first electronic device to a second electronic device via a first application (APP). The first electronic device and the second electronic device are communicatively connected. The first electronic device includes a display screen, a memory, and one or more processors. The display screen, memory, and processors are coupled. The memory is used to store computer program code, which includes computer instructions. When the processor executes the computer instructions, the first electronic device performs the following steps: In response to a first operation on the first application, the first electronic device displays a first interface of the first application. The first interface includes identifiers of multiple APPs and an identifier of a second APP. The identifiers of the multiple APPs are used to select whether to clone the corresponding APP, and the identifier of the second APP is used to select whether to clone the login information of the second APP. In response to a user's selection operation on the identifier of the second APP in the first interface, the first electronic device sends login information of a first account to the second electronic device. The first electronic device has logged into the first account in the second APP. The login information of the first account includes account data and a first access token. The account data includes an account name and an account avatar. The first access token is assigned by the server of the second APP to the second electronic device and is used by the second electronic device to automatically log into the first account on the second APP of the second electronic device.
[0036] In one implementation of the fifth aspect, before sending the login information of the first account to the second electronic device, when the computer instruction is executed by the processor, the first electronic device further performs the following steps: when the first electronic device starts an application, it randomly generates a first random string; the first electronic device obtains a second random string and the hardware information of the second electronic device from the second electronic device through the first APP; the first electronic device uses the first random string, the second random string, the hardware information of the first electronic device, and the hardware information of the second electronic device to generate a first symmetric encryption key; the first electronic device uses the first symmetric encryption key to encrypt the login information of the first account; wherein, sending the login information of the first account to the second electronic device includes: the first electronic device sending the encrypted login information of the first account to the second electronic device.
[0037] In one implementation of the fifth aspect, when the computer instructions are executed by the processor, the first electronic device specifically performs the following steps: the first electronic device calls the camera to scan the QR code provided by the first APP on the second electronic device; wherein, the QR code is used to provide the hardware information and the second random string of the second electronic device; the first electronic device obtains the hardware information and the second random string of the second electronic device from the QR code.
[0038] In one implementation of the fifth aspect, after the first electronic device obtains the second random string and the hardware information of the second electronic device from the second electronic device through the first APP, when the computer instruction is executed by the processor, the first electronic device further performs the following steps: the first electronic device reports the hardware information of the second electronic device to the server to request a token for the second electronic device to log in to the second APP; the first electronic device receives the first access token from the server.
[0039] In one implementation of the fifth aspect, before sending the login information of the first account to the second electronic device, when the computer instruction is executed by the processor, the first electronic device also performs the following steps: the first electronic device determines that the version of the first APP is greater than or equal to a preset version.
[0040] In one implementation of the fifth aspect, after sending the login information of the first account to the second electronic device, when the computer instruction is executed by the processor, the first electronic device further performs the following steps: the first electronic device closes its network connection to disconnect the communication connection with the server.
[0041] In one implementation of the fifth aspect, when the computer instructions are executed by the processor, the first electronic device further performs the following steps: the first electronic device receives a notification message from the server; the notification message is used to notify the user that the first account has logged in on the second APP of the second electronic device.
[0042] In a sixth aspect, an electronic device is provided, which can be a second electronic device. The second electronic device clones the login information of a second APP of the first electronic device through a first application APP. The second electronic device is communicatively connected to the first electronic device. The second electronic device includes a display screen, a memory, and one or more processors. The display screen, memory, and processors are coupled. The memory is used to store computer program code, which includes computer instructions. When the processor executes the computer instructions, the second electronic device performs the following steps: the second electronic device receives login information of a first account from the first electronic device. The login information of the first account includes account data and a first access token. The account data includes an account name and an account avatar. The first access token is assigned to the second electronic device by the server of the second APP. The second electronic device sends a login request for the first account to the server to automatically log in to the first account on the second APP of the second electronic device. The login request for the first account carries the hardware information of the second electronic device and the first access token.
[0043] In one implementation of the sixth aspect, when the processor executes computer instructions, the second electronic device further performs the following steps: the first electronic device receives a second access token from the server, the second access token being used to maintain the login status of the first account on the second APP of the second electronic device.
[0044] In one implementation of the sixth aspect, the login information of the first account is encrypted; when the processor executes computer instructions, the second electronic device further performs the following steps: the second electronic device obtains a first random string and the hardware information of the first electronic device from the first electronic device; when the second electronic device starts the first APP, it randomly generates a second random string; the second electronic device uses the first random string, the second random string, the hardware information of the first electronic device, and the hardware information of the second electronic device to generate a second symmetric encryption key; after the second electronic device receives the login information of the first account from the first electronic device, the method further includes: the second electronic device uses the second symmetric encryption key to decrypt the encrypted login information of the first account to obtain the unencrypted login information of the first account.
[0045] In one implementation of the sixth aspect, before the second electronic device receives login information from the first electronic device's first account, when the processor executes computer instructions, the second electronic device also performs the following steps: after the second electronic device launches the first APP, it displays a QR code; wherein the QR code is used to provide hardware information and a second random string for the second electronic device.
[0046] In one implementation of the sixth aspect, before the second electronic device receives login information of the first account from the first electronic device, when the processor executes computer instructions, the second electronic device also performs the following steps: the second electronic device determines that the version of the first APP is greater than or equal to a preset version.
[0047] In one implementation of the sixth aspect, when the processor executes computer instructions, the second electronic device also performs the following steps: the second electronic device determines that the first APP is not logged into an account.
[0048] In a seventh aspect, a server is provided for cloning login information of a second application (APP) of a first electronic device to a second APP of a second electronic device; the first electronic device and the second electronic device are communicatively connected; the server includes a processor and a memory; the memory is used to store computer program code, the computer program code including computer instructions; when the processor executes the computer instructions, the server performs the following steps: the server receives hardware information of the second electronic device from the first electronic device; the server, in response to the hardware information, sends a first access token to the first electronic device; the server receives a login request from the second electronic device, the login request carrying the hardware information and the first access token; the server, based on the hardware information and the first access token, allows the second electronic device to log in to a first account on the second APP.
[0049] Eighthly, a communication system is provided, comprising: a first electronic device, a second electronic device, and a server; the first electronic device and the second electronic device are communicatively connected; the first electronic device is configured to perform the method as described in any one of the first aspects above; the second electronic device is configured to perform the method as described in any one of the second aspects above; and the server is configured to perform the method as described in any one of the third aspects above.
[0050] Ninth aspect, a computer-readable storage medium is provided that stores instructions which, when executed on a computer, cause the computer to perform the method described in any one of the first or second aspects.
[0051] In a tenth aspect, a computer program product comprising instructions is provided, which, when run on a computer, enables the computer to perform the method described in any one of the first or second aspects above.
[0052] The technical effects of any of the design methods in aspects three through ten can be found in the technical effects of different design methods in aspects one and two, and will not be repeated here. Attached Figure Description
[0053] Figure 1 An illustration of an account cloning interface provided in this application embodiment. Figure 1 ;
[0054] Figure 2 An illustration of an account cloning interface provided in this application embodiment. Figure 2 ;
[0055] Figure 3 An illustration of an account cloning interface provided in this application embodiment. Figure 3 ;
[0056] Figure 4This application provides a schematic diagram of the structure of a communication system according to an embodiment of the present application.
[0057] Figure 5 This is a schematic diagram illustrating the principle of account cloning as provided in an embodiment of this application;
[0058] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0059] Figure 7 A schematic diagram of an account cloning process provided in this application embodiment. Figure 1 ;
[0060] Figure 8 A schematic diagram of an account cloning process provided in this application embodiment. Figure 2 ;
[0061] Figure 9 A schematic diagram of an account cloning process provided in this application embodiment. Figure 3 ;
[0062] Figure 10 An illustration of an account cloning interface provided in this application embodiment. Figure 4 ;
[0063] Figure 11 An illustration of an account cloning interface provided in this application embodiment. Figure 5 ;
[0064] Figure 12 A schematic diagram of an account cloning process provided in this application embodiment. Figure 4 ;
[0065] Figure 13 This is a schematic diagram of a chip system provided in an embodiment of this application. Detailed Implementation
[0066] To enable those skilled in the art to better understand the solutions of the embodiments of this application, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.
[0067] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of embodiments of this application, unless otherwise stated, "a plurality of" means two or more.
[0068] In related technologies, it is impossible to migrate the login state of the account application during the process of users switching devices or migrating data. This forces users to re-enter their login account (such as username, mobile phone number) and password on the new device, which is cumbersome and results in a decline in user experience.
[0069] In some embodiments, during data migration, both the old and new devices need to be logged into the same account to complete the migration of data from the old device to the new device. For example, such as... Figure 1 As shown, the old device displays a data migration interface, which includes multiple application options. Each application option corresponds to an application installed on the old device. Once a communication connection is established between the old and new devices, the old device can respond to the user's selection of at least one application option to migrate the application data corresponding to the selected application option to the new device, thus completing the data migration from the old device.
[0070] Still Figure 1 As shown, for the "Account Apps" option, if the new and old devices are not logged into the same account, "Account Apps" cannot be selected. Therefore, the app data corresponding to the "Account Apps" on the old device cannot be migrated to the new device.
[0071] In other embodiments, when migrating account data from an older device to a newer device, the user is required to enter a login password when the new device activates the account functionality. For example, the older device... Figure 2 The data migration process illustrated transfers data from the old device to the new device. In this embodiment, for account applications, the old device can migrate account data (such as username or phone number) to the new device. Based on this, when the new device activates the account function, it can display... Figure 3 The interface shown is the login interface for the new device account application, which includes account data (such as mobile phone number) migrated from the old device.
[0072] In addition, by Figure 3 As can be seen, the login interface also includes a password input field, requiring users to manually enter a password to activate the account function, which is cumbersome.
[0073] This application provides an account cloning method applied to a communication system, which includes a new device, an old device, and a server. The method involves the old device cloning the login information of an account application (or second application) on the old device to the new device via a cloning application (or a first application). The new device and the old device establish a communication connection. This method enables the migration (or cloning) of the account login status from the old device to the new device, eliminating the need for the user to manually re-enter their account and password on the new device, thus improving the user experience. Specifically, the method includes: first, the server generates a first token (or first access token) based on the hardware information of the new device sent by the old device; then, the server sends the generated first token to the old device. Based on this, when the new device and the old device establish a connection and perform data migration, the old device can send the account data used for logging into the account application and the first token to the new device. Thus, the new device can use the account data and the first token sent by the old device to log into the account application, eliminating the need for the user to manually re-enter their account and password on the new device.
[0074] It should be noted that, compared to a user's login password, a token is usually time-limited rather than static or immutable. Therefore, even if a token is leaked during synchronous transmission, the impact is temporary due to the short validity period of the token. Thus, the impact of a token leak is much smaller than that of a login password leak. Furthermore, in this embodiment, because the token has a time limit, the first token can also be called a temporary token.
[0075] Figure 4 A schematic diagram of a communication system provided in an embodiment of this application is shown below. Figure 4 As shown, the communication system includes a first electronic device 10, a second electronic device 20, and a server 30 (also referred to as an account cloud); wherein, the first electronic device 10 can be an older device, and the second electronic device 20 can be a newer device. The following embodiments will be described in detail using the example of the first electronic device 10 being an older device and the second electronic device 20 being a newer device.
[0076] In some embodiments, when the old device and the new device are connected via wireless or wired communication, data can be migrated from the old device to the new device. It should be noted that, in the embodiments of this application, the process of migrating data from the old device to the new device can also be referred to as synchronization or cloning.
[0077] There are various ways for old and new devices to communicate and connect. For example, they can synchronize (or clone) data through a communication network, an external device as an intermediary, or a wired connection (such as a data cable). This communication network can be a local area network (LAN) or a wide area network (WAN) relayed by a relay device. When the communication network is a LAN, it can be, for example, a Wi-Fi hotspot network, Wi-Fi P2P network, Bluetooth P2P network, Zigbee network, radio frequency network, or near field communication (NFC) network. In some embodiments, the LAN can be a point-to-point wireless communication network such as Wi-Fi P2P or Bluetooth P2P, allowing old and new devices to synchronize data through a direct connection. When the communication network is a wide area network, for example, the communication network can be the Internet, a cloud service network, a fourth-generation mobile communication technology (4G) network, a fifth-generation mobile communication technology (5G) network, or a future evolved public land mobile network (PLMN), etc.
[0078] by Figure 4 Taking the communication system shown as an example, in some embodiments, the old device can obtain the hardware information of the new device and the random string 01 (or second random string) generated by the new device; then, the old device sends the hardware information of the new device to the server, the server generates a first token based on the hardware information of the new device, and sends the first token to the old device.
[0079] Based on this, when the old device and the new device establish a communication connection and perform data migration, the old device sends the account data and first token used to log in to the account application to the new device. This allows the new device to use the account data and first token to log in to the account application on the new device, eliminating the need for the user to manually re-enter their account and password to log in to the account application on the new device. This simplifies the login process and improves the user experience.
[0080] In this embodiment, random string 01 is generated by a random number generator conforming to national standard cryptography specifications when the new device starts the cloned application (or data migration application). Correspondingly, the old device also generates random string 02 (or the first random string) using a random number generator conforming to national standard cryptography specifications when starting the cloned application. Random strings 01 and 02 are used only to encrypt (or decrypt) account data and the first token during interactions between the new device, the old device, and the server. This ensures the cloned account remains logged in while protecting the security and privacy of data transmission.
[0081] It should be noted that in this embodiment, multiple applications (APPs) can be installed on both the old and new devices, such as account applications and clone applications. When the clone application is launched simultaneously on both the old and new devices and a communication connection is established, data can be migrated from the old device to the new device via the clone application. For example, the old device can use the clone application to migrate the login status of its account application to the new device's account application, enabling automatic login to the account application on the new device.
[0082] For example, such as Figure 5 As shown, after the old device and the new device establish a communication connection, the data on the old device (such as the login status of third-party applications, system applications, and account applications) can be migrated to the new device through application cloning.
[0083] It should be noted that the interaction between the server and electronic devices (such as old and new devices) in the embodiments of this application can all be understood as the interaction between the server and applications running on the electronic devices (such as cloned applications and account applications). The account applications in the embodiments of this application are all associated with electronic devices, and users can log in to accounts registered when using the electronic devices (such as accounts registered by users via mobile phone numbers, email addresses, etc.).
[0084] In some embodiments, the old device and the new device may be electronic devices manufactured by the same manufacturer or by different manufacturers. In the case where the old device and the new device are electronic devices manufactured by the same manufacturer, the server may be a server belonging to the manufacturer of both the old device and the new device.
[0085] It should be noted that when the old and new devices are electronic devices manufactured by different companies, when migrating the login status of the account application on the old device to the account application on the new device, the new device needs to verify the login status of the account application while automatically logging in. For example, the new device can verify this using information (such as mobile phone number, email address, etc.) provided by the user when registering the account on the old device.
[0086] In some embodiments, the first electronic device 10 and the second electronic device 20 in the communication system may be, for example, a mobile phone, a laptop, a tablet computer, a large-screen display device, a desktop computer, a laptop computer, a handheld computer, an in-vehicle device, an ultra-mobile personal computer (UMPC), a netbook, as well as a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) / virtual reality (VR) device, etc. The embodiments of this application do not impose special limitations on the specific form of the electronic devices.
[0087] like Figure 6 The diagram shows a structural schematic of an electronic device 100, which can be, for example, the first electronic device 10 and the second electronic device 20 described in the above embodiments. The electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, a positioning module 181, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
[0088] It is understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 100. In other embodiments, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0089] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0090] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.
[0091] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0092] In some embodiments, the processor 110 may include one or more interfaces. 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.
[0093] It is understood that the interface connection relationships between the modules illustrated in this embodiment are merely illustrative and do not constitute a structural limitation on the electronic device. In other embodiments, the electronic device may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0094] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via a USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.
[0095] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, external memory, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.
[0096] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0097] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0098] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini-LED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc.
[0099] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0100] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization of image noise, brightness, and color. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.
[0101] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device may include one or N cameras 193, where N is a positive integer greater than 1.
[0102] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when an electronic device is selecting a frequency, a DSP can perform a Fourier transform on the frequency energy.
[0103] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. Thus, the electronic device can play or record video in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.
[0104] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.
[0105] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0106] Audio module 170 is used to convert digital audio information into analog audio signal output, and also to convert analog audio input into digital audio signal. Audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, audio module 170 may be located in processor 110, or some functional modules of audio module 170 may be located in processor 110. Speaker 170A, also called a "loudspeaker," is used to convert audio electrical signals into sound signals. Receiver 170B, also called a "handset," is used to convert audio electrical signals into sound signals. Microphone 170C, also called a "microphone" or "microphone," is used to convert sound signals into electrical signals.
[0107] The 170D headphone jack is used to connect wired headphones. The 170D headphone jack can be a USB 130 interface or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.
[0108] The external storage 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 storage interface 120 to perform data storage functions. For example, audio and video files can be stored on the external memory card.
[0109] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in internal memory 121. For example, in this embodiment, processor 110 can execute instructions stored in internal memory 121, which may include a program storage area and a data storage area.
[0110] The program storage area can store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.). The data storage area can store data created during the use of the electronic device (such as audio data, phonebook, etc.). Furthermore, the internal memory 121 can include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0111] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. Indicator 192 can be an indicator light, used to indicate charging status, battery level changes, messages, missed calls, notifications, etc. SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with the electronic device. The electronic device can support one or N SIM card interfaces, where N is a positive integer greater than 1. SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.
[0112] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of hardware and software.
[0113] The account cloning method provided in the embodiments of this application will be described in detail below with reference to the accompanying drawings. It should be understood that the technical solutions described in the following embodiments are merely illustrative examples of the embodiments of this application and do not constitute a limitation on this application.
[0114] It should be noted that, in this embodiment of the application, before the data migration between the old device and the new device, the old device can obtain the hardware information of the new device and the random string 01 generated by the new device, and report the hardware information of the new device to the server, which then generates a first token based on the hardware information of the new device. The server then sends the generated first token to the old device.
[0115] Subsequently, when the old device and the new device establish a connection and perform data migration, the old device sends the first token sent by the server and the account data of the account application logged in on the old device to the new device, so that the new device can automatically log in to the account application based on the first token and the account data.
[0116] It should be understood that in this embodiment, the old device and the new device are respectively equipped with a cloned application and an account application. Based on this, the old device can migrate the login status of the account application on the old device to the account application on the new device via the cloned application. Therefore, the interaction between the server and electronic devices (such as the old device and the new device) in this embodiment, as well as the interaction between the old device and the new device, can be understood as the interaction between the server and the applications running on the electronic devices (such as the cloned application and the account application), and the interaction between the applications on the old device and the applications on the new device.
[0117] Please refer to Figure 7 This diagram illustrates the architecture of a communication system comprising a first electronic device 10 (or legacy device), a second electronic device 20 (or new device), and a server 30. The embodiments of this application are described herein in conjunction with... Figure 7 The schematic diagram of the communication system illustrates the specific implementation process of the first electronic device 10, the second electronic device 20, and the server 30 collaboratively completing the login state application of the old device's account cloned by the new device. Figure 7 As shown, the process may include steps ①-9.
[0118] Step 1: After the cloning application starts on the new device, it generates a QR code based on its hardware information and a random string "01". The old device then scans the new device's QR code to obtain its hardware information and the random string "01". Step 2: The old device's cloning application notifies its account application that it needs to clone the account application's login status. Step 3: The old device's account application sends a token request to the server. This token request carries the new device's hardware information. Step 4: The server issues the first token to the old device. Step 5: The old device's account application notifies the cloning application that cloning is possible, and simultaneously encrypts its account data and the first token. During steps 2-5, the old device's network is connected, meaning it has a communication network.
[0119] Step 6: The old device cloning application sends encrypted account data and the first token, along with the old device's hardware information and the random string "02," to the new device. During step 6, the old device is connected to the new device's Wi-Fi hotspot. Step 7: The new device cloning application notifies the new device's account application that the cloning process is complete. The new device's account application decrypts the account data and the first token and logs in. Step 8: The new device sends its hardware information and the first token to the server. Step 9: The server verifies the new device's hardware information and the first token and sends a second token (or second access token) to the new device.
[0120] The following examples illustrate the methods provided in the embodiments of this application.
[0121] (1) The old device obtains the first token.
[0122] In some embodiments, such as Figure 8 As shown, the process of the old device obtaining the first token may include S101-S108.
[0123] S101. The new device receives the first operation input by the user and starts the new device cloning application.
[0124] When the new device clone application (or the first application, the first APP) is launched, it generates a random string "01". For example, the new device clone application generates the random string "01" using a random number generator that conforms to national standard cryptographic specifications.
[0125] It should be noted that, in this embodiment of the application, the random string 01 is used to encrypt (or decrypt) the account data on the first token and the old device account application.
[0126] In some embodiments, after the new device clone application is launched, the new device checks whether the version information (or version) of the new device clone application is greater than or equal to a preset version information (or preset version). If the version information of the new device clone application is less than the preset version information, the new device is not allowed to clone the login status of the old device account application. If the version information of the new device clone application is greater than or equal to the preset version information, the new device calls the account interface to determine the login status of the new device account application. If the login status of the new device account application is logged in, the new device is not allowed to clone the login status of the old device account application; correspondingly, if the login status of the new device account application (or second application, second APP) is not logged in, the new device is allowed to clone the login status of the old device account application.
[0127] For example, when a new device calls the account interface to obtain the login information of the new device's account application, if the returned login information is true, it means that the new device's account application is logged in, and the new device is not allowed to clone the login status of the old device's account application. Conversely, if the returned login information is false, it means that the new device's account application is not logged in, and the new device is allowed to clone the login status of the old device's account application.
[0128] In this way, after the cloned application is launched on the new device, the new device can detect the version information of the cloned application. If the version information of the cloned application is lower than the preset version information, the login status of the old device's account application will not be allowed to be cloned, which helps reduce device power consumption. At the same time, if the version information of the cloned application is greater than or equal to the preset version information, the new device can also detect the login status of the new device's account application. If the login status of the new device's account application is already logged in, the login status of the old device's account application will not be allowed to be cloned, which can further reduce device power consumption.
[0129] It should be noted that, in the embodiments of this application, the preset version information refers to the new device cloning application being a version that supports cloning.
[0130] S102, New Device Cloning Application obtains hardware information of new device.
[0131] The hardware information of the new device can be, for example, a device identification code (subsystem-identification, SID / SSID). In some embodiments, the SID / SSID can also be referred to as a sub-ID device identification code.
[0132] For example, the new device cloning application can send a message to the new device account application to obtain hardware information; after receiving the message from the new device cloning application, the new device account application queries the hardware information of the new device and transmits the queried hardware information of the new device to the new device cloning application.
[0133] S103, New device cloning application generates QR code.
[0134] The QR code generated by the new device cloning application contains the hardware information of the new device and the random string "01".
[0135] S104. The old device receives the second operation input by the user and starts the old device cloning application.
[0136] It should be noted that the first operation and the second operation in the embodiments of this application can be, for example, touch operation, voice operation, etc.; wherein the touch operation can be a click operation, a swipe operation, etc., and the embodiments of this application do not limit this.
[0137] When the old device cloning application starts, it generates a random string "02". For example, the old device cloning application can generate the random string "02" using a random number generator that conforms to national standard cryptographic specifications.
[0138] It should be noted that, in this embodiment of the application, the random string 02 is used to encrypt (or decrypt) the account data on the first token and the old device account application.
[0139] S105. The old device cloning application calls the camera to scan a QR code and obtain relevant data of the new device.
[0140] For example, the data related to the new device includes the new device's hardware information and a random string "01". For instance, after the old device cloning application scans a QR code using the camera, it parses the QR code to obtain the new device's hardware information and the random string "01".
[0141] In some embodiments, after the old device acquires relevant data from the new device, the old device can detect whether the version information of the cloned application is greater than or equal to a preset version information, i.e., the version of the cloned application is a version that supports cloning. If the version information of the cloned application is less than the preset version information, the old device will not transmit relevant data of the new device to the old device account application.
[0142] In this way, after the old device obtains the relevant data from the new device, the old device checks the version information of the cloned application. If the version information of the cloned application is lower than the preset version information, the old device will not transmit the relevant data of the new device to the old device account application, which helps to reduce device power consumption.
[0143] It should be understood that if the version information of the cloned application on the old device is greater than or equal to the preset version information, the old device will transfer the relevant data of the new device to the old device account application. In this embodiment, the old device can continue to perform the following steps.
[0144] S106. The old device cloning application transfers relevant data of the new device to the old device account application.
[0145] S107. The old device account application sends the hardware information of the new device to the server.
[0146] Correspondingly, the server receives the hardware information of the new device sent by the old device account application, and generates the first token based on the hardware information of the new device.
[0147] S108, The server sends the first token to the old device account application.
[0148] Correspondingly, the old device account application receives the first token sent by the server.
[0149] In some embodiments, the old device account application returns a clone flag to the old device cloning application. Specifically, if the old device account application successfully receives the first token sent by the server, cloning is possible. For example, if the old device account application successfully receives the first token sent by the server, the clone flag returned by the old device account application to the old device cloning application is true; conversely, if the old device account application fails to receive the first token sent by the server, the clone flag returned by the old device account application to the old device cloning application is false.
[0150] It should be noted that, in this embodiment, if the old device account application successfully receives the first token sent by the server, the old device account application returns a cloning flag (true) to the old device clone application. In this way, the new device can clone the login state of the old device account application through the clone application.
[0151] In some embodiments, after the old device account application returns a cloning-ready flag (true) to the old device clone application, the old device clone application disconnects from the network to break its communication connection with the server. Then, the old device clone application establishes a communication connection with the new device clone application.
[0152] In this scenario, disconnecting the network connection from the old device cloning application prevents it from interacting with the server, ensuring that the old and new device cloning applications can clone normally and improving the reliability of the cloning process.
[0153] (2) The new device clones the login status of the old device's account application.
[0154] In some embodiments, such as Figure 9 As shown, the process of cloning the login state of an old device's account application on a new device may include S201-S210.
[0155] S201. The new device cloning application establishes a communication connection with the old device cloning application.
[0156] In some embodiments, the old and new devices can establish a communication connection via a wired or wireless connection, enabling the cloned application on the new device to communicate with the cloned application on the old device. For example, the old device can connect to the Wi-Fi hotspot of the new device.
[0157] It should be noted that the examples of wired or wireless connection methods can be found in the above embodiments, and will not be repeated here.
[0158] In other embodiments, the old device clone application and the new device clone application can log in to the same account so that the new device clone application can establish a communication connection with the old device clone application.
[0159] In conjunction with the above embodiments, when the old device account application successfully receives the first token sent by the server, the old device account application will return a cloneable flag (true) to the old device clone application. In this way, the old device clone application determines that the login state of the old device account application can be cloned based on the cloneable flag.
[0160] Based on this, such as Figure 10 As shown, the legacy device cloning application can display a first interface; this first interface contains at least one piece of data to be migrated. This at least one piece of data to be migrated includes the first account logged in on the legacy device account application, as well as data from other third-party applications, system applications, etc. It should be understood that because the legacy device account application returns a cloning flag (true) to the legacy device cloning application, therefore... Figure 10 In the first interface shown, the first account can be selected in response to the user's operation.
[0161] Alternatively, the first interface includes multiple APP identifiers and an identifier for the old device account application; wherein, the multiple APP identifiers are used to select whether to clone the corresponding APP, and the identifier for the old device account application is used to select whether to clone the login information of the old device account application. In this embodiment, the multiple APP identifiers and the identifier for the old device account application correspond to at least one piece of data to be migrated.
[0162] S202, The old device clone application sends a first message to the old device account application. This first message notifies the old device account application to send the login information of the first account to the old device clone application.
[0163] For example, in combination Figure 10 As shown, the old device cloning application receives the user's selection of the first account and, in response to the first operation, sends a first message to the old device account application.
[0164] It should be noted that, in this embodiment of the application, the login information of the first account refers to the information of the account logged in on the old device account application.
[0165] S203, The old device account application encrypts the login information of the first account.
[0166] For example, the old device account application uses random string 01, random string 02, the old device's hardware information, and the new device's hardware information to generate a first symmetric encryption key; then the old device uses the first symmetric encryption key to encrypt the login information of the first account.
[0167] In some embodiments, the legacy device account application can encrypt the login information of the first account using an encryption algorithm that conforms to national standard cryptographic specifications. For example, the legacy device account application can use a symmetric strong encryption algorithm to encrypt the login information of the first account. Examples include Advanced Encryption Standard (AES) and Data Encryption Standard (DES).
[0168] It should be noted that in this embodiment of the application, the old device uses a symmetric key to encrypt the login information of the first account. Since the symmetric key can be used to encrypt and decrypt the login information of the first account using the same key, the security of data interaction can be improved, as well as the speed of encryption and decryption can be increased.
[0169] S204. The old device account application transmits encrypted login information of the first account to the old device clone application, as well as the random string 02 and the hardware information of the old device.
[0170] S205. The old device cloning application sends encrypted login information of the first account, along with a random string 02 and hardware information of the old device, to the new device cloning application.
[0171] S206. The new device cloning application sends a second message to the new device account application; wherein, the second message is used to notify the new device account application that the cloning is complete, and the second message carries random string 01, random string 02, hardware information of the new device and hardware information of the old device.
[0172] S207. New device account application decrypts the login information of the first account.
[0173] For example, the new device account application uses random string 01, random string 02, the hardware information of the old device, and the hardware information of the new device to generate a second symmetric encryption key; wherein, the second symmetric encryption key is used to decrypt the login information of the first account.
[0174] S208. The new device account application sends a login request message to the server. The login request message carries the hardware information of the new device and the first token.
[0175] S209. The server sends a login response message to the new device account application. This login response message indicates that the new device account application is allowed to log in to the first account.
[0176] S210. The new device account application uses the login information of the first account to automatically log in to the first account on the new device account application.
[0177] It should be noted that the security levels of automatic login include low-level login, medium-level login, and high-level login; among them, the security coefficients of different levels of automatic login are different; for example, the security coefficient of low-level login is the lowest, the security coefficient of high-level login is the highest, and the security coefficient of medium-level login is between that of low-level login and high-level login.
[0178] In this embodiment, after the server receives a login request message from a new device account application, the server verifies the security level of the first token carried in the login request message. Typically, automatic login using a token has a low security level; therefore, the server sends a low-level login response message to the new device account application.
[0179] In some embodiments, after the new device account application completes automatic login, such as Figure 11 As shown, when the new device account application is launched, it displays a second interface, which is the interface where the new device account application is already logged into the first account. (Reference) Figure 11 As shown, the second interface includes account data (such as username, account avatar, etc.) of the logged-in first account. The username can be a system-assigned account, the user's mobile phone number (or email address), or a name set by the user.
[0180] In summary, in this embodiment, since the server generates a first token based on the hardware information of the new device and sends the first token to the old device account application, when cloning the first account logged in on the old device account application on the new device, the old device can send the account data and the first token of the old device account application to the new device account application. In this way, the new device account application can use the account data and the first token to log in to the first account on the new device account application, thereby realizing the cloning of the login state of the old device account application. This eliminates the need for the user to manually enter the login password on the new device account application, simplifying the login operation and improving the user experience.
[0181] Considering the expiration of tokens, if a new device account uses a token to log in to the first account, and the token expires, the new device account will be logged out. This forces the user to re-enter their password, impacting the user experience. Therefore, in some embodiments, such as... Figure 12 As shown, the account cloning method provided in this application embodiment also includes: S211-S212.
[0182] S211. The new device account application sends the hardware information and first token of the new device to the server.
[0183] For example, after the new device cloning application completes the cloning of the old device account application, when the new device account application starts, it sends the hardware information of the new device and the first token to the server for verification.
[0184] S212, The server sends a second token to the new device account application.
[0185] The second token is used to maintain the login status of the first account on the new device account application.
[0186] For example, if the server successfully verifies the hardware information of the new device and the first token, the server sends a second token, namely a new access token, to the new device account application so that the new device account application can log in using the new token.
[0187] In some embodiments, the new device account application can periodically send the hardware information of the new device and a first token to the server for verification. If the server verifies the information, it can periodically send a new token to the new device account. This allows the new device account application to log in using the periodically sent tokens, further improving the user experience.
[0188] Still Figure 12 As shown, in some embodiments, the account cloning method provided in this application further includes: S213.
[0189] S213, The server sends a notification message to the old device account application.
[0190] The notification message is used to notify the user to log in to the account application on the second electronic device using the first account.
[0191] In some embodiments, the notification message may include one or more of a message pop-up (PUSH), SMS, or email.
[0192] Correspondingly, after receiving the notification message from the server, the old device account application displays the notification message on its screen. In this way, the user can know that the first account is logged in on the new device account application based on the notification message displayed in the old device account application.
[0193] It should be noted that, in this embodiment, the user can receive notification messages sent by the server based on the mobile phone number or email address reserved when registering the first account. Furthermore, if the SIM card corresponding to the mobile phone number is on another electronic device (such as a tablet), or if the email address is logged in on another device (such as a tablet), the server will send the notification message to that other electronic device, which will then display the notification message on its screen.
[0194] Furthermore, as can be seen from the above embodiments, the account cloning method provided in this application is implemented through the interaction of an old device, a new device, and a server. To improve the security of data transmission between the old device, the new device, and the server, in this application embodiment, the old device and the new device can interact using a symmetric encryption algorithm (AES) with a counter mode channel protocol (i.e., AES-GCM-256); the old device and the server; or the new device and the server, can interact using a Hypertext Transfer Protocol over Secure Socket Layer (HTTPS) and Elliptic Curve Key Exchange (ECDH) channel protocol (i.e., HTTPS+ECDH).
[0195] It should be noted that the contents described in the various embodiments of this application can explain and illustrate the technical solutions in other embodiments of this application. The technical features described in the various embodiments can also be applied in other embodiments and combined with the technical features in other embodiments to form new solutions. This application only provides an exemplary list of several embodiments for illustration and does not mean that this application is limited thereto.
[0196] This application provides an electronic device, which can be either a first electronic device or a second electronic device. The electronic device may include a display screen, a memory, and one or more processors; the memory stores computer program code, which includes computer instructions. When the computer instructions are executed by the processor, the electronic device can perform the various functions or steps performed by the old and new devices described in the above embodiments. The structure of the electronic device can be referred to... Figure 6 The structure of the electronic device 100 shown.
[0197] This application also provides a chip system, such as... Figure 13 As shown, the chip system 1800 includes at least one processor 1801 and at least one interface circuit 1802. The processor 1801 can be one of the types described in the above embodiments. Figure 6 The processor 110 is shown. The interface circuit 1802 can be, for example, an interface circuit between the processor 110 and external memory; or an interface circuit between the processor 110 and internal memory 121.
[0198] The processor 1801 and interface circuit 1802 described above can be interconnected via lines. For example, interface circuit 1802 can be used to receive signals from other devices (e.g., the memory of an electronic device). As another example, interface circuit 1802 can be used to send signals to other devices (e.g., processor 1801). Exemplarily, interface circuit 1802 can read instructions stored in memory and send those instructions to processor 1801. When the instructions are executed by processor 1801, the electronic device can perform the steps performed by the old and new devices in the above embodiments. Of course, this chip system may also include other discrete components, which are not specifically limited in this application embodiment.
[0199] This application also provides a computer-readable storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform various functions or steps performed by the old and new devices in the above method embodiments.
[0200] This application also provides a computer program product that, when run on a computer, causes the computer to perform various functions or steps performed by the old and new devices in the above method embodiments.
[0201] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0202] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0203] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0204] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0205] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially or in other words, the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0206] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. An account cloning method, characterized by, A method for a first electronic device to clone login information of a second application (APP) in the first electronic device to a second electronic device through a first APP of the first electronic device The first electronic device is communicatively connected to the second electronic device; the method comprises: The first electronic device displays a first interface of the first APP in response to a first operation on the first APP; the first interface comprises the identification of a plurality of APPs and the identification of the second APP, the identification of the plurality of APPs being used to select whether to clone the corresponding APP, and the identification of the second APP being used to select whether to clone the login information of the second APP; The first electronic device sends the login information of the first account to the second electronic device in response to the selection operation of the user on the identification of the second APP in the first interface; wherein the first electronic device logs in the first account in the second APP; the login information of the first account comprises account data and a first access token, the account data comprises an account name and an account avatar; the first access token is assigned by the server of the second APP for the second electronic device, and is used for the second electronic device to automatically log in the first account on the second APP of the second electronic device.
2. The method of claim 1, wherein, Before the login information of the first account is sent to the second electronic device, the method further comprises: When the first electronic device starts the first application, a first random string is randomly generated; The first electronic device obtains a second random string and hardware information of the second electronic device from the second electronic device through the first APP; The first electronic device generates a first symmetric encryption key by using the first random string, the second random string, the hardware information of the first electronic device and the hardware information of the second electronic device; The first electronic device encrypts the login information of the first account by using the first symmetric encryption key; The first electronic device sends the encrypted login information of the first account to the second electronic device. The first electronic device obtains a second random string and hardware information of the second electronic device from the second electronic device through the first APP, comprising:
3. The method of claim 2, wherein, The first electronic device calls the camera to scan a two-dimensional code provided by the first APP on the second electronic device; wherein the two-dimensional code is used to provide the hardware information of the second electronic device and the second random string; The first electronic device obtains the hardware information of the second electronic device and the second random string from the two-dimensional code. After the first electronic device obtains a second random string and hardware information of the second electronic device from the second electronic device through the first APP, the method further comprises:
4. The method according to claim 2 or 3, characterized in that, The first electronic device reports the hardware information of the second electronic device to the server to request to obtain a token for the second electronic device to log in the second APP; The first electronic device receives the first access token from the server. 5. The method according to any one of claims 1-3, characterized in that, Before the first electronic device sends the login information of the first account to the second electronic device, the method further comprises: The first electronic device determines that the version of the first APP is greater than or equal to a preset version.
6. The method according to any one of claims 1-3, characterized in that, After the first electronic device sends the login information of the first account to the second electronic device, the method further comprises: The first electronic device closes the network connection of the first electronic device to disconnect the communication connection with the server.
7. The method according to any one of claims 1-3, characterized in that, The method further comprises: The first electronic device receives a notification message from the server; the notification message is used to notify the user that the first account is logged in on the second APP of the second electronic device.
8. An account cloning method, characterized by, For the second electronic device to clone the login information of the second APP in the first electronic device through the first application APP; The second electronic device is in communication connection with the first electronic device; the method comprises: The second electronic device receives the login information of the first account from the first electronic device; wherein the login information of the first account includes account data and a first access token, the account data includes account name and account avatar; the first access token is allocated by the server of the second APP for the second electronic device; The second electronic device sends a login request of the first account to the server to automatically log in the first account on the second APP of the second electronic device; wherein the first account login request carries the hardware information of the second electronic device and the first access token.
9. The method of claim 8, wherein, The method further comprises: The first electronic device receives a second access token from the server, which is used to maintain the login state of the first account on the second APP of the second electronic device.
10. The method according to claim 8 or 9, characterized in that, The login information of the first account is encrypted; the method further comprises: The second electronic device obtains a first random string and the hardware information of the first electronic device from the first electronic device; When the second electronic device starts the first APP, a second random string is randomly generated; The second electronic device generates a second symmetric encryption key by using the first random string, the second random string, the hardware information of the first electronic device and the hardware information of the second electronic device; After the second electronic device receives the login information of the first account from the first electronic device, the method further comprises: The second electronic device decrypts the encrypted login information of the first account by using the second symmetric encryption key to obtain the unencrypted login information of the first account.
11. The method of claim 10, wherein, Before the second electronic device receives the login information of the first account from the first electronic device, the method further comprises: After the second electronic device starts the first APP, a two-dimensional code is displayed; wherein the two-dimensional code is used to provide the hardware information of the second electronic device and the second random string.
12. The method of claim 11, wherein, Before the second electronic device receives the login information of the first account from the first electronic device, the method further comprises: The second electronic device determines that the version of the first APP is greater than or equal to a preset version.
13. The method according to claim 11 or 12, characterized in that, The method further comprises: The second electronic device determines that the first APP does not log in an account.
14. An electronic device, comprising: The method comprises the following steps: A display screen, a memory and one or more processors; the display screen, the memory and the processor are coupled; the memory is used for storing computer program code, the computer program code comprises computer instructions; when the processor executes the computer instructions, the electronic device executes the method as claimed in any one of claims 1-7; or executes the method as claimed in any one of claims 8-13.
15. A communication system, characterized by The method comprises the following steps: A first electronic device, a second electronic device and a server; the first electronic device and the second electronic device are communicatively connected; The first electronic device is used for executing the method as claimed in any one of claims 1-7; the second electronic device is used for executing the method as claimed in any one of claims 8-13.
16. A computer readable storage medium characterized by: The computer instructions comprise the following steps: when the computer instructions run on an electronic device, the electronic device executes the method as claimed in any one of claims 1-7; or executes the method as claimed in any one of claims 8-13.
Citation Information
Patent Citations
Method, electronic equipment and system for authorizing by using other equipment
CN114722377A