CN113193979B - Method, device and computer equipment for realizing virtual peripheral sharing of Internet of things module - Google Patents

Method, device and computer equipment for realizing virtual peripheral sharing of Internet of things module Download PDF

Info

Publication number
CN113193979B
CN113193979B CN202110317897.0A CN202110317897A CN113193979B CN 113193979 B CN113193979 B CN 113193979B CN 202110317897 A CN202110317897 A CN 202110317897A CN 113193979 B CN113193979 B CN 113193979B
Authority
CN
China
Prior art keywords
internet
peripheral
things module
virtual
virtual peripheral
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
CN202110317897.0A
Other languages
Chinese (zh)
Other versions
CN113193979A (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.)
Fibocom Wireless Inc
Original Assignee
Fibocom Wireless Inc
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 Fibocom Wireless Inc filed Critical Fibocom Wireless Inc
Priority to CN202110317897.0A priority Critical patent/CN113193979B/en
Publication of CN113193979A publication Critical patent/CN113193979A/en
Priority to PCT/CN2021/124339 priority patent/WO2022198989A1/en
Application granted granted Critical
Publication of CN113193979B publication Critical patent/CN113193979B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Abstract

The application relates to a method, a device, computer equipment and a storage medium for realizing virtual peripheral sharing of an internet of things module. The method comprises the following steps: sending a first probing instruction to the same cell communication network; receiving a first peripheral device sent by a first Internet of things module in response to the first probing instruction; determining a first target virtual peripheral according to the first peripheral; initiating a first virtual peripheral request to the first Internet of things module, wherein the first virtual peripheral request comprises a first target virtual peripheral; receiving configuration parameters of the first target virtual peripheral sent by the first Internet of things module in response to the first virtual peripheral request in a virtualized state; and adding virtual peripheral equipment according to the configuration parameters of the first target virtual peripheral equipment. By adopting the method, the sharing efficiency of the peripheral of the Internet of things module can be improved.

Description

Method, device and computer equipment for realizing virtual peripheral sharing of Internet of things module
Technical Field
The application relates to the technical field of internet of things modules, in particular to a method, a device, computer equipment and a storage medium for realizing virtual peripheral sharing of an internet of things module.
Background
With the development of the technology of the internet of things module, in order to realize that a single internet of things module can share virtual peripheral equipment information with other internet of things modules, the expansion performance of the internet of things module is improved to better adapt to the communication requirements of various terminal equipment, so that the technology of sharing the peripheral equipment of the internet of things module is presented.
In the conventional technology, the sharing of the virtual peripheral equipment of the internet of things module is generally realized by changing the existing hardware layout, and the virtual peripheral equipment can refer to a microphone, a camera, a display screen and the like. When a certain virtual peripheral device is needed, a corresponding virtual peripheral device is newly added in a hardware circuit of the internet of things module, and sometimes the new virtual peripheral device involves the change of the whole circuit connection.
However, in the current traditional method, the efficiency of sharing the peripheral of the internet of things module is reduced to a certain extent by changing the existing hardware layout mode.
Disclosure of Invention
Based on the foregoing, it is necessary to provide a method, an apparatus, a computer device and a storage medium for implementing sharing of virtual peripheral devices of an internet of things module, which can improve sharing efficiency of peripheral devices of the internet of things module.
A method of implementing sharing of virtual peripherals of an internet of things module, the method comprising:
Sending a first probing instruction to the same cell communication network;
receiving a first peripheral device sent by a first Internet of things module in response to the first probing instruction;
determining a first target virtual peripheral according to the first peripheral;
initiating a first virtual peripheral request to the first Internet of things module, wherein the first virtual peripheral request comprises a first target virtual peripheral;
receiving configuration parameters of the first target virtual peripheral sent by the first Internet of things module in response to the first virtual peripheral request in a virtualized state;
and adding virtual peripheral equipment according to the configuration parameters of the first target virtual peripheral equipment.
In one embodiment, the first internet of things module includes an actual driving node, where the actual driving node is configured to store configuration parameters of the peripheral device; the receiving the configuration parameters of the first target virtual peripheral sent by the first internet of things module in response to the first virtual peripheral request in a virtualized state comprises:
acquiring a first start sharing signal sent by the first Internet of things module in response to the first virtual peripheral request in a virtual state;
based on the first start sharing signal, a virtual device node is created locally, and a data channel is created together with the first Internet of things module;
And according to the first virtual peripheral request, acquiring configuration parameters of a first target virtual peripheral from the actual driving node through the data channel, and storing the configuration parameters of the first target virtual peripheral in the virtual equipment node.
In one embodiment, the method further comprises: and acquiring a first sharing rejection instruction sent by the first Internet of things module in response to the first virtual peripheral request under the non-virtualization state.
In one embodiment, the method further comprises:
receiving a second probing instruction sent by a second internet-of-things module;
determining the address of the second internet-of-things module based on the second probing instruction, and sending a second peripheral to the second internet-of-things module according to the address;
receiving a second virtual peripheral request sent by the second internet of things module, wherein the second virtual peripheral request comprises a second target virtual peripheral determined according to the second external;
and the local Internet of things module responds to the second virtual peripheral equipment request in a virtual state, sends configuration parameters of the second target virtual peripheral equipment to the second Internet of things module, and adds virtual peripheral equipment according to the configuration parameters of the second target virtual peripheral equipment by the second Internet of things module.
In one embodiment, the method further comprises: the second networking module comprises a virtual driving node, and the virtual driving node is used for storing configuration parameters of the peripheral equipment; the local internet of things module responds to the second virtual peripheral equipment request in a virtual state, and sends configuration parameters of the second target virtual peripheral equipment to the second internet of things module, wherein the configuration parameters comprise:
the local Internet of things module responds to the second virtual peripheral request in a virtual state, sends a second start sharing signal to the second Internet of things module, creates a virtual device node based on the second start sharing signal by the second Internet of things module, and creates a data channel together with the local Internet of things module;
and sending the configuration parameters of the second target virtual peripheral to the second internet-of-things module through the data channel, and storing the configuration parameters of the second target virtual peripheral in a virtual device node by the second internet-of-things module.
In one embodiment, the method further comprises: and the local Internet of things module sends a second sharing rejection instruction to the second Internet of things module in a virtual state.
In one embodiment, after sending the configuration parameters of the second target virtual peripheral to the second networking module, the method further includes: and sending a sharing ending signal to the second internet-of-things module, and closing the virtual peripheral equipment when obtaining the sharing ending signal agreed by the second internet-of-things module.
An apparatus for implementing sharing of virtual peripherals of an internet of things module, the apparatus comprising:
the first probing instruction sending module is used for sending a probing instruction to the communication network of the same cell;
the first peripheral acquisition module is used for receiving a first peripheral sent by the first Internet of things module in response to the probe instruction;
the first target virtual peripheral equipment determining module is used for determining a first target virtual peripheral equipment according to the first peripheral equipment;
the first virtual peripheral request initiating module is used for initiating a first virtual peripheral request to the first Internet of things module, wherein the first virtual peripheral request comprises a first target virtual peripheral;
the configuration parameter acquisition module is used for receiving the configuration parameters of the first target virtual peripheral sent by the first Internet of things module in response to the first virtual peripheral request in a virtual state;
and the virtual peripheral equipment newly-adding module is used for newly-adding the virtual peripheral equipment according to the configuration parameters of the first target virtual peripheral equipment.
A computer device comprising a memory storing a computer program and a processor which when executing the computer program performs the steps of:
sending a first probing instruction to the same cell communication network;
Receiving a first peripheral device sent by a first Internet of things module in response to the first probing instruction;
determining a first target virtual peripheral according to the first peripheral;
initiating a first virtual peripheral request to the first Internet of things module, wherein the first virtual peripheral request comprises a first target virtual peripheral;
receiving configuration parameters of the first target virtual peripheral sent by the first Internet of things module in response to the first virtual peripheral request in a virtualized state;
and adding virtual peripheral equipment according to the configuration parameters of the first target virtual peripheral equipment.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
sending a first probing instruction to the same cell communication network;
receiving a first peripheral device sent by a first Internet of things module in response to the first probing instruction;
determining a first target virtual peripheral according to the first peripheral;
initiating a first virtual peripheral request to the first Internet of things module, wherein the first virtual peripheral request comprises a first target virtual peripheral;
receiving configuration parameters of the first target virtual peripheral sent by the first Internet of things module in response to the first virtual peripheral request in a virtualized state;
And adding virtual peripheral equipment according to the configuration parameters of the first target virtual peripheral equipment.
According to the method, the device, the computer equipment and the storage medium for realizing the sharing of the virtual peripheral of the Internet of things module, the first peripheral of other Internet of things modules in the same cell is obtained by sending the probing command to the communication network of the same cell, the required first target virtual peripheral is determined, and then a first virtual peripheral request is initiated to the first Internet of things module, the configuration parameters of the first target virtual peripheral are obtained, and the virtual peripheral equipment is newly added locally according to the configuration parameters. Therefore, the peripheral equipment of other Internet of things modules in the same cell can be virtually increased to serve as local peripheral equipment in a mode of acquiring configuration parameters. The method does not need to change the hardware circuit, and the layout and welding of the hardware circuit are re-planned. The sharing of the peripheral equipment can be completed only through simple communication interaction between the two or more shared internet of things modules, so that the sharing efficiency of the peripheral equipment of the internet of things modules can be improved.
Drawings
FIG. 1 is an application environment diagram of a method for implementing virtual peripheral sharing of an Internet of things module in one embodiment;
FIG. 2 is a flow diagram of a method for implementing virtual peripheral sharing of an Internet of things module in one embodiment;
FIG. 3 is a flowchart of a method for implementing virtual peripheral sharing of an IOT module in another embodiment;
fig. 4 is a flow chart of a method for sharing with virtual peripherals of other internet of things modules when the same internet of things module is used as a sender and a receiver of a probe instruction, respectively, in one embodiment;
FIG. 5 is a block diagram of an apparatus for implementing virtual peripheral sharing of an Internet of things module in one embodiment;
fig. 6 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The method for realizing virtual peripheral sharing of the Internet of things module can be applied to an application environment shown in fig. 1. The first internet of things module 102 and the second internet of things module 104 communicate with each other through a network, bluetooth, infrared, etc. To illustrate the sharing of peripherals among different internet of things modules, the Chinese section in FIG. 1 is labeled specifically as a first internet of things module 102 and a second internet of things module 104 to distinguish between them.
Taking fig. 1 as an example, when a virtual peripheral device needs to be added, the first internet of things module 102 may send a probe instruction to the same cell communication network, and receive other internet of things modules of the probe instruction, and if the probe instruction is the second internet of things module 104, the second internet of things module 104 may find an address of the first internet of things module 102 that sends the probe instruction, so as to send a configuration parameter of the first target virtual peripheral device to the first internet of things module 102 that needs to be added with the virtual peripheral device.
The first internet of things module 102 not only can obtain the configuration parameters of the first target virtual peripheral from the second internet of things module 104, but also can send the own peripheral information (second peripheral) to the second internet of things module 104, so that the second internet of things module 104 can obtain the configuration parameters of the second target virtual peripheral from the first internet of things module 102, and virtual peripheral equipment is newly added.
In one embodiment, as shown in fig. 2, a method for implementing sharing of virtual peripherals of an internet of things module is provided, and the method is applied to the terminal in fig. 1 for illustration, and includes the following steps:
step S202, a first probing instruction is sent to the same cell communication network.
The first probe instruction is a probe instruction, and peripheral information actually owned in the first internet of things module can be probed through the probe instruction.
Specifically, when the internet of things module performs peripheral sharing with another (single or multiple) internet of things module, the two internet of things modules are required to be in the same service cell (or called cell). Wherein the same cell communication network is referred to as a serving cell.
Step S204, a first peripheral device sent by the first Internet of things module in response to the first probe instruction is received.
The first peripheral device refers to peripheral device information actually owned by the first internet of things, and is descriptive information of the peripheral device information, such as names, function descriptions, and the like.
Specifically, the local internet of things module needs to perform peripheral sharing, so that the internet of things module actively sending the first probe instruction can send a probe instruction to other internet of things modules (collectively called as the first internet of things module), and after receiving the probe instruction, the other internet of things modules can find the address of the internet of things module sending the probe instruction and send peripheral information actually owned by the internet of things module according to the address.
Step S206, determining a first target virtual peripheral according to the first peripheral.
Specifically, after the local internet of things module obtains the first peripheral, the first target virtual peripheral can be determined from the first peripheral according to own requirements. Therefore, the first target virtual peripheral is a peripheral required by the local internet of things module, for example, when the local internet of things module lacks certain peripheral information or the quantity of certain peripheral information is insufficient, the local internet of things module needs to acquire the corresponding first target virtual peripheral from the first peripheral.
Step S208, a first virtual peripheral request is initiated to the first internet of things module, where the first virtual peripheral request includes a first target virtual peripheral.
The first virtual peripheral equipment request is sent according to the requirement of the local Internet of things module, the first virtual peripheral equipment request is not only an electric signal, but also a first target virtual peripheral equipment required by the local Internet of things module is included in the electric signal, and according to the first virtual peripheral equipment request, the first Internet of things module can acquire peripheral equipment information required by the local Internet of things module, namely the first target virtual peripheral equipment.
Specifically, after the local internet of things module determines the first target virtual peripheral, a module session is established according to the self-requirement, and a first virtual peripheral request is sent to the first internet of things module. Where a module session is a communication mechanism used in communicating between modules. Based on the module session, the local internet of things module can know the state of the first internet of things module.
Step S210, receiving a configuration parameter of the first target virtual peripheral sent by the first internet of things module in response to the first virtual peripheral request in a virtualized state.
The state of the first internet of things module is a virtual state, namely the first internet of things module can share peripheral equipment, and the first peripheral equipment of the first internet of things module is virtual to the state of the local internet of things module. The configuration parameters of the first target virtual peripheral device refer to data information of the first target virtual peripheral device, including peripheral type, interface attribute, version, transmission/control protocol, and the like.
Specifically, the first internet of things module responds to a first virtual peripheral request sent by the local internet of things module in a virtual state, so that configuration parameters of a first target virtual peripheral are sent to the local internet of things module.
Step S212, newly adding virtual peripheral equipment according to the configuration parameters of the first target virtual peripheral equipment.
The virtual peripheral equipment comprises a microphone, a camera, a display screen and the like.
Specifically, after the local internet of things module obtains the configuration parameters of the first target virtual peripheral, the corresponding virtual peripheral equipment is newly added to the local internet of things module according to the configuration parameters of the first target virtual peripheral.
In the method for realizing virtual peripheral sharing of the internet of things module, the first peripheral of other internet of things modules in the same cell is obtained by sending the probing command to the communication network of the same cell, the required first target virtual peripheral is determined, and then a first virtual peripheral request is initiated to the first internet of things module, configuration parameters of the first target virtual peripheral are obtained, and virtual peripheral equipment is newly added locally according to the configuration parameters. Therefore, the peripheral equipment of other Internet of things modules in the same cell can be virtually increased to serve as local peripheral equipment in a mode of acquiring configuration parameters. The method does not need to change the hardware circuit, and the layout and welding of the hardware circuit are re-planned. The sharing of the peripheral equipment can be completed only through simple communication interaction between the two or more shared internet of things modules, so that the sharing efficiency of the peripheral equipment of the internet of things modules can be improved.
In one embodiment, the first internet of things module includes an actual driving node, where the actual driving node is configured to store peripheral information; the obtaining the peripheral information shared by the first internet of things module includes:
and acquiring a first start sharing signal sent by the first Internet of things module in response to the first virtual peripheral equipment request in a virtual state.
The first start sharing signal is a signal in the form of an electrical signal, and the first start sharing signal is sent by the first internet of things module and is used for reminding the local internet of things module of being capable of carrying out a subsequent peripheral sharing step when the first internet of things module is in a virtual state.
And based on the first start sharing signal, creating a virtual device node locally and creating a data channel together with the first Internet of things module.
Specifically, after the local internet of things module receives the first start sharing signal, a virtual device node is created in the local internet of things module, and the function of the virtual device node is equivalent to a file for storing data information, and is mainly used for storing configuration parameters of peripheral equipment. Meanwhile, the local Internet of things module and the first Internet of things module together create a data channel, and the data channel is used for transmission of peripheral information. The local internet of things module is provided with a control instruction for controlling the data channel to be opened or closed. Namely, when the control instruction controls the peripheral information of the first Internet of things module to be opened, the peripheral information can be transmitted from the actual driving node to the virtual equipment node; when the control instruction controls the peripheral information of the first Internet of things module to be closed, the peripheral information cannot be transmitted from the actual driving node to the virtual equipment node.
And according to the first virtual peripheral request, acquiring configuration parameters of a first target virtual peripheral from the actual driving node through the data channel, and storing the configuration parameters of the first target virtual peripheral in the virtual equipment node.
The first target virtual peripheral is some peripheral information which is lack of the local internet of things module, and is peripheral information which is needed by the local internet of things module to realize related functions, so that the first target virtual peripheral is called as the first target virtual peripheral.
Specifically, after the local internet of things module obtains the configuration parameters of the first target virtual peripheral, the configuration parameters of the first target virtual peripheral are stored in the virtual equipment node, wherein the function of the virtual equipment node is also equivalent to a file for storing data information, and the local internet of things module is mainly used for storing the configuration parameters of the first target virtual peripheral.
In one embodiment, the method for implementing sharing of virtual peripheral devices of the internet of things module further includes: and acquiring a first sharing rejection instruction sent by the first Internet of things module in response to the first virtual peripheral request under the non-virtualization state.
The first internet of things module is in a virtual state, and the virtual state is a state in which peripheral sharing cannot be realized due to the first internet of things module. The non-virtualizable state usually occurs in a module session negotiation stage, and if the first internet of things module is starting the device, the device is refused when sharing cannot be performed, and meanwhile, a first instruction for refusing to share is sent to the local internet of things module, so that the sharing of the peripheral is refused temporarily. The local internet of things module temporarily waits after receiving the first sharing rejection instruction, and if the configuration parameter of the first target virtual peripheral device obtained earliest in the waiting time is not the first internet of things module which originally sends the first sharing rejection instruction, the local internet of things module shares the peripheral device with the first internet of things module which responds earliest in the waiting time.
In this embodiment, when the external state in the first internet of things module is the non-virtualizable state, the first sharing rejection instruction is sent to the local internet of things module, so that the local internet of things module can avoid invalid waiting, and efficiency of sharing peripheral devices is improved.
In one embodiment, the method for implementing sharing of virtual peripheral devices of the internet of things module further includes:
step S302, a second probing instruction sent by a second Internet of things module is received.
For the same Internet of things module, the same Internet of things module can be used as a party for sending the second exploration instruction, and required peripheral information is obtained from other Internet of things modules; the peripheral information actually owned by the user (to be different from the first peripheral, hereinafter referred to as a second peripheral) can be sent to other internet of things modules as a party receiving the second probe instruction. When the aforementioned internet of things module sending the second probe instruction is needed by other internet of things modules to share peripheral information, the other internet of things modules are regarded as the second internet of things module. In addition, the internet of things module for receiving the second probing instruction is hereinafter referred to as a local internet of things module.
And step S304, determining the address of the second networking module based on the second probing instruction, and sending a second peripheral to the second networking module according to the address.
Specifically, based on the second probing instruction, after determining the address of the second internet of things module, the local internet of things module may send the name and the functional descriptive information of the second peripheral to the second internet of things module according to the address of the second internet of things module.
Step S306, receiving a second virtual peripheral request sent by the second internet module, where the second virtual peripheral request includes a second target virtual peripheral determined according to the second setting.
The second virtual peripheral request is sent according to the requirement of the second internet of things module, and the second virtual peripheral request is not only an electric signal, but also a second target virtual peripheral required by the second internet of things module is included in the electric signal, and according to the second virtual peripheral request, the local internet of things module can acquire peripheral information required by the second internet of things module, namely the second target virtual peripheral.
Specifically, after the second target virtual peripheral is determined, the second internet of things module establishes a module session with the local internet of things module according to own needs, and sends a second virtual peripheral request to the local internet of things module. Where a module session is a communication mechanism used in communicating between modules. Based on the module session, the second internet of things module may be aware of the state of the local internet of things module.
In step S308, the local internet of things module responds to the second virtual peripheral request in a state that can be virtualized, and sends configuration parameters of the second target virtual peripheral to the second internet of things module, and the second internet of things module adds virtual peripheral equipment according to the configuration parameters of the second target virtual peripheral.
The state of the local internet of things module is a virtual state, namely the local internet of things module can share peripheral equipment, and the second peripheral equipment of the internet of things module is virtual to the state of the second internet of things module. The configuration parameters of the second target virtual peripheral device refer to data information of the second target virtual peripheral device, including peripheral type, interface attribute, version, transmission/control protocol, and the like.
Specifically, the local internet of things module responds to a second virtual peripheral request sent by the second internet of things module in a virtual state, and sends configuration parameters of a second target virtual peripheral to the second internet of things module, and after the second internet of things module obtains the configuration parameters of the second target virtual peripheral, virtual peripheral equipment is newly added according to the configuration parameters of the second target virtual peripheral.
In this embodiment, the local internet of things module obtains the address of the second internet of things module by receiving the second probe instruction sent by the second internet of things module, then sends the second external device to the second internet of things module according to the address of the second internet of things module, and finally sends the configuration parameters of the second target virtual external device to the second internet of things module according to the second virtual external device request of the second internet of things module. Therefore, the same Internet of things module can be used as a party for receiving the shared peripheral information and a party for sending the shared peripheral information.
In one embodiment, the second networking module includes a virtual drive node for storing configuration parameters of the peripheral; the local internet of things module responds to the second virtual peripheral equipment request in a virtual state, and sends configuration parameters of the second target virtual peripheral equipment to the second internet of things module, wherein the configuration parameters comprise:
the local Internet of things module responds to the second virtual peripheral request in a virtual state, sends a second start sharing signal to the second Internet of things module, creates a virtual device node based on the second start sharing signal by the second Internet of things module, and creates a data channel together with the local Internet of things module;
the second start sharing signal is a signal in the form of an electrical signal, and the second start sharing signal is sent by the local internet of things module and is used for reminding the second internet of things module of being capable of carrying out a subsequent peripheral sharing step when the local internet of things module is in a virtual state.
Specifically, after receiving the second start sharing signal, the second internet of things module creates a virtual device node in the local internet of things module, where the virtual device node functions as a file storing data information, and is mainly used to store configuration parameters of the peripheral. Meanwhile, the local Internet of things module and the second Internet of things module together create a data channel, and the data channel is used for transmission of peripheral information. The second networking module is provided with a control instruction for controlling the opening or closing of the data channel. Namely, when the control instruction controls the peripheral information of the local internet of things module to be opened, the peripheral information can be transmitted from the actual driving node to the virtual equipment node; when the control instruction controls the peripheral information of the local internet of things module to be closed, the peripheral information cannot be transmitted from the actual driving node to the virtual equipment node.
And sending the configuration parameters of the second target virtual peripheral to the second internet-of-things module through the data channel, and storing the configuration parameters of the second target virtual peripheral in a virtual device node by the second internet-of-things module.
The second target virtual peripheral is some peripheral information that is missing from the second networking module, and the second target virtual peripheral is peripheral information that is required by the second networking module to implement a related function, so the second target virtual peripheral is called a second target virtual peripheral.
Specifically, after the second networking module obtains the configuration parameters of the second target virtual peripheral, the configuration parameters of the second target virtual peripheral are stored in the virtual equipment node, wherein the function of the virtual equipment node is equivalent to a file for storing data information, and the second networking module is mainly used for storing the configuration parameters of the second target virtual peripheral.
In this embodiment, the local internet of things module creates the data channel together with the second internet of things module, and controls the data channel to be opened according to the second target virtual peripheral device, so that the configuration parameters of the second target virtual peripheral device can be transmitted from the actual driving node to the virtual device node, thereby controlling the second internet of things module to acquire the configuration parameters of the second target virtual peripheral device.
In one embodiment, the method for implementing sharing of virtual peripheral devices of the internet of things module further includes: and the local Internet of things module sends a second sharing rejection instruction to the second Internet of things module in a virtual state.
The local internet of things module is in a virtual state, and the virtual state is a state in which peripheral sharing cannot be realized due to the local internet of things module. The non-virtualizable state is usually rejected when the local internet of things module is starting the device and cannot share the device in a module session negotiation stage, and a second sharing rejection instruction is sent to the second internet of things module to temporarily reject the shared peripheral. The second internet of things module can wait temporarily after receiving the second sharing rejection instruction, if the required peripheral information obtained earliest in the waiting time is not the local internet of things module which originally sends the second sharing rejection instruction, the second internet of things module can share the peripheral with the local internet of things module which responds earliest in the waiting time.
In this embodiment, when the external state in the local internet of things module is the non-virtualizable state, the second shared rejection instruction is sent to the second internet of things module, so that the second internet of things module can avoid invalid waiting, and efficiency of peripheral sharing is improved.
In one embodiment, after sending the configuration parameters of the second target virtual peripheral to the second networking module, the method further includes: and sending a sharing ending signal to the second internet-of-things module, and closing the virtual peripheral equipment when obtaining the sharing ending signal agreed by the second internet-of-things module.
Specifically, after the local internet of things module sends the required peripheral information to the second internet of things module, the local internet of things module also sends an ending sharing signal to the second internet of things module, if the second internet of things module obtains the peripheral information and does not need to obtain additional peripheral information, the local internet of things module can send an ending sharing signal to the local internet of things module, and when the local internet of things module obtains the ending sharing signal, the local internet of things module can close corresponding virtual peripheral equipment.
In this embodiment, by sending the end sharing signal to the second internet of things module, when the end sharing signal is obtained, the virtual peripheral device of the second internet of things module is turned off, so that unnecessary virtual peripheral devices can be prevented from being started, and power consumption of the internet of things module is saved.
In one embodiment, a method for implementing sharing of virtual peripherals of an internet of things module includes:
The communication process between the internet of things module as an execution main body and the first internet of things module mainly comprises the following steps:
step S402, a first probing instruction is sent to the same cell communication network.
Step S404, a first peripheral sent by the first Internet of things module in response to the first probe instruction is received, and a first target virtual peripheral is determined according to the first peripheral.
Step S408, a first virtual peripheral request is initiated to the first internet of things module, where the first virtual peripheral request includes a first target virtual peripheral.
Step S410, receiving the configuration parameters of the first target virtual peripheral sent by the first internet of things module in response to the first virtual peripheral request in the virtualizable state.
Step S412, adding a virtual peripheral device according to the configuration parameters of the first target virtual peripheral device.
The communication process between the internet of things module as the execution main body and the second internet of things module mainly comprises the following steps:
step S402', receiving a second probe instruction sent by the second internet module.
And step S404', determining the address of the second networking module based on the second probing instruction, and sending a second peripheral to the second networking module according to the address.
Step S406', receiving a second virtual peripheral request sent by the second internet module, where the second virtual peripheral request includes a second target virtual peripheral determined according to the second setting.
In step S408', the local internet of things module responds to the second virtual peripheral request in a virtualized state, and sends configuration parameters of the second target virtual peripheral to the second internet of things module, and the second internet of things module adds virtual peripheral equipment according to the configuration parameters of the second target virtual peripheral.
It should be understood that, although the steps in the flowcharts related to the above embodiments are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least a part of the steps in the flowcharts related to the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages performed is not necessarily sequential, but may be performed alternately or alternately with at least a part of the steps or stages in other steps or other steps.
In one embodiment, as shown in fig. 5, an apparatus for implementing sharing of virtual peripheral devices of an internet of things module is provided, including: a first probe instruction sending module 502, a first peripheral obtaining module 504, a first target virtual peripheral determining module 506, a first virtual peripheral request initiating module 508, a configuration parameter obtaining module 510, and a virtual peripheral device adding module 512, wherein:
a first probing instruction sending module 502, configured to send a first probing instruction to the same cell communication network;
a first peripheral acquisition module 504, configured to receive a first peripheral sent by the first internet of things module in response to the probe instruction;
a first target virtual peripheral determining module 506, configured to determine a first target virtual peripheral according to the first peripheral;
a first virtual peripheral request initiation module 508, configured to initiate a first virtual peripheral request to the first internet of things module, where the first virtual peripheral request includes a first target virtual peripheral;
a configuration parameter obtaining module 510, configured to receive a configuration parameter of the first target virtual peripheral sent by the first internet of things module in response to the first virtual peripheral request in a virtualized state;
the virtual peripheral device adding module 512 is configured to add a virtual peripheral device according to the configuration parameters of the first target virtual peripheral device.
In one embodiment, the configuration parameter acquisition module includes: the system comprises a first start sharing signal acquisition module, a data channel creation module and a first configuration parameter storage module, wherein:
the first start sharing signal acquisition module is used for acquiring a first start sharing signal sent by the first Internet of things module in response to the first virtual peripheral request in a virtual state;
the data channel creation module is used for creating a virtual device node locally based on the first start sharing signal and creating a data channel together with the first Internet of things module;
the first configuration parameter storage module is used for obtaining the configuration parameters of the first target virtual peripheral from the actual driving node through the data channel according to the first virtual peripheral request, and storing the configuration parameters of the first target virtual peripheral in the virtual equipment node.
In one embodiment, the device for realizing virtual peripheral sharing of the internet of things module further comprises: the first sharing rejection instruction sending module is used for obtaining a first sharing rejection instruction sent by the first internet of things module in response to the first virtual peripheral request when the first internet of things module is in a non-virtualized state.
In one embodiment, the device for realizing virtual peripheral sharing of the internet of things module further comprises: the system comprises a second probing instruction receiving module, a peripheral information sending module and a required peripheral information sending module, wherein:
the second probing instruction receiving module is used for receiving a second probing instruction sent by the second internet module;
the second peripheral sending module is used for determining the address of the second networking module based on the second probing instruction and sending a second peripheral to the second networking module according to the address;
a second virtual peripheral request sending module, configured to receive a second virtual peripheral request sent by the second internet module, where the second virtual peripheral request includes a second target virtual peripheral determined according to the second peripheral;
and the configuration parameter sending module is used for responding to the second virtual peripheral request when the local Internet of things module is in a virtual state, sending the configuration parameters of the second target virtual peripheral to the second Internet of things module, and adding virtual peripheral equipment by the second Internet of things module according to the configuration parameters of the second target virtual peripheral.
In one embodiment, the second networking module includes a virtual drive node for storing configuration parameters of the peripheral; a configuration parameter sending module, comprising:
The second starting sharing signal sending module is used for responding to the second virtual peripheral request by the local Internet of things module in a virtual state, sending a second starting sharing signal to the second Internet of things module, creating a virtual device node by the second Internet of things module based on the second starting sharing signal, and creating a data channel together with the local Internet of things module;
and the sub configuration parameter sending module is used for sending the configuration parameters of the second target virtual peripheral to the second networking module through the data channel, and the second networking module stores the configuration parameters of the second target virtual peripheral in the virtual equipment node.
In one embodiment, the device for realizing virtual peripheral sharing of the internet of things module further comprises: the second sharing rejection instruction sending module is used for sending a second sharing rejection instruction to the second internet of things module when the local internet of things module is in a virtual state.
In one embodiment, the device for realizing virtual peripheral sharing of the internet of things module further comprises: and the virtual peripheral equipment closing module is used for sending a sharing ending signal to the second networking module, and closing the virtual peripheral equipment when the sharing ending signal is obtained by the second networking module.
For specific limitation of the device for realizing the sharing of the virtual peripheral of the internet of things module, reference may be made to the limitation of the method for realizing the sharing of the virtual peripheral of the internet of things module, which is not described herein. All or part of each module in the device for realizing virtual peripheral sharing of the internet of things module can be realized by software, hardware and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program, when executed by a processor, implements a method for implementing virtual peripheral sharing of an internet of things module. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 6 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In an embodiment, there is also provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, or the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (10)

1. A method for implementing sharing of virtual peripherals of an internet of things module, the method comprising:
sending a first probing instruction to the same cell communication network;
receiving a first peripheral sent by a first Internet of things module in response to the first probing instruction, wherein the first peripheral refers to a virtual peripheral owned by the first Internet of things module;
determining a first target virtual peripheral according to the first peripheral;
Initiating a first virtual peripheral request to the first Internet of things module, wherein the first virtual peripheral request comprises a first target virtual peripheral, the first Internet of things module comprises an actual driving node, the actual driving node is used for storing configuration parameters of the peripheral, and the configuration parameters comprise at least one of a peripheral type, an interface attribute, a version and a transmission control protocol;
acquiring a first start sharing signal sent by the first Internet of things module in response to the first virtual peripheral request in a virtual state; based on the first start sharing signal, a virtual device node is created locally, and a data channel is created together with the first Internet of things module; according to the first virtual peripheral request, acquiring configuration parameters of a first target virtual peripheral from the actual driving node through the data channel, and storing the configuration parameters of the first target virtual peripheral in the virtual equipment node;
and adding virtual peripheral equipment according to the configuration parameters of the first target virtual peripheral equipment.
2. The method according to claim 1, wherein the method further comprises: and acquiring a first sharing rejection instruction sent by the first Internet of things module in response to the first virtual peripheral request under the non-virtualization state.
3. The method according to claim 1, wherein the method further comprises:
receiving a second probing instruction sent by a second internet-of-things module;
determining the address of the second internet-of-things module based on the second probing instruction, and sending a second peripheral to the second internet-of-things module according to the address;
receiving a second virtual peripheral request sent by the second internet of things module, wherein the second virtual peripheral request comprises a second target virtual peripheral determined according to the second external;
and the local Internet of things module responds to the second virtual peripheral equipment request in a virtual state, sends configuration parameters of the second target virtual peripheral equipment to the second Internet of things module, and adds virtual peripheral equipment according to the configuration parameters of the second target virtual peripheral equipment by the second Internet of things module.
4. A method according to claim 3, wherein the second networking module comprises a virtual drive node for storing configuration parameters of a peripheral device; the local internet of things module responds to the second virtual peripheral equipment request in a virtual state, and sends configuration parameters of the second target virtual peripheral equipment to the second internet of things module, wherein the configuration parameters comprise:
The local Internet of things module responds to the second virtual peripheral request in a virtual state, sends a second start sharing signal to the second Internet of things module, creates a virtual device node based on the second start sharing signal by the second Internet of things module, and creates a data channel together with the local Internet of things module;
and sending the configuration parameters of the second target virtual peripheral to the second internet-of-things module through the data channel, and storing the configuration parameters of the second target virtual peripheral in a virtual device node by the second internet-of-things module.
5. The method according to claim 4, wherein the method further comprises: and the local Internet of things module sends a second sharing rejection instruction to the second Internet of things module in a virtual state.
6. The method of claim 5, further comprising, after sending the configuration parameters of the second target virtual peripheral to the second networking module: and sending a sharing ending signal to the second internet-of-things module, and closing the virtual peripheral equipment when obtaining the sharing ending signal agreed by the second internet-of-things module.
7. The method according to claim 2, wherein the method further comprises:
After receiving the first sharing rejection instruction, if the configuration parameter of the first target virtual peripheral obtained earliest in the waiting time is not the first Internet of things module sending the first sharing rejection instruction, sharing the peripheral with the first Internet of things module responding earliest in the waiting time.
8. An apparatus for implementing sharing of virtual peripherals of an internet of things module, the apparatus comprising:
the first probing instruction sending module is used for sending a probing instruction to the communication network of the same cell;
the first peripheral acquisition module is used for receiving a first peripheral sent by the first Internet of things module in response to the probe instruction, wherein the first peripheral refers to a virtual peripheral owned by the first Internet of things module;
the first target virtual peripheral equipment determining module is used for determining a first target virtual peripheral equipment according to the first peripheral equipment;
the system comprises a first virtual peripheral request initiating module, a second virtual peripheral request initiating module and a second virtual peripheral request initiating module, wherein the first virtual peripheral request comprises a first target virtual peripheral, the first virtual peripheral module comprises an actual driving node, the actual driving node is used for storing configuration parameters of a peripheral, and the configuration parameters comprise at least one of a peripheral type, an interface attribute, a version and a transmission control protocol;
The configuration parameter acquisition module is used for acquiring a first start sharing signal sent by the first Internet of things module in response to the first virtual peripheral request in a virtual state; based on the first start sharing signal, a virtual device node is created locally, and a data channel is created together with the first Internet of things module; according to the first virtual peripheral request, acquiring configuration parameters of a first target virtual peripheral from the actual driving node through the data channel, and storing the configuration parameters of the first target virtual peripheral in the virtual equipment node;
and the virtual peripheral equipment newly-adding module is used for newly-adding the virtual peripheral equipment according to the configuration parameters of the first target virtual peripheral equipment.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
CN202110317897.0A 2021-03-25 2021-03-25 Method, device and computer equipment for realizing virtual peripheral sharing of Internet of things module Active CN113193979B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110317897.0A CN113193979B (en) 2021-03-25 2021-03-25 Method, device and computer equipment for realizing virtual peripheral sharing of Internet of things module
PCT/CN2021/124339 WO2022198989A1 (en) 2021-03-25 2021-10-18 Method and apparatus for realizing virtual peripheral sharing of internet-of-things module, and computer device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110317897.0A CN113193979B (en) 2021-03-25 2021-03-25 Method, device and computer equipment for realizing virtual peripheral sharing of Internet of things module

Publications (2)

Publication Number Publication Date
CN113193979A CN113193979A (en) 2021-07-30
CN113193979B true CN113193979B (en) 2023-05-09

Family

ID=76973774

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110317897.0A Active CN113193979B (en) 2021-03-25 2021-03-25 Method, device and computer equipment for realizing virtual peripheral sharing of Internet of things module

Country Status (2)

Country Link
CN (1) CN113193979B (en)
WO (1) WO2022198989A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113193979B (en) * 2021-03-25 2023-05-09 深圳市广和通无线股份有限公司 Method, device and computer equipment for realizing virtual peripheral sharing of Internet of things module

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109213701A (en) * 2018-08-28 2019-01-15 郑州云海信息技术有限公司 Control method, system, equipment and the storage medium of the peripheral hardware of shared I O board

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9973446B2 (en) * 2009-08-20 2018-05-15 Oracle International Corporation Remote shared server peripherals over an Ethernet network for resource virtualization
CN101771707B (en) * 2010-02-08 2015-08-12 中兴通讯股份有限公司 Realize the method for terminal room resource-sharing, resource processing system and terminal
FR2979508B1 (en) * 2011-08-26 2014-07-11 Bouygues Telecom Sa SYSTEM FOR MANAGING DOMESTIC PERIPHERALS
US9813891B2 (en) * 2013-09-30 2017-11-07 Elwha Llc Mobile device sharing facilitation methods and systems featuring a subset-specific source identification
US9396015B2 (en) * 2014-10-27 2016-07-19 Ayla Networks, Inc. Flexible device templates for connected consumer devices
CN106528289B (en) * 2015-09-15 2020-10-23 南京中兴软件有限责任公司 Resource operation processing method and device
US10291714B2 (en) * 2017-07-13 2019-05-14 American Megatrends, Inc. System and method for using general software to control internet of things (IOT) system
US11412558B2 (en) * 2018-06-01 2022-08-09 T-Mobile Usa, Inc. IoT module adaptor
US11055444B2 (en) * 2018-06-20 2021-07-06 NortonLifeLock Inc. Systems and methods for controlling access to a peripheral device
CN111327758B (en) * 2018-12-17 2022-08-02 中兴通讯股份有限公司 Camera sharing method and device
CN113193979B (en) * 2021-03-25 2023-05-09 深圳市广和通无线股份有限公司 Method, device and computer equipment for realizing virtual peripheral sharing of Internet of things module

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109213701A (en) * 2018-08-28 2019-01-15 郑州云海信息技术有限公司 Control method, system, equipment and the storage medium of the peripheral hardware of shared I O board

Also Published As

Publication number Publication date
CN113193979A (en) 2021-07-30
WO2022198989A1 (en) 2022-09-29

Similar Documents

Publication Publication Date Title
CN111278031B (en) PDU type setting method, UE strategy setting method, entity and storage medium
EP3790355A1 (en) Communication method, device and system
EP2448366A2 (en) Method for determining a group owner in a wireless network
US20170156110A1 (en) Electronic equipment, terminal device, and computer-readable recording medium
CN105322986A (en) Function execution system, function execution device and communication terminal
US10624022B2 (en) Method for establishing wireless LAN communication connection and electronic device therefor
JP2013513871A (en) Automatic and controllable system operation
US20190342933A1 (en) Communication Establishment Method And Terminal
WO2021042612A1 (en) Wireless screen projection method and apparatus, device and storage medium
CN113193979B (en) Method, device and computer equipment for realizing virtual peripheral sharing of Internet of things module
CN109147022A (en) VR data rendering method and system, computer equipment, computer storage medium
US20120002570A1 (en) Coordinating and Establishing Communication Networks Between Communication Devices
WO2021238911A1 (en) Layer-2 id determination method and device, and terminal
EP3805938A1 (en) Server node selection method and terminal device
US10938973B2 (en) Method and system for searching for object in network
CN113438749B (en) Multi-public-network connection driving method and device, computer equipment and storage medium
CN111464395B (en) Method and device for creating blockchain and readable storage medium
CN114422236A (en) Intelligent device access method and device and electronic device
CN110096366B (en) Configuration method and device of heterogeneous memory system and server
CN108733805B (en) File interaction method, system, computer equipment and storage medium
CN111126604A (en) Model training method, device, server and storage medium
CN109660976A (en) Method, apparatus, system and the storage medium of equipment search
CN113840313B (en) Network mode control method and device of mobile terminal and computer equipment
CN116170364B (en) VPN connection method, device, equipment and storage medium
CN112559213B (en) Application communication method, device, computer 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
GR01 Patent grant
GR01 Patent grant