WO2016015258A1 - Routing method and terminal - Google Patents
Routing method and terminal Download PDFInfo
- Publication number
- WO2016015258A1 WO2016015258A1 PCT/CN2014/083349 CN2014083349W WO2016015258A1 WO 2016015258 A1 WO2016015258 A1 WO 2016015258A1 CN 2014083349 W CN2014083349 W CN 2014083349W WO 2016015258 A1 WO2016015258 A1 WO 2016015258A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- terminal
- state
- routing
- data frame
- target
- Prior art date
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B5/00—Near-field transmission systems, e.g. inductive or capacitive transmission systems
- H04B5/20—Near-field transmission systems, e.g. inductive or capacitive transmission systems characterised by the transmission technique; characterised by the transmission medium
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W40/00—Communication routing or communication path finding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W88/00—Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
- H04W88/02—Terminal devices
Definitions
- the present invention relates to the field of NFC (Near Field Communication) technology, and in particular, to a routing method and a terminal. Background technique
- NFC is a wireless connection technology that uses electromagnetic induction to achieve short-range communication between electronic devices.
- An NFC-capable terminal (hereinafter referred to as "NFC terminal") includes one or more SEs (Security Elements) for providing applications installed in NFC terminals (for example, bus card applications, bank card applications, etc.) A safe execution environment.
- SEs Security Elements
- the NFC terminal also includes DH (Device Host) and NFCC (NFC Controller).
- DH Device Host
- NFCC NFC Controller
- the existing NCI (NFC Controller Interface) specification states that: NFCC can complete the routing query for the SE in the active state according to the routing table configured by DH. Specifically, when the NFCC acquires the data frame, it only searches for the route target from the activated SE, and does not find the route target from the deactivated SE. In this way, the application in the deactivated SE cannot be selected and used by the user, thereby affecting the user experience. Summary of the invention
- Embodiments of the present invention provide a routing method and a terminal, which enable an application in a deactivated SE to be selected and used by a user, thereby improving user experience.
- the first aspect provides a routing method, which is applied to a terminal, where the method includes: acquiring a data frame and a current energy state of the terminal;
- the data frame is sent to the target SE after activation.
- the determining, from the security unit SE in the deactivated state, the SE that matches the current energy status of the data frame and the terminal as the target SE includes:
- the method when the current energy state of the terminal is a low power consumption state, the method further includes:
- the default SE refers to a SE that is set in advance and is active when the current energy state of the terminal is a low power state.
- the method further includes:
- the security unit SE that determines the activation state according to the first routing manner does not include an SE that matches the current energy state of the data frame and the terminal; the first routing manner includes: applying identifier AID routing mode, cutting, Discuss routing methods and technical routing methods;
- Determining, from the deactivated security unit SE, the SE that matches the data frame and the current energy state of the terminal as the target SE includes:
- the SE pointed to by the target routing entry is taken as the target SE.
- the method further includes:
- the sending the data frame to the activated target SE includes: sending the data frame to the target routing entry in an active state To the target SE after activation.
- the activating the target SE includes:
- the preset switching policy includes the identifier of the target SE
- the target SE is activated; the preset switching policy is used to indicate that the terminal has the right to switch the activation/deactivation state of the SE, where the switching policy includes The terminal can control the identity of the switched SE.
- a terminal including:
- An acquiring unit configured to acquire a data frame and a current energy state of the terminal, where the first determining unit is configured to determine, from the security unit SE in the deactivated state, that the data frame and the current energy state of the terminal match SE as the target SE;
- An activation unit configured to activate the target SE
- the first determining unit is specifically configured to: when the at least one condition is met, determine, from the security unit SE in the deactivated state, the data frame and the The SE that matches the current energy state of the terminal is the target SE; the condition includes: the current energy state of the terminal is a low power consumption state, and the SE of the active state does not include the current data frame and the terminal The energy states match the SE.
- the terminal further includes: a deactivation unit, configured to: when the current energy state of the terminal is a low power state,
- the default SE is deactivated; the default SE refers to an SE that is set in advance and is in an active state when the current energy state of the terminal is a low power state.
- the terminal further includes: a second determining unit, configured to determine, according to the first routing manner, the security of the activation state
- the unit SE does not include an SE that matches the data frame and the current energy status of the terminal
- the first routing manner includes: an application identifier AID routing mode, a ten-party routing mode, and a technical routing mode
- the first determining unit is specifically configured to: determine, from the set of routing items in the invalid state, a routing item that matches the current energy state of the data frame and the terminal as a target routing item; The SE pointed to by the routing entry in the deactivated state; the SE pointed to by the target routing entry is taken as the target SE.
- the terminal further includes: a modifying unit, configured to: The state of the target routing entry is changed from a failed state to a valid state;
- the routing unit is specifically configured to send the target routing item of the data frame in an active state to the activated target SE.
- the activating unit is configured to: when the preset switching policy includes the identifier of the target SE, activate the target SE; the preset switching policy is used to indicate that the terminal has an activated/deactivated state of the switching SE. Privilege, the handover policy includes an identifier of the SE that the terminal can control to switch.
- a terminal including: a controller and at least one security unit
- the controller is configured to acquire a data frame and a current energy state of the terminal; and determine, from the SE in the deactivated state, an SE that matches the current energy state of the data frame and the terminal as a target SE; activating the target SE; transmitting the data frame to the target SE after activation.
- the controller is specifically configured to: determine, from the deactivated state security unit SE, the data frame and the terminal when at least one of the following conditions is met
- the current energy state is matched by the SE as the target SE; the condition includes: the current energy state of the terminal is a low power consumption state, and the SE of the active state does not include the current energy state with the data frame and the terminal.
- Matching SEs are specifically configured to: determine, from the deactivated state security unit SE, the data frame and the terminal when at least one of the following conditions is met The current energy state is matched by the SE as the target SE; the condition includes: the current energy state of the terminal is a low power consumption state, and the SE of the active state does not include the current energy state with the data frame and the terminal. Matching SEs.
- the controller is further configured to: when the current energy state of the terminal is a low power state, deactivate the default SE
- the default SE refers to an SE that is set in advance and is in an active state when the current energy state of the terminal is a low power consumption state.
- the controller is further configured to: determine, by using the first routing manner, that the security unit SE in the active state does not include An SE that matches the data frame and the current energy state of the terminal; the first routing manner includes: applying an identifier AID routing mode, cutting, negotiating routing mode, and technical routing mode;
- the controller is specifically configured to: determine, from the set of routing items in the failed state, a routing item that matches the current energy state of the data frame and the terminal as a target routing item; and the routing item set in the invalid state
- the SE pointed to by the routing entry is in a deactivated state; the SE pointed to by the target routing entry is used as the target SE.
- the controller is further configured to: The state of the routing entry is changed from a failed state to a valid state; The controller is specifically configured to send the target routing item of the data frame in an active state to the target SE after activation.
- the controller is specifically configured to: When the policy includes the identifier of the target SE, the target SE is activated; the preset switching policy is used to indicate that the terminal has the right to switch the activation/deactivation state of the SE, and the handover policy includes that the terminal can control The identity of the switched SE.
- the SE that matches the current energy state of the data frame and the terminal can be determined from the SE in the deactivated state as the target SE, and the data frame is transmitted to the target SE.
- the application targeted by the data frame is an application in the deactivated SE
- the user can use the application normally, thereby improving the user experience.
- a fourth aspect provides a routing method, where the method is applied to a terminal, where the method includes: acquiring a first data frame and a current energy state of the terminal;
- the energy status included in the near field communication identifier type NFCID2 routing item matches the current energy status of the terminal, and the first data frame includes an instruction to configure the NFCID2 information table, obtaining the deactivation including the NFCID2 routing item is supported.
- the obtaining, by the NFCID2 information table, the relationship between the SE that supports the deactivated state of the NFCID2 routing entry and the NFCID2 value corresponding to the SE includes:
- An NFCID2 information table is generated based on the response message.
- a terminal including:
- a first acquiring unit configured to acquire a first data frame and a current energy state of the terminal
- a second acquiring unit configured to: when the energy state included in the near field communication identifier type NFCID2 routing item matches the current energy state of the terminal, and the first data frame includes an instruction to configure the NFCID2 information table, obtain the inclusion An NFCID2 information table supporting a relationship between an SE of a deactivated state of the NFCID2 routing item and an NFCID2 value corresponding to the SE; the NFCID2 information table is used to cause the terminal to determine a target SE to which the second data frame is sent,
- the second data frame refers to the first data frame after the first data frame that does not contain an instruction to configure the NFCID2 information table.
- the second acquiring unit is specifically configured to:
- An NFCID2 information table is generated based on the response message.
- a terminal including: a controller and at least one security unit SE, where
- the controller is configured to acquire a first data frame and a current energy state of the terminal; the energy state included in the near field communication identifier type NFCID2 routing item matches the current energy state of the terminal, and the first
- the data frame includes an instruction to configure the NFCID2 information table
- the NFCID2 information table including the relationship between the SE supporting the deactivated state of the NFCID2 routing item and the NFCID2 value corresponding to the SE is obtained;
- the NFCID2 information table is used to make the Determining, by the terminal, a target SE to which the second data frame is sent, where the second data frame refers to a first packet after the first data frame
- the controller is specifically configured to:
- An NFCID2 information table is generated based on the response message.
- the NFCID2 information table includes a relationship between an SE of a deactivated state supporting the NFCID2 routing entry and an NFCID2 value corresponding to the SE, so that the terminal can be located
- the target SE to which the second data frame is transmitted is determined in the deactivated SE.
- FIG. 1 is a schematic flowchart of a routing method according to Embodiment 1 of the present invention.
- FIG. 2 is a schematic flowchart of a routing method according to Embodiment 2 of the present invention.
- FIG. 3 is a flowchart of a routing method according to Embodiment 1 of the present invention.
- 4 is a schematic flowchart of a routing method according to Embodiment 2 of the present invention.
- FIG. 5 is a schematic flowchart of a routing method according to Embodiment 3 of the present invention.
- FIG. 6 is a schematic diagram of a routing method according to Embodiment 5 of the present invention.
- FIG. 7 is a schematic structural diagram of a terminal according to Embodiment 3 of the present invention.
- FIG. 8 is a schematic structural diagram of another terminal according to Embodiment 3 of the present invention.
- FIG. 9 is a schematic structural diagram of a terminal according to Embodiment 4 of the present invention.
- FIG. 10 is a schematic structural diagram of a terminal according to Embodiment 5 of the present invention.
- FIG. 1 is a structure of a terminal according to Embodiment 6 of the present invention; schematic diagram. detailed description
- a routing method is provided to a terminal according to an embodiment of the present invention, where the method includes:
- terminal refers to the NFC terminal.
- the NFC terminal can contain one or more SEs, and the status of the SE can be active or deactivated.
- the SE in this article can be equated with NFCEE (NFC Execution Environment, NFC Execution Environment).
- the NFC terminal may also include a main controller DH and a secondary controller; the DH may specifically be a CPU (Central Processing Unit) of the terminal, and the secondary controller may be an NFCC. Generally, DH can work normally when the terminal is powered on; DH can configure routing table for NFCC, set default SE, and so on.
- the executor of this embodiment may be an NFC terminal, and may specifically be a DH or a secondary controller in the NFC terminal.
- the routing table can contain multiple types of routing items, for example, AID (Application ID, Application Identifier) routing item, NFCID2 (Near Field Communication Identifier 2) routing item, Protocol Routing (Protocol) -Based Routing ), Technology-Based Routing, etc.
- the routing table may contain any type of routing item, or may not contain any type.
- a type of routing entry specifically, the current time, the routing table may include one or more AID routing entries, and/or one NFCID2 routing entry, and/or one or more protocol routing entries, and/or one or more Technical routing item.
- Each AID routing entry, protocol routing entry, or technical routing entry points to an SE.
- One SE can correspond to one or more routing entries of the same type or different types; the NFCID2 routing entry does not point to any SE.
- the state of the routing entry may be a valid state or a failed state.
- a set of routing entries in a valid state is referred to as a set of routing entries in a valid state
- a set of routing entries in a failed state is referred to as a set of routing entries in a failed state.
- the current energy status of the terminal can include: power on state, power off (Switch off ) state, and power off ( Battery Off ) state.
- the terminal can acquire the data frame and the current energy state of the terminal by using the methods in the prior art.
- the step 101 may include: receiving, by the terminal, a data frame sent by the RCLF (Remote Contactless Front).
- the method for determining the "SE” that matches the current energy state of the data frame and the current state of the terminal is related to the routing mode.
- the "routing method” herein may include, but is not limited to, any one of the following modes: AID routing mode, NFCID2 routing mode, protocol routing mode, and technical routing mode.
- the step 102 may include: determining, by using the following at least one condition, an SE that matches the data frame and the current energy state of the terminal as the target SE from the deactivated security unit SE;
- the conditions include: 1) the current energy state of the terminal is a low power consumption state, and 2) the SE in the active state does not include an SE that matches both the data frame and the current energy state of the terminal.
- the terminal when the current energy state of the terminal is a power state of shutdown or a power state of shutdown, the terminal is considered to be in a low power consumption state. If the terminal contains a default SE, the default SE is activated when the terminal is in a low power state. The status of the routing entry corresponding to the default SE is valid. The other SEs are in the deactivated state, and the status of other routing entries is in the invalid state.
- the method may further include: deactivating a default SE; the default SE is preset, and currently at the terminal The energy state is the SE that is active when the power is low. Specifically: an activation/deactivation command for deactivating the default SE is sent to the default SE, so that the state of the default SE is switched from the activated state to the deactivated state.
- the method may further include: determining, by the first routing manner, that the security unit SE of the activation state does not include an SE that matches the current energy state of the data frame and the terminal;
- the first routing mode includes: AID routing mode, protocol routing mode, and technical routing mode.
- the step 102 may include: determining, from the set of routing items in the invalid state, a routing item that matches the current energy status of the data frame and the terminal as a target routing item; and the routing item set in the invalid state.
- the SE pointed to by the routing entry is in a deactivated state; the SE pointed to by the target routing entry is used as the target SE.
- the step 103 may include: the DH or the secondary controller sending an activation/deactivation command for activating the target SE to the target SE, so that the state of the target SE is switched from the deactivated state to the activated state.
- the method may further include: when the preset switching policy includes the identifier of the target SE, the target SE is activated; the preset switching policy is used to indicate that the terminal has a handover The authority to activate/deactivate the SE, the handover policy including an identifier of the SE that the terminal can control to switch.
- the preset switching policy is generally set in the DH.
- the DH can set a preset switching policy under the instruction of the user, or can automatically control the terminal by controlling the performance of the terminal and the usage of the application by the user.
- the identity of the switched SE is preset to the switching policy.
- the execution subject is a secondary controller
- the method further includes: the secondary controller receiving the handover decision of the DH transmission.
- the preset execution policy is used to indicate that the secondary controller has the right to switch the activation/deactivation state of the SE, and the handover policy includes the identifier of the SE that the secondary controller can control the handover.
- the DH may send a preset switching policy to the secondary controller at any time before the secondary controller is initialized or the secondary controller performs step 103.
- the method may further include: modifying a state of the target routing entry from a failed state to an active state; in this case, the step 104 may include: using the data frame to be in an active state.
- the target routing entry is sent to the target SE after activation.
- the terminal can determine, from the SE in the deactivated state, the SE that matches the current energy state of the data frame and the terminal as the target SE, and send the data frame to the target SE.
- the application targeted by the data frame is an application in the deactivated SE
- the user can use the application normally, thereby improving the user experience.
- another routing method provided by the embodiment of the present invention is applied to a terminal, where the method includes:
- the executor of the embodiment may be an NFC terminal, and may be a DH or a secondary controller in the NFC terminal. It should be noted that, for the related explanation in this embodiment, reference may be made to the foregoing first embodiment. For the specific implementation manner of this embodiment, reference may be made to the following embodiment 2.
- the energy status included in the near field communication identifier type NFCID2 routing item matches the current energy status of the terminal, and the first data frame includes an instruction to configure the NFCID2 information table, obtaining the routing item including the supported NFCID2
- An NFCID2 information table of a relationship between an SE of the deactivated state and an NFCID2 value corresponding to the SE the NFCID2 information table is used to cause the terminal to determine a target to which the second data frame is sent SE, the second data frame refers to a data frame after the first data frame that does not include an instruction to configure the NFCID2 information table.
- the terminal determines the specific implementation method of the target SE to which the second data frame is sent according to the NFCID2 information table, and can refer to the NFCID2 routing mode in the prior art, and is not described here.
- the step 202 may include: activating an SE of the deactivated state; sending the instruction for configuring the NFCID2 information table to the activated SE; receiving a response message that is sent by the SE and including an NFCID2 value; Generate an NFCID2 information table.
- the step 202 may include: obtaining, by using the following at least one condition, an NFCID2 information table that includes a relationship between a SE that supports a deactivated state of the NFCID2 routing item and an NFCID2 value corresponding to the SE.
- the condition includes: the current energy state of the terminal is a low power consumption state, and the SE in the activated state does not include an SE that matches the current data state of the data frame and the terminal.
- the method for determining whether the terminal includes the SE supporting the NFCID2 routing item in the activation state may refer to the prior art, and is not described here.
- the NFCID2 information table obtained by the terminal includes a relationship between the SE of the deactivated state supporting the NFCID2 routing item and the NFCID2 value corresponding to the SE, so that when the terminal receives the second data frame, The target SE to which the second data frame is transmitted can be determined from the SE in the deactivated state. In this way, when the application targeted by the second data frame is an application in the SE in the deactivated state, the user can use the application normally, thereby improving the user experience.
- the execution entities in the specific embodiment are all NFCC, and the default SE is preset in DH.
- each routing item in the set of routing items in the valid state is a routing item corresponding to the default SE preset by DH.
- the NFCC determines, according to the AID routing manner, whether the routing table contains a routing entry that matches the data frame acquired by the NFCC.
- the execution subject of this embodiment is NFCC.
- a routing method provided in this embodiment includes:
- the NFCC receives the data frame sent by the RCLF, and obtains the current energy state of the NFC terminal.
- the NFCC may obtain the current energy state of the NFC terminal in any of the steps prior to step 304.
- the NFCC parses the data frame to obtain the resolution result.
- ISO-DEP International Standardization Organization-Data Exchange Protocol
- step 304 is performed; if not, it indicates that the data frame does not satisfy the condition for executing the AID routing mode, and then ends.
- step 305 determines the target SE and sends data to the target SE, and then ends.
- step 304 the NFC terminal may be powered on, powered off, or powered off.
- 305 Determine whether the current energy state of the NFC terminal is a low power state.
- step 306 If yes, go to step 306; if no, end.
- step 307 If yes, go to step 307; if no, it means that there is no AID routing item matching the data frame in the routing table, and the target SE can be determined by using the method in the prior art (for example, according to the routing item specified by the merchant as the target routing item) Or determine the target routing entry by other routing methods, and then determine the target SE), and send data to the target SE, and then terminate.
- the AID routing entry includes: an AID value, an ID of the SE pointed to by the AID routing entry (IDentity, an identity number), and an energy state to which the AID routing entry applies.
- IDentity an ID of the SE pointed to by the AID routing entry
- energy state an energy state to which the AID routing entry applies.
- the matched AID routing item is used as the target routing item; the SE to which the target routing item is directed is used as the target SE.
- Default SE is the SE in the set of routing items in the active state.
- the method can also include: NFCC powering the target SE, stopping powering the default SE.
- the data frame is sent to the target SE via the target routing item.
- step 309 After step 309 is performed, it ends.
- steps 304-306 can be replaced by the following steps: Step 1: Determine whether the routing table contains an AID routing entry that matches the AID value and the current energy state of the NFC terminal.
- step 2 is performed; if no, it indicates that there is no AID routing item matching the data frame in the routing table, and the target SE can be determined by using the method in the prior art, and the data is sent to the target SE, and then the process ends.
- Step 2 Determine whether the current energy state of the NFC terminal is a low power state. If yes, go to step 307; if no, end.
- steps 304-307 can be replaced by the following steps:
- Steps Determine whether the routing table contains an AID routing entry that matches the AID value and the current energy state of the NFC terminal.
- step 2 ' is performed; if no, it indicates that there is no AID routing item matching the data frame in the routing table, and the target SE can be determined by using the method in the prior art, and the data is sent to the target SE, and then the process ends.
- Step 2 ' Use the matched AID routing entry as the destination routing entry; use the SE pointed to by the destination routing entry as the target SE.
- Step 3 ' Determine if the target SE is the default SE.
- step 308 is performed; if yes, indicating that the current energy state of the terminal is a low power state, step 309 is performed.
- the NFCC may determine the AID routing item matching the data frame from the set of routing items in the invalid state in the process of querying the route according to the AID routing manner.
- the target routing entry that is, the NFCC can determine the SE matching the data frame as the target SE from the SE in the deactivated state. In this way, when the application targeted by the data frame is an application in the SE in the deactivated state, the user can use the application normally, thereby improving the user experience.
- the NFCC determines, according to the NFCID2 routing manner, whether the routing table contains a routing entry that matches the data frame acquired by the NFCC.
- the execution body of this embodiment is NFCC.
- a routing method provided in this embodiment includes:
- the NFCC receives the data frame sent by the RCLF, and obtains the current energy state of the NFC terminal.
- the routing table includes an NFCID2 routing entry that matches the current energy state of the NFC terminal. Get the result of the analysis.
- the NFCID2 routing entry contains the energy status to which the NFCID2 routing entry applies.
- the routing table can contain an NFCID2 routing entry or no NFCID2 routing entry.
- the energy status of the NFCID2 routing entry included in the routing table is the same as the current energy status of the NFC terminal, the routing table is considered to contain the NFCID2 routing entry that matches the current energy status of the NFC terminal.
- step 404 is performed; if not, it means that the target SE needs to be determined for the data frame according to the prior art, and then the process ends.
- the SENSF_REQ instruction is a specific implementation of the "instruction to configure the NFCID2 information table" described in the above embodiment.
- the response information returned by the SE to the NFCC includes information that the SE does not support the NFCID2 routing entry.
- the response information of the SE to the NFCC is returned. Contains the NFCID2 value corresponding to the SE.
- the NFCID2 information table can be configured according to the method in the prior art. Then, if not, step 406 is performed.
- step 407 If yes, go to step 407; if no, end.
- step 410 If yes, go to step 410; if no, the SE in the NFC terminal does not support the NFCID2 routing entry, and the process ends.
- the relationship between the SE supporting the NFCID2 routing entry and the NFCID2 value corresponding to each SE supporting the NFCID2 routing entry constitutes an NFCID2 information table.
- step 410 After step 410 is performed, it ends.
- the NFCID2 information table is used to cause the NFCC to determine the target SE to which the second data frame is sent, and the second data frame refers to the first instruction that does not include the configuration NFCID2 information table after the "data frame" in step 401.
- Data frame may be described as follows: when the NFCC receives a data frame again, if the data frame includes the SENSF REQ command, the NFCID2 information table is configured for the data frame according to the method of steps 404-410 above; if the data frame is not Including the SENSF_REQ instruction, the target SE to which the data frame is sent is determined according to the method in the prior art by using the NFDID2 information table determined in step 410.
- the NFCC when the NFC terminal is in a low-power state, the NFCC can obtain the SE and the SE including the deactivated state supporting the NFCID2 routing item in the process of determining the NFCID2 information table according to the NFCID2 routing manner.
- the relationship between the corresponding NFCID2 values, so that when the secondary controller receives the second data frame, the target SE to which the second data frame is transmitted can be determined from the SE in the deactivated state. In this way, when the application targeted by the second data frame is an application in the deactivated SE When the user can use the application normally, the user experience is improved.
- the NFCC determines, according to the protocol routing manner, whether the routing table includes a routing entry that matches the data frame acquired by the NFCC.
- the execution subject of this embodiment is NFCC.
- a routing method provided in this embodiment includes:
- the NFCC receives the data frame sent by the RCLF, and obtains the current energy state of the NFC terminal.
- 502 Get the protocol type of the protocol currently used by the NFC terminal.
- step 504 determines the target SE and sends data to the target SE, and then ends.
- the protocol routing entry includes: a protocol type of a protocol to which the protocol routing entry applies, an ID of the SE pointed to by the protocol routing entry, and an energy state to which the routing entry of the protocol applies.
- step 505 If yes, go to step 505; if no, end.
- step 506 If yes, go to step 506; if no, it means that there is no protocol routing item matching the data frame in the routing table, and the target SE can be determined by using the method in the prior art (for example, according to the routing item specified by the merchant as the target routing item) Or determine the target routing entry by other routing methods, and then determine the target SE), and send data to the target SE, and then terminate.
- 506 The matched protocol routing item is used as the target routing entry; and the SE pointed to by the target routing entry is used as the target SE. 507-508 are the same as steps 308-309 in the first embodiment.
- steps 503-505 can be implemented by using the concept of step 1 - step 2 in the above embodiment 1.
- steps 503-506 can be implemented by the concept of step 1 - step 2 in the above embodiment 1.
- the NFCC may determine the protocol of the protocol currently used by the NFC terminal from the set of routing items in the invalid state in the process of querying the route according to the protocol routing manner.
- the protocol routing item matching the type and the current energy status of the NFC terminal is used as the target routing item. That is, the NFCC can determine the protocol type of the protocol currently used by the NFC terminal and the current energy state of the NFC terminal from the deactivated SE.
- the matched SEs are the target SEs. In this way, when the application targeted by the data frame is an application in the SE in the deactivated state, the user can use the application normally, thereby improving the user experience.
- the NFCC determines, according to the technical routing manner, whether the routing table contains a target routing entry that matches a data frame acquired by the NFCC.
- the execution subject of this embodiment is NFCC.
- the protocol type of the protocol in the embodiment 3 is "the technical type of the technology” in the embodiment; the “protocol type” in the embodiment 3 is in this embodiment.
- “Technical Type”; “Protocol Routing Item” in Embodiment 3 is “Technical Routing Item” in this embodiment.
- the NFCC may determine the technology used when receiving the data frame from the set of routing items in the invalid state in the process of querying the route according to the technical routing manner.
- the technical routing item matching the technical type and the current energy state of the NFC terminal is used as the target routing item, that is, the NFCC can determine the technology type of the technology used when receiving the data frame and the current NFC terminal from the SE in the deactivated state.
- the SE whose energy states are matched is the target SE.
- the NFCC performs route query according to the priority order of the routing mode.
- the priority order of the routing mode is as follows: AID routing mode, NFCID2 routing mode, cutting, negotiation routing mode, and technical routing mode.
- a routing method provided in this embodiment includes:
- the NFCC receives the data frame sent by the RCLF, and obtains the current energy state of the NFC terminal.
- 602 Perform route query according to the AID route mode, the NFCID2 route mode, the protocol route mode, and the technical route mode. Determine whether the target SE that matches the current energy state of the data frame and the NFC terminal is found.
- step 603 If no, go to step 603; if yes, end.
- step 603 After the route query is performed according to the route with higher priority, (for AID routing mode and protocol routing mode), if the routing item set in the routing state in the routing table does not contain the routing entry matching the data frame, or (For NFCID2 routing mode) If the target SE corresponding to the data frame is not included in the NFCID2 information table, the lower priority routing mode is executed; after the routing query is performed according to the lowest priority routing mode (technical routing mode) If the target SE that matches the current energy state of the data frame and the NFC terminal is not found, step 603 is performed.
- the specific implementation method for performing the query according to the routing methods listed above may refer to the prior art.
- step 604 If yes, go to step 604; if no, end.
- step 605 If yes, go to step 605; if no, end.
- step 603 when step 603 is executed, it is indicated that when the NFCC performs route query according to the NFCID2 routing mode in step 602, the data frame does not include the configuration.
- the instruction of the NFCID2 information table therefore, when performing step 604, the NFCC may sequentially determine, according to the priority order of the routing manner, whether the set of routing items in the invalid state in the routing table includes the current energy status of the data frame and the NFC terminal. Matching AID routing entries, protocol routing entries, and technical routing entries. For specific implementation manners, reference may be made to the relevant parts of the foregoing embodiments 1, 3, and 4.
- the matched routing item is used as the target routing item; the SE pointed to by the target routing item is used as the target SE.
- 606-607 are the same as steps 308-309 in embodiment 1.
- steps 602-604 may be implemented by the concept of step 1 - step 2 in the above embodiment 1.
- steps 602-605 can be implemented by the concept of step 1 - step 2 in the above embodiment 1.
- the NFCC when the NFC terminal is in a low power consumption state, the NFCC can determine the current data frame and the NFC terminal from the set of routing items in the invalid state after querying the route according to the routing method in the prior art.
- the routing items whose energy states are matched are used as the target routing items. That is, the NFCC can determine the SE that matches the current energy state of the data frame and the NFC list as the target SE from the SE of the deactivated state. In this way, when the application targeted by the data frame is an application in the SE in the deactivated state, the user can use the application normally, thereby improving the user experience.
- the NFCC does not find a current data state matching with a data frame and an NFC terminal after performing a route query in the routing mode with the lowest priority among the routing priority orders.
- the target SE is determined by determining whether the set of routing items in the routing state in the routing table includes the AID routing item, the protocol routing item, and the technical routing item that match the current energy status of the data frame and the NFC terminal to determine the target SE.
- the NFCC may also not find a target SE that matches the current energy state of a data frame and an NFC terminal after performing routing query according to any one or more routing manners, that is, according to the above embodiment.
- the corresponding steps in 1 - 4 determine the order For example, after the route query is performed according to the AID routing manner, the target SE that matches the current energy state of a data frame and the NFC terminal is not found, and whether the routing item set of the invalid state in the routing table is included The AID routing entry that matches the current energy status of the data frame and the NFC terminal. If no, the route query is performed according to the NFCID2 routing mode and the protocol routing mode.
- a terminal 7 is provided for performing the routing method shown in FIG. 1 according to an embodiment of the present invention.
- the terminal 7 includes:
- the obtaining unit 71 is configured to acquire a data frame and a current energy state of the terminal.
- the first determining unit 72 is configured to determine, from the security unit SE in the deactivated state, the current energy state of the data frame and the terminal.
- the matching SE is used as the target SE;
- the activation unit 73 is configured to activate the target SE;
- the routing unit 74 is configured to send the data frame to the target SE after activation.
- the first determining unit 71 is specifically configured to: determine, from the security unit SE in the deactivated state, an SE that matches the current energy state of the data frame and the terminal, when at least one of the following conditions is met As the target SE, the condition includes: the current energy state of the terminal is a low power consumption state, and the SE of the active state does not include an SE that matches the current data state of the data frame and the terminal.
- the terminal 7 further includes:
- the deactivation unit 75 is configured to: when the current energy state of the terminal is a low power consumption state, deactivate the default SE; the default SE is preset, and the current energy state of the terminal is a low power state.
- the terminal 7 further includes:
- the second determining unit 76 is configured to: the security unit SE configured to determine the activation state according to the first routing manner does not include an SE that matches the current energy state of the data frame and the terminal; the first routing manner includes: Identifier AID routing mode, protocol routing mode, and technical routing mode; The first determining unit 72 is specifically configured to: determine, from the set of routing items in the invalid state, a routing item that matches the current energy status of the data frame and the terminal as a target routing item; The SE pointed to by the routing entry in the set is in a deactivated state; the SE pointed to by the target routing entry is used as the target SE.
- the terminal 7 further includes:
- a modifying unit 77 configured to modify a state of the target routing entry from a failed state to an active state
- the routing unit 74 is specifically configured to send the target route item of the data frame in an active state to the activated target SE.
- the preset switching policy when the preset switching policy includes the identifier of the target SE, the target SE is activated; the preset switching policy is used to indicate that the terminal has the right to switch the activation/deactivation status of the SE,
- the handover policy includes an identifier of the SE that the terminal can control to switch.
- the terminal provided by the embodiment of the present invention can determine, from the SE in the deactivated state, the SE that matches the data frame and the current energy state of the terminal as the target SE, and sends the data frame to the target SE. In this way, when the application targeted by a data frame is an application in the deactivated SE, the user can use the application normally, thereby improving the user experience.
- a terminal 9 is provided for performing the routing method shown in FIG. 1 , the terminal 9 is: a memory 9 1 , a controller 92 and at least one security unit SE93;
- the memory 91 is configured to store a set of codes for the control controller 92 to perform the following actions: acquiring a data frame and a current energy state of the terminal; determining from the SE in the deactivated state with the data frame and the terminal The current energy state matches the SE as the target SE; the target SE is activated; the data frame is sent to the target SE after activation.
- the controller 92 can be a DH or a secondary controller (such as NFCC).
- the controller 92 is specifically configured to: when at least one of the following conditions is met, Determining, from the deactivated state security unit SE, an SE that matches the data frame and the current energy state of the terminal as the target SE; the condition includes: the current energy state of the terminal is a low power state, activated The SE of the state does not contain an SE that matches both the data frame and the current energy state of the terminal.
- the controller 92 is further configured to: when the current energy state of the terminal is a low power consumption state, deactivate a default SE; the default SE refers to a preset current energy at the terminal.
- the controller 92 is further configured to: in the security unit SE that determines the activation state according to the first routing manner, does not include an SE that matches the current energy state of the data frame and the terminal;
- the routing mode includes: application identifier AID routing mode, protocol routing mode, and technical routing mode;
- the controller 92 is specifically configured to: determine, from the set of routing items in the invalid state, a routing item that matches the current energy status of the data frame and the terminal as a target routing item; and the routing item set in the invalid state
- the SE pointed to by the routing entry is in a deactivated state; the SE pointed to by the target routing entry is used as the target SE.
- controller 92 is further configured to: modify a state of the target routing entry from a failure state to an active state;
- the controller 92 is specifically configured to send the target routing item of the data frame in an active state to the activated target SE.
- the controller 92 is further configured to: when the preset switching policy includes the identifier of the target SE, activate the target SE; the preset switching policy is used to indicate that the terminal has the activation of the switching SE The authority to deactivate the state, the handover policy including an identifier of the SE that the terminal can control to switch.
- the terminal provided by the embodiment of the present invention can determine the SE that matches the data frame and the current energy state of the terminal as the target SE from the SE in the deactivated state, and send the data frame to the target SE. In this way, when the application targeted by the data frame is an application in the deactivated SE, the user can use the application normally, thereby improving the user experience.
- Embodiment 5
- a terminal 10 is provided for performing the routing method shown in FIG. 2, where the terminal 10 includes:
- the first obtaining unit 10A is configured to acquire a first data frame and a current energy state of the terminal.
- the second obtaining unit 10B is configured to: when the energy status included in the near field communication identifier type NFCID2 routing item matches the current energy status of the terminal, and the first data frame includes an instruction for configuring the NFCID2 information table, obtain An NFCID2 information table including a relationship between an SE of a deactivated state supporting an NFCID2 routing item and an NFCID2 value corresponding to the SE; the NFCID2 information table is used to cause the terminal 10 to determine a target SE to which the second data frame is transmitted
- the second data frame refers to a data frame that is not included in the first data frame and that does not include an instruction to configure the NFCID2 information table.
- the second acquiring unit 10B is specifically configured to:
- An NFCID2 information table is generated based on the response message.
- the obtained NFCID2 information table includes a relationship between an SE of the deactivated state supporting the NFCID2 routing item and an NFCID2 value corresponding to the SE, so that when the terminal receives the second data frame, the terminal can The target SE to which the second data frame is transmitted is determined in the SE in the deactivated state. In this way, when the application targeted by the second data frame is an application in the SE in the deactivated state, the user can use the application normally, thereby improving the user experience.
- a terminal 11 includes: a memory 11A, a controller 11B, and at least one security unit SE11C;
- the memory 11A is for storing a set of codes for controlling the controller 11B to execute Performing the following actions: obtaining a first data frame and a current energy state of the terminal; the energy state included in the near field communication identifier type NFCID2 routing item matches the current energy state of the terminal, and the first data frame is in the
- the instruction to configure the NFCID2 information table is included, the NFCID2 information table including the relationship between the SE supporting the deactivated state of the NFCID2 routing item and the NFCID2 value corresponding to the SE is obtained; the NFCID2 information table is used to enable the terminal 1 1 determining a target SE to which the second data frame is sent, the second data frame being the first data frame after the first data frame that does not contain an instruction to configure the NFCID2 information table.
- the controller 1 1 B may be a DH or a secondary controller (such as NFCC).
- controller 1 1 B is specifically configured to:
- An NFCID2 information table is generated based on the response message.
- the obtained NFCID2 information table includes a relationship between an SE of the deactivated state supporting the NFCID2 routing item and an NFCID2 value corresponding to the SE, so that when the terminal receives the second data frame, the terminal can The target SE to which the second data frame is transmitted is determined in the SE in the deactivated state. In this way, when the application targeted by the second data frame is an application in the SE in the deactivated state, the user can use the application normally, thereby improving the user experience.
- the disclosed system, apparatus, and method may be implemented in other manners.
- the device embodiments described above are merely illustrative.
- the division of the unit is only a logical function division.
- the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
- the units described as separate components may or may not be physically separated, and the components displayed as the units may or may not be physical units, and may be located in one place or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the embodiment of the present embodiment.
- each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be physically included separately, or two or more units may be integrated into one unit.
- the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
- the above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium.
- the software functional unit described above is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform portions of the steps of the various embodiments of the present invention.
- the foregoing storage medium includes: a U disk, a mobile hard disk, a ROM (Read-Only Memory), a RAM (Random Access Memory), a disk or an optical disk, and the like, which can store program codes. .
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
Description
一种路由方法和终端 Routing method and terminal
技术领域 Technical field
本发明涉及 NFC ( Near Field Communication , 近场通信) 技术 领域, 尤其涉及一种路由方法和终端。 背景技术 The present invention relates to the field of NFC (Near Field Communication) technology, and in particular, to a routing method and a terminal. Background technique
NFC 是一种利用电磁感应实现电子设备间短距离通信的无线连接技 术。 具有 NFC功能的终端 (以下称为 "NFC终端" ) 中包含一个或者多 个 SE ( Security Element, 安全单元), 用以为 NFC终端中安装的应用(例 如, 公交卡应用、 银行卡应用等) 提供安全的执行环境。 NFC is a wireless connection technology that uses electromagnetic induction to achieve short-range communication between electronic devices. An NFC-capable terminal (hereinafter referred to as "NFC terminal") includes one or more SEs (Security Elements) for providing applications installed in NFC terminals (for example, bus card applications, bank card applications, etc.) A safe execution environment.
NFC 终端中还包含 DH ( Device Host, 主控制器) 和 NFCC ( NFC Controller, NFC控制器) 。 现有的 NCI ( NFC Controller Interface , NFC控制接口 ) 规范中规定: NFCC能够根据 DH所配置的路由表, 完 成对激活状态的 SE的路由查询。 具体的, 当 NFCC获取到数据帧后, 只 会从激活状态的 SE中寻找路由目标, 而不会从去激活状态的 SE中寻找路 由目标。 这样, 会导致去激活状态的 SE中的应用不能被用户选中和使用, 从而影响用户体验。 发明内容 The NFC terminal also includes DH (Device Host) and NFCC (NFC Controller). The existing NCI (NFC Controller Interface) specification states that: NFCC can complete the routing query for the SE in the active state according to the routing table configured by DH. Specifically, when the NFCC acquires the data frame, it only searches for the route target from the activated SE, and does not find the route target from the deactivated SE. In this way, the application in the deactivated SE cannot be selected and used by the user, thereby affecting the user experience. Summary of the invention
本发明的实施例提供一种路由方法和终端, 能够使去激活状态 的 SE中的应用被用户选中和使用, 从而提高用户体验。 Embodiments of the present invention provide a routing method and a terminal, which enable an application in a deactivated SE to be selected and used by a user, thereby improving user experience.
为达到上述目的, 本发明的实施例采用如下技术方案: In order to achieve the above object, the embodiment of the present invention adopts the following technical solutions:
第一方面, 提供一种路由方法, 应用于终端, 所述方法包括: 获取数据帧和所述终端当前的能量状态; The first aspect provides a routing method, which is applied to a terminal, where the method includes: acquiring a data frame and a current energy state of the terminal;
从去激活状态的安全单元 SE中确定与所述数据帧和所述终端 当前的能量状态均匹配的 SE作为目标 SE ; 激活所述目标 SE ; Determining, from the deactivated state security unit SE, an SE that matches both the data frame and the current energy state of the terminal as the target SE; Activating the target SE;
将所述数据帧发送至激活后的所述目标 SE。 The data frame is sent to the target SE after activation.
结合第一方面, 在第一种可能的实现方式中, 所述从去激活状 态的安全单元 SE中确定与所述数据帧和所述终端当前的能量状态 均匹配的 SE作为目标 SE , 包括: With reference to the first aspect, in a first possible implementation, the determining, from the security unit SE in the deactivated state, the SE that matches the current energy status of the data frame and the terminal as the target SE includes:
当满足下列至少一个条件时, 从去激活状态的安全单元 SE中 确定与所述数据帧和所述终端当前的能量状态均匹配的 SE作为目 标 SE ; 所述条件包括: 所述终端当前的能量状态为低功耗状态, 激活状态的 SE中不包含与所述数据帧和所述终端当前的能量状态 均匹配的 SE。 Determining, from the deactivated state security unit SE, an SE that matches both the data frame and the current energy state of the terminal as a target SE; the condition includes: the current energy of the terminal, when at least one of the following conditions is met The state is a low power state, and the SE in the active state does not include an SE that matches both the data frame and the current energy state of the terminal.
结合第一方面的第一种可能的实现方式,在第二种可能的实现 方式中, 在所述终端当前的能量状态为低功耗状态时, 所述方法还 包括: With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner, when the current energy state of the terminal is a low power consumption state, the method further includes:
去激活默认 SE ; 所述默认 SE是指预先设置的、 在所述终端当 前的能量状态为低功耗状态时处于激活状态的 SE。 Deactivate the default SE; the default SE refers to a SE that is set in advance and is active when the current energy state of the terminal is a low power state.
结合第一方面或第一方面的第一种可能的实现方式,在第三种 可能的实现方式中, 在所述从去激活状态的安全单元 SE中确定与 所述数据帧和所述终端当前的能量状态均匹配的 SE 作为目标 SE 之前, 所述方法还包括: With reference to the first aspect or the first possible implementation manner of the first aspect, in a third possible implementation, determining, in the security unit SE from the deactivated state, the data frame and the current terminal Before the energy states are matched by the SE as the target SE, the method further includes:
按照第一路由方式确定激活状态的安全单元 SE中不包含与所 述数据帧和所述终端当前的能量状态均匹配的 SE ; 所述第一路由 方式包括: 应用标识符 AID 路由方式、 切、议路由方式、 技术路由 方式; The security unit SE that determines the activation state according to the first routing manner does not include an SE that matches the current energy state of the data frame and the terminal; the first routing manner includes: applying identifier AID routing mode, cutting, Discuss routing methods and technical routing methods;
所述从去激活状态的安全单元 SE中确定与所述数据帧和所述 终端当前的能量状态均匹配的 SE作为目标 SE , 包括: Determining, from the deactivated security unit SE, the SE that matches the data frame and the current energy state of the terminal as the target SE includes:
从失效状态的路由项集合中确定与所述数据帧和所述终端当 前的能量状态均匹配的路由项作为目标路由项;所述失效状态的路 由项集合中的路由项指向的 SE处于去激活状态; Determining, from the set of routing items in the invalid state, a routing item that matches the current energy state of the data frame and the terminal as a target routing item; the path of the failed state The SE pointed to by the routing entry in the item set is in a deactivated state;
将所述目标路由项指向的 SE作为目标 SE。 The SE pointed to by the target routing entry is taken as the target SE.
结合第一方面、第一方面的第一种可能的实现方式至第三种可 能的实现方式任一种, 在第四种可能的实现方式中, 在所述将所述 数据帧发送至激活后的所述目标 SE之前, 所述方法还包括: In combination with the first aspect, the first possible implementation of the first aspect, or the third possible implementation manner, in the fourth possible implementation, after the sending the data frame to the activation Before the target SE, the method further includes:
将所述目标路由项的状态由失效状态修改为有效状态; 所述将所述数据帧发送至激活后的所述目标 SE , 包括: 将所述数据帧经有效状态的所述目标路由项发送至激活后的 所述目标 SE。 Transmitting the status of the target routing entry from a failed state to a valid state; the sending the data frame to the activated target SE includes: sending the data frame to the target routing entry in an active state To the target SE after activation.
结合第一方面、 第一方面的第一种可能的实现方式至第四种可 能的实现方式任一种, 在第五种可能的实现方式中, 所述激活所述 目标 SE , 包括: In combination with the first aspect, the first possible implementation manner of the first aspect, and the fourth possible implementation manner, in the fifth possible implementation manner, the activating the target SE includes:
在预设切换策略包含所述目标 SE 的标识时, 激活所述目标 SE ;所述预设切换策略用于指示所述终端具有切换 SE的激活 /去激 活状态的权限, 所述切换策略包含所述终端能够控制切换的 SE的 标识。 When the preset switching policy includes the identifier of the target SE, the target SE is activated; the preset switching policy is used to indicate that the terminal has the right to switch the activation/deactivation state of the SE, where the switching policy includes The terminal can control the identity of the switched SE.
第二方面, 提供一种终端, 包括: In a second aspect, a terminal is provided, including:
获取单元, 用于获取数据帧和所述终端当前的能量状态; 第一确定单元, 用于从去激活状态的安全单元 SE中确定与所 述数据帧和所述终端当前的能量状态均匹配的 SE作为目标 SE ; An acquiring unit, configured to acquire a data frame and a current energy state of the terminal, where the first determining unit is configured to determine, from the security unit SE in the deactivated state, that the data frame and the current energy state of the terminal match SE as the target SE;
激活单元, 用于激活所述目标 SE ; An activation unit, configured to activate the target SE;
路由单元, 用于将所述数据帧发送至激活后的所述目标 SE。 结合第二方面, 在第一种可能的实现方式中, 所述第一确定单 元具体用于: 当满足下列至少一个条件时, 从去激活状态的安全单 元 SE 中确定与所述数据帧和所述终端当前的能量状态均匹配的 SE作为目标 SE ; 所述条件包括: 所述终端当前的能量状态为低功 耗状态, 激活状态的 SE中不包含与所述数据帧和所述终端当前的 能量状态均匹配的 SE。 a routing unit, configured to send the data frame to the target SE after activation. With reference to the second aspect, in a first possible implementation manner, the first determining unit is specifically configured to: when the at least one condition is met, determine, from the security unit SE in the deactivated state, the data frame and the The SE that matches the current energy state of the terminal is the target SE; the condition includes: the current energy state of the terminal is a low power consumption state, and the SE of the active state does not include the current data frame and the terminal The energy states match the SE.
结合第二方面的第一种可能的实现方式,在第二种可能的实现 方式中, 所述终端还包括: 去激活单元, 用于在所述终端当前的能 量状态为低功耗状态时, 去激活默认 SE ; 所述默认 SE是指预先设 置的、在所述终端当前的能量状态为低功耗状态时处于激活状态的 SE。 With reference to the first possible implementation of the second aspect, in a second possible implementation, the terminal further includes: a deactivation unit, configured to: when the current energy state of the terminal is a low power state, The default SE is deactivated; the default SE refers to an SE that is set in advance and is in an active state when the current energy state of the terminal is a low power state.
结合第二方面或第二方面的第一种可能的实现方式,在第三种 可能的实现方式中, 所述终端还包括: 第二确定单元, 用于按照第 一路由方式确定激活状态的安全单元 SE中不包含与所述数据帧和 所述终端当前的能量状态均匹配的 SE ; 所述第一路由方式包括: 应用标识符 AID路由方式、 十办议路由方式、 技术路由方式; With reference to the second aspect, or the first possible implementation manner of the second aspect, in a third possible implementation, the terminal further includes: a second determining unit, configured to determine, according to the first routing manner, the security of the activation state The unit SE does not include an SE that matches the data frame and the current energy status of the terminal; the first routing manner includes: an application identifier AID routing mode, a ten-party routing mode, and a technical routing mode;
所述第一确定单元具体用于:从失效状态的路由项集合中确定 与所述数据帧和所述终端当前的能量状态均匹配的路由项作为 目 标路由项; 所述失效状态的路由项集合中的路由项指向的 SE处于 去激活状态; 将所述目标路由项指向的 SE作为目标 SE。 The first determining unit is specifically configured to: determine, from the set of routing items in the invalid state, a routing item that matches the current energy state of the data frame and the terminal as a target routing item; The SE pointed to by the routing entry in the deactivated state; the SE pointed to by the target routing entry is taken as the target SE.
结合第二方面、第二方面的第一种可能的实现方式至第三种可 能的实现方式任一种, 在第四种可能的实现方式中, 所述终端还包 括: 修改单元, 用于将所述目标路由项的状态由失效状态修改为有 效状态; With reference to the second aspect, the first possible implementation manner of the second aspect, and the third possible implementation manner, in a fourth possible implementation manner, the terminal further includes: a modifying unit, configured to: The state of the target routing entry is changed from a failed state to a valid state;
所述路由单元具体用于,将所述数据帧经有效状态的所述目标 路由项发送至激活后的所述目标 SE。 The routing unit is specifically configured to send the target routing item of the data frame in an active state to the activated target SE.
结合第二方面、第二方面的第一种可能的实现方式至第四种可 能的实现方式任一种, 在第五种可能的实现方式中, In combination with the second aspect, the first possible implementation of the second aspect, or the fourth possible implementation manner, in a fifth possible implementation manner,
所述激活单元具体用于, 在预设切换策略包含所述目标 SE的 标识时, 激活所述目标 SE ; 所述预设切换策略用于指示所述终端 具有切换 SE的激活 /去激活状态的权限,所述切换策略包含所述终 端能够控制切换的 SE的标识。 第三方面, 提供一种终端, 包括: 控制器和至少一个安全单元The activating unit is configured to: when the preset switching policy includes the identifier of the target SE, activate the target SE; the preset switching policy is used to indicate that the terminal has an activated/deactivated state of the switching SE. Privilege, the handover policy includes an identifier of the SE that the terminal can control to switch. In a third aspect, a terminal is provided, including: a controller and at least one security unit
SE ; 其中, 所述控制器, 用于获取数据帧和所述终端当前的能量 状态; 从去激活状态的 SE中确定与所述数据帧和所述终端当前的 能量状态均匹配的 SE作为目标 SE ; 激活所述目标 SE ; 将所述数 据帧发送至激活后的所述目标 SE。 SE; wherein the controller is configured to acquire a data frame and a current energy state of the terminal; and determine, from the SE in the deactivated state, an SE that matches the current energy state of the data frame and the terminal as a target SE; activating the target SE; transmitting the data frame to the target SE after activation.
结合第三方面, 在第一种可能的实现方式中, 所述控制器具体 用于: 当满足下列至少一个条件时, 从去激活状态的安全单元 SE 中确定与所述数据帧和所述终端当前的能量状态均匹配的 SE作为 目标 SE ; 所述条件包括: 所述终端当前的能量状态为低功耗状态, 激活状态的 SE中不包含与所述数据帧和所述终端当前的能量状态 均匹配的 SE。 With reference to the third aspect, in a first possible implementation, the controller is specifically configured to: determine, from the deactivated state security unit SE, the data frame and the terminal when at least one of the following conditions is met The current energy state is matched by the SE as the target SE; the condition includes: the current energy state of the terminal is a low power consumption state, and the SE of the active state does not include the current energy state with the data frame and the terminal. Matching SEs.
结合第三方面的第一种可能的实现方式,在第二种可能的实现 方式中, 所述控制器还用于, 在所述终端当前的能量状态为低功耗 状态时, 去激活默认 SE ; 所述默认 SE是指预先设置的、 在所述终 端当前的能量状态为低功耗状态时处于激活状态的 SE。 In conjunction with the first possible implementation of the third aspect, in a second possible implementation, the controller is further configured to: when the current energy state of the terminal is a low power state, deactivate the default SE The default SE refers to an SE that is set in advance and is in an active state when the current energy state of the terminal is a low power consumption state.
结合第三方面或第三方面的第一种可能的实现方式,在第三种 可能的实现方式中, 所述控制器还用于, 按照第一路由方式确定激 活状态的安全单元 SE中不包含与所述数据帧和所述终端当前的能 量状态均匹配的 SE ; 所述第一路由方式包括: 应用标识符 AID路 由方式、 切、议路由方式、 技术路由方式; With the third aspect or the first possible implementation manner of the third aspect, in a third possible implementation manner, the controller is further configured to: determine, by using the first routing manner, that the security unit SE in the active state does not include An SE that matches the data frame and the current energy state of the terminal; the first routing manner includes: applying an identifier AID routing mode, cutting, negotiating routing mode, and technical routing mode;
所述控制器具体用于:从失效状态的路由项集合中确定与所述 数据帧和所述终端当前的能量状态均匹配的路由项作为 目标路由 项; 所述失效状态的路由项集合中的路由项指向的 SE处于去激活 状态; 将所述目标路由项指向的 SE作为目标 SE。 The controller is specifically configured to: determine, from the set of routing items in the failed state, a routing item that matches the current energy state of the data frame and the terminal as a target routing item; and the routing item set in the invalid state The SE pointed to by the routing entry is in a deactivated state; the SE pointed to by the target routing entry is used as the target SE.
结合第三方面、第三方面的第一种可能的实现方式至第三种可 能的实现方式任一种, 在第四种可能的实现方式中, 所述控制器还 用于, 将所述目标路由项的状态由失效状态修改为有效状态; 所述 制器具体用于,将所述数据帧经有效状态的所述目标路由项发送至 激活后的所述目标 SE。 With reference to the third aspect, the first possible implementation manner of the third aspect, and the third possible implementation manner, in a fourth possible implementation manner, the controller is further configured to: The state of the routing entry is changed from a failed state to a valid state; The controller is specifically configured to send the target routing item of the data frame in an active state to the target SE after activation.
结合第三方面、第三方面的第一种可能的实现方式至第四种可 能的实现方式任一种, 在第五种可能的实现方式中, 所述控制器具 体用于, 在预设切换策略包含所述目标 SE的标识时, 激活所述目 标 SE ; 所述预设切换策略用于指示所述终端具有切换 SE 的激活 / 去激活状态的权限, 所述切换策略包含所述终端能够控制切换的 SE的标识。 With reference to the third aspect, the first possible implementation manner of the third aspect, and the fourth possible implementation manner, in a fifth possible implementation manner, the controller is specifically configured to: When the policy includes the identifier of the target SE, the target SE is activated; the preset switching policy is used to indicate that the terminal has the right to switch the activation/deactivation state of the SE, and the handover policy includes that the terminal can control The identity of the switched SE.
上述第一方面至第三方面提供的任一种方案, 能够从去激活状 态的 SE中确定与数据帧和终端当前的能量状态均匹配的 SE作为目 标 SE , 并向目标 SE发送该数据帧。 这样, 当数据帧针对的应用为 去激活状态的 SE中的应用时, 用户能够正常使用该应用, 从而提高 用户体验。 In any of the foregoing first to third aspects, the SE that matches the current energy state of the data frame and the terminal can be determined from the SE in the deactivated state as the target SE, and the data frame is transmitted to the target SE. Thus, when the application targeted by the data frame is an application in the deactivated SE, the user can use the application normally, thereby improving the user experience.
第四方面, 提供一种路由方法, 应用于终端, 所述方法包括: 获取第一数据帧和所述终端当前的能量状态; A fourth aspect provides a routing method, where the method is applied to a terminal, where the method includes: acquiring a first data frame and a current energy state of the terminal;
在近场通信标识符类型 NFCID2 路由项包含的能量状态与所 述终端当前的能量状态匹配, 且所述第一数据帧中 包含配置 NFCID2信息表的指令时, 获取包含支持 NFCID2路由项的去激活 状态的 SE与所述 SE对应的 NFCID2值之间的关系的 NFCID2信 息表; 所述 NFCID2信息表用于使所述终端确定第二数据帧发送至 的目标 SE , 所述第二数据帧是指所述第一数据帧之后的、 第一个 没有包含配置 NFCID2信息表的指令的数据帧。 When the energy status included in the near field communication identifier type NFCID2 routing item matches the current energy status of the terminal, and the first data frame includes an instruction to configure the NFCID2 information table, obtaining the deactivation including the NFCID2 routing item is supported. An NFCID2 information table of a relationship between a SE of the state and an NFCID2 value corresponding to the SE; the NFCID2 information table is used to cause the terminal to determine a target SE to which the second data frame is transmitted, and the second data frame refers to The first one after the first data frame does not contain a data frame of an instruction to configure the NFCID2 information table.
结合第四方面, 在第一种可能的实现方式中, 所述获取包含支 持 NFCID2 路由项的去激活状态的 SE 与所述 SE对应的 NFCID2 值之间的关系的 NFCID2信息表, 包括: With reference to the fourth aspect, in a first possible implementation manner, the obtaining, by the NFCID2 information table, the relationship between the SE that supports the deactivated state of the NFCID2 routing entry and the NFCID2 value corresponding to the SE, includes:
激活去激活状态的 SE ; Activate the deactivated SE;
向激活后的所述 SE发送所述配置 NFCID2信息表的指令; 接收所述 SE发送的包含 NFCID2值的响应消息; Sending the instruction to configure the NFCID2 information table to the SE after activation; Receiving a response message including the NFCID2 value sent by the SE;
根据所述响应消息生成 NFCID2信息表。 An NFCID2 information table is generated based on the response message.
第五方面, 提供一种终端, 包括: In a fifth aspect, a terminal is provided, including:
第一获取单元,用于获取第一数据帧和所述终端当前的能量状 态; a first acquiring unit, configured to acquire a first data frame and a current energy state of the terminal;
第二获取单元, 用于在近场通信标识符类型 NFCID2路由项包 含的能量状态与所述终端当前的能量状态匹配,且所述第一数据帧 中包含配置 NFCID2信息表的指令时, 获取包含支持 NFCID2路由 项的去激活状态的 SE与所述 SE对应的 NFCID2值之间的关系的 NFCID2信息表; 所述 NFCID2信息表用于使所述终端确定第二数 据帧发送至的目标 SE , 所述第二数据帧是指所述第一数据帧之后 的、 第一个没有包含配置 NFCID2信息表的指令的数据帧。 a second acquiring unit, configured to: when the energy state included in the near field communication identifier type NFCID2 routing item matches the current energy state of the terminal, and the first data frame includes an instruction to configure the NFCID2 information table, obtain the inclusion An NFCID2 information table supporting a relationship between an SE of a deactivated state of the NFCID2 routing item and an NFCID2 value corresponding to the SE; the NFCID2 information table is used to cause the terminal to determine a target SE to which the second data frame is sent, The second data frame refers to the first data frame after the first data frame that does not contain an instruction to configure the NFCID2 information table.
结合第五方面, 在第一种可能的实现方式中, 所述第二获取单 元具体用于: With reference to the fifth aspect, in a first possible implementation manner, the second acquiring unit is specifically configured to:
激活去激活状态的 SE ; Activate the deactivated SE;
向激活后的所述 SE发送所述配置 NFCID2信息表的指令; 接收所述 SE发送的包含 NFCID2值的响应消息; Sending, by the SE after the activation, the instruction for configuring the NFCID2 information table; receiving a response message that is sent by the SE and including an NFCID2 value;
根据所述响应消息生成 NFCID2信息表。 An NFCID2 information table is generated based on the response message.
第六方面, 提供一种终端, 包括: 控制器和至少一个安全单元 SE , 其中, In a sixth aspect, a terminal is provided, including: a controller and at least one security unit SE, where
所述控制器, 用于获取第一数据帧和所述终端当前的能量状 态; 在近场通信标识符类型 NFCID2路由项包含的能量状态与所述 终端当前的能量状态匹配, 且所述第一数据帧中包含配置 NFCID2 信息表的指令时, 获取包含支持 NFCID2 路由项的去激活状态的 SE与所述 SE对应的 NFCID2值之间的关系的 NFCID2信息表; 所 述 NFCID2 信息表用于使所述终端确定第二数据帧发送至的目标 SE , 所述第二数据帧是指所述第一数据帧之后的、 第一个没有包 含配置 NFCID2信息表的指令的数据帧。 The controller is configured to acquire a first data frame and a current energy state of the terminal; the energy state included in the near field communication identifier type NFCID2 routing item matches the current energy state of the terminal, and the first When the data frame includes an instruction to configure the NFCID2 information table, the NFCID2 information table including the relationship between the SE supporting the deactivated state of the NFCID2 routing item and the NFCID2 value corresponding to the SE is obtained; the NFCID2 information table is used to make the Determining, by the terminal, a target SE to which the second data frame is sent, where the second data frame refers to a first packet after the first data frame A data frame containing an instruction to configure the NFCID2 information table.
结合第六方面, 在第一种可能的实现方式中, 所述控制器具体 用于: In conjunction with the sixth aspect, in a first possible implementation, the controller is specifically configured to:
激活去激活状态的 SE ; Activate the deactivated SE;
向激活后的所述 SE发送所述配置 NFCID2信息表的指令; 接收所述 SE发送的包含 NFCID2值的响应消息; Sending, by the SE after the activation, the instruction for configuring the NFCID2 information table; receiving a response message that is sent by the SE and including an NFCID2 value;
根据所述响应消息生成 NFCID2信息表。 An NFCID2 information table is generated based on the response message.
上述第四方面至第六方面提供的任一种方案, NFCID2信息表中 均包含支持 NFCID2 路由项的去激活状态的 SE 与该 SE 对应的 NFCID2值之间的关系, 从而能够使终端从本处于去激活状态的 SE 中确定第二数据帧发送至的目标 SE。 这样, 当第二数据帧针对的应 用为本处于去激活状态的 SE 中的应用时, 用户能够正常使用该应 用, 从而提高用户体验。 附图说明 In any of the foregoing four aspects to the sixth aspect, the NFCID2 information table includes a relationship between an SE of a deactivated state supporting the NFCID2 routing entry and an NFCID2 value corresponding to the SE, so that the terminal can be located The target SE to which the second data frame is transmitted is determined in the deactivated SE. Thus, when the application targeted by the second data frame is an application in the SE that is deactivated, the user can use the application normally, thereby improving the user experience. DRAWINGS
为了更清楚地说明本发明实施例中的技术方案, 下面将对实施 例中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的 附图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动性的前提下, 还可以根据这些附图获得其他的 附图。 In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings to be used in the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present invention, Those skilled in the art can also obtain other drawings based on these drawings without paying creative labor.
图 1为本发明实施例一提供的一种路由方法的流程示意图 图 2为本发明实施例二提供的一种路由方法的流程示意图 图 3为本发明实施例 1提供的一种路由方法的流程示意图 图 4为本发明实施例 2提供的一种路由方法的流程示意图 图 5为本发明实施例 3提供的一种路由方法的流程示意图 图 6为本发明实施例 5提供的一种路由方法的流程示意图 图 7为本发明实施例三提供的一种终端的结构示意图; 图 8为本发明实施例三提供的另一种终端的结构示意图; 图 9为本发明实施例四提供的一种终端的结构示意图; 图 10为本发明实施例五提供的一种终端的结构示意图; 图 1 1为本发明实施例六提供的一种终端的结构示意图。 具体实施方式 1 is a schematic flowchart of a routing method according to Embodiment 1 of the present invention. FIG. 2 is a schematic flowchart of a routing method according to Embodiment 2 of the present invention. FIG. 3 is a flowchart of a routing method according to Embodiment 1 of the present invention. 4 is a schematic flowchart of a routing method according to Embodiment 2 of the present invention. FIG. 5 is a schematic flowchart of a routing method according to Embodiment 3 of the present invention. FIG. 6 is a schematic diagram of a routing method according to Embodiment 5 of the present invention. FIG. 7 is a schematic structural diagram of a terminal according to Embodiment 3 of the present invention; FIG. 8 is a schematic structural diagram of another terminal according to Embodiment 3 of the present invention; FIG. 9 is a schematic structural diagram of a terminal according to Embodiment 4 of the present invention; FIG. 10 is a schematic structural diagram of a terminal according to Embodiment 5 of the present invention; FIG. 1 is a structure of a terminal according to Embodiment 6 of the present invention; schematic diagram. detailed description
下面将结合本发明实施例中的附图, 对本发明实施例中的技术 方案进行清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明 一部分实施例, 而不是全部的实施例。 基于本发明中的实施例, 本 领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他 实施例, 都属于本发明保护的范围。 The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
本文中术语 "多个", 是指两个或者两个以上。 The term "multiple" as used herein refers to two or more.
实施例一 Embodiment 1
如图 1 所示, 为本发明实施例提供的一种路由方法, 应用于终 端, 所述方法包括: As shown in FIG. 1 , a routing method is provided to a terminal according to an embodiment of the present invention, where the method includes:
101 : 获取数据帧和所述终端当前的能量状态。 101: Acquire a data frame and a current energy state of the terminal.
其中, "终端" 是指 NFC 终端。 NFC 终端中可以包含一个或者 多个 SE , SE的状态可以为激活状态或者去激活状态。 本文中的 SE 可以等同于 NFCEE ( NFC Execution Environment , NFC执行环境)。 Among them, "terminal" refers to the NFC terminal. The NFC terminal can contain one or more SEs, and the status of the SE can be active or deactivated. The SE in this article can be equated with NFCEE (NFC Execution Environment, NFC Execution Environment).
NFC终端中还可以包含主控制器 DH和辅控制器; DH具体可以 为终端的 CPU ( Central Processing Unit, 中央处理器) , 辅控制器可以 为 NFCC。 一般地, 在终端处于开机状态时, DH能够正常工作; DH 能够为 NFCC配置路由表、 设置默认 SE等。 本实施例的执行主体可 以为 NFC终端, 具体可以为 NFC终端中的 DH或辅控制器。 The NFC terminal may also include a main controller DH and a secondary controller; the DH may specifically be a CPU (Central Processing Unit) of the terminal, and the secondary controller may be an NFCC. Generally, DH can work normally when the terminal is powered on; DH can configure routing table for NFCC, set default SE, and so on. The executor of this embodiment may be an NFC terminal, and may specifically be a DH or a secondary controller in the NFC terminal.
路由表可以包含多种类型的路由项,例如, AID( Application ID , 应用标识符)路由项、 NFCID2 ( Near Field Communication Identifier 2 , 近场通信标识符 (类型 ) 2 ) 路由项、 协议路由 ( Protocol-Based Routing ) 项、 技术路由 ( Technology-Based Routing ) 项等。 当前时 刻, 路由表中可能包含任一种类型的路由项, 也可能不包含任一种 类型的路由项; 具体的, 当前时刻,路由表中可以包含一个 /多个 AID 路由项, 和 /或一个 NFCID2 路由项, 和 /或一个 /多个协议路由项, 和 /或一个 /多个技术路由项。 每个 AID 路由项、 协议路由项或者技 术路由项均指向一个 SE , —个 SE可以对应一个 /多个同一类型或者 不同类型的路由项; NFCID2路由项不指向任何一个 SE。 The routing table can contain multiple types of routing items, for example, AID (Application ID, Application Identifier) routing item, NFCID2 (Near Field Communication Identifier 2) routing item, Protocol Routing (Protocol) -Based Routing ), Technology-Based Routing, etc. At present time, the routing table may contain any type of routing item, or may not contain any type. a type of routing entry; specifically, the current time, the routing table may include one or more AID routing entries, and/or one NFCID2 routing entry, and/or one or more protocol routing entries, and/or one or more Technical routing item. Each AID routing entry, protocol routing entry, or technical routing entry points to an SE. One SE can correspond to one or more routing entries of the same type or different types; the NFCID2 routing entry does not point to any SE.
路由项的状态可以为有效状态或者失效状态, 本文中, 将有效 状态的路由项构成的集合称为有效状态的路由项集合, 将失效状态 的路由项构成的集合称为失效状态的路由项集合。 The state of the routing entry may be a valid state or a failed state. In this document, a set of routing entries in a valid state is referred to as a set of routing entries in a valid state, and a set of routing entries in a failed state is referred to as a set of routing entries in a failed state. .
终端当前的能量状态可以包括: 开机状态、 关机有电源 ( Switch off ) 状态和关机无电源 ( Battery Off ) 状态。 The current energy status of the terminal can include: power on state, power off (Switch off ) state, and power off ( Battery Off ) state.
终端可以利用现有技术中的方法获取数据帧和终端当前的能量 状态。 具体的, 步骤 101 可以包括: 终端接收 RCLF ( Remote Contactless Front , 远端非接触设备) 发送的数据帧。 The terminal can acquire the data frame and the current energy state of the terminal by using the methods in the prior art. Specifically, the step 101 may include: receiving, by the terminal, a data frame sent by the RCLF (Remote Contactless Front).
102 : 从去激活状态的安全单元 SE 中确定与所述数据帧和所述 终端当前的能量状态均匹配的 SE作为目标 SE。 102: Determine, from the deactivated security unit SE, an SE that matches both the data frame and the current energy state of the terminal as the target SE.
其中, 终端确定 "与所述数据帧和所述终端当前的能量状态均匹 配的 SE" 的方法与路由方式有关, 具体实现方式可以参考下述实施例。 这里的 "路由方式" 可以包括但不限于以下方式中的任一种: AID路由方 式、 NFCID2路由方式、 协议路由方式、 技术路由方式。 The method for determining the "SE" that matches the current energy state of the data frame and the current state of the terminal is related to the routing mode. For the specific implementation, refer to the following embodiments. The "routing method" herein may include, but is not limited to, any one of the following modes: AID routing mode, NFCID2 routing mode, protocol routing mode, and technical routing mode.
可选的, 步骤 102 可以包括: 当满足下列至少一个条件时, 从 去激活状态的安全单元 SE 中确定与所述数据帧和所述终端当前的 能量状态均匹配的 SE作为目标 SE ; 所述条件包括: 1 ) 所述终端当 前的能量状态为低功耗状态, 2 ) 激活状态的 SE 中不包含与所述数 据帧和所述终端当前的能量状态均匹配的 SE。 Optionally, the step 102 may include: determining, by using the following at least one condition, an SE that matches the data frame and the current energy state of the terminal as the target SE from the deactivated security unit SE; The conditions include: 1) the current energy state of the terminal is a low power consumption state, and 2) the SE in the active state does not include an SE that matches both the data frame and the current energy state of the terminal.
示例性的, 当终端当前的能量状态为关机有电源状态或者关机 无电源状态时, 认为终端处于低功耗状态。 若终端包含的 DH 预先 设置了默认 SE , 则该终端处于低功耗状态时, 默认 SE处于激活状 态, 默认 SE对应的路由项的状态为有效状态, 其他 SE处于去激活 状态, 其他路由项的状态为失效状态。 Exemplarily, when the current energy state of the terminal is a power state of shutdown or a power state of shutdown, the terminal is considered to be in a low power consumption state. If the terminal contains a default SE, the default SE is activated when the terminal is in a low power state. The status of the routing entry corresponding to the default SE is valid. The other SEs are in the deactivated state, and the status of other routing entries is in the invalid state.
在上述可选的方式中, 在所述终端当前的能量状态为低功耗状 态时, 所述方法还可以包括: 去激活默认 SE ; 所述默认 SE是指预 先设置的、 在所述终端当前的能量状态为低功耗状态时处于激活状 态的 SE。 具体的: 向默认 SE发送用于去激活该默认 SE的激活 /去 激活命令, 以使得默认 SE的状态由激活状态切换为去激活状态。 In the foregoing optional manner, when the current energy state of the terminal is a low power consumption state, the method may further include: deactivating a default SE; the default SE is preset, and currently at the terminal The energy state is the SE that is active when the power is low. Specifically: an activation/deactivation command for deactivating the default SE is sent to the default SE, so that the state of the default SE is switched from the activated state to the deactivated state.
可选的, 在步骤 102 之前, 所述方法还可以包括: 按照第一路 由方式确定激活状态的安全单元 SE 中不包含与所述数据帧和所述 终端当前的能量状态均匹配的 SE ; 所述第一路由方式包括: AID路 由方式、 协议路由方式、 技术路由方式。 该情况下, 步骤 102 可以 包括: 从失效状态的路由项集合中确定与所述数据帧和所述终端当 前的能量状态均匹配的路由项作为目标路由项; 所述失效状态的路 由项集合中的路由项指向的 SE处于去激活状态;将所述目标路由项 指向的 SE作为目标 SE。 Optionally, before the step 102, the method may further include: determining, by the first routing manner, that the security unit SE of the activation state does not include an SE that matches the current energy state of the data frame and the terminal; The first routing mode includes: AID routing mode, protocol routing mode, and technical routing mode. In this case, the step 102 may include: determining, from the set of routing items in the invalid state, a routing item that matches the current energy status of the data frame and the terminal as a target routing item; and the routing item set in the invalid state. The SE pointed to by the routing entry is in a deactivated state; the SE pointed to by the target routing entry is used as the target SE.
103 : 激活所述目标 SE。 103 : Activate the target SE.
示例性的, 步骤 103可以包括: DH或辅控制器向目标 SE发送 用于激活该目标 SE的激活 /去激活命令, 以使得目标 SE的状态由去 激活状态切换为激活状态。 Exemplarily, the step 103 may include: the DH or the secondary controller sending an activation/deactivation command for activating the target SE to the target SE, so that the state of the target SE is switched from the deactivated state to the activated state.
可选的, 在步骤 103 之前, 所述方法还可以包括: 在预设切换 策略包含所述目标 SE 的标识时, 激活所述目标 SE ; 所述预设切换 策略用于指示所述终端具有切换 SE 的激活 /去激活状态的权限, 所 述切换策略包含所述终端能够控制切换的 SE的标识。 Optionally, before the step 103, the method may further include: when the preset switching policy includes the identifier of the target SE, the target SE is activated; the preset switching policy is used to indicate that the terminal has a handover The authority to activate/deactivate the SE, the handover policy including an identifier of the SE that the terminal can control to switch.
示例性的, 预设切换策略一般设置在 DH中, 具体的, DH可以 在用户的指示下设置预设切换策略, 也可以通过对终端性能和用户 对各应用的使用情况等自动设置终端能够控制切换的 SE 的标识预 设切换策略。 当执行主体为辅控制器时, 在激活所述目标 SE之前, 该方法还以包括: 辅控制器接收 DH 发送的切换决策。 该情况下, 预设执行策略用于指示辅控制器具有切换 SE 的激活 /去激活状态的 权限, 切换策略包含辅控制器能够控制切换的 SE的标识。 具体的, DH 可以在对辅控制器进行初始化或者辅控制器执行步骤 103 之前 的任一时刻向辅控制器发送预设切换策略。 For example, the preset switching policy is generally set in the DH. Specifically, the DH can set a preset switching policy under the instruction of the user, or can automatically control the terminal by controlling the performance of the terminal and the usage of the application by the user. The identity of the switched SE is preset to the switching policy. When the execution subject is a secondary controller, before the target SE is activated, The method further includes: the secondary controller receiving the handover decision of the DH transmission. In this case, the preset execution policy is used to indicate that the secondary controller has the right to switch the activation/deactivation state of the SE, and the handover policy includes the identifier of the SE that the secondary controller can control the handover. Specifically, the DH may send a preset switching policy to the secondary controller at any time before the secondary controller is initialized or the secondary controller performs step 103.
104 : 将所述数据帧发送至激活后的所述目标 SE。 104: Send the data frame to the target SE after activation.
可选的, 在步骤 104 之前, 所述方法还可以包括: 将所述目标 路由项的状态由失效状态修改为有效状态; 该情况下, 步骤 104 可 以包括: 将所述数据帧经有效状态的所述目标路由项发送至激活后 的所述目标 SE。 Optionally, before the step 104, the method may further include: modifying a state of the target routing entry from a failed state to an active state; in this case, the step 104 may include: using the data frame to be in an active state. The target routing entry is sent to the target SE after activation.
本发明实施例提供的路由方法,终端能够从去激活状态的 SE中 确定与数据帧和终端当前的能量状态均匹配的 SE作为目标 SE , 并 向目标 SE发送该数据帧。 这样, 当数据帧针对的应用为去激活状态 的 SE中的应用时, 用户能够正常使用该应用, 从而提高用户体验。 According to the routing method provided by the embodiment of the present invention, the terminal can determine, from the SE in the deactivated state, the SE that matches the current energy state of the data frame and the terminal as the target SE, and send the data frame to the target SE. In this way, when the application targeted by the data frame is an application in the deactivated SE, the user can use the application normally, thereby improving the user experience.
实施例二 Embodiment 2
如图 2 所示, 为本发明实施例提供的另一种路由方法, 应用于 终端, 所述方法包括: As shown in FIG. 2, another routing method provided by the embodiment of the present invention is applied to a terminal, where the method includes:
201 : 获取第一数据帧和所述终端当前的能量状态。 201: Acquire a first data frame and a current energy state of the terminal.
其中, 本实施例的执行主体可以为 NFC终端, 具体可以为 NFC 终端中的 DH 或辅控制器。 需要说明的是, 本实施例中的相关解释 可以参考上述实施例一, 本实施例的具体实现方式可以参考下述实 施例 2。 The executor of the embodiment may be an NFC terminal, and may be a DH or a secondary controller in the NFC terminal. It should be noted that, for the related explanation in this embodiment, reference may be made to the foregoing first embodiment. For the specific implementation manner of this embodiment, reference may be made to the following embodiment 2.
202 : 在近场通信标识符类型 NFCID2路由项包含的能量状态与 所述终端当前的能量状态匹配, 且所述第一数据帧中 包含配置 NFCID2信息表的指令时,获取包含支持 NFCID2路由项的去激活状 态的 SE与所述 SE对应的 NFCID2值之间的关系的 NFCID2信息表; 所述 NFCID2 信息表用于使所述终端确定第二数据帧发送至的目标 SE , 所述第二数据帧是指所述第一数据帧之后的、 第一个未包含配 置 NFCID2信息表的指令的数据帧。 202: When the energy status included in the near field communication identifier type NFCID2 routing item matches the current energy status of the terminal, and the first data frame includes an instruction to configure the NFCID2 information table, obtaining the routing item including the supported NFCID2 An NFCID2 information table of a relationship between an SE of the deactivated state and an NFCID2 value corresponding to the SE; the NFCID2 information table is used to cause the terminal to determine a target to which the second data frame is sent SE, the second data frame refers to a data frame after the first data frame that does not include an instruction to configure the NFCID2 information table.
示例性的, 终端根据 NFCID2 信息表确定第二数据帧发送至的 目标 SE的具体实现方法,可以参考现有技术中按照 NFCID2路由方 式, 此处不再描述。 For example, the terminal determines the specific implementation method of the target SE to which the second data frame is sent according to the NFCID2 information table, and can refer to the NFCID2 routing mode in the prior art, and is not described here.
具体的, 步骤 202可以包括: 激活去激活状态的 SE ; 向激活后 的所述 SE发送所述配置 NFCID2信息表的指令; 接收所述 SE发送 的包含 NFCID2值的响应消息; 根据所述响应消息生成 NFCID2信 息表。 Specifically, the step 202 may include: activating an SE of the deactivated state; sending the instruction for configuring the NFCID2 information table to the activated SE; receiving a response message that is sent by the SE and including an NFCID2 value; Generate an NFCID2 information table.
可选的, 步骤 202 可以包括: 当满足下列至少一个条件时, 获 取包含支持 NFCID2 路由项的去激活状态的 SE 与所述 SE 对应的 NFCID2值之间的关系的 NFCID2信息表。 所述条件包括: 所述终端 当前的能量状态为低功耗状态,激活状态的 SE中不包含与所述数据 帧和所述终端当前的能量状态均匹配的 SE。 Optionally, the step 202 may include: obtaining, by using the following at least one condition, an NFCID2 information table that includes a relationship between a SE that supports a deactivated state of the NFCID2 routing item and an NFCID2 value corresponding to the SE. The condition includes: the current energy state of the terminal is a low power consumption state, and the SE in the activated state does not include an SE that matches the current data state of the data frame and the terminal.
示例性的, 终端确定激活状态中是否包含支持 NFCID2 路由项 的 SE的方法可以参考现有技术, 此处不再描述。 For example, the method for determining whether the terminal includes the SE supporting the NFCID2 routing item in the activation state may refer to the prior art, and is not described here.
本发明实施例提供的路由方法, 终端获取的 NFCID2 信息表中 包含支持 NFCID2路由项的去激活状态的 SE与该 SE对应的 NFCID2 值之间的关系, 从而使得终端接收到第二数据帧时, 能够从本处于 去激活状态的 SE 中确定第二数据帧发送至的目标 SE。 这样, 当第 二数据帧针对的应用为本处于去激活状态的 SE中的应用时,用户能 够正常使用该应用, 从而提高用户体验。 In the routing method provided by the embodiment of the present invention, the NFCID2 information table obtained by the terminal includes a relationship between the SE of the deactivated state supporting the NFCID2 routing item and the NFCID2 value corresponding to the SE, so that when the terminal receives the second data frame, The target SE to which the second data frame is transmitted can be determined from the SE in the deactivated state. In this way, when the application targeted by the second data frame is an application in the SE in the deactivated state, the user can use the application normally, thereby improving the user experience.
为了清楚地描述以下具体实施例, 首先说明以下几点: In order to clearly describe the following specific embodiments, the following points are first explained:
1、 具体实施例中的执行主体均为 NFCC , 且 DH均预先设置了 默认 SE。 1. The execution entities in the specific embodiment are all NFCC, and the default SE is preset in DH.
2、 由于在终端处于低功耗状态的情况下, DH 不工作, NFCC 工作, 在该情况下更能体现出本发明的优势; 因此下述具体实施例 中均以低功耗状态下使用本发明提供的技术为例进行说明。 需要说 明的是, 该情况下, 有效状态的路由项集合中的各路由项为 DH 预 先设置的默认 SE对应的路由项。 2. Since the DH does not work and the NFCC works when the terminal is in a low power state, the advantages of the present invention are better reflected in this case; therefore, the following specific embodiments The technology provided by the present invention is described as an example in a low power consumption state. It should be noted that, in this case, each routing item in the set of routing items in the valid state is a routing item corresponding to the default SE preset by DH.
实施例 1 Example 1
本实施例中, NFCC按照 AID路由方式确定路由表中是否包含 与 NFCC 获取的数据帧匹配的路由项。 本实施例的执行主体为 NFCC。 In this embodiment, the NFCC determines, according to the AID routing manner, whether the routing table contains a routing entry that matches the data frame acquired by the NFCC. The execution subject of this embodiment is NFCC.
如图 3所示, 为本实施例提供的一种路由方法, 包括: As shown in FIG. 3, a routing method provided in this embodiment includes:
301 : NFCC接收 RCLF发送的数据帧, 并获取 NFC终端当前的 能量状态。 301: The NFCC receives the data frame sent by the RCLF, and obtains the current energy state of the NFC terminal.
示例性的, NFCC可以在步骤 304之前的任一步骤中获取 NFC终 端当前的能量状态。 Illustratively, the NFCC may obtain the current energy state of the NFC terminal in any of the steps prior to step 304.
302 : NFCC在确定使用 ISO-DEP ( International Standardization Organization-Data Exchange Protocol , 国际标准化组织 -数据交换协 议) 接口, 且路由表中包含 AID路由项时, 解析该数据帧, 得到解 析结果。 302: When the NFCC determines to use the ISO-DEP (International Standardization Organization-Data Exchange Protocol) interface and the AID routing entry is included in the routing table, the NFCC parses the data frame to obtain the resolution result.
303 : 判断解析结果中是否包含 AID值。 303: Determine whether the AID value is included in the analysis result.
若是,说明该数据帧满足 AID路由方式的条件,则执行步骤 304 ; 若否, 说明该数据帧不满足执行 AID路由方式的条件, 则结束。 If yes, if the data frame satisfies the condition of the AID routing mode, step 304 is performed; if not, it indicates that the data frame does not satisfy the condition for executing the AID routing mode, and then ends.
304 : 判断路由表中有效状态的路由项集合中是否包含与解析结 果中的 AID值和 NFC终端当前的能量状态均匹配的 AID路由项。 304: Determine whether the set of routing entries in the valid state in the routing table includes an AID routing entry that matches the AID value in the parsing result and the current energy state of the NFC terminal.
若否, 说明需要从失效状态的路由项集合中寻找与解析结果中 的 AID值和 NFC终端当前的能量 夫态均匹配的 AID路由项作为目 标路由项, 则执行步骤 305 ; 若是, 说明可以用现有技术中的方法确 定目标 SE , 并向目标 SE发送数据, 则结束。 If no, it is required to find the AID routing item that matches the AID value in the analysis result and the current energy state of the NFC terminal as the target routing item, and then step 305 is performed; if yes, the description can be used. The prior art method determines the target SE and sends data to the target SE, and then ends.
执行步骤 304 时, NFC 终端可能处于开机状态、 关机有电源状 态或者关机无电源状态。 305 : 判断 NFC终端当前的能量状态是否为低功耗状态。 When step 304 is executed, the NFC terminal may be powered on, powered off, or powered off. 305: Determine whether the current energy state of the NFC terminal is a low power state.
若是, 则执行步骤 306 ; 若否, 则结束。 If yes, go to step 306; if no, end.
306 : 判断路由表中失效状态的路由项集合中是否包含与解析结 果中的 AID值和 NFC终端当前的能量状态均匹配的 AID路由项。 306: Determine whether the routing item set of the invalid state in the routing table includes an AID routing item that matches the AID value in the parsing result and the current energy status of the NFC terminal.
若是, 则执行步骤 307 ; 若否, 说明路由表中不存在与该数据帧 匹配的 AID路由项,可以利用现有技术中的方法确定目标 SE(例如 , 按照商家规定的路由项作为 目标路由项或者通过其他路由方式确定 目标路由项, 进而确定目标 SE ) , 并向目标 SE发送数据, 则结束。 If yes, go to step 307; if no, it means that there is no AID routing item matching the data frame in the routing table, and the target SE can be determined by using the method in the prior art (for example, according to the routing item specified by the merchant as the target routing item) Or determine the target routing entry by other routing methods, and then determine the target SE), and send data to the target SE, and then terminate.
示例性的 , AID路由项包括: AID值、 该 AID路由项指向的 SE 的 ID ( IDentity , 身份标识号码)、 该 AID路由项所适用的能量状态。 当解析结果中的 AID值与一个 AID路由项中包含的 AID值相同,且 该 AID 路由项所适用的能量状态与 NFC 终端当前的能量状态相同 时, 步骤 306中的判断结果为 "是"; 否则, 步骤 306中的判断结果 为 "否"。 For example, the AID routing entry includes: an AID value, an ID of the SE pointed to by the AID routing entry (IDentity, an identity number), and an energy state to which the AID routing entry applies. When the AID value in the analysis result is the same as the AID value included in the AID routing item, and the energy state applicable to the AID routing item is the same as the current energy state of the NFC terminal, the determination result in the step 306 is "Yes"; Otherwise, the judgment result in step 306 is "NO".
307 : 将所匹配的 AID路由项作为目标路由项; 将目标路由项指 向的 SE作为目标 SE。 307: The matched AID routing item is used as the target routing item; the SE to which the target routing item is directed is used as the target SE.
308 : 向目标 SE发送用于激活该目标 SE的激活 /去激活指令, 使得该目标 SE的状态由去激活状态切换为激活状态,将目标路由项 的状态由失效状态修改为有效状态; 向默认 SE发送用于去激活该默 认 SE的激活 /去激活指令,使得默认 SE的状态由激活状态切换为去 激活状态,将默认 SE对应的路由项的状态由有效状态修改为失效状 态。 308: Send an activation/deactivation instruction for activating the target SE to the target SE, so that the state of the target SE is switched from the deactivated state to the activated state, and the state of the target routing entry is changed from the invalid state to the valid state; The SE sends an activation/deactivation command for deactivating the default SE, so that the state of the default SE is switched from the activated state to the deactivated state, and the state of the routing entry corresponding to the default SE is changed from the active state to the disabled state.
执行步骤 308时, "默认 SE"为有效状态的路由项集合中的 SE。 该方法还可以包括: NFCC为目标 SE供电, 停止为默认 SE供电。 When step 308 is performed, "Default SE" is the SE in the set of routing items in the active state. The method can also include: NFCC powering the target SE, stopping powering the default SE.
309 : 经目标路由项向目标 SE发送该数据帧。 309: The data frame is sent to the target SE via the target routing item.
执行步骤 309之后, 则结束。 After step 309 is performed, it ends.
可选的, 步骤 304-306可以用 以下步骤替换: 步骤 1 : 判断路由表中是否包含与该 AID值和 NFC终端当前的 能量状态均匹配的 AID路由项。 Optionally, steps 304-306 can be replaced by the following steps: Step 1: Determine whether the routing table contains an AID routing entry that matches the AID value and the current energy state of the NFC terminal.
若是, 则执行步骤 2 ; 若否, 说明路由表中不存在与该数据帧匹 配的 AID路由项, 可以利用现有技术中的方法确定目标 SE , 并向目 标 SE发送数据, 则结束。 If yes, step 2 is performed; if no, it indicates that there is no AID routing item matching the data frame in the routing table, and the target SE can be determined by using the method in the prior art, and the data is sent to the target SE, and then the process ends.
步骤 2 : 判断 NFC终端当前的能量状态是否为低功耗状态。 若是, 则执行步骤 307 ; 若否, 则结束。 Step 2: Determine whether the current energy state of the NFC terminal is a low power state. If yes, go to step 307; if no, end.
可选的, 步骤 304-307可以用 以下步骤替换: Optionally, steps 304-307 can be replaced by the following steps:
步骤 : 判断路由表中是否包含与该 AID值和 NFC 终端当前 的能量状态均匹配的 AID路由项。 Steps: Determine whether the routing table contains an AID routing entry that matches the AID value and the current energy state of the NFC terminal.
若是, 则执行步骤 2 '; 若否, 说明路由表中不存在与该数据帧 匹配的 AID路由项, 可以利用现有技术中的方法确定目标 SE , 并向 目标 SE发送数据, 则结束。 If yes, step 2 ' is performed; if no, it indicates that there is no AID routing item matching the data frame in the routing table, and the target SE can be determined by using the method in the prior art, and the data is sent to the target SE, and then the process ends.
步骤 2 ': 将所匹配的 AID路由项作为目标路由项; 将目标路由 项指向的 SE作为目标 SE。 Step 2 ': Use the matched AID routing entry as the destination routing entry; use the SE pointed to by the destination routing entry as the target SE.
步骤 3 ': 判断目标 SE是否为默认 SE。 Step 3 ': Determine if the target SE is the default SE.
若否, 说明终端当前的能量状态不为低功耗状态, 则执行步骤 308 ;若是,说明终端当前的能量状态为低功耗状态,则执行步骤 309。 If no, indicating that the current energy state of the terminal is not in the low power state, step 308 is performed; if yes, indicating that the current energy state of the terminal is a low power state, step 309 is performed.
本发明实施例提供的路由方法,当 NFC终端处于低功耗状态时 , NFCC在按照 AID路由方式查询路由的过程中, 可以从失效状态的 路由项集合中确定与数据帧匹配的 AID路由项作为目标路由项, 也 就是说, NFCC 可以从去激活状态的 SE 中确定与数据帧匹配的 SE 作为目标 SE。 这样, 当数据帧针对的应用为处于去激活状态的 SE 中的应用时, 用户能够正常使用该应用, 从而能够提高用户体验。 In the routing method provided by the embodiment of the present invention, when the NFC terminal is in a low power consumption state, the NFCC may determine the AID routing item matching the data frame from the set of routing items in the invalid state in the process of querying the route according to the AID routing manner. The target routing entry, that is, the NFCC can determine the SE matching the data frame as the target SE from the SE in the deactivated state. In this way, when the application targeted by the data frame is an application in the SE in the deactivated state, the user can use the application normally, thereby improving the user experience.
实施例 2 Example 2
本实施例中, NFCC按照 NFCID2路由方式确定路由表中是否包 含与 NFCC 获取的数据帧匹配的路由项。 本实施例的执行主体为 NFCC。 In this embodiment, the NFCC determines, according to the NFCID2 routing manner, whether the routing table contains a routing entry that matches the data frame acquired by the NFCC. The execution body of this embodiment is NFCC.
如图 4所示, 为本实施例提供的一种路由方法, 包括: As shown in FIG. 4, a routing method provided in this embodiment includes:
401 : NFCC接收 RCLF发送的数据帧, 并获取 NFC终端当前的 能量状态。 401: The NFCC receives the data frame sent by the RCLF, and obtains the current energy state of the NFC terminal.
402 : 在确定 NFC 终端正在使用 T3 T RF ( Type 3 Tag Radio Frequency , 类型 3标签无线频率)协议, 且路由表中包含与 NFC终 端当前的能量状态匹配的 NFCID2 路由项时, 解析该数据帧, 得到 解析结果。 402: parsing the data frame when determining that the NFC terminal is using the T3 T RF (Type 3 Tag Radio Frequency) protocol, and the routing table includes an NFCID2 routing entry that matches the current energy state of the NFC terminal. Get the result of the analysis.
示例性的 , NFCID2路由项包含该 NFCID2路由项所适用的能量 状态。 一般地, 路由表中可以包含一个 NFCID2 路由项, 或者不包 含 NFCID2 路由项。 当路由表中包含的 NFCID2 路由项所适用的能 量状态与 NFC 终端当前的能量状态相同时, 认为路由表中包含与 NFC终端当前的能量状态匹配的 NFCID2路由项。 Exemplarily, the NFCID2 routing entry contains the energy status to which the NFCID2 routing entry applies. Generally, the routing table can contain an NFCID2 routing entry or no NFCID2 routing entry. When the energy status of the NFCID2 routing entry included in the routing table is the same as the current energy status of the NFC terminal, the routing table is considered to contain the NFCID2 routing entry that matches the current energy status of the NFC terminal.
403 : 判断解析结果中是否包含 SENSF REQ ( SENSE TECH F REQUEST , 技术 F探测帧) 指令。 403 : Determine whether the SENSF REQ ( SENSE TECH F REQUEST ) command is included in the analysis result.
若是, 说明需要配置 NFCID2信息表, 则执行步骤 404 ; 若否, 则说明需要按照现有技术中的方式为该数据帧确定目标 SE ,则结束。 If yes, it is required to configure the NFCID2 information table, then step 404 is performed; if not, it means that the target SE needs to be determined for the data frame according to the prior art, and then the process ends.
示例性的, SENSF— REQ 指令是上述实施例中描述的 "配置 NFCID2信息表的指令" 的一种具体实现方式。 Illustratively, the SENSF_REQ instruction is a specific implementation of the "instruction to configure the NFCID2 information table" described in the above embodiment.
404 : 向激活状态的 SE发送 SENSF— REQ指令, 以使得接收到 SENSF REQ指令的 SE向 NFCC回复响应消息。 404: Send a SENSF_REQ instruction to the SE in an active state, so that the SE that receives the SENSF REQ instruction replies with a response message to the NFCC.
其中, 当一 SE不支持 NFCID2路由项时, 该 SE向 NFCC回复 的响应信息中包含该 SE不支持 NFCID2路由项的信息; 当一 SE支 持 NFCID2路由项时, 该 SE向 NFCC 回复的响应信息中包含该 SE 对应的 NFCID2值。 When an SE does not support the NFCID2 routing entry, the response information returned by the SE to the NFCC includes information that the SE does not support the NFCID2 routing entry. When an SE supports the NFCID2 routing entry, the response information of the SE to the NFCC is returned. Contains the NFCID2 value corresponding to the SE.
405 : 判断各响应消息中是否包含 NFCID2值。 405: Determine whether the NFCID2 value is included in each response message.
若是, 说明可以按照现有技术中的方法配置 NFCID2 信息表, 则结束; 若否, 则执行步骤 406。 If yes, the NFCID2 information table can be configured according to the method in the prior art. Then, if not, step 406 is performed.
406 : 判断 NFC终端当前的能量状态是否为低功耗状态。 406: Determine whether the current energy state of the NFC terminal is a low power state.
若是, 则执行步骤 407 ; 若否, 则结束。 If yes, go to step 407; if no, end.
407 : 向去激活状态的 SE发送用于激活该 SE的激活 /去激活指 令, 使得该 SE的状态由去激活状态切换为激活状态。 407: Sending an activation/deactivation command for activating the SE to the deactivated SE, so that the state of the SE is switched from the deactivated state to the activated state.
408 : 向步骤 407 中的 SE发送 SENSF— REQ指令, 以使得接收 到 SENSF— REQ指令的 SE向 NFCC回复响应消息。 408: Send a SENSF_REQ instruction to the SE in step 407, so that the SE receiving the SENSF_REQ instruction returns a response message to the NFCC.
409: 判断各响应消息中是否包含 NFCID2值。 409: Determine whether the NFCID2 value is included in each response message.
若是, 则执行步骤 410 ; 若否, 说明 NFC终端中的 SE均不支持 NFCID2路由项, 则结束。 If yes, go to step 410; if no, the SE in the NFC terminal does not support the NFCID2 routing entry, and the process ends.
410 : 将支持 NFCID2路由项的 SE与每个支持 NFCID2路由项 的 SE对应的 NFCID2值之间的关系构成 NFCID2信息表。 410: The relationship between the SE supporting the NFCID2 routing entry and the NFCID2 value corresponding to each SE supporting the NFCID2 routing entry constitutes an NFCID2 information table.
执行步骤 410之后, 则结束。 After step 410 is performed, it ends.
示例性的, NFCID2信息表用于使 NFCC确定第二数据帧发送至 的目标 SE , 第二数据帧是指步骤 401 中的 "数据帧" 之后的、 第一 个未包含配置 NFCID2 信息表的指令的数据帧。 进一步地, 可以描 述为: NFCC再次接收到一数据帧时,若该数据帧中包含 SENSF REQ 指令,则按照上述步骤 404-410的方法为该数据帧配置 NFCID2信息 表; 若该数据帧中不包含 SENSF— REQ指令, 则利用步骤 410 中确 定的 NFDID2 信息表按照现有技术中的方法, 确定该数据帧发送至 的目标 SE。 Exemplarily, the NFCID2 information table is used to cause the NFCC to determine the target SE to which the second data frame is sent, and the second data frame refers to the first instruction that does not include the configuration NFCID2 information table after the "data frame" in step 401. Data frame. Further, it may be described as follows: when the NFCC receives a data frame again, if the data frame includes the SENSF REQ command, the NFCID2 information table is configured for the data frame according to the method of steps 404-410 above; if the data frame is not Including the SENSF_REQ instruction, the target SE to which the data frame is sent is determined according to the method in the prior art by using the NFDID2 information table determined in step 410.
本发明实施例提供的路由方法,当 NFC终端处于低功耗状态时, NFCC在按照 NFCID2路由方式确定 NFCID2信息表的过程中,可以 获取到包含支持 NFCID2路由项的去激活状态的 SE与该 SE对应的 NFCID2值之间的关系, 从而使得辅控制器接收到第二数据帧时, 能 够从本处于去激活状态的 SE 中确定第二数据帧发送至的目标 SE。 这样, 当第二数据帧针对的应用为本处于去激活状态的 SE中的应用 时, 用户能够正常使用该应用, 从而提高用户体验。 In the routing method provided by the embodiment of the present invention, when the NFC terminal is in a low-power state, the NFCC can obtain the SE and the SE including the deactivated state supporting the NFCID2 routing item in the process of determining the NFCID2 information table according to the NFCID2 routing manner. The relationship between the corresponding NFCID2 values, so that when the secondary controller receives the second data frame, the target SE to which the second data frame is transmitted can be determined from the SE in the deactivated state. In this way, when the application targeted by the second data frame is an application in the deactivated SE When the user can use the application normally, the user experience is improved.
实施例 3 Example 3
本实施例中,NFCC按照协议路由方式确定路由表中是否包含与 NFCC获取的数据帧匹配的路由项。 本实施例的执行主体为 NFCC。 In this embodiment, the NFCC determines, according to the protocol routing manner, whether the routing table includes a routing entry that matches the data frame acquired by the NFCC. The execution subject of this embodiment is NFCC.
如图 5所示, 为本实施例提供的一种路由方法, 包括: As shown in FIG. 5, a routing method provided in this embodiment includes:
501 : NFCC接收 RCLF发送的数据帧, 并获取 NFC终端当前的 能量状态。 501: The NFCC receives the data frame sent by the RCLF, and obtains the current energy state of the NFC terminal.
502 : 获取 NFC终端当前使用的协议的协议类型。 502: Get the protocol type of the protocol currently used by the NFC terminal.
503 : 判断路由表中有效状态的路由项集合中是否包含与该协议 类型和 NFC终端当前的能量状态均匹配的协议路由项。 503: Determine whether the routing item set of the valid state in the routing table includes a protocol routing item that matches the current energy state of the protocol type and the NFC terminal.
若否, 说明需要从失效状态的路由项集合中确定与该协议类型 和 NFC终端当前的能量状态均匹配的协议路由项作为目标路由项, 则执行步骤 504 ; 若是, 说明可以用现有技术中的方法确定目标 SE , 并向目标 SE发送数据, 则结束。 If no, it is determined that the protocol routing item that matches the current energy state of the protocol type and the NFC terminal is determined as the target routing entry, and step 504 is performed; if yes, the description can be used in the prior art. The method determines the target SE and sends data to the target SE, and then ends.
示例性的, 协议路由项包括: 该协议路由项所适用的协议的协 议类型、 该协议路由项指向的 SE 的 ID、 该协议路由项所适用的能 量状态。 For example, the protocol routing entry includes: a protocol type of a protocol to which the protocol routing entry applies, an ID of the SE pointed to by the protocol routing entry, and an energy state to which the routing entry of the protocol applies.
504 : 判断 NFC终端当前的能量状态是否为低功耗状态。 504: Determine whether the current energy state of the NFC terminal is a low power state.
若是, 则执行步骤 505 ; 若否, 则结束。 If yes, go to step 505; if no, end.
505 : 判断路由表中失效状态的路由项集合中是否包含与该协议 类型和 NFC终端当前的能量状态均匹配的协议路由项。 505: Determine whether the routing item set of the invalid state in the routing table includes a protocol routing item that matches the current energy state of the protocol type and the NFC terminal.
若是, 则执行步骤 506 ; 若否, 说明路由表中不存在与该数据帧 匹配的协议路由项, 可以利用现有技术中的方法确定目标 SE (例如 , 按照商家规定的路由项作为 目标路由项或者通过其他路由方式确定 目标路由项, 进而确定目标 SE ) , 并向目标 SE发送数据, 则结束。 If yes, go to step 506; if no, it means that there is no protocol routing item matching the data frame in the routing table, and the target SE can be determined by using the method in the prior art (for example, according to the routing item specified by the merchant as the target routing item) Or determine the target routing entry by other routing methods, and then determine the target SE), and send data to the target SE, and then terminate.
506 : 将所匹配的协议路由项作为目标路由项; 将目标路由项指 向的 SE作为目标 SE。 507-508与实施例 1 中的步骤 308-309相同。 506: The matched protocol routing item is used as the target routing entry; and the SE pointed to by the target routing entry is used as the target SE. 507-508 are the same as steps 308-309 in the first embodiment.
可选的, 步骤 503 -505 可以用上述实施例 1 中的步骤 1 -步骤 2 的构思实现。 另外可选的, 步骤 503 -506 可以用上述实施例 1 中的 步骤 1 -步骤 2的构思实现。 Optionally, steps 503-505 can be implemented by using the concept of step 1 - step 2 in the above embodiment 1. Alternatively, steps 503-506 can be implemented by the concept of step 1 - step 2 in the above embodiment 1.
本发明实施例提供的路由方法,当 NFC终端处于低功耗状态时 , NFCC在按照协议路由方式查询路由的过程中,可以从失效状态的路 由项集合中确定与 NFC终端当前使用的协议的协议类型和 NFC终端 当前的能量状态均匹配的协议路由项作为目标路由项, 也就是说, NFCC 可以从去激活状态的 SE 中确定与 NFC 终端当前使用的协议 的协议类型和 NFC终端当前的能量状态均匹配的 SE作为目标 SE。 这样, 当数据帧针对的应用为处于去激活状态的 SE中的应用时, 用 户能够正常使用该应用, 从而能够提高用户体验。 In the routing method provided by the embodiment of the present invention, when the NFC terminal is in a low power consumption state, the NFCC may determine the protocol of the protocol currently used by the NFC terminal from the set of routing items in the invalid state in the process of querying the route according to the protocol routing manner. The protocol routing item matching the type and the current energy status of the NFC terminal is used as the target routing item. That is, the NFCC can determine the protocol type of the protocol currently used by the NFC terminal and the current energy state of the NFC terminal from the deactivated SE. The matched SEs are the target SEs. In this way, when the application targeted by the data frame is an application in the SE in the deactivated state, the user can use the application normally, thereby improving the user experience.
实施例 4 Example 4
本实施例中,NFCC按照技术路由方式确定路由表中是否包含与 NFCC 获取的一数据帧匹配的目标路由项。 本实施例的执行主体为 NFCC。 In this embodiment, the NFCC determines, according to the technical routing manner, whether the routing table contains a target routing entry that matches a data frame acquired by the NFCC. The execution subject of this embodiment is NFCC.
本实施例与步骤实施例 3 的区别在于: 实施例 3 中的 "协议的 协议类型" 在本实施例中为 "技术的技术类型"; 实施例 3 中的 "协 议类型" 在本实施例中为 "技术类型"; 实施例 3 中的 "协议路由项" 在本实施例中为 "技术路由项"。 The difference between this embodiment and the step embodiment 3 is that: "the protocol type of the protocol" in the embodiment 3 is "the technical type of the technology" in the embodiment; the "protocol type" in the embodiment 3 is in this embodiment. "Technical Type"; "Protocol Routing Item" in Embodiment 3 is "Technical Routing Item" in this embodiment.
本发明实施例提供的路由方法,当 NFC终端处于低功耗状态时 , NFCC在按照技术路由方式查询路由的过程中,可以从失效状态的路 由项集合中确定与接收数据帧时使用的技术的技术类型和 NFC终端 当前的能量状态均匹配的技术路由项作为目标路由项, 也就是说, NFCC可以从去激活状态的 SE中确定与接收数据帧时使用的技术的 技术类型和 NFC终端当前的能量状态均匹配的 SE作为目标 SE。 这 样, 当数据帧针对的应用为处于去激活状态的 SE中的应用时, 用户 能够正常使用该应用, 从而能够提高用户体验。 In the routing method provided by the embodiment of the present invention, when the NFC terminal is in a low power consumption state, the NFCC may determine the technology used when receiving the data frame from the set of routing items in the invalid state in the process of querying the route according to the technical routing manner. The technical routing item matching the technical type and the current energy state of the NFC terminal is used as the target routing item, that is, the NFCC can determine the technology type of the technology used when receiving the data frame and the current NFC terminal from the SE in the deactivated state. The SE whose energy states are matched is the target SE. Thus, when the application targeted by the data frame is an application in the deactivated SE, the user The application can be used normally, thereby improving the user experience.
实施例 5 Example 5
本实施例中, NFCC按照路由方式的优先级顺序进行路由查询; 其中, 路由方式的优先级顺序从高到低为: AID路由方式、 NFCID2 路由方式、 切、议路由方式、 技术路由方式。 In this embodiment, the NFCC performs route query according to the priority order of the routing mode. The priority order of the routing mode is as follows: AID routing mode, NFCID2 routing mode, cutting, negotiation routing mode, and technical routing mode.
如图 6所示, 为本实施例提供的一种路由方法, 包括: As shown in FIG. 6, a routing method provided in this embodiment includes:
601 : NFCC接收 RCLF发送的数据帧, 并获取 NFC终端当前的 能量状态。 601: The NFCC receives the data frame sent by the RCLF, and obtains the current energy state of the NFC terminal.
602 : 依次按照 AID路由方式、 NFCID2路由方式、 协议路由方 式、 技术路由方式进行路由查询; 判断是否找到与该数据帧和 NFC 终端当前的能量状态均匹配的目标 SE。 602: Perform route query according to the AID route mode, the NFCID2 route mode, the protocol route mode, and the technical route mode. Determine whether the target SE that matches the current energy state of the data frame and the NFC terminal is found.
若否, 则执行步骤 603 ; 若是, 则结束。 If no, go to step 603; if yes, end.
具体的: 当按照优先级较高的路由方式进行路由查询之后, (针 对 AID路由方式和协议路由方式) 若路由表中有效状态的路由项集 合中不包含与该数据帧匹配的路由项, 或者, (针对 NFCID2路由方 式)若 NFCID2信息表中不包含该数据帧对应的目标 SE时, 则执行 优先级较低的路由方式; 当按照优先级最低的路由方式 (技术路由 方式 ) 进行路由查询之后, 没有找到与该数据帧和 NFC终端当前的 能量状态均匹配的目标 SE , 则执行步骤 603。 按照上述列举的几种 路由方式进行查询的具体实现方法可以参考现有技术。 Specific: After the route query is performed according to the route with higher priority, (for AID routing mode and protocol routing mode), if the routing item set in the routing state in the routing table does not contain the routing entry matching the data frame, or (For NFCID2 routing mode) If the target SE corresponding to the data frame is not included in the NFCID2 information table, the lower priority routing mode is executed; after the routing query is performed according to the lowest priority routing mode (technical routing mode) If the target SE that matches the current energy state of the data frame and the NFC terminal is not found, step 603 is performed. The specific implementation method for performing the query according to the routing methods listed above may refer to the prior art.
603 : 判断 NFC终端当前的能量状态是否为低功耗状态。 603: Determine whether the current energy state of the NFC terminal is a low power state.
若是, 则执行步骤 604 ; 若否, 则结束。 If yes, go to step 604; if no, end.
604 : 判断路由表中失效状态的路由项集合中是否包含与该数据 帧和 NFC终端当前的能量状态均匹配的路由项。 604: Determine whether the routing item set of the invalid state in the routing table includes a routing item that matches the current energy state of the data frame and the NFC terminal.
若是, 则执行步骤 605 ; 若否, 则结束。 If yes, go to step 605; if no, end.
需要说明的是, 当执行步骤 603 时, 说明在步骤 602 中 NFCC 按照 NFCID2 路由方式进行路由查询时, 该数据帧中不包含配置 NFCID2信息表的指令; 因此, 在执行步骤 604时, NFCC可以按照 路由方式的优先级顺序, 依次判断路由表中失效状态的路由项集合 中是否包含与该数据帧和 NFC终端当前的能量状态均匹配的 AID路 由项、 协议路由项、 技术路由项。 具体的实现方式可以参考上述实 施例 1、 3、 4的相关部分。 It should be noted that, when step 603 is executed, it is indicated that when the NFCC performs route query according to the NFCID2 routing mode in step 602, the data frame does not include the configuration. The instruction of the NFCID2 information table; therefore, when performing step 604, the NFCC may sequentially determine, according to the priority order of the routing manner, whether the set of routing items in the invalid state in the routing table includes the current energy status of the data frame and the NFC terminal. Matching AID routing entries, protocol routing entries, and technical routing entries. For specific implementation manners, reference may be made to the relevant parts of the foregoing embodiments 1, 3, and 4.
605 : 将所匹配的路由项作为目标路由项; 将目标路由项指向的 SE作为目标 SE。 605: The matched routing item is used as the target routing item; the SE pointed to by the target routing item is used as the target SE.
606-607与实施例 1 中的步骤 308-309相同。 606-607 are the same as steps 308-309 in embodiment 1.
可选的, 步骤 602-604 可以用上述实施例 1 中的步骤 1 -步骤 2 的构思的实现。 另外可选的, 步骤 602-605 可以用上述实施例 1 中 的步骤 1 -步骤 2的构思实现。 Alternatively, steps 602-604 may be implemented by the concept of step 1 - step 2 in the above embodiment 1. Alternatively, steps 602-605 can be implemented by the concept of step 1 - step 2 in the above embodiment 1.
本发明实施例提供的路由方法,当 NFC终端处于低功耗状态时 , NFCC在按照现有技术中的路由方式查询路由之后,可以从失效状态 的路由项集合中确定与数据帧和 NFC终端当前的能量状态均匹配的 路由项作为目标路由项, 也就是说, NFCC可以从去激活状态的 SE 中确定与数据帧和 NFC单当前的能量状态均匹配的 SE作为目标 SE。 这样, 当数据帧针对的应用为处于去激活状态的 SE中的应用时, 用 户能够正常使用该应用, 从而能够提高用户体验。 According to the routing method provided by the embodiment of the present invention, when the NFC terminal is in a low power consumption state, the NFCC can determine the current data frame and the NFC terminal from the set of routing items in the invalid state after querying the route according to the routing method in the prior art. The routing items whose energy states are matched are used as the target routing items. That is, the NFCC can determine the SE that matches the current energy state of the data frame and the NFC list as the target SE from the SE of the deactivated state. In this way, when the application targeted by the data frame is an application in the SE in the deactivated state, the user can use the application normally, thereby improving the user experience.
需要说明的是, 实施例 5 中描述的是, NFCC在按照路由方式的 优先级顺序中优先级最低的路由方式进行路由查询之后, 没有找到 与一数据帧和 NFC终端当前的能量状态均匹配的目标 SE 时, 依次 判断路由表中失效状态的路由项集合中是否包含与该数据帧和 NFC 终端当前的能量状态均匹配的 AID路由项、 协议路由项、 技术路由 项, 以确定目标 SE。 It should be noted that, in the embodiment 5, the NFCC does not find a current data state matching with a data frame and an NFC terminal after performing a route query in the routing mode with the lowest priority among the routing priority orders. The target SE is determined by determining whether the set of routing items in the routing state in the routing table includes the AID routing item, the protocol routing item, and the technical routing item that match the current energy status of the data frame and the NFC terminal to determine the target SE.
除此之外, NFCC还可以在按照任一种或者多种路由方式进行路 由查询之后, 没有找到与一数据帧和 NFC终端当前的能量状态均匹 配的目标 SE的情况下, 即按照上述实施例 1 -4中相应的步骤确定目 标 SE ; 例如, 在按照 AID路由方式进行路由查询之后, 没有找到与 一数据帧和 NFC终端当前的能量状态均匹配的目标 SE ,则判断路由 表中失效状态的路由项集合中是否包含与该数据帧和 NFC终端当前 的能量状态均匹配的 AID路由项, 若否, 则依次按照 NFCID2路由 方式、 协议路由方式进行路由查询。 In addition, the NFCC may also not find a target SE that matches the current energy state of a data frame and an NFC terminal after performing routing query according to any one or more routing manners, that is, according to the above embodiment. The corresponding steps in 1 - 4 determine the order For example, after the route query is performed according to the AID routing manner, the target SE that matches the current energy state of a data frame and the NFC terminal is not found, and whether the routing item set of the invalid state in the routing table is included The AID routing entry that matches the current energy status of the data frame and the NFC terminal. If no, the route query is performed according to the NFCID2 routing mode and the protocol routing mode.
实施例三 Embodiment 3
如图 7所示, 为本发明实施例提供的一种终端 7 , 用以执行图 1 所示的路由方法, 该终端 7 包括: As shown in FIG. 7, a terminal 7 is provided for performing the routing method shown in FIG. 1 according to an embodiment of the present invention. The terminal 7 includes:
获取单元 71 , 用于获取数据帧和所述终端当前的能量状态; 第一确定单元 72 , 用于从去激活状态的安全单元 SE 中确定与 所述数据帧和所述终端当前的能量状态均匹配的 SE作为目标 SE ; 激活单元 73 , 用于激活所述目标 SE ; The obtaining unit 71 is configured to acquire a data frame and a current energy state of the terminal. The first determining unit 72 is configured to determine, from the security unit SE in the deactivated state, the current energy state of the data frame and the terminal. The matching SE is used as the target SE; the activation unit 73 is configured to activate the target SE;
路由单元 74 , 用于将所述数据帧发送至激活后的所述目标 SE。 可选的, 所述第一确定单元 71具体用于: 当满足下列至少一个 条件时,从去激活状态的安全单元 SE中确定与所述数据帧和所述终 端当前的能量状态均匹配的 SE作为目标 SE ; 所述条件包括: 所述 终端当前的能量状态为低功耗状态,激活状态的 SE中不包含与所述 数据帧和所述终端当前的能量状态均匹配的 SE。 The routing unit 74 is configured to send the data frame to the target SE after activation. Optionally, the first determining unit 71 is specifically configured to: determine, from the security unit SE in the deactivated state, an SE that matches the current energy state of the data frame and the terminal, when at least one of the following conditions is met As the target SE, the condition includes: the current energy state of the terminal is a low power consumption state, and the SE of the active state does not include an SE that matches the current data state of the data frame and the terminal.
可选的, 如图 8所示, 所述终端 7还包括: Optionally, as shown in FIG. 8, the terminal 7 further includes:
去激活单元 75 , 用于在所述终端当前的能量状态为低功耗状态 时, 去激活默认 SE ; 所述默认 SE是指预先设置的、 在所述终端当 前的能量状态为低功耗状态时处于激活状态的 SE。 The deactivation unit 75 is configured to: when the current energy state of the terminal is a low power consumption state, deactivate the default SE; the default SE is preset, and the current energy state of the terminal is a low power state. The SE that is active.
可选的, 如图 8所示, 所述终端 7还包括: Optionally, as shown in FIG. 8, the terminal 7 further includes:
第二确定单元 76 , 用于按照第一路由方式确定激活状态的安全 单元 SE 中不包含与所述数据帧和所述终端当前的能量状态均匹配 的 SE ; 所述第一路由方式包括: 应用标识符 AID路由方式、 协议路 由方式、 技术路由方式; 所述第一确定单元 72具体用于: 从失效状态的路由项集合中确 定与所述数据帧和所述终端当前的能量状态均匹配的路由项作为目 标路由项; 所述失效状态的路由项集合中的路由项指向的 SE处于去 激活状态; 将所述目标路由项指向的 SE作为目标 SE。 The second determining unit 76 is configured to: the security unit SE configured to determine the activation state according to the first routing manner does not include an SE that matches the current energy state of the data frame and the terminal; the first routing manner includes: Identifier AID routing mode, protocol routing mode, and technical routing mode; The first determining unit 72 is specifically configured to: determine, from the set of routing items in the invalid state, a routing item that matches the current energy status of the data frame and the terminal as a target routing item; The SE pointed to by the routing entry in the set is in a deactivated state; the SE pointed to by the target routing entry is used as the target SE.
可选的, 如图 8所示, 所述终端 7还包括: Optionally, as shown in FIG. 8, the terminal 7 further includes:
修改单元 77 , 用于将所述目标路由项的状态由失效状态修改为 有效状态; a modifying unit 77, configured to modify a state of the target routing entry from a failed state to an active state;
路由单元 74具体用于, 将所述数据帧经有效状态的所述目标路 由项发送至激活后的所述目标 SE。 The routing unit 74 is specifically configured to send the target route item of the data frame in an active state to the activated target SE.
可选的, 所述在预设切换策略包含所述目标 SE的标识时, 激活 所述目标 SE ; 所述预设切换策略用于指示所述终端具有切换 SE 的 激活 /去激活状态的权限, 所述切换策略包含所述终端能够控制切换 的 SE的标识。 Optionally, when the preset switching policy includes the identifier of the target SE, the target SE is activated; the preset switching policy is used to indicate that the terminal has the right to switch the activation/deactivation status of the SE, The handover policy includes an identifier of the SE that the terminal can control to switch.
本发明实施例提供的终端,能够从去激活状态的 SE中确定与数 据帧和终端当前的能量状态均匹配的 SE作为目标 SE , 并向目标 SE 发送该数据帧。 这样, 当一数据帧针对的应用为去激活状态的 SE中 的应用时, 用户能够正常使用该应用, 从而提高用户体验。 The terminal provided by the embodiment of the present invention can determine, from the SE in the deactivated state, the SE that matches the data frame and the current energy state of the terminal as the target SE, and sends the data frame to the target SE. In this way, when the application targeted by a data frame is an application in the deactivated SE, the user can use the application normally, thereby improving the user experience.
实施例四 Embodiment 4
如图 9所示, 为本发明实施例提供的一种终端 9 , 用以执行图 1 所示的路由方法, 该终端 9 : 存储器 9 1、 控制器 92和至少一个安全 单元 SE93 ; 其中, As shown in FIG. 9, a terminal 9 is provided for performing the routing method shown in FIG. 1 , the terminal 9 is: a memory 9 1 , a controller 92 and at least one security unit SE93;
存储器 91 用于存储一组代码, 该代码用于控制控制器 92执行 以下动作: 获取数据帧和所述终端当前的能量状态; 从去激活状态 的 SE 中确定与所述数据帧和所述终端当前的能量状态均匹配的 SE 作为目标 SE ; 激活所述目标 SE ; 将所述数据帧发送至激活后的所述 目标 SE。 可选的, 控制器 92可以为 DH或辅控制器 (如 NFCC )。 The memory 91 is configured to store a set of codes for the control controller 92 to perform the following actions: acquiring a data frame and a current energy state of the terminal; determining from the SE in the deactivated state with the data frame and the terminal The current energy state matches the SE as the target SE; the target SE is activated; the data frame is sent to the target SE after activation. Alternatively, the controller 92 can be a DH or a secondary controller (such as NFCC).
可选的,所述控制器 92具体用于: 当满足下列至少一个条件时, 从去激活状态的安全单元 SE 中确定与所述数据帧和所述终端当前 的能量状态均匹配的 SE作为目标 SE ; 所述条件包括: 所述终端当 前的能量状态为低功耗状态,激活状态的 SE中不包含与所述数据帧 和所述终端当前的能量状态均匹配的 SE。 Optionally, the controller 92 is specifically configured to: when at least one of the following conditions is met, Determining, from the deactivated state security unit SE, an SE that matches the data frame and the current energy state of the terminal as the target SE; the condition includes: the current energy state of the terminal is a low power state, activated The SE of the state does not contain an SE that matches both the data frame and the current energy state of the terminal.
可选的, 所述控制器 92还用于, 在所述终端当前的能量状态为 低功耗状态时, 去激活默认 SE ; 所述默认 SE是指预先设置的、 在 所述终端当前的能量状态为低功耗状态时处于激活状态的 SE。 Optionally, the controller 92 is further configured to: when the current energy state of the terminal is a low power consumption state, deactivate a default SE; the default SE refers to a preset current energy at the terminal. The SE that is active when the state is a low power state.
可选的, 所述控制器 92还用于, 按照第一路由方式确定激活状 态的安全单元 SE 中不包含与所述数据帧和所述终端当前的能量状 态均匹配的 SE ;所述第一路由方式包括:应用标识符 AID路由方式、 协议路由方式、 技术路由方式; Optionally, the controller 92 is further configured to: in the security unit SE that determines the activation state according to the first routing manner, does not include an SE that matches the current energy state of the data frame and the terminal; The routing mode includes: application identifier AID routing mode, protocol routing mode, and technical routing mode;
所述控制器 92具体用于: 从失效状态的路由项集合中确定与所 述数据帧和所述终端当前的能量状态均匹配的路由项作为目标路由 项; 所述失效状态的路由项集合中的路由项指向的 SE处于去激活状 态; 将所述目标路由项指向的 SE作为目标 SE。 The controller 92 is specifically configured to: determine, from the set of routing items in the invalid state, a routing item that matches the current energy status of the data frame and the terminal as a target routing item; and the routing item set in the invalid state The SE pointed to by the routing entry is in a deactivated state; the SE pointed to by the target routing entry is used as the target SE.
可选的, 所述控制器 92还用于, 将所述目标路由项的状态由失 效状态修改为有效状态; Optionally, the controller 92 is further configured to: modify a state of the target routing entry from a failure state to an active state;
所述控制器 92具体用于, 将所述数据帧经有效状态的所述目标 路由项发送至激活后的所述目标 SE。 The controller 92 is specifically configured to send the target routing item of the data frame in an active state to the activated target SE.
可选的, 所述控制器 92还用于, 在预设切换策略包含所述目标 SE 的标识时, 激活所述目标 SE ; 所述预设切换策略用于指示所述 终端具有切换 SE 的激活 /去激活状态的权限, 所述切换策略包含所 述终端能够控制切换的 SE的标识。 Optionally, the controller 92 is further configured to: when the preset switching policy includes the identifier of the target SE, activate the target SE; the preset switching policy is used to indicate that the terminal has the activation of the switching SE The authority to deactivate the state, the handover policy including an identifier of the SE that the terminal can control to switch.
本发明实施例提供的终端,能够从去激活状态的 SE中确定与数 据帧和终端当前的能量状态均匹配的 SE作为目标 SE , 并向目标 SE 发送该数据帧。 这样, 当数据帧针对的应用为去激活状态的 SE中的 应用时, 用户能够正常使用该应用, 从而提高用户体验。 实施例五 The terminal provided by the embodiment of the present invention can determine the SE that matches the data frame and the current energy state of the terminal as the target SE from the SE in the deactivated state, and send the data frame to the target SE. In this way, when the application targeted by the data frame is an application in the deactivated SE, the user can use the application normally, thereby improving the user experience. Embodiment 5
如图 10 所示, 为本发明实施例提供的一种终端 10, 用以执行 图 2所示的路由方法, 该终端 10 包括: As shown in FIG. 10, a terminal 10 is provided for performing the routing method shown in FIG. 2, where the terminal 10 includes:
第一获取单元 10A, 用于获取第一数据帧和所述终端当前的能 量状态; The first obtaining unit 10A is configured to acquire a first data frame and a current energy state of the terminal.
第二获取单元 10B, 用于在近场通信标识符类型 NFCID2 路由 项包含的能量状态与所述终端当前的能量状态匹配, 且所述第一数 据帧中包含配置 NFCID2 信息表的指令时, 获取包含支持 NFCID2 路由项的去激活状态的 SE与所述 SE对应的 NFCID2值之间的关系 的 NFCID2信息表; 所述 NFCID2信息表用于使所述终端 10确定第 二数据帧发送至的目标 SE, 所述第二数据帧是指所述第一数据帧之 后的、 第一个没有包含配置 NFCID2信息表的指令的数据帧。 The second obtaining unit 10B is configured to: when the energy status included in the near field communication identifier type NFCID2 routing item matches the current energy status of the terminal, and the first data frame includes an instruction for configuring the NFCID2 information table, obtain An NFCID2 information table including a relationship between an SE of a deactivated state supporting an NFCID2 routing item and an NFCID2 value corresponding to the SE; the NFCID2 information table is used to cause the terminal 10 to determine a target SE to which the second data frame is transmitted The second data frame refers to a data frame that is not included in the first data frame and that does not include an instruction to configure the NFCID2 information table.
可选的, 所述第二获取单元 10B具体用于: Optionally, the second acquiring unit 10B is specifically configured to:
激活去激活状态的 SE; Activate the deactivated SE;
向激活后的所述 SE发送所述配置 NFCID2信息表的指令; 接收所述 SE发送的包含 NFCID2值的响应消息; Sending, by the SE after the activation, the instruction for configuring the NFCID2 information table; receiving a response message that is sent by the SE and including an NFCID2 value;
根据所述响应消息生成 NFCID2信息表。 An NFCID2 information table is generated based on the response message.
本发明实施例提供的终端, 获取的 NFCID2 信息表中包含支持 NFCID2路由项的去激活状态的 SE与该 SE对应的 NFCID2值之间 的关系, 从而使得终端接收到第二数据帧时, 能够从本处于去激活 状态的 SE 中确定第二数据帧发送至的目标 SE。 这样, 当第二数据 帧针对的应用为本处于去激活状态的 SE中的应用时,用户能够正常 使用该应用, 从而提高用户体验。 In the terminal provided by the embodiment of the present invention, the obtained NFCID2 information table includes a relationship between an SE of the deactivated state supporting the NFCID2 routing item and an NFCID2 value corresponding to the SE, so that when the terminal receives the second data frame, the terminal can The target SE to which the second data frame is transmitted is determined in the SE in the deactivated state. In this way, when the application targeted by the second data frame is an application in the SE in the deactivated state, the user can use the application normally, thereby improving the user experience.
实施例六 Embodiment 6
如图 11所示, 为本发明实施例提供的一种终端 11, 包括: 存储 器 11A、 控制器 11B和至少一个安全单元 SE11C; 其中, As shown in FIG. 11, a terminal 11 according to an embodiment of the present invention includes: a memory 11A, a controller 11B, and at least one security unit SE11C;
存储器 11A用于存储一组代码, 该代码用于控制控制器 11B执 行以下动作: 获取第一数据帧和所述终端当前的能量状态; 在近场 通信标识符类型 NFCID2 路由项包含的能量状态与所述终端当前的 能量状态匹配, 且所述第一数据帧中包含配置 NFCID2 信息表的指 令时, 获取包含支持 NFCID2路由项的去激活状态的 SE与所述 SE 对应的 NFCID2值之间的关系的 NFCID2信息表; 所述 NFCID2信 息表用于使所述终端 1 1 确定第二数据帧发送至的目标 SE , 所述第 二数据帧是指所述第一数据帧之后的、第一个没有包含配置 NFCID2 信息表的指令的数据帧。 可选的, 控制器 1 1 B可以为 DH或辅控制 器 (如 NFCC )。 The memory 11A is for storing a set of codes for controlling the controller 11B to execute Performing the following actions: obtaining a first data frame and a current energy state of the terminal; the energy state included in the near field communication identifier type NFCID2 routing item matches the current energy state of the terminal, and the first data frame is in the When the instruction to configure the NFCID2 information table is included, the NFCID2 information table including the relationship between the SE supporting the deactivated state of the NFCID2 routing item and the NFCID2 value corresponding to the SE is obtained; the NFCID2 information table is used to enable the terminal 1 1 determining a target SE to which the second data frame is sent, the second data frame being the first data frame after the first data frame that does not contain an instruction to configure the NFCID2 information table. Optionally, the controller 1 1 B may be a DH or a secondary controller (such as NFCC).
可选的, 所述控制器 1 1 B具体用于: Optionally, the controller 1 1 B is specifically configured to:
激活去激活状态的 SE ; Activate the deactivated SE;
向激活后的所述 SE发送所述配置 NFCID2信息表的指令; 接收所述 SE发送的包含 NFCID2值的响应消息; Sending, by the SE after the activation, the instruction for configuring the NFCID2 information table; receiving a response message that is sent by the SE and including an NFCID2 value;
根据所述响应消息生成 NFCID2信息表。 An NFCID2 information table is generated based on the response message.
本发明实施例提供的终端, 获取的 NFCID2 信息表中包含支持 NFCID2路由项的去激活状态的 SE与该 SE对应的 NFCID2值之间 的关系, 从而使得终端接收到第二数据帧时, 能够从本处于去激活 状态的 SE 中确定第二数据帧发送至的目标 SE。 这样, 当第二数据 帧针对的应用为本处于去激活状态的 SE中的应用时,用户能够正常 使用该应用, 从而提高用户体验。 In the terminal provided by the embodiment of the present invention, the obtained NFCID2 information table includes a relationship between an SE of the deactivated state supporting the NFCID2 routing item and an NFCID2 value corresponding to the SE, so that when the terminal receives the second data frame, the terminal can The target SE to which the second data frame is transmitted is determined in the SE in the deactivated state. In this way, when the application targeted by the second data frame is an application in the SE in the deactivated state, the user can use the application normally, thereby improving the user experience.
所属领域的技术人员可以清楚地了解到, 为描述的方便和简洁, 上述描述的系统, 装置和单元的具体工作过程, 可以参考前述方法 实施例中的对应过程, 在此不再赘述。 A person skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the system, the device and the unit described above can be referred to the corresponding process in the foregoing method embodiment, and details are not described herein again.
在本申请所提供的几个实施例中, 应该理解到, 所揭露的系统, 装置和方法, 可以通过其它的方式实现。 例如, 以上所描述的装置 实施例仅仅是示意性的, 例如, 所述单元的划分, 仅仅为一种逻辑 功能划分, 实际实现时可以有另外的划分方式, 例如多个单元或组 件可以结合或者可以集成到另一个系统, 或一些特征可以忽略, 或 不执行。 另一点, 所显示或讨论的相互之间的耦合或直接耦合或通 信连接可以是通过一些接口, 装置或单元的间接耦合或通信连接, 可以是电性, 机械或其它的形式。 In the several embodiments provided by the present application, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, such as multiple units or groups. Pieces can be combined or integrated into another system, or some features can be ignored, or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
所述作为分离部件说明的单元可以是或者也可以不是物理上分 开的, 作为单元显示的部件可以是或者也可以不是物理单元, 即可 以位于一个地方, 或者也可以分布到多个网络单元上。 可以根据实 际的需要选择其中的部分或者全部单元来实现本实施例方案的 目 的。 The units described as separate components may or may not be physically separated, and the components displayed as the units may or may not be physical units, and may be located in one place or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the embodiment of the present embodiment.
另外, 在本发明各个实施例中的各功能单元可以集成在一个处 理单元中, 也可以是各个单元单独物理包括, 也可以两个或两个以 上单元集成在一个单元中。 上述集成的单元既可以采用硬件的形式 实现, 也可以采用硬件加软件功能单元的形式实现。 In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be physically included separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
上述以软件功能单元的形式实现的集成的单元, 可以存储在一 个计算机可读取存储介质中。 上述软件功能单元存储在一个存储介 质中, 包括若干指令用以使得一台计算机设备(可以是个人计算机, 服务器, 或者网络设备等) 执行本发明各个实施例所述方法的部分 步骤。 而前述的存储介质包括: U盘、 移动硬盘、 ROM ( Read-Only Memory , 只读存储器)、 RAM ( Random Access Memory , 随机存取 存储器)、 磁碟或者光盘等各种可以存储程序代码的介质。 The above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium. The software functional unit described above is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform portions of the steps of the various embodiments of the present invention. The foregoing storage medium includes: a U disk, a mobile hard disk, a ROM (Read-Only Memory), a RAM (Random Access Memory), a disk or an optical disk, and the like, which can store program codes. .
最后应说明的是: 以上实施例仅用以说明本发明的技术方案, 而非对其限制; 尽管参照前述实施例对本发明进行了详细的说明, 本领域的普通技术人员应当理解: 其依然可以对前述各实施例所记 载的技术方案进行修改, 或者对其中部分技术特征进行等同替换; 而这些修改或者替换, 并不使相应技术方案的本质脱离本发明各实 施例技术方案的精神和范围。 It should be noted that the above embodiments are only for explaining the technical solutions of the present invention, and are not intended to be limiting; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art that: The technical solutions described in the foregoing embodiments are modified, or some of the technical features are equivalently replaced. The modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2014/083349 WO2016015258A1 (en) | 2014-07-30 | 2014-07-30 | Routing method and terminal |
CN201480075794.6A CN106031239B (en) | 2014-07-30 | 2014-07-30 | A routing method and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2014/083349 WO2016015258A1 (en) | 2014-07-30 | 2014-07-30 | Routing method and terminal |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2016015258A1 true WO2016015258A1 (en) | 2016-02-04 |
Family
ID=55216619
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2014/083349 WO2016015258A1 (en) | 2014-07-30 | 2014-07-30 | Routing method and terminal |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106031239B (en) |
WO (1) | WO2016015258A1 (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102100121A (en) * | 2008-07-20 | 2011-06-15 | 三星电子株式会社 | Method and system for managing multiple applications in near field communication |
CN103368612A (en) * | 2012-03-21 | 2013-10-23 | 英飞凌科技股份有限公司 | Targeted muting for communication between electronic appliances |
US20130299596A1 (en) * | 2012-05-08 | 2013-11-14 | Samsung Electronics Co., Ltd. | Apparatus and method for selecting secure element in near field communication device |
CN103843020A (en) * | 2011-09-18 | 2014-06-04 | 谷歌公司 | One-click offline buying |
CN103942898A (en) * | 2013-01-22 | 2014-07-23 | 华为终端有限公司 | Method, mobile terminal and POS machine for realizing security element selection in near field communication |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE102012102383A1 (en) * | 2012-03-21 | 2013-09-26 | Infineon Technologies Ag | Control method by means of forwarding for communication between electronic devices, and corresponding devices |
-
2014
- 2014-07-30 WO PCT/CN2014/083349 patent/WO2016015258A1/en active Application Filing
- 2014-07-30 CN CN201480075794.6A patent/CN106031239B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102100121A (en) * | 2008-07-20 | 2011-06-15 | 三星电子株式会社 | Method and system for managing multiple applications in near field communication |
CN103843020A (en) * | 2011-09-18 | 2014-06-04 | 谷歌公司 | One-click offline buying |
CN103368612A (en) * | 2012-03-21 | 2013-10-23 | 英飞凌科技股份有限公司 | Targeted muting for communication between electronic appliances |
US20130299596A1 (en) * | 2012-05-08 | 2013-11-14 | Samsung Electronics Co., Ltd. | Apparatus and method for selecting secure element in near field communication device |
CN103942898A (en) * | 2013-01-22 | 2014-07-23 | 华为终端有限公司 | Method, mobile terminal and POS machine for realizing security element selection in near field communication |
Also Published As
Publication number | Publication date |
---|---|
CN106031239A (en) | 2016-10-12 |
CN106031239B (en) | 2019-10-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11647548B2 (en) | Network access method, device, and system | |
JP6855573B2 (en) | How to update the location area of the user terminal, access network entity, user terminal and core network entity | |
CN108512870B (en) | Method for accessing IoT platform, IoT platform and IoT device | |
JP5939819B2 (en) | COMMUNICATION DEVICE, COMMUNICATION DEVICE CONTROL METHOD, COMMUNICATION SYSTEM, PROGRAM | |
US9451425B2 (en) | Unified message delivery between portable electronic devices | |
US10164978B2 (en) | Mobile device and method | |
WO2014134787A1 (en) | Radio frequency communication method, device and terminal device for near field communication | |
WO2015196472A1 (en) | Method, terminal, client, smart card and system for accessing wireless network | |
WO2015127889A1 (en) | Profile association management method and device | |
JP7094276B2 (en) | Communication control method and communication system | |
JP2013187707A (en) | Host provision system and communication control method | |
KR20210080937A (en) | Electronic device and method for controlling NAN based communication thereof | |
CN108605206A (en) | A kind of social information exchange method and device | |
US10142832B2 (en) | Information sending and processing method and apparatus | |
JP2016524880A (en) | NFC radio frequency communication control method, apparatus, and system | |
CN111193585B (en) | Communication request management method and device | |
KR20190004664A (en) | Communication apparatus, external apparatus, control method for communication apparatus, control method for external apparatus, and non-transitory computer-readable storage medium | |
KR102131863B1 (en) | Method of performing transition of operation mode for a routing processor | |
JP2019512977A (en) | Method for routing data frames, near field communication controller and terminal | |
WO2016015258A1 (en) | Routing method and terminal | |
CN104468133A (en) | Power over Ethernet (PoE) control method, power sourcing equipment (PSE) and system | |
JP6036983B2 (en) | Information processing apparatus and activation control program | |
WO2014114044A1 (en) | Method, device, and terminal device for near field communication radiofrequency discovery control | |
CN103338117A (en) | Management method, management device and management system of virtual switch | |
US9197497B2 (en) | Configuration of network entities using firmware |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 14898438 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 14898438 Country of ref document: EP Kind code of ref document: A1 |