Near field communication (NFC) method based on cloud terminal, cloud terminal and terminal
By receiving and parsing the target NFC data sent by the terminal, the cloud terminal realizes near-field communication, solving the problem that the cloud terminal cannot perform near-field communication and expanding its functions.
Patent Information
- Application Number
- CN202411542688.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-07
AI Technical Summary
Due to the lack of near-field communication (NFC) hardware modules, cloud terminals cannot realize near-field communication functions similar to physical mobile phones.
By receiving the target NFC data sent by the terminal, analyzing and performing service processing, generating NFC interaction results, thereby realizing near-field communication based on cloud terminals.
It solves the problem that cloud terminals cannot perform near-field communication, realizes NFC data interaction between cloud terminals and physical terminals, and expands the functions of cloud terminals.
Smart Images

Figure CN119402846A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of communication technology, and specifically relates to a near field communication (NFC) method based on a cloud terminal, a cloud terminal, and a terminal. Background Art
[0002] Cloud phone is a virtual mobile phone service based on cloud computing technology. Users can use virtual mobile phones to make calls, send text messages and run applications through the cloud phone platform. However, since it is a virtual mobile phone service, cloud phones do not have all the hardware functions of physical mobile phones. For example, there is no Near Field Communication (NFC) hardware module, so it cannot achieve near field communication like physical mobile phones. Summary of the invention
[0003] The embodiments of the present application provide a cloud terminal-based near field communication (NFC) method, a cloud terminal, and a terminal, which can solve the problem that the cloud terminal cannot realize near field communication.
[0004] In a first aspect, an embodiment of the present application provides a near-field communication (NFC) method based on a cloud terminal, which is applied to a cloud terminal. The method includes: receiving target NFC data sent by a terminal; parsing the target NFC data to obtain NFC simulation data; performing business processing on the NFC simulation data to generate an NFC interaction result.
[0005] In the second aspect, an embodiment of the present application provides a near-field communication NFC method based on a cloud terminal, which is applied to a terminal. The method includes: receiving original NFC data when entering a radio frequency field of an NFC device; transforming the original NFC data to obtain target NFC data; and sending the target NFC data to a cloud terminal.
[0006] In a third aspect, an embodiment of the present application provides a cloud terminal, which includes: a cloud-side transmission module, an NFC simulation module, and an NFC application; wherein the cloud-side transmission module is used to receive target NFC data sent by the terminal; the NFC simulation module is used to parse the target NFC data to obtain NFC simulation data; the NFC application is used to perform business processing on the NFC simulation data to generate an NFC interaction result. The electronic device includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, and when the program or instruction is executed by the processor, the steps of the method described in the first aspect are implemented.
[0007] In a fourth aspect, an embodiment of the present application provides a terminal, which includes: an NFC module, a cloud terminal application, and a terminal-side transmission module; wherein the NFC module is used to receive original NFC data when entering the radio frequency field of the NFC device; the cloud terminal application is used to transform the original NFC data to obtain target NFC data; the terminal-side transmission module is used to send the target NFC data to the cloud terminal.
[0008] In a fifth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented, or the steps of the method described in the second aspect are implemented.
[0009] In a sixth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instructions to implement the steps of the method described in the first aspect, or to implement the steps of the method described in the second aspect.
[0010] In the seventh aspect, an embodiment of the present application provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes a program or instructions, which, when executed, implement the steps of the method described in the first aspect, or implement the steps of the method described in the second aspect.
[0011] In an embodiment of the present application, the cloud terminal receives the target NFC data sent by the terminal, parses the target NFC data, obtains NFC simulation data, performs business processing on the NFC simulation data, and generates an NFC interaction result, thereby realizing near-field communication based on the cloud terminal based on the NFC data interaction between the cloud terminal and the entity's terminal, and solving the problem that the cloud terminal cannot perform near-field communication. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 It is a flowchart of a near field communication NFC method based on a cloud terminal provided in an embodiment of the present application; Figure 2 This is a schematic diagram of a structure for encapsulating NFC data provided by an embodiment of the present application; Figure 3 It is a flowchart of a near field communication NFC method based on a cloud terminal provided in an embodiment of the present application; Figure 4a This is a schematic diagram of the structure of raw NFC data of an APDU type provided in an embodiment of the present application; Figure 4bThis is a schematic diagram of the structure of another APDU type of raw NFC data provided in an embodiment of the present application; Figure 4c This is a schematic diagram of the structure of raw NFC data of the NDEF type provided in an embodiment of the present application; Figure 5 It is a schematic diagram of the structure of a cloud terminal provided in an embodiment of the present application; Figure 6 is a schematic diagram of the structure of a terminal provided in an embodiment of the present application; Figure 7 This is a schematic diagram of the structure of a near field communication (NFC) system based on a cloud terminal provided in an embodiment of the present application; Figure 8 It is a flowchart of another near field communication NFC method based on a cloud terminal provided in an embodiment of the present application; Fig. 9 It is a flowchart of another cloud terminal-based near field communication NFC method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0013] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0014] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0015] In the following, in conjunction with the accompanying drawings, a cloud terminal and a terminal provided in an embodiment of the present application are described in detail through specific embodiments and their application scenarios.
[0016] Figure 1 The flowchart of a cloud terminal-based near field communication (NFC) method provided in an embodiment of the present application is shown. The method can be executed by a cloud terminal. Figure 1 , the method may include the following steps.
[0017] Step 102: Receive target NFC data sent by the terminal.
[0018] The target NFC data is the NFC data after the terminal enters the radio frequency field of the NFC device and transforms the original NFC data transmitted by the NFC device. The terminal is the physical terminal corresponding to the cloud terminal, and the NFC device is a device that supports NFC, including but not limited to access control devices, bus card readers, point of sale terminals (POS), etc.
[0019] Step 104: parse the target NFC data to obtain NFC simulation data.
[0020] The terminal transforms the received original NFC data before sending it to the cloud terminal, such as data encapsulation and data encryption, to ensure the security and accuracy of data transmission. The cloud terminal parses the target NFC data obtained by the transformation process to obtain NFC simulation data, which corresponds to the original NFC data mentioned above and has the same or similar functions as the original NFC data, and can be used by the cloud terminal for business processing. The original NFC data is the data transmitted when the physical terminal communicates with the NFC device in the near field, the target NFC data is the data processed by the physical terminal on the original NFC data, and the NFC simulation data is obtained by parsing the target NFC data.
[0021] For example, the original NFC data is personal identity information, biometric information, security verification information, etc. used for identity authentication, and the target NFC data sent by the physical terminal is the processed personal identity information, biometric information, security verification information, etc. The corresponding NFC simulation data is the personal identity information, biometric information, security verification information, etc. obtained by parsing the target NFC data, which can also be used for identity authentication. For another example, the original NFC data is payment information used for mobile payment, and the target NFC data is the processed payment information. The corresponding NFC simulation data is the payment information obtained by parsing the target NFC data, which can also be used for mobile payment. The cloud terminal performs business processing on the NFC simulation data, such as identity authentication, mobile payment and other businesses, thereby realizing near-field communication between similar terminals and NFC devices.
[0022] Step 106: perform business processing on the NFC simulation data to generate an NFC interaction result.
[0023] Among them, the services may include access control, identity authentication, mobile payment, information transmission, smart tags and the Internet of Things, so the NFC interaction results may include access control passed or denied, identity authentication successful or failed, etc.
[0024] In the embodiment of the present application, when the terminal enters the radio frequency field of the NFC device, it receives the original NFC data, and sends the target NFC data obtained after the original transformation to the cloud terminal. The cloud terminal receives the target NFC data and parses it to obtain NFC simulation data, performs business processing based on the NFC simulation data, and generates an NFC interaction result. For example, for business processing for identity authentication, the entity's terminal processes the personal identity information transmitted by the received NFC device and sends the processed personal identity information to the cloud terminal. The cloud terminal receives the processed personal identity information and parses it, and then performs identity authentication based on the parsed personal identity information, generates an NFC interaction result of identity authentication success or failure, and realizes NFC interaction between the cloud terminal and the NFC device. Through the embodiment of the present application, based on the NFC data interaction between the cloud terminal and the entity's terminal, near-field communication based on the cloud terminal is realized, and the problem that the cloud terminal cannot perform near-field communication is solved.
[0025] In one implementation, the above step 104 of parsing the target NFC data to obtain NFC simulation data may include the following steps.
[0026] Step 1041: decrypt the target NFC data to obtain packaged NFC data.
[0027] Among them, the data encryption method includes the Advanced Encryption Standard (AES). The cloud terminal and the terminal can encrypt the key through an asymmetric encryption algorithm, and then transmit it to each other through the network, or negotiate the key directly face to face. The cloud terminal decrypts the target NFC data based on the key.
[0028] Step 1042: determine original NFC data from the packaged NFC data.
[0029] The encapsulated NFC data includes a data header and a data body. Figure 2 As shown in the figure, the data header includes the data type, data length and verification information of the original NFC data, and the data body is the original NFC data, including the Application Protocol Data Unit (APDU) sending data, APDU response data or NFC Data Exchange Format (NDEF) data. Figure 2, the data header fields of the encapsulated NFC data include: (1) Class Main: Main type, required, there are two types: APDU or NDEF. (2) Class Sub: Subtype, optional. When the main type is APDU, the subtype has two types: send and response. When the main type is NDEF, the subtype is useless. (3) Len Header: required, used to indicate the Header length. (4) Len Body: required, used to indicate the Body length. (5) Verify: Verification information, optional, used to verify the Payload content. The data body includes the payload. When the main type is APDU and the subtype is send, the payload is the APDU send data. When the main type is APDU and the subtype is response, the payload is the APDU response data. When the main type is NDEF, the payload is the NDEF data.
[0030] Step 1043: determine the original NFC data as the NFC simulation data.
[0031] In the embodiment of the present application, in order to ensure the security and accuracy of NFC data transmission, the terminal transforms the original NFC data, including data encryption and data encapsulation, the encapsulated NFC data is obtained by encapsulating the original NFC data, and the target NFC data is obtained by encrypting the encapsulated NFC data. Therefore, after the cloud terminal receives the target NFC data obtained after the transformation process, it parses the target NFC data, including data decryption and data unpacking, and decrypting the target NFC data can obtain encapsulated NFC data, and then unpacking the encapsulated NFC data can obtain NFC simulation data corresponding to the original NFC data, and the NFC simulation data has the same or similar function as the original NFC data, so that the cloud terminal-based near-field communication is realized by performing business processing on the acquired NFC simulation data.
[0032] In one implementation, before performing business processing on the NFC simulation data and generating an NFC interaction result in the above step 106, the method further includes: determining a business processing method corresponding to the NFC simulation data according to a data type of the NFC simulation data.
[0033] The data type includes: APDU type or NDEF type; the business processing mode includes: service mode or broadcast mode.
[0034] In an embodiment of the present application, the cloud terminal determines the business processing method corresponding to the NFC simulation data based on the data type of the NFC simulation data obtained after parsing, thereby accurately processing the NFC simulation data through the business processing method corresponding to the NFC simulation data.
[0035] In one implementation, the above-mentioned service processing of the NFC simulation data may include: (1) When the data type of the NFC simulation data is the APDU type, performing service processing on the NFC simulation data through the service mode.
[0036] (2) When the data type of the NFC emulation data is the NDEF type, performing service processing on the NFC emulation data through the broadcasting method.
[0037] In the embodiment of the present application, the service processing mode corresponding to the NFC simulation data is determined according to the data type of the NFC simulation data, including: the APDU type corresponds to the service mode, and the NDEF type corresponds to the broadcast mode. Thus, the NFC simulation data of the APDU type is processed by the service mode, and the NFC simulation data of the NDEF type is processed by the broadcast mode.
[0038] In one implementation, after performing service processing on the NFC simulation data and generating an NFC interaction result in the above step 106, the method further includes the following steps.
[0039] Step 108: synthesize the NFC interaction result into video stream data.
[0040] The video stream data is a continuous video transmitted through a network, and the NFC interaction result is presented in the form of video stream data, so that the NFC interaction result is presented in real time and continuously in the cloud terminal application software of the terminal. In one implementation, when the NFC interaction result can be presented through a single video frame, the video stream data synthesized by the NFC interaction result is an image.
[0041] Step 110: Send the video stream data to the terminal.
[0042] In an embodiment of the present application, the cloud terminal synthesizes the generated NFC interaction results into video stream data and sends it to the terminal, so that the terminal displays the video stream data in the cloud terminal application software (Application, APP) after receiving it.
[0043] Figure 3 The flowchart of a cloud terminal-based near field communication (NFC) method provided in an embodiment of the present application is shown, and the method can be executed by a terminal. Figure 3 , the method may include the following steps.
[0044] Step 302: receiving original NFC data when entering into a radio frequency field of an NFC device.
[0045] Among them, the terminal is a physical device with an NFC hardware module, which can perform near-field communication with NFC devices.
[0046] Step 304: transform the original NFC data to obtain target NFC data.
[0047] The terminal transforms the received original NFC data before sending it to the cloud terminal, such as data encapsulation and data encryption, to ensure the security and accuracy of data transmission.
[0048] Step 306: Send the target NFC data to the cloud terminal.
[0049] In the embodiment of the present application, since the terminal is a physical device with an NFC hardware module, it can perform near-field communication with the NFC device, so that when the terminal enters the radio frequency field of the NFC device, it can receive the original NFC data, and then send the target NFC data obtained after the original NFC data is transformed to the cloud terminal. Then, the cloud terminal receives and parses the target NFC data to obtain NFC simulation data, performs business processing based on the NFC simulation data, generates NFC interaction results, and implements near-field communication based on the cloud terminal based on the NFC data interaction between the cloud terminal and the physical terminal, solving the problem that the cloud terminal cannot perform near-field communication.
[0050] In one implementation, the above step 304 transforms the original NFC data to obtain the target NFC data, which may include the following steps.
[0051] Step 3041: encapsulate the original NFC data and the data header into encapsulated NFC data; wherein the data header includes the data type of the original NFC data.
[0052] The data types of raw NFC data include APDU type and NDEF type. The data structure of raw NFC data of APDU type is as follows: Figure 4a and Figure 4b As shown, the data structure of the raw NFC data of NDEF type is as follows Figure 4c shown.
[0053] See also Figure 4a and Figure 4b, the raw NFC data of APDU type includes: (1) CLA (Class): indicates the command category, which is used to distinguish different command sets or applications. (2) INS (Instruction): indicates the specific instruction code, which is used to indicate the operation to be performed. (3) P1 (Parameter 1): indicates the first parameter of the instruction, which is used to pass additional information to the instruction. (4) P2 (Parameter 2): indicates the second parameter of the instruction, which is also used to pass additional information. (5) Lc (Length): indicates the length of the data field. If the data field is empty, Lc is 0. (6) Data Field: indicates the actual transmitted data, and the length is specified by Lc. (7) Le (Expected length): indicates the maximum number of bytes expected to be returned. If no data is required to be returned, Le is 0. (8) SW1: status byte, indicating whether the command processing result is successful. (9) SW2: status byte, providing additional status information or limiting the specific meaning expressed by SW1.
[0054] See also Figure 4c ,The original NFC data of NDEF type includes: (1) Header: indicates data type, data length, etc. (2) Record: records data.
[0055] Step 3042: encrypt the packaged NFC data to obtain the target NFC data.
[0056] Among them, the terminal can encrypt the packaged NFC data through the AES data encryption method. The terminal encryption and cloud terminal decryption use the same key, which is encrypted by an asymmetric encryption algorithm and then transmitted to the other party through the network, or obtained directly through face-to-face negotiation.
[0057] In the embodiment of the present application, the terminal performs transformation processing on the received original NFC data, including data encryption and data encapsulation, and sends the target NFC data obtained after the transformation processing to the cloud terminal, thereby ensuring the security of transmitting NFC data to the cloud terminal.
[0058] In one implementation, before sending the target NFC data to the cloud terminal in the above step 306, the method further includes the following steps.
[0059] Step 3051: Set the cloud terminal application corresponding to the cloud terminal as the default processing program for the original NFC data.
[0060] Among them, the cloud terminal application is the display entrance of the cloud terminal on the terminal. Its functions include applying for and connecting to the cloud terminal, obtaining the cloud terminal login token and cloud terminal information, obtaining the application list of the cloud terminal, sending terminal local command streams and receiving cloud terminal video streams, etc.
[0061] Step 3052: Authenticate the login information of the cloud terminal application. If the login information passes the authentication, establish a connection with the cloud terminal through the cloud terminal application.
[0062] In an embodiment of the present application, by setting the cloud terminal application as the default processing program for the original NFC data, when the terminal approaches the NFC device and enters the radio frequency field of the NFC device and receives the original NFC data, the original NFC data is directly processed by the cloud terminal application of the terminal, including transforming the original NFC data, and sending the target NFC data obtained by the transformation to the cloud terminal to realize near-field communication based on the cloud terminal. The cloud terminal application is authenticated for login information, that is, in response to the user's login operation on the cloud terminal application, the login information input by the user is authenticated. If the authentication is passed, the login is successful, and if the authentication is not passed, the login fails. In the case where the login information is authenticated, the terminal establishes a connection with the cloud terminal through the cloud terminal application, so that the target NFC data can be sent to the cloud terminal, and the video stream data sent by the cloud terminal can be received.
[0063] In one implementation, the above step 3052 establishes a connection with the cloud terminal through the cloud terminal application, including the following steps.
[0064] Step 3052a, obtaining the login token of the cloud terminal.
[0065] The login token can be used to verify the user's identity and grant relevant permissions. The cloud terminal application of the terminal requests the login token from the cloud terminal management platform, and the cloud terminal management platform returns the login token to the cloud terminal application.
[0066] Step 3052b, when the login token passes the identity authentication, establish a connection with the cloud terminal.
[0067] In an embodiment of the present application, the terminal authenticates the acquired login token of the cloud terminal to confirm the identity of the user who establishes a connection with the cloud terminal through the cloud terminal application and uses the cloud terminal. When the login token passes the authentication, the terminal establishes a connection with the cloud terminal through the cloud terminal application, and the user can use the cloud terminal through the cloud terminal application of the terminal.
[0068] In an implementation manner, the above-mentioned cloud terminal-based near field communication NFC method may further include: receiving and displaying video stream data sent by the cloud terminal.
[0069] The video stream data is obtained by synthesizing the NFC interaction result by the cloud terminal, and the NFC interaction result is obtained by parsing and performing business processing on the target NFC data by the cloud terminal.
[0070] In an embodiment of the present application, after the cloud terminal parses and processes the target NFC data sent by the terminal, it generates an NFC interaction result and synthesizes the NFC interaction result into a video stream and sends it to the terminal. The terminal receives and displays the video stream data for the user to view.
[0071] Figure 5 A schematic diagram of the structure of a cloud terminal provided in an embodiment of the present application is shown. The cloud terminal 500 includes a cloud-side transmission module 51, an NFC simulation module 52 and an NFC application 53.
[0072] Among them, the cloud-side transmission module 51 is used to receive target NFC data sent by the terminal; the NFC simulation module 52 is used to parse the target NFC data to obtain NFC simulation data; the NFC application 53 is used to perform business processing on the NFC simulation data and generate NFC interaction results.
[0073] In one implementation, the NFC emulation module 52 may be configured to decrypt the target NFC data to obtain packaged NFC data; determine original NFC data from the packaged NFC data; and determine the original NFC data as the NFC emulation data.
[0074] In one implementation, the above-mentioned cloud terminal may also include a determination module for determining a business processing method corresponding to the NFC simulation data according to the data type of the NFC simulation data; wherein the data type includes: application protocol data unit APDU type or NFC data exchange format NDEF type; the business processing method includes: service mode or broadcast mode.
[0075] In one implementation, the NFC application 53 can be used to perform business processing on the near field communication NFC simulation data through the service mode when the data type of the NFC simulation data is the APDU type; and to perform business processing on the near field communication NFC simulation data through the broadcast mode when the data type of the near field communication NFC simulation data is the NDEF type.
[0076] In one implementation, the cloud-side transmission module 51 may be configured to synthesize the NFC interaction result into video stream data; and send the video stream data to the terminal.
[0077] Figure 6 A schematic diagram of the structure of a terminal provided in an embodiment of the present application is shown. The terminal 600 includes: an NFC module 61, a cloud terminal application 62 and a terminal-side transmission module 63.
[0078] Among them, the NFC module 61 is used to receive original NFC data when entering the radio frequency field of the NFC device; the cloud terminal application 62 is used to transform the original NFC data to obtain target NFC data; the terminal side transmission module 63 is used to send the target NFC data to the cloud terminal.
[0079] In one implementation, the cloud terminal application 62 can be used to encapsulate the original NFC data and the data header into encapsulated NFC data; wherein the data header includes the data type of the original NFC data; and encrypt the encapsulated NFC data to obtain the target NFC data.
[0080] In one implementation, the terminal 600 may further include a verification module, which is used to set a cloud terminal application corresponding to the cloud terminal as a default processing program for the original NFC data; authenticate login information of the cloud terminal application, and if the login information passes the authentication, establish a connection with the cloud terminal through the cloud terminal application.
[0081] In one implementation, the verification module may be used to obtain a login token of the cloud terminal; and establish a connection with the cloud terminal when the login token passes identity authentication.
[0082] In one implementation, the terminal-side transmission module 63 can also be used to receive and display video stream data sent by the cloud terminal; wherein the video stream data is obtained by the cloud terminal synthesizing the NFC interaction result, and the NFC interaction result is obtained by the cloud terminal parsing and processing the target NFC data.
[0083] Figure 7 FIG. 1 shows a schematic diagram of a near field communication NFC system based on a cloud terminal in an implementation manner, see FIG. Figure 7In the embodiment of the present application, the cloud terminal may be a cloud phone, and the system may include: a local device 71, a cloud phone instance 72, and a cloud phone management platform 73. Among them, the local device 71 includes a terminal transmission module 711, a cloud phone APP 712, an NFC hardware module 713, and an NFC terminal application module 714. The cloud phone instance 72 includes a cloud side transmission module 721, an NFC simulation module (including an NFC simulation hardware unit 722 and an NFC cloud side application unit 723), and a third-party APP 724. The cloud phone management platform 73 includes an authentication management module 731 and a cloud phone management module 732.
[0084] Among them, the cloud phone management platform 73 is used to manage the services related to the cloud phone instance 72, and is responsible for the authentication service of the user account system and the allocation management service of the cloud phone instance 72.
[0085] The cloud phone instance 72 is a cloud phone generated by virtualization technology, which runs a customized Android operating system and has basically the same functions as a physical phone, and may also include an interface management module.
[0086] The cloud-side transmission module 721 is responsible for receiving the uplink instruction stream of the local device 71 and distributing the downlink audio and video stream of the cloud phone instance 72. The cloud-side transmission module 721 and the terminal-side transmission module 711 are transmitted through the network.
[0087] The NFC simulation hardware unit 722 of the NFC simulation module is used to decrypt and unseal to obtain NFC data and simulate NFC functions. The NFC cloud-side application unit 723 is the interface of the NFC simulation module on the cloud phone instance 72, which is used to obtain or forward NFC data.
[0088] The third-party APP 724 is an application that uses NFC to interact to achieve business purposes.
[0089] The local device 71 is a smart device with a screen display function, including but not limited to a mobile phone, a smart watch, etc.
[0090] The terminal-side transmission module 711 is responsible for receiving the downstream audio and video stream of the cloud phone instance 72 and sending the upstream command stream of the local device 71.
[0091] The cloud phone APP 712 refers to the terminal display entrance of the cloud phone screen, and its functions include applying for and connecting to the cloud phone instance, obtaining the login token of the cloud phone instance and the information of the cloud phone instance, obtaining the application list of the cloud phone instance, sending local command streams and receiving cloud video streams, etc.
[0092] The NFC hardware module 713 is used to perform NFC data interaction with an NFC device, where the NFC device is a device that supports NFC, including but not limited to access control, bus card reader, POS machine, etc. The NFC terminal application module 714 is an interface of the NFC hardware module 713 on the local device 71.
[0093] Figure 8 The flowchart of another NFC method based on a cloud terminal provided in an embodiment of the present application is shown. The method takes the NFC emulation card mode based on a local device as an example, wherein the NFC data is APDU type NFC data, which can be Figure 7 The system shown in the figure is executed. The method may include the following steps.
[0094] Step 801, setting the cloud phone APP of the local device as the NFC default response program.
[0095] Among them, the cloud phone APP on the local device is set as the NFC default responder. The cloud phone APP contains a service inherited from HostApduService (such as MyHostApduService) in its manifest file. The MyHostApduService service contains an NFC Intent filter of the android.nfc.cardemulation.action.HOST_APDU_SERVICE type and contains a specified application identifier (Application Identifier, AID) in its metadata.
[0096] Step 802: The local device connects to the cloud phone instance through the cloud phone APP.
[0097] Among them, the cloud phone APP of the local device completes the account login in response to the SIM authentication, SMS verification and other information entered by the user, and connects to the cloud phone instance.
[0098] Step 803: Set the third-party APP of the cloud phone instance as the NFC default response program.
[0099] Among them, the third-party APP on the cloud phone instance is set as the NFC default responder. The third-party APP contains a service inherited from HostApduService (for example, MyHostApduService) in its manifest file. The MyHostApduService service contains an NFC Intent filter of the android.nfc.cardemulation.action.HOST_APDU_SERVICE type and contains the specified AID in its metadata.
[0100] Step 804: The NFC hardware module obtains the NFC data and converts it into APDU type NFC data, and sends the APDU type NFC data to the NFC terminal side application module.
[0101] Among them, when the local device is close to the NFC device with which it interacts with NFC (such as the subway IC card reader), after activating the NFC chip on the local device, the local device will send the NFC Intent filter of the android.nfc.cardemulation.action.HOST_APDU_SERVICE type. After the intent filtering and AID and other data confirmation, the MyHostApduService service in the cloud phone APP will be activated. At the same time, the NFC data is obtained from the NFC device and converted into APDU type NFC data, and sent to the NFC terminal application module.
[0102] Step 805: The cloud phone APP obtains APDU type NFC data from the NFC terminal application module, and encapsulates and encrypts the APDU type NFC data.
[0103] Among them, the NFC adapter in the NFC terminal application module will call the processCommandApdu method in the MyHostApduService service to send APDU type NFC data to the cloud phone APP.
[0104] Step 806: The terminal-side transmission module sends the APDU-type NFC data after encapsulation and encryption to the cloud-side transmission module of the cloud phone instance.
[0105] Step 807: The NFC simulation module receives the APDU type NFC data transmitted by the cloud-side transmission module, and performs decryption and decapsulation processing on the APDU type NFC data.
[0106] Among them, the NFC simulation module decrypts the APDU type NFC data and obtains the byte array of APDU raw data according to the type field value in the Header, and then transmits the APDU raw data byte array to the NfcAdapter in the NFC cloud-side application unit through the transceive(intnativeHandle, in byte[] data, boolean raw) method in the ITagNfc interface.
[0107] Step 808: The NFC cloud-side application unit sends the APDU type NFC data after decryption and decapsulation to the third-party APP.
[0108] Among them, the NfcAdapter in the NFC cloud-side application unit then sends the NFC Intent filter of the android.nfc.cardemulation.action.HOST_APDU_SERVICE type to the third-party APP, activates the MyHostApduService service in the third-party APP, and calls the processCommandApdu method in the MyHostApduService service in the third-party APP to receive APDU type NFC data.
[0109] Step 809: The third-party APP processes the APDU type NFC data and generates an NFC interaction result.
[0110] Step 810: The cloud-side transmission module sends the video stream synthesized based on the NFC interaction result to the terminal-side transmission module of the local device.
[0111] Step 811: The local device receives the video stream through the terminal transmission module and displays it on the cloud phone APP.
[0112] Fig. 9 The flowchart of another near field communication NFC method based on a cloud terminal provided in an embodiment of the present application is shown. The method takes the NFC card reader mode as an example, wherein the NFC data is NDEF type NFC data, which can be Figure 7 The system shown in the figure is executed. The method may include the following steps.
[0113] Step 901, setting the cloud phone APP of the local device as the NFC default response program.
[0114] The cloud phone APP on the local device is set as the NFC default responder, and the cloud phone APP contains an NFC Intent filter of the android.nfc.action.NDEF_DISCOVERED type in its manifest file.
[0115] Step 902: The local device connects to the cloud phone instance through the cloud phone APP.
[0116] Among them, the cloud phone APP of the local device completes the account login in response to the SIM authentication, SMS verification and other information entered by the user, and connects to the cloud phone instance.
[0117] Step 903: Set the third-party APP of the cloud phone instance as the NFC default response program.
[0118] The third-party APP on the cloud phone instance is set as the NFC default responder, and the third-party APP contains an NFC Intent filter of the android.nfc.action.NDEF_DISCOVERED type in its manifest file.
[0119] Step 904: The NFC hardware module obtains the NFC data and converts it into NDEF type NFC data, and sends the NDEF type NFC data to the NFC terminal side application module.
[0120] Among them, when the local device is close to the NFC device with which it interacts with NFC (such as the subway IC card reader), after activating the NFC chip on the local device, the local device will send the NFC Intent filter of the android.nfc.action.NDEF_DISCOVERED type, and the Activity in the cloud phone APP that can handle the NFC Intent filter of the android.nfc.action.NDEF_DISCOVERED type will be activated. At the same time, the NFC data is obtained from the NFC device and converted into NDEF type NFC data, and sent to the NFC terminal application module.
[0121] Step 905: The cloud phone APP obtains NDEF type NFC data from the NFC terminal application module, and encapsulates and encrypts the NDEF type NFC data.
[0122] Among them, the NFC adapter in the NFC terminal application module will put the NDEF type NFC data into the NFC Intent filter and send it to the cloud phone APP.
[0123] Step 906: The terminal-side transmission module sends the NDEF-type NFC data after packaging and encryption to the cloud-side transmission module of the cloud phone instance.
[0124] Step 907: The NFC simulation module receives the NDEF type NFC data transmitted by the cloud-side transmission module, and performs decryption and decapsulation processing on the NDEF type NFC data.
[0125] The NFC simulation module decrypts the NDEF type NFC data and obtains the NDEF raw data according to the type field value in the Header. Then, the method transceive(int nativeHandle, in byte[] data, boolean raw) in the INfcTag interface transmits the NDEF type NFC data to the NfcAdapter in the NFC cloud application unit.
[0126] In step 908, the NFC cloud-side application unit sends the decrypted and decapsulated NDEF type NFC data to the third-party APP.
[0127] Among them, the NfcAdapter in the NFC cloud-side application unit puts the NDEF type NFC data into the NFC Intent filter, and then sends the NFC Intent filter of the android.nfc.action.NDEF_DISCOVERED type to the third-party APP to activate the Activity in the third-party APP that can process the NFC Intent filter.
[0128] Step 909: The third-party APP processes the NDEF type NFC data and generates an NFC interaction result.
[0129] Step 910: The cloud-side transmission module sends the video stream synthesized based on the NFC interaction result to the terminal-side transmission module of the local device.
[0130] Step 911: The local device receives the video stream through the terminal transmission module and displays it on the cloud phone APP.
[0131] pass Figure 8 and Fig. 9 The illustrated embodiment provides a cloud terminal-based near-field communication NFC method, in which the NFC simulation module in the cloud phone instance simulates the NFC data interaction process, so that the third-party APP in the cloud phone instance can receive and process NFC data similarly to the local device. After the NFC simulation module unpacks the Payload data, it injects the data into the NFC simulation hardware unit, and the NFC simulation hardware unit sends the data to the NFC cloud-side application unit. If the Payload data is of APDU type, the APDU data is simulated in a service mode for the interaction process. If the Payload data is of NDEF type, the NDEF data is simulated in a broadcast mode for the interaction process, thereby realizing near-field communication based on a cloud terminal.
[0132] The embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by the processor, each process of the above-mentioned cloud terminal-based near field communication NFC method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. Among them, the processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0133] The embodiment of the present application further provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, the processor is used to run a program or instruction, implement the various processes of the above-mentioned cloud terminal-based near-field communication NFC method embodiment, and can achieve the same technical effect, to avoid repetition, it is not repeated here. It should be understood that the chip mentioned in the embodiment of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0134] An embodiment of the present application also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes a program or instructions. When the program or instructions are executed, the various processes of the above-mentioned cloud terminal-based near-field communication NFC method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not repeated here.
[0135] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0136] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0137] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A near field communication (NFC) method based on a cloud terminal, characterized in that: Applied to cloud terminals, including: Receive target NFC data sent by the terminal; Parsing the target NFC data to obtain NFC simulation data; The NFC simulation data is subjected to business processing to generate an NFC interaction result.
2. The method according to claim 1, characterized in that The parsing the target NFC data to obtain NFC simulation data includes: Decrypting the target NFC data to obtain encapsulated NFC data; determining raw NFC data from the packaged NFC data; The original NFC data is determined as the NFC emulation data.
3. The method according to claim 1, characterized in that Before performing business processing on the NFC simulation data to generate an NFC interaction result, the method further includes: Determine, according to the data type of the NFC simulation data, a service processing method corresponding to the NFC simulation data; Among them, the data type includes: application protocol data unit APDU type or NFC data exchange format NDEF type; the business processing mode includes: service mode or broadcast mode.
4. The method according to claim 3, characterized in that The performing business processing on the NFC simulation data includes: When the data type of the NFC simulation data is the APDU type, performing service processing on the NFC simulation data through the service mode; When the data type of the NFC emulation data is the NDEF type, service processing is performed on the NFC emulation data through the broadcasting mode.
5. The method according to claim 1, characterized in that: After performing business processing on the NFC simulation data to generate an NFC interaction result, the method further includes: Combining the NFC interaction result into video stream data; The video stream data is sent to the terminal.
6. A near field communication (NFC) method based on a cloud terminal, characterized in that: Applied to terminals, including: When entering the radio frequency field of the NFC device, receiving the raw NFC data; Performing transformation processing on the original NFC data to obtain target NFC data; The target NFC data is sent to the cloud terminal.
7. The method according to claim 6, characterized in that The original NFC data is transformed to obtain target NFC data, including: Encapsulating the original NFC data and the data header into encapsulated NFC data; wherein the data header includes the data type of the original NFC data; The packaged NFC data is encrypted to obtain the target NFC data.
8. The method according to claim 6, characterized in that Before sending the target NFC data to the cloud terminal, the method further includes: Setting a cloud terminal application corresponding to the cloud terminal as a default processing program for the original NFC data; The cloud terminal application is authenticated for login information, and when the login information passes the authentication, a connection is established with the cloud terminal through the cloud terminal application.
9. The method according to claim 8, characterized in that The establishing a connection with the cloud terminal through the cloud terminal application comprises: Obtaining a login token for the cloud terminal; When the login token passes the identity authentication, a connection is established with the cloud terminal.
10. The method according to claim 6, characterized in that The method further comprises: Receive and display the video stream data sent by the cloud terminal; The video stream data is obtained by synthesizing the NFC interaction result by the cloud terminal, and the NFC interaction result is obtained by parsing and performing business processing on the target NFC data by the cloud terminal.
11. A cloud terminal, characterized in that: The cloud terminal includes: a cloud-side transmission module, an NFC simulation module and an NFC application; Wherein, the cloud-side transmission module is used to receive target NFC data sent by the terminal; The NFC simulation module is used to parse the target NFC data to obtain NFC simulation data; The NFC application is used to perform business processing on the NFC simulation data and generate an NFC interaction result.
12. A terminal, characterized in that: The terminal includes: an NFC module, a cloud terminal application and a terminal-side transmission module; Wherein, the NFC module is used to receive original NFC data when entering the radio frequency field of the NFC device; The cloud terminal application is used to transform the original NFC data to obtain target NFC data; The terminal-side transmission module is used to send the target NFC data to the cloud terminal.
13. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the near field communication NFC method based on the cloud terminal are implemented as described in any one of claims 1 to 10.
14. A computer program product, characterized in that The computer program product includes a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program includes a program or instructions, and when the program or instructions are executed, the steps of the cloud terminal-based near-field communication NFC method are implemented as described in any one of claims 1 to 10.
Citation Information
Cited By
Infrared remote control method, device and equipment for cloud mobile phone application, medium and product
CN120881124A
Intelligent hardware interaction method and device based on NFC and storage medium
CN121309667A