CN114866566A - Data synchronization method and device based on NFC, electronic equipment and storage medium - Google Patents

Data synchronization method and device based on NFC, electronic equipment and storage medium Download PDF

Info

Publication number
CN114866566A
CN114866566A CN202210445708.2A CN202210445708A CN114866566A CN 114866566 A CN114866566 A CN 114866566A CN 202210445708 A CN202210445708 A CN 202210445708A CN 114866566 A CN114866566 A CN 114866566A
Authority
CN
China
Prior art keywords
terminal
data synchronization
application program
target application
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210445708.2A
Other languages
Chinese (zh)
Inventor
张容
彭飞
邓竹立
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Chengshi Wanglin Information Technology Co Ltd
Original Assignee
Beijing Chengshi Wanglin Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Chengshi Wanglin Information Technology Co Ltd filed Critical Beijing Chengshi Wanglin Information Technology Co Ltd
Priority to CN202210445708.2A priority Critical patent/CN114866566A/en
Publication of CN114866566A publication Critical patent/CN114866566A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention provides a data synchronization method, a device, electronic equipment and a storage medium based on NFC, which are applied to a first terminal, respond to data synchronization operation aiming at the first terminal, determine a target application program and a second terminal corresponding to the data synchronization operation, establish 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 operates the target application program according to the data synchronization instruction, upload application data of the target application program to a server, respond to account verification operation aiming at the target application program, acquire the application data from the server if the account verification is successful, and then send the synchronization instruction through the NFC so that the terminal which cannot operate performs data synchronization, thereby improving the universality of data synchronization between the terminals, and when the account verification is successful, the first terminal carries out data synchronization, and the safety of data synchronization is effectively guaranteed.

Description

Data synchronization method and device based on NFC, electronic equipment and storage medium
Technical Field
The present invention relates to the field of device communication technologies, and in particular, to a data synchronization method based on NFC, a data synchronization apparatus based on NFC, an electronic device, and a computer-readable storage medium.
Background
In the prior art, when a user wants to synchronize data of other devices to a current device, the following method is often adopted for data transmission: the user can utilize the synchronization function of the computer to perform communication connection between the old device and the computer, then execute data uploading operation aiming at the old device, further upload the local data corresponding to the old device to the computer, then establish a communication connection relation between the new device and the computer which need to perform data synchronization, log in the corresponding application program, and then request the data synchronization from the computer, at the moment, the computer can lead the stored local data into the new device, thereby realizing the data synchronization between the old device and the new device.
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 problem of missing or incomplete local data synchronized by the new device exists, if the old device is abnormal and the user cannot control the old device to perform the data upload operation, the data synchronization cannot be performed, and in the process of data transmission between the old device and the new device, the data synchronization process is complicated, the synchronization time is long, the efficiency is low, and the like because the computer with the data synchronization function is required to be used as a synchronization medium.
Disclosure of Invention
The embodiment of the invention provides a data synchronization method and device based on NFC, an electronic device and a computer readable storage medium, and aims to solve or partially solve the problems of complicated application data synchronization process and low efficiency caused by the fact that a user cannot operate the device under the condition of abnormal device.
The embodiment of the invention discloses a data synchronization method based on NFC, which is characterized in that the data synchronization method is applied to a first terminal, the first terminal comprises at least one application program, and the method comprises the following steps:
responding to data synchronization operation aiming at the first terminal, determining a target application program and a second terminal corresponding to the data synchronization operation, generating a data synchronization instruction aiming at the target application program, and establishing NFC communication connection with the second terminal;
transmitting the data synchronization instruction to the second terminal so that the second terminal runs the target application program, and uploading application data corresponding to the target application program to a server according to the data synchronization instruction;
and responding to the account verification operation aiming at the target application program, and if the account verification result represents that the account verification is successful, acquiring the application data from the server side.
Optionally, the determining, in response to a data synchronization operation for the first terminal, 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:
displaying an NFC operation interface;
and responding to the data synchronization operation aiming at the NFC operation interface, determining a target application program corresponding to the data synchronization operation, and if a second terminal is detected to exist in a preset range of the first terminal, generating a data synchronization instruction aiming at the target application program.
Optionally, the generating a data synchronization instruction for the target application includes:
acquiring a resource path and an uploading instruction corresponding to the target application program;
and constructing a data synchronization instruction aiming at the target application program by adopting the resource path and the uploading instruction.
Optionally, the obtaining the resource path and the upload instruction corresponding to the target application program includes:
acquiring first account information corresponding to the data synchronization operation, and a resource path and an uploading instruction corresponding to the target application program;
wherein, the constructing a data synchronization instruction for the target application program by using the resource path and the upload instruction includes:
adopting the resource path and the uploading instruction to construct a resource positioning link corresponding to the target application program;
and generating a data synchronization instruction aiming at the target application program by adopting the first account information and the resource positioning link.
Optionally, the transmitting the data synchronization instruction to the second terminal to enable the second terminal to run the target application program, and uploading application data corresponding to the target application program to a server according to the data synchronization instruction includes:
and sending the resource positioning link to the second terminal so that the second terminal analyzes the resource positioning link to obtain the resource path and the uploading instruction, running the target application program according to the resource path, acquiring application data corresponding to the first account information in the target application program according to the uploading instruction in the running process of the target application program, and uploading the application data to a server.
Optionally, the, in response to the account verification operation for the target application program, if the account verification result indicates that the account verification is successful, acquiring the application data from the server, where the acquiring includes:
responding to the completion of uploading the application data, and displaying a login interface of the target application program;
and responding to the login operation of the login interface, acquiring second account information corresponding to the login operation, and acquiring application data corresponding to the first account information from the server if the first account information is the same as the second account information.
The embodiment of the invention discloses a data synchronization device based on NFC, which is characterized in that the data synchronization device is applied to a first terminal, the first terminal comprises at least one application program, and the device comprises:
the data synchronization instruction generation module is used for responding to data synchronization operation aiming at the first terminal, determining a target application program and a second terminal corresponding to the data synchronization operation, generating a data synchronization instruction aiming at the target application program, and establishing NFC communication connection with the second terminal;
the application data uploading module is used for transmitting the data synchronization instruction to the second terminal so that the second terminal runs the target application program, and uploading application data corresponding to the target application program to a server according to the data synchronization instruction;
and the application data acquisition module is used for responding to the account verification operation aiming at the target application program, and acquiring the application data from the server side if the account verification result represents that the account verification is successful.
Optionally, the data synchronization instruction generating module is specifically configured to:
displaying an NFC operation interface;
and responding to the data synchronization operation aiming at the NFC operation interface, determining a target application program corresponding to the data synchronization operation, and if a second terminal is detected to exist in a preset range of the first terminal, generating a data synchronization instruction aiming at the target application program.
Optionally, the data synchronization instruction generating module further includes:
the resource path acquisition submodule is used for acquiring a resource path and an uploading instruction corresponding to the target application program;
and the data synchronization instruction construction sub-module is used for constructing a data synchronization instruction aiming at the target application program by adopting the resource path and the uploading instruction.
Optionally, the resource path obtaining sub-module is specifically configured to:
acquiring first account information corresponding to the data synchronization operation, and a resource path and an uploading instruction corresponding to the target application program;
the data synchronization instruction construction submodule is specifically configured to:
adopting the resource path and the uploading instruction to construct a resource positioning link corresponding to the target application program;
and generating a data synchronization instruction aiming at the target application program by adopting the first account information and the resource positioning link.
Optionally, the application data uploading module is specifically configured to:
and sending the resource positioning link to the second terminal so that the second terminal analyzes the resource positioning link to obtain the resource path and the uploading instruction, running the target application program according to the resource path, acquiring application data corresponding to the first account information in the target application program according to the uploading instruction in the running process of the target application program, and uploading the application data to a server.
Optionally, the application data obtaining module is specifically configured to:
responding to the completion of uploading the application data, and displaying a login interface of the target application program;
and responding to the login operation of the login interface, acquiring second account information corresponding to the login operation, and acquiring application data corresponding to the first account information from the server if the first account information is the same as the second account information.
The embodiment of the invention also discloses electronic equipment which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory finish mutual communication through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement the method according to the embodiment of the present invention when executing the program stored in the memory.
Also disclosed is a computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, cause the processors to perform a method according to an embodiment of the invention.
The embodiment of the invention has the following advantages:
in the embodiment of the present invention, the method may be applied to a first terminal having an NFC function, where the first terminal may include at least one application, and the first terminal may determine, in response to a data synchronization operation for the first terminal, a target application and a second terminal corresponding to the data synchronization operation, generate a data synchronization instruction for the target application, establish an NFC communication connection with the second terminal, then transmit the data synchronization instruction to the second terminal, so that the second terminal runs the target application, upload application data corresponding to the target application according to the data synchronization instruction to a server, and then respond to an account verification operation for the target application, and if an account verification result represents that the account verification is successful, obtain the application data from the server, and in a case that a user cannot perform an interactive interface operation on the second terminal, the method comprises the steps of establishing NFC communication connection between terminals by carrying out corresponding data synchronization operation on a first terminal, and sending a data synchronization instruction to a second terminal by the first terminal to realize data synchronization.
Drawings
Fig. 1 is a flowchart illustrating steps of a method for synchronizing data based on NFC according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating steps of a method for synchronizing data based on NFC according to an embodiment of the present invention;
fig. 3 is a block diagram of a structure of an NFC-based data synchronization apparatus provided in an embodiment of the present invention;
FIG. 4 is a block diagram of an electronic device provided in an embodiment of the invention;
fig. 5 is a schematic diagram of a computer-readable medium provided in an embodiment of the invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
As an example, a user can communicate and connect the equipment A with a computer through an interface technology at a certain time, start an application program (I) needing to upload local data in an interactive interface of the equipment A, upload the local data corresponding to the application program (I) into the computer, store the local data in a storage position such as a hard disk and the like by the computer, establish the communication and connection between the equipment B and the computer, start the application program (II) corresponding to the application program (I) in the equipment B, determine data synchronization operation in a display interface corresponding to the application program (II), import the local data of the application program (I) stored in the computer into the application program (II) of the equipment B, thereby realizing the data synchronization between the equipment A and the equipment B, but most users cannot upload the local data in the equipment A into the computer every day in the process of data synchronization between the equipment A and the equipment B, local data stored in the computer are usually incomplete, and when the device a has a screen touch failure, a screen cannot be normally displayed, screen hardware is damaged, and the like, a user cannot touch an interactive interface of the device a, so that the device a cannot upload the local data to the computer. The data synchronization method not only has complex synchronization process and low synchronization efficiency, but also can cause the synchronized local data to be missing.
In this regard, one of the core invention points of the embodiments of the present invention is that the present invention may be applied to a first terminal having an NFC function, where the first terminal may include at least one application program, and the first terminal may determine, in response to a data synchronization operation for the first terminal, a target application program and a second terminal corresponding to the data synchronization operation, generate a data synchronization instruction for the target application program, establish an NFC communication connection with the second terminal, then transmit the data synchronization instruction to the second terminal, so that the second terminal runs the target application program, and upload application data corresponding to the target application program to a server according to the data synchronization instruction, and then the first terminal may respond to an account verification operation for the target application program, and if an account verification result indicates that the account verification is successful, obtain the application data from the server, and in a case that a user cannot perform an interactive interface operation on the second terminal, the method comprises the steps of establishing NFC communication connection between terminals by carrying out corresponding data synchronization operation on a first terminal, and sending a data synchronization instruction to a second terminal by the first terminal to realize data synchronization.
Referring to fig. 1, a flowchart illustrating steps of a data synchronization method based on NFC according to an embodiment of the present invention is shown, where the method is applied to a first terminal, where the first terminal includes at least one application program, and the method specifically includes the following steps:
step 101, responding to data synchronization operation aiming at the first terminal, determining a target application program and a second terminal corresponding to the data synchronization operation, generating a data synchronization instruction aiming at the target application program, and establishing an NFC communication connection with the second terminal;
in the embodiment of the present invention, the terminal may be a local electronic terminal, and at least includes a first terminal and a second terminal, which may be electronic terminals such as a desktop computer, a notebook computer, a tablet computer, and a mobile terminal. The user can realize the synchronization process aiming at the application data through at least two electronic terminals, for example, suppose that two mobile terminals exist, and execute data synchronization operation aiming at the mobile terminal I to determine a target application program and the mobile terminal II, generate a data synchronization instruction aiming at the mobile terminal II, then establish an NFC communication connection relation between the mobile terminal I and the mobile terminal II, the mobile terminal II can upload the application data corresponding to the target application program to a server according to the data synchronization instruction, and the mobile terminal I can acquire the application data from the server, so that the synchronization of the application data among different mobile terminals is realized.
The first terminal may be a terminal device that obtains application data of a target application program from a server, the second terminal may be a terminal device that uploads the application data of the target application program to the server, and specifically, the first terminal and the second terminal may both run application programs, such as a life application program, an audio application program, a game application program, and the like. The life-type application programs can be further divided according to different types, such as social application programs, entertainment application programs, home service application programs and the like. The embodiment of the present application is exemplified by the social application program running on the mobile terminal as the target application program, and it is understood that the present invention is not limited thereto.
Optionally, an NFC communication connection may be established between the first terminal and the second terminal, and a hardware component, a software program, and the like of the first terminal are all in a normal state, and the second terminal is in an abnormal state, for example, software/hardware of the second terminal cannot work normally: the second terminal enables a user to be unable to execute interactive operation through an interactive interface of the second terminal, and data synchronization between different terminal devices is achieved. Among them, NFC is called Near Field Communication (NFC for short), which is an emerging technology, devices (such as mobile phones) using NFC technology can exchange data when they are close to each other, and is integrated and evolved from non-contact Radio Frequency Identification (RFID for short) and interconnection technology, and by integrating functions of an induction card reader, an induction card and point-to-point Communication on a single chip, applications such as mobile payment, electronic ticketing, door access, mobile identity recognition, anti-counterfeiting and the like are realized by using a mobile terminal. NFC is developed by combining a wireless interconnection technology on the basis of a non-contact Radio Frequency Identification (RFID) technology, a very safe and fast communication mode is provided for various electronic products which are increasingly popularized in daily life, and the near field in the NFC Chinese name refers to radio waves close to an electromagnetic field.
In a specific implementation, the first terminal may display an NFC operation interface of the terminal through a graphical user interface, then determine a target application program corresponding to the data synchronization operation in response to a data synchronization operation for the NFC operation interface of the first terminal, which is input by a user, and if it is detected that a second terminal exists within a preset range of the first terminal, generate a data synchronization instruction for the target application program.
Optionally, the NFC operating interface of the first terminal at least includes an NFC opening area or closing area, a data synchronization area, a terminal matching area, and the like, which is not limited in this respect, when a user determines to perform data synchronization through the NFC operating interface of the first terminal, a target application program that needs to perform data synchronization may be selected, where the target application program may be an application program input when the first terminal performs data synchronization operation, and an application program started when the second terminal receives a data synchronization instruction sent by the first terminal, and for example, the first terminal inputs: and starting the social application program A, wherein the social application program A is a target application program, at this time, a first terminal requesting data synchronization can detect whether a second terminal exists in a preset range, if so, a data synchronization instruction aiming at the social application program A can be generated, and then the data synchronization instruction is sent to the second terminal through an NFC communication channel. The preset range may be a range preset by a user at an NFC operation interface of the first terminal before the data synchronization instruction is generated, for example, [ 0 m, 1 m ], the first terminal may detect whether a second terminal exists in the preset range by using different sensors, for example, whether the second terminal exists in the preset range is determined by using a distance sensor or an image acquisition sensor, and if the second terminal exists in the preset range, the NFC communication connection between the first terminal and the second terminal may be established.
In an optional example, the first terminal may be a smartphone r, the second terminal may be a smartphone r, and when a user wants to migrate a current chat record of a certain social application program in the smartphone r to the smartphone r, the NFC operation interface of the smartphone r may be opened first, then a preset range of [ 0 meter, 1 meter ] is preset in the NFC operation interface, and the input is performed: the method comprises the steps that a social application program A is started, application data of the social application program A are automatically uploaded to a server side after the social application program A is started, and if a smart phone is detected to exist within 0 m and 1 m through a distance sensor and the like, a data synchronization instruction aiming at the social application program A can be generated by the smart phone and sent to a second terminal.
In an embodiment of the present invention, the process of the first terminal generating the data synchronization instruction for the target application is as follows: the method comprises the steps of obtaining a resource path and an uploading instruction corresponding to a target application program, and then adopting the resource path and the uploading instruction to construct a data synchronization instruction aiming at the target application program, so that the first terminal is utilized to automatically search data and execute uploading application data aiming at the second terminal by generating the data synchronization instruction comprising the resource path and the uploading instruction.
Com, the upload instruction may be an instruction instructing the second terminal to upload application data to the server, such as "uploadData," and the data synchronization instruction may include at least the target application, the resource path, and the upload instruction, which may be generated from text information input by the user in the NFC operation interface, and is used to instruct the second terminal to automatically run the target application and upload application data corresponding to the target application to the server, for example, after the user opens the NFC operation interface of the first terminal, the user may input: the first terminal may automatically generate a URL (Uniform Resource Locator) field for instructing the second terminal to upload local data according to text information input by a user, and construct a data synchronization request instruction according to the URL field.
For example, when the target application input by the user at the NFC operation interface is "social application a", the URL field corresponding to the target application may be: the method comprises the steps that if APP is:// APP.com/uploadData', the APP in the URL field is a target application program, the APP.com is a domain name or an IP address, and the uploadData is an uploading instruction, so that under the condition that a user can not perform interactive interface operation on a second terminal, corresponding data synchronization operation is performed on the first terminal, NFC communication connection between terminals is established, data synchronization instructions are sent to the second terminal by the first terminal to achieve data synchronization, the NFC is used for sending the synchronization instructions, the second terminal can identify the URL field and perform interactive operation corresponding to the URL field, the problem that the data synchronization of the terminals which cannot operate is performed is effectively solved, and the universality of data synchronization between the terminals is improved.
In another embodiment of the present invention, the first terminal may obtain first account information corresponding to the data synchronization operation, and a resource path and an upload instruction corresponding to the target application program, and then the first terminal constructs a resource positioning link corresponding to the target application program by using the obtained resource path and the upload instruction, and generates a data synchronization instruction for the target application program by using the first account information and the resource positioning link, so that the first terminal obtains the first account information and the resource positioning link, generates a data synchronization instruction for the same account in the target application program, improves accuracy of data synchronization, and reduces a data amount of synchronization.
Optionally, the first account information may include login information, such as a login account, corresponding to the target application program, input by the user in the NFC operation interface, and then a resource path and an upload instruction corresponding to the target application program are used to construct a resource location link corresponding to the target application program, where the resource location link may be a URL link generated by a URL field, and is used to instruct the second terminal to start the target application program, acquire and upload application data of the target application program, and then package the current login information of the first terminal and the URL link, and generate a data synchronization instruction for the target application program.
In an optional example, the first terminal is a smart phone [ ] and the second terminal is a smart phone [ ] and a display screen of the smart phone [ ] cannot be displayed, so that a user cannot use the smart phone [ ] to perform operations such as touch control and the like, at this time, the user can open an NFC operation interface of the smart phone [ ] first, then select a data synchronization button on the NFC operation interface, input a preset range of [ 0 meter, 1 meter ] in the interface, display an inputtable text box in the NFC operation interface, and input specified text information in the text box by the user: the method comprises the following steps of opening a social application program A, automatically uploading a URL field of a local chat record after the social application program A is started, moving a smart phone II to the vicinity of a smart phone I, determining that the smart phone II exists in a preset range by the smart phone I, establishing NFC communication connection with the smart phone II, acquiring login information, an ip address and an uploading instruction of the social application program A, which are input by a user, and generating a corresponding URL link according to the ip address and the uploading instruction of the social application program A: the method comprises the steps of generating an APP/upload data according to a URL link and current login information corresponding to a social application program A operated by a smart phone I, and meanwhile establishing NFC communication connection between the smart phone I and the smart phone II.
Step 102, transmitting the data synchronization instruction to the second terminal so that the second terminal runs the target application program, and uploading application data corresponding to the target application program to a server according to the data synchronization instruction;
in the embodiment of the present invention, when the first terminal determines that the second terminal exists within the preset range, the first terminal may establish an NFC communication connection with the second terminal, and then the first terminal may send a data synchronization instruction including a resource path of the target application program and an upload instruction to the second terminal, and after receiving the data synchronization instruction, the second terminal may analyze the data synchronization instruction, start the target application program corresponding to the data synchronization instruction, and upload application data of the target application program to the server.
In specific implementation, the first terminal may send a data synchronization instruction including the resource positioning link to the second terminal, and the second terminal may parse the resource positioning link to obtain a resource path and an upload instruction of the target application program, start the corresponding target application program according to the resource path, and upload application data corresponding to the first account information in the target application program to the server according to the upload instruction, so that the data synchronization instruction is sent by using an NFC technology, the problem that the second terminal which cannot operate performs data synchronization is effectively solved, and the universality of data synchronization between the first terminal and the second terminal is improved.
In an optional example, the first terminal is a smart phone (i), the second terminal is a smart phone (ii), a display screen of the smart phone (ii) cannot be displayed, and NFC communication connection exists between the smart phone (i) and the smart phone (ii), so that the smart phone (i) can transmit the data synchronization instruction to the smart phone (ii), the smart phone (ii) can analyze the data synchronization instruction, and the obtained URL link in the data synchronization instruction is: com/uploadData, if the target application program APP is determined to be the social application program A, the social application program A in the smart phone II is started, and the local application data corresponding to the first account information is uploaded to the server side according to the local data uploading instruction of the uploadData.
Step 103, responding to the account verification operation for the target application program, and if the account verification result represents that the account verification is successful, acquiring the application data from the server.
In the embodiment of the present invention, the server may perform an account verification operation for the target application, where the account verification operation may be performed before the server verifies that the first terminal generates the data synchronization instruction, whether a login account number input by the user on the NFC operation interface for the target application is the same as a login account number input by the user currently on the target application, if the login account number input by the user on the NFC operation interface is the same as the login account number input by the user currently on the target application, it indicates that the first account information and the second account information are successfully verified, the first terminal may obtain corresponding application data from the server, so that the application data is transmitted to the server through the second terminal, and in a case where the server verifies that the current login account of the first terminal is consistent with an account corresponding to the application data uploaded by the second terminal, the server side allows the first terminal and the second terminal to carry out data synchronization, and the safety of data synchronization is effectively guaranteed.
In a specific implementation, the first terminal may display a login interface of the target application program in response to the second terminal finishing uploading the application data of the target application program to the server, then obtain second account information corresponding to the login operation in response to the login operation of the user in the login interface, and allow the first terminal to obtain the application data corresponding to the first account information from the server if the server verifies that the first account information is the same as the second account information.
Specifically, the account information may be login information of the target application, such as a login account number, which may include first account information input by the user through an NFC operation interface in the first terminal, and second account information currently input by the user through the login interface in the first terminal. After the first terminal packages and sends the first account information and the resource positioning link to the second terminal, the second terminal analyzes a resource path of the resource positioning link, determines a target application program to be operated, uploads application data corresponding to the first account information to the server according to an uploading instruction of the resource positioning link, then the server can obtain second account information input by a user at a login interface at present, verifies the first account information and the second account information, and after the verification is successful, the server allows the first terminal to obtain the application data from the server, so that the uploaded data volume is reduced by uploading the application data corresponding to the first account information, the data synchronization efficiency is improved, and the data acquisition safety is improved by verifying the first account information and the second account information.
In an optional example, the first terminal is a smartphone i, the second terminal is a smartphone ii, and the smartphone ii receives a data synchronization instruction sent by the smartphone i through an NFC communication channel, analyzes the data synchronization instruction, and obtains a URL link in the data synchronization instruction as follows: the method comprises the steps that APP/uploadData is determined, a target application program APP is determined to be a social application program A, the social application program A is started in a smart phone II, local data corresponding to first account information are uploaded to a service end according to a local data uploading instruction of the uploadData, the smart phone I responds to the uploading data of the smart phone II to finish operation, a login interface of the social application program A is displayed, login operation is executed in the login interface, second account information input in the login interface by the smart phone I is obtained from the service end, an account number of the first account information is matched with an account number of the second account information, if matching is successful, the fact that the login account of the social application program A in the smart phone I is consistent with the login account corresponding to the application data uploaded by the social application program A in the smart phone II is shown, and then the smart phone can download the data of the social application program A corresponding to the second account information from the server side, so that data synchronization among different devices is realized.
It should be noted that the embodiment of the present invention includes but is not limited to the above examples, and it is understood that, under the guidance of the idea of the embodiment of the present invention, a person skilled in the art may also set the method according to actual needs, and the present invention is not limited to this.
In the embodiment of the present invention, the method may be applied to a first terminal having an NFC function, where the first terminal may include at least one application, and the first terminal may determine, in response to a data synchronization operation for the first terminal, a target application and a second terminal corresponding to the data synchronization operation, generate a data synchronization instruction for the target application, establish an NFC communication connection with the second terminal, then transmit the data synchronization instruction to the second terminal, so that the second terminal runs the target application, upload application data corresponding to the target application according to the data synchronization instruction to a server, and then respond to an account verification operation for the target application, and if an account verification result represents that the account verification is successful, obtain the application data from the server, and in a case that a user cannot perform an interactive interface operation on the second terminal, the method comprises the steps of establishing NFC communication connection between terminals by carrying out corresponding data synchronization operation on a first terminal, and sending a data synchronization instruction to a second terminal by the first terminal to realize data synchronization.
In order to make those skilled in the art better understand the technical solution of the embodiment of the present invention, the embodiment of the present invention is described below by way of an example and with reference to the flowchart shown in fig. 2.
1) And the user selects the first terminal and opens the NFC function of the first terminal.
2) Inputting specified text information on an NFC operation interface of a first terminal, for example, opening a certain App, automatically uploading a URL field of local data after starting the App, and sending a data synchronization instruction;
3) a second terminal with an unavailable screen function is close to the first terminal, and if the second terminal is within a preset range, the second terminal acquires a data synchronization instruction sent by the first terminal;
4) if the data synchronization instruction generated by the first terminal comprises a resource path and an uploading instruction, the second terminal equipment receives the data synchronization instruction sent by the first terminal through NFC, analyzes the received data synchronization instruction, for example, the received URL field is APP:// APP. com/uploadData, obtains that the target application program APP is social application program A after analyzing the field, opens the social application program A and uploads the local chat data of the social application program A;
5) if the data synchronization instruction generated by the first terminal comprises the first account information and the resource positioning link, the second terminal executes the analyzed operation through NFC, for example, a URL link of an APP:// APP. com/uploadData field is generated, the URL link is loaded, the social application program A can be directly opened, and the social application program A can execute corresponding operation according to a path or a parameter of the URL, for example, local chat data operation corresponding to the first account information is uploaded.
6) After the second terminal uploads the chat data to the server, the first terminal can open the social application program A for data downloading, and the chat data of the social application program A of the second terminal can be synchronized.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 3, a block diagram of a structure of an NFC-based data synchronization apparatus provided in the embodiment of the present invention is shown, and is applied to a first terminal, where the first terminal includes at least one application program, and specifically may include the following modules:
a data synchronization instruction generating module 301, configured to determine, in response to a data synchronization operation for the first terminal, 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;
an application data uploading module 302, configured to transmit the data synchronization instruction to the second terminal, so that the second terminal runs the target application program, and upload application data corresponding to the target application program to a server according to the data synchronization instruction;
the application data obtaining module 303 is configured to, in response to the account verification operation for the target application program, obtain the application data from the server if the account verification result represents that the account verification is successful.
In an optional embodiment, the data synchronization instruction generating module 301 is specifically configured to:
displaying an NFC operation interface;
and responding to the data synchronization operation aiming at the NFC operation interface, determining a target application program corresponding to the data synchronization operation, and if a second terminal is detected to exist in a preset range of the first terminal, generating a data synchronization instruction aiming at the target application program.
In an optional embodiment, the data synchronization instruction generating module 301 further includes:
the resource path acquisition submodule is used for acquiring a resource path and an uploading instruction corresponding to the target application program;
and the data synchronization instruction construction sub-module is used for constructing a data synchronization instruction aiming at the target application program by adopting the resource path and the uploading instruction.
In an optional embodiment, the resource path obtaining sub-module is specifically configured to:
acquiring first account information corresponding to the data synchronization operation, and a resource path and an uploading instruction corresponding to the target application program;
the data synchronization instruction construction submodule is specifically configured to:
adopting the resource path and the uploading instruction to construct a resource positioning link corresponding to the target application program;
and generating a data synchronization instruction aiming at the target application program by adopting the first account information and the resource positioning link.
In an optional embodiment, the application data uploading module 302 is specifically configured to:
and sending the resource positioning link to the second terminal so that the second terminal analyzes the resource positioning link to obtain the resource path and the uploading instruction, running the target application program according to the resource path, acquiring application data corresponding to the first account information in the target application program according to the uploading instruction in the running process of the target application program, and uploading the application data to a server.
In an optional embodiment, the application data obtaining module 303 is specifically configured to:
responding to the completion of uploading the application data, and displaying a login interface of the target application program;
and responding to the login operation of the login interface, acquiring second account information corresponding to the login operation, and acquiring application data corresponding to the first account information from the server if the first account information is the same as the second account information.
For the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points.
In addition, an electronic device is further provided in the embodiments of the present invention, as shown in fig. 4, and includes a processor 401, a communication interface 402, a memory 403, and a communication bus 404, where the processor 401, the communication interface 402, and the memory 403 complete mutual communication through the communication bus 404,
a memory 403 for storing a computer program;
the processor 401, when executing the program stored in the memory 403, implements the following steps:
responding to data synchronization operation aiming at the first terminal, determining a target application program and a second terminal corresponding to the data synchronization operation, generating a data synchronization instruction aiming at the target application program, and establishing NFC communication connection with the second terminal;
transmitting the data synchronization instruction to the second terminal so that the second terminal runs the target application program, and uploading application data corresponding to the target application program to a server according to the data synchronization instruction;
and responding to the account verification operation aiming at the target application program, and if the account verification result represents that the account verification is successful, acquiring the application data from the server side.
In an optional embodiment, the determining, in response to the data synchronization operation for the first terminal, a target application and a second terminal corresponding to the data synchronization operation, and generating the data synchronization instruction corresponding to the target application includes:
displaying an NFC operation interface;
and responding to the data synchronization operation aiming at the NFC operation interface, determining a target application program corresponding to the data synchronization operation, and if a second terminal is detected to exist in a preset range of the first terminal, generating a data synchronization instruction aiming at the target application program.
In an optional embodiment, the generating the data synchronization instruction for the target application includes:
acquiring a resource path and an uploading instruction corresponding to the target application program;
and constructing a data synchronization instruction aiming at the target application program by adopting the resource path and the uploading instruction.
In an optional embodiment, the obtaining a resource path and an upload instruction corresponding to the target application includes:
acquiring first account information corresponding to the data synchronization operation, and a resource path and an uploading instruction corresponding to the target application program;
the establishing of the data synchronization instruction for the target application program by adopting the resource path and the uploading instruction comprises the following steps:
adopting the resource path and the uploading instruction to construct a resource positioning link corresponding to the target application program;
and generating a data synchronization instruction aiming at the target application program by adopting the first account information and the resource positioning link.
In an optional embodiment, the transmitting the data synchronization instruction to the second terminal to enable the second terminal to run the target application program, and uploading application data corresponding to the target application program to a server according to the data synchronization instruction includes:
and sending the resource positioning link to the second terminal so that the second terminal analyzes the resource positioning link to obtain the resource path and the uploading instruction, running the target application program according to the resource path, acquiring application data corresponding to the first account information in the target application program according to the uploading instruction in the running process of the target application program, and uploading the application data to a server.
In an optional embodiment, the, in response to the account verification operation for the target application program, if the account verification result indicates that the account verification is successful, acquiring the application data from the server side includes:
responding to the completion of uploading the application data, and displaying a login interface of the target application program;
and responding to the login operation of the login interface, acquiring second account information corresponding to the login operation, and acquiring application data corresponding to the first account information from the server if the first account information is the same as the second account information.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM), and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In yet another embodiment provided by the present invention, as shown in fig. 5, there is further provided a computer-readable storage medium 501, which stores instructions that, when run on a computer, cause the computer to execute the NFC-based data synchronization method described in the above embodiments.
In a further embodiment provided by the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the NFC-based data synchronization method described in the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may 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 loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. An NFC-based data synchronization method, applied to a first terminal including at least one application program, the method comprising:
responding to data synchronization operation aiming at the first terminal, determining a target application program and a second terminal corresponding to the data synchronization operation, generating a data synchronization instruction aiming at the target application program, and establishing NFC communication connection with the second terminal;
transmitting the data synchronization instruction to the second terminal so that the second terminal runs the target application program, and uploading application data corresponding to the target application program to a server according to the data synchronization instruction;
and responding to the account verification operation aiming at the target application program, and if the account verification result represents that the account verification is successful, acquiring the application data from the server side.
2. The method according to claim 1, wherein the determining, in response to the data synchronization operation for the first terminal, the target application and the second terminal corresponding to the data synchronization operation, and generating the data synchronization instruction corresponding to the target application comprises:
displaying an NFC operation interface;
and responding to the data synchronization operation aiming at the NFC operation interface, determining a target application program corresponding to the data synchronization operation, and if a second terminal is detected to exist in a preset range of the first terminal, generating a data synchronization instruction aiming at the target application program.
3. The method of claim 1 or 2, wherein the generating data synchronization instructions for the target application comprises:
acquiring a resource path and an uploading instruction corresponding to the target application program;
and constructing a data synchronization instruction aiming at the target application program by adopting the resource path and the uploading instruction.
4. The method of claim 3, wherein the obtaining the resource path and the upload instruction corresponding to the target application program comprises:
acquiring first account information corresponding to the data synchronization operation, and a resource path and an uploading instruction corresponding to the target application program;
wherein, the constructing a data synchronization instruction for the target application program by using the resource path and the upload instruction includes:
adopting the resource path and the uploading instruction to construct a resource positioning link corresponding to the target application program;
and generating a data synchronization instruction aiming at the target application program by adopting the first account information and the resource positioning link.
5. The method according to claim 4, wherein the transmitting the data synchronization instruction to the second terminal to enable the second terminal to run the target application program and upload application data corresponding to the target application program to a server according to the data synchronization instruction comprises:
and sending the resource positioning link to the second terminal so that the second terminal analyzes the resource positioning link to obtain the resource path and the uploading instruction, running the target application program according to the resource path, acquiring application data corresponding to the first account information in the target application program according to the uploading instruction in the running process of the target application program, and uploading the application data to a server.
6. The method of claim 4, wherein the obtaining the application data from the server in response to the account verification operation for the target application program if the account verification result indicates that the account verification is successful comprises:
responding to the completion of uploading the application data, and displaying a login interface of the target application program;
and responding to the login operation of the login interface, acquiring second account information corresponding to the login operation, and acquiring application data corresponding to the first account information from the server if the first account information is the same as the second account information.
7. An NFC-based data synchronization apparatus applied to a first terminal including at least one application program, the apparatus comprising:
the data synchronization instruction generation module is used for responding to data synchronization operation aiming at the first terminal, determining a target application program and a second terminal corresponding to the data synchronization operation, generating a data synchronization instruction aiming at the target application program, and establishing NFC communication connection with the second terminal;
the application data uploading module is used for transmitting the data synchronization instruction to the second terminal so that the second terminal runs the target application program, and uploading application data corresponding to the target application program to a server according to the data synchronization instruction;
and the application data acquisition module is used for responding to the account verification operation aiming at the target application program, and acquiring the application data from the server side if the account verification result represents that the account verification is successful.
8. The apparatus of claim 7, wherein the data synchronization instruction generation module is specifically configured to:
displaying an NFC operation interface;
and responding to the data synchronization operation aiming at the NFC operation interface, determining a target application program corresponding to the data synchronization operation, and if a second terminal is detected to exist in a preset range of the first terminal, generating a data synchronization instruction aiming at the target application program.
9. 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;
the memory is used for storing a computer program;
the processor, when executing a program stored on the memory, implementing the method of any of claims 1-7.
10. A computer-readable storage medium having stored thereon instructions, which when executed by one or more processors, cause the processors to perform the method of any one of claims 1-7.
CN202210445708.2A 2022-04-26 2022-04-26 Data synchronization method and device based on NFC, electronic equipment and storage medium Pending CN114866566A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210445708.2A CN114866566A (en) 2022-04-26 2022-04-26 Data synchronization method and device based on NFC, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210445708.2A CN114866566A (en) 2022-04-26 2022-04-26 Data synchronization method and device based on NFC, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114866566A true CN114866566A (en) 2022-08-05

Family

ID=82633648

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210445708.2A Pending CN114866566A (en) 2022-04-26 2022-04-26 Data synchronization method and device based on NFC, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114866566A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130065521A1 (en) * 2011-09-08 2013-03-14 Pantech Co., Ltd. Near field communication (nfc) terminal and method for data synchronization
CN104639611A (en) * 2014-12-31 2015-05-20 北京网秦天下科技有限公司 Method and device for synchronizing data and mobile terminal
CN106294006A (en) * 2016-07-29 2017-01-04 宇龙计算机通信科技(深圳)有限公司 A kind of data back up method, source terminal and target terminal
CN107135471A (en) * 2017-05-11 2017-09-05 维沃移动通信有限公司 The method and mobile terminal of a kind of data transfer
CN107678727A (en) * 2017-09-15 2018-02-09 珠海市魅族科技有限公司 Terminal control method and device, computer installation and readable storage medium storing program for executing
CN108076056A (en) * 2017-12-12 2018-05-25 北京小米移动软件有限公司 Cloud server login method and device
CN111224694A (en) * 2019-12-29 2020-06-02 武汉迈威通信股份有限公司 Method and device for replacing switch equipment based on NFC, storage medium and equipment
CN113923230A (en) * 2020-06-22 2022-01-11 华为技术有限公司 Data synchronization method, electronic device, and computer-readable storage medium
CN114138908A (en) * 2021-12-06 2022-03-04 南京欧珀软件科技有限公司 Data synchronization method, device, terminal and storage medium
CN114221969A (en) * 2021-11-24 2022-03-22 安徽听见科技有限公司 Data synchronization method, terminal, server and system based on near field communication

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130065521A1 (en) * 2011-09-08 2013-03-14 Pantech Co., Ltd. Near field communication (nfc) terminal and method for data synchronization
CN104639611A (en) * 2014-12-31 2015-05-20 北京网秦天下科技有限公司 Method and device for synchronizing data and mobile terminal
CN106294006A (en) * 2016-07-29 2017-01-04 宇龙计算机通信科技(深圳)有限公司 A kind of data back up method, source terminal and target terminal
CN107135471A (en) * 2017-05-11 2017-09-05 维沃移动通信有限公司 The method and mobile terminal of a kind of data transfer
CN107678727A (en) * 2017-09-15 2018-02-09 珠海市魅族科技有限公司 Terminal control method and device, computer installation and readable storage medium storing program for executing
CN108076056A (en) * 2017-12-12 2018-05-25 北京小米移动软件有限公司 Cloud server login method and device
CN111224694A (en) * 2019-12-29 2020-06-02 武汉迈威通信股份有限公司 Method and device for replacing switch equipment based on NFC, storage medium and equipment
CN113923230A (en) * 2020-06-22 2022-01-11 华为技术有限公司 Data synchronization method, electronic device, and computer-readable storage medium
CN114221969A (en) * 2021-11-24 2022-03-22 安徽听见科技有限公司 Data synchronization method, terminal, server and system based on near field communication
CN114138908A (en) * 2021-12-06 2022-03-04 南京欧珀软件科技有限公司 Data synchronization method, device, terminal and storage medium

Similar Documents

Publication Publication Date Title
US9866388B2 (en) Portable device interface methods and systems
EP3179758A1 (en) Building intercom method, nfc unlocking device and building intercom system
US9277391B2 (en) Pairing method between bluetooth devices and bluetooth system using the same
CN104636924B (en) Secure payment method, server and system
CN105450643B (en) The authentication method of network insertion, apparatus and system
CN105472771B (en) Wireless connection method and device
CN104378145A (en) Pairing method and system of Bluetooth device
CN104270404A (en) Login method and device based on terminal identification
KR20170058991A (en) Verification information transmission method and terminal
US10320995B2 (en) Communication system, communication apparatus, and communication connection method
US9680841B2 (en) Network authentication method for secure user identity verification using user positioning information
CN105657781B (en) WiFi network access method and device
US20150365827A1 (en) Methods and systems for authentication of a communication device
CN112291271A (en) Method, system and medium for automatically logging in server by mobile equipment
US20150095222A1 (en) Dynamic identity representation in mobile devices
US20140172532A1 (en) Optimal utilization of coupons
US20130031260A1 (en) Method and apparatus for establishing an ad-hoc bi-directional network with an optical identifier
CN110336781A (en) A kind of method and apparatus based on browser identification terminal uniqueness
CN107231389B (en) Code scanning operation method and equipment
CN104869107A (en) Identity authentication method, wearable equipment, authentication server and system thereof
CN107534860A (en) Wi-Fi hotspot portal authentication method and device
CN104125205A (en) Communication account login method, system and terminal
US11924636B2 (en) System and method for authenticating using a multi-provider platform
CN104331649A (en) Identity recognition system and method based on network connection
EP3410332B1 (en) A system and method for transferring data to an authentication device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination