CN114153564B - Near field communication unit access method and device in multiple systems, electronic equipment and storage medium - Google Patents

Near field communication unit access method and device in multiple systems, electronic equipment and storage medium Download PDF

Info

Publication number
CN114153564B
CN114153564B CN202111488398.4A CN202111488398A CN114153564B CN 114153564 B CN114153564 B CN 114153564B CN 202111488398 A CN202111488398 A CN 202111488398A CN 114153564 B CN114153564 B CN 114153564B
Authority
CN
China
Prior art keywords
near field
field communication
communication data
layer
nfc
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111488398.4A
Other languages
Chinese (zh)
Other versions
CN114153564A (en
Inventor
王锐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202111488398.4A priority Critical patent/CN114153564B/en
Publication of CN114153564A publication Critical patent/CN114153564A/en
Priority to PCT/CN2022/108452 priority patent/WO2023103407A1/en
Application granted granted Critical
Publication of CN114153564B publication Critical patent/CN114153564B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/102Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/545Interprogram communication where tasks reside in different layers, e.g. user- and kernel-space
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B5/00Near-field transmission systems, e.g. inductive or capacitive transmission systems
    • H04B5/70Near-field transmission systems, e.g. inductive or capacitive transmission systems specially adapted for specific purposes
    • H04B5/72Near-field transmission systems, e.g. inductive or capacitive transmission systems specially adapted for specific purposes for local intradevice communication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45579I/O management, e.g. providing access to device drivers or storage
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/543Local
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)
  • Stored Programmes (AREA)

Abstract

The application relates to a near field communication unit access method and device in a multi-system, electronic equipment and a storage medium. The method comprises the following steps: under the condition that the near field communication unit in the first system drives to generate near field communication data, carrying out calling processing of a corresponding near field communication interface-like layer on the near field communication data; a near field communication data conversion plug-in captures the near field communication data processed by the near field communication interface-like layer and sends the captured near field communication data to the near field communication service in the second system; near field communication service sends the near field communication data to a corresponding application in the second system. The application realizes the support of NFC functions in multiple systems and improves the user experience.

Description

Near field communication unit access method and device in multiple systems, electronic equipment and storage medium
Technical Field
The embodiment of the application relates to an access technology of electronic equipment in a cross-operating system, in particular to a near field communication unit access method and device in a multi-system, the electronic equipment and a storage medium.
Background
In the current Linux-based system, the implementation of a Near Field Communication (NFC) software architecture is chaotic, and most of functions are implemented by manufacturers, so that there is little method for perfectly solving the problem of using the NFC function on Linux. The Android system can adapt to different functional interfaces provided by equipment manufacturers through the HAL layer concept, so that a set of unified interface library can be provided for the upper-layer application, the problem that the lower-layer application is incompatible in use of the lower-layer equipment is solved, and the hardware cost can be reduced. Currently, no related technology for accessing NFC electronic devices in Linux systems is available for reference.
Disclosure of Invention
In view of the above, embodiments of the present application provide a method and apparatus for accessing a near field communication unit in a multi-system, an electronic device, and a storage medium, so as to at least partially solve the above technical problems in the prior art.
According to a first aspect of an embodiment of the present application, there is provided a near field communication unit access method in a multi-system, where a near field communication data conversion plug-in is set in a first interface layer of a first system, where the near field communication data conversion plug-in is connected with a near field communication service in a second system; wherein the first system is deployed in the second system; the method comprises the following steps:
Under the condition that the near field communication unit in the first system drives to generate near field communication data, carrying out calling processing of a corresponding near field communication interface-like layer on the near field communication data;
The near field communication data conversion plug-in captures the near field communication data processed by the near field communication interface-like layer and sends the captured near field communication data to the near field communication service in the second system;
The near field communication service sends the near field communication data to a corresponding application in the second system.
In some embodiments, the invoking process of the near field communication interface layer corresponding to the near field communication data includes:
Transmitting the near field communication data to a near field communication Controller interface hardware abstraction layer (NFC Controller INTERFACE HARDWARE Abstraction Layer, NCI HAL) through an NFC device node layer;
The near field communication controller interface libnfc-NCI layer obtains the near field communication data through the NCI HAL layer and forwards the near field communication data to an application framework layer.
In some embodiments, the near field communication data conversion plug-in captures the near field communication data processed by the near field communication interface-like layer and transmits the captured near field communication data to the near field communication service in the second system, including:
The near field communication data conversion plug-in captures the near field communication data through the first interface layer and transmits the captured near field communication data to the near field communication service through a local Inter-process communication (Inter-Process Communication, IPC) mechanism.
In some embodiments, the first interface layer comprises one of:
libnfc-NCI layers, NFC device node layers, NCI HAL layers and application framework layers.
In certain embodiments, the first system comprises an Android operating system, an Android open source code item AOSP, and a AOSP-based derivative system;
the AOSP-based derivative system includes at least one of: such as the Mi's shaddock (MIUI) operating system from millet company, the mobile terminal operating system (EMUI) from Hua's company, the One's operating system (One UI) from Sanxingzhi, etc.
In some embodiments, the second system comprises a GNU/Linux operating system, a derivative of the GNU/Linux operating system, and the like;
The GNU/Linux operating system comprises at least one of the following: ubuntu, debian, redHat, etc. The second operating system is not limited to be running on a physical machine, and may be an operating system hosted on another operating system, for example, a WSL in a Windows system.
In some embodiments, the near field communication service transmitting the near field communication data to a corresponding application in the second system comprises:
The GNU/Linux operating system and the derivative system thereof run the near field communication service when started, and the near field communication interface library file which is in butt joint with the application in the GNU/Linux operating system and the derivative system thereof is packaged in a framework layer of the GNU/Linux operating system and the derivative system thereof;
And triggering the near field communication interface library file to send the near field communication data to a corresponding application in the near field communication interface library file.
According to a second aspect of an embodiment of the present application, there is provided a near field communication unit access device in a multi-system, including:
A setting unit, configured to set a near field communication data conversion plug-in a first interface layer of a first system, where the near field communication data conversion plug-in is connected with a near field communication service in a second system; wherein the first system is deployed in the second system;
The processing unit is used for carrying out calling processing of a corresponding near field communication interface-like layer on near field communication data under the condition that near field communication data are generated by driving of a near field communication unit in the first system;
the first triggering unit is used for triggering the near field communication data conversion plug-in to capture the near field communication data processed by the near field communication interface-like layer and sending the captured near field communication data to the near field communication service in the second system;
and the second triggering unit is used for triggering the near field communication service to send the near field communication data to a corresponding application in the second system.
In certain embodiments, the processing unit is further configured to:
transmitting the near field communication data to an NCI HAL through an NFC equipment node layer;
The libnfc-NCI layer obtains the near field communication data through the NCI HAL layer and forwards the near field communication data to an application framework layer.
In some embodiments, the first triggering unit is further configured to trigger the near field communication data conversion plug-in to capture the near field communication data through the first interface layer, and send the captured near field communication data to the near field communication service in the second system through an IPC mechanism.
In some embodiments, the first interface layer comprises one of:
libnfc-NCI layers, NFC device node layers, NCI HAL layers, application framework layers, and the like.
In some embodiments, the first system includes an Android operating system, an Android open source code item AOSP, a AOSP-based derivative system, and the like;
The AOSP-based derivative system includes at least one of: MIUI, EMUI, one UI, etc.
In some embodiments, the second system comprises a GNU/Linux operating system, a derivative of the GNU/Linux operating system, and the like;
the GNU/Linux operating system comprises at least one of the following: ubuntu, debian, redHat, etc.
In some embodiments, the GNU/Linux operating system and its derivative system run the near field communication service when started, and encapsulate, at a framework layer of the GNU/Linux operating system and its derivative system, the near field communication interface library file interfacing with applications in the GNU/Linux operating system and its derivative system;
The second triggering unit is further configured to trigger the near field communication interface library file to send the near field communication data to a corresponding application in the near field communication interface library file.
According to a third aspect of the embodiments of the present application, there is provided an electronic device, including a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions implementing the steps of the near field communication unit access method in a multi-system when executed by the processor.
According to a fourth aspect of embodiments of the present application, there is provided a readable non-transitory storage medium having stored thereon a program or instructions which, when executed by a processor, implement the steps of a near field communication unit access method in a multi-system.
In the embodiment of the application, the near field communication data conversion plug-in is arranged in the first interface layer in the first system, and the near field communication data conversion plug-in is connected with the near field communication service in the second system, so that when the second system needs to start near field communication, the near field communication data conversion plug-in can access the drive of the near field communication unit through the NCI HAL of the first system, thereby acquiring near field communication data, and then the acquired near field communication data is sent to related applications in the second system for use by corresponding applications. According to the embodiment of the application, the NFC function in the first system is accessed through the Android HAL layer in the Linux system, so that the NFC function can be conveniently called by the application in the second system, the NFC function support in the multiple systems is realized, the use experience of a user is improved, and the operation systems are not required to be changed greatly.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. It will be apparent to those of ordinary skill in the art that the drawings in the following description are of some embodiments of the application and that other drawings may be derived from them without undue effort.
Fig. 1 is a flow chart of a near field communication unit access method in a multi-system according to an embodiment of the present application;
fig. 2 is a schematic diagram of an implementation architecture of near field communication unit access in a multi-system according to an embodiment of the present application;
fig. 3 is a schematic diagram of a near field communication unit access flow in a multi-system according to an embodiment of the present application;
Fig. 4 is a schematic structural diagram of a near field communication unit access device in a multi-system according to an embodiment of the present application;
fig. 5 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following describes the technical scheme of the embodiment of the present application in detail with reference to the accompanying drawings.
Fig. 1 is a flow chart of a near field communication unit access method in a multi-system according to an embodiment of the present application, and as shown in fig. 1, the near field communication unit access method in a multi-system according to an embodiment of the present application includes the following processing steps:
step 101, a near field communication data conversion plug-in is arranged in a first interface layer of a first system, and the near field communication data conversion plug-in is connected with a near field communication service in a second system.
In the embodiment of the application, the first system is deployed in the second system. As an example, the first system includes an Android operating system, an Android open source code item AOSP, a AOSP-based derivative system, and the like; the AOSP-based derivative system includes at least one of: such as the Mi's shaddock (MIUI) operating system from millet company, the mobile terminal operating system (EMUI) from Hua's company, the One's operating system (One UI) from Sanxingzhi, etc.
As one example, the second system includes GNU/Linux operating system, and derived systems of GNU/Linux operating system; the GNU/Linux operating system comprises at least one of the following: ubuntu, debian, redHat, etc. The second operating system is not limited to be running on a physical machine, and may be an operating system hosted on another operating system, for example, a WSL in a Windows system.
It should be understood by those skilled in the art that the technical solution of the embodiment of the present application is applicable to a scenario where a certain operating system under all multiple operating systems cannot access the near field communication unit. The above multi-operating system is not limited to the Linux system and the Android system, and the embodiments of the present application are only exemplary illustrations of the two operating systems as an application typical.
In the current Linux system, the implementation of the NFC software architecture is chaotic, and most of functions of NFC are respectively implemented by manufacturers, so that the Linux system cannot access the NFC functions. According to the embodiment of the application, near field communication service (Linux NFC SERIVICE) is installed in a Linux system, unified NFC interface library files applied to an upper layer are packaged in a Linux frame layer, and near field communication data conversion plug-in units (NFC date transmission data forwarding plug-in units) are added in libnfc-nci of an Android system; NFC date transmission the data forwarding plug-in interfaces all libnfc-nci interface functions of the Android system, when NFC data is updated, the NFC data is forwarded to Linux NFC SERIVICE in the Linux system through NFC date transmission the data forwarding plug-in, and NFC data is provided for related applications in the Linux system through Linux NFC SERIVICE. As an implementation manner, NFC date transmission data forwarding plug-in of the Android system performs data communication with Linux NFC SERIVICE through a local IPC communication mechanism.
Step 101 is a basic step, which is a basis for implementing the technical scheme of the embodiment of the present application.
Step 102, in the case that the near field communication unit in the first system drives to generate near field communication data, performing call processing of a corresponding near field communication interface-like layer on the near field communication data.
In the embodiment of the application, the near field communication data can be generated by actively triggering the NFC device of the Android system by driving the near field communication unit, for example, the NFC device of the Android system responds to the NFC data triggering instruction of the data forwarding plug-in the Linux NFC SERIVICE and NFC date transmission by the related application in the Linux system, and obtains the NFC data to be transmitted by the triggering instruction.
The near field communication unit is driven to generate near field communication data, which can be generated passively by the NFC device of the Android system, namely, the NFC device of the Android system responds to the magnetic fields of the NFC devices of other electronic devices to receive the NFC data passively.
When NFC data is updated in the NFC equipment, forwarding the NFC data to Linux NFC SERIVICE in a Linux system through NFC date transmission data forwarding plug-in, transmitting the received NFC data to a Linux NFC interface library file by Linux NFC SERIVICE, and transmitting the received NFC data to a corresponding application of the library file by the Linux NFC interface library file.
In the embodiment of the application, the near field communication interface-like layer comprises, but is not limited to, libnfc-NCI layers, NFC equipment node layers, NCI HAL layers and application framework layers. The method for carrying out the call processing of the corresponding near field communication interface-like layer on the NFC data comprises the following steps: transmitting the NFC data to the NCI HAL through the NFC equipment node layer; the libnfc-NCI layer obtains NFC data through the NCI HAL layer and forwards the NFC data to the application framework layer.
Step 103, a near field communication data conversion plug-in captures the near field communication data processed by the near field communication interface-like layer and transmits the captured near field communication data to the near field communication service in the second system.
In the embodiment of the application, the Android can adapt to different functional interfaces provided by different equipment manufacturers through the HAL layer, so that a set of unified interface library can be provided for the upper-layer application, and the problem that the lower-layer equipment used by the upper-layer application is incompatible is solved.
In the embodiment of the application, the first interface layer comprises libnfc-NCI layers, an NFC equipment node layer, an NCI HAL layer, an application framework layer and the like. The near field communication data conversion plug-in of the embodiment of the application can be arranged in any one of the interface layers.
NFC date transmission the data forwarding plug-in forwards the NFC data to Linux NFC SERIVICE in a Linux system through an IPC communication mechanism.
In step 104, the near field communication service sends the near field communication data to a corresponding application in the second system for the application to use the near field communication data.
In the embodiment of the application, near field communication service is operated when the Linux system is started, and near field communication interface library files which are in butt joint with applications in the Linux system are packaged in a Linux frame layer. The near field communication service sends the received NFC data to a Linux NFC interface library file, and then the Linux NFC interface library file sends the received NFC data to a corresponding application of the library file.
In the embodiment of the application, the application in the Linux system comprises any application using a communication function, such as an instant messaging application, a related application supporting network payment, and the like.
The technical scheme of the embodiment of the application is further described in detail below with reference to specific examples. Here, the first system is taken as an Android system, the second system is taken as a Linux system for illustration, and other multi-operation systems are also suitable for the technical scheme of the embodiment of the application.
Fig. 2 is a schematic diagram of an implementation architecture of near field communication unit access in a multi-system according to an embodiment of the present application, as shown in fig. 2, since the current Linux system cannot realize access to NFC functions, in the embodiment of the present application, the advantage of the Android HAL layer may be fully utilized, an interface function forwarding plug-in is added in libnfc-nci above the Android HAL layer, all function interfaces related to NFC are in data communication with Linux NFC SERVICE of the Linux system through a local IPC communication mechanism, and then the Linux NFC SERVICE sends the acquired NFC data of the NFC device to an upper layer application of the Linux system for use.
In the embodiment of the application, in the Linux system, the following configuration operations are mainly performed: and creating Linux NFC SERIVICE, packaging a unified NFC interface library file (Linux NFC Lib) applied to an upper layer, receiving NFC data of Linux NFC SERIVICE through the Linux NFC Lib, and forwarding the received NFC data to a Linux Apps to realize a data interaction function of NFC equipment in a Linux system and an Android system.
In the Android system, the following configuration operations are mainly performed: adding a data forwarding plug-in NFC date transmission in libnfc-nci and adapting NFC date transmission the data forwarding plug-in to all libnfc-nci functions; in the case that libnfc-nci receives NFC data of the NFC device, the NFC date transmission data forwarding plug-in sends the received NFC data to NFC SERIVICE of the Linux system through the local IPC communication mechanism.
In the embodiment of the application, when the NFC equipment is installed in the Android system, the driver of the NFC equipment creates a MISC equipment file, and the registration of the NFC equipment is realized in the MISC equipment file. The file operation interface of the MISC device is used for communicating with the driver of the MISC device through the HAL layer implementation libnfc-nci. libnfc-NCI utilize the HAL layer and use the NCI interface to operate the adapter of the NFC device.
In the Android system, miscellaneous device functions are common device drivers in embedded systems. MISC device.h files are set under the include/linux directory of the kernel, and the self-equipment can be customized MISC DEVICE. Since the character devices do not conform to the predetermined category of character devices, all devices adopt the main number 10 and are assigned to MISC DEVICE, and the miscellaneous device registration MISC_register is to call register_ chrdev (), by using the main number 10, the character devices are stored in the MISC category. That is, the MISC device is a special character device. The hybrid device is described using MISCDEVICE structures. MISCDEVICE share a primary device number MISC_MAJOR, i.e. primary number 10, and the secondary device numbers of the devices are different. All MISC DEVICE devices form a linked list, the kernel searches the corresponding MISC DEVICE devices according to the secondary device number when the devices are accessed, and then a file operation interface registered in a file_operations structure is called for operation. The MISC DEVICE device is represented in the kernel using struct MISC DEVICE. MISCDEVICE is set in driver/char/MISC.c, and initialization, registration and cancellation of MISC equipment are all carried out in driver/char/MISC.c file.
The HAL layer in the Android system is compiled into a dynamic connection library/system/lib/hw/nfc-nci.xxx.defaults, wherein the interface definition to be realized by the HAL is defined in hardware/libhardware/include/hardware/nfc.h, and the interface definition is exemplified as follows:
open()
close()
write()
core_initialized()
pre_discover()
control_granted()
power_cycle()
the example shown in fig. 2 is merely illustrative of NFC data forwarding plug-ins NFC date transmission disposed libnfc-nci.
As an implementation manner, the NFC data forwarding plug-in NFC date transmission may also be disposed in the Android NFC DEVICE device node layer.
As an implementation, NFC data forwarding plug-ins NFC date transmission may also be provided in Android NCI HAL method layer.
As an implementation, the NFC data forwarding plug-in NFC date transmission may also be provided in the com.
In the embodiment of the present application, after the NFC data is subjected to the call processing of the near field communication interface layer, the NFC data forwarding plug-in NFC date transmission calls the NFC data and sends the NFC data to Linux NFC SERIVICE, and Linux NFC SERIVICE forwards the corresponding NFC data to the corresponding application for the related application to use the NFC data.
Fig. 3 is a schematic diagram of a flow of accessing a near field communication unit in a multi-system according to an embodiment of the present application, and as shown in fig. 3, the flow of accessing a near field communication unit in a multi-system according to an embodiment of the present application is specifically implemented as follows:
When the Linux system runs, linux NFC SERIVICE service is started, under the condition that the driver of the NFC equipment in the Android system has updated NFC data, the NFC equipment driver transmits the NFC data to an NFC dev equipment node layer, the NFC dev equipment node layer transmits the NFC data to NCI HAL method, libnfc-NCI acquires the NFC data through NCI HAL method, NFC date transmission data forwarding plug-in units acquire the NFC data through libnfc-NCI layers, NFC date transmission data forwarding plug-in units transmit the acquired NFC data to Linux NFC SERIVICE service through a local IPC communication mechanism, linux NFC SERIVICE service transmits the received NFC data to a packaged Linux NFC interface library file, and the Linux NFC interface library file transmits the NFC data to corresponding Apps using the Linux NFC interface library file.
Fig. 4 is a schematic structural diagram of a near field communication unit access device in a multi-system according to an embodiment of the present application, and as shown in fig. 4, the near field communication unit access device in a multi-system according to an embodiment of the present application includes:
a setting unit 40, configured to set a near field communication data conversion plug-in a first interface layer of a first system, where the near field communication data conversion plug-in is connected to a near field communication service in a second system; wherein the first system is deployed in the second system;
A processing unit 41, configured to perform a call process of a corresponding near field communication interface layer on near field communication data when the near field communication unit in the first system drives to generate near field communication data;
a first triggering unit 42, configured to trigger the nfc data conversion plug-in to capture the nfc data processed by the near field communication interface-like layer, and send the captured nfc data to the nfc service in the second system;
A second triggering unit 43, configured to trigger the near field communication service to send the near field communication data to a corresponding application in the second system.
As an implementation, the processing unit 41 is further configured to:
transmitting the near field communication data to an NCI HAL through an NFC equipment node layer;
The libnfc-NCI layer obtains the near field communication data through the NCI HAL layer and forwards the near field communication data to an application framework layer.
As an implementation manner, the first triggering unit 42 is further configured to trigger the near field communication data conversion plug-in to capture the near field communication data through the first interface layer, and send the captured near field communication data to the near field communication service in the second system through an IPC mechanism.
As an implementation, the first interface layer includes one of:
libnfc-NCI layers, NFC device node layers, NCI HAL layers and application framework layers.
As an implementation manner, the first system includes an Android operating system, an Android open source code item AOSP, a derivative system based on AOSP, and the like;
The AOSP-based derivative system includes at least one of: MIUI, EMUI, one UI, etc.
As an implementation manner, the second system comprises GNU/Linux operating systems, derivative systems of GNU/Linux operating systems and the like;
the GNU/Linux operating system comprises at least one of the following: ubuntu, debian, redHat, etc.
As an implementation manner, the GNU/Linux operating system and its derivative system run the near field communication service when started, and encapsulate, at a framework layer of the GNU/Linux operating system and its derivative system, the near field communication interface library file that interfaces with applications in the GNU/Linux operating system and its derivative system;
the second triggering unit 43 is further configured to trigger the near field communication interface library file to send the near field communication data to a corresponding application in the near field communication interface library file.
In an exemplary embodiment, the setting unit 40, the processing unit 41, the first triggering unit 42, the second triggering unit 43, etc. may be implemented by one or more central processing units (CPU, central Processing Unit), application Specific Integrated Circuits (ASIC), digital signal processors (DIGITAL SIGNAL Processor, DSP), programmable logic devices (PLD, programmable Logic Device), complex Programmable logic devices (CPLD, complex Programmable Logic Device), field-Programmable gate arrays (FPGA, field-Programmable GATE ARRAY), general-purpose processors, controllers, microcontrollers (MCU, micro Controller Unit), microprocessors (Microprocessor), or other electronic components for performing the steps of the near Field communication unit access method in the multi-system of the foregoing embodiment.
In the embodiments of the present disclosure, the specific manner in which the respective units in the near field communication unit access device in the multi-system illustrated in fig. 4 perform the operations has been described in detail in the embodiments related to the method, and will not be described in detail herein.
Next, an electronic device 11 according to an embodiment of the present application is described with reference to fig. 5.
As shown in fig. 5, the electronic device 11 includes one or more processors 111 and a memory 112.
The processor 111 may be a Central Processing Unit (CPU) or other form of processing unit having data processing and/or instruction execution capabilities, and may control other components in the electronic device 11 to perform desired functions.
Memory 112 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, random Access Memory (RAM) and/or cache memory (cache), and the like. The non-volatile memory may include, for example, read Only Memory (ROM), hard disk, flash memory, and the like. One or more computer program instructions may be stored on the computer readable storage medium that may be executed by the processor 111 to implement the near field communication unit access methods and/or other desired functions in the multi-system of the various embodiments of the application described above. Various contents such as an input signal, a signal component, a noise component, and the like may also be stored in the computer-readable storage medium.
In one example, the electronic device 11 may further include: an input device 113 and an output device 114, which are interconnected by a bus system and/or other forms of connection mechanisms (not shown in fig. 5).
The input device 113 may include, for example, a keyboard, a mouse, and the like.
The output device 114 may output various information to the outside, including the determined distance information, direction information, and the like. The output device 114 may include, for example, a display, speakers, a printer, and a communication network and remote output apparatus connected thereto, etc.
Of course, only some of the components of the electronic device 11 relevant to the present application are shown in fig. 5 for simplicity, components such as buses, input/output interfaces, and the like being omitted. In addition, the electronic device 11 may include any other suitable components depending on the particular application.
The embodiment of the application also describes a readable non-transitory storage medium storing a program or instructions thereon, which when executed by a processor, implement the steps of the near field communication unit access method in the multi-system of the previous embodiment
In addition to the methods and apparatus described above, embodiments of the application may also be a computer program product comprising computer program instructions which, when executed by a processor, cause the processor to perform steps in a method according to various embodiments of the application described in the "exemplary methods" section of this specification.
The computer program product may write program code for performing operations of embodiments of the present application in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, embodiments of the application may also be a computer-readable storage medium, having stored thereon computer program instructions, which when executed by a processor, cause the processor to perform steps in a method according to various embodiments of the application described in the "exemplary method" section of the description above.
The computer readable storage medium may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The basic principles of the present application have been described above in connection with specific embodiments, but it should be noted that the advantages, benefits, effects, etc. mentioned in the present application are merely examples and not intended to be limiting, and these advantages, benefits, effects, etc. are not to be construed as necessarily possessed by the various embodiments of the application. Furthermore, the specific details disclosed herein are for purposes of illustration and understanding only, and are not intended to be limiting, as the application is not necessarily limited to practice with the above described specific details.
The block diagrams of the devices, apparatuses, devices, systems referred to in the present application are only illustrative examples and are not intended to require or imply that the connections, arrangements, configurations must be made in the manner shown in the block diagrams. As will be appreciated by one of skill in the art, the devices, apparatuses, devices, systems may be connected, arranged, configured in any manner. Words such as "including," "comprising," "having," and the like are words of openness and mean "including but not limited to," and are used interchangeably therewith. The terms "or" and "as used herein refer to and are used interchangeably with the term" and/or "unless the context clearly indicates otherwise. The term "such as" as used herein refers to, and is used interchangeably with, the phrase "such as, but not limited to.
It is also noted that in the apparatus, devices and methods of the present application, the components or steps may be disassembled and/or assembled. Such decomposition and/or recombination should be considered as equivalent aspects of the present application.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the application. Thus, the present application is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit embodiments of the application to the form disclosed herein. Although a number of example aspects and embodiments have been discussed above, a person of ordinary skill in the art will recognize certain variations, modifications, alterations, additions, and subcombinations thereof.

Claims (14)

1. The near field communication unit access method in the multi-system is characterized in that a near field communication data conversion plug-in is arranged in a first interface layer of a first system, and the near field communication data conversion plug-in is connected with near field communication service in a second system; wherein the first system is deployed in the second system; the method comprises the following steps:
Under the condition that near field communication data is generated by driving a near field communication unit in the first system, carrying out calling processing of a corresponding near field communication interface-like layer on the near field communication data, wherein the first system comprises an Android operating system, an Android open source code item AOSP and a derivative system based on AOSP, and the near field communication data conversion plug-in is in butt joint with all libnfc-nci interface functions of the first system;
The near field communication data conversion plug-in captures the near field communication data processed by the near field communication interface-like layer and sends the captured near field communication data to the near field communication service in the second system, wherein the second system comprises a GNU/Linux operating system and a derivative system of the GNU/Linux operating system;
the near field communication service transmits the near field communication data to a corresponding application in the second system;
Wherein the near field communication service sending the near field communication data to a corresponding application in the second system comprises:
The GNU/Linux operating system runs the near field communication service when started, and encapsulates the near field communication interface library file which is in butt joint with the application in the GNU/Linux operating system in a framework layer of the GNU/Linux operating system;
And triggering the near field communication interface library file to send the near field communication data to a corresponding application in the near field communication interface library file.
2. The method according to claim 1, wherein performing a corresponding near field communication interface layer like call processing on the near field communication data comprises:
Transmitting the near field communication data to a near field communication controller interface hardware abstraction layer NCI HAL through an NFC equipment node layer;
The near field communication controller interface libnfc-NCI layer obtains the near field communication data through the NCI HAL layer and forwards the near field communication data to an application framework layer.
3. The method of claim 1, wherein the near field communication data conversion plug-in captures the near field communication data processed by the near field communication-like interface layer and transmits the captured near field communication data to the near field communication service in the second system, comprising:
the near field communication data conversion plug-in captures the near field communication data through the first interface layer and sends the captured near field communication data to the near field communication service in the second system through a local inter-process communication IPC mechanism.
4. The method of claim 1, wherein the first interface layer comprises one of: libnfc-NCI layers, NFC device node layers, NCI HAL layers and application framework layers.
5. The method of any one of claims 1 to 4, wherein the AOSP-based derivatization system comprises at least one of: MIUI, EMUI, one UI.
6. The method according to any one of claims 1 to 4, wherein the GNU/Linux operating system comprises at least one of: ubuntu, debian, redHat.
7. A near field communication unit access device in a multi-system, the device comprising:
A setting unit, configured to set a near field communication data conversion plug-in a first interface layer of a first system, where the near field communication data conversion plug-in is connected with a near field communication service in a second system; wherein the first system is deployed in the second system;
The processing unit is used for carrying out call processing of a corresponding near field communication interface-like layer on near field communication data under the condition that near field communication data is generated by driving of a near field communication unit in the first system, the first system comprises an Android operating system, an Android open source code item AOSP and a AOSP-based derivative system, and the near field communication data conversion plug-in is used for interfacing all libnfc-nci interface functions of the first system;
The first triggering unit is used for triggering the near field communication data conversion plug-in to capture the near field communication data processed by the near field communication interface-like layer and sending the captured near field communication data to the near field communication service in the second system, the second system comprises a GNU/Linux operating system and a derivative system of the GNU/Linux operating system, the GNU/Linux operating system runs the near field communication service when being started, and the near field communication interface library file which is in butt joint with the application in the GNU/Linux operating system is packaged in a framework layer of the GNU/Linux operating system;
And the second triggering unit is used for triggering the near field communication interface library file to send the near field communication data to a corresponding application in the near field communication interface library file.
8. The apparatus of claim 7, wherein the processing unit is further configured to:
transmitting the near field communication data to an NCI HAL through an NFC equipment node layer;
The libnfc-NCI layer obtains the near field communication data through the NCI HAL layer and forwards the near field communication data to an application framework layer.
9. The apparatus of claim 7, wherein the first triggering unit is further configured to trigger the near field communication data conversion plug-in to capture the near field communication data through the first interface layer and send the captured near field communication data to the near field communication service in the second system through an IPC mechanism.
10. The apparatus of claim 7, wherein the first interface layer comprises one of:
libnfc-NCI layers, NFC device node layers, NCI HAL layers and application framework layers.
11. The apparatus according to any one of claims 7 to 10, wherein the AOSP-based derivatization system comprises at least one of: MIUI, EMUI, one UI.
12. The apparatus according to any one of claims 7 to 10, wherein the GNU/Linux operating system comprises at least one of: ubuntu, debian, redHat.
13. An electronic device comprising a processor, a memory and a program or instruction stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the near field communication unit access method in a multi-system of any one of claims 1 to 6.
14. A readable non-transitory storage medium, characterized in that the storage medium has stored thereon a program or instructions which, when executed by a processor, implement the steps of the near field communication unit access method in a multisystem according to any one of claims 1 to 6.
CN202111488398.4A 2021-12-07 2021-12-07 Near field communication unit access method and device in multiple systems, electronic equipment and storage medium Active CN114153564B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111488398.4A CN114153564B (en) 2021-12-07 2021-12-07 Near field communication unit access method and device in multiple systems, electronic equipment and storage medium
PCT/CN2022/108452 WO2023103407A1 (en) 2021-12-07 2022-07-28 Method and apparatus for near field communication unit access in multiple systems, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111488398.4A CN114153564B (en) 2021-12-07 2021-12-07 Near field communication unit access method and device in multiple systems, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114153564A CN114153564A (en) 2022-03-08
CN114153564B true CN114153564B (en) 2024-04-26

Family

ID=80453387

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111488398.4A Active CN114153564B (en) 2021-12-07 2021-12-07 Near field communication unit access method and device in multiple systems, electronic equipment and storage medium

Country Status (2)

Country Link
CN (1) CN114153564B (en)
WO (1) WO2023103407A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114153564B (en) * 2021-12-07 2024-04-26 北京字节跳动网络技术有限公司 Near field communication unit access method and device in multiple systems, electronic equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1581779A (en) * 2003-08-04 2005-02-16 阿尔卡特公司 Method, a server system, a client system, a communication network and computer software products for distributing software packages or updates
CN104038536A (en) * 2014-05-23 2014-09-10 小米科技有限责任公司 Plug-in communication method and device
US9106267B1 (en) * 2011-12-15 2015-08-11 Sprint Communications Company L.P. Near field communication session feedback
CN105493538A (en) * 2013-09-24 2016-04-13 英特尔公司 Systems and methods for NFC access control in a secure element centric nfc architecture
CN106611310A (en) * 2015-08-14 2017-05-03 华为终端(东莞)有限公司 Data processing method and system, and wearable electronic equipment
CN111274043A (en) * 2020-01-09 2020-06-12 RealMe重庆移动通信有限公司 Near field communication method, device, system, storage medium and electronic equipment
CN111314799A (en) * 2018-12-11 2020-06-19 中兴通讯股份有限公司 Terminal system architecture, communication system, communication method, and storage medium
CN112749017A (en) * 2019-10-31 2021-05-04 中兴通讯股份有限公司 Mobile communication method and device, storage medium, and electronic device
CN113608898A (en) * 2021-07-12 2021-11-05 北京鲸鲮信息系统技术有限公司 Fingerprint access method, device, equipment and storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI400652B (en) * 2009-06-11 2013-07-01 Insyde Software Corp Dual operating system parallel processing methods, recording media and computer program products
US9160422B2 (en) * 2012-11-22 2015-10-13 Asustek Computer Inc. Data capturing method of NFC protocol and NFC electronic device using the same
WO2016176206A1 (en) * 2015-04-26 2016-11-03 Intel Corporation Integrated android and windows device
CN110688674B (en) * 2019-09-23 2024-04-26 中国银联股份有限公司 Access dockee, system and method and device for applying access dockee
CN110941821A (en) * 2019-12-09 2020-03-31 Oppo广东移动通信有限公司 Data processing method, device and storage medium
CN113590363B (en) * 2021-09-26 2022-02-25 北京鲸鲮信息系统技术有限公司 Data transmission method, device, electronic equipment and storage medium
CN114153564B (en) * 2021-12-07 2024-04-26 北京字节跳动网络技术有限公司 Near field communication unit access method and device in multiple systems, electronic equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1581779A (en) * 2003-08-04 2005-02-16 阿尔卡特公司 Method, a server system, a client system, a communication network and computer software products for distributing software packages or updates
US9106267B1 (en) * 2011-12-15 2015-08-11 Sprint Communications Company L.P. Near field communication session feedback
CN105493538A (en) * 2013-09-24 2016-04-13 英特尔公司 Systems and methods for NFC access control in a secure element centric nfc architecture
CN104038536A (en) * 2014-05-23 2014-09-10 小米科技有限责任公司 Plug-in communication method and device
CN106611310A (en) * 2015-08-14 2017-05-03 华为终端(东莞)有限公司 Data processing method and system, and wearable electronic equipment
CN111314799A (en) * 2018-12-11 2020-06-19 中兴通讯股份有限公司 Terminal system architecture, communication system, communication method, and storage medium
CN112749017A (en) * 2019-10-31 2021-05-04 中兴通讯股份有限公司 Mobile communication method and device, storage medium, and electronic device
CN111274043A (en) * 2020-01-09 2020-06-12 RealMe重庆移动通信有限公司 Near field communication method, device, system, storage medium and electronic equipment
CN113608898A (en) * 2021-07-12 2021-11-05 北京鲸鲮信息系统技术有限公司 Fingerprint access method, device, equipment and storage medium

Also Published As

Publication number Publication date
WO2023103407A1 (en) 2023-06-15
CN114153564A (en) 2022-03-08

Similar Documents

Publication Publication Date Title
CN109164783B (en) Vehicle diagnosis method, apparatus, device, and medium
US8726298B1 (en) Cloud-based instrument driver system
US8347318B2 (en) Application component communication apparatus of SCA-based system and method thereof
CN106325847B (en) Method and device for acquiring application program function based on iOS platform
CN114153564B (en) Near field communication unit access method and device in multiple systems, electronic equipment and storage medium
CN103618699A (en) Method and device for calling component
CN104899068A (en) Method and device for multi-process start by container
CN112019609A (en) Equipment monitoring method, device, equipment and computer medium based on Internet of things
CN114047960A (en) Operating system running method and device, electronic equipment and storage medium
CN115185643A (en) Access control method and device, computer readable storage medium and electronic equipment
Qureshi et al. From east-adl to autosar software architecture: a mapping scheme
CN115145843A (en) Data copying method and device, computer readable storage medium and electronic equipment
CN103957234A (en) Method for sending download files in browser and browser device
CN108137124A (en) Control device, computer and communication system
CN106550026B (en) Network communication device and method
CN110457013B (en) Program component configuration device and method
CN111131358B (en) Information acquisition method, device and system, readable storage medium and electronic equipment
CN101382903B (en) Method and system for implementing automatic installation of intelligent cipher key equipment
CN103064676A (en) Method for controlling components in open service gateways
CN106325928B (en) Application access method applied to intelligent robot and intelligent robot
CN113961232A (en) Terminal, method and platform server for providing integrated development environment
CN109962788B (en) Multi-controller scheduling method, device and system and computer readable storage medium
KR20220049334A (en) Method and system for application test
CN112799641A (en) Method and device for expanding software development kit, electronic equipment and storage medium
CN115016856A (en) Multi-system compatible method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20220330

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

Address before: 2005, floor 2, No. 39, West Street, Haidian District, Beijing 100080

Applicant before: Beijing jingling Information System Technology Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant