WO2019237978A1 - 一种向用户提供近场通信设备信息的方法及系统 - Google Patents

一种向用户提供近场通信设备信息的方法及系统 Download PDF

Info

Publication number
WO2019237978A1
WO2019237978A1 PCT/CN2019/090154 CN2019090154W WO2019237978A1 WO 2019237978 A1 WO2019237978 A1 WO 2019237978A1 CN 2019090154 W CN2019090154 W CN 2019090154W WO 2019237978 A1 WO2019237978 A1 WO 2019237978A1
Authority
WO
WIPO (PCT)
Prior art keywords
field communication
near field
data exchange
exchange format
communication data
Prior art date
Application number
PCT/CN2019/090154
Other languages
English (en)
French (fr)
Inventor
陆舟
于华章
Original Assignee
飞天诚信科技股份有限公司
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 飞天诚信科技股份有限公司 filed Critical 飞天诚信科技股份有限公司
Publication of WO2019237978A1 publication Critical patent/WO2019237978A1/zh
Priority to US17/115,695 priority Critical patent/US11212658B2/en

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
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/24Negotiation of communication capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/18Information format or content conversion, e.g. adaptation by the network of the transmitted or received information for the purpose of wireless delivery to users or terminals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/22Processing or transfer of terminal data, e.g. status or physical capabilities
    • H04W8/24Transfer of terminal data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/20Services signaling; Auxiliary data signalling, i.e. transmitting data via a non-traffic channel

Definitions

  • the present invention relates to the field of communications, and in particular, to a method and system for providing information of a near field communication device to a user.
  • NFC Near field communication
  • the present invention provides a method for providing information of a near field communication device to a user, including:
  • Step S1 The terminal sends an application command for selecting a near field communication data exchange format to the near field communication device.
  • Step S2 The near field communication device determines whether there is an application of a near field communication data exchange format, and if yes, returns a successful response to the terminal, and executes step S3, otherwise ends;
  • Step S3 The terminal sends a command for selecting a function container file to the near field communication device.
  • Step S4 The near field communication device determines whether a functional container file exists, and if yes, returns a successful response to the terminal, and executes step S5, otherwise ends;
  • Step S5 The terminal sends a read function container file command to the near field communication device.
  • Step S6 The near field communication device sends a function container file to the terminal;
  • Step S7 The terminal determines whether a near field communication data exchange format file identifier exists according to the function container file, and if yes, executes step S8; otherwise ends;
  • Step S8 The terminal sends a command for selecting a near field communication data exchange format file to the near field communication device.
  • Step S9 The near field communication device determines whether a near field communication data exchange format file exists, and if yes, returns a successful response to the terminal, and executes step S10, otherwise ends;
  • Step S10 The terminal sends a command to read the near field communication data exchange format file to the near field communication device.
  • Step S11 The near field communication device writes the near field communication device information and a preset application identifier into a near field communication data exchange format file, and sends the near field communication data exchange format file to the terminal;
  • Step S12 The terminal obtains the application identifier and the near field communication device information from the near field communication data exchange format file; starts an application corresponding to the application identifier, and saves the near field communication device information in a position readable by the application. .
  • the present invention also provides a system for providing information of a near field communication device to a user, including: a terminal and a near field communication device;
  • the terminals include:
  • the first sending module is configured to send a near-field communication device to select a near-field communication data exchange format application command.
  • the first sending module is also configured to send a near-field communication data exchange format application command to the near-field communication device when the first receiving module receives a successful response.
  • the field communication device sends a select function container file command; it is also used to send a read function container file command to the near field communication device when the first receiving module receives a successful response after sending the select function container file command;
  • the judging module sends a command for selecting a near field communication data exchange format file to the near field communication device when it determines that a near field communication data exchange format file exists according to the function container file; and is also used for first receiving after sending the command for selecting a near field communication data exchange format file.
  • the module receives a successful response, it sends a command to read the near field communication data exchange format file to the near field communication device;
  • a first receiving module configured to receive a successful response returned by the near field communication device; used to receive a function container file returned by the near field communication device; and used to receive a near field communication data exchange format file sent by the near field communication device;
  • a first determining module configured to determine whether a near field communication data exchange format file identifier exists according to the functional container file when the first receiving module receives the functional container file;
  • An obtaining module configured to obtain the application identifier and the near field communication device information from the near field communication data exchange format file when the first receiving module receives the near field communication data exchange format file sent by the near field communication device;
  • a startup module configured to start an application program corresponding to the application identifier obtained by the acquisition module
  • a storage module configured to save the near field communication device information obtained by the acquisition module to a position readable by the application
  • a second receiving module for receiving an application command for selecting a near field communication data exchange format sent by the terminal; also for receiving a command for selecting a function container file sent by the terminal; and for receiving a command for reading a function container file sent by the terminal; It is used to receive a command for selecting a near field communication data exchange format file sent by the terminal; it is also used to receive a command for reading a near field communication data exchange format file sent by the terminal;
  • a second determining module configured to determine whether a near field communication data exchange format application exists when the second receiving module receives a command for selecting a near field communication data exchange format; and a second determining module for receiving a selection function container file When commanding, determine whether there is a function container file; and also when the second receiving module receives a command for selecting a near field communication data exchange format file, determine whether a near field communication data exchange format file exists;
  • a second sending module configured to return a successful response to the terminal when the second determining module determines that a near field communication data exchange format application exists; and is also used to return a successful response to the terminal when the second determining module determines that a functional container file exists; It is used to send a function container file to the terminal when the second receiving module receives the command to read the function container file; it is also used to return a successful response to the terminal when the second judgment module determines that there is a near field communication data exchange format file; It is used to send the near field communication data exchange format file generated by the writing module to the terminal;
  • the writing module is configured to write the near field communication device information and a preset application identifier into the near field communication data exchange format file when the second receiving module receives a command to read the near field communication data exchange format file.
  • the present invention provides a universal method and system for providing information of a near field communication device to a user, so that the user can more conveniently obtain the information of the near field communication device.
  • FIG. 1 is a flowchart of a method for providing information of a near field communication device to a user according to Embodiment 2 of the present invention
  • FIG. 2 is a block diagram of a system for providing information of a near field communication device to a user according to Embodiment 3 of the present invention.
  • This embodiment provides a method for providing information of a near field communication device to a user, including:
  • Step S1 The terminal sends an application command for selecting a near field communication data exchange format to the near field communication device.
  • NFC Data Exchange Format English abbreviation: NDEF
  • Step S2 The near field communication device determines whether there is an application of a near field communication data exchange format, and if yes, returns a successful response to the terminal, and executes step S3, otherwise ends;
  • Step S3 The terminal sends a command for selecting a function container file to the near field communication device.
  • Step S4 The near field communication device determines whether a functional container file exists, and if yes, returns a successful response to the terminal, and executes step S5, otherwise ends;
  • Step S5 The terminal sends a read function container file command to the near field communication device.
  • Step S6 The near field communication device sends a function container file to the terminal;
  • Step S7 The terminal determines whether a near field communication data exchange format file identifier exists according to the function container file, and if yes, executes step S8; otherwise ends;
  • Step S8 The terminal sends a command for selecting a near field communication data exchange format file to the near field communication device.
  • Step S9 The near field communication device determines whether a near field communication data exchange format file exists, and if yes, returns a successful response to the terminal, and executes step S10, otherwise ends;
  • Step S10 The terminal sends a command to read the near field communication data exchange format file to the near field communication device.
  • Step S11 The near field communication device writes the near field communication device information and a preset application identifier into a near field communication data exchange format file, and sends the near field communication data exchange format file to the terminal;
  • Step S12 The terminal obtains the application identifier and the near field communication device information from the near field communication data exchange format file; starts an application corresponding to the application identifier, and saves the near field communication device information in a position readable by the application. .
  • starting the application program corresponding to the application identifier is specifically: the terminal locates the corresponding application program according to the application identifier, and starts the application program.
  • starting an application corresponding to the application identifier and saving the near field communication device information in a position readable by the application are specifically: the terminal receives a user-selected application signal triggered by the user, and opens the corresponding application, and determines to open If the application program matches the application identifier, then the near field communication device information is stored in a position that the application program can read, otherwise it ends.
  • storing the near field communication device information in a position readable by the application program is specifically saving the near field communication device information in a pasteboard or an application sharing area.
  • the method further includes: the terminal determines whether the configuration is valid according to the function container file, and if yes, executes step S7, otherwise the error ends.
  • the terminal determines whether the configuration is valid according to the function container file. Specifically, the terminal includes:
  • Step C1 The terminal checks whether the format of the function container file satisfies a preset condition, and if yes, executes Step C2; otherwise, ends;
  • Step C2 The terminal obtains version information from the function container file, and determines whether the corresponding version is supported according to the version information. If yes, execute step C3; otherwise, end.
  • Step C3 The terminal obtains the maximum data reading length and the maximum data sending length from the function container file, and determines whether the maximum data reading length and the maximum data sending length are within a valid range. If yes, step C4 is performed; otherwise, the process ends;
  • Step C4 The terminal obtains the near field communication data exchange format file information from the function container file, and determines whether reading is allowed according to the reading conditions in the near field communication data exchange format file information. If yes, step S7 is performed; otherwise, the process ends.
  • the method further includes:
  • Step E1 The terminal sends a command for reading the file length of the near field communication data exchange format to the near field communication device;
  • Step E2 The near field communication device calculates the near field communication data exchange format file length according to the length of the near field communication device information and the preset application identifier length, and sends the near field communication data exchange format file length to the terminal.
  • This embodiment also provides a method for providing information of a near field communication device to a user, including:
  • Step A1 The near field communication device receives a command for selecting a near field communication data exchange format application sent by the terminal, and determines whether there is an application of the near field communication data exchange format. If yes, a successful response is returned to the terminal; step A2 is performed, otherwise the process ends;
  • Step A2 The near field communication device receives the function container file selection command sent by the terminal, and determines whether there is a function container file. If yes, a success response is returned to the terminal, and step A3 is performed, otherwise, the process ends.
  • Step A3 The near field communication device receives the read function container file command sent by the terminal, and sends the function container file to the terminal;
  • Step A4 The near field communication device receives a command for selecting a near field communication data exchange format file sent by the terminal, determines whether there is a near field communication data exchange format file, and returns a successful response to the terminal, and executes step A5, otherwise ends;
  • Step A5. The near field communication device receives the read near field communication data exchange format file command sent by the terminal, writes the near field communication device information and a preset application identifier into the near field communication data exchange format file, and converts the near field communication data exchange format.
  • the file is sent to the terminal.
  • the method further includes: the near field communication device receiving the read near field communication data exchange format file length sent by the terminal, according to the length of the near field communication device information and the length of the preset application identifier Calculate the near field communication data exchange format file length and send the near field communication data exchange format file length to the terminal.
  • This embodiment also provides a method for providing information of a near field communication device to a user.
  • Step B1 The terminal sends a near field communication device selection command for selecting a near field communication data exchange format.
  • step B2 is performed.
  • Step B2 The terminal sends a command for selecting a function container file to the near field communication device.
  • step B3 is performed.
  • Step B3 The terminal sends a read function container file command to the near field communication device, and receives the function container file returned by the near field communication device;
  • Step B4 The terminal determines whether a near field communication data exchange format file identifier exists according to the function container file, and if yes, executes step B5; otherwise ends;
  • Step B5 The terminal sends a command for selecting a near field communication data exchange format file to the near field communication device.
  • step B6 is performed;
  • Step B6 The terminal sends a command to read the near field communication data exchange format file to the near field communication device, receives the near field communication data exchange format file returned by the near field communication device, and obtains the application identifier and Near field communication device information; launch the application corresponding to the application identifier, and save the near field communication device information in a location that the application can read.
  • starting the application program corresponding to the application identifier is specifically: the terminal locates the corresponding application program according to the application identifier, and starts the application program.
  • the optional startup of the application corresponding to the application identifier, and saving the near field communication device information in a position readable by the application are specifically: the terminal receives a user-selected application signal triggered by the user, and opens the corresponding application to determine the opened If the application matches the application identifier, if it is, the near field communication device information is stored in a position that the application can read, otherwise it ends.
  • step B3 and step B4 further include: the terminal determines whether the configuration is valid according to the function container file, and if yes, executes step B4, otherwise the error ends.
  • the terminal determines whether the configuration is valid according to the function container file. Specifically, the terminal includes:
  • Step D1 The terminal checks whether the format of the function container file satisfies a preset condition, if yes, executes Step D2; otherwise, ends;
  • Step D2 The terminal obtains version information from the function container file, and determines whether the corresponding version is supported according to the version information. If yes, execute step D3; otherwise, end;
  • Step D3 The terminal obtains the maximum data reading length and the maximum data sending length from the function container file to determine whether both are within the valid range. If yes, step D4 is performed; otherwise, the process ends;
  • Step D4 The terminal obtains the near field communication data exchange format file information from the function container file, and determines whether reading is allowed according to the reading conditions in the near field communication data exchange format file information. If yes, step B4 is performed; otherwise, the process ends.
  • the method further includes: sending, by the terminal, the near field communication device to read the near field communication data exchange format file length command, and receiving the near field communication data exchange format file length returned by the near field communication device.
  • This embodiment provides a method for providing near field communication device information to a user.
  • the method can be applied to dynamic tokens and terminals that support near field communication. Referring to FIG. 1, the method includes:
  • Step 101 The terminal organization selects a near field communication data exchange format application command, and sends a dynamic field token to select a near field communication data exchange format application command.
  • the selected near field communication data exchange format application command is composed of: CLA + INS + P1 + P2 + Lc + Data + Le;
  • CLA is the type byte of the command
  • INS is the command byte of the command
  • P1 and P2 are the parameters
  • Lc is the length of the data in the data in the command body
  • Data is the data for selecting the near field communication data exchange format application command
  • Le is the maximum number of bytes expected to be returned;
  • the data contained in the data of the near field communication data exchange format application command is specifically the near field communication data exchange format application identifier
  • the terminal sequentially stitches the category byte 00, the instruction byte A4, the parameter 04, the data length 07, the near field communication data exchange format application identifier D2760000850101, and 00 to obtain the selected near field communication data exchange.
  • Format application command select the near field communication data exchange format application command.
  • the specific application commands are: 00 A4 04 04 00 D2760000850101 00;
  • Step 102 The dynamic token obtains the near field communication data exchange format application identifier from the selected near field communication data exchange format application command, determines whether there is an application that matches the near field communication data exchange format application identifier, and if yes, sends it to the terminal successfully. If yes, go to Step 103; otherwise, send a failure response to the terminal device and end.
  • the dynamic token determines that there is an application matching the near field communication data exchange format application identifier, it sends a successful response 9000 to the terminal, and executes step 103; when it is determined that there is no phase matching the near field communication data exchange format application identifier.
  • a failure response 6A82 is sent to the terminal, and the process ends.
  • Step 103 The terminal organization selects a function container file and sends a command to select a function container file to the dynamic token.
  • the data contained in the data of the command for selecting the function container file is specifically the function container file identifier
  • the identifier of the function container file preset in this embodiment is specifically E103; the terminal combines the category byte 00, the instruction byte A4, the parameter 00 0C, and the length of the data 02, and the function container file identifier E103 is sequentially spliced to obtain the selection function.
  • Container file command, select function Container file command is specifically 00A4 00C002E103;
  • Step 104 The dynamic token obtains a function container file identifier from the function container file selection command, determines whether there is a file matching the function container file identifier, and if yes, sends a successful response, and executes step 105; otherwise, sends a failure response, and ends;
  • the dynamic token determines that there is a file matching the function container file identifier, it sends a successful response 9000 to the terminal, and executes step 105; when it determines that there is no application matching the function container file identifier, it sends to the terminal Failure response 6A82, end.
  • Step 105 The terminal organization reads the function container file command and sends the read function container file command to the dynamic token.
  • the terminal sequentially stitches the category byte 00, the instruction byte B0, the parameter 000C, and the read data length 0F to obtain the read function container file command, and the read function container file command is 00B0 00C0F;
  • Step 106 The dynamic token sends a function container file to the terminal.
  • the function container file sent by the dynamic token is specifically 000, 20, 80, 00, 80, 04, 06, and E1040100.
  • Step 107 The terminal determines whether the configuration is valid according to the read function container file, and if yes, executes Step 108; otherwise, the process ends;
  • step 107 includes:
  • Step 107-1 The terminal checks whether the format of the functional container file meets a preset condition, and if yes, executes step 107-2; otherwise, it determines that the configuration of the functional container file is invalid;
  • the functional container file includes at least: the length of the functional container file, version information, maximum data read length, maximum data transmission length, and near field communication data exchange format file information; a more detailed near field communication data exchange format
  • the file information format is TLV format
  • TAG is the identification of the near field communication data exchange format file information
  • Lenght is the length of the Value value
  • the Value value includes: near field communication data exchange format file identification, near field communication data exchange format file size 2.
  • the function container file read by the terminal is specifically: 000F, 2080, 8080, 0406, E10401000000;
  • Step 107-2 The terminal obtains version information from the function container file, and determines whether the corresponding version is supported according to the version information, and if yes, executes step 107-3; otherwise, it determines that the configuration of the function container file is invalid;
  • the terminal device obtains the third byte from the function container file as version information, and determines whether the corresponding version is supported according to the version information, and if yes, executes step 107-3; otherwise, it determines that the configuration of the function container file is invalid;
  • the third byte obtained in this embodiment is 000F;
  • Step 107-3 The terminal obtains the maximum data reading length and the maximum data sending length from the function container file to determine whether they are within the valid range. If yes, the process proceeds to step 107-4; otherwise, the function container file configuration is determined to be invalid.
  • the terminal obtains the fourth to fifth bytes from the function container file as the maximum data read length, and obtains the sixth to seventh bytes as the maximum data transmission length to determine whether they are all within the valid range. If yes, go to step 107-4; otherwise, determine that the configuration of the function container file is invalid;
  • the terminal obtains the fourth byte to the fifth byte 0080 from the function container file as the maximum data reading length, and acquires the sixth byte to the seventh byte 0080 as the maximum data sending length;
  • the terminal determines whether the maximum data reading length is between 000F and FFFF, and determines whether the maximum data sending length is between 000D and FFFF. When both are yes, step 107-4 is performed; otherwise, the function container file configuration is determined. invalid;
  • the maximum data read length is 0080
  • the maximum data transmission length is 0080, both of which meet the above requirements, so continue to execute step 107-4;
  • Step 107-4 The terminal obtains the near field communication data exchange format file information from the function container file, and judges whether the reading is allowed according to the reading conditions in the near field communication data exchange format file information. If yes, step 108 is performed; otherwise, it determines The configuration of the function container file is invalid;
  • the terminal obtains the eighth byte to the fifteenth byte from the function container file as the near field communication data exchange format file information, and determines whether the reading condition in the near field communication data exchange format file information is unconditional reading. If yes, read is allowed; otherwise, read is not allowed.
  • the terminal obtains eight bytes to the fifteenth byte 0406E10401000000 from the function container file as the near field communication data exchange format file information;
  • the terminal obtains the fifth byte from the near field communication data exchange format file information to determine whether it is 00, if yes, determines that reading is allowed, otherwise determines that reading is not allowed.
  • Step 108 The terminal determines whether there is a near field communication data exchange format file identifier according to the function container file. If yes, the organization selects a near field communication data exchange format file command, and sends a dynamic token token to select a near field communication data exchange format file command. Step 109; otherwise end;
  • the terminal obtains the tenth to eleventh bytes of the functional container file, and determines whether it is E104, and determines that a near field communication data exchange format file identifier exists; otherwise, it determines that there is no near field communication data exchange format file identifier;
  • the terminal organization selects the near field communication data exchange format file command specifically: the category byte 00, the instruction byte A4, the parameter 00 0C, the data length 02, and the data E104 are sequentially stitched to obtain the select near field communication data exchange format file command.
  • the near field communication data exchange format file command is specifically 00A4, 00C, 02E104;
  • Step 109 The dynamic token determines whether there is a file matching the near field communication data exchange format file identifier in the command for selecting the near field communication data exchange format file. If yes, a successful response is sent to the terminal, and step 110 is performed; otherwise, the terminal Failure response, end;
  • the dynamic token determines that there is a file matching the near field communication data exchange format file identifier, it sends a successful response 9000 to the terminal, and executes step 110, when it is determined that there is no phase matching the near field communication data exchange format file identifier.
  • a failure response 6A82 is sent to the terminal, and the process ends.
  • Step 110 The terminal organization reads the near field communication data exchange format file length command, and sends the read near field communication data exchange format file length command to the dynamic token;
  • the terminal sequentially stitches the category byte 00, the instruction byte B0, the parameter 00, and the read data length 02 to obtain the read near field communication data exchange format file length command, and the near field communication data exchange format file length command.
  • Specific is 00B0 00C0 02;
  • Step 111 The dynamic token acquires a preset file length of the near field communication data exchange format, and sends the file length of the near field communication data exchange format to the terminal.
  • the file length of the near field communication data exchange format obtained by the dynamic token is 001F;
  • the file length of the near field communication data exchange format is fixed.
  • Step 112 The terminal organizes a command to read the near field communication data exchange format file according to the length of the near field communication data exchange format file, and sends a command to read the near field communication data exchange format file to the dynamic token;
  • the terminal sequentially stitches the category byte 00, the instruction byte B0, the parameter 00, and the read data length 1F to obtain the read near field communication data exchange format file command, and the read near field communication data exchange format file command is specifically: 00 B0 00C 0F
  • Step 113 The dynamic token obtains a seed key and an event factor, generates a dynamic password according to the seed key and the event factor, updates the event factor, writes the dynamic password and a preset application identifier into a near field communication data exchange format file, and Send a near field communication data exchange format file to the terminal.
  • the dynamic token combines the URL tag D1011B5504, the preset application identifier 6696646F2E6674736166652E636F6D2F6F74702F333030, and the dynamic password 353236 in order.
  • step 113 is specifically: the dynamic token obtains a seed key and an event factor from its own data sharing area, generates a dynamic password based on the seed key and the event factor, and updates the event factor in the data sharing area to dynamically change
  • the password and the preset application identifier are written into the near field communication data exchange format file, and the near field communication data exchange format file is sent to the terminal;
  • the method further includes: the dynamic token determines whether a key event has occurred, or obtains a seed key and event factor from its own data sharing area, and generates and displays a dynamic password based on the seed key and event factor. ,End.
  • steps 111 to 113 may be replaced with:
  • Step 201 The dynamic token obtains a seed key and an event factor, generates a dynamic password according to the seed key and the event factor, updates the event factor, calculates a file length of the near field communication data exchange format based on the dynamic password and a preset application identifier, and sends File length of near field communication data exchange format;
  • Step 202 The terminal organizes a command for reading the near field communication data exchange format file according to the file length of the near field communication data exchange format file; and sends a command for reading the file for the near field communication data exchange format.
  • Step 203 The dynamic token writes the dynamic password and the preset application identifier into the near field communication data exchange format file, and sends the near field communication data exchange format file to the terminal.
  • Step 114 The terminal obtains the application identifier and the dynamic password from the near field communication data exchange format file; starts the application program corresponding to the application identifier, and saves the dynamic password in a position readable by the application program.
  • the terminal obtains the first byte to the fifth byte from the near field communication data exchange format file as a character string of the URL tag, specifically D1011B5504; and obtains the sixth byte to the twenty-fifth byte
  • the string used as the application identifier is 6666646F2E6674736166652E636F6D2F6F74702F; the 26th to 31st bytes are obtained as the character string of the dynamic password, which is 333030353236; the obtained string is converted based on the ASCII code ,
  • the converted URL tag is https: //; the application identifier is fido.ftsafe.com/otp/; the dynamic password is 300526;
  • step 114 is specifically: the terminal waits for a user-selected application signal triggered by the user, and opens the corresponding application according to the selected application signal, and determines whether the opened application matches the application identifier. Copy the password to the pasteboard, otherwise end;
  • the terminal calls the member function setString of the UIPasteboard class to paste the dynamic password on the pasteboard.
  • step 114 is specifically: the terminal locates the corresponding application program according to the application identifier, opens the corresponding application program, and copies the dynamic password to the pasteboard.
  • the terminal calls getSystemService (CLIPBOARD_SERVICE) to obtain permissions to an object of the ClipboardManager class, and then calls the setPrimaryClip () interface of the ClipboardManager class object to paste the dynamic password to the pasteboard.
  • getSystemService CLIPBOARD_SERVICE
  • the terminal can also store the dynamic password in the application sharing area.
  • the terminal When a dynamic token supporting near field communication contacts the terminal, the terminal generates a dynamic password and a preset application identifier, and the terminal can start an application corresponding to the application identifier and save the dynamic password in the terminal.
  • the application can read; it is convenient for the application to perform subsequent operations.
  • the terminal When a user logs in to a social application, it needs to be explained that the login process of the social application needs to enter a dynamic password; the user only needs to contact the dynamic token held by the user with the terminal, the terminal will start the social application, and The dynamic password is stored in a place where the application can read, so that the application can perform subsequent operations.
  • the subsequent operation can be to automatically fill the dynamic password into the input box to complete the login operation.
  • This embodiment provides a system for providing information of a near field communication device to a user.
  • the system includes a terminal and a near field communication device.
  • the terminals include:
  • the first sending module is configured to send a near-field communication device to select a near-field communication data exchange format application command.
  • the first sending module is also configured to send a near-field communication data exchange format application command to the near-field communication device when the first receiving module receives a successful response.
  • the field communication device sends a select function container file command; it is also used to send a read function container file command to the near field communication device when the first receiving module receives a successful response after sending the select function container file command;
  • the judging module sends a command for selecting a near field communication data exchange format file to the near field communication device when it determines that a near field communication data exchange format file exists according to the function container file; and is also used for first receiving after sending the command for selecting a near field communication data exchange format file.
  • the module receives a successful response, it sends a command to read the near field communication data exchange format file to the near field communication device;
  • a first receiving module configured to receive a successful response returned by the near field communication device; used to receive a function container file returned by the near field communication device; and used to receive a near field communication data exchange format file sent by the near field communication device;
  • a first determining module configured to determine whether a near field communication data exchange format file identifier exists according to the functional container file when the first receiving module receives the functional container file;
  • An obtaining module configured to obtain the application identifier and the near field communication device information from the near field communication data exchange format file when the first receiving module receives the near field communication data exchange format file sent by the near field communication device;
  • a startup module configured to start an application program corresponding to the application identifier obtained by the acquisition module
  • a storage module configured to save the near field communication device information obtained by the acquisition module to a position readable by the application
  • a second receiving module for receiving an application command for selecting a near field communication data exchange format sent by the terminal; also for receiving a command for selecting a function container file sent by the terminal; and for receiving a command for reading a function container file sent by the terminal; It is used to receive a command for selecting a near field communication data exchange format file sent by the terminal; it is also used to receive a command for reading a near field communication data exchange format file sent by the terminal;
  • a second determining module configured to determine whether a near field communication data exchange format application exists when the second receiving module receives a command for selecting a near field communication data exchange format; and a second determining module for receiving a selection function container file When commanding, determine whether there is a function container file; and also when the second receiving module receives a command for selecting a near field communication data exchange format file, determine whether a near field communication data exchange format file exists;
  • a second sending module configured to return a successful response to the terminal when the second determining module determines that a near field communication data exchange format application exists; and is also used to return a successful response to the terminal when the second determining module determines that a functional container file exists; It is used to send a function container file to the terminal when the second receiving module receives the command to read the function container file; it is also used to return a successful response to the terminal when the second judgment module determines that there is a near field communication data exchange format file; It is used to send the near field communication data exchange format file generated by the writing module to the terminal;
  • the writing module is configured to write the near field communication device information and a preset application identifier into the near field communication data exchange format file when the second receiving module receives a command to read the near field communication data exchange format file.
  • the startup module is specifically configured to locate an application corresponding to the application identifier obtained by the acquisition module and start the application.
  • the startup module is specifically configured to receive a user-selected application selection signal and open a corresponding application program
  • the terminal further includes: a third judgment module
  • a third determination module configured to determine whether the application program opened by the startup module matches the application identifier obtained by the acquisition module
  • the saving module is specifically configured to save the near field communication device information obtained by the obtaining module to a position readable by the application when the third determination module determines that the opened application matches the application identifier obtained by the obtaining module.
  • the saving module is specifically configured to save the near field communication device information obtained by the obtaining module to a pasteboard or an application sharing area.
  • the near field communication device is specifically a dynamic token supporting near field communication communication, and the near field communication device information is specifically a dynamic password generated by a dynamic token;
  • the writing module is specifically configured to generate a dynamic password, and write the dynamic password and a preset application identifier into a near field communication data exchange format file.
  • the writing module is specifically used to obtain the seed key and the event factor, generate a dynamic password based on the seed key and the event factor, update the event factor, and write the dynamic password and a preset application identifier into the near field Communication data interchange format file.
  • the terminal further includes: a fourth judgment module;
  • a fourth judgment module configured to determine whether the configuration is valid according to the function container file after the first receiving module receives the function container file
  • the first determination module is specifically configured to determine whether a near field communication data exchange format file identifier exists according to the function container file when the fourth determination module determines that the configuration is valid.
  • the fourth judgment module includes:
  • a first determining unit configured to detect whether the format of the functional container file received by the first receiving module meets a preset condition
  • a second judging unit configured to: when the first judging unit judges that the format of the functional container file meets a preset condition, obtain version information from the functional container file, and judge whether the corresponding version is supported according to the version information;
  • a third determining unit configured to obtain the maximum data read length and the maximum data send length from the function container file when the second determination unit determines that the version corresponding to the version information is supported, and determine the maximum data read length and the maximum data send length Whether they are all within the valid range;
  • a fourth judging unit configured to: when the third judging unit judges that the maximum data reading length and the maximum data sending length are both within a valid range, obtain the near field communication data exchange format file information from the function container file, and according to the near field communication data The read condition in the exchange format file information determines whether read is allowed;
  • the first determining module is specifically configured to determine whether a near field communication data exchange format file identifier exists according to the function container file when the fourth determining unit determines that the reading condition is allowed to be read.
  • the first sending module is further configured to send a command for reading the near field communication data exchange format file length to the near field communication device when the first receiving module receives a successful response after sending the command for selecting the near field communication data exchange format file.
  • a second receiving module further configured to receive a command for reading the file length of the near field communication data exchange format sent by the terminal;
  • the near field communication device further includes: a calculation module
  • a calculation module configured to calculate the near field communication data exchange format file length according to the length of the near field communication device information and the preset application identifier length when the second receiving module receives the read near field communication data exchange format file length command ;
  • a second sending module further configured to send the file length of the near field communication data exchange format file to the terminal;
  • the first receiving module is further configured to receive a file length of the near field communication data exchange format file sent by the near field communication device.
  • This embodiment provides a near field communication device, including:
  • the second receiving module is used for receiving the application command for selecting the near field communication data exchange format sent by the terminal; it is also used for receiving the command for selecting the functional container file sent by the terminal; it is also used for receiving the command for reading the functional container file sent by the terminal; A command for selecting a near field communication data exchange format file sent by a receiving terminal; and a command for reading a near field communication data exchange format file sent by the receiving terminal;
  • a second determining module configured to determine whether a near field communication data exchange format application exists when the second receiving module receives a command for selecting a near field communication data exchange format; and a second determining module for receiving a selection function container file When commanding, determine whether there is a function container file; and also when the second receiving module receives a command for selecting a near field communication data exchange format file, determine whether a near field communication data exchange format file exists;
  • a second sending module configured to return a successful response to the terminal when the second determining module determines that a near field communication data exchange format application exists; and is also used to return a successful response to the terminal when the second determining module determines that a functional container file exists; It is used to send a function container file to the terminal when the second receiving module receives the command to read the function container file; it is also used to return a successful response to the terminal when the second judgment module determines that there is a near field communication data exchange format file; It is used to send the near field communication data exchange format file generated by the writing module to the terminal;
  • the writing module is configured to write the near field communication device information and a preset application identifier into the near field communication data exchange format file when the second receiving module receives a command to read the near field communication data exchange format file.
  • the near field communication device is specifically a dynamic token supporting near field communication.
  • the near field communication device information is specifically a dynamic password generated by a dynamic token.
  • the writing module is specifically configured to generate a dynamic password, and write the dynamic password and a preset application identifier into a near field communication data exchange format file.
  • the writing module is specifically used to obtain the seed key and the event factor, generate a dynamic password based on the seed key and the event factor, update the event factor, and write the dynamic password and a preset application identifier into the near field communication Data interchange format file.
  • the second receiving module is further configured to receive a command for reading the file length of the near field communication data exchange format sent by the terminal;
  • the near field communication device further includes: a calculation module
  • a calculation module configured to calculate a near field communication data exchange format file according to a length of the near field communication device information and a preset application identifier length when the second receiving module receives a command for reading the near field communication data exchange format file length length;
  • the second sending module is further configured to send the file length of the near field communication data exchange format file to the terminal.
  • This embodiment provides a terminal, including:
  • the first sending module is configured to send a near-field communication device to select a near-field communication data exchange format application command.
  • the first sending module is also configured to send a near-field communication data exchange format application command to the near-field communication device when the first receiving module receives a successful response.
  • the field communication device sends a select function container file command; it is also used to send a read function container file command to the near field communication device when the first receiving module receives a successful response after sending the select function container file command;
  • the judging module sends a command for selecting a near field communication data exchange format file to the near field communication device when it determines that a near field communication data exchange format file exists according to the function container file; and is also used for first receiving after sending the command for selecting a near field communication data exchange format file.
  • the module receives a successful response, it sends a command to read the near field communication data exchange format file to the near field communication device;
  • a first receiving module configured to receive a successful response returned by the near field communication device; used to receive a function container file returned by the near field communication device; and used to receive a near field communication data exchange format file sent by the near field communication device;
  • a first determining module configured to determine whether a near field communication data exchange format file identifier exists according to the functional container file when the first receiving module receives the functional container file;
  • An obtaining module configured to obtain the application identifier and the near field communication device information from the near field communication data exchange format file when the first receiving module receives the near field communication data exchange format file sent by the near field communication device;
  • a startup module configured to start an application program corresponding to the application identifier obtained by the acquisition module
  • the saving module is configured to save the near field communication device information obtained by the obtaining module to a position readable by the application.
  • the startup module is specifically configured to locate an application corresponding to the application identifier obtained by the acquisition module and start the application.
  • the startup module is specifically configured to receive a user-selected application selection signal and open a corresponding application program
  • the terminal further includes: a third judgment module
  • a third determination module configured to determine whether the application program opened by the startup module matches the application identifier obtained by the acquisition module
  • the saving module is specifically configured to save the near field communication device information obtained by the obtaining module to a position readable by the application when the third determination module determines that the opened application matches the application identifier obtained by the obtaining module.
  • the saving module is specifically configured to save the near field communication device information obtained by the obtaining module to a pasteboard or an application sharing area.
  • a fourth judgment module Preferably, a fourth judgment module
  • a fourth judgment module configured to determine whether the configuration is valid according to the function container file after the first receiving module receives the function container file
  • the first determination module is specifically configured to determine whether a near field communication data exchange format file identifier exists according to the function container file when the fourth determination module determines that the configuration is valid.
  • the fourth judgment module includes:
  • a first determining unit configured to detect whether the format of the functional container file received by the first receiving module meets a preset condition
  • a second judging unit configured to: when the first judging unit judges that the format of the functional container file meets a preset condition, obtain version information from the functional container file, and judge whether the corresponding version is supported according to the version information;
  • a third determining unit configured to obtain the maximum data read length and the maximum data send length from the function container file when the second determination unit determines that the version corresponding to the version information is supported, and determine the maximum data read length and the maximum data send length Whether they are all within the valid range;
  • a fourth judging unit configured to: when the third judging unit judges that the maximum data reading length and the maximum data sending length are both within a valid range, obtain the near field communication data exchange format file information from the function container file, and according to the near field communication data The read condition in the exchange format file information determines whether read is allowed;
  • the first determining module is specifically configured to determine whether a near field communication data exchange format file identifier exists according to the function container file when the fourth determining unit determines that the reading condition is allowed to be read.
  • the first sending module is specifically configured to send a command for reading the near field communication data exchange format file length to the near field communication device when the first receiving module receives a successful response after sending the command for selecting the near field communication data exchange format file.
  • the first receiving module is further configured to receive a file length of the near field communication data exchange format file sent by the near field communication device.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Communication Control (AREA)

Abstract

本发明涉及通信领域,尤其涉及一种向用户提供近场通信设备信息的方法及系统。所述方法包括:当所述近场通信设备接收到读取近场通信数据交换格式文件命令时,将近场通信设备信息和预置的应用标识符写入近场通信数据交换格式文件,将近场通信数据交换格式文件发送给终端;终端从近场通信数据交换格式文件中获取应用标识符和近场通信设备信息;启动与应用标识符所对应的应用程序,并将近场通信设备信息保存在应用程序可读取的位置,本发明使用户可以更加方便的获取近场通信设备信息。

Description

一种向用户提供近场通信设备信息的方法及系统 技术领域
本发明涉及通信领域,尤其涉及一种向用户提供近场通信设备信息的方法及系统。
背景技术
近场通信(英文全称:Near Field Communication,英文缩写:NFC),又称近距离无线通信,是一种短距离的高频无线通信技术,由于近场通信相比于其他无线通讯技术具有更好的安全性,因此被认为具有很大的应用前景。
现有技术中,当终端需要获取近场通信设备的信息时,需要根据不同的近场通信设备组织不同的私有指令用来获取近场通信设备信息,操作繁琐,用户体验差。
发明内容
本发明提供一种向用户提供近场通信设备信息的方法,包括:
步骤S1、终端向近场通信设备发送选择近场通信数据交换格式应用命令;
步骤S2、近场通信设备判断是否存在近场通信数据交换格式应用,是则向终端返回成功响应,执行步骤S3,否则结束;
步骤S3、终端向近场通信设备发送选择功能容器文件命令;
步骤S4、近场通信设备判断是否存在功能容器文件,是则向终端返回成功响应,执行步骤S5,否则结束;
步骤S5、终端向近场通信设备发送读取功能容器文件命令;
步骤S6、近场通信设备向终端发送功能容器文件;
步骤S7、终端根据功能容器文件判断是否存在近场通信数据交换格式文件标识,是则执行步骤S8;否则结束;
步骤S8、终端向近场通信设备发送选择近场通信数据交换格式文件命令;
步骤S9、近场通信设备判断是否存在近场通信数据交换格式文件,是则向终端返回成功响应,执行步骤S10,否则结束;
步骤S10、终端向近场通信设备发送读取近场通信数据交换格式文件命令;
步骤S11、近场通信设备将近场通信设备信息和预置的应用标识符写入近场通信数据交换格式文件,将近场通信数据交换格式文件发送给终端;
步骤S12、终端从近场通信数据交换格式文件中获取应用标识符和近场通信设备信息;启动与应用标识符所对应的应用程序,并将近场通信设备信息保存在应用程序可读取的位置。
本发明还提供一种向用户提供近场通信设备信息的系统,包括:包括终端和近场通信设备;
终端包括:
第一发送模块,用于向近场通信设备发送选择近场通信数据交换格式应用命令;还用于当发送选择近场通信数据交换格式应用命令之后第一接收模块接收到成功响应时,向近场通信设备发送选择功能容器文件命令;还用于当发送选择功能容器文件命令之后第一接收模块接收到成功响应时,向近场通信设备发送读取功能容器文件命令;还用于当第一判断模块根据功能容器文件判定存在近场通信数据交换格式文件时向近场通信设备发送选择近场通信数据交换格式文件命令;还用于当发送选择近场通信数据交换格式文件命令之后第一接收模块接收到成功响应时向近场通信设备发送读取近场通信数据交换格式文件命令;
第一接收模块,用于接收近场通信设备返回的成功响应;还用于接收近场通信设备返回的功能容器文件;还用于接收近场通信设备发送的近场通信数据交换格式文件;
第一判断模块,用于当第一接收模块接收到功能容器文件时,根据功能容器文件判断是否存在近场通信数据交换格式文件标识;
获取模块,用于当第一接收模块接收到近场通信设备发送的近场通信数据交换格式文件时,从近场通信数据交换格式文件中获取应用标识符和近场通信设备信息;
启动模块,用于启动与获取模块获取到的应用标识符所对应的应用程序;
保存模块,用于将获取模块获取到的近场通信设备信息保存到应用程序可读取的位置;
近场通信设备包括:
第二接收模块,用于接收到终端发送的选择近场通信数据交换格式应用命令;还用于接收终端发送的选择功能容器文件命令;还用于接收终端发送的读取功能容器文件命令;还用于接收终端发送的选择近场通信数据交换格式文件命令;还用于接收终端发送的读取近场通信数据交换格式文件命令;
第二判断模块,用于当第二接收模块接收到选择近场通信数据交换格式应用命令时,判断是否存在近场通信数据交换格式应用;还用于当第二接收模块接收到选择功能容器文件命令时,判断是否存在功能容器文件;还用于当第二接收模块接收到选择近场通信数据交换格式文件命令时,判断是否存在近场通信数据交换格式文件;
第二发送模块,用于当第二判断模块判定存在近场通信数据交换格式应用时,向终端返回成功响应;还用于当第二判断模块判定存在功能容器文件时向终端返回成功响应;还用于当第二接收模块接收到读取功能容器文件命令时,向终端发送功能容器文件;还用于当第二判断模块判定存在近场通信数据交换格式文件时,向终端返回成功响应;还用于将写入模块生成近场通信数据交换格式文件发送给终端;
写入模块,用于当第二接收模块接收到读取近场通信数据交换格式文件命令时将近场通信设备信息和预置的应用标识符写入近场通信数据交换格式文件。
本发明提供一种通用的向用户提供近场通信设备信息的方法及系统,使用户可以更加方便的获取近场通信设备信息。
附图说明
为了更清楚的说明本发明实施例或现有技术中的技术方案,下面将对实施例或现 有技术描述中所需要使用的附图作简单的介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图;
图1为本发明实施例2提供的一种向用户提供近场通信设备信息的方法的流程图;
图2为本发明实施例3提供的一种向用户提供近场通信设备信息的系统的方框图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
实施例1
本实施例提供一种向用户提供近场通信设备信息的方法,包括:
步骤S1、终端向近场通信设备发送选择近场通信数据交换格式应用命令;
需要说明的是,近场通信数据交换格式(英文全称:NFC Data Exchange Format,英文缩写:NDEF);
步骤S2、近场通信设备判断是否存在近场通信数据交换格式应用,是则向终端返回成功响应,执行步骤S3,否则结束;
步骤S3、终端向近场通信设备发送选择功能容器文件命令;
步骤S4、近场通信设备判断是否存在功能容器文件,是则向终端返回成功响应,执行步骤S5,否则结束;
步骤S5、终端向近场通信设备发送读取功能容器文件命令;
步骤S6、近场通信设备向终端发送功能容器文件;
步骤S7、终端根据功能容器文件判断是否存在近场通信数据交换格式文件标识,是则执行步骤S8;否则结束;
步骤S8、终端向近场通信设备发送选择近场通信数据交换格式文件命令;
步骤S9、近场通信设备判断是否存在近场通信数据交换格式文件,是则向终端返回成功响应,执行步骤S10,否则结束;
步骤S10、终端向近场通信设备发送读取近场通信数据交换格式文件命令;
步骤S11、近场通信设备将近场通信设备信息和预置的应用标识符写入近场通信数据交换格式文件,将近场通信数据交换格式文件发送给终端;
步骤S12、终端从近场通信数据交换格式文件中获取应用标识符和近场通信设备信息;启动与应用标识符所对应的应用程序,并将近场通信设备信息保存在应用程序可读取的位置。
可选的,启动与应用标识符所对应的应用程序具体为:终端根据应用标识符定位到与其对应的应用程序,启动应用程序。
可选的,启动与应用标识符所对应的应用程序,并将近场通信设备信息保存在应用程序可读取的位置具体为:终端接收用户触发的选择应用信号,并打开相应应用程 序,判断打开的应用程序是否与应用标识符相匹配,是则将近场通信设备信息保存在应用程序可读取的位置,否则结束。
更为详细的,将近场通信设备信息保存在应用程序可读取的位置具体为,将近场通信设备信息保存在粘贴板或者应用共享区。
优选的,步骤S6之后,步骤S7之前还包括:终端根据功能容器文件判断配置是否有效,是则执行步骤S7,否则报错结束。
更为详细的,终端根据功能容器文件判断配置是否有效具体包括:
步骤C1、终端检查功能容器文件的格式是否满足预设条件,是则执行步骤C2;否则结束;
步骤C2、终端从功能容器文件中获取版本信息,根据版本信息判断是否支持与其对应的版本,是则执行步骤C3;否则结束;
步骤C3、终端从功能容器文件中获取最大数据读取长度和最大数据发送长度,判断最大数据读取长度和最大数据发送长度是否均处于有效范围内,是则执行步骤C4;否则结束;
步骤C4、终端从功能容器文件中获取近场通信数据交换格式文件信息,根据近场通信数据交换格式文件信息中的读取条件判断是否为允许读取,是则执行步骤S7;否则结束。
优选的,步骤S9之后,步骤S10之前,还包括:
步骤E1、终端向近场通信设备发送读取近场通信数据交换格式文件长度命令;
步骤E2、近场通信设备根据近场通信设备信息的长度和预置的应用标识符的长度计算近场通信数据交换格式文件长度,并将近场通信数据交换格式文件长度发送给终端。
本实施例还提供一种向用户提供近场通信设备信息的方法,包括:
步骤A1、近场通信设备接收终端发送的选择近场通信数据交换格式应用命令,并判断是否存在近场通信数据交换格式应用,是则向终端返回成功响应;执行步骤A2,否则结束;
步骤A2、近场通信设备接收终端发送的选择功能容器文件命令,并判断是否存在功能容器文件,是则向终端返回成功响应,执行步骤A3,否则结束;
步骤A3、近场通信设备接收终端发送的读取功能容器文件命令,向终端发送功能容器文件;
步骤A4、近场通信设备接收终端发送的选择近场通信数据交换格式文件命令,判断是否存在近场通信数据交换格式文件,是则向终端返回成功响应,执行步骤A5,否则结束;
步骤A5、近场通信设备接收终端发送的读取近场通信数据交换格式文件命令,将近场通信设备信息和预置的应用标识符写入近场通信数据交换格式文件,将近场通信数据交换格式文件发送给终端。
可选的,步骤A4和步骤A5之间还包括:近场通信设备接收终端发送的读取近场通信数据交换格式文件长度,根据近场通信设备信息的长度和预置的应用标识符的长度计算近场通信数据交换格式文件长度,并将近场通信数据交换格式文件长度发送给 终端。
本实施例还提供一种向用户提供近场通信设备信息的方法,
步骤B1、终端向近场通信设备发送选择近场通信数据交换格式应用命令,当接收到成功响应时,执行步骤B2;
步骤B2、终端向近场通信设备发送选择功能容器文件命令,当接收到成功响应时,执行步骤B3;
步骤B3、终端向近场通信设备发送读取功能容器文件命令,接收近场通信设备返回的功能容器文件;
步骤B4、终端根据功能容器文件判断是否存在近场通信数据交换格式文件标识,是则执行步骤B5;否则结束;
步骤B5、终端向近场通信设备发送选择近场通信数据交换格式文件命令,当接收到成功响应时,执行步骤B6;
步骤B6、终端向近场通信设备发送读取近场通信数据交换格式文件命令,接收近场通信设备返回的近场通信数据交换格式文件,从近场通信数据交换格式文件中获取应用标识符和近场通信设备信息;启动与应用标识符所对应的应用程序,并将近场通信设备信息保存在应用程序可读取的位置。
可选的,启动与应用标识符所对应的应用程序具体为:终端根据应用标识符定位到与其对应的应用程序,启动应用程序。
可选的启动与应用标识符所对应的应用程序,并将近场通信设备信息保存在应用程序可读取的位置具体为:终端接收用户触发的选择应用信号,并打开相应应用程序,判断打开的应用是否与应用标识符相匹配,是则将近场通信设备信息保存在应用程序可读取的位置,否则结束。
更为详细的将近场通信设备信息保存在应用程序可读取的位置具体为,将近场通信设备信息保存在粘贴板或者应用共享区。
优选的,步骤B3与步骤B4之间还包括:终端根据功能容器文件判断配置是否有效,是则执行步骤B4,否则报错结束。
具体的,终端根据功能容器文件判断配置是否有效具体包括:
步骤D1、终端检查功能容器文件的格式是否满足预设条件,是则执行步骤D2;否则结束;
步骤D2、终端从功能容器文件中获取版本信息,根据版本信息判断是否支持与其对应的版本,是则执行步骤D3;否则结束;
步骤D3、终端从功能容器文件中获取最大数据读取长度和最大数据发送长度判断是否均处于有效范围内,是则执行步骤D4;否则结束;
步骤D4、终端从功能容器文件中获取近场通信数据交换格式文件信息,根据近场通信数据交换格式文件信息中的读取条件判断是否为允许读取,是则执行步骤B4;否则结束。
可选的,步骤B5与B6之间,还包括:终端向近场通信设备发送读取近场通信数据交换格式文件长度命令,接收近场通信设备返回的近场通信数据交换格式文件长度。
实施例2
本实施例提供一种向用户提供近场通信设备信息的方法,该方法能够适用于支持近场通信的动态令牌和终端,参见图1,包括:
步骤101、终端组织选择近场通信数据交换格式应用命令,并向动态令牌发送选择近场通信数据交换格式应用命令;
具体的,选择近场通信数据交换格式应用命令构成为:CLA+INS+P1+P2+Lc+Data+Le;CLA为命令的类别字节、INS为命令的指令字节、P1和P2为参数、Lc为命令体内Data中数据的长度、Data为选择近场通信数据交换格式应用命令的数据、Le是预期返回的最大字节数;
本实施例中,选择近场通信数据交换格式应用命令的Data中包含的数据具体为近场通信数据交换格式应用标识;
具体地,在本实施例中,终端将类别字节00、指令字节A4、参数04 00、数据的长度07,近场通信数据交换格式应用标识D2760000850101及00顺序拼接得到选择近场通信数据交换格式应用命令,选择近场通信数据交换格式应用命令具体为:00 A4 04 00 07 D2760000850101 00;
步骤102、动态令牌从选择近场通信数据交换格式应用命令中获取近场通信数据交换格式应用标识,判断是否存在与近场通信数据交换格式应用标识相匹配的应用,是则向终端发送成功响应,执行步骤103;否则向终端设备发送失败响应,结束。
具体的,当动态令牌判定存在与近场通信数据交换格式应用标识相匹配的应用时,向终端发送成功响应9000,执行步骤103,;当判定不存在与近场通信数据交换格式应用标识相匹配的应用时,向终端发送失败响应6A82,结束。
步骤103、终端组织选择功能容器文件,并向动态令牌发送选择功能容器文件命令;
具体的,选择功能容器文件命令的Data中包含的数据具体为功能容器文件标识;
具体的,本实施例中预置的功能容器文件的标识具体为E103;终端将类别字节00、指令字节A4、参数00 0C、数据的长度02,功能容器文件标识E103顺序拼接得到选择功能容器文件命令,选择功能容器文件命令具体为00 A4 00 0C 02 E103;
步骤104、动态令牌从选择功能容器文件命令中获取功能容器文件标识,判断是否存在与功能容器文件标识相匹配的文件,是则发送成功响应,执行步骤105;否则发送失败响应,结束;
具体的,当动态令牌判定存在与功能容器文件标识相匹配的文件时,向终端发送成功响应9000,执行步骤105,;当判定不存在与功能容器文件标识相匹配的应用时,向终端发送失败响应6A82,结束。
步骤105、终端组织读取功能容器文件命令,并向动态令牌发送读取功能容器文件命令;
具体的,终端将类别字节00、指令字节B0、参数00 0C以及读取数据长度0F顺序拼接得到读取功能容器文件命令,读取功能容器文件命令具体为00 B0 00 0C 0F;
步骤106、动态令牌向终端发送功能容器文件;
本实施例中,动态令牌发送的功能容器文件具体为00 0F 20 00 80 00 80 04 06  E1040100 0000;
步骤107、终端根据读取到的功能容器文件判断配置是否有效,是则执行步骤108;否则结束;
具体的,步骤107中包括:
步骤107-1、终端检查功能容器文件的格式是否满足预设条件,是则执行步骤107-2;否则判定功能容器文件的配置无效;
本实施例中,功能容器文件至少包括:功能容器文件的长度、版本信息、最大数据读取长度、最大数据发送长度和近场通信数据交换格式文件信息;更为详细的近场通信数据交换格式文件信息的格式为TLV格式,TAG为近场通信数据交换格式文件信息的标识、Lenght为Value值的长度、Value值中包括:近场通信数据交换格式文件标识、近场通信数据交换格式文件大小、近场通信数据交换格式文件的读取条件以及近场通信数据交换格式文件的写入条件;
本实施例中,终端读取到的功能容器文件具体为:000F 20 0080 0080 0406 E10401000000;
步骤107-2、终端从功能容器文件中获取版本信息,根据版本信息判断是否支持与其对应的版本,是则执行步骤107-3;否则判定功能容器文件的配置无效;
具体的,终端设备从功能容器文件中获取第三字节作为版本信息,根据版本信息判断是否支持与其对应的版本,是则执行步骤107-3;否则判定功能容器文件的配置无效;
本实施例中获取到的第三字节为000F;
步骤107-3、终端从功能容器文件中获取最大数据读取长度和最大数据发送长度判断是否均处于有效范围内,是则执行步骤107-4;否则判定功能容器文件的配置无效;
具体的,终端从功能容器文件中获取第四字节至第五字节作为为最大数据读取长度、获取第六字节至第七字节作为最大数据发送长度,判断是否均处于有效范围内,是则执行步骤107-4;否则判定功能容器文件的配置无效;
本实施例中,终端从功能容器文件中获取第四字节至第五字节0080作为最大数据读取长度、获取第六字节至第七字节0080作为最大数据发送长度;
具体的,终端判断最大数据读取长度是否处于000F至FFFF之间,判断最大数据发送长度是否处于000D至FFFF之间,当均为是时,执行步骤107-4;否则判定功能容器文件的配置无效;
本实施例中的最大数据读取长度为0080,最大数据发送长度为0080,均满足上述要求,故继续执行步骤107-4;
步骤107-4、终端从功能容器文件中获取近场通信数据交换格式文件信息,根据近场通信数据交换格式文件信息中的读取条件判断是否为允许读取,是则执行步骤108;否则判定功能容器文件的配置无效;
具体的,终端从功能容器文件中获取第八字节至第十五字节作为近场通信数据交换格式文件信息,判断近场通信数据交换格式文件信息中的读取条件是否为无条件读取,是则判定允许读取;否则判定不允许读取。
本实施例中,终端从功能容器文件中获取八字节至第十五字节0406E10401000000 作为近场通信数据交换格式文件信息;
更为详细的,终端从近场通信数据交换格式文件信息中获取第五个字节判断是否为00,是则判定允许读取,否则判定不允许读取。
步骤108、终端根据功能容器文件判断是否存在近场通信数据交换格式文件标识,是则组织选择近场通信数据交换格式文件命令,并向动态令牌发送选择近场通信数据交换格式文件命令,执行步骤109;否则结束;
具体的,终端获取功能容器文件的第十至第十一个字节,判断是否为E104是则判定存在近场通信数据交换格式文件标识,否则判定不存在近场通信数据交换格式文件标识;
终端组织选择近场通信数据交换格式文件命令具体为:将类别字节00、指令字节A4、参数00 0C、数据的长度02,数据E104顺序拼接得到选择近场通信数据交换格式文件命令,选择近场通信数据交换格式文件命令具体为00 A4 00 0C 02 E104;
步骤109、动态令牌判断是否存在与选择近场通信数据交换格式文件命令中的近场通信数据交换格式文件标识相匹配的文件,是则向终端发送成功响应,执行步骤110;否则向终端发送失败响应,结束;
具体的,当动态令牌判定存在与近场通信数据交换格式文件标识相匹配的文件时,向终端发送成功响应9000,执行步骤110,;当判定不存在与近场通信数据交换格式文件标识相匹配的文件时,向终端发送失败响应6A82,结束。
步骤110、终端组织读取近场通信数据交换格式文件长度命令,并向动态令牌发送读取近场通信数据交换格式文件长度命令;
具体的,终端将类别字节00、指令字节B0、参数00 0C以及读取数据长度02顺序拼接得到读取近场通信数据交换格式文件长度命令,读取近场通信数据交换格式文件长度命令具体为00 B0 00 0C 02;
步骤111、动态令牌获取预置的近场通信数据交换格式文件长度,并向终端发送近场通信数据交换格式文件长度;
本实施例中,动态令牌获取到的近场通信数据交换格式文件长度具体为001F;
由于本实施例中,动态令牌生成的动态令牌长度是固定的,且应用标识符也是预置的,故该近场通信数据交换格式文件长度为固定长度。
步骤112、终端根据近场通信数据交换格式文件的长度组织读取近场通信数据交换格式文件命令,并向动态令牌发送读取近场通信数据交换格式文件命令;
具体的,终端将类别字节00、指令字节B0、参数00 0C以及读取数据长度1F顺序拼接得到读取近场通信数据交换格式文件命令,读取近场通信数据交换格式文件命令具体为00 B0 00 0C 1F;
步骤113、动态令牌获取种子密钥和事件因子,根据种子密钥和事件因子生成动态口令,更新事件因子,将动态口令和预置的应用标识符写入近场通信数据交换格式文件,并向终端发送近场通信数据交换格式文件。
动态令牌将URL的标签D1011B5504、预置的应用标识符6669646F2E6674736166652E636F6D2F6F74702F333030和动态口令353236顺序拼接得到的近场通信数据交换格式文件。
更进一步的,步骤113具体为:动态令牌从自身的数据共享区中获取种子密钥和事件因子,根据种子密钥和事件因子生成动态口令,并更新数据共享区中的事件因子,将动态口令和预置的应用标识符写入近场通信数据交换格式文件,并向终端发送近场通信数据交换格式文件;
需要说明的是,该方法中还包括:动态令牌判断是否有按键事件发生,是则从自身的数据共享区中获取种子密钥和事件因子,根据种子密钥和事件因子生成并显示动态口令,结束。
可选的,当动态口令的长度不固定时,步骤111-步骤113可以替换为:
步骤201、动态令牌获取种子密钥和事件因子,根据种子密钥和事件因子生成动态口令,更新事件因子,根据动态口令和预置的应用标识符计算近场通信数据交换格式文件长度,发送近场通信数据交换格式文件长度;
步骤202、终端根据近场通信数据交换格式文件长度组织读取近场通信数据交换格式文件命令;发送读取近场通信数据交换格式文件命令;
步骤203、动态令牌将动态口令和预置的应用标识符写入近场通信数据交换格式文件,并向终端发送近场通信数据交换格式文件。
步骤114、终端从近场通信数据交换格式文件中获取应用标识符和动态口令;启动与应用标识符所对应的应用程序,并将动态口令保存在应用程序可读取的位置。
具体的,本实施例中终端从近场通信数据交换格式文件中获取第一字节至第五字节作为URL标签的字符串,具体为D1011B5504;获取第六字节至第二十五字节作为应用标识符的字符串,具体为6669646F2E6674736166652E636F6D2F6F74702F;获取第二十六个字节至第三十一个字节作为动态口令的字符串,具体为333030353236;将获取到的字符串基于ASCII码进行转换,得到转换后的URL标签为https://;应用标识符为fido.ftsafe.com/otp/;动态口令为300526;
当终端的操作系统为IOS操作系统时,步骤114具体为:终端等待用户触发的选择应用信号,并根据选择应用信号打开相应应用,判断打开的应用是否与应用标识符相匹配,是则将动态口令复制到粘贴板上,否则结束;
具体的,终端调用UIPasteboard类的成员函数setString将动态口令粘贴到粘贴板上。
当终端的操作系统为Android操作系统时,步骤114具体为:终端根据应用标识符定位到与其对应的应用程序,打开相应应用程序,并将动态口令复制到粘贴板上。
终端调用getSystemService(CLIPBOARD_SERVICE)获取权限给ClipboardManager类的一个对象,然后调用了ClipboardManager类对象的setPrimaryClip()接口,将动态口令粘贴到粘贴板。
更进一步的,当终端的操作系统为Android操作系统时,终端还可将动态口令保存在应用共享区。
当支持近场通信的动态令牌与终端接触时,将自身生成的动态口令以及预置的应用程序标识发送给终端,终端可以启动与应用程序标识对应的应用程序,并将动态口令保存在该应用程序可以读取的位置;方便应用程序进行后续操作。例如,当用户登录某社交应用时,需要说明的是,该社交应用的登录过程需要输入动态口令;用户只 需将自身持有的动态令牌与终端接触,终端会启动该社交应用,并将动态口令保存在该应用可以读取的位置方便该应用程序进行后续操作,后续操作可以为,将动态口令自动填写到输入框中,完成登录操作。
实施例3
本实施例提供一种向用户提供近场通信设备信息的系统,参见图2,包括终端和近场通信设备;
终端包括:
第一发送模块,用于向近场通信设备发送选择近场通信数据交换格式应用命令;还用于当发送选择近场通信数据交换格式应用命令之后第一接收模块接收到成功响应时,向近场通信设备发送选择功能容器文件命令;还用于当发送选择功能容器文件命令之后第一接收模块接收到成功响应时,向近场通信设备发送读取功能容器文件命令;还用于当第一判断模块根据功能容器文件判定存在近场通信数据交换格式文件时向近场通信设备发送选择近场通信数据交换格式文件命令;还用于当发送选择近场通信数据交换格式文件命令之后第一接收模块接收到成功响应时向近场通信设备发送读取近场通信数据交换格式文件命令;
第一接收模块,用于接收近场通信设备返回的成功响应;还用于接收近场通信设备返回的功能容器文件;还用于接收近场通信设备发送的近场通信数据交换格式文件;
第一判断模块,用于当第一接收模块接收到功能容器文件时,根据功能容器文件判断是否存在近场通信数据交换格式文件标识;
获取模块,用于当第一接收模块接收到近场通信设备发送的近场通信数据交换格式文件时,从近场通信数据交换格式文件中获取应用标识符和近场通信设备信息;
启动模块,用于启动与获取模块获取到的应用标识符所对应的应用程序;
保存模块,用于将获取模块获取到的近场通信设备信息保存到应用程序可读取的位置;
近场通信设备包括:
第二接收模块,用于接收到终端发送的选择近场通信数据交换格式应用命令;还用于接收终端发送的选择功能容器文件命令;还用于接收终端发送的读取功能容器文件命令;还用于接收终端发送的选择近场通信数据交换格式文件命令;还用于接收终端发送的读取近场通信数据交换格式文件命令;
第二判断模块,用于当第二接收模块接收到选择近场通信数据交换格式应用命令时,判断是否存在近场通信数据交换格式应用;还用于当第二接收模块接收到选择功能容器文件命令时,判断是否存在功能容器文件;还用于当第二接收模块接收到选择近场通信数据交换格式文件命令时,判断是否存在近场通信数据交换格式文件;
第二发送模块,用于当第二判断模块判定存在近场通信数据交换格式应用时,向终端返回成功响应;还用于当第二判断模块判定存在功能容器文件时向终端返回成功响应;还用于当第二接收模块接收到读取功能容器文件命令时,向终端发送功能容器文件;还用于当第二判断模块判定存在近场通信数据交换格式文件时,向终端返回成功响应;还用于将写入模块生成近场通信数据交换格式文件发送给终端;
写入模块,用于当第二接收模块接收到读取近场通信数据交换格式文件命令时将近场通信设备信息和预置的应用标识符写入近场通信数据交换格式文件。
可选的,启动模块具体用于根据获取模块获取到的应用标识符定位到与其对应的应用程序,启动应用程序。
可选的,启动模块具体用于接收用户触发的选择应用信号,并打开相应应用程序;
终端还包括:第三判断模块;
第三判断模块,用于判断启动模块打开的应用程序是否与获取模块获取到的应用标识符相匹配;
保存模块,具体用于当第三判断模块判定打开的应用程序与获取模块获取到的应用标识符相匹配时,将获取模块获取到的近场通信设备信息保存到应用程序可读取的位置。
更为详细的,保存模块,具体用于将获取模块获取到的近场通信设备信息保存到粘贴板或者应用共享区。
需要说明的是,近场通信设备具体为支持近场通信通信的动态令牌,近场通信设备信息具体为动态令牌生成的动态口令;
相应的,写入模块,具体用于生成动态口令,并将动态口令和预置的应用标识符写入近场通信数据交换格式文件。
更为详细的,写入模块,具体用于获取种子密钥和事件因子,根据种子密钥和事件因子生成动态口令,更新事件因子,并将动态口令和预置的应用标识符写入近场通信数据交换格式文件。
优选的,终端还包括:第四判断模块;
第四判断模块,用于当第一接收模块接收到功能容器文件之后,根据功能容器文件判断配置是否有效;
第一判断模块,具体用于当第四判断模块判定配置有效时,根据功能容器文件判断是否存在近场通信数据交换格式文件标识。
更为详细的,第四判断模块具体包括:
第一判断单元,用于检测第一接收模块接收到的功能容器文件的格式是否满足预设条件;
第二判断单元,用于当第一判断单元判定功能容器文件的格式满足预设条件时,从功能容器文件中获取版本信息,根据版本信息判断是否支持与其对应的版本;
第三判断单元,用于当第二判断单元判定支持与版本信息对应的版本时,从功能容器文件中获取最大数据读取长度和最大数据发送长度,判断最大数据读取长度和最大数据发送长度是否均处于有效范围内;
第四判断单元,用于当第三判断单元判定最大数据读取长度和最大数据发送长度均处于有效范围内时,从功能容器文件中获取近场通信数据交换格式文件信息,根据近场通信数据交换格式文件信息中的读取条件判断是否为允许读取;
第一判断模块,具体用于当第四判断单元判定读取条件为允许读取时,根据功能容器文件判断是否存在近场通信数据交换格式文件标识。
可选的,第一发送模块,还用于当发送选择近场通信数据交换格式文件命令之后 第一接收模块接收到成功响应时向近场通信设备发送读取近场通信数据交换格式文件长度命令;
第二接收模块,还用于接收终端发送的读取近场通信数据交换格式文件长度命令;
近场通信设备还包括:计算模块;
计算模块,用于当第二接收模块接收读取近场通信数据交换格式文件长度命令时,根据近场通信设备信息的长度和预置的应用标识符的长度计算近场通信数据交换格式文件长度;
第二发送模块,还用于将近场通信数据交换格式文件长度发送给终端;
第一接收模块,还用于接收近场通信设备发送的近场通信数据交换格式文件长度。
本实施例提供了一种近场通信设备,包括:
第二接收模块,用于接收终端发送的选择近场通信数据交换格式应用命令;还用于接收终端发送的选择功能容器文件命令;还用于接收终端发送的读取功能容器文件命令;还用于接收终端发送的选择近场通信数据交换格式文件命令;还用于接收终端发送的读取近场通信数据交换格式文件命令;
第二判断模块,用于当第二接收模块接收到选择近场通信数据交换格式应用命令时,判断是否存在近场通信数据交换格式应用;还用于当第二接收模块接收到选择功能容器文件命令时,判断是否存在功能容器文件;还用于当第二接收模块接收到选择近场通信数据交换格式文件命令时,判断是否存在近场通信数据交换格式文件;
第二发送模块,用于当第二判断模块判定存在近场通信数据交换格式应用时,向终端返回成功响应;还用于当第二判断模块判定存在功能容器文件时向终端返回成功响应;还用于当第二接收模块接收到读取功能容器文件命令时,向终端发送功能容器文件;还用于当第二判断模块判定存在近场通信数据交换格式文件时,向终端返回成功响应;还用于将写入模块生成的近场通信数据交换格式文件发送给终端;
写入模块,用于当第二接收模块接收到读取近场通信数据交换格式文件命令时将近场通信设备信息和预置的应用标识符写入近场通信数据交换格式文件。
具体的,近场通信设备具体为支持近场通信的动态令牌近场通信设备信息具体为动态令牌生成的动态口令;
相应的,写入模块,具体用于生成动态口令,并将动态口令和预置的应用标识符写入近场通信数据交换格式文件。
更为详细的,写入模块具体用于获取种子密钥和事件因子,根据种子密钥和事件因子生成动态口令,更新事件因子,并将动态口令和预置的应用标识符写入近场通信数据交换格式文件。
可选的,第二接收模块,还用于接收终端发送的读取近场通信数据交换格式文件长度命令;
近场通信设备还包括:计算模块;
计算模块,用于当第二接收模块接收到读取近场通信数据交换格式文件长度命令时,根据近场通信设备信息的长度和预置的应用标识符的长度计算近场通信数据交换格式文件长度;
第二发送模块,还用于将近场通信数据交换格式文件长度发送给终端。
本实施例提供一种终端,包括:
第一发送模块,用于向近场通信设备发送选择近场通信数据交换格式应用命令;还用于当发送选择近场通信数据交换格式应用命令之后第一接收模块接收到成功响应时,向近场通信设备发送选择功能容器文件命令;还用于当发送选择功能容器文件命令之后第一接收模块接收到成功响应时,向近场通信设备发送读取功能容器文件命令;还用于当第一判断模块根据功能容器文件判定存在近场通信数据交换格式文件时向近场通信设备发送选择近场通信数据交换格式文件命令;还用于当发送选择近场通信数据交换格式文件命令之后第一接收模块接收到成功响应时向近场通信设备发送读取近场通信数据交换格式文件命令;
第一接收模块,用于接收近场通信设备返回的成功响应;还用于接收近场通信设备返回的功能容器文件;还用于接收近场通信设备发送的近场通信数据交换格式文件;
第一判断模块,用于当第一接收模块接收到功能容器文件时,根据功能容器文件判断是否存在近场通信数据交换格式文件标识;
获取模块,用于当第一接收模块接收到近场通信设备发送的近场通信数据交换格式文件时,从近场通信数据交换格式文件中获取应用标识符和近场通信设备信息;
启动模块,用于启动与获取模块获取到的应用标识符所对应的应用程序;
保存模块,用于将获取模块获取到的近场通信设备信息保存到应用程序可读取的位置。
可选的,启动模块具体用于根据获取模块获取到的应用标识符定位到与其对应的应用程序,启动应用程序。
可选的,启动模块具体用于接收用户触发的选择应用信号,并打开相应应用程序;
终端还包括:第三判断模块;
第三判断模块,用于判断启动模块打开的应用程序是否与获取模块获取到的应用标识符相匹配;
保存模块,具体用于当第三判断模块判定打开的应用程序与获取模块获取到的应用标识符相匹配时,将获取模块获取到的近场通信设备信息保存到应用程序可读取的位置。
更为详细的,保存模块,具体用于将获取模块获取到的近场通信设备信息保存到粘贴板或者应用共享区。
优选的,第四判断模块;
第四判断模块,用于当第一接收模块接收到功能容器文件之后,根据功能容器文件判断配置是否有效;
第一判断模块,具体用于当第四判断模块判定配置有效时,根据功能容器文件判断是否存在近场通信数据交换格式文件标识。
具体的,第四判断模块具体包括:
第一判断单元,用于检测第一接收模块接收到的功能容器文件的格式是否满足预设条件;
第二判断单元,用于当第一判断单元判定功能容器文件的格式满足预设条件时,从功能容器文件中获取版本信息,根据版本信息判断是否支持与其对应的版本;
第三判断单元,用于当第二判断单元判定支持与版本信息对应的版本时,从功能容器文件中获取最大数据读取长度和最大数据发送长度,判断最大数据读取长度和最大数据发送长度是否均处于有效范围内;
第四判断单元,用于当第三判断单元判定最大数据读取长度和最大数据发送长度均处于有效范围内时,从功能容器文件中获取近场通信数据交换格式文件信息,根据近场通信数据交换格式文件信息中的读取条件判断是否为允许读取;
第一判断模块,具体用于当第四判断单元判定读取条件为允许读取时,根据功能容器文件判断是否存在近场通信数据交换格式文件标识。
可选的,第一发送模块,具体用于当发送选择近场通信数据交换格式文件命令之后第一接收模块接收到成功响应时向近场通信设备发送读取近场通信数据交换格式文件长度命令;
第一接收模块,还用于接收近场通信设备发送的近场通信数据交换格式文件长度。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应所述以权利要求的保护范围为准。

Claims (20)

  1. 一种向用户提供近场通信设备信息的方法,其特征在于,包括:
    步骤S1、终端向近场通信设备发送选择近场通信数据交换格式应用命令;
    步骤S2、所述近场通信设备判断是否存在近场通信数据交换格式应用,是则向所述终端返回成功响应,执行步骤S3,否则结束;
    步骤S3、所述终端向近场通信设备发送选择功能容器文件命令;
    步骤S4、所述近场通信设备判断是否存在功能容器文件,是则向终端返回成功响应,执行步骤S5,否则结束;
    步骤S5、所述终端向近场通信设备发送读取功能容器文件命令;
    步骤S6、所述近场通信设备向终端发送功能容器文件;
    步骤S7、所述终端根据所述功能容器文件判断是否存在近场通信数据交换格式文件标识,是则执行步骤S8;否则结束;
    步骤S8、所述终端向近场通信设备发送选择近场通信数据交换格式文件命令;
    步骤S9、所述近场通信设备判断是否存在近场通信数据交换格式文件,是则向终端返回成功响应,执行步骤S10,否则结束;
    步骤S10、所述终端向近场通信设备发送读取近场通信数据交换格式文件命令;
    步骤S11、所述近场通信设备将近场通信设备信息和预置的应用标识符写入近场通信数据交换格式文件,将近场通信数据交换格式文件发送给所述终端;
    步骤S12、所述终端从所述近场通信数据交换格式文件中获取应用标识符和近场通信设备信息;启动与所述应用标识符所对应的应用程序,并将近场通信设备信息保存在所述应用程序可读取的位置。
  2. 根据权利要求1所述的方法,其特征在于,所述启动与所述应用标识符所对应的应用程序具体为:所述终端根据所述应用标识符定位到与其对应的应用程序,启动所述应用程序。
  3. 根据权利要求1所述的方法,其特征在于,所述启动与所述应用标识符所对应的应用程序,并将近场通信设备信息保存在所述应用程序可读取的位置具体为:所述终端接收用户触发的选择应用信号,并打开相应应用程序,判断打开的应用程序是否与所述应用标识符相匹配,是则将近场通信设备信息保存在所述应用程序可读取的位置,否则结束。
  4. 根据权利要求1所述的方法,其特征在于,所述将近场通信设备信息保存在所述应用程序可读取的位置具体为,将近场通信设备信息保存在粘贴板或者应用共享区。
  5. 根据权利要求1所述的方法,其特征在于,所述近场通信设备具体为支持近场通信的动态令牌,所述近场通信设备信息具体为所述动态令牌生成的动态口令;
    所述步骤S11具体为:所述动态令牌生成动态口令,并将所述动态口令和预置的应用标识符写入近场通信数据交换格式文件,将近场通信数据交换格式文件发送给所述终端。
  6. 根据权利要求1所述的方法,其特征在于,所述步骤S6之后,所述步骤S7之前还包括:所述终端根据所述功能容器文件判断配置是否有效,是则执行步骤S7, 否则报错结束。
  7. 根据权利要求1所述的方法,其特征在于,所述步骤S9之后,所述步骤S10之前,还包括:
    步骤E1、所述终端向所述近场通信设备发送读取近场通信数据交换格式文件长度命令;
    步骤E2、所述近场通信设备根据近场通信设备信息的长度和预置的应用标识符的长度计算近场通信数据交换格式文件长度,并将近场通信数据交换格式文件长度发送给所述终端。
  8. 一种向用户提供近场通信设备信息的方法,其特征在于,包括:
    步骤A1、近场通信设备接收终端发送的选择近场通信数据交换格式应用命令,并判断是否存在近场通信数据交换格式应用,是则向所述终端返回成功响应;执行步骤A2,否则结束;
    步骤A2、所述近场通信设备接收所述终端发送的选择功能容器文件命令,并判断是否存在功能容器文件,是则向所述终端返回成功响应,执行步骤A3,否则结束;
    步骤A3、所述近场通信设备接收所述终端发送的读取功能容器文件命令,向所述终端发送功能容器文件;
    步骤A4、所述近场通信设备接收所述终端发送的选择近场通信数据交换格式文件命令,判断是否存在近场通信数据交换格式文件,是则向终端返回成功响应,执行步骤A5,否则结束;
    步骤A5、所述近场通信设备接收所述终端发送的读取近场通信数据交换格式文件命令,将近场通信设备信息和预置的应用标识符写入近场通信数据交换格式文件,将近场通信数据交换格式文件发送给所述终端。
  9. 根据权利要求8所述的方法,其特征在于,所述近场通信设备具体为支持近场通信的动态令牌;所述近场通信设备信息具体为所述动态令牌生成的动态口令;
    所述步骤A5具体为:所述动态令牌接收所述终端发送的读取近场通信数据交换格式文件命令,生成动态口令,并将所述动态口令和预置的应用标识符写入近场通信数据交换格式文件,将近场通信数据交换格式文件发送给所述终端。
  10. 根据权利要求8所述的方法,其特征在于,所述步骤A4和所述步骤A5之间还包括:所述近场通信设备接收所述终端发送的读取近场通信数据交换格式文件长度,根据近场通信设备信息的长度和预置的应用标识符的长度计算近场通信数据交换格式文件长度,并将所述近场通信数据交换格式文件长度发送给所述终端。
  11. 一种向用户提供近场通信设备信息的系统,其特征在于,包括终端和近场通信设备;
    所述终端包括:
    第一发送模块,用于向所述近场通信设备发送选择近场通信数据交换格式应用命令;还用于当发送所述选择近场通信数据交换格式应用命令之后第一接收模块接收到成功响应时,向近场通信设备发送选择功能容器文件命令;还用于当发送所述选择功能容器文件命令之后所述第一接收模块接收到成功响应时,向所述近场通信设备发送读取功能容器文件命令;还用于当第一判断模块根据所述功能容器文件判定存在近场 通信数据交换格式文件时向所述近场通信设备发送选择近场通信数据交换格式文件命令;还用于当发送所述选择近场通信数据交换格式文件命令之后所述第一接收模块接收到成功响应时向所述近场通信设备发送读取近场通信数据交换格式文件命令;
    所述第一接收模块,用于接收近场通信设备返回的成功响应;还用于接收所述近场通信设备返回的功能容器文件;还用于接收所述近场通信设备发送的近场通信数据交换格式文件;
    第一判断模块,用于当所述第一接收模块接收到所述功能容器文件时,根据所述功能容器文件判断是否存在近场通信数据交换格式文件标识;
    获取模块,用于当所述第一接收模块接收到所述近场通信设备发送的近场通信数据交换格式文件时,从所述近场通信数据交换格式文件中获取应用标识符和近场通信设备信息;
    启动模块,用于启动与所述获取模块获取到的所述应用标识符所对应的应用程序;
    保存模块,用于将所述获取模块获取到的所述近场通信设备信息保存到所述应用程序可读取的位置;
    所述近场通信设备包括:
    第二接收模块,用于接收到所述终端发送的选择近场通信数据交换格式应用命令;还用于接收所述终端发送的选择功能容器文件命令;还用于接收所述终端发送的读取功能容器文件命令;还用于接收所述终端发送的选择近场通信数据交换格式文件命令;还用于接收所述终端发送的读取近场通信数据交换格式文件命令;
    第二判断模块,用于当所述第二接收模块接收到所述选择近场通信数据交换格式应用命令时,判断是否存在近场通信数据交换格式应用;还用于当所述第二接收模块接收到所述选择功能容器文件命令时,判断是否存在功能容器文件;还用于当所述第二接收模块接收到所述选择近场通信数据交换格式文件命令时,判断是否存在近场通信数据交换格式文件;
    第二发送模块,用于当所述第二判断模块判定存在近场通信数据交换格式应用时,向所述终端返回成功响应;还用于当所述第二判断模块判定存在功能容器文件时向所述终端返回成功响应;还用于当所述第二接收模块接收到所述读取功能容器文件命令时,向所述终端发送功能容器文件;还用于当所述第二判断模块判定存在近场通信数据交换格式文件时,向所述终端返回成功响应;还用于将写入模块生成的所述近场通信数据交换格式文件发送给所述终端;
    所述写入模块,用于当所述第二接收模块接收到所述读取近场通信数据交换格式文件命令时将近场通信设备信息和预置的应用标识符写入近场通信数据交换格式文件。
  12. 根据权利要求11所述的系统,其特征在于,所述启动模块具体用于根据所述获取模块获取到的所述应用标识符定位到与其对应的应用程序,启动所述应用程序。
  13. 根据权利要求11所述的系统,其特征在于,
    所述启动模块具体用于接收用户触发的选择应用信号,并打开相应应用程序;
    所述终端还包括:第三判断模块;
    所述第三判断模块,用于判断所述启动模块打开的应用程序是否与所述获取模块获取到的所述应用标识符相匹配;
    所述保存模块,具体用于当所述第三判断模块判定所述打开的应用程序与所述获取模块获取到的所述应用标识符相匹配时,将所述获取模块获取到的所述近场通信设备信息保存到所述应用程序可读取的位置。
  14. 根据权利要求11所述的系统,其特征在于,所述保存模块,具体用于将所述获取模块获取到的所述近场通信设备信息保存到粘贴板或者应用共享区。
  15. 根据权利要求11所述的系统,其特征在于,所述近场通信设备具体为支持近场通信通信的动态令牌,所述近场通信设备信息具体为所述动态令牌生成的动态口令;
    所述写入模块,具体用于生成动态口令,并将所述动态口令和预置的应用标识符写入近场通信数据交换格式文件。
  16. 根据权利要求11所述的系统,其特征在于,所述终端还包括:第四判断模块;
    所述第四判断模块,用于当所述第一接收模块接收到所述功能容器文件之后,根据所述功能容器文件判断配置是否有效;
    所述第一判断模块,具体用于当所述第四判断模块判定所述配置有效时,根据所述功能容器文件判断是否存在近场通信数据交换格式文件标识。
  17. 根据权利要求11所述的系统,其特征在于,
    所述第一发送模块,还用于当发送所述选择近场通信数据交换格式文件命令之后所述第一接收模块接收到成功响应时向所述近场通信设备发送读取近场通信数据交换格式文件长度命令;
    所述第二接收模块,还用于接收所述终端发送的读取近场通信数据交换格式文件长度命令;
    所述近场通信设备还包括:计算模块;
    所述计算模块,用于当所述第二接收模块接收所述读取近场通信数据交换格式文件长度命令时,根据近场通信设备信息的长度和预置的应用标识符的长度计算近场通信数据交换格式文件长度;
    所述第二发送模块,还用于将所述近场通信数据交换格式文件长度发送给所述终端;
    所述第一接收模块,还用于接收所述近场通信设备发送的所述近场通信数据交换格式文件长度。
  18. 一种近场通信设备,其特征在于,包括:
    第二接收模块,用于接收终端发送的选择近场通信数据交换格式应用命令;还用于接收所述终端发送的选择功能容器文件命令;还用于接收所述终端发送的读取功能容器文件命令;还用于接收所述终端发送的选择近场通信数据交换格式文件命令;还用于接收所述终端发送的读取近场通信数据交换格式文件命令;
    第二判断模块,用于当所述第二接收模块接收到所述选择近场通信数据交换格式应用命令时,判断是否存在近场通信数据交换格式应用;还用于当所述第二接收模块接收到所述选择功能容器文件命令时,判断是否存在功能容器文件;还用于当所述第二接收模块接收到所述选择近场通信数据交换格式文件命令时,判断是否存在近场通信数据交换格式文件;
    第二发送模块,用于当所述第二判断模块判定存在近场通信数据交换格式应用时, 向所述终端返回成功响应;还用于当所述第二判断模块判定存在功能容器文件时向所述终端返回成功响应;还用于当所述第二接收模块接收到所述读取功能容器文件命令时,向所述终端发送功能容器文件;还用于当所述第二判断模块判定存在近场通信数据交换格式文件时,向所述终端返回成功响应;还用于将写入模块生成的所述近场通信数据交换格式文件发送给所述终端;
    所述写入模块,用于当所述第二接收模块接收到所述读取近场通信数据交换格式文件命令时将近场通信设备信息和预置的应用标识符写入近场通信数据交换格式文件。
  19. 根据权利要求18所述的近场通信设备,其特征在于,所述近场通信设备具体为支持近场通信的动态令牌;所述近场通信设备信息具体为所述动态令牌生成的动态口令;
    所述写入模块,具体用于生成动态口令,并将所述动态口令和预置的应用标识符写入近场通信数据交换格式文件。
  20. 根据权利要求18所述的近场通信设备,其特征在于,
    所述第二接收模块,还用于接收所述终端发送的读取近场通信数据交换格式文件长度命令;
    所述近场通信设备还包括:计算模块;
    所述计算模块,用于当所述第二接收模块接收到所述读取近场通信数据交换格式文件长度命令时,根据近场通信设备信息的长度和预置的应用标识符的长度计算近场通信数据交换格式文件长度;
    所述第二发送模块,还用于将所述近场通信数据交换格式文件长度发送给所述终端。
PCT/CN2019/090154 2018-06-12 2019-06-05 一种向用户提供近场通信设备信息的方法及系统 WO2019237978A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/115,695 US11212658B2 (en) 2018-06-12 2020-12-08 Method for providing near filed communication device information for user and system therefor

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810601304.1 2018-06-12
CN201810601304.1A CN108810836B (zh) 2018-06-12 2018-06-12 一种向用户提供近场通信设备信息的方法及系统

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/115,695 Continuation US11212658B2 (en) 2018-06-12 2020-12-08 Method for providing near filed communication device information for user and system therefor

Publications (1)

Publication Number Publication Date
WO2019237978A1 true WO2019237978A1 (zh) 2019-12-19

Family

ID=64085359

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/090154 WO2019237978A1 (zh) 2018-06-12 2019-06-05 一种向用户提供近场通信设备信息的方法及系统

Country Status (3)

Country Link
US (1) US11212658B2 (zh)
CN (1) CN108810836B (zh)
WO (1) WO2019237978A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108810836B (zh) * 2018-06-12 2020-06-16 飞天诚信科技股份有限公司 一种向用户提供近场通信设备信息的方法及系统
US11665757B2 (en) * 2019-01-08 2023-05-30 Universal Electronics Inc. Universal audio device pairing assistant
CN110598500A (zh) * 2019-10-25 2019-12-20 宁波物芯微电子有限公司 一种基于nfc的可变数据传递方法和系统

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101675428A (zh) * 2006-12-22 2010-03-17 Nxp股份有限公司 存储数据的方法以及应答器、读/写设备、包括程序组件的计算机可读介质以及程序组件适于执行该方法的程序组件
KR20140126828A (ko) * 2013-04-22 2014-11-03 주식회사 케이티 다중 ndef 데이터를 저장하는 태그 및 그 태그의 데이터 갱신 방법
CN104350513A (zh) * 2013-07-26 2015-02-11 华为终端有限公司 一种识别标签的方法及装置
CN105812127A (zh) * 2016-05-24 2016-07-27 飞天诚信科技股份有限公司 一种nfc动态令牌及其工作方法
CN106233689A (zh) * 2013-12-31 2016-12-14 威斯科数据安全国际有限公司 用于保护移动应用的方法和设备
CN108810836A (zh) * 2018-06-12 2018-11-13 飞天诚信科技股份有限公司 一种向用户提供近场通信设备信息的方法及系统

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101400164B (zh) * 2007-09-29 2013-01-16 锐迪科微电子(上海)有限公司 一种智能卡及其实现部署定制业务的系统及方法
EP2487629B1 (en) * 2011-02-10 2016-11-30 Nxp B.V. Secure smart poster
US9124304B2 (en) * 2012-10-17 2015-09-01 Qualcomm Incorporated Methods and apparatus for reducing overhead for NFC data exchange protocol messages
CN104081679B (zh) * 2012-10-25 2016-06-22 华为终端有限公司 近场通信方法和近场通信设备
GB2508337A (en) * 2012-11-21 2014-06-04 Proxama Solutions Ltd Near field communications with processor for detecting changes in memory
US9800693B2 (en) * 2014-01-28 2017-10-24 Qualcomm Incorporated Systems and methods for an inductive communication interface
CN103873256B (zh) * 2014-03-18 2017-02-22 飞天诚信科技股份有限公司 一种nfc令牌的工作方法
JP6399849B2 (ja) * 2014-08-05 2018-10-03 キヤノン株式会社 情報処理装置及びプログラム
EP3346613B1 (en) * 2015-09-04 2023-03-15 Sony Group Corporation Information processing apparatus, information processing method, and program
EP3160165B1 (en) * 2015-10-22 2018-08-15 Panthronics AG Nfc "split stack" architecture
EP3425815A4 (en) * 2016-03-28 2019-03-06 Huawei Technologies Co., Ltd. METHOD FOR PROCESSING DATA FRAME ROUTING, CLOSING COMMUNICATION CONTROL DEVICE AND END DEVICE
US11605067B2 (en) * 2018-05-30 2023-03-14 Ncr Corporation Dynamic tag based identification for self and assisted transactions
US10779145B2 (en) * 2018-09-26 2020-09-15 Micron Technology, Inc. Wirelessly utilizable memory

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101675428A (zh) * 2006-12-22 2010-03-17 Nxp股份有限公司 存储数据的方法以及应答器、读/写设备、包括程序组件的计算机可读介质以及程序组件适于执行该方法的程序组件
KR20140126828A (ko) * 2013-04-22 2014-11-03 주식회사 케이티 다중 ndef 데이터를 저장하는 태그 및 그 태그의 데이터 갱신 방법
CN104350513A (zh) * 2013-07-26 2015-02-11 华为终端有限公司 一种识别标签的方法及装置
CN106233689A (zh) * 2013-12-31 2016-12-14 威斯科数据安全国际有限公司 用于保护移动应用的方法和设备
CN105812127A (zh) * 2016-05-24 2016-07-27 飞天诚信科技股份有限公司 一种nfc动态令牌及其工作方法
CN108810836A (zh) * 2018-06-12 2018-11-13 飞天诚信科技股份有限公司 一种向用户提供近场通信设备信息的方法及系统

Also Published As

Publication number Publication date
CN108810836B (zh) 2020-06-16
US11212658B2 (en) 2021-12-28
US20210120391A1 (en) 2021-04-22
CN108810836A (zh) 2018-11-13

Similar Documents

Publication Publication Date Title
WO2019237978A1 (zh) 一种向用户提供近场通信设备信息的方法及系统
US10694353B2 (en) Updating web resources
CN108182080A (zh) 一种汽车仪表软件升级的方法
KR101788691B1 (ko) 근접장 통신에서 보안 요소의 선택을 구현하기 위한 방법, 모바일 단말기, 및 pos 머신
KR102275720B1 (ko) 블루투스 통신방법 및 블루투스 통신디바이스
US20170055109A1 (en) Nfc device with multiple secure elements
WO2017076051A1 (zh) 一种获取超级用户权限的方法及装置
EP3232732A1 (en) Communication device, communication device control method, and program
US11323880B2 (en) Method for wireless connection and electronic device therefor
JP2023016871A (ja) 融着接続装置の管理システム、及び、融着接続装置の管理方法
KR101833709B1 (ko) 통신장치, 정보처리장치 및 그 제어 방법
CN107741803A (zh) 桌面图标的显示方法、装置、终端及可读存储介质
CN104750532A (zh) 一种基于Android的双系统土地核查PAD及启动方法
KR20140103626A (ko) 무선 단말기에 통신 서비스를 제공하기 위한 통신 서비스 제공 시스템 및 그 제어방법과, 무선 랜 접속 장치 및 그 제어방법
WO2018076613A1 (zh) 无线网络连接的流量控制方法、装置及可读取存储介质
US9614946B2 (en) Method of matching operations between vehicular apparatus and portable terminal, vehicle system including vehicular apparatus and portable terminal, portable terminal, and information center
JP4561642B2 (ja) 車両用ダウンロードシステムおよびそれに用いられる車両用端末機
US20150134803A1 (en) Networking Method and Device
KR101633770B1 (ko) 저장 공간을 확장하기 위한 방법 및 장치
KR20160134419A (ko) 복수의 가입자 식별 정보를 포함하는 스마트 카드를 이용한 가입자 식별 정보 변경 방법, 단말 및 컴퓨터 프로그램
JP2018157507A (ja) 携帯端末
JP2011013935A (ja) 分散データ管理システム、サーバ装置、クライアント携帯端末及びプログラム
KR100873211B1 (ko) 브라우저 초기화면 정보가 저장된 스마트 카드, 스마트카드가 탑재된 이동통신 단말기 및 스마트 카드를 이용한브라우저 초기화면 설정 방법
KR100873213B1 (ko) 지도 정보가 저장된 usim 카드 및 usim 카드를이용한 지도 정보 제공 방법
JP2006164092A (ja) 表示システム及び通信情報設定方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19819351

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19819351

Country of ref document: EP

Kind code of ref document: A1