CN116761144A - Method and device for accessing equipment to Internet of things platform - Google Patents

Method and device for accessing equipment to Internet of things platform Download PDF

Info

Publication number
CN116761144A
CN116761144A CN202310807744.3A CN202310807744A CN116761144A CN 116761144 A CN116761144 A CN 116761144A CN 202310807744 A CN202310807744 A CN 202310807744A CN 116761144 A CN116761144 A CN 116761144A
Authority
CN
China
Prior art keywords
accessed
equipment
data
internet
protocol configuration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310807744.3A
Other languages
Chinese (zh)
Inventor
杨军
陈超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Tuoxian Technology Co Ltd
Original Assignee
Beijing Jingdong Tuoxian Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Tuoxian Technology Co Ltd filed Critical Beijing Jingdong Tuoxian Technology Co Ltd
Priority to CN202310807744.3A priority Critical patent/CN116761144A/en
Publication of CN116761144A publication Critical patent/CN116761144A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/08Access restriction or access information delivery, e.g. discovery data delivery
    • H04W48/10Access restriction or access information delivery, e.g. discovery data delivery using broadcasted information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W80/00Wireless network protocols or protocol adaptations to wireless operation
    • H04W80/08Upper layer protocols
    • H04W80/12Application layer protocols, e.g. WAP [Wireless Application Protocol]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a method and a device for accessing equipment into an Internet of things platform, and relates to the technical field of Internet of things. One embodiment of the method comprises the following steps: acquiring access requests of a plurality of devices to be accessed, wherein the access requests indicate device identifiers and first device models respectively corresponding to the plurality of devices to be accessed; according to the first equipment model, acquiring target protocol configuration data corresponding to the first equipment model respectively from a target internet of things platform; establishing data connection with corresponding equipment to be accessed according to the equipment identification and the target protocol configuration data; and respectively carrying out data transmission according to the target protocol configuration data and the corresponding equipment to be accessed based on the data connection. By carrying out protocol configuration on the Internet of things platform, equipment using the private protocol of the equipment manufacturer can be accessed to the Internet of things platform without suitability transformation and cloud butt joint, and the condition that equipment and the Internet of things platform are locked when equipment is accessed by using the specific protocol specification of the Internet of things platform is avoided.

Description

Method and device for accessing equipment to Internet of things platform
Technical Field
The invention relates to the technical field of the Internet of things, in particular to a method and a device for accessing equipment to an Internet of things platform.
Background
At present, bluetooth access specifications provided by all large internet of things platforms are different, so that equipment using a private bluetooth protocol of a device manufacturer needs to be adaptively modified according to the bluetooth access specifications of the internet of things platform or can be accessed to the internet of things platform through cloud docking (enabling cloud services of the device manufacturer to be docked with cloud services of the internet of things platform).
In the process of implementing the present invention, the inventor finds that at least the following problems exist in the prior art:
the internet of things platform can only allow the equipment which is subjected to adaptation transformation or the equipment of the equipment manufacturer which establishes cloud butt joint with the equipment, and other equipment which is not adapted to the Bluetooth access specification provided by the platform can not access the internet of things platform.
Disclosure of Invention
In view of this, an embodiment of the present invention provides a method and an apparatus for accessing a device to an internet of things platform, by acquiring access requests of a plurality of devices to be accessed, where the access requests indicate device identifiers and first device models corresponding to the plurality of devices to be accessed respectively; acquiring target protocol configuration data corresponding to the first equipment model from a target internet of things platform according to the first equipment model; establishing data connection with corresponding equipment to be accessed according to the equipment identifier and the target protocol configuration data; and respectively carrying out data transmission with the corresponding equipment to be accessed according to the target protocol configuration data based on the data connection. By carrying out protocol configuration on the Internet of things platform, equipment using the private protocol of the equipment manufacturer can be accessed to the Internet of things platform without suitability transformation and cloud butt joint, and the condition that equipment and the Internet of things platform are locked when equipment is accessed by using the specific protocol specification of the Internet of things platform is avoided.
In order to achieve the above object, according to an aspect of the embodiments of the present invention, a method for accessing a device to an internet of things platform is provided.
The method for accessing the equipment to the platform of the Internet of things comprises the following steps: acquiring access requests of a plurality of devices to be accessed, wherein the access requests indicate device identifiers and first device models respectively corresponding to the devices to be accessed; acquiring target protocol configuration data corresponding to the first equipment model from a target internet of things platform according to the first equipment model; establishing data connection with corresponding equipment to be accessed according to the equipment identifier and the target protocol configuration data; and respectively carrying out data transmission with the corresponding equipment to be accessed according to the target protocol configuration data based on the data connection.
Optionally, the access request further indicates target internet of things platforms corresponding to the multiple devices to be accessed respectively; under the condition that a plurality of target internet of things platforms are indicated by the access request, respectively determining corresponding internet of things platforms for the plurality of devices to be accessed from the plurality of target internet of things platforms according to the access request; and aiming at any one device in the plurality of devices to be accessed, acquiring target protocol configuration data corresponding to a first device model of the device from an Internet of things platform corresponding to the device, so that the device accesses the Internet of things platform corresponding to the device according to the target protocol configuration data.
Optionally, the obtaining, according to the first device model, the target protocol configuration data corresponding to the first device model from the target internet of things platform includes: respectively calling a protocol configuration service of the target internet of things platform according to the first equipment model; and acquiring the target protocol configuration data corresponding to the first equipment model respectively according to the returned result of the protocol configuration service.
Optionally, the target protocol configuration data indicates a second device model adapted to the target protocol configuration data, and establishing a data connection with a corresponding device to be accessed according to the device identifier and the target protocol configuration data includes: for each of the devices to be accessed: determining a first equipment model corresponding to the equipment to be accessed; determining the target protocol configuration data corresponding to the first equipment model; determining whether the first device model matches the second device model indicated by the target protocol configuration data; and under the condition that the first equipment model is matched with the second equipment model, establishing data connection with the equipment to be accessed.
Optionally, the target protocol configuration data includes a sending command configuration, where the sending command configuration indicates that the device to be accessed sends a message notification when new data is generated, and the data transmission between the device to be accessed and the corresponding device to be accessed according to the target protocol configuration data based on the data connection includes: transmitting the transmission command configuration to the equipment to be accessed; receiving a message notification sent by the equipment to be accessed in response to the sending command configuration; and acquiring new data from the equipment to be accessed according to the message notification.
Optionally, the target protocol configuration data includes a data reading configuration, and the method provided by the invention further includes: determining a target service corresponding to the equipment to be accessed, and determining one or more data items corresponding to the target service according to the data reading configuration; and analyzing target data corresponding to the one or more data items from the new data.
Optionally, the method provided by the invention further comprises the following steps: either or both of the following:
disconnecting the data connection with the equipment to be accessed under the condition that the data transmission is not carried out with the equipment to be accessed within a preset duration threshold;
the target protocol configuration data is Bluetooth protocol configuration data.
In order to achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided an apparatus for accessing a device to an internet of things platform.
The device for accessing the equipment to the platform of the internet of things comprises: the system comprises a request receiving module, a request processing module and a processing module, wherein the request receiving module is used for obtaining access requests of a plurality of devices to be accessed, and the access requests indicate device identifiers and first device models respectively corresponding to the devices to be accessed; the configuration data acquisition module is used for acquiring target protocol configuration data corresponding to the first equipment model from a target internet of things platform according to the first equipment model; the data connection module is used for establishing data connection with the corresponding equipment to be accessed according to the equipment identifier and the target protocol configuration data; and the data transmission module is used for respectively carrying out data transmission with the corresponding equipment to be accessed according to the target protocol configuration data based on the data connection.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a server.
The server of the embodiment of the invention comprises: one or more processors; and the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors realize the method for accessing the equipment to the Internet of things platform.
To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided a computer-readable storage medium.
The embodiment of the invention relates to a computer readable storage medium, which stores a computer program, and the program is executed by a processor to realize the method for accessing equipment to an Internet of things platform.
One embodiment of the above invention has the following advantages or benefits: the method comprises the steps of obtaining access requests of a plurality of devices to be accessed, wherein the access requests indicate device identifiers and first device models respectively corresponding to the devices to be accessed; acquiring target protocol configuration data corresponding to the first equipment model from a target internet of things platform according to the first equipment model; establishing data connection with corresponding equipment to be accessed according to the equipment identifier and the target protocol configuration data; and respectively carrying out data transmission with the corresponding equipment to be accessed according to the target protocol configuration data based on the data connection. By carrying out protocol configuration on the Internet of things platform, equipment using the private protocol of the equipment manufacturer can be accessed to the Internet of things platform without suitability transformation and cloud butt joint, and the condition that equipment and the Internet of things platform are locked when equipment is accessed by using the specific protocol specification of the Internet of things platform is avoided.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic diagram of main steps of a method for accessing a device to an internet of things platform according to an embodiment of the present invention;
fig. 2 is a schematic diagram of main steps of a method for accessing a device to an internet of things platform according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of the main modules of an apparatus for device access to an Internet of things platform according to an embodiment of the present invention;
FIG. 4 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
fig. 5 is a schematic diagram of a computer system suitable for use in implementing an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that, in the technical solution of the present disclosure, the related aspects of collecting, updating, analyzing, processing, using, transmitting, storing, etc. of the personal information of the user all conform to the rules of the related laws and regulations, and are used for legal purposes without violating the public order colloquial. Necessary measures are taken for the personal information of the user, illegal access to the personal information data of the user is prevented, and the personal information security, network security and national security of the user are maintained.
It should be noted that the embodiments of the present invention and the technical features in the embodiments may be combined with each other without collision.
Fig. 1 is a schematic diagram of main steps of a method for accessing a device to an internet of things platform according to an embodiment of the present invention.
As shown in fig. 1, the method for accessing the device to the internet of things platform according to the embodiment of the invention mainly includes the following steps:
step S101: and acquiring access requests of a plurality of devices to be accessed, wherein the access requests indicate device identifiers and first device models respectively corresponding to the devices to be accessed.
The implementation main body of the method for accessing the device to the internet of things platform in this embodiment may be a client, such as a mobile phone client, and the client installs a communication SDK (Software Development Kit ) adapted to the client type. For example, a communication SDK of an apple system can be installed at an apple mobile phone client, and a communication SDK of an android system can be installed at an android mobile phone client. The communication plug-in can also be installed in the WeChat applet of the client, and the same purpose can also be achieved.
The device to be accessed and the internet of things platform can be connected with data and interacted with data through a Bluetooth protocol. It can be understood that under the condition that the device to be accessed and the platform of the internet of things are in data connection and data interaction through the Bluetooth protocol, the communication SDK installed on the client is a Bluetooth communication SDK, and similarly, the communication plug-in installed in the WeChat applet of the client is a Bluetooth communication plug-in.
The method is described in detail below by taking the example of data connection and data interaction between the device to be accessed and the platform of the internet of things through a bluetooth protocol.
In order to enable bluetooth devices of various types to smoothly access to the internet of things platform under the condition of using the private bluetooth protocol, the bluetooth GATT (Generic Attribute, general attribute) protocol used in the bluetooth communication process can be configured in detail in a device management background of the internet of things platform.
Before the protocol configuration, the bluetooth device first registers through the device management background, fills in a device ID (Identifier), a device type, a device model number, a bluetooth broadcast name, whether pairing is required, a data reading mode (real-time measurement or reading of history data), and the like.
After the equipment registration is completed, the Bluetooth GATT protocol configuration flow is entered, connection configuration is carried out according to the Bluetooth broadcast name and whether pairing is needed, for example, after the Bluetooth equipment starts Bluetooth broadcast, the client can acquire the Bluetooth broadcast name through a Bluetooth search mode, and connection is established with the Bluetooth equipment through pairing.
The general structure of the bluetooth GATT protocol is Profile (a subset of the bluetooth protocol specification), service and feature, wherein the Profile corresponds to the bluetooth protocol used by a certain type of device, and defines the data structure of protocol information exchange; a Profile includes one or more services, a Service representing a Service capability provided by the device for a certain usage scenario, such as blood pressure measurement, fetal heart monitoring, etc.; one Service includes one or more characies, and one characies may be used to represent certain business data such as blood glucose values.
In order to make the service data in the feature value be read in a configurable manner, a layer of Measure can be added below the Profile, service, characteristic three-layer structure, and a characacteristic can include one or more measures, which represent a plurality of values with service significance, for example, two measures can be included under a feature value of blood sugar: blood glucose level, measurement time.
Since both Service and characacteristic contained in Profile are represented by UUID (Universally Unique Identifier, universal unique identification code), as a handle of data exchange operation, when bluetooth protocol is configured, according to the device type of bluetooth device, such as a sphygmomanometer, a glucometer, and a device model, such as a certain brand II sphygmomanometer, the Service UUID in the bluetooth GATT protocol structure and the Characteristic value UUID are configured, such as the Service UUID filled in the protocol configuration for a certain brand II sphygmomanometer represents a Service capability for blood pressure measurement, while the Characteristic value UUID filled in the protocol configuration for a certain brand II sphygmomanometer is a specific Characteristic value UUID of a type II sphygmomanometer in a certain brand II sphygmomanometer.
In addition, the data reading configuration is performed according to the data reading mode, for example, the data reading mode of the fetal heart monitor is real-time measurement, and the client can read the fetal heart data from the fetal heart monitor in real time after the fetal heart monitor is connected to the internet of things platform through the client. The data reading mode can also be a mode of reading historical data, for example, the sphygmomanometer can store blood pressure measurement data in a period of time, and the client can select and read blood pressure measurement data of one or more past time points so as to facilitate the user to grasp the change condition of blood pressure in a period of time.
Through the Bluetooth GATT protocol configuration of the equipment management background, the Bluetooth equipment using the private Bluetooth protocol can be accessed to the Internet of things platform through a client terminal provided with a Bluetooth communication SDK or a WeChat applet communication plug-in.
The multiple devices to be accessed in this embodiment may be bluetooth devices, such as smart bracelets, smart sphygmomanometers, smart glucometers, fetal heart monitors, and the like. And the plurality of devices to be accessed start Bluetooth broadcasting and respectively send requests for accessing the Internet of things platform to the client. According to the multiple access requests, the device identifier of the device to be accessed, such as a bluetooth broadcast name and a first device model, can be determined respectively, and according to the first device model, a device manufacturer, a device type and a series to which the device belongs can be distinguished, such as according to the device model: the type I glucometer of a certain brand can determine that a manufacturer of equipment is a manufacturer corresponding to a certain brand, the type of equipment is the glucometer, and the series to which the equipment belongs is type I.
Step S102: and acquiring target protocol configuration data corresponding to the first equipment model from a target internet of things platform according to the first equipment model.
Under the condition that access requests of a plurality of devices to be accessed are all indicated to be accessed to one Internet of things platform, the Internet of things platform is a target Internet of things platform, and at the moment, protocol configuration data corresponding to the device model is acquired from the target Internet of things platform according to the device model of each device to be accessed. For example, when the equipment model is a certain brand I type blood glucose meter, protocol configuration data corresponding to the certain brand I type blood glucose meter is obtained from a target internet of things platform, and a data exchange structure of the protocol configuration data is suitable for data exchange between the certain brand I type blood glucose meter and the internet of things platform through a client.
In an embodiment of the present invention, the obtaining, according to the first device model, target protocol configuration data corresponding to the first device model from a target internet of things platform includes: respectively calling a protocol configuration service of the target internet of things platform according to the first equipment model; and acquiring the target protocol configuration data corresponding to the first equipment model respectively according to the returned result of the protocol configuration service.
The process of obtaining the target protocol configuration data is to take the equipment model of each equipment to be accessed as the entry of the protocol configuration service, and the protocol configuration service returns the protocol configuration data corresponding to the equipment model according to the equipment model. For example, the device to be connected is a certain brand II type sphygmomanometer, and the protocol configuration service returns protocol configuration data corresponding to the certain brand II type sphygmomanometer according to the certain brand II type sphygmomanometer.
In an embodiment of the present invention, the access request further indicates target internet of things platforms corresponding to the plurality of devices to be accessed respectively; under the condition that a plurality of target internet of things platforms are indicated by the access request, respectively determining corresponding internet of things platforms for the plurality of devices to be accessed from the plurality of target internet of things platforms according to the access request; and aiming at any one device in the plurality of devices to be accessed, acquiring target protocol configuration data corresponding to a first device model of the device from an Internet of things platform corresponding to the device, so that the device accesses the Internet of things platform corresponding to the device according to the target protocol configuration data.
Under the condition that the access requests of the plurality of devices to be accessed indicate that the target Internet of things platform is accessed is a plurality of, the client determines the target Internet of things platform indicated by the access requests according to each access request, then obtains protocol configuration data corresponding to the equipment model from the target Internet of things platform according to the equipment model indicated by the access request, and enables the devices to be accessed to access the target Internet of things platform through the protocol configuration data.
Step S103: and establishing data connection with the corresponding equipment to be accessed according to the equipment identifier and the target protocol configuration data.
The client downloads the acquired protocol configuration data to the local, and the client establishes data connection and data interaction with the device to be accessed corresponding to the device identifier through the protocol configuration data.
In one embodiment of the present invention, the target protocol configuration data indicates a second device model adapted to the target protocol configuration data, and the establishing a data connection with a corresponding device to be accessed according to the device identifier and the target protocol configuration data includes: for each of the devices to be accessed: determining a first equipment model corresponding to the equipment to be accessed; determining the target protocol configuration data corresponding to the first equipment model; determining whether the first device model matches the second device model indicated by the target protocol configuration data; and under the condition that the first equipment model is matched with the second equipment model, establishing data connection with the equipment to be accessed.
Before the client downloads the protocol configuration data to the local, whether the protocol configuration data is matched with the equipment to be accessed or not can be further confirmed according to the equipment model contained in the protocol configuration data and the equipment model of the equipment to be accessed, after a result that the protocol configuration data is matched with the equipment to be accessed is obtained, the protocol configuration data is downloaded to the local, and data connection is established between the protocol configuration data and the equipment to be accessed.
Step S104: and respectively carrying out data transmission with the corresponding equipment to be accessed according to the target protocol configuration data based on the data connection.
After the client establishes a data connection with the device to be accessed through the protocol configuration data, the client may acquire device measurement data from the device to be accessed (the device to be accessed actually becomes the accessed device at this time, but for the sake of term consistency, the term referring to the same device is used to replace the device to be accessed) and may upload the measurement data to the platform of the internet of things, may acquire data from the platform of the internet of things, and send the data to the bluetooth device, so that the device to be accessed may also be said to have accessed the platform of the internet of things, or the data connection between the device to be accessed and the platform of the internet of things has been established, so that data transmission may be performed between the two.
In one embodiment of the present invention, the target protocol configuration data includes a sending command configuration, the sending command configuration indicates the device to be accessed to send a message notification when new data is generated, and the data transmission between the device to be accessed and the corresponding target protocol configuration data based on the data connection includes: transmitting the transmission command configuration to the equipment to be accessed; receiving a message notification sent by the equipment to be accessed in response to the sending command configuration; and acquiring new data from the equipment to be accessed according to the message notification.
The protocol configuration data also defines in the transmit command configuration in which way the device to be accessed transmits data to the client, or in which way the client obtains data from the device to be accessed. The client sends the sending command configuration in the protocol configuration data to the Bluetooth device, the Bluetooth device sends a message for generating new data to the client according to the indication in the sending command configuration so as to inform the client that the new data can be acquired at the Bluetooth device, and the client acquires the generated new data from the Bluetooth device according to the message notification.
In an embodiment of the present invention, the target protocol configuration data includes a data reading configuration, and the method provided in this embodiment further includes: determining a target service corresponding to the equipment to be accessed, and determining one or more data items corresponding to the target service according to the data reading configuration; and analyzing target data corresponding to the one or more data items from the new data.
The protocol configuration data also defines which data the client reads from the device to be accessed in the data reading configuration. Such as the data reading configuration in the protocol configuration data corresponding to the blood glucose meter, indicates the data item (measurement of the protocol configuration) related to the blood glucose measurement service, such as the blood glucose value, the measurement time. The client extracts the data segment concerned by the service from the acquired new data according to the regular expression (such as/(0 b|1b) [0-9a-f ] {32 }/ig) in the data reading configuration, and directly discards the data which is not concerned by the service. For example, according to the regular expression/(0 b|1b) [0-9a-f ] {32}/ig, the client matches a data segment of 0x0b or 0x1b beginning followed by 16 arbitrary bytes (2 hexadecimal digits represent one byte) from the data of the whole feature value, uses the matched data segment as target data, such as a specific blood glucose value and a specific measurement time in a blood glucose measurement service, and can send the target data to the platform of the internet of things.
In an embodiment of the present invention, the method provided in this embodiment further includes any one or two of the following:
disconnecting the data connection with the equipment to be accessed under the condition that the data transmission is not carried out with the equipment to be accessed within a preset duration threshold;
The target protocol configuration data is Bluetooth protocol configuration data.
After the data transmission between the Bluetooth device and the client or the Internet of things platform is finished, if an operator does not disconnect the data connection between the Bluetooth device and the client, new data transmission is not performed within a certain period of time, and at the moment, the data connection between the Bluetooth device and the client can be automatically disconnected.
The target protocol configuration data may be bluetooth protocol configuration data, but is not limited to bluetooth protocol configuration data.
Fig. 2 is a schematic diagram of main steps of a method for accessing a device to an internet of things platform according to an embodiment of the present invention.
As shown in fig. 2, the method for accessing the device to the internet of things platform according to the embodiment of the invention mainly includes the following steps:
step S201: and acquiring access requests of a plurality of devices to be accessed, wherein the access requests indicate device identifiers and first device models respectively corresponding to the devices to be accessed.
And the plurality of devices to be accessed start Bluetooth broadcasting and respectively send requests for accessing the Internet of things platform to the client. According to the multiple access requests, the device identification, such as the Bluetooth broadcast name, of the device to be accessed and the first device model, such as a certain brand type I glucometer, can be respectively determined.
Step S202: and acquiring corresponding target protocol configuration data according to the first equipment model.
Respectively calling a protocol configuration service of the target internet of things platform according to the first equipment model; and acquiring the target protocol configuration data corresponding to the first equipment model respectively according to the returned result of the protocol configuration service.
Step S203: determining whether the first device model matches the second device model contained in the target protocol configuration data, and if so, executing step S205; if not, step S204 is performed.
For each of the devices to be accessed: determining a first equipment model corresponding to the equipment to be accessed; determining the target protocol configuration data corresponding to the first equipment model; determining whether the first device model matches the second device model indicated by the target protocol configuration data.
Step S204: access to the device to be accessed is denied.
And under the condition that the first equipment model is not matched with the second equipment model contained in the target protocol configuration data, the protocol configuration data is determined to be not matched with the equipment to be accessed, so that the equipment to be accessed cannot access the internet of things platform.
Step S205: and establishing data connection with the device to be accessed.
And under the condition that the first equipment model is matched with the second equipment model indicated by the target protocol configuration data, the protocol configuration data and equipment to be accessed are matched with each other, and the equipment to be accessed can establish data connection with an Internet of things platform through a client.
Step S206: and transmitting the transmission command configuration to the equipment to be accessed.
The client transmits a transmission command configuration in the protocol configuration data to the Bluetooth device, wherein the transmission command configuration indicates the device to be accessed to transmit a message notification when new data is generated.
Step S207: and acquiring new data from the equipment to be accessed.
And the Bluetooth device sends a message for generating new data to the client according to the indication in the sending command configuration so as to inform the client that the new data can be acquired at the Bluetooth device, and the client acquires the generated new data from the Bluetooth device according to the message notification.
Step S208: and analyzing the target data from the new data.
And the client analyzes target data corresponding to the data item related to the service from the acquired new data according to the data reading configuration, such as a specific blood sugar value and a specific measurement time.
Step S208: and sending the target data to the Internet of things platform.
According to the method for accessing the equipment to the Internet of things platform, disclosed by the embodiment of the invention, the access requests of the plurality of equipment to be accessed are obtained, and the access requests indicate the equipment identifiers and the first equipment types respectively corresponding to the plurality of equipment to be accessed; acquiring target protocol configuration data corresponding to the first equipment model from a target internet of things platform according to the first equipment model; establishing data connection with corresponding equipment to be accessed according to the equipment identifier and the target protocol configuration data; and respectively carrying out data transmission with the corresponding equipment to be accessed according to the target protocol configuration data based on the data connection. By carrying out protocol configuration on the Internet of things platform, equipment using the private protocol of the equipment manufacturer can be accessed to the Internet of things platform without suitability transformation and cloud butt joint, and the condition that equipment and the Internet of things platform are locked when equipment is accessed by using the specific protocol specification of the Internet of things platform is avoided.
Fig. 3 is a schematic diagram of main modules of an apparatus for accessing a device to an internet of things platform according to an embodiment of the present invention.
As shown in fig. 3, an apparatus 200 for accessing a device to an internet of things platform according to an embodiment of the present invention includes:
a request receiving module 301, configured to obtain access requests of a plurality of devices to be accessed, where the access requests indicate device identifiers and first device models corresponding to the plurality of devices to be accessed respectively;
the configuration data obtaining module 302 is configured to obtain, according to the first device model, target protocol configuration data corresponding to the first device model from a target internet of things platform;
the data connection module 303 is configured to establish a data connection with a corresponding device to be accessed according to the device identifier and the target protocol configuration data;
and the data transmission module 304 is configured to perform data transmission with the corresponding device to be accessed according to the target protocol configuration data based on the data connection.
In an embodiment of the present invention, the access request further indicates target internet of things platforms corresponding to the plurality of devices to be accessed respectively; the configuration data obtaining module 302 is further configured to, when the target internet of things platforms indicated by the access request are multiple, respectively determine, according to the access request, a corresponding internet of things platform for the multiple devices to be accessed from among the multiple target internet of things platforms; and aiming at any one device in the plurality of devices to be accessed, acquiring target protocol configuration data corresponding to a first device model of the device from an Internet of things platform corresponding to the device, so that the device accesses the Internet of things platform corresponding to the device according to the target protocol configuration data.
In one embodiment of the present invention, the configuration data obtaining module 302 is further configured to call the protocol configuration service of the target internet of things platform according to the first device model; and acquiring the target protocol configuration data corresponding to the first equipment model respectively according to the returned result of the protocol configuration service.
In one embodiment of the present invention, the data connection module 303 is further configured to, for each of the devices to be accessed: determining a first equipment model corresponding to the equipment to be accessed; determining the target protocol configuration data corresponding to the first equipment model; determining whether the first device model matches the second device model indicated by the target protocol configuration data; and under the condition that the first equipment model is matched with the second equipment model, establishing data connection with the equipment to be accessed.
In one embodiment of the present invention, the target protocol configuration data includes a sending command configuration, where the sending command configuration indicates that the device to be accessed sends a message notification when new data is generated, and the data transmission module 304 is further configured to send the sending command configuration to the device to be accessed; receiving a message notification sent by the equipment to be accessed in response to the sending command configuration; and acquiring new data from the equipment to be accessed according to the message notification.
In one embodiment of the present invention, the target protocol configuration data includes a data reading configuration, and the data transmission module 304 is further configured to determine a target service corresponding to the device to be accessed, and determine one or more data items corresponding to the target service according to the data reading configuration; and analyzing target data corresponding to the one or more data items from the new data.
In one embodiment of the present invention, the data transmission module 304 is further configured to disconnect the data connection with the device to be accessed when the data transmission with the device to be accessed is not performed within a preset duration threshold.
According to the device for accessing the equipment to the internet of things platform, which is disclosed by the embodiment of the invention, the access requests of the plurality of equipment to be accessed are obtained, and the access requests indicate the equipment identifiers and the first equipment types respectively corresponding to the plurality of equipment to be accessed; acquiring target protocol configuration data corresponding to the first equipment model from a target internet of things platform according to the first equipment model; establishing data connection with corresponding equipment to be accessed according to the equipment identifier and the target protocol configuration data; and respectively carrying out data transmission with the corresponding equipment to be accessed according to the target protocol configuration data based on the data connection. By carrying out protocol configuration on the Internet of things platform, equipment using the private protocol of the equipment manufacturer can be accessed to the Internet of things platform without suitability transformation and cloud butt joint, and the condition that equipment and the Internet of things platform are locked when equipment is accessed by using the specific protocol specification of the Internet of things platform is avoided.
Fig. 4 illustrates an exemplary system architecture 400 of a method for accessing a device to an internet of things platform or an apparatus for accessing a device to an internet of things platform to which embodiments of the present invention may be applied.
As shown in fig. 4, the system architecture 400 may include terminal devices 401, 402, 403, networks 404, 411 servers 405, 406, 407, and devices to be accessed 408, 409, 410. The networks 404, 411 are media used to provide communication links between the terminal devices 401, 402, 403 and the servers 405, 406, 407 and between the terminal devices 401, 402, 403 and the devices 408, 409, 410 to be accessed. The networks 404, 411 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user can interact with the devices to be accessed 408, 409, 410 and servers 405, 406, 407 via networks 404, 411 using the terminal devices 401, 402, 403, respectively, to receive or send messages or the like. Various communication client applications, such as a physiological or environmental index monitoring class application, a shopping class application, a web browser application, a search class application, an instant messaging tool, a mailbox client, social platform software, etc., may be installed on the terminal devices 401, 402, 403.
The terminal devices 401, 402, 403 may be various electronic devices having a display screen and supporting the display of physiological or environmental indicators, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The servers 405, 406, 407 may be servers providing various services, such as a background management server providing support for physiological or environmental indicator monitoring by the user using the terminal devices 401, 402, 403. The background management server may analyze and process the received data such as the protocol configuration data acquisition request, and feed back the processing result (for example, the protocol configuration data) to the terminal device.
It should be noted that, the method for accessing the device to the internet of things platform provided by the embodiment of the present invention is generally executed by the terminal devices 401, 402, 403, and correspondingly, the apparatus for accessing the device to the internet of things platform is generally set in the terminal devices 401, 402, 403.
It should be understood that the number of terminal devices, networks, servers and devices to be accessed in fig. 4 is merely illustrative. There may be any number of terminal devices, networks, servers, and devices to be accessed, as desired for implementation.
Referring now to FIG. 5, there is illustrated a schematic diagram of a computer system 500 suitable for use in implementing an embodiment of the present invention. The terminal device shown in fig. 5 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input section 506 including a keyboard, a mouse, and the like; an output portion 507 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker, and the like; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The drive 510 is also connected to the I/O interface 505 as needed. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as needed so that a computer program read therefrom is mounted into the storage section 508 as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 509, and/or installed from the removable media 511. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 501.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described modules may also be provided in a processor, for example, as: a processor includes a request receiving module, a configuration data acquisition module, a data connection module, and a data transmission module. The names of these modules do not in any way limit the module itself, for example, a data transmission module may also be described as a "module for data transmission with the corresponding device to be accessed".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to include: acquiring access requests of a plurality of devices to be accessed, wherein the access requests indicate device identifiers and first device models respectively corresponding to the devices to be accessed; acquiring target protocol configuration data corresponding to the first equipment model from a target internet of things platform according to the first equipment model; establishing data connection with corresponding equipment to be accessed according to the equipment identifier and the target protocol configuration data; and respectively carrying out data transmission with the corresponding equipment to be accessed according to the target protocol configuration data based on the data connection.
According to the technical scheme of the embodiment of the invention, the access requests of the plurality of devices to be accessed are obtained, and the access requests indicate the device identifiers and the first device types respectively corresponding to the plurality of devices to be accessed; acquiring target protocol configuration data corresponding to the first equipment model from a target internet of things platform according to the first equipment model; establishing data connection with corresponding equipment to be accessed according to the equipment identifier and the target protocol configuration data; and respectively carrying out data transmission with the corresponding equipment to be accessed according to the target protocol configuration data based on the data connection. By carrying out protocol configuration on the Internet of things platform, equipment using the private protocol of the equipment manufacturer can be accessed to the Internet of things platform without suitability transformation and cloud butt joint, and the condition that equipment and the Internet of things platform are locked when equipment is accessed by using the specific protocol specification of the Internet of things platform is avoided.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for accessing a device to an internet of things platform, comprising:
acquiring access requests of a plurality of devices to be accessed, wherein the access requests indicate device identifiers and first device models respectively corresponding to the devices to be accessed;
acquiring target protocol configuration data corresponding to the first equipment model from a target internet of things platform according to the first equipment model;
establishing data connection with corresponding equipment to be accessed according to the equipment identifier and the target protocol configuration data;
and respectively carrying out data transmission with the corresponding equipment to be accessed according to the target protocol configuration data based on the data connection.
2. The method of claim 1, wherein the access request further indicates a target internet of things platform to which the plurality of devices to be accessed respectively correspond; in the case that the access request indicates multiple target internet of things platforms,
According to the access request, respectively determining corresponding Internet of things platforms for the plurality of devices to be accessed from a plurality of target Internet of things platforms;
and aiming at any one device in the plurality of devices to be accessed, acquiring target protocol configuration data corresponding to a first device model of the device from an Internet of things platform corresponding to the device, so that the device accesses the Internet of things platform corresponding to the device according to the target protocol configuration data.
3. The method according to claim 1, wherein the obtaining, according to the first device model, target protocol configuration data corresponding to the first device model from a target internet of things platform includes:
respectively calling a protocol configuration service of the target internet of things platform according to the first equipment model;
and acquiring the target protocol configuration data corresponding to the first equipment model respectively according to the returned result of the protocol configuration service.
4. The method of claim 1, wherein the target protocol configuration data indicates a second device model adapted to the target protocol configuration data, wherein the establishing a data connection with the corresponding device to be accessed according to the device identification and the target protocol configuration data comprises:
For each of the devices to be accessed:
determining a first equipment model corresponding to the equipment to be accessed;
determining the target protocol configuration data corresponding to the first equipment model;
determining whether the first device model matches the second device model indicated by the target protocol configuration data;
and under the condition that the first equipment model is matched with the second equipment model, establishing data connection with the equipment to be accessed.
5. The method of claim 1, wherein the target protocol configuration data comprises a send command configuration, the send command configuration indicating that the device to be accessed sends a message notification when new data is generated, the data transmission with the corresponding device to be accessed according to the target protocol configuration data based on the data connection respectively comprising:
transmitting the transmission command configuration to the equipment to be accessed;
receiving a message notification sent by the equipment to be accessed in response to the sending command configuration;
and acquiring new data from the equipment to be accessed according to the message notification.
6. The method of claim 5, wherein the target protocol configuration data comprises a data read configuration, the method further comprising:
Determining a target service corresponding to the equipment to be accessed, and determining one or more data items corresponding to the target service according to the data reading configuration;
and analyzing target data corresponding to the one or more data items from the new data.
7. The method of claim 1, further comprising either or both of:
disconnecting the data connection with the equipment to be accessed under the condition that the data transmission is not carried out with the equipment to be accessed within a preset duration threshold;
the target protocol configuration data is Bluetooth protocol configuration data.
8. An apparatus for accessing a device to an internet of things platform, comprising:
the system comprises a request receiving module, a request processing module and a processing module, wherein the request receiving module is used for obtaining access requests of a plurality of devices to be accessed, and the access requests indicate device identifiers and first device models respectively corresponding to the devices to be accessed;
the configuration data acquisition module is used for acquiring target protocol configuration data corresponding to the first equipment model from a target internet of things platform according to the first equipment model;
the data connection module is used for establishing data connection with the corresponding equipment to be accessed according to the equipment identifier and the target protocol configuration data;
And the data transmission module is used for respectively carrying out data transmission with the corresponding equipment to be accessed according to the target protocol configuration data based on the data connection.
9. A server, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-7.
10. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-7.
CN202310807744.3A 2023-07-03 2023-07-03 Method and device for accessing equipment to Internet of things platform Pending CN116761144A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310807744.3A CN116761144A (en) 2023-07-03 2023-07-03 Method and device for accessing equipment to Internet of things platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310807744.3A CN116761144A (en) 2023-07-03 2023-07-03 Method and device for accessing equipment to Internet of things platform

Publications (1)

Publication Number Publication Date
CN116761144A true CN116761144A (en) 2023-09-15

Family

ID=87955071

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310807744.3A Pending CN116761144A (en) 2023-07-03 2023-07-03 Method and device for accessing equipment to Internet of things platform

Country Status (1)

Country Link
CN (1) CN116761144A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117729063A (en) * 2024-02-08 2024-03-19 深圳市金瑞铭科技有限公司 Device access method, device, equipment and storage medium of industrial Internet of things

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117729063A (en) * 2024-02-08 2024-03-19 深圳市金瑞铭科技有限公司 Device access method, device, equipment and storage medium of industrial Internet of things
CN117729063B (en) * 2024-02-08 2024-04-16 深圳市金瑞铭科技有限公司 Device access method, device, equipment and storage medium of industrial Internet of things

Similar Documents

Publication Publication Date Title
CN110377440B (en) Information processing method and device
CN110098998B (en) Method and apparatus for processing information
CN111177112A (en) Database blocking method and device based on operation and maintenance management system and electronic equipment
CN116761144A (en) Method and device for accessing equipment to Internet of things platform
CN109218041B (en) Request processing method and device for server system
CN109933508B (en) Method and apparatus for transmitting information
CN107315672B (en) Method and device for monitoring server
CN109600254A (en) The generation method and related system of full link log
CN108076110B (en) Electronic data exchange system and apparatus comprising an electronic data exchange system
CN114979256B (en) Message pushing method and device, electronic equipment and computer readable medium
CN111274104A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN112380411B (en) Sensitive word processing method, device, electronic equipment, system and storage medium
CN111339394B (en) Method and device for acquiring information
CN114268799A (en) Streaming media transmission method and device, electronic equipment and medium
CN113486749A (en) Image data collection method, device, electronic equipment and computer readable medium
CN108920352B (en) Method and device for acquiring information
CN109542646A (en) Method and apparatus for calling application programming interface
CN112487261B (en) Data acquisition method and device, electronic equipment and medium
CN112068917B (en) Interface presentation method, device, electronic equipment and computer readable medium
CN108494982A (en) Method and apparatus for generating information
CN114285743B (en) Method, device, electronic equipment and storage medium for updating configuration information
CN115309612B (en) Method and device for monitoring data
CN114253520B (en) Interface code generation method and device
CN115052003B (en) Data synchronization method, related device and medium
CN110896374B (en) Method and equipment for generating user information and sending request information

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