NFC-based data synchronization method, device, electronic device and storage medium

Through the NFC-based data synchronization method, the problem of cumbersome and inefficient data synchronization process under device abnormality is solved, and efficient and safe data synchronization between terminals is achieved. Data synchronization instructions are generated on the first terminal and uploaded to the server. , ensuring the versatility and security of data synchronization.

CN114866566BActive Publication Date: 2024-09-24BEIJING CHENGSHI WANGLIN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210445708.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-26
Publication Date
2024-09-24
Estimated Expiration
2042-04-26

AI Technical Summary

Technical Problem

The existing device data synchronization methods are cumbersome and inefficient, especially when the device is abnormal and users cannot operate it, resulting in incomplete or failed data synchronization process.

Method used

Using the NFC-based data synchronization method, the first terminal generates data synchronization instructions, establishes an NFC communication connection with the second terminal, uploads application data to the server, and performs data synchronization after successful account verification to ensure the versatility of data synchronization. and security.

Benefits of technology

It effectively solves the problem of data synchronization on inoperable terminals, improves the versatility of data synchronization between terminals, and ensures the security of data synchronization when account verification is successful.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure HDA0003616740530000011
    Figure HDA0003616740530000011
  • Figure HDA0003616740530000012
    Figure HDA0003616740530000012
  • Figure HDA0003616740530000021
    Figure HDA0003616740530000021
Patent Text Reader

Abstract

The embodiments of the present invention provide a data synchronization method, device, electronic device and storage medium based on NFC, which are applied to a first terminal, respond to a data synchronization operation on the first terminal, determine a target application corresponding to the data synchronization operation and a second terminal, establish an NFC communication connection between the first terminal and the second terminal, transmit a data synchronization instruction to the second terminal so that the second terminal runs the target application according to the data synchronization instruction, and uploads application data of the target application to a server, and responds to an account verification operation on the target application. If the account verification is successful, the application data is obtained from the server, so that the synchronization instruction is sent through NFC, so that the terminal that cannot perform the operation performs data synchronization, thereby improving the universality of data synchronization between terminals, and by transmitting the application data to the server and when the account verification is successful, the first terminal performs data synchronization, thereby effectively ensuring the security of data synchronization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of device communication technology, and in particular to a data synchronization method based on NFC, a data synchronization device based on NFC, an electronic device and a computer-readable storage medium. Background Art

[0002] In the prior art, when a user wants to synchronize data from other devices to the current device, the following method is often used for data transmission: the user can use the synchronization function of the computer to first establish a communication connection between the old device and the computer, and then perform a data upload operation on the old device, and then upload the corresponding local data of the old device to the computer. Then, the new device that needs to synchronize data establishes a communication connection with the computer, logs in to the corresponding application, and then requests data synchronization from the computer. At this time, the computer can import the stored local data to the new device, thereby realizing data synchronization between the old device and the new device.

[0003] However, in the above data synchronization method, if the user does not upload the local data of the old device to the computer in time, the local data synchronized by the new device will be missing or incomplete. If the old device malfunctions and the user cannot control the old device to perform data upload operations, data synchronization cannot be performed. In addition, in the process of data transmission between the old device and the new device, a computer with data synchronization function is required as the synchronization medium, which makes the data synchronization process cumbersome, the synchronization time is long, and the efficiency is low. Summary of the invention

[0004] The embodiments of the present invention provide a data synchronization method, device, electronic device and computer-readable storage medium based on NFC to solve or partially solve the problem that the application data synchronization process is cumbersome and inefficient because the user cannot operate the device when the device is abnormal.

[0005] The embodiment of the present invention discloses a data synchronization method based on NFC, characterized in that the method is applied to a first terminal, the first terminal includes at least one application, and the method includes:

[0006] In response to a data synchronization operation for the first terminal, determining a target application and a second terminal corresponding to the data synchronization operation, generating a data synchronization instruction for the target application, and establishing an NFC communication connection with the second terminal;

[0007] Transmitting the data synchronization instruction to the second terminal so that the second terminal runs the target application and uploads the application data corresponding to the target application to the server according to the data synchronization instruction;

[0008] In response to the account verification operation for the target application, if the account verification result indicates that the account verification is successful, the application data is obtained from the server.

[0009] Optionally, in response to the data synchronization operation on the first terminal, determining a target application and a second terminal corresponding to the data synchronization operation, and generating a data synchronization instruction corresponding to the target application, comprises:

[0010] Display the NFC operation interface;

[0011] In response to a data synchronization operation on the NFC operation interface, a target application corresponding to the data synchronization operation is determined, and if a second terminal is detected within a preset range of the first terminal, a data synchronization instruction for the target application is generated.

[0012] Optionally, generating a data synchronization instruction for the target application includes:

[0013] Obtain the resource path and upload instructions corresponding to the target application;

[0014] The resource path and the upload instruction are used to construct a data synchronization instruction for the target application.

[0015] Optionally, obtaining the resource path and upload instruction corresponding to the target application includes:

[0016] Acquire first account information corresponding to the data synchronization operation, and a resource path and an upload instruction corresponding to the target application;

[0017] The step of using the resource path and the upload instruction to construct a data synchronization instruction for the target application program includes:

[0018] Using the resource path and the upload instruction, construct a resource location link corresponding to the target application;

[0019] The first account information and the resource location link are used to generate a data synchronization instruction for the target application.

[0020] Optionally, transmitting the data synchronization instruction to the second terminal so that the second terminal runs the target application and uploads application data corresponding to the target application to the server according to the data synchronization instruction includes:

[0021] The resource location link is sent to the second terminal, so that the second terminal parses the resource location link to obtain the resource path and the upload instruction, and runs the target application according to the resource path. During the running of the target application, the application data corresponding to the first account information in the target application is obtained according to the upload instruction, and the application data is uploaded to the server.

[0022] Optionally, in response to the account verification operation for the target application, if the account verification result indicates that the account verification is successful, obtaining the application data from the server includes:

[0023] In response to the application data being uploaded, displaying a login interface of the target application;

[0024] In response to a login operation on the login interface, second account information corresponding to the login operation is obtained, and if the first account information is the same as the second account information, application data corresponding to the first account information is obtained from the server.

[0025] The embodiment of the present invention discloses a data synchronization device based on NFC, characterized in that it is applied to a first terminal, the first terminal includes at least one application, and the device includes:

[0026] a data synchronization instruction generating module, configured to, in response to a data synchronization operation on the first terminal, determine a target application and a second terminal corresponding to the data synchronization operation, generate a data synchronization instruction for the target application, and establish an NFC communication connection with the second terminal;

[0027] an application data uploading module, configured to transmit the data synchronization instruction to the second terminal so that the second terminal runs the target application and uploads the application data corresponding to the target application to the server according to the data synchronization instruction;

[0028] The application data acquisition module is used to respond to the account verification operation for the target application program, and if the account verification result indicates that the account verification is successful, obtain the application data from the server.

[0029] Optionally, the data synchronization instruction generation module is specifically used to:

[0030] Display the NFC operation interface;

[0031] In response to a data synchronization operation on the NFC operation interface, a target application corresponding to the data synchronization operation is determined, and if a second terminal is detected within a preset range of the first terminal, a data synchronization instruction for the target application is generated.

[0032] Optionally, the data synchronization instruction generating module further includes:

[0033] A resource path acquisition submodule, used to acquire the resource path and upload instructions corresponding to the target application;

[0034] The data synchronization instruction construction submodule is used to use the resource path and the upload instruction to construct a data synchronization instruction for the target application.

[0035] Optionally, the resource path acquisition submodule is specifically used for:

[0036] Acquire first account information corresponding to the data synchronization operation, and a resource path and an upload instruction corresponding to the target application;

[0037] The data synchronization instruction construction submodule is specifically used for:

[0038] Using the resource path and the upload instruction, construct a resource location link corresponding to the target application;

[0039] The first account information and the resource location link are used to generate a data synchronization instruction for the target application.

[0040] Optionally, the application data uploading module is specifically used for:

[0041] The resource location link is sent to the second terminal, so that the second terminal parses the resource location link to obtain the resource path and the upload instruction, and runs the target application according to the resource path. During the running of the target application, the application data corresponding to the first account information in the target application is obtained according to the upload instruction, and the application data is uploaded to the server.

[0042] Optionally, the application data acquisition module is specifically used to:

[0043] In response to the application data being uploaded, displaying a login interface of the target application;

[0044] In response to a login operation on the login interface, second account information corresponding to the login operation is obtained, and if the first account information is the same as the second account information, application data corresponding to the first account information is obtained from the server.

[0045] The embodiment of the present invention further discloses an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0046] The memory is used to store computer programs;

[0047] The processor is used to implement the method described in the embodiment of the present invention when executing the program stored in the memory.

[0048] The embodiment of the present invention further discloses a computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, enables the processors to execute the method described in the embodiment of the present invention.

[0049] The embodiments of the present invention include the following advantages:

[0050] In the embodiment of the present invention, it can be applied to a first terminal with an NFC function, and at least one application can be included in the first terminal. Then, the first terminal can respond to the data synchronization operation on the first terminal, determine the target application and the second terminal corresponding to the data synchronization operation, generate a data synchronization instruction for the target application, and establish an NFC communication connection with the second terminal, and then transmit the data synchronization instruction to the second terminal, so that the second terminal runs the target application, and uploads the application data corresponding to the target application to the server according to the data synchronization instruction. Then, the first terminal can respond to the account verification operation on the target application. If the account verification result indicates that the account verification is successful, the application data is obtained from the server. In the case where the user cannot perform an interactive interface operation on the second terminal, the corresponding data synchronization operation is performed on the first terminal, an NFC communication connection between the terminals is established, and the first terminal sends the data synchronization instruction to the second terminal to achieve data synchronization. On the one hand, the sending of the synchronization instruction through NFC can effectively solve the problem of data synchronization of the terminal that cannot be operated, and improve the versatility of data synchronization between the terminals. On the other hand, by transmitting the application data to the server and allowing the first terminal to perform data synchronization when the account verification is successful, the security of data synchronization is effectively guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 is a flowchart of a method for data synchronization based on NFC provided in an embodiment of the present invention;

[0052] Figure 2 is a flowchart of a method for data synchronization based on NFC provided in an embodiment of the present invention;

[0053] Figure 3 is a structural block diagram of an NFC-based data synchronization device provided in an embodiment of the present invention;

[0054] Figure 4 is a block diagram of an electronic device provided in an embodiment of the present invention;

[0055] Figure 5 is a schematic diagram of a computer-readable medium provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0056] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0057] As an example, a user can connect device A to a computer through an interface technology at a certain moment, and start an application ① that needs to upload local data in the interactive interface of device A, then upload the local data corresponding to application ① to the computer, and the computer stores it in a storage location such as a hard disk, then establish a communication connection between device B and the computer, start application ② corresponding to application ① in device B, determine to perform data synchronization in the display interface corresponding to application ②, and then import the local data of application ① stored in the computer into application ② of device B, thereby realizing data synchronization between device A and device B. However, in the process of data synchronization between device A and device B, most users will not upload the local data in device A to the computer every day, and the local data stored in the computer is usually incomplete. When device A fails to touch the screen, the screen cannot display normally, or the screen hardware is damaged, the user cannot touch the interactive interface of device A, resulting in device A being unable to upload local data to the computer. The above data synchronization method not only has a cumbersome synchronization process and low synchronization efficiency, but also the synchronized local data may be missing.

[0058] In this regard, one of the core inventive points of the embodiment of the present invention is that it can be applied to a first terminal with an NFC function. The first terminal may include at least one application. Then, the first terminal may respond to a data synchronization operation on the first terminal, determine a target application and a second terminal corresponding to the data synchronization operation, generate a data synchronization instruction for the target application, and establish an NFC communication connection with the second terminal. Then, the data synchronization instruction is transmitted to the second terminal so that the second terminal runs the target application, and uploads the application data corresponding to the target application to the server according to the data synchronization instruction. Then, the first terminal may respond to an account verification operation on the target application. If the account verification result indicates that the account verification is successful, the application data is obtained from the server. When the user cannot perform an interactive interface operation on the second terminal, the corresponding data synchronization operation is performed on the first terminal to establish an NFC communication connection between the terminals, and the first terminal sends a data synchronization instruction to the second terminal to achieve data synchronization. On the one hand, the sending of the synchronization instruction through NFC can effectively solve the problem of data synchronization of terminals that cannot be operated, and improve the versatility of data synchronization between terminals. On the other hand, by transmitting the application data to the server and allowing the first terminal to perform data synchronization when the account verification is successful, the security of data synchronization is effectively guaranteed.

[0059] Reference Figure 1 , shows a flowchart of a data synchronization method based on NFC provided in an embodiment of the present invention, which is applied to a first terminal, wherein the first terminal includes at least one application program, and specifically may include the following steps:

[0060] Step 101, in response to a data synchronization operation for the first terminal, determining a target application and a second terminal corresponding to the data synchronization operation, generating a data synchronization instruction for the target application, and establishing an NFC communication connection with the second terminal;

[0061] In the embodiment of the present invention, the terminal may be a local electronic terminal, including at least a first terminal and a second terminal, which may be an electronic terminal such as a desktop computer, a laptop computer, a tablet computer, a mobile terminal, etc. A user may implement a synchronization process for application data through at least two electronic terminals. For example, assuming there are two mobile terminals, a data synchronization operation is performed on mobile terminal ①, a target application and mobile terminal ② are determined, and a data synchronization instruction is generated for mobile terminal ②, and then an NFC communication connection relationship is established between mobile terminal ① and mobile terminal ②. Mobile terminal ② may upload application data corresponding to the target application to the server according to the data synchronization instruction, and mobile terminal ① may obtain the application data from the server, thereby implementing synchronization of application data between different mobile terminals.

[0062] Among them, the first terminal can be a terminal device that obtains application data of the target application from the server, and the second terminal can be a terminal device that uploads the application data of the target application to the server. Specifically, both the first terminal and the second terminal can run applications, such as life applications, audio applications, and game applications. Among them, life applications can be further divided according to different types, such as social applications, leisure and entertainment applications, and housekeeping service applications. The embodiment of the present application is exemplified by running a social application on a mobile terminal as a target application. It can be understood that the present invention is not limited to this.

[0063] Optionally, an NFC communication connection can be established between the first terminal and the second terminal, and the hardware components, software programs, etc. of the first terminal are in a normal state, and the second terminal is in an abnormal state, for example, the software / hardware of the second terminal cannot work properly: the application freezes or the hardware is damaged, resulting in the failure of the screen touch screen, the screen cannot be displayed normally, the screen hardware is damaged, and the second terminal makes it impossible for the user to perform interactive operations through the interactive interface of the second terminal, so as to achieve data synchronization between different terminal devices. Among them, NFC is called Near Field Communication (NFC for short), which is an emerging technology. Devices using NFC technology (such as mobile phones) can exchange data when they are close to each other. It is evolved from the integration of contactless radio frequency identification (RFID for short) and interconnection and intercommunication technology. By integrating the functions of inductive card reader, inductive card and point-to-point communication on a single chip, mobile terminals are used to realize mobile payment, electronic ticketing, access control, mobile identity recognition, anti-counterfeiting and other applications. NFC is developed based on contactless radio frequency identification (RFID) technology combined with wireless interconnection technology. It provides a very safe and fast communication method for various electronic products that are becoming more and more popular in our daily lives. The "near field" in the Chinese name of NFC refers to radio waves near the electromagnetic field.

[0064] In a specific implementation, the first terminal can display the NFC operation interface of the terminal through a graphical user interface, and then determine the target application corresponding to the data synchronization operation in response to the data synchronization operation input by the user for the NFC operation interface of the first terminal; if a second terminal is detected within a preset range of the first terminal, a data synchronization instruction is generated for the target application.

[0065] Optionally, the NFC operation interface of the first terminal includes at least an NFC on area or off area, a data synchronization area, a terminal matching area, etc., and the present invention is not limited to this. When the user determines to perform data synchronization through the NFC operation interface of the first terminal, the target application that needs to be synchronized can be selected. The target application can be the application input when the first terminal performs the data synchronization operation, and the application started when the second terminal receives the data synchronization instruction sent by the first terminal. For example, the first terminal inputs: start social application A in the NFC operation interface, then social application A is the target application. At this time, the first terminal requesting data synchronization can detect whether there is a second terminal within a preset range. If so, a data synchronization instruction for social application A can be generated, and then the data synchronization instruction is sent to the second terminal through the NFC communication channel. Among them, the preset range can be a range pre-set by the user in the NFC operation interface of the first terminal before generating the data synchronization instruction, such as [0 meters, 1 meter]. The first terminal can use different sensors to detect whether there is a second terminal within the preset range, such as using sensors such as distance sensors or image acquisition sensors to determine whether there is a second terminal within the preset range. If the second terminal exists within the preset range, an NFC communication connection between the first terminal and the second terminal can be established.

[0066] In an optional example, the first terminal may be a smartphone ①, and the second terminal may be a smartphone ②. When the user wants to migrate the current chat history of a social application in smartphone ② to smartphone ①, the user may first open the NFC operation interface of smartphone ①, and then pre-set the preset range to [0 m, 1 m] in the NFC operation interface, and input: start social application A, and after starting, automatically upload the application data of social application A to the server. If smartphone ① detects that there is smartphone ② within [0 m, 1 m] through a distance sensor or the like, smartphone ① may generate a data synchronization instruction for social application A and send it to the second terminal.

[0067] In one embodiment of the present invention, the process of generating a data synchronization instruction for a target application by a first terminal is as follows: obtaining a resource path and an upload instruction corresponding to the target application, and then using the resource path and the upload instruction to construct a data synchronization instruction for the target application, thereby utilizing the first terminal to generate a data synchronization instruction including a resource path and an upload instruction, thereby realizing automatic data search for the second terminal and executing the upload of application data.

[0068] Optionally, the resource path can be the storage location or running location of the target application, such as the IP address of social application A is "APP.com", and the upload instruction can be used to instruct the second terminal to upload application data to the server, such as "uploadData", then the data synchronization instruction can at least include the target application, the resource path and the upload instruction, which can be generated by the text information entered by the user in the NFC operation interface, and is used to instruct the second terminal to automatically run the target application and upload the application data corresponding to the target application to the server. For example, after the user opens the NFC operation interface of the first terminal, he can enter: "Open the target application, after starting the target application, automatically upload the URL field of local data for the target application", then the first terminal can automatically generate a URL (Uniform Resource Locator) field for instructing the second terminal to upload local data according to the text information entered by the user, and construct a data synchronization request instruction according to the URL field.

[0069] Among them, the URL field may include a resource path and an upload instruction corresponding to the target application. The URL field may include a protocol type, a domain name or an IP address, a route or a file path, parameters, and fragments, etc. For example, when the target application entered by the user in the NFC operation interface is "social application A", the URL field corresponding to the target application may be: "APP: / / APP.com / uploadData", then the "APP" in the URL field is the target application, "APP.com" is the domain name or IP address, and "uploadData" is the "upload instruction". Therefore, when the user is unable to perform interactive interface operations on the second terminal, an NFC communication connection between the terminals is established by performing corresponding data synchronization operations on the first terminal, and the first terminal sends a data synchronization instruction to the second terminal to achieve data synchronization. By sending the synchronization instruction through NFC, the second terminal can identify the URL field and execute the interactive operation corresponding to the URL field, which can effectively solve the problem of data synchronization of terminals that cannot be operated and improve the versatility of data synchronization between terminals.

[0070] In another embodiment of the present invention, the first terminal can obtain first account information corresponding to the data synchronization operation, as well as a resource path and upload instructions corresponding to the target application. The first terminal then uses the obtained resource path and upload instructions to construct a resource location link corresponding to the target application, and uses the first account information and the resource location link to generate data synchronization instructions for the target application. The first terminal thus obtains the first account information and the resource location link, and generates data synchronization instructions for the same account in the target application, thereby improving the accuracy of data synchronization and reducing the amount of synchronized data.

[0071] Optionally, the first account information may include login information corresponding to the target application entered by the user in the NFC operation interface, such as a login account, and then a resource location link corresponding to the target application is constructed using a resource path and upload instruction corresponding to the target application. The resource location link may be a URL link generated by a URL field, used to instruct the second terminal to start the target application, obtain and upload application data of the target application, and then package the current login information of the first terminal with the URL link, and generate a data synchronization instruction for the target application.

[0072] In an optional example, the first terminal is a smartphone ①, the second terminal is a smartphone ②, and the display screen of the smartphone ② cannot be displayed, resulting in the user being unable to use the smartphone ② for touch operations and the like. At this time, the user can first open the NFC operation interface of the smartphone ①, and then select the data synchronization button in the NFC operation interface, and enter the preset range as [0 meter, 1 meter] in the interface. A text box for input is displayed in the NFC operation interface, and the user enters the specified text information in the text box: open social application A, and automatically upload the URL field of the local chat record after starting the social application A, and move the smartphone ② to the vicinity of the smartphone ①. The smartphone ① determines that the smartphone ② exists within the preset range, and establishes an NFC communication connection with the smartphone ②. The smartphone ① can obtain the login information corresponding to the social application A, the IP address of the social application A, and the upload instruction entered by the user, and generate a corresponding URL link according to the IP address of the social application A and the upload instruction: "APP: / / APP.com / uploadData", generate a data synchronization instruction according to the URL link and the current login information corresponding to the social application A running on the smartphone ①, and establish an NFC communication connection between the smartphone ① and the smartphone ②.

[0073] Step 102, transmitting the data synchronization instruction to the second terminal, so that the second terminal runs the target application, and uploads the application data corresponding to the target application to the server according to the data synchronization instruction;

[0074] In an embodiment of the present invention, when the first terminal determines that there is a second terminal within a preset range, it can establish an NFC communication connection with the second terminal, and then the first terminal can send a data synchronization instruction including a resource path of the target application and an upload instruction to the second terminal. After the second terminal receives the data synchronization instruction, it can parse the data synchronization instruction, start the target application corresponding to the data synchronization instruction, and upload the application data of the target application to the server.

[0075] In a specific implementation, the first terminal can send a data synchronization instruction including a resource location link to the second terminal. The second terminal can parse the resource location link, obtain the resource path and upload instruction of the target application, and start the corresponding target application according to the resource path. According to the upload instruction, the application data corresponding to the first account information in the target application is uploaded to the server, thereby sending the data synchronization instruction through NFC technology, effectively solving the problem of data synchronization of the second terminal that cannot be operated, and improving the versatility of data synchronization between the first terminal and the second terminal.

[0076] In an optional example, the first terminal is smartphone ①, the second terminal is smartphone ②, and the display screen of smartphone ② cannot display, and there is an NFC communication connection between smartphone ① and smartphone ②. Therefore, smartphone ① can transmit the data synchronization instruction to smartphone ②, and smartphone ② can parse the data synchronization instruction and obtain the URL link in the data synchronization instruction as: "APP: / / APP.com / uploadData", determine that the target application "APP" is "social application A", then start the social application A in smartphone ②, and according to the instruction of uploading local data of "uploadData", upload the local application data corresponding to the first account information to the server.

[0077] Step 103 , in response to the account verification operation for the target application, if the account verification result indicates that the account verification is successful, obtaining the application data from the server.

[0078] In an embodiment of the present invention, the server can perform an account verification operation for the target application, wherein the account verification operation can verify for the server whether the login account for the target application entered by the user in the NFC operation interface is the same as the login account currently entered by the user in the login interface of the target application before the first terminal generates a data synchronization instruction; if the login account entered by the user in the NFC operation interface is the same as the login account currently entered by the user in the login interface of the target application, it means that the first account information and the second account information are successfully verified, and the first terminal can obtain the corresponding application data from the server, thereby transmitting the application data to the server through the second terminal, and when the server verifies that the current login account of the first terminal is consistent with the account corresponding to the application data uploaded by the second terminal, the server allows the first terminal to synchronize data with the second terminal, thereby effectively ensuring the security of data synchronization.

[0079] In a specific implementation, the first terminal can display the login interface of the target application in response to the second terminal completing the upload of the application data of the target application to the server, and then obtain the second account information corresponding to the login operation in response to the user's login operation in the login interface. If the server verifies that the first account information is the same as the second account information, the first terminal is allowed to obtain the application data corresponding to the first account information from the server.

[0080] Specifically, the account information may be the login information of the target application, such as a login account, which may include the first account information input by the user in the NFC operation interface of the first terminal, and the second account information currently input by the user through the login interface of the first terminal. After the first terminal packages the first account information and the resource location link and sends them to the second terminal, the second terminal first parses the resource path of the resource location link, determines the target application to be run, and uploads the application data corresponding to the first account information to the server according to the upload instruction of the resource location link. Then the server may obtain the second account information currently input by the user in the login interface, and verify the first account information and the second account information. After successful verification, the server allows the first terminal to obtain the application data from the server, thereby reducing the amount of uploaded data and improving the efficiency of data synchronization by uploading the application data corresponding to the first account information, and improving the security of data acquisition by verifying the first account information and the second account information.

[0081] In an optional example, the first terminal is a smartphone ①, and the second terminal is a smartphone ②. Smartphone ② receives a data synchronization instruction sent by smartphone ① through an NFC communication channel, parses the data synchronization instruction, and obtains a URL link in the data synchronization instruction: "APP: / / APP.com / uploadData". It is determined that the target application "APP" is "social application A", then social application A is started in smartphone ②, and according to the instruction of "uploadData" to upload local data, local data corresponding to the first account information is uploaded to the server. Smartphone ① responds to the completion of the upload data operation of smartphone ②, displays a login interface of "social application A", then performs a login operation in the login interface, obtains the second account information entered by smartphone ① on the login interface from the server, and then matches the account of the first account information with the account of the second account information. If the match is successful, it means that the login account of smartphone ① in "social application A" is consistent with the login account corresponding to the application data of "social application A" uploaded by smartphone ②, and then smartphone ① can download the social application A data corresponding to the second account information from the server, thereby realizing data synchronization between different devices.

[0082] It should be noted that the embodiments of the present invention include but are not limited to the above examples. It is understandable that under the guidance of the ideas of the embodiments of the present invention, those skilled in the art can also make settings according to actual needs, and the present invention is not limited to this.

[0083] In the embodiment of the present invention, it can be applied to a first terminal with an NFC function, and at least one application can be included in the first terminal. Then, the first terminal can respond to the data synchronization operation on the first terminal, determine the target application and the second terminal corresponding to the data synchronization operation, generate a data synchronization instruction for the target application, and establish an NFC communication connection with the second terminal, and then transmit the data synchronization instruction to the second terminal, so that the second terminal runs the target application, and uploads the application data corresponding to the target application to the server according to the data synchronization instruction. Then, the first terminal can respond to the account verification operation on the target application. If the account verification result indicates that the account verification is successful, the application data is obtained from the server. In the case where the user cannot perform an interactive interface operation on the second terminal, the corresponding data synchronization operation is performed on the first terminal, an NFC communication connection between the terminals is established, and the first terminal sends the data synchronization instruction to the second terminal to achieve data synchronization. On the one hand, the sending of the synchronization instruction through NFC can effectively solve the problem of data synchronization of the terminal that cannot be operated, and improve the versatility of data synchronization between the terminals. On the other hand, by transmitting the application data to the server and allowing the first terminal to perform data synchronization when the account verification is successful, the security of data synchronization is effectively guaranteed.

[0084] In order to enable those skilled in the art to better understand the technical solution of the embodiment of the present invention, an example is given below, and reference is made to Figure 2 The flowchart shown illustrates an embodiment of the present invention.

[0085] 1) The user selects a first terminal and turns on the NFC function of the first terminal.

[0086] 2) On the NFC operation interface of the first terminal, enter the specified text information, such as opening an App, starting the App and automatically uploading the URL field of the local data, and sending a data synchronization instruction;

[0087] 3) Bringing the second terminal whose screen function cannot be used close to the first terminal, if the second terminal is within a preset range, the second terminal obtains the data synchronization instruction sent by the first terminal;

[0088] 4) If the data synchronization instruction generated by the first terminal includes a resource path and an upload instruction, the second terminal device receives the data synchronization instruction sent by the first terminal through NFC, and parses the received data synchronization instruction. For example, if the received URL field is "APP: / / APP.com / uploadData", after parsing the field, it is learned that the target application "APP" is "social application A", and the social application A is opened and the local chat data of the social application A is uploaded;

[0089] 5) If the data synchronization instruction generated by the first terminal includes the first account information and the resource location link, the second terminal performs the parsed operation through NFC, such as generating a URL link in the "APP: / / APP.com / uploadData" field. Loading the URL link will directly open the social application A, and the social application A will perform corresponding operations according to the path or parameters of the URL, such as uploading the local chat data corresponding to the first account information.

[0090] 6) After the second terminal completes uploading the chat data to the server, the first terminal can open the social application A to download the data, and the chat data of the social application A of the second terminal can be synchronized.

[0091] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0092] Reference Figure 3 , shows a structural block diagram of a data synchronization device based on NFC provided in an embodiment of the present invention, which is applied to a first terminal, wherein the first terminal includes at least one application program, and specifically may include the following modules:

[0093] A data synchronization instruction generating module 301 is used to, in response to a data synchronization operation on the first terminal, determine a target application and a second terminal corresponding to the data synchronization operation, generate a data synchronization instruction for the target application, and establish an NFC communication connection with the second terminal;

[0094] The application data uploading module 302 is used to transmit the data synchronization instruction to the second terminal so that the second terminal runs the target application and uploads the application data corresponding to the target application to the server according to the data synchronization instruction;

[0095] The application data acquisition module 303 is used to respond to the account verification operation for the target application program, and if the account verification result indicates that the account verification is successful, obtain the application data from the server.

[0096] In an optional embodiment, the data synchronization instruction generation module 301 is specifically used to:

[0097] Display the NFC operation interface;

[0098] In response to a data synchronization operation on the NFC operation interface, a target application corresponding to the data synchronization operation is determined, and if a second terminal is detected within a preset range of the first terminal, a data synchronization instruction for the target application is generated.

[0099] In an optional embodiment, the data synchronization instruction generation module 301 further includes:

[0100] A resource path acquisition submodule, used to acquire the resource path and upload instructions corresponding to the target application;

[0101] The data synchronization instruction construction submodule is used to use the resource path and the upload instruction to construct a data synchronization instruction for the target application.

[0102] In an optional embodiment, the resource path acquisition submodule is specifically used for:

[0103] Acquire first account information corresponding to the data synchronization operation, and a resource path and an upload instruction corresponding to the target application;

[0104] The data synchronization instruction construction submodule is specifically used for:

[0105] Using the resource path and the upload instruction, construct a resource location link corresponding to the target application;

[0106] The first account information and the resource location link are used to generate a data synchronization instruction for the target application.

[0107] In an optional embodiment, the application data uploading module 302 is specifically used for:

[0108] The resource location link is sent to the second terminal, so that the second terminal parses the resource location link to obtain the resource path and the upload instruction, and runs the target application according to the resource path. During the running of the target application, the application data corresponding to the first account information in the target application is obtained according to the upload instruction, and the application data is uploaded to the server.

[0109] In an optional embodiment, the application data acquisition module 303 is specifically used to:

[0110] In response to the application data being uploaded, displaying a login interface of the target application;

[0111] In response to a login operation on the login interface, second account information corresponding to the login operation is obtained, and if the first account information is the same as the second account information, application data corresponding to the first account information is obtained from the server.

[0112] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0113] In addition, an embodiment of the present invention further provides an electronic device, such as Figure 4 As shown, it includes a processor 401, a communication interface 402, a memory 403 and a communication bus 404, wherein the processor 401, the communication interface 402, and the memory 403 communicate with each other through the communication bus 404.

[0114] Memory 403, used for storing computer programs;

[0115] The processor 401 is used to execute the program stored in the memory 403 to implement the following steps:

[0116] In response to a data synchronization operation for the first terminal, determining a target application and a second terminal corresponding to the data synchronization operation, generating a data synchronization instruction for the target application, and establishing an NFC communication connection with the second terminal;

[0117] Transmitting the data synchronization instruction to the second terminal so that the second terminal runs the target application and uploads the application data corresponding to the target application to the server according to the data synchronization instruction;

[0118] In response to the account verification operation for the target application, if the account verification result indicates that the account verification is successful, the application data is obtained from the server.

[0119] In an optional embodiment, in response to the data synchronization operation on the first terminal, determining a target application and a second terminal corresponding to the data synchronization operation, and generating a data synchronization instruction corresponding to the target application includes:

[0120] Display the NFC operation interface;

[0121] In response to a data synchronization operation on the NFC operation interface, a target application corresponding to the data synchronization operation is determined, and if a second terminal is detected within a preset range of the first terminal, a data synchronization instruction for the target application is generated.

[0122] In an optional embodiment, generating a data synchronization instruction for the target application includes:

[0123] Obtain the resource path and upload instructions corresponding to the target application;

[0124] The resource path and the upload instruction are used to construct a data synchronization instruction for the target application.

[0125] In an optional embodiment, the obtaining the resource path and upload instruction corresponding to the target application includes:

[0126] Acquire first account information corresponding to the data synchronization operation, and a resource path and an upload instruction corresponding to the target application;

[0127] The step of using the resource path and the upload instruction to construct a data synchronization instruction for the target application program includes:

[0128] Using the resource path and the upload instruction, construct a resource location link corresponding to the target application;

[0129] The first account information and the resource location link are used to generate a data synchronization instruction for the target application.

[0130] In an optional embodiment, transmitting the data synchronization instruction to the second terminal so that the second terminal runs the target application and uploads the application data corresponding to the target application to the server according to the data synchronization instruction includes:

[0131] The resource location link is sent to the second terminal, so that the second terminal parses the resource location link to obtain the resource path and the upload instruction, and runs the target application according to the resource path. During the running of the target application, the application data corresponding to the first account information in the target application is obtained according to the upload instruction, and the application data is uploaded to the server.

[0132] In an optional embodiment, in response to the account verification operation for the target application, if the account verification result indicates that the account verification is successful, obtaining the application data from the server includes:

[0133] In response to the application data being uploaded, displaying a login interface of the target application;

[0134] In response to a login operation on the login interface, second account information corresponding to the login operation is obtained, and if the first account information is the same as the second account information, application data corresponding to the first account information is obtained from the server.

[0135] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0136] The communication interface is used for communication between the above terminal and other devices.

[0137] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0138] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0139] like Figure 5 As shown, in another embodiment provided by the present invention, a computer-readable storage medium 501 is further provided, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the NFC-based data synchronization method described in the above embodiment.

[0140] In yet another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer is enabled to execute the NFC-based data synchronization method described in the above embodiment.

[0141] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0142] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0143] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0144] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A data synchronization method based on NFC, characterized in that: Applied to a first terminal, the first terminal includes at least one application, and the method includes: In response to a data synchronization operation on the first terminal, a target application and a second terminal corresponding to the data synchronization operation are determined, a data synchronization instruction for the target application is generated, and an NFC communication connection with the second terminal is established; wherein the NFC communication connection with the second terminal can be established by the data synchronization operation on the first terminal without the need for an interactive operation on the second terminal; the data synchronization instruction at least includes a resource path and an upload instruction corresponding to the target application; Transmitting the data synchronization instruction to the second terminal so that the second terminal runs the target application according to the resource path, and uploads the application data corresponding to the target application to the server according to the upload instruction; In response to the account verification operation for the target application, if the account verification result indicates that the account verification is successful, the application data is obtained from the server.

2. The method according to claim 1, characterized in that In response to the data synchronization operation for the first terminal, determining a target application and a second terminal corresponding to the data synchronization operation, and generating a data synchronization instruction corresponding to the target application, comprises: Display the NFC operation interface; In response to a data synchronization operation on the NFC operation interface, a target application corresponding to the data synchronization operation is determined, and if a second terminal is detected within a preset range of the first terminal, a data synchronization instruction for the target application is generated.

3. The method according to claim 1 or 2, characterized in that: The generating of the data synchronization instruction for the target application comprises: Obtaining the resource path corresponding to the target application and the upload instruction; The resource path and the upload instruction are used to construct a data synchronization instruction for the target application.

4. The method according to claim 3, characterized in that: The obtaining of the resource path and upload instruction corresponding to the target application program includes: Acquire first account information corresponding to the data synchronization operation, and a resource path and an upload instruction corresponding to the target application; The step of using the resource path and the upload instruction to construct a data synchronization instruction for the target application program includes: Using the resource path and the upload instruction, construct a resource location link corresponding to the target application; The first account information and the resource location link are used to generate a data synchronization instruction for the target application.

5. The method according to claim 4, characterized in that The transmitting the data synchronization instruction to the second terminal so that the second terminal runs the target application according to the resource path, and uploads the application data corresponding to the target application to the server according to the upload instruction, includes: The resource location link is sent to the second terminal, so that the second terminal parses the resource location link to obtain the resource path and the upload instruction, and runs the target application according to the resource path. During the running of the target application, the application data corresponding to the first account information in the target application is obtained according to the upload instruction, and the application data is uploaded to the server.

6. The method according to claim 4, characterized in that The step of responding to the account verification operation for the target application, if the account verification result indicates that the account verification is successful, obtaining the application data from the server includes: In response to the application data being uploaded, displaying a login interface of the target application; In response to a login operation on the login interface, second account information corresponding to the login operation is obtained, and if the first account information is the same as the second account information, application data corresponding to the first account information is obtained from the server.

7. A data synchronization device based on NFC, characterized in that: Applied to a first terminal, the first terminal includes at least one application, and the device includes: a data synchronization instruction generation module, configured to, in response to a data synchronization operation on the first terminal, determine a target application and a second terminal corresponding to the data synchronization operation, generate a data synchronization instruction for the target application, and establish an NFC communication connection with the second terminal; wherein the NFC communication connection with the second terminal can be established by the data synchronization operation on the first terminal without the need for an interactive operation on the second terminal; and the data synchronization instruction at least includes a resource path and an upload instruction corresponding to the target application; an application data uploading module, configured to transmit the data synchronization instruction to the second terminal, so that the second terminal runs the target application according to the resource path, and uploads the application data corresponding to the target application to the server according to the upload instruction; The application data acquisition module is used to respond to the account verification operation for the target application program, and if the account verification result indicates that the account verification is successful, obtain the application data from the server.

8. The device according to claim 7, characterized in that The data synchronization instruction generation module is specifically used for: Display the NFC operation interface; In response to a data synchronization operation on the NFC operation interface, a target application corresponding to the data synchronization operation is determined, and if a second terminal is detected within a preset range of the first terminal, a data synchronization instruction for the target application is generated.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used to store computer programs; The processor is used to implement the method according to any one of claims 1 to 7 when executing the program stored in the memory.

10. A computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, cause the processors to perform the method according to any one of claims 1 to 7.