CN114268653B - Equipment calling method, device, equipment, medium and product - Google Patents

Equipment calling method, device, equipment, medium and product Download PDF

Info

Publication number
CN114268653B
CN114268653B CN202111584129.8A CN202111584129A CN114268653B CN 114268653 B CN114268653 B CN 114268653B CN 202111584129 A CN202111584129 A CN 202111584129A CN 114268653 B CN114268653 B CN 114268653B
Authority
CN
China
Prior art keywords
target
equipment
plugin
plug
request
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
CN202111584129.8A
Other languages
Chinese (zh)
Other versions
CN114268653A (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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202111584129.8A priority Critical patent/CN114268653B/en
Publication of CN114268653A publication Critical patent/CN114268653A/en
Application granted granted Critical
Publication of CN114268653B publication Critical patent/CN114268653B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The application discloses a device calling method, a device, equipment, a medium and a product, and belongs to the technical field of Internet of things. The device calling method comprises the following steps: acquiring a device call request, wherein the device call request comprises identification information of a target virtual device object; responding to the equipment calling request, and calling a target equipment plug-in having a corresponding relation with the target virtual equipment object according to the identification information; and calling the target entity equipment with the association relation with the target equipment plug-in according to the target equipment plug-in. Through the scheme disclosed by the application, the compatibility of the gateway equipment of the Internet of things to the equipment can be improved.

Description

Equipment calling method, device, equipment, medium and product
Technical Field
The application belongs to the technical field of the Internet of things, and particularly relates to a device calling method, a device, equipment, a medium and a product.
Background
The internet of things (Internet of Things, ioT) refers to collecting any object or process needing to be monitored, connected and interacted in real time through various devices and technologies such as various information sensors, radio frequency identification technologies, global positioning systems, infrared sensors and laser scanners, collecting various needed information such as sound, light, heat, electricity, mechanics, chemistry, biology and positions, and realizing ubiquitous connection of objects and people through various possible network access, thereby realizing intelligent perception, identification and management of objects and processes. The internet of things is an information carrier based on the internet, a traditional telecommunication network and the like, and enables all common physical objects which can be independently addressed to form an interconnection network.
The gateway equipment of the Internet of things has the functions of protocol conversion between the sensing network and the communication network, protocol conversion between different types of sensing networks, equipment management and the like, and has an extremely important role in the system of the Internet of things.
However, the internet of things gateway device in the related art is generally only compatible with certain devices, and the devices interact with the internet of things gateway device based on a certain same protocol. The gateway device of the internet of things cannot be compatible with the newly accessed device which does not support the protocol according to the user requirement, so that the gateway device of the internet of things has poor compatibility with different devices.
Disclosure of Invention
The embodiment of the application aims to provide a device calling method, a device, equipment, a medium and a product, which can solve the problem that the compatibility of the gateway equipment of the Internet of things to different equipment is poor.
In a first aspect, an embodiment of the present application provides a device invoking method, including:
acquiring a device call request, wherein the device call request comprises identification information of a target virtual device object;
responding to the equipment calling request, and calling a target equipment plug-in having a corresponding relation with the target virtual equipment object according to the identification information;
and calling the target entity equipment with the association relation with the target equipment plug-in according to the target equipment plug-in.
In some possible implementations of the embodiments of the present application, before obtaining the device call request, the device call method provided by the embodiments of the present application further includes:
acquiring a device plugin registration request for a target device plugin;
responding to a device plug-in registration request, and registering a target device plug-in;
and establishing an association relation between the target equipment plug-in and the target entity equipment.
In some possible implementations of the embodiments of the present application, before obtaining the device call request, the device call method provided by the embodiments of the present application further includes:
acquiring a device plugin configuration request for a target device plugin, wherein the device plugin configuration request comprises parameter information corresponding to the target device plugin;
and responding to the device plugin configuration request, and configuring the parameters of the target device plugin according to the parameter information.
In some possible implementations of the embodiments of the present application, before obtaining the device call request, the device call method provided by the embodiments of the present application further includes:
acquiring a virtual device object creation request for a target virtual device object;
responding to a virtual device object creation request, and creating a target virtual device object;
and establishing a corresponding relation between the target virtual device object and the target device plug-in according to the identification information.
In some possible implementations of the embodiments of the present application, before invoking the target device plugin having a correspondence with the target virtual device object, the device invoking method provided by the embodiments of the present application further includes:
according to the corresponding relation between the virtual equipment object and the equipment plug-in, searching the equipment plug-in with the corresponding relation with the target virtual equipment object;
and taking the searched device plug-in as a target device plug-in.
In some possible implementations of the embodiments of the present application, before invoking the target device plugin having a correspondence with the target virtual device object, the device invoking method provided by the embodiments of the present application further includes:
the target device plugin is loaded.
In some possible implementations of the embodiments of the present application, the device invoking method provided by the embodiments of the present application further includes:
acquiring a device plugin deletion request for a target device plugin;
and deleting the target device plugin in response to the device plugin deletion request.
In a second aspect, an embodiment of the present application provides a device calling apparatus, including:
the device comprises a first acquisition module, a second acquisition module and a first processing module, wherein the first acquisition module is used for acquiring a device call request, and the device call request comprises identification information of a target virtual device object;
The first calling module is used for responding to the equipment calling request and calling a target equipment plug-in having a corresponding relation with the target virtual equipment object according to the identification information;
and the second calling module is used for calling the target entity equipment with the association relation with the target equipment plug-in according to the target equipment plug-in.
In some possible implementations of the embodiments of the present application, the device calling apparatus provided in the embodiments of the present application further includes:
the second acquisition module is used for acquiring a device plugin registration request for the target device plugin;
the registration module is used for responding to the equipment plug-in registration request and registering the target equipment plug-in;
the first establishing module is used for establishing the association relation between the target equipment plug-in and the target entity equipment.
In some possible implementations of the embodiments of the present application, the device calling apparatus provided in the embodiments of the present application further includes:
the third acquisition module is used for acquiring an equipment plugin configuration request for the target equipment plugin, wherein the equipment plugin configuration request comprises parameter information corresponding to the target equipment plugin;
and the configuration module is used for responding to the device plugin configuration request and configuring the parameters of the target device plugin according to the parameter information.
In some possible implementations of the embodiments of the present application, the device calling apparatus provided in the embodiments of the present application further includes:
a fourth obtaining module, configured to obtain a virtual device object creation request for a target virtual device object;
the creation module is used for responding to the virtual device object creation request and creating a target virtual device object;
and the second establishing module is used for establishing the corresponding relation between the target virtual equipment object and the target equipment plug-in according to the identification information.
In some possible implementations of the embodiments of the present application, the device calling apparatus provided in the embodiments of the present application further includes:
the searching module is used for searching the equipment plugin with the corresponding relation with the target virtual equipment object according to the corresponding relation between the virtual equipment object and the equipment plugin;
and the determining module is used for taking the searched device plugin as a target device plugin.
In some possible implementations of the embodiments of the present application, the device calling apparatus provided in the embodiments of the present application further includes:
and the loading module is used for loading the target device plug-in.
In some possible implementations of the embodiments of the present application, the device calling apparatus provided in the embodiments of the present application further includes:
a fifth acquisition module for acquiring a device plugin deletion request for the target device plugin;
And the deleting module is used for responding to the device plug-in deleting request and deleting the target device plug-in.
In a third aspect, embodiments of the present application provide an electronic device comprising a processor and a memory storing a program or instructions executable on the processor, the program or instructions implementing the steps of the method according to the first aspect when executed by the processor.
In a fourth aspect, embodiments of the present application provide a readable storage medium having stored thereon a program or instructions which, when executed by a processor, implement the steps of the method as described in the first aspect.
In a fifth aspect, embodiments of the present application provide a chip comprising a processor and a communication interface, the communication interface being coupled to the processor, the processor being configured to execute programs or instructions for implementing the steps of the method according to the first aspect.
In a sixth aspect, embodiments of the present application provide a computer program product stored in a storage medium, the computer program product being executed by at least one processor to implement the steps of the method as described in the first aspect.
In the embodiment of the application, after a device call request including identification information of a target virtual device is acquired, a target device plugin having a corresponding relation with a target virtual device object is called according to the identification information, and then target entity devices having an association relation with the target device plugin are called through the target device plugin. Therefore, even if the entity equipment adopts a protocol which is not supported by the gateway equipment of the Internet of things, the gateway equipment of the Internet of things can call the entity equipment through the equipment plug-in, so that the gateway equipment of the Internet of things can be compatible with the entity equipment through the equipment plug-in, and the compatibility of the gateway equipment of the Internet of things to the equipment is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described, and it is possible for a person skilled in the art to obtain other drawings according to these drawings without inventive effort.
Fig. 1 is a schematic flow chart of a device calling method provided in an embodiment of the present application;
fig. 2 is a schematic structural diagram of an apparatus calling device provided in an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 4 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
Detailed Description
Technical solutions in the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application are within the scope of the protection of the present application.
The terms first, second and the like in the description and in the claims, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged, as appropriate, such that embodiments of the present application may be implemented in sequences other than those illustrated or described herein, and that the objects identified by "first," "second," etc. are generally of a type and not limited to the number of objects, e.g., the first object may be one or more. Furthermore, in the description and claims, "and/or" means at least one of the connected objects, and the character "/", generally means that the associated object is an "or" relationship.
The device calling method, device, equipment, medium and product provided by the embodiment of the application are described in detail below through specific embodiments and application scenes thereof with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of a device calling method according to an embodiment of the present application. The device calling method of the embodiment shown in fig. 1 of the present application is preferably applicable to the gateway device of the internet of things. As shown in fig. 1, the device invoking method may include:
s101: acquiring a device call request, wherein the device call request comprises identification information of a target virtual device object;
s102: responding to the equipment calling request, and calling a target equipment plug-in having a corresponding relation with the target virtual equipment object according to the identification information;
s103: and calling the target entity equipment with the association relation with the target equipment plug-in according to the target equipment plug-in.
The specific implementation of each of the above steps will be described in detail below.
In the embodiment of the application, after a device call request including identification information of a target virtual device is acquired, a target device plugin having a corresponding relation with a target virtual device object is called according to the identification information, and then target entity devices having an association relation with the target device plugin are called through the target device plugin. Therefore, even if the entity equipment adopts a protocol which is not supported by the gateway equipment of the Internet of things, the gateway equipment of the Internet of things can call the entity equipment through the equipment plug-in, so that the gateway equipment of the Internet of things can be compatible with the entity equipment through the equipment plug-in, and the compatibility of the gateway equipment of the Internet of things to the equipment is improved. And the device plugin is convenient to develop by calling the entity device, and compared with the Internet of things gateway device which is compatible with a plurality of entity devices and redeveloped in the related technology, the device plugin has the advantages of low development cost and high code multiplexing rate and can meet the requirement of the entity device for accessing the Internet of things system.
Illustratively, assume that there are three virtual device objects, three device plugins, and three physical devices. The three virtual device objects are a virtual device object 1, a virtual device object 2 and a virtual device object 3, the three device plugins are a device plugin 1, a device plugin 2 and a device plugin 3, and the three entity devices are entity devices 1, 2 and 3.
The virtual device object i has a corresponding relation with the device plugin i, the device plugin i has an association relation with the entity device i, and i is a positive integer.
After a device call request including the identification information of the virtual device object 2 is obtained, according to the identification information of the virtual device object 2, a device plugin 2 having a corresponding relationship with the virtual device object 2 is called, and then, through the device plugin 2, an entity device 2 having an association relationship with the device plugin 2 is called. Thus, the call to the entity apparatus 2 is completed.
In some possible implementations of the embodiments of the present application, before S101, the device invoking method provided by the embodiments of the present application further includes: acquiring a device plugin registration request for a target device plugin; responding to a device plug-in registration request, and registering a target device plug-in; and establishing an association relation between the target equipment plug-in and the target entity equipment.
Illustratively, when a certain device (for example, device a) is connected with an internet of things gateway device (including but not limited to, a wired connection and a wireless connection), the upper layer service sends a device plug-in registration request to the internet of things gateway device, and after receiving the device plug-in registration request, the internet of things gateway device registers a new device plug-in, and establishes an association relationship between the newly registered device plug-in and the device a. And the gateway equipment of the Internet of things calls the equipment A through the newly registered equipment plug-in.
In some possible implementations of the embodiments of the present application, before S101, the device invoking method provided by the embodiments of the present application further includes: acquiring a device plugin configuration request for a target device plugin, wherein the device plugin configuration request comprises parameter information corresponding to the target device plugin; and responding to the device plugin configuration request, and configuring the parameters of the target device plugin according to the parameter information.
In some possible implementations of embodiments of the present application, a device plug-in template may be developed in advance, the device plug-in template comprising a plurality of parameters. By configuring a plurality of parameters, the device plugin comprising the parameter configuration can be enabled to call the corresponding entity device.
For example, after a certain device (for example, device a) is connected to the gateway device of the internet of things, the upper layer service sends a device plug-in registration request to the gateway device of the internet of things, and after receiving the device plug-in registration request, the gateway device of the internet of things registers a new device plug-in (for example, device plug-in a) and establishes an association relationship between the device plug-in a and the device a. After the equipment plugin a with the association relation with the equipment A is registered, the upper layer service sends an equipment plugin configuration request comprising parameter information corresponding to the equipment plugin a to the gateway equipment of the Internet of things, and after the gateway equipment of the Internet of things receives the equipment plugin configuration request, the parameters of the equipment plugin a are configured according to the parameter information corresponding to the equipment plugin a included in the equipment plugin configuration request.
Further, for example, after a certain device (for example, device a) is connected to the gateway device of the internet of things, the upper layer service sends a device plug-in registration request and a device plug-in configuration request to the gateway device of the internet of things, and after receiving the device plug-in registration request and the device plug-in configuration request, the gateway device of the internet of things registers a new device plug-in (for example, device plug-in a), establishes an association relationship between the device plug-in a and the device a, and configures parameters of the device plug-in a according to parameter information corresponding to the device plug-in included in the device plug-in configuration request.
In some possible implementations of embodiments of the present application, the parameter information may include identification information of the entity device.
For example, when the device plugin a having the association relationship with the device a is configured, the entity device identification parameter corresponding to the device plugin a may be configured as: identification information of the entity device a.
In some possible implementations of the embodiments of the present application, before S101, the device invoking method provided by the embodiments of the present application further includes: acquiring a virtual device object creation request for a target virtual device object; responding to a virtual device object creation request, and creating a target virtual device object; and establishing a corresponding relation between the target virtual device object and the target device plug-in according to the identification information.
For example, after a certain device (for example, device a) is connected to the gateway device of the internet of things, the upper layer service sends a virtual device object creation request to the gateway device of the internet of things, and after receiving the virtual device object creation request, the gateway device of the internet of things creates a new virtual device object, and establishes a corresponding relationship between the newly created virtual device object and a device plug-in having an association relationship with the device a.
In some possible implementations of the embodiments of the present application, before S102, the device invoking method provided by the embodiments of the present application further includes: according to the corresponding relation between the virtual equipment object and the equipment plug-in, searching the equipment plug-in with the corresponding relation with the target virtual equipment object; and taking the searched device plug-in as a target device plug-in.
Illustratively, assume that there are three virtual device objects, three device plugins, and three physical devices. The three virtual device objects are a virtual device object 1, a virtual device object 2 and a virtual device object 3, the three device plugins are a device plugin 1, a device plugin 2 and a device plugin 3, and the three entity devices are entity devices 1, 2 and 3.
The virtual device object i has a corresponding relation with the device plugin i, the device plugin i has an association relation with the entity device i, and i is a positive integer.
After a device call request including identification information of a virtual device object 2 is acquired, searching a device plugin having a corresponding relation with the virtual device object 2 according to the corresponding relation between the virtual device object and the device plugin, at this time, searching that the device plugin is the device plugin 2, further calling the device plugin 2, and calling entity devices 2 having an association relation with the device plugin 2 through the device plugin 2. Thus, the call to the entity apparatus 2 is completed.
In some possible implementations of the embodiments of the present application, before S102, the device invoking method provided by the embodiments of the present application further includes: the target device plugin is loaded.
Illustratively, assume that there are three virtual device objects, three device plugins, and three physical devices. The three virtual device objects are a virtual device object 1, a virtual device object 2 and a virtual device object 3, the three device plugins are a device plugin 1, a device plugin 2 and a device plugin 3, and the three entity devices are entity devices 1, 2 and 3.
The virtual device object i has a corresponding relation with the device plugin i, the device plugin i has an association relation with the entity device i, and i is a positive integer.
After a device call request including identification information of a virtual device object 2 is acquired, searching a device plugin having a corresponding relation with the virtual device object 2 according to the corresponding relation between the virtual device object and the device plugin, at this time, searching that the device plugin is the device plugin 2, loading the device plugin 2, and then calling the device plugin 2, and calling entity device 2 having an association relation with the device plugin 2 through the device plugin 2. Thus, the call to the entity apparatus 2 is completed.
In the embodiment of the application, the device plug-in having the association relationship with the device is loaded only when the device is called, and the device plug-in having the association relationship with the device is not loaded when the device is not called, so that occupation of the device plug-in to a storage space can be saved, and further system performance can be improved.
In some possible implementations of the embodiments of the present application, the device invoking method provided by the embodiments of the present application further includes: acquiring a device plugin deletion request for a target device plugin; and deleting the target device plugin in response to the device plugin deletion request.
Illustratively, assume that there are three virtual device objects, three device plugins, and three physical devices. The three virtual device objects are a virtual device object 1, a virtual device object 2 and a virtual device object 3, the three device plugins are a device plugin 1, a device plugin 2 and a device plugin 3, and the three entity devices are entity devices 1, 2 and 3.
The virtual device object i has a corresponding relation with the device plugin i, the device plugin i has an association relation with the entity device i, and i is a positive integer.
When the user no longer intends to use the entity device 3 or wants to replace the entity device 3 with another entity device, the connection between the entity device 3 and the gateway device of the internet of things can be disconnected. When the connection between the entity device 3 and the gateway device of the internet of things is disconnected, the upper layer service sends a device plug-in deletion request to the gateway device of the internet of things, and after the gateway device of the internet of things receives the device plug-in deletion request, the device plug-in 3 with an association relation with the entity device 3 is deleted.
In some possible implementations of the embodiments of the present application, after a device plug-in is deleted, a virtual device object having a corresponding relationship with the device plug-in, a corresponding relationship corresponding to the device plug-in, and an association relationship corresponding to the device plug-in may also be deleted.
In some possible implementations of the embodiments of the present application, when a certain entity device wants to send data to an internet of things gateway device, the internet of things gateway device may receive, through a device plug-in having an association relationship with the entity device, the data sent by the entity device.
The device calling method provided by the embodiment of the application is described below with reference to specific examples.
And the entity equipment M establishes connection with the gateway equipment of the Internet of things.
The upper layer service sends a plug-in management request to the gateway device of the internet of things, and the plug-in management request can simultaneously include: the virtual device object creates a sub-request, a device plug-in registration sub-request, and a device plug-in configuration sub-request.
After receiving a plug-in management request sent by an upper layer service, the gateway device of the internet of things creates a new virtual device object (for example, virtual device object M), registers a new device plug-in (device plug-in M), configures the device plug-in M, then establishes a corresponding relationship between the device plug-in M and the virtual device object M, and establishes an association relationship between the device plug-in M and the entity device M.
And the entity equipment N establishes connection with the gateway equipment of the Internet of things.
The upper layer service sends a plug-in management request to the gateway device of the internet of things, and the plug-in management request can simultaneously include: the virtual device object creates a sub-request, a device plug-in registration sub-request, and a device plug-in configuration sub-request.
After receiving a plug-in management request sent by an upper layer service, the gateway device of the internet of things creates a new virtual device object (for example, virtual device object N), registers a new device plug-in (device plug-in N), configures the device plug-in N, then establishes a corresponding relationship between the device plug-in N and the virtual device object N, and establishes an association relationship between the device plug-in N and the entity device N.
When the upper layer service wants to call a certain entity device (for example, entity device M), the upper layer service sends a device call request including identification information of the virtual device object M to the gateway device of the internet of things.
After receiving the device call request sent by the upper layer service, the gateway device of the internet of things searches for a device plug-in having a corresponding relation with the virtual device object M according to the corresponding relation between the virtual device object and the device plug-in, at this time, the device plug-in is found to be the device plug-in M, and then the device plug-in M is called, and through the device plug-in M, the entity device M having an association relation with the device plug-in M is called. Thus, the call to the entity device M is completed.
When the entity equipment M wants to send data to the upper layer service, the gateway equipment of the Internet of things can receive the data sent by the entity equipment M through the equipment plug-in M with an association relation with the entity equipment M, and then send the received data sent by the entity equipment M to the upper layer service, so that the data transmission of the entity equipment to the upper layer service is completed.
It may be understood that the gateway device of the internet of things is a core device in the device invoking method provided in the embodiments of the present application, where the gateway device of the internet of things is responsible for virtual device object management (including but not limited to creating, configuring, and deleting virtual device object management), device plugin management (including but not limited to registering, configuring, and device plugins), virtual device object corresponds to a device plugin, device plugin associates with an entity device, and so on.
It should be noted that, in the device invoking method provided in the embodiment of the present application, the execution body may be a device invoking apparatus. In the embodiment of the application, the device calling device executes the device calling method by taking the device calling device as an example, and the device calling device provided in the embodiment of the application is described.
Fig. 2 is a schematic structural diagram of a device calling apparatus according to an embodiment of the present application. The device calling device in the embodiment shown in fig. 2 of the present application is preferably suitable for an internet of things gateway device. As shown in fig. 2, the device calling apparatus 200 may include:
a first obtaining module 201, configured to obtain a device call request, where the device call request includes identification information of a target virtual device object;
a first calling module 202, configured to respond to the device calling request, and call, according to the identification information, a target device plugin having a corresponding relationship with the target virtual device object;
and the second calling module 203 is configured to call, according to the target device plugin, a target entity device having an association relationship with the target device plugin.
In the embodiment of the application, after a device call request including identification information of a target virtual device is acquired, a target device plugin having a corresponding relation with a target virtual device object is called according to the identification information, and then target entity devices having an association relation with the target device plugin are called through the target device plugin. Therefore, even if the entity equipment adopts a protocol which is not supported by the gateway equipment of the Internet of things, the gateway equipment of the Internet of things can call the entity equipment through the equipment plug-in, so that the gateway equipment of the Internet of things can be compatible with the entity equipment through the equipment plug-in, and the compatibility of the gateway equipment of the Internet of things to the equipment is improved. And the device plugin is convenient to develop by calling the entity device, and compared with the Internet of things gateway device which is compatible with a plurality of entity devices and redeveloped in the related technology, the device plugin has the advantages of low development cost and high code multiplexing rate and can meet the requirement of the entity device for accessing the Internet of things system.
In some possible implementations of the embodiments of the present application, the device calling apparatus 200 provided in the embodiments of the present application further includes:
the second acquisition module is used for acquiring a device plugin registration request for the target device plugin;
the registration module is used for responding to the equipment plug-in registration request and registering the target equipment plug-in;
the first establishing module is used for establishing the association relation between the target equipment plug-in and the target entity equipment.
In some possible implementations of the embodiments of the present application, the device calling apparatus 200 provided in the embodiments of the present application further includes:
the third acquisition module is used for acquiring an equipment plugin configuration request for the target equipment plugin, wherein the equipment plugin configuration request comprises parameter information corresponding to the target equipment plugin;
and the configuration module is used for responding to the device plugin configuration request and configuring the parameters of the target device plugin according to the parameter information.
In some possible implementations of the embodiments of the present application, the device calling apparatus 200 provided in the embodiments of the present application further includes:
a fourth obtaining module, configured to obtain a virtual device object creation request for a target virtual device object;
the creation module is used for responding to the virtual device object creation request and creating a target virtual device object;
And the second establishing module is used for establishing the corresponding relation between the target virtual equipment object and the target equipment plug-in according to the identification information.
In some possible implementations of the embodiments of the present application, the device calling apparatus 200 provided in the embodiments of the present application further includes:
the searching module is used for searching the equipment plugin with the corresponding relation with the target virtual equipment object according to the corresponding relation between the virtual equipment object and the equipment plugin;
and the determining module is used for taking the searched device plugin as a target device plugin.
In some possible implementations of the embodiments of the present application, the device calling apparatus 200 provided in the embodiments of the present application further includes:
and the loading module is used for loading the target device plug-in.
In the embodiment of the application, the device plugin with the association relation with the entity device is loaded only when the entity device is called, and the device plugin with the association relation with the entity device is not loaded when the entity device is not called, so that occupation of the device plugin on a storage space can be saved, and further system performance can be improved.
In some possible implementations of the embodiments of the present application, the device calling apparatus 200 provided in the embodiments of the present application further includes:
A fifth acquisition module for acquiring a device plugin deletion request for the target device plugin;
and the deleting module is used for responding to the device plug-in deleting request and deleting the target device plug-in.
The device calling apparatus in the embodiment of the present application may be an electronic device, or may be a component in an electronic device, for example, an integrated circuit, or a chip. The electronic device may be a terminal, or may be other devices than a terminal. By way of example, the electronic device may be a mobile phone, tablet computer, notebook computer, palm computer, vehicle-mounted electronic device, mobile internet appliance (Mobile Internet Device, MID), augmented reality (augmented reality, AR)/Virtual Reality (VR) device, robot, wearable device, ultra-mobile personal computer, UMPC, netbook or personal digital assistant (personal digital assistant, PDA), etc., but may also be a server, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (TV), teller machine or self-service machine, etc., and the embodiments of the present application are not limited in particular. Preferably, the electronic device is an internet of things gateway device.
The device calling apparatus in the embodiment of the present application may be an apparatus having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.
The device calling apparatus provided in the embodiment of the present application can implement each process in the embodiment of the device calling method of fig. 1, and in order to avoid repetition, a description is omitted here.
Optionally, as shown in fig. 3, the embodiment of the present application further provides an electronic device 300, including a processor 301 and a memory 302, where the memory 302 stores a program or an instruction that can be executed on the processor 301, and the program or the instruction when executed by the processor 301 implements each step of the above device calling method embodiment, and can achieve the same technical effect, so that repetition is avoided, and no redundant description is provided herein.
In some possible implementations of embodiments of the present application, the processor 301 may include a Central Processing Unit (CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or may be configured to implement one or more integrated circuits of embodiments of the present application.
In some possible implementations of embodiments of the present application, memory 302 may include Read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), magnetic disk storage media devices, optical storage media devices, flash Memory devices, electrical, optical, or other physical/tangible Memory storage devices. Thus, in general, memory 302 includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software comprising computer-executable instructions and when the software is executed (e.g., by one or more processors) it is operable to perform the operations described with reference to a device invocation method according to embodiments of the present application.
Fig. 4 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 400 includes, but is not limited to: radio frequency unit 401, network module 402, audio output unit 403, input unit 404, sensor 405, display unit 406, user input unit 407, interface unit 408, memory 409, and processor 410.
Those skilled in the art will appreciate that the electronic device 400 may also include a power source (e.g., a battery) for powering the various components, which may be logically connected to the processor 410 by a power management system to perform functions such as managing charge, discharge, and power consumption by the power management system. The electronic device structure shown in fig. 4 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than shown, or may combine certain components, or may be arranged in different components, which are not described in detail herein.
Wherein the processor 410 is configured to: acquiring a device call request, wherein the device call request comprises identification information of a target virtual device object; responding to the equipment calling request, and calling a target equipment plug-in having a corresponding relation with the target virtual equipment object according to the identification information; and calling target entity equipment with an association relation with the target equipment plug-in according to the target equipment plug-in.
In the embodiment of the application, after a device call request including identification information of a target virtual device is acquired, a target device plugin having a corresponding relation with a target virtual device object is called according to the identification information, and then target entity devices having an association relation with the target device plugin are called through the target device plugin. Therefore, even if the entity equipment adopts a protocol which is not supported by the gateway equipment of the Internet of things, the gateway equipment of the Internet of things can call the entity equipment through the equipment plug-in, so that the gateway equipment of the Internet of things can be compatible with the entity equipment through the equipment plug-in, and the compatibility of the gateway equipment of the Internet of things to the equipment is improved. And the device plugin is convenient to develop by calling the entity device, and compared with the Internet of things gateway device which is compatible with a plurality of entity devices and redeveloped in the related technology, the device plugin has the advantages of low development cost and high code multiplexing rate and can meet the requirement of the entity device for accessing the Internet of things system.
In some possible implementations of embodiments of the present application, the processor 410 is further configured to:
acquiring a device plugin registration request for a target device plugin;
responding to a device plug-in registration request, and registering a target device plug-in;
And establishing an association relation between the target equipment plug-in and the target entity equipment.
In some possible implementations of embodiments of the present application, the processor 410 is further configured to:
acquiring a device plugin configuration request for a target device plugin, wherein the device plugin configuration request comprises parameter information corresponding to the target device plugin;
and responding to the device plugin configuration request, and configuring the parameters of the target device plugin according to the parameter information.
In some possible implementations of embodiments of the present application, the processor 410 is further configured to:
acquiring a virtual device object creation request for a target virtual device object;
responding to a virtual device object creation request, and creating a target virtual device object;
and establishing a corresponding relation between the target virtual device object and the target device plug-in according to the identification information.
In some possible implementations of embodiments of the present application, the processor 410 is further configured to:
according to the corresponding relation between the virtual equipment object and the equipment plug-in, searching the equipment plug-in with the corresponding relation with the target virtual equipment object;
and taking the searched device plug-in as a target device plug-in.
In some possible implementations of embodiments of the present application, the processor 410 is further configured to:
the target device plugin is loaded.
In the embodiment of the application, the device plugin with the association relation with the entity device is loaded only when the entity device is called, and the device plugin with the association relation with the entity device is not loaded when the entity device is not called, so that occupation of the device plugin on a storage space can be saved, and further system performance can be improved.
In some possible implementations of embodiments of the present application, the processor 410 is further configured to:
acquiring a device plugin deletion request for a target device plugin;
and deleting the target device plugin in response to the device plugin deletion request.
It should be appreciated that in embodiments of the present application, the input unit 404 may include a graphics processor (Graphics Processing Unit, GPU) 4041 and a microphone 4042, with the graphics processor 4041 processing image data of still pictures or video obtained by an image capture device (e.g., a camera) in a video capture mode or an image capture mode. The display unit 406 may include a display panel 4061, and the display panel 4061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 407 includes at least one of a touch panel 4071 and other input devices 4072. The touch panel 4071 is also referred to as a touch screen. The touch panel 4071 may include two parts, a touch detection device and a touch controller. Other input devices 4072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and so forth, which are not described in detail herein.
Memory 409 may be used to store software programs as well as various data. The memory 409 may mainly include a first memory area storing programs or instructions and a second memory area storing data, wherein the first memory area may store an operating system, application programs or instructions (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like. Further, the memory 409 may include volatile memory or nonvolatile memory, or the memory 409 may include both volatile and nonvolatile memory. The nonvolatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable EPROM (EEPROM), or a flash Memory. The volatile memory may be random access memory (Random Access Memory, RAM), static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (ddr SDRAM), enhanced SDRAM (Enhanced SDRAM), synchronous DRAM (SLDRAM), and Direct RAM (DRRAM). Memory 409 in embodiments of the present application includes, but is not limited to, these and any other suitable types of memory.
Processor 410 may include one or more processing units; optionally, the processor 410 integrates an application processor that primarily processes operations involving an operating system, user interface, application programs, etc., and a modem processor that primarily processes wireless communication signals, such as a baseband processor. It will be appreciated that the modem processor described above may not be integrated into the processor 410.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored, where the program or the instruction realizes each process of the above-mentioned device calling method embodiment when executed by a processor, and the same technical effect can be achieved, so that repetition is avoided, and no further description is given here.
The processor is a processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, and examples of the computer readable storage medium include a non-transitory computer readable storage medium such as ROM, RAM, magnetic disk, or optical disk.
The embodiment of the application further provides a chip, which comprises a processor and a communication interface, wherein the communication interface is coupled with the processor, and the processor is used for running programs or instructions, so that the processes of the device calling method embodiment can be realized, the same technical effects can be achieved, and the repetition is avoided, and the description is omitted here.
It should be understood that the chips referred to in the embodiments of the present application may also be referred to as system-on-chip chips, chip systems, or system-on-chip chips, etc.
The embodiments of the present application provide a computer program product, which is stored in a storage medium, and the program product is executed by at least one processor to implement the respective processes of the above-mentioned device invoking method embodiment, and achieve the same technical effects, and are not described herein for avoiding repetition.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in an opposite order depending on the functions involved, e.g., the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the related art in the form of a computer software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), including several instructions for causing a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method described in the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those of ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are also within the protection of the present application.

Claims (9)

1. A device invocation method, the method comprising:
acquiring a device call request, wherein the device call request comprises identification information of a target virtual device object;
responding to the equipment calling request, and calling a target equipment plug-in having a corresponding relation with the target virtual equipment object according to the identification information;
according to the target equipment plugin, calling target entity equipment with an association relationship with the target equipment plugin;
before the acquiring the device call request, the method further comprises:
acquiring a device plugin registration request for the target device plugin;
responding to the device plugin registration request, and registering the target device plugin;
establishing an association relationship between the target equipment plug-in and the target entity equipment;
before the acquiring the device call request, the method further comprises:
acquiring a virtual device object creation request for the target virtual device object;
responding to the virtual device object creation request, and creating the target virtual device object;
and establishing a corresponding relation between the target virtual device object and the target device plug-in according to the identification information.
2. The method of claim 1, wherein prior to the get device invoke the request, the method further comprises:
acquiring a device plugin configuration request for the target device plugin, wherein the device plugin configuration request comprises parameter information corresponding to the target device plugin;
and responding to the equipment plug-in configuration request, and configuring the parameters of the target equipment plug-in according to the parameter information.
3. The method of claim 1, wherein prior to invoking the target device plugin having a correspondence with the target virtual device object, the method further comprises:
according to the corresponding relation between the virtual equipment object and the equipment plug-in, searching the equipment plug-in with the corresponding relation with the target virtual equipment object;
and taking the searched equipment plug-in as the target equipment plug-in.
4. The method of claim 1, wherein prior to invoking the target device plugin having a correspondence with the target virtual device object, the method further comprises:
and loading the target equipment plug-in.
5. The method according to claim 1, wherein the method further comprises:
Acquiring a device plugin deletion request for the target device plugin;
and deleting the target device plugin in response to the device plugin deletion request.
6. A device invocation apparatus, the apparatus comprising:
the device comprises a first acquisition module, a second acquisition module and a first processing module, wherein the first acquisition module is used for acquiring a device call request, and the device call request comprises identification information of a target virtual device object;
the first calling module is used for responding to the equipment calling request and calling a target equipment plug-in having a corresponding relation with the target virtual equipment object according to the identification information;
the second calling module is used for calling target entity equipment with an association relation with the target equipment plug-in according to the target equipment plug-in;
the apparatus further comprises:
the second acquisition module is used for acquiring a device plugin registration request for the target device plugin;
the registration module is used for responding to the equipment plug-in registration request and registering the target equipment plug-in;
the first establishing module is used for establishing the association relation between the target equipment plug-in and the target entity equipment;
the apparatus further comprises:
a fourth obtaining module, configured to obtain a virtual device object creation request for the target virtual device object;
The creation module is used for responding to the virtual equipment object creation request and creating the target virtual equipment object;
and the second establishing module is used for establishing the corresponding relation between the target virtual equipment object and the target equipment plug-in according to the identification information.
7. An electronic device, the electronic device comprising: a processor and a memory storing a program or instructions executable on the processor, which when executed by the processor, implement the steps of the device invocation method of any of claims 1 to 5.
8. A readable storage medium, characterized in that it stores thereon a program or instructions, which when executed by a processor, implement the steps of the device invoking method as claimed in any of claims 1 to 5.
9. A computer program product, characterized in that it is stored in a storage medium, which when being executed by at least one processor implements the steps of the device invoking method according to any of claims 1 to 5.
CN202111584129.8A 2021-12-22 2021-12-22 Equipment calling method, device, equipment, medium and product Active CN114268653B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111584129.8A CN114268653B (en) 2021-12-22 2021-12-22 Equipment calling method, device, equipment, medium and product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111584129.8A CN114268653B (en) 2021-12-22 2021-12-22 Equipment calling method, device, equipment, medium and product

Publications (2)

Publication Number Publication Date
CN114268653A CN114268653A (en) 2022-04-01
CN114268653B true CN114268653B (en) 2024-04-09

Family

ID=80829676

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111584129.8A Active CN114268653B (en) 2021-12-22 2021-12-22 Equipment calling method, device, equipment, medium and product

Country Status (1)

Country Link
CN (1) CN114268653B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101997909A (en) * 2009-08-24 2011-03-30 三星电子株式会社 Method for providing control widget and device using the same
CN105516185A (en) * 2015-12-30 2016-04-20 广东顺德中山大学卡内基梅隆大学国际联合研究院 Multi-protocol gateway equipment
CN107766232A (en) * 2016-08-23 2018-03-06 杭州海康威视数字技术股份有限公司 A kind of plug-in management method and device
WO2020223854A1 (en) * 2019-05-05 2020-11-12 深圳市欢太科技有限公司 Device network configuration method and apparatus, electronic device and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101997909A (en) * 2009-08-24 2011-03-30 三星电子株式会社 Method for providing control widget and device using the same
CN105516185A (en) * 2015-12-30 2016-04-20 广东顺德中山大学卡内基梅隆大学国际联合研究院 Multi-protocol gateway equipment
CN107766232A (en) * 2016-08-23 2018-03-06 杭州海康威视数字技术股份有限公司 A kind of plug-in management method and device
WO2020223854A1 (en) * 2019-05-05 2020-11-12 深圳市欢太科技有限公司 Device network configuration method and apparatus, electronic device and storage medium

Also Published As

Publication number Publication date
CN114268653A (en) 2022-04-01

Similar Documents

Publication Publication Date Title
CN102939579B (en) The method and apparatus that user bound interface element and granularity reflection process
AU2017219385A1 (en) Electronic device and method of application data display therefor
CN109101335B (en) Extending functionality of a host device
CN103106102A (en) Running method of Web application program and mobile terminal
US20140115454A1 (en) Method, apparatus and system of screenshot grabbing and sharing
CN110069919B (en) Information acquisition method and device
US20150244823A1 (en) Apparatus and method for providing push service based on location
CN105611607B (en) It realizes the method for merging multiple WiFi and realizes the method and system of WiFi connection
CN106649488A (en) Method and device for invoking multi-data-source interaction interface
CN111597466A (en) Display method and device and electronic equipment
CN112835632B (en) Method and equipment for calling end capability and computer storage medium
US11210449B2 (en) Page display method and device and storage medium
CN108241515B (en) Application shortcut establishing method and terminal
CN112637281B (en) Terminal equipment data access method and device, electronic equipment and storage medium
CN112243016A (en) Middleware platform, terminal equipment, 5G artificial intelligence cloud processing system and processing method
CN114222003A (en) Service calling method, system, device, equipment and storage medium
CN110717123B (en) Page response method and device, electronic equipment and storage medium
CN114268653B (en) Equipment calling method, device, equipment, medium and product
CN113391860A (en) Service request processing method and device, electronic equipment and computer storage medium
CN114968529A (en) Timer implementation method and related product
CN109669679B (en) Service detection and processing method and device and electronic equipment
CN113852962A (en) Network connection control method, device, storage medium and software program product
CN104978199A (en) Plug-in application method and device used for multiple browsers
CN113127010B (en) Application management method and device, electronic equipment and storage medium
CN115981576B (en) Method for sharing data, electronic device 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