Disclosure of Invention
In view of the above disadvantages of the prior art, an object of the present invention is to provide an account synchronization method, medium, and terminal based on NFC, which are used to solve the problem in the prior art that account synchronization between a vehicle and a mobile phone cannot be achieved.
In order to achieve the above objects and other related objects, the present invention provides an account synchronization method based on NFC, which is used for implementing account synchronization between a first terminal and a second terminal, and the account synchronization method based on NFC includes: the first terminal and the second terminal close to the first terminal establish NFC connection; the first terminal and the second terminal both have NFC functions, the first terminal acquires account login information of an application program corresponding to the application program to be logged in with the first terminal in the second terminal based on NFC connection, and the application program to be logged in is logged in by using the account login information.
In an embodiment of the present invention, an implementation process in which the first terminal acquires account login information of an application corresponding to an application to be logged in by the first terminal in the second terminal based on NFC connection, and logs in the account login information of the application to be logged in by using the account login information includes: the first terminal starts a first application program and generates an NFC identity authentication entrance for logging in the first application program; the first terminal acquires account login information corresponding to the first application program in the second terminal based on NFC connection; and the first terminal inputs the account login information into the NFC identity authentication entrance for identity authentication so as to log in the first application program.
In an embodiment of the present invention, an implementation process of acquiring, by the first terminal based on the NFC connection, the account login information corresponding to the first application in the second terminal includes: the first terminal generates an electronic tag according to the first application program and the identity information of the first terminal, and prompts the second terminal to approach; and the first terminal and the second terminal which is close to the first terminal establish NFC connection, so that the second terminal feeds account login information which is authorized according to the electronic tag and corresponds to the first application program back to the first terminal.
In an embodiment of the present invention, an implementation method for acquiring, by a first terminal, account login information of an application program corresponding to an application program to be logged in by the first terminal in a second terminal based on NFC connection, and logging in the application program to be logged in by using the account login information includes: the first terminal acquires a program starting instruction and account login information sent by the second terminal based on NFC connection; and the first terminal starts the application program to be logged in according to the program starting instruction and logs in the application program to be logged in according to the account login information.
In an embodiment of the present invention, the first terminal obtains a relevant file of the first application program in the second terminal through the NFC connection; the related files comprise an operation record file, a cache file and a configuration file; and the first application program of the first terminal calls the related file in the running process.
In an embodiment of the present invention, the method for synchronizing an account based on NFC further includes: the first terminal checks the login state of the application program to be logged in; and if the application program to be logged in is in the non-login state and the first terminal does not store the corresponding account login information, prompting the user to establish NFC connection with the surrounding second terminals.
In an embodiment of the present invention, the method for synchronizing an account based on NFC further includes: the first terminal stores the acquired account login information of the application program to a local memory; or the first terminal replaces the acquired account login information with the original account login information stored in the memory.
In an embodiment of the present invention, the first terminal is a car machine, and the second terminal is a mobile phone.
The present invention also provides a computer-readable storage medium having stored thereon a computer program that, when invoked, implements the NFC-based account synchronization method of the present invention.
The present invention also provides a terminal, including: a memory storing a computer program; the processor is in communication connection with the memory and executes the account synchronization method based on NFC when the computer program is called; the NFC module is in communication connection with the processor and used for establishing NFC connection with surrounding equipment; a display, communicatively coupled to the processor and the memory, for displaying a GUI interaction interface related to the NFC-based account synchronization method
As described above, according to the NFC-based account synchronization method, medium, and terminal of the present invention, the account synchronization between the first application program in the first terminal and the corresponding application program in the second terminal can be achieved by establishing an NFC connection between the first terminal and the second terminal. When the first terminal is a vehicle machine and the second terminal is a user mobile phone, the account synchronization method based on NFC can quickly and conveniently realize account synchronization of a vehicle end application program and a mobile phone end application program without requiring a driver and a crew to input complex account and password information at the vehicle end.
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention, and the components related to the present invention are only shown in the drawings rather than drawn according to the number, shape and size of the components in actual implementation, and the type, quantity and proportion of the components in actual implementation may be changed freely, and the layout of the components may be more complicated.
The car machine is a vehicle-mounted information entertainment product installed in an automobile, and can realize information communication between people and the automobile and between the automobile and the outside (automobile and automobile) functionally, and the information communication between the car machine and other equipment is mainly realized through Bluetooth, a wireless local area network and NFC. Similar to a mobile phone, a car machine also has an operating system, and various car machine versions APPs, such as a navigation APP, a communication APP, a social APP, a radio station APP, and the like, are already available in the market at present. However, unlike a cellular phone, the main users of a car machine are a driver and a passenger, with the driver being the vast majority. The driver needs to keep attention concentrated in the driving process, a user often needs to input a complex password for ensuring the information security of the user by a plurality of APPs when logging in, and account synchronization between a vehicle and a mobile phone cannot be realized in the prior art, so that great inconvenience is brought to the driver who is driving. To solve the problem, the invention provides an account synchronization method based on NFC, which is used for realizing account synchronization between a first terminal and a second terminal, wherein the first terminal and the second terminal both have an NFC function, and the account synchronization method based on NFC comprises the following steps: the first terminal and the second terminal close to the first terminal establish NFC connection; the first terminal acquires account login information of an application program corresponding to the application program to be logged in with the first terminal in the second terminal based on NFC connection, and logs in the application program to be logged in by using the account login information. The account synchronization method based on the NFC can realize account synchronization between the first terminal and the second terminal by establishing the NFC connection between the first terminal and the second terminal, so that a driver and a passenger can conveniently and quickly log in the APP on the vehicle.
Referring to fig. 1, in an embodiment of the present invention, the method for synchronizing an account based on NFC includes:
s1, the first terminal and the second terminal close to the first terminal establish NFC connection. The NFC connection establishment procedure may be implemented by the prior art, and a common NFC connection establishment procedure includes: opening the NFC functions of the first terminal and the second terminal and enabling the first terminal and the second terminal to approach each other; and the first terminal sends a connection request to the second terminal, the second terminal receives and confirms the request, and then the connection between the first terminal and the second terminal is established.
S2, the first terminal acquires account login information of an application program corresponding to the application program to be logged in with the first terminal in the second terminal based on NFC connection, and logs in the application program to be logged in by using the account login information.
After the account login information of the corresponding application program in the second terminal is obtained, the first terminal can automatically log in the application program to be logged in by using the account login information. The application program to be logged in by the first terminal and the corresponding application program in the second terminal can be different versions of the same application program, such as vehicle end WeChat and mobile phone end WeChat; the application program to be logged in by the first terminal and the corresponding application program in the second terminal may also be related application programs, for example, the corresponding application program in the second terminal is a wechat, and the application program of the first terminal is already related to the wechat, that is, the login can be realized by using an account password of the wechat.
The automatic login can be realized by utilizing the self-contained automatic login function of the existing application program, and the first terminal can also be provided with a master control software which controls the application program to log in.
Referring to fig. 2, in an embodiment of the present invention, an implementation process of the first terminal obtaining account login information of an application corresponding to an application to be logged in by the first terminal in the second terminal based on NFC connection, and logging in the application to be logged in by using the account login information includes:
and S21, the first terminal starts a first application program. The first terminal may launch the first application in a variety of ways, such as double-clicking an icon of the first application on a screen of the first terminal, launching the first application by voice, or launching the first application by gesture. The first application program is an application program which the first terminal wants to log in.
And S22, the first terminal generates an NFC identity authentication entrance for logging in the first application program. After the first application program is started, if the first application program cannot realize automatic login, the first terminal starts the NFC and generates an NFC identity authentication entrance of the first application program. The NFC identity authentication portal can provide an account and password input interface for a user.
Preferably, the first terminal prompts the user to establish an NFC connection with the surrounding terminals, and the prompting may be implemented in various ways, such as a pop-up window, a prompt tone, and the like. After receiving the prompt, the user moves other terminals to a range where NFC connection with the first terminal can be established, for example: within 10 centimeters around the first terminal; in addition, if the other terminal does not start the NFC function or does not log in the corresponding program, the user needs to start the NFC function of the other terminal and log in the corresponding program.
In this embodiment, the first terminal establishes an NFC connection with the second terminal and operates in a point-to-point communication mode, thereby implementing bidirectional communication between the first terminal and the second terminal.
The peer-to-peer communication mode allows a communication link to be established between two NFC devices and data to be exchanged, and is different from the card reader and the card mode in that data interaction is bidirectional in the peer-to-peer communication mode. The NFC peer-to-peer communication mode follows ISO18092 specification, and after connection is established, both communication parties use NDEF (NFC Data Exchange Format) Format for Data transmission. In this embodiment, the first terminal is called an initiating device as a party initiating communication; the second terminal is used as target equipment. The NFC point-to-point communication has an active mode and a passive mode, wherein in the active mode, the initiating device and the target device respectively generate radio frequency signals for communication, and the mode is also a default point-to-point communication mode of ISO18092 specifications; in the passive mode, the initiator device generates a radio frequency signal for communication, and the target device responds to the initiator device's request and selects the radio frequency magnetic field emitted by the initiator device.
And S23, the first terminal acquires account login information corresponding to the first application program in the second terminal based on NFC connection. The account login information includes account information and password information of the program. And in the NFC point-to-point communication mode, the first terminal acquires the account login information through NFC connection.
And S24, the first terminal inputs the account login information into the NFC identity authentication entrance for identity authentication so as to log in the first application program. And the first terminal forwards the account login information to the NFC identity authentication entrance after acquiring the account login information, and the first application program realizes automatic login of the program by utilizing the account login information.
Referring to fig. 3, in an embodiment of the present invention, an implementation process of the first terminal obtaining the account login information corresponding to the first application program in the second terminal based on the NFC connection includes:
s231, the first terminal generates an electronic tag according to the first application program and the identity information of the first terminal, and prompts that the second terminal approaches.
The electronic tag is a non-contact automatic identification technology, and aims of identity authentication, authentication and the like are achieved by identifying a target object through a radio frequency signal and acquiring related data. NFC is a near field communication technology, which in combination with an electronic tag enables authentication between terminals. In this embodiment, the first terminal generates a corresponding electronic tag according to the first application and the identity information of the first terminal, where the identity information of the first application may include information such as a program name and a program version, and the identity information of the first terminal is, for example, a MAC address of the first terminal, an IMEI number of the first terminal, and the like. Preferably, the first application program and the identity information of the first terminal are encrypted to generate a corresponding electronic tag. After the first terminal generates the electronic tag, prompting a user to move a second terminal to a position where the first terminal can be connected through NFC, for example: within 10 centimeters of the circumference of the first terminal.
S232, the first terminal and the second terminal which is close to the first terminal establish NFC connection, so that the second terminal feeds account login information which is authorized according to the electronic tag and corresponds to the first application program back to the first terminal.
In this embodiment, the NFC connection between the first terminal and the second terminal operates in a peer-to-peer communication mode, and the second terminal obtains the electronic tag generated by the first terminal according to the NFC connection and determines whether to authorize the first terminal to obtain account login information of the first terminal. Specifically, the second terminal receives the electronic tag and then identifies the electronic tag so as to obtain the first application program contained in the electronic tag and the identity information of the first terminal. And the second terminal executes corresponding operation according to a specific permission rule. For example: a first white list, a second white list, a common list and a black list are arranged in the second terminal; the first white list comprises terminal information, and if the first terminal is in the first white list, the second terminal automatically authorizes the first terminal to obtain login information of any program; the second white list comprises terminal information and corresponding license program information, and if the first terminal is in the second white list and the first application program is also in the second white list, the second terminal automatically authorizes the first terminal to obtain account information corresponding to the first application program; the blacklist comprises terminal information or/and program information, and if the first terminal or/and the first application program are/is in the blacklist, the second terminal prohibits the first terminal from acquiring account information corresponding to the first application program; and the first terminal which is not positioned outside the first white list, the second white list and the black list is automatically determined to be positioned in the common list, and the first terminal prompts a user to select whether to authorize the first terminal to acquire account information corresponding to the first application program or not by sending specific prompt information. When the user is in a driving state, the first white list mode and the second white list mode are more convenient and faster.
And after the second terminal authorizes the first terminal to obtain account information corresponding to the first application program, the account information is sent to the first terminal through NFC.
In this embodiment, the first terminal serves as an execution main body, and the second terminal cooperates with the first terminal to implement the NFC-based account synchronization method.
Referring to fig. 4, in an embodiment of the present invention, the method for the first terminal to obtain account login information of an application program corresponding to an application program to be logged in of the first terminal in the second terminal based on NFC connection, and log in the application program to be logged in by using the account login information includes:
s41, the second terminal sends a program starting instruction and account login information to the first terminal according to an instruction input by a user; and the first terminal acquires a program starting instruction and account login information sent by the second terminal based on NFC connection.
And S42, the first terminal starts the application program to be logged in according to the program starting instruction and logs in the application program to be logged in according to the account login information. In this embodiment, the second terminal serves as an execution main body, and the first terminal cooperates with the second terminal to implement the NFC-based account synchronization method.
In an embodiment of the present invention, the first terminal obtains the relevant file of the first application program in the second terminal through the NFC connection; the related files comprise an operation record file, a cache file and a configuration file; and the first application program of the first terminal calls the related file in the running process.
The application program often needs a large number of files to support in actual operation, the files include operation record files, configuration files, cache files and the like, for example: the media application program can download a large amount of cache files from the server side during running so as to improve the user experience. After the application program in the first terminal logs in by using the account login information of the corresponding application program in the second terminal, the application program in the first terminal will inevitably acquire a corresponding file again, for example: the cache file is downloaded again from the server, which causes problems of traffic waste, slow loading speed, and the like.
In this embodiment, by using the point-to-point communication function of NFC, the application in the first terminal may directly acquire the relevant file in the second terminal, and a process of acquiring the file from the server is avoided, so that traffic consumption is reduced, and the loading speed is increased.
In an embodiment of the present invention, the NFC-based account synchronization method further includes: the first terminal checks the login state of the first application program; and if the first application program is in the non-login state and the corresponding account login information is not stored, prompting the user to establish NFC connection with the second terminals around. The account login information comprises account information, password information and the like.
After the first application program is started, whether the corresponding account and password information is stored in the current terminal or not is judged, and if the account and the password information exist in the current terminal, the first application program is directly logged in by using the account and the password. And if the first application program cannot realize account login according to the information stored in the current terminal after being started, the first terminal prompts a user to establish NFC connection with the surrounding second terminals.
In an embodiment of the present invention, the NFC-based account synchronization method further includes: and if the first application program in the first terminal fails to log in due to the fact that the account number and the password are not matched, prompting the user to establish NFC connection with surrounding terminals.
The embodiment is suitable for the condition that the account name and the password of the first application program in the first terminal are not matched. If the account name and the password are stored in the first terminal, the first terminal firstly tries to log in automatically by using the account name and the password. If the account name and the password are not matched to cause login failure, the password is updated by the user, and the updated password information needs to be acquired from other terminals. At this time, the first application program reminds the user to establish the NFC connection with the surrounding terminals through forms such as popup windows and prompt tones, and obtains account and password information of the corresponding application program in the surrounding terminals through the NFC connection.
In an embodiment of the present invention, the method for synchronizing an account based on NFC further includes: the first terminal stores the account information to a memory; or the first terminal updates the account information in the memory by using the account information.
In this embodiment, the first terminal obtains account information from the second terminal through NFC and stores the account information in a memory of the first terminal. And if the memory of the first terminal has corresponding account information, updating the account information in the memory by using the account information. Preferably, the updating is performed only when the account information stored in the memory of the first terminal is inconsistent with the acquired account information.
In an embodiment of the present invention, the first terminal is a car machine, and the second terminal is a mobile phone. Please refer to fig. 5, which is a schematic diagram illustrating an implementation structure of the NFC-based account synchronization method in this embodiment. The vehicle machine and the mobile phone establish connection through NFC so as to realize point-to-point communication between the vehicle machine and the mobile phone, which is a hardware basis of the NFC-based account synchronization method. The first application program of the car end corresponds to an application program car model, the application program of the mobile phone end corresponds to an application program mobile phone model, and the application program car model and the application program mobile phone model realize account login information synchronization between the two through software, which is realized by the software of the NFC-based account synchronization method.
The present invention also provides a computer-readable storage medium having stored thereon a computer program that, when invoked by a processor, implements the NFC-based account synchronization method of the present invention. The storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic disk, U-disk, memory card, or optical disk.
Referring to fig. 6, the present invention further provides a terminal 600. The terminal 600 includes: a memory 610 for storing a computer program; a processor 620, communicatively connected to the memory 610, for executing the NFC-based account synchronization method according to the present invention when the computer program is invoked; an NFC module 630, communicatively connected to the processor 620, and configured to establish an NFC connection with a peripheral device; and a display 640, communicatively connected to the processor 620 and the memory 610, for displaying a GUI interactive interface related to the NFC-based account synchronization method.
The protection scope of the account synchronization method based on NFC according to the present invention is not limited to the execution sequence of the steps listed in this embodiment, and all the schemes implemented by adding, subtracting, and replacing the steps in the prior art according to the principle of the present invention are included in the protection scope of the present invention.
According to the account synchronization method based on the NFC, the NFC connection can be established between the first terminal and the second terminal, so that account synchronization between the first application program in the first terminal and the corresponding application program in the second terminal is realized. When the first terminal is a vehicle machine and the second terminal is a user mobile phone, the account synchronization method based on NFC can quickly and conveniently realize account synchronization of a vehicle end application program and a mobile phone end application program, and a driver and a crew do not need to input complex account and password information at the vehicle end.
In conclusion, the present invention effectively overcomes various disadvantages of the prior art and has high industrial utilization value.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which may be made by those skilled in the art without departing from the spirit and scope of the present invention as defined in the appended claims.