CN113986476A - Sensor equipment virtualization method and device, electronic equipment and storage medium - Google Patents

Sensor equipment virtualization method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113986476A
CN113986476A CN202111592516.6A CN202111592516A CN113986476A CN 113986476 A CN113986476 A CN 113986476A CN 202111592516 A CN202111592516 A CN 202111592516A CN 113986476 A CN113986476 A CN 113986476A
Authority
CN
China
Prior art keywords
fuse
linux system
sensor
virtual node
sensor equipment
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.)
Pending
Application number
CN202111592516.6A
Other languages
Chinese (zh)
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.)
Douyin Vision Co Ltd
Original Assignee
Beijing Jingling Information System 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 Jingling Information System Technology Co Ltd filed Critical Beijing Jingling Information System Technology Co Ltd
Priority to CN202111592516.6A priority Critical patent/CN113986476A/en
Publication of CN113986476A publication Critical patent/CN113986476A/en
Priority to PCT/CN2022/141256 priority patent/WO2023116859A1/en
Pending legal-status Critical Current

Links

Images

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
    • 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/541Interprogram communication via adapters, e.g. between incompatible applications
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephonic Communication Services (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure provides a sensor device virtualization method and device, electronic equipment and a storage medium, and relates to the technical field of computers. The method comprises the following steps: the method comprises the steps of creating a corresponding virtual node for sensor equipment in a Linux system, sharing the virtual node to an Android container in the Linux system, creating a fuse daemon process in the Linux system, and communicating the Android container with the sensor equipment through the fuse daemon process. According to the technical scheme, the sensor equipment is virtualized, so that the unified management of the sensor equipment by the host Linux system is realized, and the compatibility problem of the sensor equipment when the Android container is operated in the Linux system can be effectively solved.

Description

Sensor equipment virtualization method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to the field of Linux and Android compatibility technologies.
Background
At present, the Linux system generally realizes compatibility of the Android system through a container, for example, through an Android in a box (Android in the container), a Linux namespace is used to run a complete Android system in the container. When the Android container in the Linux system accesses the sensor device, the sensor device can be accessed in a node sharing mode corresponding to the sensor device through a directory/dev/lower mode.
However, in the sharing mode, the sensor device can only be used by the Linux system or the Android container, the Android container does not have to be managed by the Linux system for accessing the sensor device, and a conflict may occur if the Linux system and the Android container access the sensor device at the same time.
Disclosure of Invention
The present disclosure provides a method, an apparatus, an electronic device, a storage medium, and a computer program product for sensor device virtualization.
According to an aspect of the present disclosure, there is provided a method of sensor device virtualization, including:
creating a corresponding virtual node for the sensor equipment in a Linux system;
sharing the virtual node to an Android container in the Linux system;
creating a fuse daemon process in the Linux system;
the Android container is in communication with the sensor device through the fuse daemon.
According to another aspect of the present disclosure, there is provided an apparatus for sensor device virtualization, including:
the virtual module is used for establishing a corresponding virtual node for the sensor equipment in the Linux system;
the sharing module is used for sharing the virtual node to an Android container in the Linux system;
the creating module is used for creating a fuse daemon process in the Linux system;
and the communication module is used for communicating the Android container with the sensor equipment through the fuse daemon.
According to another aspect of the present disclosure, there is provided an electronic device including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method in any embodiment of the disclosure.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform a method in any one of the embodiments of the present disclosure.
According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method in any of the embodiments of the present disclosure.
According to the technical scheme of the embodiment of the invention, the sensor equipment is virtualized, so that the unified management of the sensor equipment by the host Linux system is realized, and the problem of compatibility of the sensor equipment when the Android container is operated in the Linux system can be effectively solved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic diagram of a method for sensor device virtualization according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a method for sensor device virtualization according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of an internal framework of a Linux system according to one embodiment of the present disclosure;
FIG. 4 is a block diagram of an apparatus for sensor device virtualization according to an embodiment of the present disclosure;
FIG. 5 is a block diagram of an apparatus for sensor device virtualization according to an embodiment of the present disclosure;
FIG. 6 is a block diagram of an electronic device used to implement the method of sensor device virtualization of embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The technical scheme of the embodiment of the disclosure is applied to a scenario that a Linux system and an Android system run simultaneously, wherein the Android system runs in a host Linux system in a container mode, and the host Linux system can be connected with one or more sensor devices. The sensor devices to which embodiments of the present disclosure relate may be of various types, including but not limited to: temperature sensors, humidity sensors, pressure sensors, position sensors, speed sensors, acceleration sensors, and heat sensitive sensors, among others. The interaction of the Linux system or the Android system with the sensor device may be a bidirectional operation including an input operation and an output operation. The input operation means that the Linux system or the Android system can acquire data from the sensor device, such as temperature, humidity, pressure and the like. The output operation means that the Linux system or the Android system can control parameters of the sensor device, such as sensitivity, precision, frequency range or error range of the sensor.
According to the embodiment of the invention, the sensor equipment is virtualized, so that the unified management of the sensor equipment by the host Linux system is realized, and the compatibility problem of the sensor equipment when the Android container is operated in the Linux system can be effectively solved.
Fig. 1 is a schematic diagram of a method for virtualization of a sensor device according to an embodiment of the present disclosure. As shown in fig. 1, the method includes:
s101: creating a corresponding virtual node for the sensor equipment in a Linux system;
s102: sharing the virtual node to an Android container in a Linux system;
s103: creating a fuse daemon process in a Linux system;
s104: the Android container communicates with the sensor device through the fuse daemon.
In one embodiment, creating a corresponding virtual node for a sensor device in a Linux system includes:
and a fuse user space file system is used in the Linux system to create a corresponding virtual node for the sensor equipment.
In the embodiment of the present disclosure, a fuse (user space file system) is a module used for mounting some network spaces to a local file system in Linux, and is a file system completely implemented in a user mode. Linux has enabled file systems in user space through fuse support starting from version 2.6.14. The realization of the file system in the user space can greatly improve the productivity, simplify the workload of providing a new file system for the operating system, and is particularly suitable for various virtual file systems and network file systems. The Fuse driver can be viewed as a proxy that redirects requests to the back-end user daemon, through which different device files can be easily virtualized.
In one embodiment, creating a corresponding virtual node for a sensor device using a fuse user space file system in a Linux system comprises:
creating a fuse folder for the sensor equipment, using a mount function to mount the fuse folder to a directory/dev/fuse, and generating a virtual node corresponding to the sensor equipment.
According to the embodiment of the method and the device, the characteristics of bidirectional data transmission of the sensor equipment and mutual exclusion of the Linux system and the Android system when the sensor equipment is accessed simultaneously are considered, the fuse is used for achieving virtualization of the sensor equipment, not only can the virtual event be transmitted to the Android container, but also various operations of the Android container on the sensor equipment can be achieved.
In one embodiment, the sharing of virtual nodes to an Android container in a Linux system comprises:
and mounting the virtual node into an Android container in the Linux system through a mount function, wherein the Android container is visible.
In one embodiment, the method further comprises:
sensor devices registered in the HAL hardware abstraction layer are modified into virtual nodes.
The equipment node accessed by the Android container can be changed into a virtual node by modifying the HAL, so that the effect of isolating the sensor equipment is achieved, and the access of the Android container to the sensor equipment is realized in a mode of accessing the virtual node.
In one embodiment, the Android container communicates with the sensor device through the fuse daemon, and the Android container comprises:
when the Android container calls an interface function of the sensor equipment based on the HAL, the fuse daemon communicates with a sensor server in the Linux system through a fuse _ operations user space file system operation interface to complete input or output operation of the sensor equipment.
In the embodiment of the present disclosure, the fuse _ operations is a set of interfaces, and includes a plurality of interfaces for operating the sensor device, such as open (), read (), write (), ioctl () and poll (), and these interfaces directly communicate with the sensor server in the Linux system through the dbus bus, so as to control and obtain data of the sensor device.
The calling of the fuse _ operations interface is realized through the fuse daemon, the communication between the Android container and the sensor equipment is ensured, and various operations of the Android container on the sensor equipment are realized.
According to the method provided by the embodiment of the disclosure, the sensor equipment is virtualized, so that the unified management of the sensor equipment by the Linux system of the host is realized, the Linux system is directly communicated with the sensor equipment, and the Android container is communicated with the sensor equipment in a mode of accessing the virtual node, so that the conflict generated when the Linux system and the Android container simultaneously access the sensor equipment is avoided, and the problem of compatibility of the sensor equipment when the Android container is operated in the Linux system is effectively solved.
Fig. 2 is a schematic diagram of a method for virtualization of a sensor device according to an embodiment of the present disclosure. As shown in fig. 2, the method includes:
s201: a fuse user space file system is used in a Linux system, and a corresponding virtual node is created for the sensor equipment;
in this embodiment of the disclosure, the step S201 may include:
creating a fuse folder for the sensor equipment, using a mount function to mount the fuse folder to a directory/dev/fuse, and generating a virtual node corresponding to the sensor equipment.
The creating of the fuse folder for the sensor device may be created with reference to the sensor types supported in the sensor HAL, and is not limited in particular.
S202: mounting the virtual node into an Android container in a Linux system through a mount function, wherein the Android container is visible;
s203: modifying sensor equipment registered in a HAL hardware abstraction layer into a virtual node;
in one embodiment, the sensor _ open in the HAL (hardware Abstraction layer) may be modified, and the registered sensor device may be modified into a fuse file corresponding to the virtual node, so as to ensure that the HAL can capture the function of fuse daemon when calling the functions such as open (), read (), write (), ioctl () or poll ().
S204: creating a fuse daemon process in a Linux system;
in the embodiment of the disclosure, the function of the fuse daemon is that when the Android container accesses the virtual node, the fuse daemon can access the sensor server, and then the data of the sensor device is controlled and acquired. After the fuse folder corresponding to the virtual node is mounted under the directory/dev/fuse, all fuse file accesses corresponding to the virtual node are acquired and processed by the fuse daemon.
S205: when the Android container calls an interface function of the sensor equipment based on the HAL, the fuse daemon communicates with a sensor server in the Linux system through a fuse _ operations user space file system operation interface to complete input or output operation of the sensor equipment.
In one implementation mode, for the invocation of the Android container to the virtual node, the fuse daemon can correspondingly implement the invocation of various interfaces such as open (), read (), write (), ioctl () or poll () in fuse _ operations, and these interfaces directly communicate with the sensor server in the Linux system through the dbus bus to implement the control and acquisition of the sensor device data.
Fig. 3 is a schematic diagram of an internal framework of the Linux system according to an embodiment of the present disclosure. As shown in fig. 3, in one embodiment, the Android container is run in a Linux system using the Ixc method. The method comprises the steps of using fuse to create a virtual node corresponding to sensor equipment in a Linux system, mounting a generated fuse folder under a catalog/dev/fuse, and mounting the generated fuse folder into an Android container in a container sharing mode. The sensor devices registered in the HAL are modified to virtual nodes. Creating a fuse daemon process in the Linux system. When the Android container calls an interface function of the sensor equipment based on the HAL, the fuse daemon is communicated with a sensor server sensorfw server in the Linux system through a fuse _ operations interface, and input or output operation of the sensor equipment is completed.
According to the method provided by the embodiment of the disclosure, the sensor equipment is virtualized, so that the unified management of the sensor equipment by the Linux system of the host is realized, the Linux system is directly communicated with the sensor equipment, and the Android container is communicated with the sensor equipment in a mode of accessing the virtual node, so that the conflict generated when the Linux system and the Android container simultaneously access the sensor equipment is avoided, and the problem of compatibility of the sensor equipment when the Android container is operated in the Linux system is effectively solved.
FIG. 4 is a block diagram of an apparatus for sensor device virtualization according to an embodiment of the present disclosure. As shown in fig. 4, the apparatus includes:
the virtual module 401 is configured to create a corresponding virtual node for the sensor device in the Linux system;
a sharing module 402, configured to share the virtual node to an Android container in the Linux system;
a creating module 403, configured to create a fuse daemon process in the Linux system;
and a communication module 404, configured to communicate the Android container with the sensor device through the fuse daemon.
In one embodiment, the virtual module 401 includes:
and the virtual unit is used for creating a corresponding virtual node for the sensor equipment by using the fuse user space file system in the Linux system.
In one embodiment, the virtual unit is to:
creating a fuse folder for the sensor equipment, using a mount function to mount the fuse folder to a directory/dev/fuse, and generating a virtual node corresponding to the sensor equipment.
In one embodiment, the sharing module 402 is configured to:
and mounting the virtual node into an Android container in the Linux system through a mount function, wherein the Android container is visible.
Fig. 5 is a block diagram of an apparatus in an embodiment in accordance with the present disclosure. As shown in fig. 5, the apparatus includes: a virtual module 501, a sharing module 502, a creation module 503, a communication module 504, and a modification module 505.
The virtual module 501, the sharing module 502, the creating module 503, and the communication module 504 have the same functions as the virtual module 401, the sharing module 402, the creating module 403, and the communication module 404 in the above embodiments, respectively, and are not described herein again.
In one embodiment, the modification module 505 is configured to modify a sensor device registered in the HAL hardware abstraction layer to a virtual node.
In one embodiment, the communication module 504 is configured to:
when the Android container calls an interface function of the sensor equipment based on the HAL, the fuse daemon communicates with a sensor server in the Linux system through a fuse _ operations user space file system operation interface to complete input or output operation of the sensor equipment.
According to the device provided by the embodiment of the disclosure, the sensor equipment is virtualized, so that the unified management of the sensor equipment by the Linux system of the host is realized, the Linux system is directly communicated with the sensor equipment, and the Android container is communicated with the sensor equipment in a mode of accessing the virtual node, so that the conflict generated when the Linux system and the Android container access the sensor equipment simultaneously is avoided, and the problem of compatibility of the sensor equipment when the Android container is operated in the Linux system is effectively solved.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 6 illustrates a schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the apparatus 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 602 or a computer program loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The calculation unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
A number of components in the device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, a mouse, or the like; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 601 performs the respective methods and processes described above. For example, in some embodiments, the above-described methods may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 600 via the ROM 602 and/or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the above-described method in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (14)

1. A method of sensor device virtualization, comprising:
creating a corresponding virtual node for the sensor equipment in a Linux system;
sharing the virtual node to an Android container in the Linux system;
creating a fuse daemon process in the Linux system;
the Android container is in communication with the sensor device through the fuse daemon.
2. The method according to claim 1, wherein the creating a corresponding virtual node for a sensor device in a Linux system comprises:
and a fuse user space file system is used in the Linux system to create a corresponding virtual node for the sensor equipment.
3. The method of claim 2, wherein said creating a corresponding virtual node for a sensor device using a fuse user space file system in a Linux system comprises:
creating a fuse folder for the sensor equipment, using a mount function to mount the fuse folder to a directory/dev/fuse, and generating a virtual node corresponding to the sensor equipment.
4. The method according to claim 1, wherein the sharing the virtual node to the Android container in the Linux system comprises:
and mounting the virtual node into an Android container in the Linux system through a mount function, wherein the Android container is visible.
5. The method of claim 1, further comprising:
modifying the sensor device registered in the HAL hardware abstraction layer to the virtual node.
6. The method of claim 5, the Android container in communication with the sensor device through the fuse daemon, comprising:
and when the Android container calls the interface function of the sensor equipment based on the HAL hardware abstraction layer, the fuse daemon communicates with a sensor server in the Linux system through a fuse _ operations user space file system operation interface to finish the input or output operation of the sensor equipment.
7. An apparatus of sensor device virtualization, comprising:
the virtual module is used for establishing a corresponding virtual node for the sensor equipment in the Linux system;
the sharing module is used for sharing the virtual node to an Android container in the Linux system;
the creating module is used for creating a fuse daemon process in the Linux system;
and the communication module is used for communicating the Android container with the sensor equipment through the fuse daemon.
8. The apparatus of claim 7, wherein the virtual module comprises:
and the virtual unit is used for creating a corresponding virtual node for the sensor equipment by using the fuse user space file system in the Linux system.
9. The apparatus of claim 8, wherein the virtual unit is to:
creating a fuse folder for the sensor equipment, using a mount function to mount the fuse folder to a directory/dev/fuse, and generating a virtual node corresponding to the sensor equipment.
10. The apparatus of claim 7, wherein the sharing module is to:
and mounting the virtual node into an Android container in the Linux system through a mount function, wherein the Android container is visible.
11. The apparatus of claim 7, further comprising:
a modification module, configured to modify the sensor device registered in the HAL hardware abstraction layer into the virtual node.
12. The apparatus of claim 11, the communication module to:
and when the Android container calls the interface function of the sensor equipment based on the HAL hardware abstraction layer, the fuse daemon communicates with a sensor server in the Linux system through a fuse _ operations user space file system operation interface to finish the input or output operation of the sensor equipment.
13. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
14. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-6.
CN202111592516.6A 2021-12-24 2021-12-24 Sensor equipment virtualization method and device, electronic equipment and storage medium Pending CN113986476A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111592516.6A CN113986476A (en) 2021-12-24 2021-12-24 Sensor equipment virtualization method and device, electronic equipment and storage medium
PCT/CN2022/141256 WO2023116859A1 (en) 2021-12-24 2022-12-23 Sensor device virtualization method and apparatus, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111592516.6A CN113986476A (en) 2021-12-24 2021-12-24 Sensor equipment virtualization method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113986476A true CN113986476A (en) 2022-01-28

Family

ID=79734187

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111592516.6A Pending CN113986476A (en) 2021-12-24 2021-12-24 Sensor equipment virtualization method and device, electronic equipment and storage medium

Country Status (2)

Country Link
CN (1) CN113986476A (en)
WO (1) WO2023116859A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023116859A1 (en) * 2021-12-24 2023-06-29 抖音视界有限公司 Sensor device virtualization method and apparatus, electronic device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105808320A (en) * 2016-03-11 2016-07-27 四川安嵌科技有限公司 Equipment virtualization system and method based on Linux container
CN110659246A (en) * 2019-09-26 2020-01-07 北京百度网讯科技有限公司 Container-based file mounting method and device and electronic equipment
CN113448740A (en) * 2021-09-01 2021-09-28 北京鲸鲮信息系统技术有限公司 Power management method and device for operating system
CN113791875A (en) * 2021-11-18 2021-12-14 北京鲸鲮信息系统技术有限公司 Input device virtualization method and device, electronic device and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11645245B2 (en) * 2019-09-26 2023-05-09 International Business Machines Corporation Container software discovery and cataloging
CN113986476A (en) * 2021-12-24 2022-01-28 北京鲸鲮信息系统技术有限公司 Sensor equipment virtualization method and device, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105808320A (en) * 2016-03-11 2016-07-27 四川安嵌科技有限公司 Equipment virtualization system and method based on Linux container
CN110659246A (en) * 2019-09-26 2020-01-07 北京百度网讯科技有限公司 Container-based file mounting method and device and electronic equipment
CN113448740A (en) * 2021-09-01 2021-09-28 北京鲸鲮信息系统技术有限公司 Power management method and device for operating system
CN113791875A (en) * 2021-11-18 2021-12-14 北京鲸鲮信息系统技术有限公司 Input device virtualization method and device, electronic device and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023116859A1 (en) * 2021-12-24 2023-06-29 抖音视界有限公司 Sensor device virtualization method and apparatus, electronic device and storage medium

Also Published As

Publication number Publication date
WO2023116859A1 (en) 2023-06-29

Similar Documents

Publication Publication Date Title
US9928038B2 (en) Dynamically building locale objects or subsections of locale objects based on historical data
US9189619B2 (en) Runtime based application security and regulatory compliance in cloud environment
US9292215B2 (en) Managing virtual hard disk snapshots
US11132450B2 (en) Accessing file systems in a virtual environment
WO2010023139A1 (en) Provisioning virtual resources using name resolution
CN113934464A (en) Method and device for starting android application in Linux system and electronic equipment
CN113296950B (en) Processing method, processing device, electronic equipment and readable storage medium
WO2023088313A1 (en) Input device virtualization method and apparatus, electronic device, and storage medium
US20210117386A1 (en) Host-level persistent volume management for container clouds
CN115309511B (en) Xen-based data interaction method and device, storage medium and electronic equipment
CN114077367A (en) Method and device for realizing shortcut of android application in Linux system
CN114936173B (en) Read-write method, device, equipment and storage medium of eMMC device
WO2023116859A1 (en) Sensor device virtualization method and apparatus, electronic device and storage medium
CN114625536A (en) Video memory allocation method, device, medium and electronic equipment
CN114035863A (en) Method, device and equipment for operating android application in Linux system
CN112948018A (en) Dynamic library loading method, device, equipment and medium for small program
CN115048060B (en) Storage management method and device, electronic equipment and storage medium
EP4106293A2 (en) Network configuring method and apparatus for cloud mobile phone, device and storage medium
CN114020364B (en) Sensor device adaptation method, device, electronic device and storage medium
CN116661951B (en) Mirror image file processing method and device, electronic equipment and storage medium
CN113220576A (en) Management method, device, equipment and storage medium of test environment
CN114428668A (en) Method, device and system for updating data
CN113204538A (en) Method, apparatus, device, medium and program product for data migration
CN114416179A (en) Program processing method, device, equipment and storage medium
CN117827369A (en) Virtual machine decryption 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
TA01 Transfer of patent application right

Effective date of registration: 20221123

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

Applicant after: Douyin Vision Co.,Ltd.

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

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