WO2015184591A1 - 一种路由设置方法及终端设备 - Google Patents

一种路由设置方法及终端设备 Download PDF

Info

Publication number
WO2015184591A1
WO2015184591A1 PCT/CN2014/079103 CN2014079103W WO2015184591A1 WO 2015184591 A1 WO2015184591 A1 WO 2015184591A1 CN 2014079103 W CN2014079103 W CN 2014079103W WO 2015184591 A1 WO2015184591 A1 WO 2015184591A1
Authority
WO
WIPO (PCT)
Prior art keywords
routing
exclusive
default
further configured
routing table
Prior art date
Application number
PCT/CN2014/079103
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 华为技术有限公司
Priority to US15/035,525 priority Critical patent/US10142232B2/en
Priority to EP14893768.3A priority patent/EP3013087B1/en
Priority to JP2016570270A priority patent/JP6292595B2/ja
Priority to PCT/CN2014/079103 priority patent/WO2015184591A1/zh
Priority to CN201480003374.7A priority patent/CN105453622B/zh
Publication of WO2015184591A1 publication Critical patent/WO2015184591A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/08Access security
    • 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
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/40Security arrangements using identity modules
    • H04W12/45Security arrangements using identity modules using multiple identity modules

Definitions

  • the present invention relates to the field of communications, and in particular, to a route setting method and a terminal device.
  • SE Secure Element
  • NFCC Near Field Communication Controller
  • the terminal may wish to have one SE of multiple SEs as an exclusive SE.
  • the NFC (Near Field Communication) communication peer selects only the application of the SE on the UICC according to the NFC routing mechanism, so in other SEs or HCEs.
  • the application cannot be selected by the NFC communication peer. Therefore, the terminal may be required to only allow the activation of the exclusive SE and the activation of the non-exclusive SE.
  • the SE setting command is sent by the CPU to the NFCC to control the activation/deactivation of the SE.
  • the SE setting instruction includes an ID of the SE that needs to be controlled.
  • the HCE can be regarded as a non-exclusive SE, and the terminal should stop routing information received through the NFC technology to the HCE.
  • the terminal can control the SE through a mode setting instruction. Since the target ID of the mode setting instruction cannot be the ID of the HCE, the mode setting instruction cannot be used to deactivate the H C E, and the exclusive requirement of the exclusive access exclusive E cannot be guaranteed. Summary of the invention
  • Embodiments of the present invention provide a route setting method and a terminal device, which can be avoided Use HCE to correctly configure the routing table to ensure the normal operation of the exclusive SE accessed by the terminal.
  • the embodiment of the present invention uses the following technical solutions:
  • a routing setting method including:
  • the routing table containing only the routing items corresponding to the exclusive SE is constructed; if the default routing entry is supported, the newly accessed SE is set as the default routing target SE, and the constructed
  • the routing table may or may not contain routing entries corresponding to the exclusive SE.
  • the method further includes: if the newly accessed SE is not Excluding SE, the SE identifier is set to a first value; if the newly accessed SE is an exclusive SE, the SE identifier is set to a second value and the ID of the newly accessed SE is recorded; The first value indicates that the exclusive SE is not currently accessed in the terminal, and the second value indicates that the exclusive SE is currently accessed in the terminal.
  • the method further includes:
  • the method further includes:
  • the routing entry corresponding to the newly-accessed SE is added to the current routing table to construct a routing table; when the default routing entry is supported, it is determined whether a re-designation is required.
  • the default route target SE, and the constructed routing table may or may not include a routing entry corresponding to the default route target SE.
  • the corresponding routing entry constructs a routing table. If the default routing entry is supported, the constructed routing table may or may not include the routing entry corresponding to the newly accessed exclusive SE.
  • the routing entry includes a route entry that is the HCE; if the routing table does not include a route entry that is the HCE, the default is not supported.
  • the routing entry the routing entry corresponding to the newly-accessed exclusive SE is added to the current routing table to construct a routing table. If the default routing entry is supported, the constructed routing table may or may not include the new access.
  • the exclusive routing entry corresponding to the SE is not supported.
  • routing table includes a routing entry whose target is the HCE, if it is detected that the default routing entry is not supported, the routing entry corresponding to the HCE and the non-exclusive SE in the routing table is deleted and written into the routing entry.
  • a routing entry corresponding to the newly-accessed SE constructing a routing table including only the routing entries corresponding to the exclusive accessing exclusive SE; if the default routing entry is supported, the constructed routing table may or may not include the new routing The routing entry corresponding to the exclusive SE.
  • the method further includes:
  • the SE identifier is the second value, determining whether the ID of the currently removed SE is the same as the ID of the exclusive SE recorded in the terminal;
  • the routing entry corresponding to the SE in the connected state and the routing information included in the HCE are configured to construct a routing table. Check whether the default routing entry is supported. If yes, specify an SE as the default routing target SE. And the constructed routing table may or may not include a routing entry corresponding to the default route target SE;
  • the method further includes:
  • the SE identifier is not the second value, delete the routing entry corresponding to the currently removed SE in the current routing table, and determine whether the currently removed SE is supported when the default routing entry is supported. For the default route target SE, if yes, then re-designate an SE as the default route target SE.
  • the method further includes:
  • the routing table is constructed according to the routing item corresponding to the SE in the connected state; detecting whether the default routing entry is supported, and if yes, re-designating an SE as the default routing target SE And the constructed routing table may or may not include a routing entry corresponding to the default route target SE;
  • the HCE exists in the terminal device, detecting whether the current routing table includes a routing entry whose target is the HCE;
  • the routing table is constructed according to the routing entry corresponding to the SE in the connected state and the routing entry corresponding to the HCE; detecting whether the default routing entry is supported, if supported Re-designating an SE as the default route target SE, and the constructed routing table may or may not include a routing entry corresponding to the default route target SE;
  • the current routing table does not include a routing entry that is the HCE, the current routing table is configured to include any routing entry corresponding to the non-exclusive SE; if the current routing table includes any non-exclusive The routing entry corresponding to the SE deletes the routing entry corresponding to the currently excluded exclusive SE to construct a routing table; detects whether the default routing entry is supported, and if so, re-specifies an SE as the default routing target SE, and The constructed routing table may or may not include a routing entry corresponding to the default routing target SE;
  • the routing table is constructed according to the routing item corresponding to the SE in the connected state and the routing information included in the HCE; And if yes, re-designating an SE as the default route target SE, and the constructed routing table may or may not include a routing item corresponding to the default route target SE;
  • a terminal device including:
  • a detecting unit configured to detect whether the newly accessed security unit SE is an exclusive SE; the detecting unit is further configured to: after detecting that the newly accessed SE is an exclusive SE, detecting whether to support setting a default routing item;
  • a building unit configured to: after the detecting unit detects that the default routing item is not supported, construct a routing table that only includes the routing item corresponding to the exclusive SE;
  • a setting unit configured to: after the detecting unit detects that the setting default routing item is supported, set the newly accessed SE as a default routing target SE, and the constructed routing table may or may not include a routing item corresponding to the exclusive SE. .
  • the setting unit is further configured to:
  • the SE identifier is set to a first value; if the newly accessed SE is an exclusive SE, the SE identifier is set to a second value and the record is recorded The ID of the newly accessed SE; the first value indicates that the exclusive SE is not currently accessed in the terminal, and the second value indicates that the exclusive SE is currently accessed in the terminal.
  • the setting unit is further configured to:
  • an initial value of the SE identifier is the first value
  • the terminal device further includes:
  • a determining unit configured to determine whether the SE identifier is the first value
  • an acquiring unit configured to acquire a current routing table if the determining unit determines that the SE identifier is a first value.
  • the constructing unit is further configured to: after the detecting unit detects that the newly accessed SE is not an exclusive SE, add a routing item corresponding to the newly accessed SE in the current routing table, and construct a routing table. ;
  • the determining unit is further configured to: when the detecting unit detects that the setting default routing item is supported, determine whether the default routing target SE needs to be re-specified, and the constructed routing table may or may not include the default routing target SE. Corresponding routing entry.
  • the detecting unit is further configured to detect the terminal device Whether there is a host card simulator HCE;
  • the constructing unit is further configured to: if the detecting unit detects that the HCE does not exist in the terminal device, add an exclusive SE corresponding to the new access in the current routing table when the default routing entry is not supported.
  • the routing entry constructs a routing table. If the default routing entry is supported, the constructed routing table may or may not include the routing entry corresponding to the newly accessed exclusive SE.
  • the detecting unit is further configured to: if the detecting unit detects that the HCE exists in the terminal device, detecting whether the routing table includes a routing item whose target is the HCE; the building unit is further configured to: The detecting unit detects that the routing entry does not include the routing entry whose target is the HCE, and adds the routing entry corresponding to the newly accessed exclusive SE in the current routing table when the default routing entry is not supported.
  • the routing table is constructed. If the default routing entry is supported, the constructed routing table may or may not include the routing entry corresponding to the newly accessed exclusive SE.
  • the constructing unit is further configured to: if the detecting unit detects that the routing table includes a routing entry whose target is the HCE, delete the routing table when the detecting unit detects that the default routing entry is not supported.
  • the routing entry corresponding to the HCE and the non-exclusive SE is written into the routing entry corresponding to the newly accessed SE, and a routing table including only the routing entry corresponding to the exclusive accessing exclusive SE is constructed; Routing item, the constructed routing table may or may not include the route corresponding to the exclusive accessing exclusive SE Item.
  • the detecting unit is further configured to detect whether a SE is removed
  • the obtaining unit is further configured to: after the detecting unit detects that the SE is removed, acquire an ID of the currently removed SE;
  • the determining unit is further configured to: determine whether the SE identifier is the second value
  • the determining unit is further configured to: if the SE identifier is the second value, determine whether the ID of the currently removed SE is the same as the ID of the exclusive SE recorded in the terminal;
  • the constructing unit is further configured to: if the determining unit determines that the ID of the currently removed SE is the same as the ID of the exclusive SE recorded in the terminal, the routing item corresponding to the SE in the connected state, the HCE
  • the routing information is configured to construct a routing table.
  • the detecting unit is further configured to: detect whether a default routing entry is supported.
  • the building unit is further configured to: if the detecting unit detects that a default routing entry is supported, the construct includes or does not include a routing table of the routing item corresponding to the default route target SE;
  • the setting unit is further configured to: after the detecting unit detects that the setting default routing item is supported, re-designating an SE as the default routing target SE;
  • the terminal device further includes an obtaining unit, configured to acquire a configuration success message, where the setting unit is further configured to: set the SE identifier to the first value, and select an exclusive SE of the current record in the terminal.
  • the ID is updated to be invalid.
  • the constructing unit is further configured to: if the determining unit determines that the SE identifier is not the second value, delete a routing item corresponding to the currently removed SE in the current routing table;
  • the determining unit is further configured to determine the current when supporting setting a default routing item Whether the removed SE is the default route target SE;
  • the determining unit is further configured to: determine, when the setting of the default routing item is supported, whether the currently removed SE is the default routing target SE;
  • the setting unit is further configured to: after the determining unit determines that the currently removed SE is the default route target SE, re-designate an SE as the default routing target SE.
  • the detecting unit is further configured to: detect whether the HCE exists in the terminal device;
  • the building unit is further configured to: construct a routing table according to a routing item corresponding to the SE in the connected state;
  • the detecting unit is further configured to: detect whether to support setting a default routing item; the setting unit is further configured to: after detecting to support setting a default routing item, re-designating an SE as the default routing target SE, and the constructed routing table may be The routing item corresponding to the default route target SE is included or not included;
  • the obtaining unit is further configured to: obtain a configuration success message
  • the setting unit is further configured to: set the SE identifier to the first value, and update the ID of the exclusive SE currently recorded in the terminal to be invalid.
  • the detecting unit is further configured to: if the HCE exists in the terminal device, detect whether a routing entry whose target is the HCE is included in the current routing table;
  • the constructing unit is further configured to: after the detecting unit detects that the current routing table includes a routing entry that is the HCE, construct the routing entry corresponding to the SE in the connected state, and the routing entry corresponding to the HCE Routing table
  • the detecting unit is further configured to: detect whether to support setting a default routing item; the setting unit is further configured to: if the detecting unit detects that a default routing item is supported, re-designate an SE as the default routing target SE, and Build route
  • the table may or may not include a routing entry corresponding to the default route target SE; the obtaining unit is further configured to: obtain a configuration success message;
  • the setting unit is further configured to: set the SE identifier to the first value, and update the ID of the exclusive SE currently recorded in the terminal to be invalid.
  • the detecting unit is further configured to: after detecting, by the detecting unit, that the current routing table does not include a routing entry whose target is the HCE, detecting whether the current routing table includes any routing entry corresponding to the non-exclusive SE ;
  • the constructing unit is further configured to: after the detecting unit detects that the current routing table includes a routing item corresponding to any non-exclusive SE, delete the routing item corresponding to the currently excluded exclusive item to construct a routing table;
  • the detecting unit is further configured to: detect whether to support setting a default routing item; the setting unit is further configured to: if the detecting unit detects that a default routing item is supported, re-designate an SE as the default routing target SE, and The constructed routing table may or may not include a routing entry corresponding to the default routing target SE;
  • the obtaining unit is further configured to: obtain a configuration success message
  • the setting unit is further configured to: set the SE identifier to the first value, and update the ID of the exclusive SE currently recorded in the terminal to be invalid.
  • the constructing unit is further configured to: if the current routing table does not include any routing item corresponding to the non-exclusive SE, the routing item corresponding to the SE in the connected state, and the routing information included in the HCE, construct a routing table. ;
  • the detecting unit is further configured to: detect whether to support setting a default routing item; the setting unit is further configured to: if the detecting unit detects that a default routing item is supported, re-designate an SE as the default routing target SE, and The constructed routing table may or may not include a routing entry corresponding to the default routing target SE;
  • the obtaining unit is further configured to: obtain a configuration success message;
  • the setting unit is further configured to: set the SE identifier to the first value, and update an ID of an exclusive SE currently recorded in the terminal to be invalid.
  • a terminal device including:
  • the device host DH is configured to detect whether the newly accessed security unit SE is an exclusive SE; the DH is further configured to: after detecting that the newly accessed SE is an exclusive SE, detecting whether to support setting a default routing item;
  • the DH is configured to, after detecting that the default routing entry is not supported, construct a routing table that only includes routing entries corresponding to the exclusive SE;
  • the DH is configured to set the newly accessed SE as a default route target SE after detecting that the default route entry is supported, and the constructed routing table may or may not include a routing entry corresponding to the exclusive SE.
  • the DH is further configured to:
  • the SE identifier is set to a first value; if the newly accessed SE is an exclusive SE, the SE identifier is set to a second value and the record is recorded The ID of the newly accessed SE; the first value indicates that the exclusive SE is not currently accessed in the terminal, and the second value indicates that the exclusive SE is currently accessed in the terminal.
  • the method further includes:
  • an initial value of the SE identifier is the first value
  • the DH is configured to determine whether the SE identifier is the first value, and the DH is configured to obtain a current routing table if the SE identifier is determined to be the first value.
  • the DH is further configured to: after detecting that the newly accessed SE is not an exclusive SE, add a routing entry corresponding to the newly accessed SE in the current routing table, and construct a routing table;
  • the DH is further configured to: when it is detected that the default routing entry is supported, determine whether the default routing target SE needs to be re-specified, and the configured routing table may or may not include the routing entry corresponding to the default routing target SE.
  • the DH is further configured to detect whether a host card emulator HCE exists in the terminal device;
  • the DH is further configured to: if the HCE is not detected in the terminal device, add a route entry corresponding to the exclusive accessing SE of the newly accessed routing entry in the current routing table when the default routing entry is not supported. If the default routing entry is supported, the configured routing table may or may not include the routing entry corresponding to the newly accessed exclusive SE.
  • the DH is further configured to: if it is detected that the HCE exists in the terminal device, detect whether a routing entry whose target is the HCE is included in the routing table;
  • the DH is further configured to: if it is detected that the routing entry does not include a routing entry that is the HCE, add the exclusive access of the new access to the current routing table when the default routing entry is not supported.
  • the routing entry corresponding to the SE constructs a routing table. If the default routing entry is supported, the constructed routing table may or may not include the routing entry corresponding to the newly accessed exclusive SE.
  • the DH is further configured to: if it is detected that the routing table includes a routing entry whose target is the HCE, delete the HCE and the non-exclusive SE corresponding to the routing table when detecting that the default routing entry is not supported.
  • the routing entry is written to the routing entry corresponding to the newly accessed SE, and a routing table containing only the routing entries corresponding to the exclusive accessing exclusive SE is constructed; if the default routing entry is supported, the constructed routing table may be configured.
  • a routing entry corresponding to the exclusive accessing SE of the new access is included or not included.
  • the DH is further configured to detect whether a SE is removed
  • the DH is further configured to: after detecting that the SE is removed, obtain an ID of the SE that is currently removed;
  • the DH is further configured to: determine whether the SE identifier is the second value; the DH is further configured to: if the SE identifier is the second value, determine the currently removed Whether the ID of the SE is the same as the ID of the exclusive SE recorded in the terminal;
  • the DH is further configured to: if it is determined that the ID of the currently deleted SE is the same as the ID of the exclusive SE recorded in the terminal, according to the routing item corresponding to the SE in the connected state, and the routing information included in the HCE, Building a routing table;
  • the DH is further configured to: detect whether a default routing entry is supported.
  • the DH is further configured to: if the detection supports setting a default routing entry, construct a routing table that includes or does not include a routing entry corresponding to the default routing target SE;
  • the DH is further configured to: after detecting that the setting default routing item is supported, re-designating an SE as the default routing target SE;
  • the DH is further configured to: obtain a configuration success message
  • the DH is further configured to set the SE identifier to the first value, and update the ID of the exclusive SE currently recorded in the terminal to be invalid.
  • the DH is further configured to, if it is determined that the SE identifier is not the second value, delete a routing entry corresponding to the currently removed SE in the current routing table;
  • the DH is further configured to: determine, when setting a default routing item, whether the currently removed SE is the default routing target SE;
  • the DH is further configured to: determine, when the setting of the default routing item is supported, whether the currently removed SE is the default routing target SE;
  • the DH is further configured to: after determining that the currently removed SE is the default route target SE, re-designate an SE as the default route target SE.
  • the DH is configured to detect whether the HCE exists in the terminal device, and the DH is further configured to: construct a routing table according to a routing item corresponding to the SE in the connected state;
  • the DH is further configured to: detect whether a default routing entry is supported.
  • the DH is further configured to: after detecting the setting of the default routing entry, re-designating an SE as the default routing target SE, and the configured routing table may or may not include the routing entry corresponding to the default routing target SE;
  • the DH is further configured to: obtain a configuration success message
  • the DH is further configured to set the SE identifier to the first value, and update the ID of the exclusive SE currently recorded in the terminal to be invalid.
  • the DH is configured to: if the HCE exists in the terminal device, detect whether a routing entry whose target is the HCE is included in the current routing table;
  • the DH is further configured to: after detecting that the current routing table includes a routing entry that is the HCE, construct a routing table according to the routing entry corresponding to the SE in the connected state and the routing entry corresponding to the HCE;
  • the DH is further configured to: detect whether a default routing entry is supported.
  • the DH is further configured to: if the detection supports setting a default routing entry, re-designating an SE as the default routing target SE, and the constructed routing table may or may not include a routing entry corresponding to the default routing target SE;
  • the DH is further configured to: obtain a configuration success message
  • the DH is further configured to set the SE identifier to the first value, and update the ID of the exclusive SE currently recorded in the terminal to be invalid.
  • the DH is configured to: when the detecting the current routing table does not include a target, After the routing entry of the HCE, detecting whether the current routing table includes any routing entry corresponding to the non-exclusive SE;
  • the DH is further configured to: after detecting the routing item corresponding to any non-exclusive SE in the current routing table, delete the routing item construction routing table corresponding to the currently excluded exclusive SE;
  • the DH is further configured to: detect whether a default routing entry is supported.
  • the DH is further configured to: if the detection supports setting a default routing entry, re-designating an SE as the default routing target SE, and the constructed routing table may or may not include a routing entry corresponding to the default routing target SE;
  • the DH is further configured to: obtain a configuration success message
  • the DH is further configured to set the SE identifier to the first value, and update the ID of the exclusive SE currently recorded in the terminal to be invalid.
  • the DH is configured to: if the current routing table does not include any routing item corresponding to the non-exclusive SE, construct a routing table according to the routing item corresponding to the SE in the connected state and the routing information included in the HCE;
  • the DH is further configured to: detect whether a default routing entry is supported.
  • the DH is further configured to: if the detecting unit detects that the default routing entry is supported, re-designate an SE as the default routing target SE, and the constructed routing table may or may not include the default routing target SE. Routing item
  • the DH is further configured to: obtain a configuration success message
  • the DH is further configured to set the SE identifier to the first value, and update the ID of the exclusive SE currently recorded in the terminal to be invalid.
  • the routing setting method and the terminal device provided by the embodiments of the present invention may terminate the operation of all non-exclusive SEs including the HCE by setting a routing table after the terminal accesses the exclusive SE.
  • the method and the terminal device provided by the present invention can avoid using the HCE, thereby ensuring the normal operation of the newly accessed exclusive SE.
  • FIG. 1 is a schematic flowchart of a route setting method according to Embodiment 1 of the present invention
  • FIG. 2 is a schematic flowchart of a route setting method according to Embodiment 2 of the present invention
  • FIG. 3 is a schematic flow chart of a route setting method according to Embodiment 3 of the present invention.
  • FIG. 4 is a schematic flow chart of a route setting method according to Embodiment 4 of the present invention.
  • FIG. 5 is a schematic flow chart of a route setting method according to Embodiment 5 of the present invention.
  • FIG. 6 is a structural block diagram of a terminal device according to Embodiment 6 of the present invention.
  • FIG. 7 is a structural block diagram of a terminal device according to Embodiment 7 of the present invention.
  • the SE can provide a secure and reliable environment for the mobile payment of the terminal. Therefore, as long as the terminal has mastered the control of the SE, the terminal has mastered the entry of the mobile payment application to the terminal.
  • the operator hopes that the terminal manufacturer can provide the technical solution, so that after the UICC card of the SE released by the operator is installed on the terminal, only the SE on the UICC card is allowed to work normally, and the SE controlled by the non-mobile operator on other media is required to be Shielded off.
  • the SE on the UICC card can be referred to as an exclusive SE, and the SEs controlled by non-mobile operators on other media are referred to as non-exclusive SEs.
  • the terminal needs to terminate the operation of the non-exclusive SE to ensure the normal operation of the exclusive SE.
  • the current terminal can also implement the HCE through software simulation.
  • the HCE is non-exclusive, and the terminal needs to terminate the operation of the HCE after the SE access on the UICC card.
  • some NFC routing mechanisms also support a silent To identify the route, only one SE/HCE can be configured as the default route target SE. The technical idea is that after all processing, the routing request that cannot find the matching processing item will be forwarded to the default routing target SE/HCE for processing. Therefore, when constructing the routing table, the terminal may include or not include the routing item corresponding to the default route target SE/HCE in the routing table.
  • the embodiment of the invention provides a route setting method. As shown in FIG. 1, the method includes the following steps:
  • the macro terminal includes a DH (Device Host), an NFCC, and a CPU (Central Processing Unit).
  • the NFCC may have the ability to delete routing entries or may not delete routing entries.
  • the DH needs to determine whether the newly accessed SE is an exclusive SE or a non-exclusive SE. If the newly accessed SE is an exclusive SE, step 102 is performed.
  • the DH of the terminal device is set with the SE identifier.
  • the initial value of the SE identifier is the first value.
  • the first value indicates that the exclusive SE is not currently accessed in the terminal.
  • the DH of the terminal device detects that the SE identifier is the second value, it does not need to perform configuration processing and does not change the current routing table.
  • the second value indicates that the exclusive SE is currently accessed in the terminal. This is because, depending on the commercial needs of the operator, terminal equipment is usually only allowed to guarantee the normal operation of an exclusive SE. That is to say, if the current terminal device has access to the exclusive SE, no configuration processing is performed regardless of whether the newly accessed SE is an exclusive SE.
  • the SE identifier is set to a first value; if the newly accessed SE is an exclusive SE, the DH of the terminal device identifies the SE identifier The sign is set to the second value and the ID of the newly accessed SE is recorded.
  • the ID of the newly accessed SE is recorded as the ID of the exclusive SE currently accessed in the terminal, so as to determine whether the exclusive SE is currently accessed in the terminal when the SE is removed. Then the corresponding configuration processing is performed to save system overhead.
  • the routing entry corresponding to the newly accessed SE is added to the current routing table to construct a routing table.
  • the default routing entry is supported, it is determined whether the default routing target SE needs to be re-specified, and the constructed routing table may or may not include the routing entry corresponding to the default routing target SE.
  • DH can always delete a specific routing item by constructing a new routing table.
  • the NFCC may or may not have the ability to delete the routing table. Therefore, it is necessary to distinguish between the case where the NFCC can delete the routing table or the case where the routing table cannot be deleted.
  • the NFCC of the terminal can delete the routing table, after the DH of the terminal device detects whether the newly accessed security unit SE is an exclusive SE, it is also required to detect whether the host card simulator HCE exists in the terminal device. . If the HCE does not exist in the terminal device, if the default routing entry is not supported, the routing entry corresponding to the exclusive access SE of the newly accessed routing table is added to the current routing table to construct a routing table.
  • the routing table constructed may or may not include a routing entry corresponding to the newly accessed exclusive SE.
  • the terminal After detecting the presence of the HCE in the terminal, it is also necessary to detect whether the routing entry contains the routing entry corresponding to the HCE, because if there is an HCE in the terminal but there is no routing entry corresponding to the HCE in the routing table, the HCE cannot be operated. In this way, after accessing the exclusive SE, the terminal activates the non-exclusive SE through the SE setting command, activates the exclusive SE, and thus ensures the normal operation of the exclusive SE.
  • the routing entry includes a route entry that is the HCE; if the routing table does not include a route entry that is the HCE, the default is not supported.
  • the routing entry the routing entry corresponding to the newly-accessed exclusive SE is added to the current routing table to construct a routing table. If the default routing entry is supported, the constructed routing table may or may not include the new access.
  • the exclusive routing entry corresponding to the SE is not supported.
  • routing table includes a routing entry whose destination is the HCE, when detecting that the default routing entry is not supported, deleting the HCE and the non-exclusive in the routing table
  • the routing entry corresponding to the SE is written to the routing entry corresponding to the newly accessed SE, and a routing table including only the routing entries corresponding to the exclusive accessing exclusive SE is constructed; if the default routing entry is supported, the constructed routing is performed.
  • the table may or may not contain a routing entry corresponding to the newly accessed exclusive SE.
  • Whether the terminal supports the default route setting determines whether the terminal can include or exclude the routing entry corresponding to the default route target SE/HCE in the routing table when constructing the routing table. Therefore, it is necessary to detect whether the terminal has the capability of setting default routing entries.
  • the DH of the terminal device constructs a routing table containing only the routing entries corresponding to the exclusive SE according to the newly accessed exclusive SE. It should be noted that the routing table here is different from the routing entries constructed by adding the new access exclusive SE in the current routing table. A detailed distinction will be made in the following examples.
  • the terminal since the terminal does not support setting the default routing entry, the routing request that cannot find the matching processing item cannot be solved by the processing of the default routing item target SE, so this is that the constructed routing table cannot contain other non-exclusive SE corresponding A routing entry that only contains routing entries for exclusive SEs.
  • the NFC routing mechanism also supports a default route setting, all route requests that cannot be found to match the processing items after processing are forwarded to the default route target SE/HCE for processing.
  • the new access exclusive SE may be set as the default route item target SE, and the new SE request is processed by the default route. Therefore, when constructing the routing table, the terminal may include or not include the routing item corresponding to the default route target SE/HCE in the routing table. In fact, the routing table may be empty after step 104 because the newly accessed exclusive SE is treated as a default route, so the routing table may not contain any routing entries.
  • the present invention also provides a route setting method, and when the SE is removed, the route is correctly configured according to whether there is an exclusive SE currently in the terminal.
  • the DH (or NFCC) of the terminal device detects that the SE is removed.
  • the DH of the terminal device then obtains the ID of the currently removed SE by receiving an instruction from the NFCC of the terminal device.
  • the DH obtains the ID corresponding to the SE with the NFCEE Status value of 0x02 from the NFCEE_DISCOVER_NTF (Near Field Communication Discovery Message) sent by the NFCC (that is, the NFCEE ID of the currently removed SE). ).
  • the DH of the terminal device determines whether the current SE identifier is the second value, because whether the exclusive SE in the terminal has affected the routing configuration when the SE is removed. By distinguishing, the routing table can be correctly configured. The DH of the terminal device does not need to reset the routing table every time the SE is removed, which greatly saves system overhead.
  • the current routing table needs to be emptied only to the routing item of the exclusive SE. Therefore, when the exclusive SE is removed, the routing item of the non-exclusive SE that was previously terminated needs to be re-re-routed. Write to the routing table.
  • the route table of the non-exclusive SE is directly written without clearing the routing table, and only the routing items of the non-exclusive SE need to be deleted. Since the terminal cannot recognize whether the exclusive SE has been accessed, it is impossible to determine whether the current routing table includes only the routing entries of the exclusive SE or the routing entries of the non-exclusive SEs. Therefore, each time an SE is removed, the terminal will use the routing table. Clearing and rewriting the routing entries of each non-exclusive SE leads to a large overhead of the terminal system.
  • the SE identifier is not the second value, delete the routing entry corresponding to the currently removed SE in the current routing table, and determine whether the currently removed SE is supported when the default routing entry is supported. For the default route target SE, if yes, then re-designate an SE as the default route target SE. A4. If the same, the routing entry corresponding to the SE in the connected state, and the routing information included in the HCE, construct a routing table; detect whether the default routing entry is supported, and if yes, re-designate an SE as the default route.
  • the target SE and the constructed routing table may or may not include a routing entry corresponding to the default routing target SE.
  • A5. Acquire a configuration success message, set the SE identifier to the first value, and update the ID of the exclusive SE currently recorded in the terminal to be invalid.
  • NFCC may or may not have the ability to delete routing tables. Therefore, it is necessary to distinguish between the fact that the NFCC can delete the routing table or the routing table cannot be deleted.
  • the terminal device In order for the terminal device to correctly construct the routing table. For example, if the NFCC may have the ability to delete the routing table, the terminal needs to detect whether there is an HCE. After the SE is removed, the routing entry destined for the HCE needs to be rewritten in the presence of the HCE.
  • the NFCC of the terminal device can delete the routing item, after determining that the ID of the currently removed SE is the same as the ID of the exclusive SE recorded in the terminal, it is also required to detect whether the terminal device exists.
  • the HCE The HCE.
  • the routing table is constructed according to the routing item corresponding to the SE in the connected state; detecting whether the default routing entry is supported, and if yes, re-designating an SE as the default routing target SE And the constructed routing table may or may not include a routing entry corresponding to the default routing target SE. Then, a configuration success message is obtained, the SE identifier is set to the first value, and the ID of the exclusive SE currently recorded in the terminal is updated to be invalid. In addition, a SE mode setting command is generated to activate or deactivate the SE according to the SE mode setting command.
  • the HCE exists in the terminal device, it is detected whether the current routing table includes a routing entry whose target is the HCE; if the current routing table includes a routing entry whose target is the HCE, Constructing a routing table according to the routing entry corresponding to the SE in the connected state; detecting whether the default routing entry is supported, and if yes, re-designating an SE as the default routing target SE, and the constructed routing table may or may not include the The routing entry corresponding to the default route target SE. Get configuration successfully And setting the SE identifier to the first value, and updating the ID of the exclusive SE currently recorded in the terminal to be invalid.
  • the current routing table is configured to include any routing entry corresponding to the non-exclusive SE; if the current routing table includes any non-exclusive
  • the routing entry corresponding to the SE constructs a routing table according to the routing entry corresponding to the SE in the connected state; detects whether the default routing entry is supported, and if so, re-specifies an SE as the default routing target SE, and constructs the routing table.
  • the route item corresponding to the default route target SE may be included or not included; the configuration success message is obtained, the SE identifier is set to the first value, and the ID of the exclusive SE currently recorded in the terminal is updated to invalid.
  • the routing table is constructed according to the routing item corresponding to the SE in the connected state and the routing information included in the HCE; And if yes, re-designating an SE as the default route target SE, and the constructed routing table may or may not include a routing item corresponding to the default route target SE; obtain a configuration success message, and set the SE identifier For the first value, the ID of the exclusive SE currently recorded in the terminal is updated to be invalid.
  • the routing setting method and the terminal device provided by the embodiments of the present invention may terminate the operation of all non-exclusive SEs including the HCE by setting a routing table after the terminal accesses the exclusive SE.
  • the method and the terminal device provided by the present invention can avoid the use of the HCE, thereby ensuring the normal operation of the newly accessed exclusive SE.
  • the embodiment of the present invention provides a route setting method, which is applied to a terminal device that has the capability of deleting a routing table by the NFCC. As shown in FIG. 2, the method includes the following steps: 201. Set the SE identifier; The initial value of the character is the first value.
  • the macro terminal includes DH and NFCC.
  • the NFCC may have the ability to delete routing entries or may not delete routing entries.
  • the DH of the terminal device sets the SE identifier. Initially, there is no access to the exclusive SE in the terminal, and the status is indicated by the first value.
  • the value of the SE identifier may be a first value or a second value, where the first value indicates that the exclusive SE is not currently accessed in the terminal, and the first value indicates that the exclusive SE is currently accessed in the terminal.
  • a Flag flag is added to the DH, and the initial value is 0, 0 means false (the terminal does not currently have access to the exclusive SE), and 1 means true (the terminal has currently accessed the exclusive SE).
  • the SE identifier is the first value
  • the current routing table is obtained.
  • the SE identifier is the second value, no configuration processing is necessary.
  • the DH of the terminal device determines whether the current SE identifier is the second value, because whether the exclusive SE in the terminal has affected the routing configuration when the SE is removed. By distinguishing, the routing table can be correctly configured.
  • the DH of the terminal device does not need to reset the routing table every time the SE is removed, which greatly saves system overhead.
  • the current routing table needs to be emptied only to the routing entry of the exclusive SE. Therefore, when the exclusive SE is removed, the routing entry of the non-exclusive SE that was previously terminated needs to be rewritten to the routing. table.
  • the route table of the non-exclusive SE is directly written without clearing the routing table, and only the routing item of the non-exclusive SE is deleted.
  • the terminal cannot recognize whether the exclusive SE is currently accessed, it cannot be determined whether the current routing table is a routing item including only the exclusive SE or a routing item including each non-exclusive SE. Therefore, each time an SE is removed, the terminal will use the routing table. Clearing and rewriting the routing entries of each non-exclusive SE leads to a large overhead of the terminal system.
  • the DH sends the RF_GET_LISTEN_MODE_ROUTING_CMD to the NFCC after determining that the SE state identifier is the first value, and obtains the current routing table RT01. Or DH itself backs up the routing table that was last configured to NFCC. RT0
  • step 204 If the accessed security unit SE is not an exclusive SE, proceed to step 204; if the newly accessed security unit SE is an exclusive SE, proceed to step 205.
  • the DH of the terminal device it is determined by the DH of the terminal device whether the newly accessed security unit SE is an exclusive SE. 204. Set the SE identifier to a first value, add a routing entry corresponding to the newly accessed SE in the current routing table, and construct a routing table. When the default routing entry is supported, determine whether the re-assignment needs to be re-specified.
  • the default route target SE is described, and the constructed routing table may or may not include a routing entry corresponding to the default route target SE.
  • the DH of the terminal device sets the SE identifier to the first value. On the basis of the content of the obtained routing table RT01, the legal routing entry corresponding to the newly accessed SE is added to form a new routing table RT02. If the terminal device's NFCC supports setting a default route entry, it is determined whether a new default route target needs to be reassigned. RT02 may or may not contain a routing entry corresponding to the default route destination (the default routing settings are supported on the terminal device).
  • DH sends RF_SET_LISTEN_MODE_ROUTING_CMD to NFCC, and configures routing table RT02 to NFCC. If NFCC supports setting the default route target and updates the default route target, it also specifies a new default route target. DH sends NFCEE_MODE_SET_CMD to the NFCC to deactivate the non-exclusive SE of all active states except HCE, and activates the exclusive SE. It should be noted that the foregoing DH configuration routing table and the deactivation/activation of the SE are in no particular order, and the embodiment of the present invention does not limit this.
  • step 206 is performed. If the host card emulator HCE exists in the terminal device, step 207 is performed.
  • the constructed routing table may or may not include the exclusive access corresponding to the new access. Routing item.
  • the interaction between the DH and the NFCC includes: 1.
  • the DH sends the RF_SET_LISTEN_MODE_ROUTING_CMD to the NFCC, and configures the routing table to the NFCC; if the NFCC supports the setting of the default route target, the default route target is also set to the exclusive SE.
  • DH When RH is received at DH, DH sets the Flag value to 1 and records the NFCEE ID of the exclusive SE: PT_SE_ID. DH sends NFCEE_MODE_SET_CMD to the NFCC to deactivate the non-exclusive SE of all active states except HCE, and activates the exclusive SE.
  • routing entry does not include the routing entry whose destination is the HCE, go to step 208. If the routing entry does not contain the routing entry whose destination is the HCE, go to step 209.
  • the DH detection system of the terminal device has a routing table that can be written, and the routing destination is the routing information of the HCE.
  • the routing entry corresponding to the newly accessed exclusive SE is added to the current routing table to construct a routing table. If the default routing entry is supported, the constructed routing table may include or not. A routing entry corresponding to the exclusive accessing SE of the new access.
  • RT03 may or may not contain the routing entry corresponding to the exclusive SE.
  • the interaction between the DH and the NFCC includes: 1.
  • the DH sends the RF_SET_LISTEN_MODE_ROUTING_CMD to the NFCC, and configures the routing table to the NFCC; if the NFCC supports the setting of the default route target, the default routing target is also set to the exclusive SE.
  • DH When RSP is received in DH, DH sets Flag value to 1, and records exclusive SE. NFCEE ID: PT_SE_ID. DH sends NFCEE_MODE_SET_CMD to the NFCC to deactivate the non-exclusive SE of all active states except HCE, and activates the exclusive SE.
  • the constructed routing table may or may not include the routing entry corresponding to the newly accessed exclusive SE.
  • the NFCC if the NFCC does not support the setting of the default route, the NFCC deletes the routing entry corresponding to the HCE and the non-exclusive SE in the routing table, and writes the routing entry corresponding to the newly accessed SE, and the The routing item RT04 corresponding to the exclusive SE; if the NFCC supports the setting of the default route target, RT03 may or may not contain the corresponding routing item in the exclusive SE.
  • DH sends RF_SET_LISTEN_MODE_ROUTING_CMD to NFCC to configure the above routing table to NFCC; if NFCC supports setting the default route destination, it also sets the default route target to exclusive SE.
  • the Flag ie, the SE identifier described in the embodiment of the present invention
  • the ID of the exclusive SE is recorded: PT_SE_ID.
  • DH sends NFCEE_MODE_SET_CMD to the NFCC to deactivate the non-exclusive SE of all active states except HCE, and activates the exclusive SE. It should be noted that these two steps are in no particular order, and are not limited in the implementation of the present invention.
  • the routing setting method and the terminal device provided by the embodiments of the present invention may terminate the operation of all non-exclusive SEs including the HCE by setting a routing table after the terminal accesses the exclusive SE.
  • the method and the terminal device provided by the present invention can avoid the use of the HCE, thereby ensuring the normal operation of the newly accessed exclusive SE.
  • Example 3 The embodiment of the present invention provides a route setting method, which is applied to a terminal device of the NFCC having the capability of deleting a routing table. As shown in FIG. 3, the method includes the following steps:
  • the DH or NFCC of the terminal device can detect whether there is any
  • DH obtains the NFCEE ID corresponding to the SE with the NFCEE Status value of 0x02 from the NFCEE_DISCOVER_NTF sent by the NFCC (that is, the NFCEE ID of the currently removed SE).
  • step 303 is performed. If the SE identifier is not the second value, then step 304 is performed.
  • Delete the routing entry corresponding to the currently removed SE in the current routing table and determine whether the currently removed SE is the default routing target SE when the default routing entry is supported, and if yes, re Specify an SE as the default route target SE.
  • the NFCC deletes the routing entry corresponding to the SE. If the NFCC supports setting the default route entry, the DH determines whether the removed SE is the current default route entry SE, and if so, reassigns a SE as the default route entry target SE and configures it to the NFCC.
  • DH determines whether the NFCEE ID of the removed SE is equal to PT_SE_ID (the ID of the exclusive SE currently recorded in the terminal). Since usually only one exclusive SE can be guaranteed in the terminal, it can be judged whether the current SE is an exclusive SE by judging whether the NFCEE ID of the removed SE is equal to PT_SE_ID. If they are the same, it proves that the current removal SE is an exclusive SE.
  • the DH detection system service registration of the terminal device determines whether there is an HCE. 306. Construct a routing table according to the routing entry corresponding to the SE in the connected state. Check whether the default routing entry is supported. If yes, re-specify an SE as the default routing target SE, and the configured routing table may or may not include The routing item corresponding to the default route target SE.
  • DH simultaneously selects and sets a new default route target.
  • the NFCC deletes the routing entries corresponding to the exclusive SE.
  • DH sends the NFCEE_MODE_SET_CMD instruction to the NFCC to activate some/all non-exclusive SEs as needed.
  • the DH sets the Flag value to 0 and sets the PT_SE_ID value to N/A (that is, the SE identifier is set to the first in the embodiment of the present invention. a value, and updating the ID of the exclusive SE currently recorded in the terminal to be invalid).
  • step 307 Detect whether the routing entry with the target is the HCE is included in the current routing table. If yes, proceed to step 308. If not, proceed to step 309.
  • the routing entry corresponding to the SE in the connected state and the routing entry corresponding to the HCE construct a routing table. Check whether the default routing entry is supported. If yes, re-specify an SE as the default routing target SE, and construct The routing table may or may not include a routing entry corresponding to the default route target SE.
  • the SE identifier is set to the first value, and the ID of the exclusive SE currently recorded in the terminal is updated to be invalid.
  • the DH constructs a routing table RT05 according to the routing information contained in the SE and the HCE in the connected state. If the NFCC supports the default route, then reselect one SE as the default route target SE, and RT05 can include/exclude its route.
  • DH sends RF_SET_LISTEN_MODE_ROUTING_CMD to the NFCC, and configures the above routing table to the NFCC. If the NFCC supports the setting of the default route target, then the new default route target is set at the same time. DH sends NFCEE_MODE_SET_CMD to the NFCC to activate some/all non-exclusive SEs as required. After receiving the RSP with the feedback configuration succeeded, the DH sets the Flag value to 0 and sets the PT_SE_ID value to N/A (that is, the ID of the exclusive SE currently recorded by the terminal device is updated to be invalid according to the embodiment of the present invention) . 309. Detect whether the current routing table includes any routing entry corresponding to the non-exclusive SE.
  • step 310 If yes, proceed to step 310; if not, proceed to step 308.
  • Delete the route item corresponding to the currently excluded exclusive SE to construct a routing table detect whether to support setting a default routing item, and if so, re-designate an SE as the default route target SE, and construct a routing table.
  • the routing entry corresponding to the default route target SE may or may not be included.
  • DH simultaneously selects and sets a new default route target.
  • the NFCC deletes the routing entries corresponding to the exclusive SE.
  • DH sends the NFCEE_MODE_SET_CMD instruction to the NFCC to activate some/all non-exclusive SEs as needed.
  • DH sets the Flag value to 0 and sets the PT_SE_ID value to N/A.
  • the routing setting method provided by the embodiment of the present invention may terminate the operation of all non-exclusive S E including H C E by setting a routing table after the terminal accesses the exclusive SE.
  • the method and the terminal device provided by the present invention can avoid the use of the HCE, thereby ensuring the normal operation of the newly accessed exclusive SE.
  • the embodiment of the present invention provides a route setting method, which is applied to a terminal device that does not have the capability of deleting a routing table by the NFCC. As shown in FIG. 4, the method includes the following steps: 401. Set the SE identifier; The initial value of the identifier is the first value.
  • Macro terminals include DH and NFCC, where NFCC may have the ability to delete routing items or may not delete routing items. In this embodiment, it is specified that the NFCC does not have the capability of deleting routing entries.
  • the DH of the terminal device sets the SE identifier. Initially, there is no access to the exclusive SE in the terminal, and the status is indicated by the first value.
  • the value of the SE identifier may be a first value or a second value, the first value indicating that the terminal is not currently connected to the exclusive
  • the first value indicates that the exclusive SE is currently accessed in the terminal. Specifically, a flag is added to the DH, the initial value is 0, 0 is false (the terminal does not currently have an exclusive access SE), and 1 is true (the terminal has currently accessed the exclusive SE).
  • the current routing table is obtained.
  • the DH of the terminal device determines whether the current SE identifier is the second value, because whether the exclusive SE in the terminal has affected the routing configuration when the SE is removed. By distinguishing, the routing table can be correctly configured.
  • the DH of the terminal device does not need to reset the routing table every time the SE is removed, which greatly saves system overhead.
  • the current routing table needs to be emptied only to the routing entry of the exclusive SE. Therefore, when the exclusive SE is removed, the routing entry of the non-exclusive SE that was previously terminated needs to be rewritten to the routing. table.
  • the route table of the non-exclusive SE is directly written without clearing the routing table, and only the routing item of the non-exclusive SE is deleted.
  • the terminal cannot recognize whether the exclusive SE is currently accessed, it cannot be determined whether the current routing table is a routing item including only the exclusive SE or a routing item including each non-exclusive SE. Therefore, each time an SE is removed, the terminal will use the routing table. Clearing and rewriting the routing entries of each non-exclusive SE leads to a large overhead of the terminal system.
  • the DH sends the RF_GET_LISTEN_MODE_ROUTING_CMD to the NFCC after determining that the SE state identifier is the first value, and obtains the current routing table RT01. Or DH itself backs up the routing table that was last configured to the NFCC.
  • RT0 403 Detects whether the newly accessed security unit SE is an exclusive SE.
  • step 404 is performed; if the newly accessed security unit SE is an exclusive SE, then step 405 is performed.
  • the DH of the terminal device it is determined by the DH of the terminal device whether the newly accessed security unit SE is an exclusive SE.
  • the SE identifier may or may not include a routing entry corresponding to the default route target SE.
  • the DH of the terminal device sets the SE identifier to the first value.
  • the legal routing entry corresponding to the new access SE is added to form a new routing table RT02. If the terminal device's NFCC supports setting a default route entry, it is determined whether it is necessary to re-specify the new default route target.
  • RT02 may or may not contain a routing entry corresponding to the default route target (the default routing settings are supported on the terminal device).
  • DH sends RF_SET_LISTEN_MODE_ROUTING_CMD to NFCC, and configures routing table RT02 to NFCC. If NFCC supports setting the default route target and updates the default route target, it also specifies a new default route target. DH sends NFCEE_MODE_SET_CMD to the NFCC to deactivate the non-exclusive SE of all active states except HCE, and activates the exclusive SE. It should be noted that the foregoing DH configuration routing table and the deactivation/activation of the SE are in no particular order, and the embodiment of the present invention does not limit this.
  • step 406 If not, proceed to step 406; if yes, proceed to step 407.
  • the DH of the terminal device constructs a new routing table, in which only the routing entries corresponding to the applications in the exclusive SE are configured, and the routing entries corresponding to the applications in other SEs and HCEs are not included.
  • DH sends RF_SET_LISTEN_MODE_ROUTING_CMD to NFCC to configure the above routing table to NFCC; if NFCC supports setting the default route destination, it also sets the default route target to exclusive SE.
  • RH receives RSP, DH sets the Flag value to 1 and records the NFCEE ID of the non-other SE: PT_SE_ID.
  • DH sends NFCEE_MODE_SET_CMD to the NFCC to deactivate the non-exclusive SE of all active states except HCE, and activates the exclusive SE.
  • the DH constructs a new routing table, where only the routing entries corresponding to the applications in the exclusive SE are configured, or no routing entries are included.
  • DH sends RF_SET_LISTEN_MODE_ROUTING_CMD to NFCC to configure the above routing table to NFCC; if NFCC supports setting the default route destination, it also sets the default route target to exclusive SE.
  • RH receives RSP, DH sets the Flag value to 1 and records the NFCEE ID of the non-other SE: PT_SE_ID.
  • DH sends NFCEE_MODE_SET_CMD to the NFCC to deactivate the non-exclusive SE of all active states except HCE, and activates the exclusive SE.
  • the routing setting method and the terminal device provided by the embodiments of the present invention may terminate the operation of all non-exclusive SEs including the HCE by setting a routing table after the terminal accesses the exclusive SE.
  • the method and the terminal device provided by the present invention can avoid the use of the HCE, thereby ensuring the normal operation of the newly accessed exclusive SE.
  • the embodiment of the present invention provides a route setting method, which is applied to a terminal device that does not have the capability of deleting a routing table by the NFCC. As shown in FIG. 5, the method includes the following steps:
  • the DH or NFCC of the terminal device detects that the SE is removed, the DH obtains the ID corresponding to the SE with the NFCEE Status value of 0x02 from the NFCEE_DISCOVER_NTF sent by the NFCC (that is, the NFCEE ID of the currently removed SE).
  • step 503 If not, proceed to step 503; if yes, proceed to step 504.
  • the DH of the terminal device determines whether the SE's NFCEE ID is equal to PT_SE_ID.
  • the DH deletes the routing entry corresponding to the SE in the routing table, constructs a new routing table, and configures the routing table to the NFCC; If the NFCC supports the default route SE setting, it is determined whether the default route SE needs to be reset, and the new routing table may or may not contain the routing entry corresponding to the default route SE.
  • step 507 If yes, go to step 507; if not, go to step 506.
  • the DH constructs a routing table according to the routing information included in the SE and the HCE still in the connected state, including the routing information corresponding to the SE and the HCE in the connected state.
  • DH sends RF_SET_LISTEN_MODE_ROUTING_CMD to the NFCC to configure the constructed routing table to the NFCC. If the NFCC supports the setting of the default route destination, an additional default destination is set. DH sends NFCEE_MODE_SET_CMD to the NFCC to activate some/all non-exclusive SEs as required.
  • Re-designating an SE as the default route target SE, and the constructed routing table may or may not include a routing entry corresponding to the default route target SE.
  • DH sends NFCEE_MODE_SET_CMD to the NFCC to activate some/all non-exclusive SEs as needed.
  • DH After receiving the RSP with successful feedback configuration, DH sets the Flag value to 0 and sets the PT_SE_ID value to N/A.
  • the routing setting method provided by the embodiment of the present invention may terminate the operation of all non-exclusive SEs including the HCE by setting a routing table after the terminal accesses the exclusive SE.
  • the method and the terminal device provided by the present invention can avoid using the HCE, thereby ensuring the exclusive access of the new access.
  • the embodiment of the present invention provides a terminal device.
  • the terminal device includes: a detecting unit 601, a building unit 602, and a setting unit 603.
  • the detecting unit 601 is configured to detect whether the newly accessed security unit SE is an exclusive SE.
  • the detecting unit 601 is further configured to: after detecting that the newly accessed SE is an exclusive SE, detecting whether to support setting a default routing item .
  • the construction unit 602 is configured to construct a routing table including only the routing items corresponding to the exclusive SE after the detecting unit 601 detects that the setting of the default routing item is not supported.
  • the setting unit 603 is configured to: after the detecting unit 601 detects that the setting default routing item is supported, set the newly accessed SE as a default routing target SE, and the constructed routing table may or may not include an exclusive SE corresponding to the SE. Routing item.
  • the setting unit 603 is further configured to: if the newly accessed SE is not an exclusive SE, set the SE identifier to a first value; if the newly accessed SE is an exclusive SE, then the SE identifier The second value is set and the ID of the newly accessed SE is recorded; the first value indicates that the exclusive SE is not currently accessed in the terminal, and the second value indicates that the exclusive SE is currently accessed in the terminal.
  • the setting unit 603 is further configured to: set the SE identifier; an initial value of the SE identifier is the first value.
  • the terminal device further includes: a determining unit, configured to determine whether the SE identifier is the first value.
  • an obtaining unit configured to acquire a current routing table if the determining unit determines that the SE identifier is the first value.
  • the constructing unit 602 is further configured to: after the detecting unit 601 detects that the newly accessed SE is not an exclusive SE, add a routing item corresponding to the newly accessed SE in the current routing table, and construct Routing table.
  • the determining unit is further configured to: when the detecting unit 601 detects that the default routing item is supported, determine whether the default routing target SE needs to be re-specified, and the constructed routing table may or may not include the default routing target. SE corresponding route Item.
  • the detecting unit 601 is further configured to detect whether the host card emulator HCE exists in the terminal device.
  • the constructing unit 602 is further configured to: if the detecting unit 601 detects that the HCE does not exist in the terminal device, add an exclusive access of the new access to the current routing table when the default routing entry is not supported.
  • the routing entry corresponding to the SE constructs a routing table. If the default routing entry is supported, the constructed routing table may or may not include the routing entry corresponding to the newly accessed exclusive SE.
  • the detecting unit 601 is further configured to: if it is detected that the HCE exists in the terminal device, detect whether a routing entry whose target is the HCE is included in the routing table;
  • the constructing unit 602 is further configured to: if the detecting unit 601 detects that the routing entry does not include a routing entry that is the HCE, add the default routing entry in the current routing table when the default routing entry is not supported.
  • the routing entry corresponding to the newly-accessed exclusive SE constructs a routing table. If the default routing entry is supported, the constructed routing table may or may not include the routing entry corresponding to the newly accessed exclusive SE.
  • the constructing unit 602 is further configured to: if the detecting unit 601 detects that the routing table includes a routing entry whose target is the HCE, delete the location when the detecting unit 601 detects that the default routing entry is not supported. a routing entry corresponding to the HCE and the non-exclusive SE in the routing table, and a routing entry corresponding to the newly-accessed SE, and a routing table including only the routing entries corresponding to the newly-accessed exclusive SE; If the default routing entry is set, the configured routing table may or may not include the routing entry corresponding to the newly accessed exclusive SE.
  • the detecting unit 601 is further configured to detect whether an SE is removed.
  • the obtaining unit is further configured to: after the detecting unit detects that the SE is removed, acquire an ID of the currently removed SE.
  • the determining unit is further configured to determine whether the SE identifier is the second value.
  • the determining unit is further configured to: if the SE identifier is the second value, It is determined whether the ID of the currently removed SE is the same as the ID of the exclusive SE recorded in the terminal.
  • the constructing unit 602 is further configured to: if the determining unit determines that the ID of the currently removed SE is the same as the ID of the exclusive SE recorded in the terminal, the routing item corresponding to the SE in the connected state, The routing information included in the HCE is used to construct a routing table.
  • the detecting unit 601 is further configured to detect whether a default routing entry is supported.
  • the constructing unit 602 is further configured to: if the detecting unit 601 detects a setting default routing entry, construct a routing table that includes or does not include a routing entry corresponding to the default routing target SE.
  • the setting unit 603 is further configured to: after the detecting unit 601 detects that the setting default routing item is supported, re-designate an SE as the default routing target SE.
  • the obtaining unit is further configured to obtain a configuration success message.
  • the setting unit 603 is further configured to: set the SE identifier to the first value, and update the ID of the exclusive SE currently recorded in the terminal to be invalid.
  • the constructing unit 602 is further configured to: if the determining unit determines that the SE identifier is not the second value, delete a routing entry corresponding to the currently removed SE in the current routing table.
  • the determining unit is further configured to determine, when the setting of the default routing item is supported, whether the currently removed SE is the default routing target SE.
  • the determining unit is further configured to determine, when determining to support setting a default routing item, whether the currently removed SE is the default routing target SE.
  • the setting unit 603 is further configured to: after the determining unit determines that the currently removed SE is the default routing target SE, re-designate an SE as the default routing target SE.
  • the detecting unit 601 is further configured to detect whether the HCE exists in the terminal device.
  • the building unit 602 is further configured to construct a routing table according to a routing item corresponding to the SE in the connected state.
  • the detecting unit 601 is further configured to detect whether a default routing entry is supported.
  • the setting unit 603 is further configured to: after detecting the setting of the default routing item, re-designating an SE as the default routing target SE, and the configured routing table may or may not include the routing item corresponding to the default routing target SE.
  • the obtaining unit is further configured to obtain a configuration success message.
  • the setting unit 603 is further configured to: set the SE identifier to the first value, and update the ID of the exclusive SE currently recorded in the terminal to be invalid.
  • the detecting unit 601 is further configured to: if the HCE exists in the terminal device, detect whether the current routing table includes a routing entry whose target is the HCE.
  • the constructing unit 602 is further configured to: after the detecting unit 601 detects that the current routing table includes a routing entry whose target is the HCE, according to the routing entry corresponding to the SE in the connected state, and the route corresponding to the HCE Item build routing table.
  • the detecting unit 601 is further configured to detect whether a default routing entry is supported.
  • the setting unit 603 is further configured to: if the detecting unit 601 detects that the default routing entry is supported, re-designate an SE as the default routing target SE, and the constructed routing table may or may not include the default routing target.
  • the routing entry corresponding to SE is further configured to: if the detecting unit 601 detects that the default routing entry is supported, re-designate an SE as the default routing target SE, and the constructed routing table may or may not include the default routing target.
  • the obtaining unit is further configured to: obtain a configuration success message
  • the setting unit 603 is further configured to: set the SE identifier to the first value, and update the ID of the exclusive SE currently recorded in the terminal to be invalid.
  • the detecting unit 601 is further configured to: after detecting that the current routing table does not include a routing entry that is the HCE, whether the current routing table includes any routing entry corresponding to the non-exclusive SE.
  • the constructing unit 602 is further configured to: after the detecting unit 601 detects that the current routing table includes a routing item corresponding to any non-exclusive SE, delete the routing item corresponding to the currently excluded exclusive SE to construct a route. table.
  • the detecting unit 601 is further configured to detect whether a default routing entry is supported.
  • the setting unit 603 is further configured to: if the detecting unit 601 detects that the default routing item is supported, re-designate an SE as the default routing target SE, and construct The created routing table may or may not contain a routing entry corresponding to the default route target SE.
  • the obtaining unit is further configured to obtain a configuration success message.
  • the setting unit 603 is further configured to: set the SE identifier to the first value, and update the ID of the exclusive SE currently recorded in the terminal to be invalid.
  • the constructing unit 602 is further configured to: if the current routing table does not include any routing item corresponding to the non-exclusive SE, the routing item corresponding to the SE in the connected state, and the routing information included in the HCE, construct a route table.
  • the detecting unit 601 is further configured to detect whether a default routing entry is supported.
  • the setting unit 603 is further configured to: if the detecting unit 601 detects that the default routing entry is supported, re-designate an SE as the default routing target SE, and the constructed routing table may or may not include the default routing target.
  • the routing entry corresponding to SE is further configured to: if the detecting unit 601 detects that the default routing entry is supported, re-designate an SE as the default routing target SE, and the constructed routing table may or may not include the default routing target.
  • the obtaining unit is further configured to obtain a configuration success message.
  • the setting unit 603 is further configured to: set the SE identifier to the first value, and update the ID of the exclusive SE currently recorded in the terminal to be invalid.
  • the terminal device provided by the embodiment of the present invention can terminate the operation of all non-exclusive SEs including the HCE by setting a routing table after the terminal accesses the exclusive SE. Compared with the prior art, the method and the terminal device provided by the present invention can avoid the use of the HCE, thereby ensuring the normal operation of the newly accessed exclusive SE.
  • the embodiment of the present invention provides a terminal device.
  • the terminal device includes: DH (Device Host) 701.
  • the terminal device further includes an NFCC (Near Field Communication Manager) 702, an SE interface (Secure Unit Interface) 703, and a memory 704.
  • a routing table is stored in the memory.
  • DH701 used to detect whether the newly accessed security unit SE is an exclusive SE.
  • the DH 701 is further configured to: after detecting that the newly accessed SE is an exclusive SE, detecting whether to support setting a default routing item.
  • the DH 701 is further configured to: after detecting that the default routing entry is not supported, construct a routing table that only includes routing entries corresponding to the exclusive SE.
  • the DH701 is configured to: after detecting that the default routing entry is supported, set the newly accessed SE as a default routing target SE, and the constructed routing table may or may not include a routing entry corresponding to the exclusive SE.
  • the DH 701 is further configured to: if the newly accessed SE is not an exclusive SE, set the SE identifier to a first value; if the newly accessed SE is an exclusive SE, set the SE identifier The second value is used to record the ID of the newly accessed SE; the first value indicates that the exclusive SE is not currently accessed in the terminal, and the second value indicates that the exclusive SE is currently accessed in the terminal.
  • the DH 701 is further configured to: set the SE identifier; an initial value of the SE identifier is the first value.
  • the B' is configured to obtain a current routing table if the SE identifier is determined to be the first value.
  • the DH 701 is further configured to: after detecting that the newly accessed SE is not an exclusive SE, add a routing entry corresponding to the newly accessed SE in the current routing table, and construct a routing table.
  • the DH701 is further configured to: when it is detected that the default routing entry is supported, determine whether the default routing target SE needs to be re-specified, and the configured routing table may or may not include the routing entry corresponding to the default routing target SE.
  • the DH 701 is further configured to detect whether the host card emulator HCE exists in the terminal device.
  • the DH 701 is further configured to: when detecting that the HCE does not exist in the terminal device, add a routing entry corresponding to the newly accessed exclusive SE in the current routing table when the default routing entry is not supported. If the default routing entry is supported, the configured routing table may or may not include the routing entry corresponding to the newly accessed exclusive SE.
  • the DH 701 is further configured to: if detecting the presence of the HCE in the terminal device, And detecting, in the routing table, whether the routing entry whose target is the HCE is included;
  • the DH 701 is further configured to: if it is detected that the routing entry does not include a routing entry that is the HCE, add the exclusive access of the new access to the current routing table when the default routing entry is not supported.
  • the routing entry corresponding to the SE constructs a routing table. If the default routing entry is supported, the constructed routing table may or may not include the routing entry corresponding to the newly accessed exclusive SE.
  • the DH 701 is further configured to: if it is detected that the routing entry includes a routing entry whose target is the HCE, delete the HCE and the non-exclusive SE corresponding to the routing table when detecting that the default routing entry is not supported.
  • the routing entry is written to the routing entry corresponding to the newly accessed SE, and a routing table including only the routing entries corresponding to the newly-accessed exclusive SE is constructed; if the default routing entry is supported, the constructed routing table may be configured.
  • a routing entry corresponding to the exclusive accessing SE of the new access is included or not included.
  • the DH701 is further configured to detect whether an SE is removed.
  • the DH 701 is further configured to: after detecting that the SE is removed, obtain an ID of the currently removed SE.
  • the DH 701 is further configured to determine whether the SE identifier is the second value.
  • the DH 701 is further configured to determine, if the SE identifier is the second value, whether the ID of the currently removed SE is the same as the ID of the exclusive SE recorded in the terminal.
  • the DH 701 is further configured to: if the determining unit determines that the ID of the currently removed SE is the same as the ID of the exclusive SE recorded in the terminal, the routing entry corresponding to the SE in the connected state, the HCE includes Routing information, build a routing table.
  • the DH701 is further configured to detect whether a default routing entry is supported.
  • the DH701 is further configured to: if the detection supports setting a default routing entry, construct a routing table that includes or does not include a routing entry corresponding to the default routing target SE.
  • the DH701 is further configured to: after detecting the support setting default routing entry, re-designating an SE as the default routing target SE.
  • the DH701 is further configured to obtain a configuration success message.
  • the DH 701 is further configured to: set the SE identifier to the first value, and The ID of the exclusive SE currently recorded in the terminal is updated to be invalid.
  • the NFCC 702 is configured to: if it is determined that the SE identifier is not the second value, delete a routing entry corresponding to the currently removed SE in the current routing table.
  • the DH 701 is further configured to: if it is determined that the SE identifier is not the second value, and the NFCC 702 of the terminal does not have the capability of deleting a route, delete the route corresponding to the currently removed SE in the current routing table. item.
  • the DH701 is further configured to determine, when the setting of the default routing item is supported, whether the currently removed SE is the default routing target SE.
  • the DH701 is further configured to determine, when determining that the default routing entry is supported, whether the currently removed SE is the default routing target SE.
  • the DH 701 is further configured to: after determining that the currently removed SE is the default route target SE, re-designate an SE as the default route target SE.
  • the DH 701 is further configured to detect whether the HCE exists in the terminal device.
  • the DH701 is further configured to construct a routing table by using a routing item corresponding to the SE in the connected state.
  • the DH701 is further configured to detect whether a default routing entry is supported.
  • the DH701 is further configured to: after detecting the setting of the default routing entry, re-designating an SE as the default routing target SE, and the constructed routing table may or may not include the routing entry corresponding to the default routing target SE.
  • the DH701 is further configured to obtain a configuration success message.
  • the DH 701 is further configured to: set the SE identifier to the first value, and update an ID of an exclusive SE currently recorded in the terminal to be invalid.
  • the DH 701 is further configured to: if the HCE exists in the terminal device, detect whether a routing entry whose target is the HCE is included in the current routing table.
  • the DH 701 is further configured to: after detecting that the current routing table includes a routing entry that is the HCE, construct a routing table according to the routing entry corresponding to the SE in the connected state and the routing entry corresponding to the HCE.
  • the DH 701 is further configured to: detect whether a default routing entry is supported. The DH 701 is further configured to: if the detection supports setting a default routing entry, re-designating an SE as the default routing target SE, and the constructed routing table may or may not include a routing entry corresponding to the default routing target SE.
  • the DH701 is further configured to: obtain a configuration success message
  • the DH 701 is further configured to: set the SE identifier to the first value, and update an ID of an exclusive SE currently recorded in the terminal to be invalid.
  • the DH 701 is further configured to: after detecting that the current routing table does not include the routing entry that is the HCE, check whether the current routing table includes any routing entry corresponding to the non-exclusive SE.
  • the DH 701 is further configured to: after the detecting unit 601 detects that the current routing table includes a routing item corresponding to any non-exclusive SE, delete the routing item construction routing table corresponding to the currently deleted exclusive SE.
  • the DH701 is further configured to detect whether a default routing entry is supported.
  • the DH 701 is further configured to: if the detecting unit 601 detects that the default routing entry is supported, re-designate an SE as the default routing target SE, and the constructed routing table may or may not include the default routing target SE corresponding. Routing item.
  • the DH701 is further configured to obtain a configuration success message.
  • the DH 701 is further configured to: set the SE identifier to the first value, and update an ID of an exclusive SE currently recorded in the terminal to be invalid.
  • the DH 701 is further configured to: if the current routing table does not include any routing item corresponding to the non-exclusive SE, the routing entry corresponding to the SE in the connected state, and the routing information included in the HCE, construct a routing table.
  • the DH701 is further configured to detect whether a default routing entry is supported.
  • the DH 701 is further configured to: if the detection supports setting a default routing entry, re-designating an SE as the default routing target SE, and the constructed routing table may or may not include a routing entry corresponding to the default routing target SE.
  • the DH701 is further configured to obtain a configuration success message.
  • the DH 701 is further configured to: set the SE identifier to the first value, and update an ID of an exclusive SE currently recorded in the terminal to be invalid.
  • the terminal device provided by the embodiment of the present invention can terminate the operation of all non-exclusive SEs including the HCE by setting a routing table after the terminal accesses the exclusive SE. Compared with the prior art, the method and the terminal device provided by the present invention can avoid using the HCE, thereby ensuring the normal operation of the newly accessed exclusive SE.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明提供了一种路由设置方法及终端设备,涉及通信领域,可以避免使用HCE,所述方法包括:检测新接入的安全单元SE是否为排他SE;若所述新接入的SE是排他SE,则检测是否支持设置默认路由项;若检测到不支持设置默认路由项,则构建仅包含排他性SE对应的路由项的路由表;若支持设置默认路由项,则将所述新接入的SE设置为默认路由目标SE,且构建的路由表可以包含或者不包含排他性SE对应的路由项。

Description

一种路由设置方法及终端设备 技术领域 本发明涉及通信领域, 尤其涉及一种路由设置方法及终端设 备。
背景技术
可靠的移动支付, 需要依赖 SE ( Secure Element , 安全单元) 提供的安全、 加密的环境来实现。 因此, 当终端中正常使用 SE之 后, SE 中可以安装移动支付应用, 进行安全的移动支付。 除了基 于物理芯片的 SE之外 , 目前终端通过软件实现的 HCE ( Host Card Emulator,主机卡模拟器), 对于 NFCC ( Near Field Communication Controller, 近场通信控制器) 也是当做 SE来进行管理。
在一些应用场景下, 终端可能希望多个 SE 中的一个 SE为排 他 SE。 例:^ UICC ( Universal Integrated Circuit Card , 通用集成电 路卡) 卡上的 SE , 其余 SE为非排他 SE。 在这种情况下, 当终端 中接入此 UICC时, NFC(Near Field Communication,近场通信)通信 对端才艮据 NFC 路由机制仅选中此 UICC 上 SE 的应用 , 因此其他 SE或 HCE 中的应用不能被 NFC通信对端选中。 因此, 终端可能 被要求只允许激活排他 SE , 同时需要去激活非排他 SE。 现有技术 中 , 由 CPU向 NFCC发送 SE设置指令来控制 SE的激活 /去激活。 其中, 所述 SE设置指令包含需要控制的 SE的 ID。
如果终端安装了排他性的 UICC卡, 则所述 HCE 可以视为非 排他 SE ,终端应该停止将通过 NFC技术接收到的信息路由到 HCE。 通常, 终端可以通过模式设置指令来实现对 SE的控制。 由于所述 模式设置指令的目标 ID 不能为 HCE 的 ID , 因此无法依靠所述模 式设置指令去激活 H C E ,无法保证新接入的排他 S E的排他性需求。 发明内容
本发明的实施例提供一种路由设置方法及终端设备,可以避免 使用 HCE ,正确配置路由表,保证终端接入的排他 SE的正常运行。 为达到上述目的, 本发明的实施例釆用如下技术方案: 第一方面, 公开了一种路由设置方法, 包括:
检测新接入的安全单元 SE是否为排他 SE;
若所述新接入的 SE是排他 SE ,则检测是否支持设置默认路由 项;
若检测到不支持设置默认路由项, 则构建仅包含排他性 S E对 应的路由项的路由表;若支持设置默认路由项, 则将所述新接入的 SE设置为默认路由目标 SE , 且构建的路由表可以包含或者不包含 排他性 SE对应的路由项。
结合第一方面, 在第一方面的第一种可能的实现方式中, 所述 检测新接入的安全单元 SE是否为排他 SE之后, 所述方法还包括: 若所述新接入的 SE不是排他 SE , 则将 SE标识符置为第一数 值; 若所述新接入的 SE是排他 SE , 则将所述 SE标识符置为第二 数值并记录所述新接入的 SE的 ID ; 所述第一数值表示终端中当前 未接入排他 SE , 所述第二数值表示终端中当前已接入排他 SE。
结合第一方面, 在第一方面的第二种可能的实现方式中, 所述 方法还包括:
设置所述 SE标识符; 所述 SE标识符的初始值为所述第一数 值; 则, 在所述检测新接入的 SE是否为排他 SE之前, 所述方法 还包括:
判断所述 SE标识符是否为所述第一数值; 若所述 SE标识符 为第一数值, 则获取当前路由表。
结合第一方面的第二种可能的实现方式,在第一方面的第三种 可能的实现方式中,
若所述新接入的 SE不是排他 SE ,则在所述当前路由表中增加 所述新接入的 SE对应的路由项, 构建路由表; 在支持设置默认路 由项时, 判断是否需要重新指定所述默认路由目标 SE , 且构建的 路由表可以包含或不包含所述默认路由目标 SE对应的路由项。 结合第一方面, 在第一方面的第四种可能的实现方式中, 若所述终端设备的近场通信控制器 NFCC可以删除路由项,则 在所述检测新接入的安全单元 SE是否为排他 SE之后, 所述方法 还包括:
检测所述终端设备中是否存在主机卡模拟器 HCE; 若所述终 端设备中不存在所述 HCE , 则在不支持设置默认路由项时, 在所 述当前路由表中增加新接入的排他 SE对应的路由项构建路由表, 若支持设置默认路由项,则构建的路由表可以包含或者不包含所述 新接入的排他 SE对应的路由项。
结合第一方面的第四种可能的实现方式,在第一方面的第五种 可能的实现方式中,
若所述终端设备中存在所述 HCE , 则检测路由表中是否包含 目标为所述 HCE 的路由项; 若所述路由表中不包含目标为所述 HCE 的路由项, 则在不支持设置默认路由项时, 在所述当前路由 表中增加所述新接入的排他 SE对应的路由项构建路由表, 若支持 设置默认路由项,则构建的路由表可以包含或者不包含所述新接入 的排他 SE对应的路由项。
结合第一方面的第五种可能的实现方式,在第一方面的第六种 可能的实现方式中,
若所述路由表中包含目标为所述 HCE 的路由项, 则在检测到 不支持设置默认路由项时, 删除所述路由表中所述 HCE和非排他 SE对应的路由项并写入所述新接入的 SE对应的路由项,构建仅包 含所述新接入的排他 SE 对应的路由项的路由表;若支持设置默认 路由项, 则构建的路由表可以包含或者不包含所述新接入的排他 SE对应的路由项。
结合第一方面的第二种可能的实现方式,在第一方面的第七种 可能的实现方式中,
所述方法还包括:
检测到有 SE被移除, 并获取当前被移除的 SE的 ID; 判断所述 SE标识符是否为所述第二数值;
若所述 SE标识符是所述第二数值, 则判断所述当前被移除的 SE的 ID与终端中记录的排他 SE的 ID是否相同;
若相同, 则 居处于连接状态的 SE对应的路由项、 所述 HCE 包含的路由信息, 构建路由表; 检测是否支持设置默认路由项, 若 支持, 则重新指定一个 SE作为所述默认路由目标 SE , 且构建的路 由表可以包含或不包含所述默认路由目标 SE对应的路由项;
获取配置成功消息, 将所述 SE标识符置为所述第一数值, 并 将所述终端中当前记录的排他 SE的 ID更新为无效。
结合第一方面的第七种可能的实现方式,在第一方面的第八种 可能的实现方式中,
所述方法还包括:
若所述 SE标识符不是所述第二数值, 则删除当前路由表中所 述当前被移除的 SE 对应的路由项,并在支持设置默认路由项时判 断所述当前被移除的 SE是否为所述默认路由目标 SE , 若是, 则重 新指定一个 SE作为所述默认路由目标 SE。
结合第一方面的第七种可能的实现方式,在第一方面的第九种 可能的实现方式中,
若所述终端设备的 NFCC可以删除路由项,则在判断所述当前 被移除的 SE的 ID与终端中记录的排他 SE的 ID相同之后 , 所述 方法还包括,
检测所述终端设备中是否存在所述 HCE;
若所述终端设备中不存在所述 HCE , 则根据处于连接状态的 SE 对应的路由项构建路由表; 检测是否支持设置默认路由项, 若 支持, 则重新指定一个 SE作为所述默认路由目标 SE , 且构建的路 由表可以包含或不包含所述默认路由目标 SE对应的路由项;
获取配置成功消息, 将所述 SE标识符置为所述第一数值, 并 将所述终端中当前记录的排他 SE的 ID更新为无效。
结合第一方面的第九种可能的实现方式,在第一方面的第十种 可能的实现方式中,
若所述终端设备中存在所述 HCE , 则检测当前路由表中是否 包含目标为所述 HCE的路由项;
若所述当前路由表中包含目标为所述 HCE 的路由项, 则根据 处于连接状态的 SE对应的路由项、所述 HCE对应的路由项构建路 由表; 检测是否支持设置默认路由项, 若支持, 则重新指定一个 SE作为所述默认路由目标 SE , 且构建的路由表可以包含或不包含 所述默认路由目标 SE对应的路由项;
获取配置成功消息, 将所述 SE标识符置为所述第一数值, 并 将所述终端中当前记录的排他 SE的 ID更新为无效。
结合第一方面的第十种可能的实现方式,在第一方面的第十一 种可能的实现方式中,
若所述当前路由表中不包含目标为所述 HCE的路由项, 则检 测所述当前路由表中是否包含任一条非排他 S E对应的路由项; 若所述当前路由表中包含任一条非排他 SE对应的路由项, 则 删除所述当前被移除的排他 SE对应的路由项构建路由表; 检测是 否支持设置默认路由项, 若支持, 则重新指定一个 SE作为所述默 认路由目标 SE , 且构建的路由表可以包含或不包含所述默认路由 目标 SE对应的路由项;
获取配置成功消息, 将所述 SE标识符置为所述第一数值, 并 将所述终端中当前记录的排他 SE的 ID更新为无效。
结合第一方面的第十一种可能的实现方式,在第一方面的第十 二种可能的实现方式中,
若所述当前路由表中不包含任一条非排他 SE对应的路由项 , 则根据处于连接状态的 SE对应的路由项、所述 HCE包含的路由信 息, 构建路由表; 检测是否支持设置默认路由项, 若支持, 则重新 指定一个 SE作为所述默认路由目标 SE,且构建的路由表可以包含 或不包含所述默认路由目标 SE对应的路由项;
获取配置成功消息, 将所述 SE标识符置为所述第一数值, 并 将所述终端中当前记录的排他 SE的 ID更新为无效。
第二方面、 公开了一种终端设备, 包括:
检测单元, 用于检测新接入的安全单元 SE是否为排他 SE; 所述检测单元还用于, 在检测到所述新接入的 SE 是排他 SE 之后, 检测是否支持设置默认路由项;
构建单元,用于在所述检测单元检测到不支持设置默认路由项 之后, 构建仅包含排他性 SE对应的路由项的路由表;
设置单元,用于在所述检测单元检测到支持设置默认路由项之 后, 将所述新接入的 SE设置为默认路由目标 SE , 且构建的路由表 可以包含或者不包含排他性 SE对应的路由项。
结合第二方面, 在第二方面的第一种可能的实现方式中, 所述 设置单元还用于:
若所述新接入的 SE不是排他 SE , 则将 SE标识符置为第一数 值; 若所述新接入的 SE是排他 SE , 则将所述 SE标识符置为第二 数值并记录所述新接入的 SE的 ID ; 所述第一数值表示终端中当前 未接入排他 SE , 所述第二数值表示终端中当前已接入排他 SE。
结合第二方面, 在第二方面的第二种可能的实现方式中, 所述 设置单元还用于:
设置所述 SE标识符; 所述 SE标识符的初始值为所述第一数 值;
贝' J , 所述终端设备还包括:
判断单元, 用于判断所述 SE标识符是否为所述第一数值; 获取单元, 用于若所述判断单元判断所述 SE标识符为第一数 值, 则获取当前路由表。
结合第二方面的第二种可能的实现方式,在第二方面的第三种 可能的实现方式中,
所述构建单元还用于 , 在所述检测单元检测到所述新接入的 SE不是排他 SE之后, 在所述当前路由表中增加所述新接入的 SE 对应的路由项, 构建路由表; 所述判断单元还用于,在所述检测单元检测到支持设置默认路 由项时, 判断是否需要重新指定所述默认路由目标 SE , 且构建的 路由表可以包含或不包含所述默认路由目标 SE对应的路由项。
结合第二方面, 在第二方面的第四种可能的实现方式中, 若所述终端设备的近场通信控制器 N F C C可以删除路由项, 所述检测单元还用于,检测所述终端设备中是否存在主机卡模 拟器 HCE;
所述构建单元还用于,若所述检测单元检测所述终端设备中不 存在所述 HCE , 则在不支持设置默认路由项时, 在所述当前路由 表中增加新接入的排他 SE对应的路由项构建路由表, 若支持设置 默认路由项,则构建的路由表可以包含或者不包含所述新接入的排 他 SE对应的路由项。
结合第二方面的第四种可能的实现方式,在第二方面的第五种 可能的实现方式中,
所述检测单元还用于,若所述检测单元检测所述终端设备中存 在所述 HCE ,则检测路由表中是否包含目标为所述 HCE的路由项; 所述构建单元还用于,若所述检测单元检测所述路由表中不包 含目标为所述 HCE 的路由项, 则在不支持设置默认路由项时, 在 所述当前路由表中增加所述新接入的排他 SE对应的路由项构建路 由表, 若支持设置默认路由项, 则构建的路由表可以包含或者不包 含所述新接入的排他 SE对应的路由项。
结合第二方面的第五种可能的实现方式,在第二方面的第六种 可能的实现方式中,
所述构建单元还用于,若所述检测单元检测所述路由表中包含 目标为所述 HCE 的路由项, 则在所述检测单元检测到不支持设置 默认路由项时,删除所述路由表中所述 HCE和非排他 SE对应的路 由项并写入所述新接入的 SE对应的路由项, 构建仅包含所述新接 入的排他 SE对应的路由项的路由表;若支持设置默认路由项, 则构 建的路由表可以包含或者不包含所述新接入的排他 SE对应的路由 项。
结合第二方面的第二种可能的实现方式,在第二方面的第七种 可能的实现方式中,
所述检测单元还用于, 检测是否有 SE被移除;
所述获取单元还用于, 在所述检测单元检测到有 SE被移除之 后, 获取当前被移除的 SE的 ID;
所述判断单元还用于, 判断所述 SE标识符是否为所述第二数 值;
所述判断单元还用于, 若所述 SE标识符是所述第二数值, 则 判断所述当前被移除的 SE的 ID与终端中记录的排他 SE的 ID是 否相同;
所述构建单元还用于,若所述判断单元判断所述当前被移除的 SE的 ID与终端中记录的排他 SE的 ID相同, 则 居处于连接状 态的 SE对应的路由项、 所述 HCE包含的路由信息, 构建路由表; 所述检测单元还用于, 检测是否支持设置默认路由项; 所述构建单元还用于,若所述检测单元检测支持设置默认路由 项, 构建包含或不包含所述默认路由目标 SE对应的路由项的路由 表;
所述设置单元还用于,在所述检测单元检测支持设置默认路由 项之后, 重新指定一个 SE作为所述默认路由目标 SE;
所述终端设备还包括获取单元, 用于获取配置成功消息; 所述设置单元还用于, 将所述 SE标识符置为所述第一数值, 并将所述终端中当前记录的排他 SE的 ID更新为无效。
结合第二方面的第七种可能的实现方式,在第二方面的第八种 可能的实现方式中,
所述构建单元还用于, 若所述判断单元判断所述 SE标识符不 是所述第二数值, 则删除当前路由表中所述当前被移除的 SE对应 的路由项;
所述判断单元还用于,在支持设置默认路由项时判断所述当前 被移除的 SE是否为所述默认路由目标 SE;
所述判断单元还用于,在判断支持设置默认路由项时判断所述 当前被移除的 SE是否为所述默认路由目标 SE;
所述设置单元还用于, 在所述判断单元判断当前被移除的 SE 为所述默认路由目标 SE之后, 重新指定一个 SE作为所述默认路 由目标 SE。
结合第二方面的第七种可能的实现方式,在第二方面的第九种 可能的实现方式中,
所述检测单元还用于, 检测所述终端设备中是否存在所述 HCE;
所述构建单元还用于, 根据处于连接状态的 SE对应的路由项 构建路由表;
所述检测单元还用于, 检测是否支持设置默认路由项; 所述设置单元还用于, 检测支持设置默认路由项之后, 重新指 定一个 SE作为所述默认路由目标 SE ,且构建的路由表可以包含或 不包含所述默认路由目标 SE对应的路由项;
所述获取单元还用于, 获取配置成功消息;
所述设置单元还用于, 将所述 SE标识符置为所述第一数值, 并将所述终端中当前记录的排他 SE的 ID更新为无效。
结合第二方面的第九种可能的实现方式,在第二方面的第十种 可能的实现方式中,
所述检测单元还用于, 若所述终端设备中存在所述 HCE , 则 检测当前路由表中是否包含目标为所述 HCE的路由项;
所述构建单元还用于,在所述检测单元检测所述当前路由表中 包含目标为所述 HCE的路由项之后,根据处于连接状态的 SE对应 的路由项、 所述 HCE对应的路由项构建路由表;
所述检测单元还用于, 检测是否支持设置默认路由项; 所述设置单元还用于,若所述检测单元检测支持设置默认路由 项, 则重新指定一个 SE作为所述默认路由目标 SE , 且构建的路由 表可以包含或不包含所述默认路由目标 SE对应的路由项; 所述获取单元还用于, 获取配置成功消息;
所述设置单元还用于, 将所述 SE标识符置为所述第一数值, 并将所述终端中当前记录的排他 SE的 ID更新为无效。
结合第二方面的第十种可能的实现方式,在第二方面的第十一 种可能的实现方式中,
所述检测单元还用于,在所述检测单元检测所述当前路由表中 不包含目标为所述 HCE 的路由项之后, 检测所述当前路由表中是 否包含任一条非排他 SE对应的路由项;
所述构建单元还用于,在所述检测单元检测所述当前路由表中 包含任一条非排他 SE对应的路由项之后, 删除所述当前被移除的 排他 SE对应的路由项构建路由表;
所述检测单元还用于, 检测是否支持设置默认路由项; 所述设置单元还用于,若所述检测单元检测支持设置默认路由 项, 则重新指定一个 SE作为所述默认路由目标 SE , 且构建的路由 表可以包含或不包含所述默认路由目标 SE对应的路由项;
所述获取单元还用于, 获取配置成功消息;
所述设置单元还用于, 将所述 SE标识符置为所述第一数值, 并将所述终端中当前记录的排他 SE的 ID更新为无效。
结合第二方面的第十一种可能的实现方式,在第二方面的第十 二种可能的实现方式中,
所述构建单元还用于,若所述当前路由表中不包含任一条非排 他 SE对应的路由项, 则 居处于连接状态的 SE对应的路由项、 所述 HCE包含的路由信息, 构建路由表;
所述检测单元还用于, 检测是否支持设置默认路由项; 所述设置单元还用于,若所述检测单元检测支持设置默认路由 项, 则重新指定一个 SE作为所述默认路由目标 SE , 且构建的路由 表可以包含或不包含所述默认路由目标 SE对应的路由项;
所述获取单元还用于, 获取配置成功消息; 所述设置单元还用于, 将所述 SE标识符置为所述第一数值, 并将所述终端中当前记录的排他 SE的 ID更新为无效。
第三方面、 公开了一种终端设备, 包括:
设备主机 DH ,用于检测新接入的安全单元 SE是否为排他 SE; 所述 DH还用于, 在检测到所述新接入的 SE是排他 SE之后, 检测是否支持设置默认路由项;
所述 DH , 用于在检测到不支持设置默认路由项之后, 构建仅 包含排他性 SE对应的路由项的路由表;
所述 DH , 用于在检测到支持设置默认路由项之后, 将所述新 接入的 SE设置为默认路由目标 SE ,且构建的路由表可以包含或者 不包含排他性 SE对应的路由项。
结合第三方面, 在第三方面的第一种可能的实现方式中, 所述 DH还用于:
若所述新接入的 SE不是排他 SE , 则将 SE标识符置为第一数 值; 若所述新接入的 SE是排他 SE , 则将所述 SE标识符置为第二 数值并记录所述新接入的 SE的 ID ; 所述第一数值表示终端中当前 未接入排他 SE , 所述第二数值表示终端中当前已接入排他 SE。
结合第三方面, 在第三方面的第二种可能的实现方式中, 所述 方法还包括:
设置所述 SE标识符; 所述 SE标识符的初始值为所述第一数 值;
所述 DH , 用于判断所述 SE标识符是否为所述第一数值; 所述 DH , 用于若判断所述 SE标识符为第一数值, 则获取当 前路由表。
结合第三方面的第二种可能的实现方式,在第三方面的第三种 可能的实现方式中,
所述 DH还用于, 在检测到所述新接入的 SE不是排他 SE之 后, 在所述当前路由表中增加所述新接入的 SE对应的路由项, 构 建路由表; 所述 DH还用于, 在检测到支持设置默认路由项时, 判断是否 需要重新指定所述默认路由目标 SE , 且构建的路由表可以包含或 不包含所述默认路由目标 SE对应的路由项。
结合第三方面, 在第三方面的第四种可能的实现方式中, 所述 DH还用于,检测所述终端设备中是否存在主机卡模拟器 HCE;
所述 DH还用于, 若检测所述终端设备中不存在所述 HCE , 则 在不支持设置默认路由项时,在所述当前路由表中增加新接入的排 他 SE对应的路由项构建路由表, 若支持设置默认路由项, 则构建 的路由表可以包含或者不包含所述新接入的排他 SE 对应的路由 项。
结合第三方面的第四种可能的实现方式,在第三方面的第五种 可能的实现方式中,
所述 DH还用于, 若检测所述终端设备中存在所述 HCE , 则检 测路由表中是否包含目标为所述 HCE的路由项;
所述 DH还用于,若检测所述路由表中不包含目标为所述 HCE 的路由项, 则在不支持设置默认路由项时, 在所述当前路由表中增 加所述新接入的排他 SE对应的路由项构建路由表, 若支持设置默 认路由项,则构建的路由表可以包含或者不包含所述新接入的排他 SE对应的路由项。
结合第三方面的第五种可能的实现方式,在第三方面的第六种 可能的实现方式中,
所述 DH 还用于, 若检测所述路由表中包含目标为所述 HCE 的路由项, 则在检测到不支持设置默认路由项时, 删除所述路由表 中所述 HCE和非排他 SE对应的路由项并写入所述新接入的 SE对 应的路由项, 构建仅包含所述新接入的排他 SE对应的路由项的路 由表;若支持设置默认路由项, 则构建的路由表可以包含或者不包 含所述新接入的排他 SE对应的路由项。
结合第三方面的第二种可能的实现方式,在第三方面的第七种 可能的实现方式中,
所述 DH还用于, 检测是否有 SE被移除;
所述 DH还用于, 在检测到有 SE被移除之后, 获取当前被移 除的 SE的 ID ;
所述 DH还用于, 判断所述 SE标识符是否为所述第二数值; 所述 DH还用于, 若所述 SE标识符是所述第二数值, 则判断 所述当前被移除的 SE的 ID与终端中记录的排他 SE的 ID是否相 同;
所述 DH还用于,若判断所述当前被移除的 SE的 ID与终端中 记录的排他 SE的 ID相同, 则根据处于连接状态的 SE对应的路由 项、 所述 HCE包含的路由信息, 构建路由表;
所述 DH还用于, 检测是否支持设置默认路由项;
所述 DH还用于, 若检测支持设置默认路由项, 构建包含或不 包含所述默认路由目标 SE对应的路由项的路由表;
所述 DH还用于, 在检测支持设置默认路由项之后, 重新指定 一个 SE作为所述默认路由目标 SE;
所述 DH还用于, 获取配置成功消息;
所述 DH还用于, 将所述 SE标识符置为所述第一数值, 并将 所述终端中当前记录的排他 SE的 ID更新为无效。
结合第三方面的第七种可能的实现方式,在第三方面的第八种 可能的实现方式中,
所述 DH还用于, 若判断所述 SE标识符不是所述第二数值, 则删除当前路由表中所述当前被移除的 SE对应的路由项;
所述 DH还用于, 在支持设置默认路由项时判断所述当前被移 除的 SE是否为所述默认路由目标 SE;
所述 DH还用于, 在判断支持设置默认路由项时判断所述当前 被移除的 SE是否为所述默认路由目标 SE;
所述 DH还用于, 在判断当前被移除的 SE为所述默认路由目 标 SE之后, 重新指定一个 SE作为所述默认路由目标 SE。 结合第三方面的第七种可能的实现方式,在第三方面的第九种 可能的实现方式中,
所述 DH用于, 检测所述终端设备中是否存在所述 HCE; 所述 DH还用于, 根据处于连接状态的 SE对应的路由项构建 路由表;
所述 DH还用于, 检测是否支持设置默认路由项;
所述 DH还用于, 检测支持设置默认路由项之后, 重新指定一 个 SE作为所述默认路由目标 SE ,且构建的路由表可以包含或不包 含所述默认路由目标 SE对应的路由项;
所述 DH还用于, 获取配置成功消息;
所述 DH还用于, 将所述 SE标识符置为所述第一数值, 并将 所述终端中当前记录的排他 SE的 ID更新为无效。
结合第三方面的第九种可能的实现方式,在第三方面的第十种 可能的实现方式中,
所述 DH用于, 若所述终端设备中存在所述 HCE , 则检测当前 路由表中是否包含目标为所述 HCE的路由项;
所述 DH 还用于, 在检测所述当前路由表中包含目标为所述 HCE的路由项之后, 根据处于连接状态的 SE对应的路由项、 所述 HCE对应的路由项构建路由表;
所述 DH还用于, 检测是否支持设置默认路由项;
所述 DH还用于, 若检测支持设置默认路由项, 则重新指定一 个 SE作为所述默认路由目标 SE ,且构建的路由表可以包含或不包 含所述默认路由目标 SE对应的路由项;
所述 DH还用于, 获取配置成功消息;
所述 DH还用于, 将所述 SE标识符置为所述第一数值, 并将 所述终端中当前记录的排他 SE的 ID更新为无效。
结合第三方面的第十种可能的实现方式,在第三方面的第十一 种可能的实现方式中,
所述 DH 用于, 在检测所述当前路由表中不包含目标为所述 HCE 的路由项之后, 检测所述当前路由表中是否包含任一条非排 他 SE对应的路由项;
所述 DH还用于, 在检测所述当前路由表中包含任一条非排他 SE对应的路由项之后,删除所述当前被移除的排他 SE对应的路由 项构建路由表;
所述 DH还用于, 检测是否支持设置默认路由项;
所述 DH还用于, 若检测支持设置默认路由项, 则重新指定一 个 SE作为所述默认路由目标 SE ,且构建的路由表可以包含或不包 含所述默认路由目标 SE对应的路由项;
所述 DH还用于, 获取配置成功消息;
所述 DH还用于, 将所述 SE标识符置为所述第一数值, 并将 所述终端中当前记录的排他 SE的 ID更新为无效。
结合第三方面的第十一种可能的实现方式,在第三方面的第十 二种可能的实现方式中,
所述 DH用于, 若所述当前路由表中不包含任一条非排他 SE 对应的路由项,则根据处于连接状态的 SE对应的路由项、所述 HCE 包含的路由信息, 构建路由表;
所述 DH还用于, 检测是否支持设置默认路由项;
所述 DH还用于, 若所述检测单元检测支持设置默认路由项, 则重新指定一个 SE作为所述默认路由目标 SE ,且构建的路由表可 以包含或不包含所述默认路由目标 SE对应的路由项;
所述 DH还用于, 获取配置成功消息;
所述 DH还用于, 将所述 SE标识符置为所述第一数值, 并将 所述终端中当前记录的排他 SE的 ID更新为无效。
本发明实施例提供的路由设置方法及终端设备,可以在终端接 入排他 SE之后,通过设置路由表终止包括 HCE在内的所有非排他 SE的运行。 与现有技术中无法通过指令终止 HCE的运行相比, 本 发明提供的方法及终端设备, 可以避免使用 HCE , 进而保证了新 接入的排他 SE的正常运行。 附图说明
图 1为本发明实施例 1提供的路由设置方法的流程示意图; 图 2 为本发明实施例 2 提供的一种路由设置方法的流程示意 图;
图 3 为本发明实施例 3 提供的一种路由设置方法的流程示意 图;
图 4 为本发明实施例 4 提供的一种路由设置方法的流程示意 图;
图 5 为本发明实施例 5 提供的一种路由设置方法的流程示意 图;
图 6为本发明实施例 6提供的终端设备的结构框图;
图 7为本发明实施例 7提供的终端设备的结构框图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术 方案进行清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明 一部分实施例, 而不是全部的实施例。 基于本发明中的实施例, 本 领域普通技术人员在没有做出创造性劳动前提下所获得的所有其 他实施例, 都属于本发明保护的范围。
SE 可以为终端的移动支付提供安全可靠的环境来。 因此, 终 端只要掌握了 SE的控制权, 就掌握了移动支付应用安装到终端的 入口。 运营商希望终端厂商可以提供技术方案, 使得运营商发布的 包含 SE的 UICC卡装到终端上之后 , 只允许 UICC卡上的 SE正常 工作, 其他介质上的非移动运营商控制的 SE都要被屏蔽掉。 可以 将 UICC卡上的 SE称为排他 SE , 将其他介质上的非移动运营商控 制的 SE称为非排他 SE。 这样, 当 UICC卡装到终端上之后, 终端 需要终止非排他 SE 的运行, 保证排他 SE 的正常运行。 另外, 当 前终端还可以通过软件模拟实现 HCE,对于终端当前安装的 UICC 卡而言所述 HCE为非排他, 终端需要在 UICC卡上的 SE接入之后 终止所述 HCE的运行。 另外, 有些 NFC路由机制中还支持一种默 认路由的设置, 系统中同时只能配置一个 SE/HCE为默认路由目标 SE。 其技术思想是, 所有经过处理后, 无法找到匹配处理项的路 由请求, 都会转交给这个默认路由目标 SE/HCE来处理。 因此, 在 构建路由表时,终端可以在路由表中包括或者不包括默认路由目标 SE/HCE所对应的路由项。
实施例 1 :
本发明实施例提供了一种路由设置方法, 如图 1所示, 所述方 法包括以下步骤:
101、 检测新接入的安全单元 SE是否为排他 SE。
宏观上终端包括 DH ( Device Host , 设备主机)、 NFCC 以及 CPU ( Central Processing Unit,中央处理器), 其中, NFCC可能具 备删除路由项的能力, 也可能不能删除路由项。 当终端中新接入一 个 SE时, DH需要判断新接入的 SE是排他 SE还是非排他 SE,如 果新接入的 SE是排他 SE , 则需进行步骤 102。
另外, 若终端设备的 DH设置了 SE标识符。 其中, 所述 SE 标识符的初始值为所述第一数值。 则, 在所述检测新接入的 SE是 否为排他 SE之前, 还可以判断所述 SE标识符是否为所述第一数 值; 若所述 SE标识符为第一数值, 则获取当前路由表。 所述第一 数值表示终端中当前未接入排他 SE。 若终端设备的 DH检测到所 述 SE标识符为第二数值, 则并不必做配置处理, 不改变当前路由 表。 其中, 所述第二数值表示终端中当前已接入排他 SE。 这是因 为, 根据运营商的商业需求终端设备中通常只允许保障一个排他 SE的正常运行。也就是说,当前终端设备已接入排他 SE的情况下, 无论新接入的 SE是否为排他 SE , 都不做配置处理。
若终端设备的 DH检测到所述新接入的 SE不是排他 SE, 则将 SE标识符置为第一数值; 若所述新接入的 SE是排他 SE , 终端设 备的 DH 将所述 SE标识符置为第二数值并记录所述新接入的 SE 的 ID。 这里记录新接入的 SE的 ID作为终端中当前接入的排他 SE 的 ID , 是为了在移除 SE 时判断终端中当前是否接入了排他 SE , 进而做出相应的配置处理, 节省系统开销。
若终端设备的 DH检测到所述新接入的 SE不是排他 SE, 则在 所述当前路由表中增加所述新接入的 SE对应的路由项, 构建路由 表。 在支持设置默认路由项时, 判断是否需要重新指定所述默认路 由目标 SE , 且构建的路由表可以包含或不包含所述默认路由目标 SE对应的路由项。
终端设备的 DH和 NFCC中, DH始终是可以通过构建新路由 表的方式来删除特定路由项的, NFCC可能具备或者不具备删除路 由表的能力。 因此, 需要对 NFCC能够删除路由表, 或者不能够删 除路由表的情况进行区分。
若所述终端的 NFCC可以删除路由表, 则在终端设备的 DH检 测到所述检测新接入的安全单元 SE是否为排他 SE之后, 还需要 检测所述终端设备中是否存在主机卡模拟器 HCE。 若所述终端设 备中不存在所述 HCE , 则在不支持设置默认路由项时, 在所述当 前路由表中增加新接入的排他 SE对应的路由项构建路由表, 若支 持设置默认路由项,则构建的路由表可以包含或者不包含所述新接 入的排他 SE对应的路由项。 这里, 在检测到终端中存在 HCE之后 还需要检测路由表中是否包含 HCE对应的路由项, 是由于如果终 端中存在 HCE但是路由表中却没有 HCE对应的路由项, HCE是无 法被运行的。 这样, 终端在接入排他 SE之后, 通过 SE设置指令 去激活非排他 SE , 激活排他 SE , 进而保证排他 SE的正常运行。
若所述终端设备中存在所述 HCE , 则检测路由表中是否包含 目标为所述 HCE 的路由项; 若所述路由表中不包含目标为所述 HCE 的路由项, 则在不支持设置默认路由项时, 在所述当前路由 表中增加所述新接入的排他 SE对应的路由项构建路由表, 若支持 设置默认路由项,则构建的路由表可以包含或者不包含所述新接入 的排他 SE对应的路由项。
若所述路由表中包含目标为所述 HCE 的路由项, 则在检测到 不支持设置默认路由项时, 删除所述路由表中所述 HCE和非排他 SE对应的路由项并写入所述新接入的 SE对应的路由项,构建仅包 含所述新接入的排他 SE 对应的路由项的路由表;若支持设置默认 路由项, 则构建的路由表可以包含或者不包含所述新接入的排他 SE对应的路由项。
102、 检测是否支持设置默认路由项。
终端是否支持默认路由设置, 决定了终端在构建路由表时, 可 以在路由表中包括或者不包括默认路由目标 SE/HCE 所对应的路 由项。 因此需要对终端是否具有默认路由项设置的能力进行检测。
103、 构建仅包含排他性 SE对应的路由项的路由表。
这里是终端设备的 DH根据新接入的排他 SE构建仅包含排他 SE 对应的路由项的路由表。 需要说明的是, 这里的路由表与之前 在所述当前路由表中增加所述新接入的排他 SE对应的路由项构建 路由表是不同的两种路由设置。之后的实施例中会做细致的区分说 明。
这里, 由于终端不支持设置默认路由项, 则无法找到匹配处理 项的路由请求就无法通过默认路由项目标 SE的处理得以解决, 因 此这是构建的路由表中就不能包含其他非排他 SE对应的路由项, 仅包含排他 SE的路由项。
这里, "构建"一词不应理解为仅包括建立, 还可以包括修改。
104、 将所述新接入的 SE设置为默认路由目标 SE , 且构建的 路由表可以包含或者不包含排他性 SE对应的路由项。
另外, 由于 NFC路由机制中还支持一种默认路由的设置, 所 有经过处理后, 无法找到匹配处理项的路由请求, 都会转交给这个 默认路由目标 SE/HCE来处理。 这里, 可以将新接入排他 SE设置 成默认路由项目标 SE ,通过默认路由来处理新接的 SE请求。因此, 在构建路由表时,终端可以在路由表中包括或者不包括默认路由目 标 SE/HCE所对应的路由项。 实际上, 在步骤 104之后路由表可以 是空的, 这是因为新接入的排他 SE被作为默认路由来处理, 因此 路由表中可以不包含任何路由项。 本发明还提供了一种路由设置方法, 还可以在移除 SE时, 根 据终端中当前是否存在排他 SE , 正确配置路由。
A l、 检测到有 SE被移除, 并获取当前被移除的 SE的 ID。 具体的, 终端设备的 DH (或 NFCC )检测到有 SE被移除。 之 后终端设备的 DH通过接收终端设备的 NFCC发来的指令来获取当 前被移除的 SE 的 ID。 具体实现中 , DH 从 NFCC 发来的 NFCEE_DISCOVER_NTF(近场通信发现消息)中 , 获取 NFCEE Status (近场通信状态值 ) 值为 0x02的 SE所对应的 ID (即当前被 移除的 SE的 NFCEE ID)。
A2、 判断所述 SE标识符是否为所述第二数值。
终端设备的 DH判断当前的 SE标识符是否是第二数值, 这是 由于, 终端中是否已接入排他 SE影响了移除 SE 时的路由配置。 加以区分则可以正确配置路由表, 终端设备的 DH不用在每次移除 SE时都重置路由表, 大大节省系统开销。
具体地, 在新接入排他 SE时, 需要将当前的路由表清空只写 入该排他 SE 的路由项, 因此, 移除该排他 SE 时需要将之前被终 止运行的非排他 SE的路由项重新写入路由表。在新接入非排他 SE 时, 不用清空路由表直接写入该非排他 SE的路由项, 移除时也只 需将该非排他 SE的路由项删除即可。 由于终端无法识别当前是否 已接入排他 SE ,也就无法判定当前路由表是仅包括排他 SE的路由 项还是包括各非排他 SE 的路由项, 因此每移除一个 SE 时, 终端 都会将路由表清空, 重新写入各非排他 SE的路由项, 导致终端系 统开销较大。
A3、 若所述 SE标识符是所述第二数值, 则判断所述当前被移 除的 SE的 ID与终端中记录的排他 SE的 ID是否相同。
若所述 SE标识符不是所述第二数值, 则删除当前路由表中所 述当前被移除的 SE 对应的路由项,并在支持设置默认路由项时判 断所述当前被移除的 SE是否为所述默认路由目标 SE , 若是, 则重 新指定一个 SE作为所述默认路由目标 SE。 A4、 若相同, 则 居处于连接状态的 SE对应的路由项、 所述 HCE 包含的路由信息, 构建路由表; 检测是否支持设置默认路由 项, 若支持, 则重新指定一个 SE作为所述默认路由目标 SE , 且构 建的路由表可以包含或不包含所述默认路由 目标 SE 对应的路由 项。
A5、获取配置成功消息,将所述 SE标识符置为所述第一数值, 并将所述终端中当前记录的排他 SE的 ID更新为无效。
由于 NFCC可能具备或者不具备删除路由表的能力。 因此, 需 要对 NFCC能够删除路由表,或者不能够删除路由表的情况进行区 分。 以便所述终端设备正确构建路由表。 例如, 若所述 NFCC可能 具备删除路由表的能力, 终端就需要检测是否存在 HCE , 移除 SE 之后就需要在存在 HCE的情况下重新写入目标为所述 HCE的路由 项。
具体地, 若所述终端设备的 NFCC可以删除路由项, 则在判断 所述当前被移除的 SE的 ID与终端中记录的排他 SE的 ID相同之 后, 还需要检测所述终端设备中是否存在所述 HCE。
若所述终端设备中不存在所述 HCE , 则根据处于连接状态的 SE 对应的路由项构建路由表; 检测是否支持设置默认路由项, 若 支持, 则重新指定一个 SE作为所述默认路由目标 SE , 且构建的路 由表可以包含或不包含所述默认路由目标 SE对应的路由项。 之后 获取配置成功消息, 将所述 SE标识符置为所述第一数值, 并将所 述终端中当前记录的排他 SE的 ID更新为无效。 另外, 生成 SE模 式设置指令, 根据所述 SE模式设置指令激活或者去激活 SE。
另一方面, 若所述终端设备中存在所述 HCE , 则检测当前路 由表中是否包含目标为所述 HCE 的路由项; 若所述当前路由表中 包含目标为所述 HCE的路由项,则根据处于连接状态的 SE对应的 路由项构建路由表; 检测是否支持设置默认路由项, 若支持, 则重 新指定一个 SE作为所述默认路由目标 SE ,且构建的路由表可以包 含或不包含所述默认路由目标 SE对应的路由项。 获取配置成功消 息, 将所述 SE标识符置为所述第一数值, 并将所述终端中当前记 录的排他 SE的 ID更新为无效。
若所述当前路由表中不包含目标为所述 HCE的路由项, 则检 测所述当前路由表中是否包含任一条非排他 SE对应的路由项; 若 所述当前路由表中包含任一条非排他 SE对应的路由项, 则根据处 于连接状态的 SE对应的路由项构建路由表; 检测是否支持设置默 认路由项,若支持,则重新指定一个 SE作为所述默认路由目标 SE , 且构建的路由表可以包含或不包含所述默认路由目标 SE对应的路 由项; 获取配置成功消息, 将所述 SE标识符置为所述第一数值, 并将所述终端中当前记录的排他 SE的 ID更新为无效。
若所述当前路由表中不包含任一条非排他 SE对应的路由项 , 则根据处于连接状态的 SE对应的路由项、所述 HCE包含的路由信 息, 构建路由表; 检测是否支持设置默认路由项, 若支持, 则重新 指定一个 SE作为所述默认路由目标 SE,且构建的路由表可以包含 或不包含所述默认路由目标 SE对应的路由项;获取配置成功消息, 将所述 SE标识符置为所述第一数值, 并将所述终端中当前记录的 排他 SE的 ID更新为无效。
本发明实施例提供的路由设置方法及终端设备,可以在终端接 入排他 SE之后,通过设置路由表终止包括 HCE在内的所有非排他 SE的运行。 与现有技术中无法通过指令终止 HCE的运行相比, 本 发明提供的方法及终端设备, 可以避免使用 HCE , 进而保证了新 接入的排他 SE的正常运行。
实施例 2:
本发明实施例提供了一种路由设置方法,应用于 NFCC具备删 除路由表能力的终端设备, 如图 2所示, 所述方法包括以下步骤: 201、 设置所述 SE标识符; 所述 SE标识符的初始值为所述第 一数值。
宏观上终端包括 DH和 NFCC , 其中, NFCC可能具备删除路 由项的能力, 也可能不能删除路由项。 终端设备的 DH设置所述 SE标识符。 初始时, 终端中没有接 入排他 SE , 用第一数值表示该状态。 所述 SE标识符的取值可以为 第一数值或第二数值, 所述第一数值表示终端中当前未接入排他 SE , 所述第一数值表示终端中当前已接入排他 SE。 具体地, 在 DH 中增加一个 Flag标记, 初始值为 0 , 0表示为假(终端中当前没有 接入排他 SE) , 1表示为真 (终端中当前已接入排他 SE )。
202、 判断所述 SE标识符是否为所述第一数值.
在所述 SE 标识符为第一数值时, 获取当前路由表。 所述 SE 标识符为第二数值时不必做配置处理。
终端设备的 DH判断当前的 SE标识符是否是第二数值, 这是 由于, 终端中是否已接入排他 SE影响了移除 SE 时的路由配置。 加以区分则可以正确配置路由表, 终端设备的 DH不用在每次移除 SE时都重置路由表, 大大节省系统开销。 在新接入排他 SE时, 需 要将当前的路由表清空只写入该排他 SE的路由项, 因此, 移除该 排他 SE 时需要将之前被终止运行的非排他 SE 的路由项重新写入 路由表。 在新接入非排他 SE时, 不用清空路由表直接写入该非排 他 SE的路由项, 移除时也只需将该非排他 SE的路由项删除即可。 由于终端无法识别当前是否已接入排他 SE , 也就无法判定当前路 由表是仅包括排他 SE 的路由项还是包括各非排他 SE 的路由项, 因此每移除一个 SE时, 终端都会将路由表清空, 重新写入各非排 他 SE的路由项, 导致终端系统开销较大。
具体地, DH在判断 SE状态标识符为所述第一数值后向 NFCC 发送 RF_GET_LISTEN_MODE_ROUTING_CMD , 获取当前的路由 表 RT01。或者 DH本身备份最近一次配置给 NFCC的路由表 RT0
203 检测新接入的安全单元 SE是否为排他 SE。
若接入的安全单元 SE不是排他 SE , 则进行步骤 204; 若新接 入的安全单元 SE是排他 SE , 则进行步骤 205。
具体实现中 , 由终端设备的 DH判断新接入的安全单元 SE是 否为排他 SE。 204、 将 SE 标识符置为第一数值, 在所述当前路由表中增加 所述新接入的 SE对应的路由项, 构建路由表; 在支持设置默认路 由项时, 判断是否需要重新指定所述默认路由目标 SE , 且构建的 路由表可以包含或不包含所述默认路由目标 SE对应的路由项。
终端设备的 DH将 SE标识符置为第一数值, 在获取的路由表 RT01 内容的基础上, 增加新接入 SE所对应的合法路由项, 构成新 路由表 RT02。 如果终端设备的 NFCC支持设置默认路由项, 则判 断是否需要重新指定新的默认路由目标。 且 RT02可以包含或不包 含默认路由目标(在终端设备支持默认路由设置)对应的路由项。
DH向 NFCC发送 RF_SET_LISTEN_MODE_ROUTING_CMD, 将路由表 RT02配置给 NFCC ; 如果 NFCC支持对默认路由目标的 设置, 且更新了默认路由 目标, 则同时指定新的默认路由 目标。 DH向 NFCC发送 NFCEE_MODE_SET_CMD , 去激活除 HCE夕卜, 当前所有激活状态的非排他 SE , 同时激活排他 SE。需要说明的是, 以上 DH配置路由表、 去激活 /激活 SE的操作不分先后顺序, 本发 明实施例对此不 限定。
205 将 SE 标识符置为第二数值, 检测所述终端设备中是否 存在主机卡模拟器 HCE。
若所述终端设备中不存在主机卡模拟器 HCE , 则进行步骤 206。 若所述终端设备中存在主机卡模拟器 HCE , 则进行步骤 207。
具体实现中, 终端设备的 DH检测系统中是否存在主机卡模拟 器 HCE。
206、 在所述当前路由表中增加新接入的排他 SE 对应的路由 项构建路由表, 若支持设置默认路由项, 则构建的路由表可以包含 或者不包含所述新接入的排他 SE对应的路由项。
具体地, 如果 NFCC 不支持对默认路由的设置, 则在路由表 RT01 内容的基础上, 增加包含排他性 SE中所对应的路由项, 构成 新路由表 RT03。 如果 NFCC支持对默认路由目标的设置, 则 RT03 可以包含或者不包含排他性 SE中所对应的路由项。 之后, DH与 NFCC之间的交互包括: 一、 DH向 NFCC发送 RF_SET_LISTEN_MODE_ROUTING_CMD, 将上述路由表配置给 NFCC ; 如果 NFCC支持对默认路由目标的设置, 则同时将默认路 由目标设置为排他性 SE 。
二、 在 DH收到 RSP , 则 DH置 Flag值为 1 , 记录排他性 SE 的 NFCEE ID : PT_SE_ID 。 DH 向 NFCC 发 送 NFCEE_MODE_SET_CMD , 去激活除 HCE夕卜, 当前所有激活状态 的非排他 SE , 同时激活排他 SE。
需要说明的是, 步骤一、 二不分先后, 本发明实施例对此不做 限定。
207 检测路由表中是否包含目标为所述 HCE的路由项。
若路由表中不包含目标为所述 HCE 的路由项, 则进行步骤 208。 若路由表中不包含目标为所述 HCE 的路由项, 则进行步骤 209。
具体实现中, 终端设备的 DH检测系统中是否有可以写入的路 由表, 且路由目标为 HCE的路由信息。
208 在不支持设置默认路由项时, 在所述当前路由表中增加 所述新接入的排他 SE对应的路由项构建路由表, 若支持设置默认 路由项, 则构建的路由表可以包含或者不包含所述新接入的排他 SE对应的路由项。
具体地, 如果 NFCC 不支持对默认路由的设置, 则在路由表 RT01 内容的基础上, 增加包含排他性 SE中所对应的路由项, 构成 新路由表 RT03。 如果 NFCC支持对默认路由目标的设置, 则 RT03 可以包含或者不包含排他性 SE中所对应的路由项。
之后, DH与 NFCC之间的交互包括: 一、 DH向 NFCC发送 RF_SET_LISTEN_MODE_ROUTING_CMD, 将上述路由表配置给 NFCC ; 如果 NFCC支持对默认路由目标的设置, 则同时将默认路 由目标设置为排他性 SE 。
二、 在 DH收到 RSP , 则 DH置 Flag值为 1 , 记录排他性 SE 的 NFCEE ID : PT_SE_ID 。 DH 向 NFCC 发 送 NFCEE_MODE_SET_CMD , 去激活除 HCE夕卜, 当前所有激活状态 的非排他 SE , 同时激活排他 SE。
需要说明的是, 步骤一、 二不分先后, 本发明实施例对此不做 限定。
209 在检测到不支持设置默认路由项时, 删除所述路由表中 所述 HCE和非排他 SE对应的路由项并写入所述新接入的 SE对应 的路由项, 构建仅包含所述新接入的排他 SE对应的路由项的路由 表;若支持设置默认路由项, 则构建的路由表可以包含或者不包含 所述新接入的排他 SE对应的路由项。
具体实现中, 如果 NFCC不支持对默认路由的设置, NFCC删 除所述路由表中所述 HCE和非排他 SE对应的路由项并写入所述新 接入的 SE对应的路由项, 构建仅包含排他性 SE 中所对应的路由 项 RT04;如果 NFCC 支持对默认路由目标的设置, RT03 可以包含 或者不包含排他性 SE中对应的路由项。
DH向 NFCC发送 RF_SET_LISTEN_MODE_ROUTING_CMD, 将上述路由表配置给 NFCC; 如果 NFCC支持对默认路由目标的设 置, 则同时将默认路由目标设置为排他性 SE 。 再次, 在 DH收到 RSP (配置成功消息) 之后, 将 Flag (即本发明实施例所述 SE标 识符) 置为 1 , 记录排他性 SE的 ID : PT_SE_ID。 DH向 NFCC发 送 NFCEE_MODE_SET_CMD , 去激活除 HCE夕卜, 当前所有激活状 态的非排他 SE , 同时激活排他 SE。 需要说明的是, 这两个步骤不 分先后, 本发明实施里对此不做限定。
本发明实施例提供的路由设置方法及终端设备,可以在终端接 入排他 SE之后,通过设置路由表终止包括 HCE在内的所有非排他 SE的运行。 与现有技术中无法通过指令终止 HCE的运行相比, 本 发明提供的方法及终端设备, 可以避免使用 HCE , 进而保证了新 接入的排他 SE的正常运行。
实施例 3 : 本发明实施例提供了一种路由设置方法,应用于 NFCC具备删 除路由表能力的终端设备, 如图 3所示, 所述方法包括以下步骤:
301、 检测到有 SE被移除, 并获取当前被移除的 SE的 ID。 需要说明的是,终端设备的 DH或 NFCC均可以检测到是否有
SE 被 移 除 。 具 体 实 现 中 , DH 从 NFCC 发 来 的 NFCEE_DISCOVER_NTF 中, 获取 NFCEE Status值为 0x02的 SE 所对应的 NFCEE ID (即当前被移除的 SE的 NFCEE ID)。
302、 判断所述 SE标识符是否为所述第二数值。
若所述 SE标识符是为所述第二数值, 则进行步骤 303。 若所 述 SE标识符不是为所述第二数值, 则进行步骤 304。
303、 删除当前路由表中所述当前被移除的 SE对应的路由项, 并在支持设置默认路由项时判断所述当前被移除的 S E是否为所述 默认路由目标 SE , 若是, 则重新指定一个 SE作为所述默认路由目 标 SE。
具体地, NFCC删除此 SE对应的路由项。 如果 NFCC支持设 置默认路由项, 则 DH判断此被移除的 SE是否是当前的默认路由 项目标 SE , 如果是, 则重新指定一个 SE作为默认路由项目标 SE , 并配置到 NFCC。
304、判断所述当前被移除的 SE的 ID与终端中记录的排他 SE 的 ID是否相同。
若不相同, 则不必做配置处理。 若相同, 则进行步骤 305。 实现中 , DH 判断被移除 SE 的 NFCEE ID 是否等于 PT_SE_ID (终端中当前记录的排他 SE的 ID)。 由于通常情况下, 终 端中只能保障一个排他 SE 的运行, 因此通过判断被移除 SE 的 NFCEE ID是否等于 PT_SE_ID , 就可以判断出当前移除 SE是否是 排他性 SE。 若相同, 则证明当前移除 SE是排他性 SE。
305、 检测所述终端设备中是否存在所述 HCE。
若不存在, 则进行步骤 306。 若存在, 则进行步骤 307。
终端设备的 DH检测系统服务注册, 判断是否存在 HCE。 306、 根据处于连接状态的 SE 对应的路由项构建路由表; 检 测是否支持设置默认路由项, 若支持, 则重新指定一个 SE作为所 述默认路由目标 SE , 且构建的路由表可以包含或不包含所述默认 路由目标 SE对应的路由项。
具体地, 如果 NFCC支持对默认路由目标的设置, 则 DH同时 选择并设置新的默认路由目标。 NFCC删除排他 SE对应的路由项。 DH向 NFCC发送 NFCEE_MODE_SET_CMD指令, 根据需要, 激 活部分 /全部非排他 SE。 DH 收到反馈配置成功的 RSP (配置成功 消息) 后, 将 Flag值置为 0 , 将 PT_SE_ID值置为 N/A (即本发明 实施例中所述将所述 SE标识符置为所述第一数值, 并将所述终端 中当前记录的排他 SE的 ID更新为无效)。
307 检测当前路由表中是否包含目标为所述 HCE的路由项。 若包含, 则进行步骤 308。 若不包含, 则进行步骤 309。
308、 居处于连接状态的 SE对应的路由项、 所述 HCE对应 的路由项构建路由表; 检测是否支持设置默认路由项, 若支持, 则 重新指定一个 SE作为所述默认路由目标 SE ,且构建的路由表可以 包含或不包含所述默认路由目标 SE对应的路由项。
在此之后, 获取配置成功消息, 将所述 SE标识符置为所述第 一数值, 并将所述终端中当前记录的排他 SE的 ID更新为无效。
具体地, DH根据处于连接状态的 SE及 HCE所包含的路由信 息, 构建路由表 RT05。 若 NFCC 支持默认路由, 则重选一个 SE 作为所述默认路由目标 SE , 且 RT05 中可包含 /不包含其路由。
DH向 NFCC发送 RF_SET_LISTEN_MODE_ROUTING_CMD, 将上述路由表配置给 NFCC。 如果 NFCC支持对默认路由目标的设 置 , 则 同 时设置新 的 默认路由 目 标 。 DH 向 NFCC 发送 NFCEE_MODE_SET_CMD , 根据需求激活部分 /全部非排他 SE。 DH收到反馈配置成功的 RSP后, 将 Flag值置为 0 , 将 PT_SE_ID 值置为 N/A( 即本发明实施例中所述将所述终端设备当前记录的排 他 SE的 ID更新为无效)。 309、 检测所述当前路由表中是否包含任一条非排他 SE 对应 的路由项。
若包含, 则进行步骤 310; 若不包含, 则进行步骤 308。
3 10、 删除所述当前被移除的排他 SE 对应的路由项构建路由 表; 检测是否支持设置默认路由项, 若支持, 则重新指定一个 SE 作为所述默认路由目标 SE , 且构建的路由表可以包含或不包含所 述默认路由目标 SE对应的路由项。
获取配置成功消息, 将所述 SE标识符置为所述第一数值, 并 将所述终端中当前记录的排他 SE的 ID更新为无效。
具体地, 如果 NFCC支持对默认路由目标的设置, 则 DH同时 选择并设置新的默认路由目标。 NFCC删除排他 SE对应的路由项。 DH向 NFCC发送 NFCEE_MODE_SET_CMD指令, 根据需要, 激 活部分 /全部非排他 SE。 DH收到反馈配置成功的 RSP后, 将 Flag 值置为 0 , 将 PT_SE_ID值置为 N/A。
本发明实施例提供的路由设置方法, 可以在终端接入排他 SE 之后,通过设置路由表终止包括 H C E在内的所有非排他 S E的运行。 与现有技术中无法通过指令终止 HCE 的运行相比, 本发明提供的 方法及终端设备, 可以避免使用 HCE , 进而保证了新接入的排他 SE的正常运行。
实施例 4:
本发明实施例提供了一种路由设置方法,应用于 NFCC不具备 删除路由表能力的终端设备,如图 4所示,所述方法包括以下步骤: 401、 设置所述 SE标识符; 所述 SE标识符的初始值为所述第 一数值。
宏观上终端包括 DH和 NFCC , 其中, NFCC可能具备删除路 由项的能力, 也可能不能删除路由项。 本实施例, 规定 NFCC不具 备删除路由项的能力。
终端设备的 DH设置所述 SE标识符。 初始时, 终端中没有接 入排他 SE , 用第一数值表示该状态。 所述 SE标识符的取值可以为 第一数值或第二数值, 所述第一数值表示终端中当前未接入排他
SE , 所述第一数值表示终端中当前已接入排他 SE。 具体地, 在 DH 中增加一个 Flag标记, 初始值为 0 , 0表示为假(终端中当前没有 接入排他 SE) , 1表示为真 (终端中当前已接入排他 SE )。
402、 判断所述 SE标识符是否为所述第一数值。
在所述 SE标识符为第一数值时, 获取当前路由表。
终端设备的 DH判断当前的 SE标识符是否是第二数值, 这是 由于, 终端中是否已接入排他 SE影响了移除 SE 时的路由配置。 加以区分则可以正确配置路由表, 终端设备的 DH不用在每次移除 SE时都重置路由表, 大大节省系统开销。 在新接入排他 SE时, 需 要将当前的路由表清空只写入该排他 SE的路由项, 因此, 移除该 排他 SE 时需要将之前被终止运行的非排他 SE 的路由项重新写入 路由表。 在新接入非排他 SE时, 不用清空路由表直接写入该非排 他 SE的路由项, 移除时也只需将该非排他 SE的路由项删除即可。 由于终端无法识别当前是否已接入排他 SE , 也就无法判定当前路 由表是仅包括排他 SE 的路由项还是包括各非排他 SE 的路由项, 因此每移除一个 SE时, 终端都会将路由表清空, 重新写入各非排 他 SE的路由项, 导致终端系统开销较大。
具体地, DH在判断 SE状态标识符为所述第一数值后向 NFCC 发送 RF_GET_LISTEN_MODE_ROUTING_CMD , 获取当前的路由 表 RT01。或者 DH本身备份最近一次配置给 NFCC的路由表 RT0 403 检测新接入的安全单元 SE是否为排他 SE。
若接入的安全单元 SE不是排他 SE , 则进行步骤 404; 若新接 入的安全单元 SE是排他 SE , 则进行步骤 405。
具体实现中 , 由终端设备的 DH判断新接入的安全单元 SE是 否为排他 SE。
404、 将 SE 标识符置为第一数值, 在所述当前路由表中增加 所述新接入的 SE对应的路由项, 构建路由表; 在支持设置默认路 由项时, 判断是否需要重新指定所述默认路由目标 SE , 且构建的 路由表可以包含或不包含所述默认路由目标 SE对应的路由项。 终端设备的 DH将 SE标识符置为第一数值, 在获取的路由表 RT01 内容的基础上, 增加新接入 SE所对应的合法路由项, 构成新 路由表 RT02。 如果终端设备的 NFCC支持设置默认路由项, 则判 断是否需要重新指定新的默认路由目标。 且 RT02可以包含或不包 含默认路由目标(在终端设备支持默认路由设置)对应的路由项。
DH向 NFCC发送 RF_SET_LISTEN_MODE_ROUTING_CMD, 将路由表 RT02配置给 NFCC ; 如果 NFCC支持对默认路由目标的 设置, 且更新了默认路由 目标, 则同时指定新的默认路由 目标。 DH向 NFCC发送 NFCEE_MODE_SET_CMD , 去激活除 HCE夕卜, 当前所有激活状态的非排他 SE , 同时激活排他 SE。需要说明的是, 以上 DH配置路由表、 去激活 /激活 SE的操作不分先后顺序, 本发 明实施例对此不 限定。
405 检测是否支持设置默认路由项。
若不支持, 则进行步骤 406 ; 若支持, 则进行步骤 407。
406、 构建仅包含排他性 SE对应的路由项的路由表。
终端设备的 DH构建新的路由表, 其中仅配置属于排他 SE中 应用所对应的路由项,不包括属于其他 SE及 HCE中应用所对应的 路由项。
DH向 NFCC发送 RF_SET_LISTEN_MODE_ROUTING_CMD, 将上述路由表配置给 NFCC; 如果 NFCC支持对默认路由目标的设 置, 则同时将默认路由目标设置为排他性 SE 。 在 DH收到 RSP , 则 DH置 Flag值为 1 , 记录 4非他性 SE的 NFCEE ID : PT_SE_ID。 DH向 NFCC发送 NFCEE_MODE_SET_CMD , 去激活除 HCE夕卜, 当前所有激活状态的非排他 SE , 同时激活排他 SE。
407、 将所述新接入的 SE设置为默认路由目标 SE , 且构建的 路由表可以包含或者不包含排他性 SE对应的路由项。
具体地, DH构建新的路由表, 其中仅配置属于排他 SE 中应 用所对应的路由项, 或者不包含任何路由项。 将默认路由目标设置 为排他性 SE。
DH向 NFCC发送 RF_SET_LISTEN_MODE_ROUTING_CMD, 将上述路由表配置给 NFCC; 如果 NFCC支持对默认路由目标的设 置, 则同时将默认路由目标设置为排他性 SE 。 在 DH收到 RSP , 则 DH置 Flag值为 1 , 记录 4非他性 SE的 NFCEE ID : PT_SE_ID。 DH向 NFCC发送 NFCEE_MODE_SET_CMD , 去激活除 HCE夕卜, 当前所有激活状态的非排他 SE , 同时激活排他 SE。
本发明实施例提供的路由设置方法及终端设备,可以在终端接 入排他 SE之后,通过设置路由表终止包括 HCE在内的所有非排他 SE的运行。 与现有技术中无法通过指令终止 HCE的运行相比, 本 发明提供的方法及终端设备, 可以避免使用 HCE , 进而保证了新 接入的排他 SE的正常运行。
实施例 5 :
本发明实施例提供了一种路由设置方法,应用于 NFCC不具备 删除路由表能力的终端设备,如图 5所示,所述方法包括以下步骤:
501、 检测到有 SE被移除, 并获取当前被移除的 SE的 ID。 终端设备的 DH或 NFCC检测到有 SE被移除 ,则 DH从 NFCC 发来的 NFCEE_DISCOVER_NTF中 , 获取 NFCEE Status值为 0x02 的 SE所对应的 ID (即当前被移除的 SE的 NFCEE ID)。
502、 判断所述 SE标识符是否为所述第二数值。
若不是, 则进行步骤 503 ; 若是, 则进行步骤 504。
终端设备的 DH 判断被移除 SE 的 NFCEE ID 是否等于 PT_SE_ID。
503、 删除当前路由表中所述当前被移除的 SE对应的路由项, 并在支持设置默认路由项时判断所述当前被移除的 S E是否为所述 默认路由目标 SE , 若是, 则重新指定一个 SE作为所述默认路由目 标 SE。
不同于实施例 4中在此删除路由的实现方式 , 这里 DH删除路 由表中此 SE对应的路由项, 构建新的路由表, 并配置到 NFCC ; 如果 NFCC支持默认路由 SE设置, 则判断是否需要重新设置默认 路由 SE ,且新的路由表中可以包含或者不包含默认路由 SE对应的 路由项。
504、判断所述当前被移除的 SE的 ID与终端中记录的排他 SE 的 ID是否相同。
若相同, 则不必做配置处理; 若不同, 则进行步骤 505。
505、 检测是否支持设置默认路由项。
若支持, 则进行步骤 507 ; 若不支持则进行步骤 506。
506、 根据处于连接状态的 SE对应的路由项、 所述 HCE包含 的路由信息, 构建路由表。
实现中, DH根据仍处于连接状态的 SE及 HCE所包含的路由 信息, 构建路由表, 包括处于连接状态的 SE及 HCE对应的路由信
DH向 NFCC发送 RF_SET_LISTEN_MODE_ROUTING_CMD, 将构建的路由表配置给 NFCC; 如果 NFCC支持对默认路由目标的 设置, 同 时另外设置一个默认路由 目 标。 DH 向 NFCC 发送 NFCEE_MODE_SET_CMD , 根据需求激活部分 /全部非排他 SE。
507、 则重新指定一个 SE作为所述默认路由目标 SE , 且构建 的路由表可以包含或不包含所述默认路由目标 SE对应的路由项。
之后, DH 向 NFCC发送 NFCEE_MODE_SET_CMD , 根据需 求激活部分 /全部非排他 SE。
508、 获取配置成功消息, 将所述 SE 标识符置为所述第一数 值, 并将所述终端中当前记录的排他 SE的 ID更新为无效。
DH 收到反馈配置成功的 RSP 后, 将 Flag 值置为 0 , 将 PT_SE_ID值置为 N/A。
本发明实施例提供的路由设置方法, 可以在终端接入排他 SE 之后,通过设置路由表终止包括 H C E在内的所有非排他 S E的运行。 与现有技术中无法通过指令终止 HCE 的运行相比, 本发明提供的 方法及终端设备, 可以避免使用 HCE , 进而保证了新接入的排他 SE的正常运行。
实施例 6 :
本发明实施例提供了一种终端设备, 如图 6所示, 所述终端设 备包括: 检测单元 601、 构建单元 602以及设置单元 603。
检测单元 601 ,用于检测新接入的安全单元 SE是否为排他 SE; 所述检测单元 601还用于, 在检测到所述新接入的 SE是排他 SE之后, 检测是否支持设置默认路由项。
构建单元 602 , 用于在所述检测单元 601检测到不支持设置默 认路由项之后, 构建仅包含排他性 SE对应的路由项的路由表。
设置单元 603 , 用于在所述检测单元 601检测到支持设置默认 路由项之后, 将所述新接入的 SE设置为默认路由目标 SE , 且构建 的路由表可以包含或者不包含排他性 SE对应的路由项。
所述设置单元 603还用于: 若所述新接入的 SE不是排他 SE , 则将 SE标识符置为第一数值; 若所述新接入的 SE是排他 SE , 则 将所述 SE标识符置为第二数值并记录所述新接入的 SE的 ID; 所 述第一数值表示终端中当前未接入排他 SE , 所述第二数值表示终 端中当前已接入排他 SE。
所述设置单元 603还用于, 设置所述 SE标识符; 所述 SE标 识符的初始值为所述第一数值。
贝' J , 所述终端设备还包括: 判断单元, 用于判断所述 SE标识 符是否为所述第一数值。
获取单元, 用于若所述判断单元判断所述 SE标识符为第一数 值, 则获取当前路由表。
所述构建单元 602还用于,在所述检测单元 601检测到所述新 接入的 SE不是排他 SE之后, 在所述当前路由表中增加所述新接 入的 SE对应的路由项, 构建路由表。
所述判断单元还用于,在所述检测单元 601检测到支持设置默 认路由项时, 判断是否需要重新指定所述默认路由目标 SE , 且构 建的路由表可以包含或不包含所述默认路由 目标 SE 对应的路由 项。
若所述终端设备的近场通信控制器 NFCC 可以删除路由项, 则 , 所述检测单元 601还用于, 检测所述终端设备中是否存在主机 卡模拟器 HCE。
所述构建单元 602还用于,若所述检测单元 601检测所述终端 设备中不存在所述 HCE , 则在不支持设置默认路由项时, 在所述 当前路由表中增加新接入的排他 SE对应的路由项构建路由表, 若 支持设置默认路由项,则构建的路由表可以包含或者不包含所述新 接入的排他 SE对应的路由项。
所述检测单元 601 还用于, 若检测所述终端设备中存在所述 HCE , 则检测路由表中是否包含目标为所述 HCE的路由项;
所述构建单元 602还用于,若所述检测单元 601检测所述路由 表中不包含目标为所述 HCE 的路由项, 则在不支持设置默认路由 项时, 在所述当前路由表中增加所述新接入的排他 SE对应的路由 项构建路由表, 若支持设置默认路由项, 则构建的路由表可以包含 或者不包含所述新接入的排他 SE对应的路由项。
所述构建单元 602还用于,若所述检测单元 601检测所述路由 表中包含目标为所述 HCE的路由项, 则在所述检测单元 601检测 到不支持设置默认路由项时, 删除所述路由表中所述 HCE和非排 他 SE对应的路由项并写入所述新接入的 SE对应的路由项, 构建 仅包含所述新接入的排他 SE 对应的路由项的路由表;若支持设置 默认路由项,则构建的路由表可以包含或者不包含所述新接入的排 他 SE对应的路由项。
所述检测单元 601还用于, 检测是否有 SE被移除。
所述获取单元还用于, 在所述检测单元检测到有 SE被移除之 后, 获取当前被移除的 SE的 ID。
所述判断单元还用于, 判断所述 SE标识符是否为所述第二数 值。
所述判断单元还用于, 若所述 SE标识符是所述第二数值, 则 判断所述当前被移除的 SE的 ID与终端中记录的排他 SE的 ID是 否相同。
所述构建单元 602还用于,若所述判断单元判断所述当前被移 除的 SE的 ID与终端中记录的排他 SE的 ID相同, 则才艮据处于连 接状态的 SE对应的路由项、 所述 HCE包含的路由信息, 构建路由 表。
所述检测单元 601还用于, 检测是否支持设置默认路由项。 所述构建单元 602还用于,若所述检测单元 601检测支持设置 默认路由项 , 构建包含或不包含所述默认路由目标 SE对应的路由 项的路由表。
所述设置单元 603还用于,在所述检测单元 601检测支持设置 默认路由项之后, 重新指定一个 SE作为所述默认路由目标 SE。
所述获取单元还用于, 获取配置成功消息。
所述设置单元 603还用于, 将所述 SE标识符置为所述第一数 值, 并将所述终端中当前记录的排他 SE的 ID更新为无效。
所述构建单元 602还用于, 若所述判断单元判断所述 SE标识 符不是所述第二数值, 则删除当前路由表中所述当前被移除的 SE 对应的路由项。
所述判断单元还用于,在支持设置默认路由项时判断所述当前 被移除的 SE是否为所述默认路由目标 SE。
所述判断单元还用于,在判断支持设置默认路由项时判断所述 当前被移除的 SE是否为所述默认路由目标 SE。
所述设置单元 603还用于,在所述判断单元判断当前被移除的 SE为所述默认路由目标 SE之后, 重新指定一个 SE作为所述默认 路由目标 SE。
若所述终端设备的 NFCC 可以删除路由项, 则所述检测单元 601还用于, 检测所述终端设备中是否存在所述 HCE。
所述构建单元 602还用于, 根据处于连接状态的 SE对应的路 由项构建路由表。 所述检测单元 601还用于, 检测是否支持设置默认路由项。 所述设置单元 603还用于, 检测支持设置默认路由项之后, 重 新指定一个 SE作为所述默认路由目标 SE ,且构建的路由表可以包 含或不包含所述默认路由目标 SE对应的路由项。
所述获取单元还用于, 获取配置成功消息。
所述设置单元 603还用于, 将所述 SE标识符置为所述第一数 值, 并将所述终端中当前记录的排他 SE的 ID更新为无效。
所述检测单元 601还用于, 若所述终端设备中存在所述 HCE , 则检测当前路由表中是否包含目标为所述 HCE的路由项。
所述构建单元 602还用于,在所述检测单元 601检测所述当前 路由表中包含目标为所述 HCE 的路由项之后, 根据处于连接状态 的 SE对应的路由项、 所述 HCE对应的路由项构建路由表。
所述检测单元 601还用于, 检测是否支持设置默认路由项。 所述设置单元 603还用于,若所述检测单元 601检测支持设置 默认路由项, 则重新指定一个 SE作为所述默认路由目标 SE , 且构 建的路由表可以包含或不包含所述默认路由 目标 SE 对应的路由 项。
所述获取单元还用于, 获取配置成功消息;
所述设置单元 603还用于, 将所述 SE标识符置为所述第一数 值, 并将所述终端中当前记录的排他 SE的 ID更新为无效。
所述检测单元 601还用于,在检测所述当前路由表中不包含目 标为所述 HCE 的路由项之后, 检测所述当前路由表中是否包含任 一条非排他 SE对应的路由项。
所述构建单元 602还用于,在所述检测单元 601检测所述当前 路由表中包含任一条非排他 SE对应的路由项之后, 删除所述当前 被移除的排他 SE对应的路由项构建路由表。
所述检测单元 601还用于, 检测是否支持设置默认路由项。 所述设置单元 603还用于,若所述检测单元 601检测支持设置 默认路由项, 则重新指定一个 SE作为所述默认路由目标 SE , 且构 建的路由表可以包含或不包含所述默认路由 目标 SE 对应的路由 项。
所述获取单元还用于, 获取配置成功消息。
所述设置单元 603还用于, 将所述 SE标识符置为所述第一数 值, 并将所述终端中当前记录的排他 SE的 ID更新为无效。
所述构建单元 602还用于,若所述当前路由表中不包含任一条 非排他 SE对应的路由项, 则 居处于连接状态的 SE对应的路由 项、 所述 HCE包含的路由信息, 构建路由表。
所述检测单元 601还用于, 检测是否支持设置默认路由项。 所述设置单元 603还用于,若所述检测单元 601检测支持设置 默认路由项, 则重新指定一个 SE作为所述默认路由目标 SE , 且构 建的路由表可以包含或不包含所述默认路由 目标 SE 对应的路由 项。
所述获取单元还用于, 获取配置成功消息。
所述设置单元 603还用于, 将所述 SE标识符置为所述第一数 值, 并将所述终端中当前记录的排他 SE的 ID更新为无效。
本发明实施例提供的终端设备,可以在终端接入排他 SE之后 , 通过设置路由表终止包括 HCE在内的所有非排他 SE的运行。与现 有技术中无法通过指令终止 HCE 的运行相比, 本发明提供的方法 及终端设备, 可以避免使用 HCE , 进而保证了新接入的排他 SE的 正常运行。
实施例 7 :
本发明实施例提供了一种终端设备, 如图 7所示, 所述终端设 备包括: DH (设备主机) 701。 所述终端设备包括还包括 NFCC (近 场通信管理器)702、 SE接口(安全单元接口 )703 以及存储器 704。 其中, 存储器中存储有路由表。
DH701 , 用于检测新接入的安全单元 SE是否为排他 SE。
所述 DH701还用于, 在检测到所述新接入的 SE是排他 SE之 后, 检测是否支持设置默认路由项。 所述 DH701 还用于, 在检测到不支持设置默认路由项之后, 构建仅包含排他性 S E对应的路由项的路由表。
所述 DH701 , 用于在检测到支持设置默认路由项之后, 将所 述新接入的 SE设置为默认路由目标 SE,且构建的路由表可以包含 或者不包含排他性 SE对应的路由项。
所述 DH701还用于, 若所述新接入的 SE不是排他 SE , 则将 SE标识符置为第一数值; 若所述新接入的 SE是排他 SE , 则将所 述 SE标识符置为第二数值并记录所述新接入的 SE的 ID ; 所述第 一数值表示终端中当前未接入排他 SE , 所述第二数值表示终端中 当前已接入排他 SE。
所述 DH701还用于, 设置所述 SE标识符; 所述 SE标识符的 初始值为所述第一数值。
贝' J , 所述 DH701 , 用于若判断所述 SE标识符为第一数值, 则 获取当前路由表。
所述 DH701还用于 , 在检测到所述新接入的 SE不是排他 SE 之后, 在所述当前路由表中增加所述新接入的 SE对应的路由项, 构建路由表。
所述 DH701 还用于, 在检测到支持设置默认路由项时, 判断 是否需要重新指定所述默认路由目标 SE , 且构建的路由表可以包 含或不包含所述默认路由目标 SE对应的路由项。
若所述终端设备的近场通信控制器 NFCC702 可以删除路由 项, 则, 所述 DH701 还用于, 检测所述终端设备中是否存在主机 卡模拟器 HCE。
所述 DH701还用于,若检测所述终端设备中不存在所述 HCE , 则在不支持设置默认路由项时,在所述当前路由表中增加新接入的 排他 SE对应的路由项构建路由表, 若支持设置默认路由项, 则构 建的路由表可以包含或者不包含所述新接入的排他 SE对应的路由 项。
所述 DH701还用于, 若检测所述终端设备中存在所述 HCE , 则检测路由表中是否包含目标为所述 HCE的路由项;
所述 DH701 还用于, 若检测所述路由表中不包含目标为所述 HCE 的路由项, 则在不支持设置默认路由项时, 在所述当前路由 表中增加所述新接入的排他 SE对应的路由项构建路由表, 若支持 设置默认路由项,则构建的路由表可以包含或者不包含所述新接入 的排他 SE对应的路由项。
所述 DH701 还用于, 若检测所述路由表中包含目标为所述 HCE 的路由项, 则在检测到不支持设置默认路由项时, 删除所述 路由表中所述 HCE和非排他 SE对应的路由项并写入所述新接入的 SE对应的路由项,构建仅包含所述新接入的排他 SE对应的路由项 的路由表;若支持设置默认路由项, 则构建的路由表可以包含或者 不包含所述新接入的排他 SE对应的路由项。
所述 DH701还用于, 检测是否有 SE被移除。
所述 DH701还用于, 在检测到有 SE被移除之后, 获取当前被 移除的 SE的 ID。
所述 DH701还用于,判断所述 SE标识符是否为所述第二数值。 所述 DH701还用于, 若所述 SE标识符是所述第二数值, 则判 断所述当前被移除的 SE的 ID与终端中记录的排他 SE的 ID是否 相同。
所述 DH701 还用于, 若所述判断单元判断所述当前被移除的 SE的 ID与终端中记录的排他 SE的 ID相同, 则 居处于连接状 态的 SE对应的路由项、 所述 HCE包含的路由信息, 构建路由表。
所述 DH701还用于, 检测是否支持设置默认路由项。
所述 DH701 还用于, 若检测支持设置默认路由项, 构建包含 或不包含所述默认路由目标 SE对应的路由项的路由表。
所述 DH701 还用于, 在检测支持设置默认路由项之后, 重新 指定一个 SE作为所述默认路由目标 SE。
所述 DH701还用于, 获取配置成功消息。
所述 DH701还用于, 将所述 SE标识符置为所述第一数值, 并 将所述终端中当前记录的排他 SE的 ID更新为无效。
所述 NFCC702 用于, 若判断所述 SE标识符不是所述第二数 值, 则删除当前路由表中所述当前被移除的 SE对应的路由项。
所述 DH701还用于,若判断所述 SE标识符不是所述第二数值 且所述终端的 NFCC702不具备删除路由的能力, 则删除当前路由 表中所述当前被移除的 SE对应的路由项。
所述 DH701 还用于, 在支持设置默认路由项时判断所述当前 被移除的 SE是否为所述默认路由目标 SE。
所述 DH701 还用于, 在判断支持设置默认路由项时判断所述 当前被移除的 SE是否为所述默认路由目标 SE。
所述 DH701还用于,在判断当前被移除的 SE为所述默认路由 目标 SE之后, 重新指定一个 SE作为所述默认路由目标 SE。
若所述终端设备的 NFCC702可以删除路由项, 则所述 DH701 还用于, 检测所述终端设备中是否存在所述 HCE。
所述 DH701还用于, 居处于连接状态的 SE对应的路由项构 建路由表。
所述 DH701还用于, 检测是否支持设置默认路由项。
所述 DH701 还用于, 检测支持设置默认路由项之后, 重新指 定一个 SE作为所述默认路由目标 SE ,且构建的路由表可以包含或 不包含所述默认路由目标 SE对应的路由项。
所述 DH701还用于, 获取配置成功消息。
所述 DH701还用于, 将所述 SE标识符置为所述第一数值, 并 将所述终端中当前记录的排他 SE的 ID更新为无效。
所述 DH701还用于, 若所述终端设备中存在所述 HCE , 则检 测当前路由表中是否包含目标为所述 HCE的路由项。
所述 DH701 还用于, 在检测所述当前路由表中包含目标为所 述 HCE的路由项之后, 根据处于连接状态的 SE对应的路由项、 所 述 HCE对应的路由项构建路由表。
所述 DH701还用于, 检测是否支持设置默认路由项。 所述 DH701 还用于, 若检测支持设置默认路由项, 则重新指 定一个 SE作为所述默认路由目标 SE ,且构建的路由表可以包含或 不包含所述默认路由目标 SE对应的路由项。
所述 DH701还用于, 获取配置成功消息;
所述 DH701还用于, 将所述 SE标识符置为所述第一数值, 并 将所述终端中当前记录的排他 SE的 ID更新为无效。
所述 DH701 还用于, 在检测所述当前路由表中不包含目标为 所述 HCE 的路由项之后, 检测所述当前路由表中是否包含任一条 非排他 SE对应的路由项。
所述 DH701还用于, 在所述检测单元 601检测所述当前路由 表中包含任一条非排他 SE对应的路由项之后, 删除所述当前被移 除的排他 SE对应的路由项构建路由表。
所述 DH701还用于, 检测是否支持设置默认路由项。
所述 DH701还用于, 若所述检测单元 601检测支持设置默认 路由项, 则重新指定一个 SE作为所述默认路由目标 SE , 且构建的 路由表可以包含或不包含所述默认路由目标 SE对应的路由项。
所述 DH701还用于, 获取配置成功消息。
所述 DH701还用于, 将所述 SE标识符置为所述第一数值, 并 将所述终端中当前记录的排他 SE的 ID更新为无效。
所述 DH701 还用于, 若所述当前路由表中不包含任一条非排 他 SE对应的路由项, 则 居处于连接状态的 SE对应的路由项、 所述 HCE包含的路由信息, 构建路由表。
所述 DH701还用于, 检测是否支持设置默认路由项。
所述 DH701 还用于, 若检测支持设置默认路由项, 则重新指 定一个 SE作为所述默认路由目标 SE ,且构建的路由表可以包含或 不包含所述默认路由目标 SE对应的路由项。
所述 DH701还用于, 获取配置成功消息。
所述 DH701还用于, 将所述 SE标识符置为所述第一数值, 并 将所述终端中当前记录的排他 SE的 ID更新为无效。 本发明实施例提供的终端设备,可以在终端接入排他 SE之后 , 通过设置路由表终止包括 HCE在内的所有非排他 SE的运行。与现 有技术中无法通过指令终止 HCE 的运行相比, 本发明提供的方法 及终端设备, 可以避免使用 HCE , 进而保证了新接入的排他 SE的 正常运行。
本领域普通技术人员可以理解: 实现上述方法实施例的全部或 部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存 储于一计算机可读取存储介质中, 该程序在执行时, 执行包括上述 方法实施例的步骤; 而前述的存储介质包括: ROM、 RAM、 磁碟 或者光盘等各种可以存储程序代码的介质。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围 并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技 术范围内, 可轻易想到变化或替换, 都应涵盖在本发明的保护范围 之内。因此,本发明的保护范围应所述以权利要求的保护范围为准。

Claims

权 利 要 求 书
1、 一种路由设置方法, 应用于终端设备, 其特征在于, 包括: 检测新接入的安全单元 SE是否为排他 SE;
若所述新接入的 SE是排他 SE, 则检测是否支持设置默认路由 项;
若检测到不支持设置默认路由项, 则构建仅包含排他性 SE 对 应的路由项的路由表;若支持设置默认路由项 ,则将所述新接入的 SE 设置为默认路由目标 SE, 且构建的路由表可以包含或者不包含排他 性 SE对应的路由项。
2、 根据权利要求 1所述的方法, 其特征在于, 所述检测新接入 的安全单元 SE是否为排他 SE之后, 所述方法还包括: 若所述新接入的 SE不是排他 SE, 则将 SE标识符置为第一数 值; 若所述新接入的 SE是排他 SE , 则将所述 SE标识符置为第二 数值并记录所述新接入的 SE的 ID ; 所述第一数值表示终端中当前 未接入排他 SE, 所述第二数值表示终端中当前已接入排他 SE。
3、根据权利要求 1所述的方法, 其特征在于, 所述方法还包括: 设置所述 S E标识符;所述 S E标识符的初始值为所述第一数值; 则 ,在所述检测新接入的 SE是否为排他 SE之前,所述方法还包括: 判断所述 SE标识符是否为所述第一数值; 若所述 SE标识符为 第一数值, 则获取当前路由表。
4、 根据权利要求 3所述的方法, 其特征在于,
若所述新接入的 SE不是排他 SE , 则在所述当前路由表中增加 所述新接入的 SE 对应的路由项, 构建路由表; 在支持设置默认路 由项时, 判断是否需要重新指定所述默认路由目标 SE , 且构建的路 由表可以包含或不包含所述默认路由目标 SE对应的路由项。
5、 根据权利要求 1所述的方法, 其特征在于, 若所述终端设备 的近场通信控制器 NFCC可以删除路由项, 则在所述检测新接入的 安全单元 SE是否为排他 SE之后, 所述方法还包括: 检测所述终端设备中是否存在主机卡模拟器 HCE; 若所述终端 设备中不存在所述 HCE, 则在不支持设置默认路由项时, 在所述当 前路由表中增加新接入的排他 SE 对应的路由项构建路由表, 若支 持设置默认路由项, 则构建的路由表可以包含或者不包含所述新接 入的排他 SE对应的路由项。
6、 根据权利要求 5所述的方法, 其特征在于, 若所述终端设备中存在所述 HCE , 则检测路由表中是否包含目 标为所述 HCE 的路由项; 若所述路由表中不包含目标为所述 HCE 的路由项, 则在不支持设置默认路由项时, 在所述当前路由表中增 加所述新接入的排他 SE 对应的路由项构建路由表, 若支持设置默 认路由项, 则构建的路由表可以包含或者不包含所述新接入的排他 SE对应的路由项。
7、 根据权利要求 6所述的方法, 其特征在于, 若所述路由表中包含目标为所述 HCE的路由项,则在检测到不 支持设置默认路由项时, 删除所述路由表中所述 HCE和非排他 SE 对应的路由项并写入所述新接入的 SE 对应的路由项, 构建仅包含 所述新接入的排他 SE对应的路由项的路由表;若支持设置默认路由 项, 则构建的路由表可以包含或者不包含所述新接入的排他 SE 对 应的路由项。
8、根据权利要求 3所述的方法, 其特征在于, 所述方法还包括: 检测到有 SE被移除, 并获取当前被移除的 SE的 ID; 判断所述 SE标识符是否为所述第二数值; 若所述 SE 标识符是所述第二数值, 则判断所述当前被移除的 SE的 ID与终端中记录的排他 SE的 ID是否相同; 若相同, 则 居处于连接状态的 SE对应的路由项、 所述 HCE 包含的路由信息, 构建路由表; 检测是否支持设置默认路由项, 若 支持, 则重新指定一个 SE作为所述默认路由目标 SE , 且构建的路 由表可以包含或不包含所述默认路由目标 SE对应的路由项; 获取配置成功消息, 将所述 SE 标识符置为所述第一数值, 并 将所述终端中当前记录的排他 SE的 ID更新为无效。
9、根据权利要求 8所述的方法, 其特征在于, 所述方法还包括: 若所述 SE 标识符不是所述第二数值, 则删除当前路由表中所 述当前被移除的 SE对应的路由项,并在支持设置默认路由项时判断 所述当前被移除的 SE是否为所述默认路由目标 SE , 若是, 则重新 指定一个 SE作为所述默认路由目标 SE。
10、 根据权利要求 8所述的方法, 其特征在于, 若所述终端设 备的 NFCC可以删除路由项, 则在判断所述当前被移除的 SE的 ID 与终端中记录的排他 SE的 ID相同之后 , 所述方法还包括,
检测所述终端设备中是否存在所述 HCE; 若所述终端设备中不存在所述 HCE ,则根据处于连接状态的 SE 对应的路由项构建路由表; 检测是否支持设置默认路由项, 若支持, 则重新指定一个 SE作为所述默认路由目标 SE, 且构建的路由表可 以包含或不包含所述默认路由目标 SE对应的路由项; 获取配置成功消息, 将所述 SE 标识符置为所述第一数值, 并 将所述终端中当前记录的排他 SE的 ID更新为无效。
11、 根据权利要求 10所述的方法, 其特征在于, 若所述终端设备中存在所述 H C E , 则检测当前路由表中是否包 含目标为所述 HCE的路由项; 若所述当前路由表中包含目标为所述 HCE的路由项,则根据处 于连接状态的 SE对应的路由项、 所述 HCE对应的路由项构建路由 表; 检测是否支持设置默认路由项, 若支持, 则重新指定一个 SE 作为所述默认路由目标 SE , 且构建的路由表可以包含或不包含所述 默认路由目标 SE对应的路由项; 获取配置成功消息, 将所述 SE 标识符置为所述第一数值, 并 将所述终端中当前记录的排他 SE的 ID更新为无效。
12、 根据权利要求 11所述的方法, 其特征在于, 若所述当前路由表中不包含目标为所述 HCE的路由项,则检测 所述当前路由表中是否包含任一条非排他 SE对应的路由项; 若所述当前路由表中包含任一条非排他 SE 对应的路由项, 则 删除所述当前被移除的排他 SE 对应的路由项构建路由表; 检测是 否支持设置默认路由项, 若支持, 则重新指定一个 SE 作为所述默 认路由目标 SE, 且构建的路由表可以包含或不包含所述默认路由目 标 SE对应的路由项; 获取配置成功消息, 将所述 SE 标识符置为所述第一数值, 并 将所述终端中当前记录的排他 SE的 ID更新为无效。
13、 根据权利要求 12所述的方法, 其特征在于, 若所述当前路由表中不包含任一条非排他 SE 对应的路由项, 则根据处于连接状态的 SE对应的路由项、 所述 HCE包含的路由信 息, 构建路由表; 检测是否支持设置默认路由项, 若支持, 则重新 指定一个 SE作为所述默认路由目标 SE , 且构建的路由表可以包含 或不包含所述默认路由目标 SE对应的路由项; 获取配置成功消息, 将所述 SE 标识符置为所述第一数值, 并 将所述终端中当前记录的排他 SE的 ID更新为无效。
14、 一种终端设备, 其特征在于, 包括: 检测单元, 用于检测新接入的安全单元 SE是否为排他 SE; 所述检测单元还用于, 在检测到所述新接入的 SE是排他 SE之 后, 检测是否支持设置默认路由项; 构建单元, 用于在所述检测单元检测到不支持设置默认路由项 之后, 构建仅包含排他性 SE对应的路由项的路由表; 设置单元, 用于在所述检测单元检测到支持设置默认路由项之 后, 将所述新接入的 SE设置为默认路由目标 SE , 且构建的路由表 可以包含或者不包含排他性 SE对应的路由项。
15、 根据权利要求 14所述的终端设备, 其特征在于, 所述设置 单元还用于: 若所述新接入的 SE不是排他 SE, 则将 SE标识符置为第一数 值; 若所述新接入的 SE是排他 SE , 则将所述 SE标识符置为第二 数值并记录所述新接入的 SE的 ID ; 所述第一数值表示终端中当前 未接入排他 SE, 所述第二数值表示终端中当前已接入排他 SE。
16、 根据权利要求 14所述的终端设备, 其特征在于, 所述设置 单元还用于: 设置所述 S E标识符;所述 S E标识符的初始值为所述第一数值; 贝' J , 所述终端设备还包括: 判断单元, 用于判断所述 SE标识符是否为所述第一数值; 获取单元, 用于若所述判断单元判断所述 SE 标识符为第一数 值, 则获取当前路由表。
17、 根据权利要求 16所述的终端设备, 其特征在于, 所述构建单元还用于,在所述检测单元检测到所述新接入的 SE 不是排他 SE之后, 在所述当前路由表中增加所述新接入的 SE对应 的路由项, 构建路由表; 所述判断单元还用于, 在所述检测单元检测到支持设置默认路 由项时, 判断是否需要重新指定所述默认路由目标 SE , 且构建的路 由表可以包含或不包含所述默认路由目标 SE对应的路由项。
18、 根据权利要求 14所述的终端设备, 其特征在于, 若所述终 端设备的近场通信控制器 N F C C可以删除路由项, 所述检测单元还用于, 检测所述终端设备中是否存在主机卡模 拟器 HCE; 所述构建单元还用于 , 若所述检测单元检测所述终端设备中不 存在所述 HCE , 则在不支持设置默认路由项时, 在所述当前路由表 中增加新接入的排他 SE 对应的路由项构建路由表, 若支持设置默 认路由项, 则构建的路由表可以包含或者不包含所述新接入的排他 SE对应的路由项。
19、 根据权利要求 18所述的终端设备, 其特征在于, 所述检测单元还用于, 若所述检测单元检测所述终端设备中存 在所述 HCE, 则检测路由表中是否包含目标为所述 HCE的路由项; 所述构建单元还用于, 若所述检测单元检测所述路由表中不包 含目标为所述 HCE的路由项, 则在不支持设置默认路由项时, 在所 述当前路由表中增加所述新接入的排他 SE 对应的路由项构建路由 表, 若支持设置默认路由项, 则构建的路由表可以包含或者不包含 所述新接入的排他 SE对应的路由项。
20、 根据权利要求 19所述的终端设备, 其特征在于, 所述构建单元还用于, 若所述检测单元检测所述路由表中包含 目标为所述 HCE的路由项, 则在所述检测单元检测到不支持设置默 认路由项时, 删除所述路由表中所述 HCE和非排他 SE对应的路由 项并写入所述新接入的 SE 对应的路由项, 构建仅包含所述新接入 的排他 SE对应的路由项的路由表;若支持设置默认路由项, 则构建 的路由表可以包含或者不包含所述新接入的排他 SE对应的路由项。
21、 根据权利要求 16所述的终端设备, 其特征在于,
所述检测单元还用于, 检测是否有 SE被移除; 所述获取单元还用于, 在所述检测单元检测到有 SE 被移除之 后, 获取当前被移除的 SE的 ID; 所述判断单元还用于, 判断所述 SE 标识符是否为所述第二数 值;
所述判断单元还用于, 若所述 SE 标识符是所述第二数值, 则 判断所述当前被移除的 SE的 ID与终端中记录的排他 SE的 ID是否 相同;
所述构建单元还用于, 若所述判断单元判断所述当前被移除的 SE的 ID与终端中记录的排他 SE的 ID相同, 则 居处于连接状态 的 SE对应的路由项、 所述 HCE包含的路由信息, 构建路由表; 所述检测单元还用于, 检测是否支持设置默认路由项; 所述构建单元还用于, 若所述检测单元检测支持设置默认路由 项, 构建包含或不包含所述默认路由目标 SE 对应的路由项的路由 表; 所述设置单元还用于, 在所述检测单元检测支持设置默认路由 项之后, 重新指定一个 SE作为所述默认路由目标 SE; 所述终端设备还包括获取单元, 用于获取配置成功消息; 所述设置单元还用于, 将所述 SE 标识符置为所述第一数值, 并将所述终端中当前记录的排他 SE的 ID更新为无效。
22、 根据权利要求 21所述的终端设备, 其特征在于, 所述构建单元还用于, 若所述判断单元判断所述 SE 标识符不 是所述第二数值, 则删除当前路由表中所述当前被移除的 SE 对应 的路由项; 所述判断单元还用于, 在支持设置默认路由项时判断所述当前 被移除的 SE是否为所述默认路由目标 SE; 所述判断单元还用于, 在判断支持设置默认路由项时判断所述 当前被移除的 SE是否为所述默认路由目标 SE; 所述设置单元还用于, 在所述判断单元判断当前被移除的 SE 为所述默认路由目标 SE之后, 重新指定一个 SE作为所述默认路由 目标 SE。
23、 根据权利要求 21所述的终端设备, 其特征在于, 若所述终 端设备的 NFCC可以删除路由项 ,
所述检测单元还用于,检测所述终端设备中是否存在所述 HCE; 所述构建单元还用于, 根据处于连接状态的 SE 对应的路由项 构建路由表;
所述检测单元还用于, 检测是否支持设置默认路由项; 所述设置单元还用于, 检测支持设置默认路由项之后, 重新指 定一个 SE作为所述默认路由目标 SE , 且构建的路由表可以包含或 不包含所述默认路由目标 SE对应的路由项; 所述获取单元还用于, 获取配置成功消息; 所述设置单元还用于, 将所述 SE 标识符置为所述第一数值, 并将所述终端中当前记录的排他 SE的 ID更新为无效。
24、 根据权利要求 23所述的终端设备, 其特征在于,
所述检测单元还用于, 若所述终端设备中存在所述 HCE, 则检 测当前路由表中是否包含目标为所述 HCE的路由项; 所述构建单元还用于, 在所述检测单元检测所述当前路由表中 包含目标为所述 HCE的路由项之后, 根据处于连接状态的 SE对应 的路由项、 所述 HCE对应的路由项构建路由表;
所述检测单元还用于, 检测是否支持设置默认路由项; 所述设置单元还用于, 若所述检测单元检测支持设置默认路由 项, 则重新指定一个 SE作为所述默认路由目标 SE , 且构建的路由 表可以包含或不包含所述默认路由目标 SE对应的路由项; 所述获取单元还用于, 获取配置成功消息; 所述设置单元还用于, 将所述 SE 标识符置为所述第一数值, 并将所述终端中当前记录的排他 SE的 ID更新为无效。
25、 根据权利要求 24所述的终端设备, 其特征在于, 所述检测单元还用于 , 在所述检测单元检测所述当前路由表中 不包含目标为所述 HCE的路由项之后,检测所述当前路由表中是否 包含任一条非排他 SE对应的路由项; 所述构建单元还用于, 在所述检测单元检测所述当前路由表中 包含任一条非排他 SE 对应的路由项之后, 删除所述当前被移除的 排他 SE对应的路由项构建路由表; 所述检测单元还用于, 检测是否支持设置默认路由项; 所述设置单元还用于, 若所述检测单元检测支持设置默认路由 项, 则重新指定一个 SE作为所述默认路由目标 SE , 且构建的路由 表可以包含或不包含所述默认路由目标 SE对应的路由项; 所述获取单元还用于, 获取配置成功消息; 所述设置单元还用于, 将所述 SE 标识符置为所述第一数值, 并将所述终端中当前记录的排他 SE的 ID更新为无效。
26、 根据权利要求 25所述的终端设备, 其特征在于, 所述构建单元还用于, 若所述当前路由表中不包含任一条非排 他 SE对应的路由项, 则 居处于连接状态的 SE对应的路由项、 所 述 HCE包含的路由信息, 构建路由表;
所述检测单元还用于, 检测是否支持设置默认路由项; 所述设置单元还用于, 若所述检测单元检测支持设置默认路由 项, 则重新指定一个 SE作为所述默认路由目标 SE , 且构建的路由 表可以包含或不包含所述默认路由目标 SE对应的路由项; 所述获取单元还用于, 获取配置成功消息;
所述设置单元还用于, 将所述 SE 标识符置为所述第一数值, 并将所述终端中当前记录的排他 SE的 ID更新为无效。
27、 一种终端设备, 其特征在于, 包括: 设备主机 DH , 用于检测新接入的安全单元 SE是否为排他 SE; 所述 DH还用于, 在检测到所述新接入的 SE是排他 SE之后, 检测是否支持设置默认路由项;
所述 DH , 用于在检测到不支持设置默认路由项之后, 构建仅 包含排他性 SE对应的路由项的路由表; 所述 DH , 用于在检测到支持设置默认路由项之后, 将所述新 接入的 SE设置为默认路由目标 SE , 且构建的路由表可以包含或者 不包含排他性 SE对应的路由项。
28、 根据权利要求 27所述的终端设备, 其特征在于, 所述 DH 还用于:
若所述新接入的 SE不是排他 SE, 则将 SE标识符置为第一数 值; 若所述新接入的 SE是排他 SE , 则将所述 SE标识符置为第二 数值并记录所述新接入的 SE的 ID ; 所述第一数值表示终端中当前 未接入排他 SE, 所述第二数值表示终端中当前已接入排他 SE。
29、 根据权利要求 27所述的终端设备, 其特征在于, 所述 DH 还用于:
设置所述 S E标识符;所述 S E标识符的初始值为所述第一数值; 所述 DH , 用于判断所述 SE标识符是否为所述第一数值; 所述 DH , 用于若判断所述 SE标识符为第一数值, 则获取当前 路由表。
30、 根据权利要求 29所述的终端设备, 其特征在于,
所述 DH还用于,在检测到所述新接入的 SE不是排他 SE之后, 在所述当前路由表中增加所述新接入的 SE 对应的路由项, 构建路 由表;
所述 DH还用于, 在检测到支持设置默认路由项时, 判断是否 需要重新指定所述默认路由目标 SE , 且构建的路由表可以包含或不 包含所述默认路由目标 SE对应的路由项。
31、 根据权利要求 27所述的终端设备, 其特征在于, 若所述终 端设备的 NFCC可以删除路由项 ,
所述 DH还用于, 检测所述终端设备中是否存在主机卡模拟器 HCE; 所述 DH还用于, 若检测所述终端设备中不存在所述 HCE, 则 在不支持设置默认路由项时, 在所述当前路由表中增加新接入的排 他 SE 对应的路由项构建路由表, 若支持设置默认路由项, 则构建 的路由表可以包含或者不包含所述新接入的排他 SE对应的路由项。
32、 根据权利要求 31所述的终端设备, 其特征在于,
所述 DH还用于, 若检测所述终端设备中存在所述 HCE , 则检 测路由表中是否包含目标为所述 HCE的路由项;
所述 DH还用于, 若检测所述路由表中不包含目标为所述 HCE 的路由项, 则在不支持设置默认路由项时, 在所述当前路由表中增 加所述新接入的排他 SE 对应的路由项构建路由表, 若支持设置默 认路由项, 则构建的路由表可以包含或者不包含所述新接入的排他 SE对应的路由项。
33、 根据权利要求 32所述的终端设备, 其特征在于, 所述 DH还用于, 若检测所述路由表中包含目标为所述 HCE的 路由项, 则在检测到不支持设置默认路由项时, 删除所述路由表中 所述 HCE和非排他 SE对应的路由项并写入所述新接入的 SE对应 的路由项, 构建仅包含所述新接入的排他 SE 对应的路由项的路由 表;若支持设置默认路由项, 则构建的路由表可以包含或者不包含所 述新接入的排他 SE对应的路由项。
34、 根据权利要求 27所述的终端设备, 其特征在于, 所述 DH还用于, 检测是否有 SE被移除; 所述 DH还用于, 在检测到有 SE被移除之后, 获取当前被移除 的 SE的 ID; 所述 DH还用于, 判断所述 SE标识符是否为所述第二数值; 所述 DH还用于, 若所述 SE标识符是所述第二数值, 则判断所 述当前被移除的 SE的 ID与终端中记录的排他 SE的 ID是否相同; 所述 DH还用于, 若判断所述当前被移除的 SE的 ID与终端中 记录的排他 SE的 ID相同, 则根据处于连接状态的 SE对应的路由 项、 所述 HCE包含的路由信息, 构建路由表; 所述 DH还用于, 检测是否支持设置默认路由项; 所述 DH还用于, 若检测支持设置默认路由项, 构建包含或不 包含所述默认路由目标 SE对应的路由项的路由表; 所述 DH还用于, 在检测支持设置默认路由项之后, 重新指定 一个 SE作为所述默认路由目标 SE; 所述 DH还用于, 获取配置成功消息; 所述 DH还用于, 将所述 SE标识符置为所述第一数值, 并将所 述终端中当前记录的排他 SE的 ID更新为无效。
35、 根据权利要求 34所述的终端设备, 其特征在于, 所述 DH还用于, 若判断所述 SE标识符不是所述第二数值, 则 删除当前路由表中所述当前被移除的 SE对应的路由项; 所述 DH还用于, 在支持设置默认路由项时判断所述当前被移 除的 SE是否为所述默认路由目标 SE; 所述 DH还用于, 在判断支持设置默认路由项时判断所述当前 被移除的 SE是否为所述默认路由目标 SE;
所述 DH还用于,在判断当前被移除的 SE为所述默认路由目标 SE之后, 重新指定一个 SE作为所述默认路由目标 SE。
36、 根据权利要求 34所述的终端设备, 其特征在于, 若所述终 端设备的 NFCC可以删除路由项 ,
所述 DH用于, 检测所述终端设备中是否存在所述 HCE;
所述 DH还用于,根据处于连接状态的 SE对应的路由项构建路 由表;
所述 DH还用于, 检测是否支持设置默认路由项;
所述 DH还用于, 检测支持设置默认路由项之后, 重新指定一 个 SE作为所述默认路由目标 SE , 且构建的路由表可以包含或不包 含所述默认路由目标 SE对应的路由项; 所述 DH还用于, 获取配置成功消息;
所述 DH还用于, 将所述 SE标识符置为所述第一数值, 并将所 述终端中当前记录的排他 SE的 ID更新为无效。
37、 根据权利要求 36所述的终端设备, 其特征在于,
所述 DH用于, 若所述终端设备中存在所述 HCE, 则检测当前 路由表中是否包含目标为所述 HCE的路由项;
所述 DH 还用于, 在检测所述当前路由表中包含目标为所述 HCE 的路由项之后, 根据处于连接状态的 SE对应的路由项、 所述 HCE对应的路由项构建路由表;
所述 DH还用于, 检测是否支持设置默认路由项;
所述 DH还用于, 若检测支持设置默认路由项, 则重新指定一 个 SE作为所述默认路由目标 SE , 且构建的路由表可以包含或不包 含所述默认路由目标 SE对应的路由项; 所述 DH还用于, 获取配置成功消息;
所述 DH还用于, 将所述 SE标识符置为所述第一数值, 并将所 述终端中当前记录的排他 SE的 ID更新为无效。
38、 根据权利要求 37所述的终端设备, 其特征在于, 所述 DH 用于, 在检测所述当前路由表中不包含目标为所述 HCE的路由项之后, 检测所述当前路由表中是否包含任一条非排他 SE对应的路由项; 所述 DH还用于, 在检测所述当前路由表中包含任一条非排他 SE对应的路由项之后, 删除所述当前被移除的排他 SE对应的路由 项构建路由表;
所述 DH还用于, 检测是否支持设置默认路由项; 所述 DH还用于, 若检测支持设置默认路由项, 则重新指定一 个 SE作为所述默认路由目标 SE , 且构建的路由表可以包含或不包 含所述默认路由目标 SE对应的路由项; 所述 DH还用于, 获取配置成功消息; 所述 DH还用于, 将所述 SE标识符置为所述第一数值, 并将所 述终端中当前记录的排他 SE的 ID更新为无效。
39、 根据权利要求 38所述的终端设备, 其特征在于,
所述 DH 用于, 若所述当前路由表中不包含任一条非排他 SE 对应的路由项,则根据处于连接状态的 SE对应的路由项、所述 HCE 包含的路由信息, 构建路由表;
所述 DH还用于, 检测是否支持设置默认路由项; 所述 DH还用于, 若所述检测单元检测支持设置默认路由项, 则重新指定一个 SE作为所述默认路由目标 SE, 且构建的路由表可 以包含或不包含所述默认路由目标 SE对应的路由项; 所述 DH还用于, 获取配置成功消息;
所述 DH还用于, 将所述 SE标识符置为所述第一数值, 并将所 述终端中当前记录的排他 SE的 ID更新为无效。
PCT/CN2014/079103 2014-06-03 2014-06-03 一种路由设置方法及终端设备 WO2015184591A1 (zh)

Priority Applications (5)

Application Number Priority Date Filing Date Title
US15/035,525 US10142232B2 (en) 2014-06-03 2014-06-03 Route setting method and terminal device
EP14893768.3A EP3013087B1 (en) 2014-06-03 2014-06-03 Route setting method and terminal device
JP2016570270A JP6292595B2 (ja) 2014-06-03 2014-06-03 ルート設定方法及び端末デバイス
PCT/CN2014/079103 WO2015184591A1 (zh) 2014-06-03 2014-06-03 一种路由设置方法及终端设备
CN201480003374.7A CN105453622B (zh) 2014-06-03 2014-06-03 一种路由设置方法及终端设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/079103 WO2015184591A1 (zh) 2014-06-03 2014-06-03 一种路由设置方法及终端设备

Publications (1)

Publication Number Publication Date
WO2015184591A1 true WO2015184591A1 (zh) 2015-12-10

Family

ID=54765932

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/079103 WO2015184591A1 (zh) 2014-06-03 2014-06-03 一种路由设置方法及终端设备

Country Status (5)

Country Link
US (1) US10142232B2 (zh)
EP (1) EP3013087B1 (zh)
JP (1) JP6292595B2 (zh)
CN (1) CN105453622B (zh)
WO (1) WO2015184591A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105659507B (zh) 2014-09-30 2019-02-26 华为技术有限公司 路由的方法、近场通信控制器、主控制器和终端

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103222291A (zh) * 2010-11-17 2013-07-24 捷讯研究有限公司 用于支持多个nfc执行环境nfcee的nfc控制器的应用路由配置
CN103765791A (zh) * 2013-01-24 2014-04-30 华为终端有限公司 近场通信射频发现控制方法、装置和终端设备

Family Cites Families (29)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2904741B1 (fr) * 2006-08-04 2009-10-02 Inside Contactless Sa Procede de routage de donnees d'application entrantes dans un chipset nfc, par identification de l'application.
JP4462341B2 (ja) 2007-12-18 2010-05-12 ソニー株式会社 情報処理装置および方法、並びにプログラム
ES2386164T3 (es) * 2008-03-27 2012-08-10 Motorola Mobility, Inc. Método y aparato para la selección automática de una aplicación de comunicación de campo cercano en un dispositivo electrónico
US9715681B2 (en) * 2009-04-28 2017-07-25 Visa International Service Association Verification of portable consumer devices
US9038886B2 (en) * 2009-05-15 2015-05-26 Visa International Service Association Verification of portable consumer devices
JP2012039257A (ja) 2010-08-04 2012-02-23 Sony Corp 携帯端末、情報処理方法及びコンピュータプログラム
US20120239560A1 (en) * 2011-03-04 2012-09-20 Pourfallah Stacy S Healthcare payment collection portal apparatuses, methods and systems
FR2985063B1 (fr) 2011-12-21 2014-07-04 Morpho Procede de routage au sein d'un terminal mobile emulant une carte de paiement sans contact
US8923763B2 (en) * 2012-02-28 2014-12-30 Qualcomm Incorporated Methods and apparatuses for reducing the nonvolatile memory used to support application identifier routing in an NFC controller
US9495524B2 (en) 2012-10-01 2016-11-15 Nxp B.V. Secure user authentication using a master secure element
US20160019536A1 (en) * 2012-10-17 2016-01-21 Royal Bank Of Canada Secure processing of data
CA2830260C (en) * 2012-10-17 2021-10-12 Royal Bank Of Canada Virtualization and secure processing of data
US9911118B2 (en) * 2012-11-21 2018-03-06 Visa International Service Association Device pairing via trusted intermediary
CA2874729C (en) * 2013-01-25 2021-01-05 Jvl Ventures, Llc Systems, methods, and computer program products for managing data re-installation
AU2014266860B2 (en) * 2013-05-15 2017-07-13 Visa International Service Association Methods and systems for provisioning payment credentials
WO2014189748A1 (en) * 2013-05-21 2014-11-27 Jvl Ventures, Llc Systems, methods and computer program products for managing disabling of services
US10108924B2 (en) * 2013-09-26 2018-10-23 At&T Mobility Ii Llc Methods and apparatus to emulate a toy
EP3078156A4 (en) * 2013-10-11 2017-07-12 Visa International Service Association Network token system
FR3012236B1 (fr) * 2013-10-17 2017-04-14 Proton World Int Nv Procede de routage nfc
SG11201604906QA (en) * 2013-12-19 2016-07-28 Visa Int Service Ass Cloud-based transactions methods and systems
WO2015116309A1 (en) * 2014-02-03 2015-08-06 Jvl Ventures, Llc Systems, methods, and computer program products for providing data use options
US20150262164A1 (en) * 2014-03-13 2015-09-17 Google Inc. Cloud-based secure storage
ES2545974B1 (es) * 2014-03-17 2016-04-27 Bankinter, S.A. Sistema de protección automático y personalizado para aplicaciones móviles
FR3018972B1 (fr) * 2014-03-18 2016-04-15 Proton World Int Nv Secure nfc routing
WO2015147413A1 (en) * 2014-03-27 2015-10-01 Lg Electronics Inc. Mobile terminal and method for controlling the same
KR20150123551A (ko) * 2014-04-25 2015-11-04 모지도코화이어코리아 유한회사 Hce를 활용한 모바일 카드 서비스 방법 및 이를 적용한 모바일 단말
US9767265B2 (en) * 2014-05-06 2017-09-19 Anchor Id, Inc. Authentication with parental control functionality
US10380588B2 (en) * 2014-05-13 2019-08-13 Mastercard International Incorporated Passive cardholder verification method in mobile device
WO2015179637A1 (en) * 2014-05-21 2015-11-26 Visa International Service Association Offline authentication

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103222291A (zh) * 2010-11-17 2013-07-24 捷讯研究有限公司 用于支持多个nfc执行环境nfcee的nfc控制器的应用路由配置
CN103765791A (zh) * 2013-01-24 2014-04-30 华为终端有限公司 近场通信射频发现控制方法、装置和终端设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3013087A4 *

Also Published As

Publication number Publication date
JP6292595B2 (ja) 2018-03-14
EP3013087A4 (en) 2016-08-31
JP2017531331A (ja) 2017-10-19
EP3013087A1 (en) 2016-04-27
CN105453622B (zh) 2019-05-28
US10142232B2 (en) 2018-11-27
CN105453622A (zh) 2016-03-30
EP3013087B1 (en) 2017-09-06
US20160301606A1 (en) 2016-10-13

Similar Documents

Publication Publication Date Title
US20220197575A1 (en) Communication system, communication device, and non-transitory computer-readable storage medium storing instructions for information processing device
US11115081B2 (en) Routing method for multiple security elements, NFC controller and NFC device
US10440557B2 (en) Electronic device for providing service using secure element and method thereof
US9703995B2 (en) Portable terminal, imaging apparatus, communication system, communication method of portable terminal, communication method of imaging apparatus, and computer readable storage device
KR102474437B1 (ko) 임베디드 가입자 식별 모듈에서의 프로파일의 설치
JP6923582B2 (ja) 情報処理装置、情報処理方法、およびプログラム
US11800575B2 (en) Just in time connection configuration stored in SIM profile
WO2023160203A1 (zh) 交换机配置管理方法、装置、电子设备及存储介质
JP6613653B2 (ja) 中継装置、通信制御方法、及び通信制御システム
US9720755B2 (en) Information processing device
US9380626B2 (en) Communication apparatus, information processing apparatus, and control method for the same
US10122417B2 (en) Communicating via near field communications
WO2015184591A1 (zh) 一种路由设置方法及终端设备
WO2016172948A1 (zh) 路由信息配置方法及装置
JP6306992B2 (ja) アカウント管理方法、アカウント管理サーバ、及びアカウント管理システム
JP6372134B2 (ja) 配信装置、配信方法および配信プログラム
CN106507434B (zh) 一种数据处理方法及装置
CN106462845B (zh) 一种非接触前端的配置方法及终端
US11494218B2 (en) Server and method for controlling packet transmission
KR102362699B1 (ko) 복수의 스토리지 장치를 이용한 파일 관리 서비스의 제공 방법 및 그 장치
KR20200089491A (ko) 공유된 디지털 키를 관리하기 위한 장치 및 방법
US11588861B2 (en) Electronic device and operating method for registering IP multimedia subsystem
EP4184317A1 (en) Upgradable electronic device, server for upgrdading electronic device, and method for upgrading electronic device
JPWO2020170296A1 (ja) 情報処理装置および情報処理装置と通信端末との自動接続方法

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201480003374.7

Country of ref document: CN

REEP Request for entry into the european phase

Ref document number: 2014893768

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2014893768

Country of ref document: EP

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

Ref document number: 14893768

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 15035525

Country of ref document: US

ENP Entry into the national phase

Ref document number: 2016570270

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE